File tree 6 files changed +116
-2
lines changed
6 files changed +116
-2
lines changed Original file line number Diff line number Diff line change 251
251
]
252
252
}
253
253
} ,
254
+ {
255
+ "files" : [ "plugins/content/api/positioning/**/*.js" ] ,
256
+ "parserOptions" : {
257
+ "ecmaVersion" : 2023 ,
258
+ "sourceType" : "module"
259
+ } ,
260
+ "env" : {
261
+ "node" : true ,
262
+ "es2023" : true
263
+ }
264
+ } ,
265
+ {
266
+ "files" : [ "plugins/content/api/positioning/**/*.cjs" ] ,
267
+ "parserOptions" : {
268
+ "ecmaVersion" : 2023 ,
269
+ "sourceType" : "commonjs"
270
+ } ,
271
+ "env" : {
272
+ "node" : true ,
273
+ "es2023" : true
274
+ }
275
+ } ,
254
276
{
255
277
"files" : [
256
278
"api/**/*.js" ,
Original file line number Diff line number Diff line change 409
409
template : CV . T ( '/javascripts/countly/vue/templates/content/UI/content-sidebar-input.html' ) ,
410
410
411
411
props : {
412
+ componentTooltip : {
413
+ default : null ,
414
+ type : String
415
+ } ,
416
+
412
417
disabled : {
413
418
default : false ,
414
419
type : Boolean
419
424
type : String
420
425
} ,
421
426
427
+ labelIcon : {
428
+ default : 'cly-io cly-io-question-mark-circle' ,
429
+ type : String
430
+ } ,
431
+ labelTooltip : {
432
+ default : null ,
433
+ type : String
434
+ } ,
435
+
422
436
options : {
423
437
default : ( ) => [ ] ,
424
438
type : Array
457
471
size : {
458
472
default : null ,
459
473
type : String
474
+ } ,
475
+
476
+ withComponentTooltip : {
477
+ default : false ,
478
+ type : Boolean
479
+ } ,
480
+
481
+ withLabelTooltip : {
482
+ default : false ,
483
+ type : Boolean
460
484
}
461
485
} ,
462
486
498
522
return this . isDropdownInput && Array . isArray ( this . options ) && this . options . length ;
499
523
} ,
500
524
525
+ isLabelTooltipVisible ( ) {
526
+ return this . withLabelTooltip && this . labelTooltip ;
527
+ } ,
528
+
501
529
isSliderInput ( ) {
502
530
return this . type === COUNTLY_CONTENT_SIDEBAR_INPUT_COMPONENT_BY_TYPE_SLIDER ;
503
531
} ,
519
547
520
548
mainComponent ( ) {
521
549
return COUNTLY_CONTENT_SIDEBAR_INPUT_COMPONENT_BY_TYPE [ this . type ] || 'div' ;
550
+ } ,
551
+
552
+ tooltip ( ) {
553
+ if ( this . withComponentTooltip ) {
554
+ return this . componentTooltip || null ;
555
+ }
556
+ return null ;
522
557
}
523
558
}
524
559
} ) ) ;
Original file line number Diff line number Diff line change 1660
1660
type : Boolean ,
1661
1661
default : true ,
1662
1662
required : false
1663
+ } ,
1664
+ minDateValue : {
1665
+ type : Date
1666
+ } ,
1667
+ isFuture : {
1668
+ type : Boolean ,
1669
+ default : false
1670
+ }
1671
+ } ,
1672
+ computed : {
1673
+ pickerOptions ( ) {
1674
+ const defaultRange = { selectableRange : '00:00:00 - 23:59:00' } ;
1675
+
1676
+ if ( ! this . minDateValue ) {
1677
+ return defaultRange ;
1678
+ }
1679
+
1680
+ const now = moment ( ) ;
1681
+ const minDateMoment = moment ( this . minDateValue ) ;
1682
+ const isToday = minDateMoment . isSame ( now , 'day' ) ;
1683
+
1684
+ if ( this . isFuture && isToday ) {
1685
+ return {
1686
+ selectableRange : `${ now . format ( 'HH:mm:ss' ) } - 23:59:00`
1687
+ } ;
1688
+ }
1689
+
1690
+ return defaultRange ;
1663
1691
}
1664
1692
} ,
1665
- template : '<el-time-picker :append-to-body="appendToBody" :style="{\'width\': width + \'px\'}" class="cly-vue-time-picker" v-bind="$attrs" v-on="$listeners" :format="format" :clearable="clearable"></el-time-picker>'
1693
+ template : `
1694
+ <el-time-picker
1695
+ :append-to-body="appendToBody"
1696
+ :clearable="clearable"
1697
+ :format="format"
1698
+ :picker-options="pickerOptions"
1699
+ :style="{\'width\': width + \'px\'}"
1700
+ class="cly-vue-time-picker"
1701
+ v-bind="$attrs"
1702
+ v-on="$listeners"
1703
+ >
1704
+ </el-time-picker>`
1666
1705
} ) ;
1667
1706
1668
1707
Original file line number Diff line number Diff line change 17
17
class ="cly-vue-content-builder-sidebar-input__label "
18
18
>
19
19
{{ label }}
20
+ < i
21
+ v-if ="isLabelTooltipVisible "
22
+ v-tooltip.left ="labelTooltip "
23
+ :class ="labelIcon "
24
+ />
20
25
</ label >
21
26
< slot name ="content-builder-layout-step ">
22
27
< component
23
28
:is ="mainComponent "
24
29
v-bind ="$attrs "
25
30
v-model ="componentValue "
31
+ v-tooltip.left ="tooltip "
26
32
class ="cly-vue-content-builder-sidebar-input__component "
27
33
:class ="{ 'cly-vue-content-builder-sidebar-input__component--slider': isSliderInput } "
28
34
:controls ="controlsProp "
Original file line number Diff line number Diff line change 207
207
< span class ="text-medium "> {{i18n('common.time')}}</ span >
208
208
</ div >
209
209
< div >
210
- < cly-time-picker align ="right " :width ="100 " v-model ="minTime "> </ cly-time-picker >
210
+ < cly-time-picker align ="right " :width ="100 " v-model ="minTime " :min-date-value =" minDate " :is-future =" isFuture " > </ cly-time-picker >
211
211
</ div >
212
212
</ div >
213
213
</ div >
Original file line number Diff line number Diff line change 4745
4745
4746
4746
// .cly-vue-content-builder-sidebar-input__label
4747
4747
& __label {
4748
+ display : flex ;
4749
+ align-items : baseline ;
4750
+ justify-content : flex-start ;
4751
+
4748
4752
flex-shrink : 0 ;
4749
4753
margin-right : auto ;
4750
4754
font-size : 13px ;
4751
4755
font-weight : 500 ;
4752
4756
line-height : 16px ;
4757
+
4758
+ // .cly-vue-content-builder-sidebar-input__label i
4759
+ i {
4760
+ margin-left : 4px ;
4761
+ font-size : 13px ;
4762
+ font-weight : 500 ;
4763
+ line-height : 16px ;
4764
+ }
4753
4765
}
4754
4766
4755
4767
// .cly-vue-content-builder-sidebar-input__number-input-suffix
You can’t perform that action at this time.
0 commit comments