File tree Expand file tree Collapse file tree 6 files changed +116
-2
lines changed
Expand file tree Collapse file tree 6 files changed +116
-2
lines changed Original file line number Diff line number Diff line change 251251 ]
252252 }
253253 },
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+ },
254276 {
255277 "files" : [
256278 " api/**/*.js" ,
Original file line number Diff line number Diff line change 409409 template : CV . T ( '/javascripts/countly/vue/templates/content/UI/content-sidebar-input.html' ) ,
410410
411411 props : {
412+ componentTooltip : {
413+ default : null ,
414+ type : String
415+ } ,
416+
412417 disabled : {
413418 default : false ,
414419 type : Boolean
419424 type : String
420425 } ,
421426
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+
422436 options : {
423437 default : ( ) => [ ] ,
424438 type : Array
457471 size : {
458472 default : null ,
459473 type : String
474+ } ,
475+
476+ withComponentTooltip : {
477+ default : false ,
478+ type : Boolean
479+ } ,
480+
481+ withLabelTooltip : {
482+ default : false ,
483+ type : Boolean
460484 }
461485 } ,
462486
498522 return this . isDropdownInput && Array . isArray ( this . options ) && this . options . length ;
499523 } ,
500524
525+ isLabelTooltipVisible ( ) {
526+ return this . withLabelTooltip && this . labelTooltip ;
527+ } ,
528+
501529 isSliderInput ( ) {
502530 return this . type === COUNTLY_CONTENT_SIDEBAR_INPUT_COMPONENT_BY_TYPE_SLIDER ;
503531 } ,
519547
520548 mainComponent ( ) {
521549 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 ;
522557 }
523558 }
524559 } ) ) ;
Original file line number Diff line number Diff line change 16601660 type : Boolean ,
16611661 default : true ,
16621662 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 ;
16631691 }
16641692 } ,
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>`
16661705 } ) ;
16671706
16681707
Original file line number Diff line number Diff line change 1717 class ="cly-vue-content-builder-sidebar-input__label "
1818 >
1919 {{ label }}
20+ < i
21+ v-if ="isLabelTooltipVisible "
22+ v-tooltip.left ="labelTooltip "
23+ :class ="labelIcon "
24+ />
2025 </ label >
2126 < slot name ="content-builder-layout-step ">
2227 < component
2328 :is ="mainComponent "
2429 v-bind ="$attrs "
2530 v-model ="componentValue "
31+ v-tooltip.left ="tooltip "
2632 class ="cly-vue-content-builder-sidebar-input__component "
2733 :class ="{ 'cly-vue-content-builder-sidebar-input__component--slider': isSliderInput } "
2834 :controls ="controlsProp "
Original file line number Diff line number Diff line change 207207 < span class ="text-medium "> {{i18n('common.time')}}</ span >
208208 </ div >
209209 < 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 >
211211 </ div >
212212 </ div >
213213 </ div >
Original file line number Diff line number Diff line change 47454745
47464746 // .cly-vue-content-builder-sidebar-input__label
47474747 & __label {
4748+ display : flex ;
4749+ align-items : baseline ;
4750+ justify-content : flex-start ;
4751+
47484752 flex-shrink : 0 ;
47494753 margin-right : auto ;
47504754 font-size : 13px ;
47514755 font-weight : 500 ;
47524756 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+ }
47534765 }
47544766
47554767 // .cly-vue-content-builder-sidebar-input__number-input-suffix
You can’t perform that action at this time.
0 commit comments