@progress/kendo-vue-dateinputs 6.4.0-develop.2 → 6.4.0-develop.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/datetimepicker/DateTimeSelector.js +1 -1
- package/datetimepicker/DateTimeSelector.mjs +4 -4
- package/dist/cdn/js/kendo-vue-dateinputs.js +1 -1
- package/index.d.mts +15 -15
- package/index.d.ts +15 -15
- package/package-metadata.js +1 -1
- package/package-metadata.mjs +2 -2
- package/package.json +8 -8
- package/timepicker/TimePart.js +1 -1
- package/timepicker/TimePart.mjs +3 -3
- package/timepicker/TimeSelector.js +1 -1
- package/timepicker/TimeSelector.mjs +12 -12
package/index.d.mts
CHANGED
|
@@ -589,7 +589,7 @@ value: PropType<Date>;
|
|
|
589
589
|
defaultValue: PropType<Date>;
|
|
590
590
|
format: {
|
|
591
591
|
type: PropType<string | DateFormatOptions>;
|
|
592
|
-
default: () => string;
|
|
592
|
+
default: () => string | object;
|
|
593
593
|
};
|
|
594
594
|
formatPlaceholder: {
|
|
595
595
|
type: PropType<DateInputFormatPlaceholder>;
|
|
@@ -723,7 +723,7 @@ value: PropType<Date>;
|
|
|
723
723
|
defaultValue: PropType<Date>;
|
|
724
724
|
format: {
|
|
725
725
|
type: PropType<string | DateFormatOptions>;
|
|
726
|
-
default: () => string;
|
|
726
|
+
default: () => string | object;
|
|
727
727
|
};
|
|
728
728
|
formatPlaceholder: {
|
|
729
729
|
type: PropType<DateInputFormatPlaceholder>;
|
|
@@ -817,7 +817,7 @@ onChangemodel?: (...args: any[] | unknown[]) => any;
|
|
|
817
817
|
}>, {
|
|
818
818
|
required: boolean;
|
|
819
819
|
size: string;
|
|
820
|
-
format: string;
|
|
820
|
+
format: string | object;
|
|
821
821
|
max: Date;
|
|
822
822
|
min: Date;
|
|
823
823
|
rounded: string;
|
|
@@ -1151,7 +1151,7 @@ validator: (value: string) => any;
|
|
|
1151
1151
|
focusedDate: PropType<Date>;
|
|
1152
1152
|
format: {
|
|
1153
1153
|
type: PropType<string | DateFormatOptions>;
|
|
1154
|
-
default: () => string;
|
|
1154
|
+
default: () => string | object;
|
|
1155
1155
|
};
|
|
1156
1156
|
formatPlaceholder: PropType<DateInputFormatPlaceholder_2>;
|
|
1157
1157
|
id: PropType<string>;
|
|
@@ -1292,7 +1292,7 @@ validator: (value: string) => any;
|
|
|
1292
1292
|
focusedDate: PropType<Date>;
|
|
1293
1293
|
format: {
|
|
1294
1294
|
type: PropType<string | DateFormatOptions>;
|
|
1295
|
-
default: () => string;
|
|
1295
|
+
default: () => string | object;
|
|
1296
1296
|
};
|
|
1297
1297
|
formatPlaceholder: PropType<DateInputFormatPlaceholder_2>;
|
|
1298
1298
|
id: PropType<string>;
|
|
@@ -1351,7 +1351,7 @@ onIconclick?: (...args: any[] | unknown[]) => any;
|
|
|
1351
1351
|
title: string;
|
|
1352
1352
|
tabIndex: number;
|
|
1353
1353
|
size: string;
|
|
1354
|
-
format: string;
|
|
1354
|
+
format: string | object;
|
|
1355
1355
|
max: Date;
|
|
1356
1356
|
min: Date;
|
|
1357
1357
|
rounded: string;
|
|
@@ -1620,7 +1620,7 @@ endDateInputSettings: PropType<DateRangePickerDateInputSettings_2>;
|
|
|
1620
1620
|
focusedDate: PropType<Date>;
|
|
1621
1621
|
format: {
|
|
1622
1622
|
type: PropType<string | DateFormatOptions>;
|
|
1623
|
-
default: () => string;
|
|
1623
|
+
default: () => string | object;
|
|
1624
1624
|
};
|
|
1625
1625
|
id: PropType<string>;
|
|
1626
1626
|
ariaLabelledBy: PropType<string>;
|
|
@@ -1749,7 +1749,7 @@ endDateInputSettings: PropType<DateRangePickerDateInputSettings_2>;
|
|
|
1749
1749
|
focusedDate: PropType<Date>;
|
|
1750
1750
|
format: {
|
|
1751
1751
|
type: PropType<string | DateFormatOptions>;
|
|
1752
|
-
default: () => string;
|
|
1752
|
+
default: () => string | object;
|
|
1753
1753
|
};
|
|
1754
1754
|
id: PropType<string>;
|
|
1755
1755
|
ariaLabelledBy: PropType<string>;
|
|
@@ -1808,7 +1808,7 @@ onChangemodel?: (...args: any[] | unknown[]) => any;
|
|
|
1808
1808
|
}>, {
|
|
1809
1809
|
value: SelectionRange;
|
|
1810
1810
|
size: string;
|
|
1811
|
-
format: string;
|
|
1811
|
+
format: string | object;
|
|
1812
1812
|
max: Date;
|
|
1813
1813
|
min: Date;
|
|
1814
1814
|
rounded: string;
|
|
@@ -2105,7 +2105,7 @@ default: () => any;
|
|
|
2105
2105
|
focusedDate: PropType<Date>;
|
|
2106
2106
|
format: {
|
|
2107
2107
|
type: PropType<string | DateFormatOptions>;
|
|
2108
|
-
default: () => string;
|
|
2108
|
+
default: () => string | object;
|
|
2109
2109
|
};
|
|
2110
2110
|
formatPlaceholder: {
|
|
2111
2111
|
type: PropType<DateInputFormatPlaceholder>;
|
|
@@ -2264,7 +2264,7 @@ default: () => any;
|
|
|
2264
2264
|
focusedDate: PropType<Date>;
|
|
2265
2265
|
format: {
|
|
2266
2266
|
type: PropType<string | DateFormatOptions>;
|
|
2267
|
-
default: () => string;
|
|
2267
|
+
default: () => string | object;
|
|
2268
2268
|
};
|
|
2269
2269
|
formatPlaceholder: {
|
|
2270
2270
|
type: PropType<DateInputFormatPlaceholder>;
|
|
@@ -2367,7 +2367,7 @@ required: boolean;
|
|
|
2367
2367
|
title: string;
|
|
2368
2368
|
tabIndex: number;
|
|
2369
2369
|
size: string;
|
|
2370
|
-
format: string;
|
|
2370
|
+
format: string | object;
|
|
2371
2371
|
max: Date;
|
|
2372
2372
|
min: Date;
|
|
2373
2373
|
weekNumber: boolean;
|
|
@@ -2748,7 +2748,7 @@ default: boolean;
|
|
|
2748
2748
|
};
|
|
2749
2749
|
format: {
|
|
2750
2750
|
type: PropType<string | DateFormatOptions>;
|
|
2751
|
-
default: () => string;
|
|
2751
|
+
default: () => string | object;
|
|
2752
2752
|
};
|
|
2753
2753
|
formatPlaceholder: {
|
|
2754
2754
|
type: PropType<DateInputFormatPlaceholder>;
|
|
@@ -2903,7 +2903,7 @@ default: boolean;
|
|
|
2903
2903
|
};
|
|
2904
2904
|
format: {
|
|
2905
2905
|
type: PropType<string | DateFormatOptions>;
|
|
2906
|
-
default: () => string;
|
|
2906
|
+
default: () => string | object;
|
|
2907
2907
|
};
|
|
2908
2908
|
formatPlaceholder: {
|
|
2909
2909
|
type: PropType<DateInputFormatPlaceholder>;
|
|
@@ -2998,7 +2998,7 @@ value: Date;
|
|
|
2998
2998
|
title: string;
|
|
2999
2999
|
tabIndex: number;
|
|
3000
3000
|
size: string;
|
|
3001
|
-
format: string;
|
|
3001
|
+
format: string | object;
|
|
3002
3002
|
max: Date;
|
|
3003
3003
|
min: Date;
|
|
3004
3004
|
rounded: string;
|
package/index.d.ts
CHANGED
|
@@ -589,7 +589,7 @@ value: PropType<Date>;
|
|
|
589
589
|
defaultValue: PropType<Date>;
|
|
590
590
|
format: {
|
|
591
591
|
type: PropType<string | DateFormatOptions>;
|
|
592
|
-
default: () => string;
|
|
592
|
+
default: () => string | object;
|
|
593
593
|
};
|
|
594
594
|
formatPlaceholder: {
|
|
595
595
|
type: PropType<DateInputFormatPlaceholder>;
|
|
@@ -723,7 +723,7 @@ value: PropType<Date>;
|
|
|
723
723
|
defaultValue: PropType<Date>;
|
|
724
724
|
format: {
|
|
725
725
|
type: PropType<string | DateFormatOptions>;
|
|
726
|
-
default: () => string;
|
|
726
|
+
default: () => string | object;
|
|
727
727
|
};
|
|
728
728
|
formatPlaceholder: {
|
|
729
729
|
type: PropType<DateInputFormatPlaceholder>;
|
|
@@ -817,7 +817,7 @@ onChangemodel?: (...args: any[] | unknown[]) => any;
|
|
|
817
817
|
}>, {
|
|
818
818
|
required: boolean;
|
|
819
819
|
size: string;
|
|
820
|
-
format: string;
|
|
820
|
+
format: string | object;
|
|
821
821
|
max: Date;
|
|
822
822
|
min: Date;
|
|
823
823
|
rounded: string;
|
|
@@ -1151,7 +1151,7 @@ validator: (value: string) => any;
|
|
|
1151
1151
|
focusedDate: PropType<Date>;
|
|
1152
1152
|
format: {
|
|
1153
1153
|
type: PropType<string | DateFormatOptions>;
|
|
1154
|
-
default: () => string;
|
|
1154
|
+
default: () => string | object;
|
|
1155
1155
|
};
|
|
1156
1156
|
formatPlaceholder: PropType<DateInputFormatPlaceholder_2>;
|
|
1157
1157
|
id: PropType<string>;
|
|
@@ -1292,7 +1292,7 @@ validator: (value: string) => any;
|
|
|
1292
1292
|
focusedDate: PropType<Date>;
|
|
1293
1293
|
format: {
|
|
1294
1294
|
type: PropType<string | DateFormatOptions>;
|
|
1295
|
-
default: () => string;
|
|
1295
|
+
default: () => string | object;
|
|
1296
1296
|
};
|
|
1297
1297
|
formatPlaceholder: PropType<DateInputFormatPlaceholder_2>;
|
|
1298
1298
|
id: PropType<string>;
|
|
@@ -1351,7 +1351,7 @@ onIconclick?: (...args: any[] | unknown[]) => any;
|
|
|
1351
1351
|
title: string;
|
|
1352
1352
|
tabIndex: number;
|
|
1353
1353
|
size: string;
|
|
1354
|
-
format: string;
|
|
1354
|
+
format: string | object;
|
|
1355
1355
|
max: Date;
|
|
1356
1356
|
min: Date;
|
|
1357
1357
|
rounded: string;
|
|
@@ -1620,7 +1620,7 @@ endDateInputSettings: PropType<DateRangePickerDateInputSettings_2>;
|
|
|
1620
1620
|
focusedDate: PropType<Date>;
|
|
1621
1621
|
format: {
|
|
1622
1622
|
type: PropType<string | DateFormatOptions>;
|
|
1623
|
-
default: () => string;
|
|
1623
|
+
default: () => string | object;
|
|
1624
1624
|
};
|
|
1625
1625
|
id: PropType<string>;
|
|
1626
1626
|
ariaLabelledBy: PropType<string>;
|
|
@@ -1749,7 +1749,7 @@ endDateInputSettings: PropType<DateRangePickerDateInputSettings_2>;
|
|
|
1749
1749
|
focusedDate: PropType<Date>;
|
|
1750
1750
|
format: {
|
|
1751
1751
|
type: PropType<string | DateFormatOptions>;
|
|
1752
|
-
default: () => string;
|
|
1752
|
+
default: () => string | object;
|
|
1753
1753
|
};
|
|
1754
1754
|
id: PropType<string>;
|
|
1755
1755
|
ariaLabelledBy: PropType<string>;
|
|
@@ -1808,7 +1808,7 @@ onChangemodel?: (...args: any[] | unknown[]) => any;
|
|
|
1808
1808
|
}>, {
|
|
1809
1809
|
value: SelectionRange;
|
|
1810
1810
|
size: string;
|
|
1811
|
-
format: string;
|
|
1811
|
+
format: string | object;
|
|
1812
1812
|
max: Date;
|
|
1813
1813
|
min: Date;
|
|
1814
1814
|
rounded: string;
|
|
@@ -2105,7 +2105,7 @@ default: () => any;
|
|
|
2105
2105
|
focusedDate: PropType<Date>;
|
|
2106
2106
|
format: {
|
|
2107
2107
|
type: PropType<string | DateFormatOptions>;
|
|
2108
|
-
default: () => string;
|
|
2108
|
+
default: () => string | object;
|
|
2109
2109
|
};
|
|
2110
2110
|
formatPlaceholder: {
|
|
2111
2111
|
type: PropType<DateInputFormatPlaceholder>;
|
|
@@ -2264,7 +2264,7 @@ default: () => any;
|
|
|
2264
2264
|
focusedDate: PropType<Date>;
|
|
2265
2265
|
format: {
|
|
2266
2266
|
type: PropType<string | DateFormatOptions>;
|
|
2267
|
-
default: () => string;
|
|
2267
|
+
default: () => string | object;
|
|
2268
2268
|
};
|
|
2269
2269
|
formatPlaceholder: {
|
|
2270
2270
|
type: PropType<DateInputFormatPlaceholder>;
|
|
@@ -2367,7 +2367,7 @@ required: boolean;
|
|
|
2367
2367
|
title: string;
|
|
2368
2368
|
tabIndex: number;
|
|
2369
2369
|
size: string;
|
|
2370
|
-
format: string;
|
|
2370
|
+
format: string | object;
|
|
2371
2371
|
max: Date;
|
|
2372
2372
|
min: Date;
|
|
2373
2373
|
weekNumber: boolean;
|
|
@@ -2748,7 +2748,7 @@ default: boolean;
|
|
|
2748
2748
|
};
|
|
2749
2749
|
format: {
|
|
2750
2750
|
type: PropType<string | DateFormatOptions>;
|
|
2751
|
-
default: () => string;
|
|
2751
|
+
default: () => string | object;
|
|
2752
2752
|
};
|
|
2753
2753
|
formatPlaceholder: {
|
|
2754
2754
|
type: PropType<DateInputFormatPlaceholder>;
|
|
@@ -2903,7 +2903,7 @@ default: boolean;
|
|
|
2903
2903
|
};
|
|
2904
2904
|
format: {
|
|
2905
2905
|
type: PropType<string | DateFormatOptions>;
|
|
2906
|
-
default: () => string;
|
|
2906
|
+
default: () => string | object;
|
|
2907
2907
|
};
|
|
2908
2908
|
formatPlaceholder: {
|
|
2909
2909
|
type: PropType<DateInputFormatPlaceholder>;
|
|
@@ -2998,7 +2998,7 @@ value: Date;
|
|
|
2998
2998
|
title: string;
|
|
2999
2999
|
tabIndex: number;
|
|
3000
3000
|
size: string;
|
|
3001
|
-
format: string;
|
|
3001
|
+
format: string | object;
|
|
3002
3002
|
max: Date;
|
|
3003
3003
|
min: Date;
|
|
3004
3004
|
rounded: string;
|
package/package-metadata.js
CHANGED
|
@@ -5,4 +5,4 @@
|
|
|
5
5
|
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e={name:"@progress/kendo-vue-dateinputs",productName:"Kendo UI for Vue",productCode:"KENDOUIVUE",productCodes:["KENDOUIVUE"],publishDate:
|
|
8
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e={name:"@progress/kendo-vue-dateinputs",productName:"Kendo UI for Vue",productCode:"KENDOUIVUE",productCodes:["KENDOUIVUE"],publishDate: 1745846444,version:"6.4.0-develop.4",licensingDocsUrl:"https://www.telerik.com/kendo-vue-ui/my-license/?utm_medium=product&utm_source=kendovue&utm_campaign=kendo-ui-vue-purchase-license-keys-warning"};exports.packageMetadata=e;
|
package/package-metadata.mjs
CHANGED
|
@@ -10,8 +10,8 @@ const e = {
|
|
|
10
10
|
productName: "Kendo UI for Vue",
|
|
11
11
|
productCode: "KENDOUIVUE",
|
|
12
12
|
productCodes: ["KENDOUIVUE"],
|
|
13
|
-
publishDate:
|
|
14
|
-
version: "6.4.0-develop.
|
|
13
|
+
publishDate: 1745846444,
|
|
14
|
+
version: "6.4.0-develop.4",
|
|
15
15
|
licensingDocsUrl: "https://www.telerik.com/kendo-vue-ui/my-license/?utm_medium=product&utm_source=kendovue&utm_campaign=kendo-ui-vue-purchase-license-keys-warning"
|
|
16
16
|
};
|
|
17
17
|
export {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@progress/kendo-vue-dateinputs",
|
|
3
|
-
"version": "6.4.0-develop.
|
|
3
|
+
"version": "6.4.0-develop.4",
|
|
4
4
|
"description": "TODO",
|
|
5
5
|
"author": "Progress",
|
|
6
6
|
"license": "SEE LICENSE IN LICENSE.md",
|
|
@@ -20,12 +20,12 @@
|
|
|
20
20
|
"peerDependencies": {
|
|
21
21
|
"@progress/kendo-date-math": "^1.4.0",
|
|
22
22
|
"@progress/kendo-licensing": "^1.4.0",
|
|
23
|
-
"@progress/kendo-vue-buttons": "6.4.0-develop.
|
|
24
|
-
"@progress/kendo-vue-common": "6.4.0-develop.
|
|
25
|
-
"@progress/kendo-vue-intl": "6.4.0-develop.
|
|
26
|
-
"@progress/kendo-vue-labels": "6.4.0-develop.
|
|
27
|
-
"@progress/kendo-vue-layout": "6.4.0-develop.
|
|
28
|
-
"@progress/kendo-vue-popup": "6.4.0-develop.
|
|
23
|
+
"@progress/kendo-vue-buttons": "6.4.0-develop.4",
|
|
24
|
+
"@progress/kendo-vue-common": "6.4.0-develop.4",
|
|
25
|
+
"@progress/kendo-vue-intl": "6.4.0-develop.4",
|
|
26
|
+
"@progress/kendo-vue-labels": "6.4.0-develop.4",
|
|
27
|
+
"@progress/kendo-vue-layout": "6.4.0-develop.4",
|
|
28
|
+
"@progress/kendo-vue-popup": "6.4.0-develop.4",
|
|
29
29
|
"@progress/kendo-svg-icons": "^4.0.0",
|
|
30
30
|
"vue": "^3.0.2"
|
|
31
31
|
},
|
|
@@ -46,7 +46,7 @@
|
|
|
46
46
|
"package": {
|
|
47
47
|
"productName": "Kendo UI for Vue",
|
|
48
48
|
"productCode": "KENDOUIVUE",
|
|
49
|
-
"publishDate":
|
|
49
|
+
"publishDate": 1745846444,
|
|
50
50
|
"licensingDocsUrl": "https://www.telerik.com/kendo-vue-ui/my-license/?utm_medium=product&utm_source=kendovue&utm_campaign=kendo-ui-vue-purchase-license-keys-warning"
|
|
51
51
|
}
|
|
52
52
|
},
|
package/timepicker/TimePart.js
CHANGED
|
@@ -5,4 +5,4 @@
|
|
|
5
5
|
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("vue"),k=require("@progress/kendo-vue-buttons"),L=require("@progress/kendo-date-math"),l=require("@progress/kendo-vue-common"),v=require("@progress/kendo-vue-intl"),u=require("../messages/main.js"),$=require("./TimeList.js"),p=require("../utils.js"),c=require("./models/TimePart.js"),o=require("./utils.js");function w(t){return typeof t=="function"||Object.prototype.toString.call(t)==="[object Object]"&&!s.isVNode(t)}const m=new RegExp(`${c.TIME_PART.hour}|${c.TIME_PART.minute}|${c.TIME_PART.second}|${c.TIME_PART.dayperiod}|literal`);let h=function(t){return t[t.Left=0]="Left",t[t.Right=1]="Right",t}({});const T=s.defineComponent({name:"KendoTimePart",props:{cancelButton:{type:Boolean,default:!0},disabled:{type:Boolean,default:!1},format:{type:String,default:function(){return"hh:mm a"}},max:{type:Date,default:function(){return p.MAX_TIME}},min:{type:Date,default:function(){return p.MIN_TIME}},nowButton:{type:Boolean,default:!0},steps:{type:Object,default:function(){return{}}},smoothScroll:{type:Boolean,default:!0},tabIndex:Number,value:{type:Date,default:function(){return null}},boundRange:{type:Boolean,default:!1}},emits:{change:null,focus:null,blur:null,nowclick:null},created(){this.timeLists=[],this.snapTime=o.snapTime(o.generateSnappers(this.$props.steps,this.$props.min)),this.activeListIndex=-1,this.hasActiveButton=this.hasActiveButton.bind(this)},inject:{kendoIntlService:{default:null},kendoLocalizationService:{default:null}},data(){return{activeListIndex:null}},computed:{element(){return this._element},computedValue(){return o.timeInRange(this.snapTime(L.cloneDate(this.$props.value||p.MIDNIGHT_DATE)),this.computedMin,this.computedMax)},intl(){return v.provideIntlService(this)},computedMin(){return this.snapTime(this.$props.min)},computedMax(){return this.snapTime(this.$props.max)}},mounted(){this._nowButton=this.$refs.nowButton,this.dateFormatParts.forEach((t,e)=>{t.type!=="literal"&&this.timeLists.push(this.$refs["timeList"+e])})},setup(){const t=s.inject("kendoIntlService",{}),e=s.inject("kendoLocalizationService",{});return{kendoIntlService:t,kendoLocalizationService:e}},render(){let t;const{format:e,smoothScroll:n,disabled:i}=this.$props;this.snapTime=o.snapTime(o.generateSnappers(this.$props.steps,this.computedMin)),this.dateFormatParts=this.intl.splitDateFormat(e).filter(this.timeFormatFilter);const y=l.classNames({"k-disabled":i},"k-time-part"),f=v.provideLocalizationService(this),g=f.toLanguageString(u.selectNow,u.messages[u.selectNow]);return s.createVNode("div",{class:y},[s.createVNode("div",{class:"k-time-header"},[s.createVNode("span",{class:"k-title"},[this.intl.formatDate(this.computedValue,this.dateFormatParts.reduce(this.timeFormatReducer,""))]),this.showNowButton()&&s.createVNode(k.Button,{type:"button",ref:"nowButton",fillMode:"flat",class:"k-time-now",title:g,"aria-label":g,onClick:this.onNowClick,tabIndex:i?-1:0},w(t=f.toLanguageString(u.now,u.messages[u.now]))?t:{default:()=>[t]})]),s.createVNode("div",{class:"k-time-list-container",onKeydown:this.handleKeyDown},[s.createVNode("span",{class:"k-time-highlight"},null),this.dateFormatParts.map(function(r,a){return r.type!=="literal"?s.createVNode("div",{key:a,class:l.classNames("k-time-list-wrapper",{"k-focus":a===this.activeListIndex}),role:"presentation",tabindex:-1},[s.createVNode("span",{class:"k-title",onMousedown:d=>{d.preventDefault()}},[this.intl.dateFieldName(r)]),s.createVNode($.TimeList,{min:this.computedMin,max:this.computedMax,boundRange:this.$props.boundRange,part:r,step:r.type?this.$props.steps[r.type]:1,smoothScroll:n,ref:"timeList"+a,id:a,onFocus:d=>{this.handleListFocus(d,a)},onBlur:this.handleListBlur,onChange:this.handleChange,value:this.computedValue,disabled:i},null)]):s.createVNode("div",{key:a,class:"k-time-separator"},[r.pattern])},this)])])},methods:{onNowClick(t){this.$emit("nowclick",t)},focus(t){this.$nextTick(()=>{const e=this.timeLists[0];!this.hasActiveButton()&&e&&e.$el&&e.focus(t)})},timeFormatReducer(t,e){return t+e.pattern},timeFormatFilter(t,e,n){const i=e>=1&&n[e-1];return i&&i&&t.type==="literal"?m.test(i.type||""):m.test(t.type||"")},hasActiveButton(){return l.canUseDOM&&this._nowButton&&document.activeElement===this._nowButton.$el},focusList(t){this.timeLists.length&&this.timeLists.reduce(this.listReducer,[]).map(e=>t===h.Right?e.next:e.prev).map(e=>e&&e.$el&&e.$el.focus({preventScroll:!0}))},listReducer(t,e,n,i){return t.length||e.$props.id!==this.activeListIndex?t:[{next:i[n+1]||e,prev:i[n-1]||e}]},showNowButton(){return!this.hasSteps()&&this.$props.nowButton&&o.isInTimeRange(o.getNow(),this.computedMin,this.computedMax)},hasSteps(){const t=Object.keys(this.$props.steps);return t.length!==t.reduce((e,n)=>e+this.$props.steps[n],0)},handleKeyDown(t){const{keyCode:e}=t;switch(e){case l.Keys.left:t.preventDefault(),this.focusList(h.Left);return;case l.Keys.right:t.preventDefault(),this.focusList(h.Right);return;default:return}},handleListBlur(t){this.$emit("blur",t)},handleListFocus(t,e){this.$emit("focus",t),this.activeListIndex=e},handleChange(t){this.$emit("change",t)}}});exports.Direction=h;exports.TimePart=T;
|
|
8
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("vue"),k=require("@progress/kendo-vue-buttons"),L=require("@progress/kendo-date-math"),l=require("@progress/kendo-vue-common"),v=require("@progress/kendo-vue-intl"),u=require("../messages/main.js"),$=require("./TimeList.js"),p=require("../utils.js"),c=require("./models/TimePart.js"),o=require("./utils.js");function w(t){return typeof t=="function"||Object.prototype.toString.call(t)==="[object Object]"&&!s.isVNode(t)}const m=new RegExp(`${c.TIME_PART.hour}|${c.TIME_PART.minute}|${c.TIME_PART.second}|${c.TIME_PART.dayperiod}|literal`);let h=function(t){return t[t.Left=0]="Left",t[t.Right=1]="Right",t}({});const T=s.defineComponent({name:"KendoTimePart",props:{cancelButton:{type:Boolean,default:!0},disabled:{type:Boolean,default:!1},format:{type:[String,Object],default:function(){return"hh:mm a"}},max:{type:Date,default:function(){return p.MAX_TIME}},min:{type:Date,default:function(){return p.MIN_TIME}},nowButton:{type:Boolean,default:!0},steps:{type:Object,default:function(){return{}}},smoothScroll:{type:Boolean,default:!0},tabIndex:Number,value:{type:Date,default:function(){return null}},boundRange:{type:Boolean,default:!1}},emits:{change:null,focus:null,blur:null,nowclick:null},created(){this.timeLists=[],this.snapTime=o.snapTime(o.generateSnappers(this.$props.steps,this.$props.min)),this.activeListIndex=-1,this.hasActiveButton=this.hasActiveButton.bind(this)},inject:{kendoIntlService:{default:null},kendoLocalizationService:{default:null}},data(){return{activeListIndex:null}},computed:{element(){return this._element},computedValue(){return o.timeInRange(this.snapTime(L.cloneDate(this.$props.value||p.MIDNIGHT_DATE)),this.computedMin,this.computedMax)},intl(){return v.provideIntlService(this)},computedMin(){return this.snapTime(this.$props.min)},computedMax(){return this.snapTime(this.$props.max)}},mounted(){this._nowButton=this.$refs.nowButton,this.dateFormatParts.forEach((t,e)=>{t.type!=="literal"&&this.timeLists.push(this.$refs["timeList"+e])})},setup(){const t=s.inject("kendoIntlService",{}),e=s.inject("kendoLocalizationService",{});return{kendoIntlService:t,kendoLocalizationService:e}},render(){let t;const{format:e,smoothScroll:n,disabled:i}=this.$props;this.snapTime=o.snapTime(o.generateSnappers(this.$props.steps,this.computedMin)),this.dateFormatParts=this.intl.splitDateFormat(e).filter(this.timeFormatFilter);const y=l.classNames({"k-disabled":i},"k-time-part"),f=v.provideLocalizationService(this),g=f.toLanguageString(u.selectNow,u.messages[u.selectNow]);return s.createVNode("div",{class:y},[s.createVNode("div",{class:"k-time-header"},[s.createVNode("span",{class:"k-title"},[this.intl.formatDate(this.computedValue,this.dateFormatParts.reduce(this.timeFormatReducer,""))]),this.showNowButton()&&s.createVNode(k.Button,{type:"button",ref:"nowButton",fillMode:"flat",class:"k-time-now",title:g,"aria-label":g,onClick:this.onNowClick,tabIndex:i?-1:0},w(t=f.toLanguageString(u.now,u.messages[u.now]))?t:{default:()=>[t]})]),s.createVNode("div",{class:"k-time-list-container",onKeydown:this.handleKeyDown},[s.createVNode("span",{class:"k-time-highlight"},null),this.dateFormatParts.map(function(r,a){return r.type!=="literal"?s.createVNode("div",{key:a,class:l.classNames("k-time-list-wrapper",{"k-focus":a===this.activeListIndex}),role:"presentation",tabindex:-1},[s.createVNode("span",{class:"k-title",onMousedown:d=>{d.preventDefault()}},[this.intl.dateFieldName(r)]),s.createVNode($.TimeList,{min:this.computedMin,max:this.computedMax,boundRange:this.$props.boundRange,part:r,step:r.type?this.$props.steps[r.type]:1,smoothScroll:n,ref:"timeList"+a,id:a,onFocus:d=>{this.handleListFocus(d,a)},onBlur:this.handleListBlur,onChange:this.handleChange,value:this.computedValue,disabled:i},null)]):s.createVNode("div",{key:a,class:"k-time-separator"},[r.pattern])},this)])])},methods:{onNowClick(t){this.$emit("nowclick",t)},focus(t){this.$nextTick(()=>{const e=this.timeLists[0];!this.hasActiveButton()&&e&&e.$el&&e.focus(t)})},timeFormatReducer(t,e){return t+e.pattern},timeFormatFilter(t,e,n){const i=e>=1&&n[e-1];return i&&i&&t.type==="literal"?m.test(i.type||""):m.test(t.type||"")},hasActiveButton(){return l.canUseDOM&&this._nowButton&&document.activeElement===this._nowButton.$el},focusList(t){this.timeLists.length&&this.timeLists.reduce(this.listReducer,[]).map(e=>t===h.Right?e.next:e.prev).map(e=>e&&e.$el&&e.$el.focus({preventScroll:!0}))},listReducer(t,e,n,i){return t.length||e.$props.id!==this.activeListIndex?t:[{next:i[n+1]||e,prev:i[n-1]||e}]},showNowButton(){return!this.hasSteps()&&this.$props.nowButton&&o.isInTimeRange(o.getNow(),this.computedMin,this.computedMax)},hasSteps(){const t=Object.keys(this.$props.steps);return t.length!==t.reduce((e,n)=>e+this.$props.steps[n],0)},handleKeyDown(t){const{keyCode:e}=t;switch(e){case l.Keys.left:t.preventDefault(),this.focusList(h.Left);return;case l.Keys.right:t.preventDefault(),this.focusList(h.Right);return;default:return}},handleListBlur(t){this.$emit("blur",t)},handleListFocus(t,e){this.$emit("focus",t),this.activeListIndex=e},handleChange(t){this.$emit("change",t)}}});exports.Direction=h;exports.TimePart=T;
|
package/timepicker/TimePart.mjs
CHANGED
|
@@ -15,7 +15,7 @@ import { TimeList as R } from "./TimeList.mjs";
|
|
|
15
15
|
import { MAX_TIME as F, MIN_TIME as N, MIDNIGHT_DATE as x } from "../utils.mjs";
|
|
16
16
|
import { TIME_PART as a } from "./models/TimePart.mjs";
|
|
17
17
|
import { snapTime as L, generateSnappers as k, timeInRange as D, isInTimeRange as _, getNow as C } from "./utils.mjs";
|
|
18
|
-
function
|
|
18
|
+
function j(t) {
|
|
19
19
|
return typeof t == "function" || Object.prototype.toString.call(t) === "[object Object]" && !B(t);
|
|
20
20
|
}
|
|
21
21
|
const u = new RegExp(`${a.hour}|${a.minute}|${a.second}|${a.dayperiod}|literal`);
|
|
@@ -34,7 +34,7 @@ const X = /* @__PURE__ */ w({
|
|
|
34
34
|
default: !1
|
|
35
35
|
},
|
|
36
36
|
format: {
|
|
37
|
-
type: String,
|
|
37
|
+
type: [String, Object],
|
|
38
38
|
default: function() {
|
|
39
39
|
return "hh:mm a";
|
|
40
40
|
}
|
|
@@ -154,7 +154,7 @@ const X = /* @__PURE__ */ w({
|
|
|
154
154
|
"aria-label": p,
|
|
155
155
|
onClick: this.onNowClick,
|
|
156
156
|
tabIndex: i ? -1 : 0
|
|
157
|
-
},
|
|
157
|
+
}, j(t = h.toLanguageString(y, v[y])) ? t : {
|
|
158
158
|
default: () => [t]
|
|
159
159
|
})]), s("div", {
|
|
160
160
|
class: "k-time-list-container",
|
|
@@ -5,4 +5,4 @@
|
|
|
5
5
|
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("vue"),d=require("@progress/kendo-vue-buttons"),r=require("@progress/kendo-date-math"),
|
|
8
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("vue"),d=require("@progress/kendo-vue-buttons"),r=require("@progress/kendo-date-math"),l=require("@progress/kendo-vue-common"),m=require("@progress/kendo-vue-intl"),a=require("../messages/main.js"),s=require("../utils.js"),u=require("./utils.js"),V=require("./TimePart.js");function p(e){return typeof e=="function"||Object.prototype.toString.call(e)==="[object Object]"&&!n.isVNode(e)}const y=n.defineComponent({name:"KendoTimeSelector",emits:{change:null,focus:null,blur:null},props:{cancelButton:{type:Boolean,default:!0},boundRange:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},format:{type:[String,Object],default:function(){return"t"}},max:{type:Date,default:function(){return s.MAX_TIME}},min:{type:Date,default:function(){return s.MIN_TIME}},nowButton:Boolean,steps:{type:Object,default:function(){return{}}},smoothScroll:{type:Boolean,default:!0},tabIndex:Number,value:{type:Date,default:function(){return null}},onChange:Function,onReject:Function,onKeydown:Function},created(){this.dateFormatParts=this.intl.splitDateFormat(this.$props.format),this.mergeValue=u.valueMerger(u.generateGetters(this.dateFormatParts)),this.hasActiveButton=this.hasActiveButton.bind(this),this.currentState=this.$props.value||s.MIDNIGHT_DATE,this.currentValue=this.$props.value},inject:{kendoIntlService:{default:null},kendoLocalizationService:{default:null}},data(){return{currentState:null,currentValue:null,valueDuringOnChange:void 0}},computed:{computedValue(){const e=this.valueDuringOnChange!==void 0?this.valueDuringOnChange:this.$props.value!==null?this.$props.value:this.currentValue;return e!==null?r.cloneDate(e):null},intl(){return m.provideIntlService(this)},current(){return this.currentState!==null?r.cloneDate(this.currentState):null}},mounted(){this.timePart=this.$refs.timePart,this._acceptButton=this.$refs.acceptButton,this._cancelButton=this.$refs.cancelButton},setup(){const e=n.inject("kendoIntlService",{}),t=n.inject("kendoLocalizationService",{});return{kendoIntlService:e,kendoLocalizationService:t}},render(){const{format:e,cancelButton:t,disabled:c,tabIndex:f,smoothScroll:g,min:v,max:S,boundRange:B,nowButton:k,steps:b}=this.$props,h=m.provideLocalizationService(this),i=h.toLanguageString(a.timePickerCancel,a.messages[a.timePickerCancel]),o=h.toLanguageString(a.timePickerSet,a.messages[a.timePickerSet]);return n.createVNode("div",{tabindex:c?void 0:f||0,class:l.classNames("k-timeselector",{"k-disabled":c}),onKeydown:this.handleKeyDown},[n.createVNode(V.TimePart,{ref:"timePart",value:this.current,onChange:this.handleChange,onNowclick:this.handleNowClick,format:e,smoothScroll:g,min:v,max:S,onFocus:this.handleFocus,onBlur:this.handleBlur,boundRange:B,disabled:c,nowButton:k,steps:b},null),n.createVNode("div",{class:"k-time-footer k-actions k-actions-stretched"},[t&&n.createVNode(d.Button,{type:"button",ref:"cancelButton",class:"k-time-cancel",onClick:this.handleReject,title:i,"aria-label":i},p(i)?i:{default:()=>[i]}),n.createVNode(d.Button,{type:"button",ref:"acceptButton",themeColor:"primary",class:"k-time-accept",onClick:this.handleAccept,title:o,"aria-label":o},p(o)?o:{default:()=>[o]})])])},methods:{handleBlur(e){this.$emit("blur",e)},handleFocus(e){this.$emit("focus",e)},focusActiveList(){this.timePart&&this.timePart.focus({preventScroll:!0})},hasActiveButton(){return this._acceptButton?l.canUseDOM&&(document.activeElement===this._acceptButton.$el||document.activeElement===this._cancelButton.$el):!1},handleKeyDown(e){const{keyCode:t}=e;switch(this.$emit("keydown",e),t){case l.Keys.enter:this.hasActiveButton()||this.handleAccept(e);return;default:return}},handleAccept(e){const t=this.mergeValue(r.cloneDate(this.computedValue||u.getNow()),this.timePart?this.timePart.computedValue:this.current);this.currentValue=t,this.valueDuringOnChange=t,this.$emit("change",{event:e,value:this.computedValue,target:this}),this.valueDuringOnChange=void 0},handleReject(e){this.currentState=this.computedValue,this.$emit("reject",e)},handleNowClick(e){const t=this.mergeValue(r.cloneDate(this.computedValue||u.getNow()),u.getNow());this.currentState=t,this.currentValue=t,this.valueDuringOnChange=t,this.$emit("change",{event:e,value:this.computedValue,target:this}),this.valueDuringOnChange=void 0},handleChange(e){this.currentState=e}}});exports.TimeSelector=y;
|
|
@@ -5,13 +5,13 @@
|
|
|
5
5
|
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
|
-
import { defineComponent as y, inject as
|
|
9
|
-
import { Button as
|
|
8
|
+
import { defineComponent as y, inject as c, createVNode as a, isVNode as C } from "vue";
|
|
9
|
+
import { Button as s } from "@progress/kendo-vue-buttons";
|
|
10
10
|
import { cloneDate as o } from "@progress/kendo-date-math";
|
|
11
11
|
import { classNames as D, canUseDOM as V, Keys as $ } from "@progress/kendo-vue-common";
|
|
12
|
-
import { provideIntlService as w, provideLocalizationService as
|
|
12
|
+
import { provideIntlService as w, provideLocalizationService as O } from "@progress/kendo-vue-intl";
|
|
13
13
|
import { timePickerCancel as h, messages as d, timePickerSet as m } from "../messages/main.mjs";
|
|
14
|
-
import { MAX_TIME as
|
|
14
|
+
import { MAX_TIME as P, MIN_TIME as j, MIDNIGHT_DATE as I } from "../utils.mjs";
|
|
15
15
|
import { valueMerger as A, generateGetters as N, getNow as u } from "./utils.mjs";
|
|
16
16
|
import { TimePart as F } from "./TimePart.mjs";
|
|
17
17
|
function p(t) {
|
|
@@ -38,7 +38,7 @@ const G = /* @__PURE__ */ y({
|
|
|
38
38
|
default: !1
|
|
39
39
|
},
|
|
40
40
|
format: {
|
|
41
|
-
type: String,
|
|
41
|
+
type: [String, Object],
|
|
42
42
|
default: function() {
|
|
43
43
|
return "t";
|
|
44
44
|
}
|
|
@@ -46,13 +46,13 @@ const G = /* @__PURE__ */ y({
|
|
|
46
46
|
max: {
|
|
47
47
|
type: Date,
|
|
48
48
|
default: function() {
|
|
49
|
-
return
|
|
49
|
+
return P;
|
|
50
50
|
}
|
|
51
51
|
},
|
|
52
52
|
min: {
|
|
53
53
|
type: Date,
|
|
54
54
|
default: function() {
|
|
55
|
-
return
|
|
55
|
+
return j;
|
|
56
56
|
}
|
|
57
57
|
},
|
|
58
58
|
nowButton: Boolean,
|
|
@@ -78,7 +78,7 @@ const G = /* @__PURE__ */ y({
|
|
|
78
78
|
onKeydown: Function
|
|
79
79
|
},
|
|
80
80
|
created() {
|
|
81
|
-
this.dateFormatParts = this.intl.splitDateFormat(this.$props.format), this.mergeValue = A(N(this.dateFormatParts)), this.hasActiveButton = this.hasActiveButton.bind(this), this.currentState = this.$props.value ||
|
|
81
|
+
this.dateFormatParts = this.intl.splitDateFormat(this.$props.format), this.mergeValue = A(N(this.dateFormatParts)), this.hasActiveButton = this.hasActiveButton.bind(this), this.currentState = this.$props.value || I, this.currentValue = this.$props.value;
|
|
82
82
|
},
|
|
83
83
|
inject: {
|
|
84
84
|
kendoIntlService: {
|
|
@@ -111,7 +111,7 @@ const G = /* @__PURE__ */ y({
|
|
|
111
111
|
this.timePart = this.$refs.timePart, this._acceptButton = this.$refs.acceptButton, this._cancelButton = this.$refs.cancelButton;
|
|
112
112
|
},
|
|
113
113
|
setup() {
|
|
114
|
-
const t =
|
|
114
|
+
const t = c("kendoIntlService", {}), e = c("kendoLocalizationService", {});
|
|
115
115
|
return {
|
|
116
116
|
kendoIntlService: t,
|
|
117
117
|
kendoLocalizationService: e
|
|
@@ -129,7 +129,7 @@ const G = /* @__PURE__ */ y({
|
|
|
129
129
|
boundRange: B,
|
|
130
130
|
nowButton: b,
|
|
131
131
|
steps: k
|
|
132
|
-
} = this.$props, l =
|
|
132
|
+
} = this.$props, l = O(this), n = l.toLanguageString(h, d[h]), i = l.toLanguageString(m, d[m]);
|
|
133
133
|
return a("div", {
|
|
134
134
|
tabindex: r ? void 0 : f || 0,
|
|
135
135
|
class: D("k-timeselector", {
|
|
@@ -153,7 +153,7 @@ const G = /* @__PURE__ */ y({
|
|
|
153
153
|
steps: k
|
|
154
154
|
}, null), a("div", {
|
|
155
155
|
class: "k-time-footer k-actions k-actions-stretched"
|
|
156
|
-
}, [e && a(
|
|
156
|
+
}, [e && a(s, {
|
|
157
157
|
type: "button",
|
|
158
158
|
ref: "cancelButton",
|
|
159
159
|
class: "k-time-cancel",
|
|
@@ -162,7 +162,7 @@ const G = /* @__PURE__ */ y({
|
|
|
162
162
|
"aria-label": n
|
|
163
163
|
}, p(n) ? n : {
|
|
164
164
|
default: () => [n]
|
|
165
|
-
}), a(
|
|
165
|
+
}), a(s, {
|
|
166
166
|
type: "button",
|
|
167
167
|
ref: "acceptButton",
|
|
168
168
|
themeColor: "primary",
|