cnhis-design-vue 3.1.52-release.1 → 3.1.52-release.2
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/es/components/body-select/index.d.ts +47 -0
- package/es/components/body-select/index.js +1 -0
- package/es/components/body-select/src/config/index.d.ts +101 -0
- package/es/components/body-select/src/config/index.js +1 -0
- package/es/components/body-select/src/hooks/renderCanvas.d.ts +6 -0
- package/es/components/body-select/src/hooks/renderCanvas.js +1 -0
- package/es/components/body-select/src/index.vue.d.ts +48 -0
- package/es/components/body-select/src/index.vue.js +1 -0
- package/es/components/body-select/src/index.vue2.js +1 -0
- package/es/components/body-select/style/index.css +1 -0
- package/es/components/callback/src/components/render/popupMaps.d.ts +1 -1
- package/es/components/classification/index.d.ts +76 -6
- package/es/components/classification/src/components/search-filter/index.vue.d.ts +76 -6
- package/es/components/classification/src/components/set-classification/index.vue.d.ts +76 -6
- package/es/components/classification/src/index.vue.d.ts +76 -6
- package/es/components/date-picker/index.d.ts +38 -3
- package/es/components/date-picker/src/DatePicker.vue.d.ts +38 -3
- package/es/components/date-picker/src/DatePicker.vue2.js +1 -1
- package/es/components/form-config/index.d.ts +2 -2
- package/es/components/form-config/src/FormConfig.vue.d.ts +2 -2
- package/es/components/form-config/src/components/FormConfigCreator.vue.d.ts +1 -1
- package/es/components/form-config/src/components/FormConfigEdit.vue.d.ts +1 -1
- package/es/components/form-config/src/hooks/useConfigurationField.js +1 -1
- package/es/components/form-render/index.d.ts +1 -1
- package/es/components/form-render/src/FormRender.vue.d.ts +1 -1
- package/es/components/form-render/src/FormRenderWrapper.vue.d.ts +1 -1
- package/es/components/form-render/src/components/renderer/date.d.ts +9 -0
- package/es/components/form-render/src/components/renderer/date.js +1 -1
- package/es/components/form-render/src/components/renderer/levelSearchCascader.js +1 -1
- package/es/components/form-render/src/hooks/useFormEvent.d.ts +2 -2
- package/es/components/form-render/src/hooks/useFormEvent.js +1 -1
- package/es/components/form-render/src/types/index.d.ts +2 -2
- package/es/components/iho-table/src/plugins/filterDaterangeRenderPlugin/filter.vue.d.ts +38 -3
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/dateRendererPlugin/editDate.vue.d.ts +38 -3
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/dateRendererPlugin/editDate.vue2.js +1 -1
- package/es/components/index.css +1 -1
- package/es/components/index.d.ts +2 -1
- package/es/components/index.js +1 -1
- package/es/components/info-header/index.d.ts +2 -2
- package/es/components/info-header/src/InfoHeader.vue.d.ts +2 -2
- package/es/components/info-header/src/components/infoDescription/index.vue.d.ts +1 -1
- package/es/components/info-header/src/components/patientInfo/index.vue.d.ts +1 -1
- package/es/components/select-person/src/SearchOrgAndStaff.vue2.js +1 -1
- package/es/components/shortcut-setter/index.d.ts +1 -1
- package/es/components/shortcut-setter/src/ShortcutSetter.vue.d.ts +1 -1
- package/es/components/table-filter/src/components/classify-filter/ValueCfg.vue.d.ts +76 -6
- package/es/components/table-filter/src/components/classify-filter/components/Date.vue.d.ts +38 -3
- package/es/components/table-filter/src/components/classify-filter/components/DateRange.vue.d.ts +38 -3
- package/es/components/table-filter/src/components/classify-filter/components/index.d.ts +76 -6
- package/es/components/table-filter/src/components/classify-filter/index.vue.d.ts +76 -6
- package/es/components/table-filter/src/components/render-widget/components/DateInner.vue.d.ts +38 -3
- package/es/components/table-filter/src/components/render-widget/components/DateOut.vue.d.ts +38 -3
- package/es/components/table-filter/src/components/render-widget/components/DateRangeInner.vue.d.ts +38 -3
- package/es/components/table-filter/src/components/render-widget/components/DateRangeOut.vue.d.ts +38 -3
- package/es/components/table-filter/src/components/render-widget/components/index.d.ts +152 -12
- package/es/components/table-filter/src/components/render-widget/widgetCfgMaps.d.ts +152 -12
- package/es/components/time-picker/src/TimePicker.vue2.js +1 -1
- package/es/shared/components/InputNumberSlash/InputNumberSlash.d.ts +9 -0
- package/es/shared/components/InputNumberSlash/InputNumberSlash.js +1 -1
- package/es/shared/hooks/useDateTime.d.ts +8 -2
- package/es/shared/hooks/useDateTime.js +1 -1
- package/es/shared/package.json.js +1 -1
- package/package.json +2 -2
|
@@ -254,6 +254,15 @@ declare const DateInner: import("vue").DefineComponent<{
|
|
|
254
254
|
onConfirm: {
|
|
255
255
|
type: FunctionConstructor;
|
|
256
256
|
};
|
|
257
|
+
formattedValue: {
|
|
258
|
+
type: StringConstructor;
|
|
259
|
+
};
|
|
260
|
+
placeholder: {
|
|
261
|
+
type: StringConstructor;
|
|
262
|
+
};
|
|
263
|
+
allowedInvalidValue: {
|
|
264
|
+
type: StringConstructor;
|
|
265
|
+
};
|
|
257
266
|
}, {
|
|
258
267
|
attrs: {
|
|
259
268
|
[x: string]: unknown;
|
|
@@ -265,9 +274,23 @@ declare const DateInner: import("vue").DefineComponent<{
|
|
|
265
274
|
onConfirm: {
|
|
266
275
|
type: FunctionConstructor;
|
|
267
276
|
};
|
|
268
|
-
|
|
277
|
+
formattedValue: {
|
|
278
|
+
type: StringConstructor;
|
|
279
|
+
};
|
|
280
|
+
placeholder: {
|
|
281
|
+
type: StringConstructor;
|
|
282
|
+
};
|
|
283
|
+
allowedInvalidValue: {
|
|
284
|
+
type: StringConstructor;
|
|
285
|
+
};
|
|
286
|
+
}>> & {
|
|
287
|
+
"onUpdate:formatted-value"?: ((...args: any[]) => any) | undefined;
|
|
288
|
+
}>>;
|
|
289
|
+
emit: (event: "update:formatted-value", ...args: any[]) => void;
|
|
269
290
|
datePickerRef: import("vue").Ref<import("../../../../..").AnyObject | null>;
|
|
270
291
|
panelInstRef: import("vue").Ref<null>;
|
|
292
|
+
placeholderRef: import("vue").Ref<any>;
|
|
293
|
+
currentFormattedValue: import("vue").WritableComputedRef<string | null | undefined>;
|
|
271
294
|
isDateTime: import("vue").ComputedRef<boolean>;
|
|
272
295
|
formatRef: import("vue").ComputedRef<string>;
|
|
273
296
|
panelFormatRef: import("vue").ComputedRef<string | [string, string]>;
|
|
@@ -276,15 +299,27 @@ declare const DateInner: import("vue").DefineComponent<{
|
|
|
276
299
|
handleConfirm: (target: HTMLInputElement) => void;
|
|
277
300
|
onUpdateShow: (show: boolean) => void;
|
|
278
301
|
onConfirm: (...args: any[]) => Promise<void>;
|
|
302
|
+
isAllowedInvalidValue: (value?: string) => boolean | "" | undefined;
|
|
279
303
|
NDatePicker: any;
|
|
280
|
-
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin,
|
|
304
|
+
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "update:formatted-value"[], "update:formatted-value", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
281
305
|
updateUnchangedValue: {
|
|
282
306
|
type: BooleanConstructor;
|
|
283
307
|
};
|
|
284
308
|
onConfirm: {
|
|
285
309
|
type: FunctionConstructor;
|
|
286
310
|
};
|
|
287
|
-
|
|
311
|
+
formattedValue: {
|
|
312
|
+
type: StringConstructor;
|
|
313
|
+
};
|
|
314
|
+
placeholder: {
|
|
315
|
+
type: StringConstructor;
|
|
316
|
+
};
|
|
317
|
+
allowedInvalidValue: {
|
|
318
|
+
type: StringConstructor;
|
|
319
|
+
};
|
|
320
|
+
}>> & {
|
|
321
|
+
"onUpdate:formatted-value"?: ((...args: any[]) => any) | undefined;
|
|
322
|
+
}, {
|
|
288
323
|
updateUnchangedValue: boolean;
|
|
289
324
|
}>>;
|
|
290
325
|
DateQuickBtn: import("vue").DefineComponent<{
|
|
@@ -465,6 +500,15 @@ declare const DateOut: import("vue").DefineComponent<{
|
|
|
465
500
|
onConfirm: {
|
|
466
501
|
type: FunctionConstructor;
|
|
467
502
|
};
|
|
503
|
+
formattedValue: {
|
|
504
|
+
type: StringConstructor;
|
|
505
|
+
};
|
|
506
|
+
placeholder: {
|
|
507
|
+
type: StringConstructor;
|
|
508
|
+
};
|
|
509
|
+
allowedInvalidValue: {
|
|
510
|
+
type: StringConstructor;
|
|
511
|
+
};
|
|
468
512
|
}, {
|
|
469
513
|
attrs: {
|
|
470
514
|
[x: string]: unknown;
|
|
@@ -476,9 +520,23 @@ declare const DateOut: import("vue").DefineComponent<{
|
|
|
476
520
|
onConfirm: {
|
|
477
521
|
type: FunctionConstructor;
|
|
478
522
|
};
|
|
479
|
-
|
|
523
|
+
formattedValue: {
|
|
524
|
+
type: StringConstructor;
|
|
525
|
+
};
|
|
526
|
+
placeholder: {
|
|
527
|
+
type: StringConstructor;
|
|
528
|
+
};
|
|
529
|
+
allowedInvalidValue: {
|
|
530
|
+
type: StringConstructor;
|
|
531
|
+
};
|
|
532
|
+
}>> & {
|
|
533
|
+
"onUpdate:formatted-value"?: ((...args: any[]) => any) | undefined;
|
|
534
|
+
}>>;
|
|
535
|
+
emit: (event: "update:formatted-value", ...args: any[]) => void;
|
|
480
536
|
datePickerRef: import("vue").Ref<import("../../../../..").AnyObject | null>;
|
|
481
537
|
panelInstRef: import("vue").Ref<null>;
|
|
538
|
+
placeholderRef: import("vue").Ref<any>;
|
|
539
|
+
currentFormattedValue: import("vue").WritableComputedRef<string | null | undefined>;
|
|
482
540
|
isDateTime: import("vue").ComputedRef<boolean>;
|
|
483
541
|
formatRef: import("vue").ComputedRef<string>;
|
|
484
542
|
panelFormatRef: import("vue").ComputedRef<string | [string, string]>;
|
|
@@ -487,15 +545,27 @@ declare const DateOut: import("vue").DefineComponent<{
|
|
|
487
545
|
handleConfirm: (target: HTMLInputElement) => void;
|
|
488
546
|
onUpdateShow: (show: boolean) => void;
|
|
489
547
|
onConfirm: (...args: any[]) => Promise<void>;
|
|
548
|
+
isAllowedInvalidValue: (value?: string) => boolean | "" | undefined;
|
|
490
549
|
NDatePicker: any;
|
|
491
|
-
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin,
|
|
550
|
+
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "update:formatted-value"[], "update:formatted-value", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
492
551
|
updateUnchangedValue: {
|
|
493
552
|
type: BooleanConstructor;
|
|
494
553
|
};
|
|
495
554
|
onConfirm: {
|
|
496
555
|
type: FunctionConstructor;
|
|
497
556
|
};
|
|
498
|
-
|
|
557
|
+
formattedValue: {
|
|
558
|
+
type: StringConstructor;
|
|
559
|
+
};
|
|
560
|
+
placeholder: {
|
|
561
|
+
type: StringConstructor;
|
|
562
|
+
};
|
|
563
|
+
allowedInvalidValue: {
|
|
564
|
+
type: StringConstructor;
|
|
565
|
+
};
|
|
566
|
+
}>> & {
|
|
567
|
+
"onUpdate:formatted-value"?: ((...args: any[]) => any) | undefined;
|
|
568
|
+
}, {
|
|
499
569
|
updateUnchangedValue: boolean;
|
|
500
570
|
}>>;
|
|
501
571
|
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "update:value"[], "update:value", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
@@ -638,6 +708,15 @@ declare const DateRangeInner: import("vue").DefineComponent<{
|
|
|
638
708
|
onConfirm: {
|
|
639
709
|
type: FunctionConstructor;
|
|
640
710
|
};
|
|
711
|
+
formattedValue: {
|
|
712
|
+
type: StringConstructor;
|
|
713
|
+
};
|
|
714
|
+
placeholder: {
|
|
715
|
+
type: StringConstructor;
|
|
716
|
+
};
|
|
717
|
+
allowedInvalidValue: {
|
|
718
|
+
type: StringConstructor;
|
|
719
|
+
};
|
|
641
720
|
}, {
|
|
642
721
|
attrs: {
|
|
643
722
|
[x: string]: unknown;
|
|
@@ -649,9 +728,23 @@ declare const DateRangeInner: import("vue").DefineComponent<{
|
|
|
649
728
|
onConfirm: {
|
|
650
729
|
type: FunctionConstructor;
|
|
651
730
|
};
|
|
652
|
-
|
|
731
|
+
formattedValue: {
|
|
732
|
+
type: StringConstructor;
|
|
733
|
+
};
|
|
734
|
+
placeholder: {
|
|
735
|
+
type: StringConstructor;
|
|
736
|
+
};
|
|
737
|
+
allowedInvalidValue: {
|
|
738
|
+
type: StringConstructor;
|
|
739
|
+
};
|
|
740
|
+
}>> & {
|
|
741
|
+
"onUpdate:formatted-value"?: ((...args: any[]) => any) | undefined;
|
|
742
|
+
}>>;
|
|
743
|
+
emit: (event: "update:formatted-value", ...args: any[]) => void;
|
|
653
744
|
datePickerRef: import("vue").Ref<import("../../../../..").AnyObject | null>;
|
|
654
745
|
panelInstRef: import("vue").Ref<null>;
|
|
746
|
+
placeholderRef: import("vue").Ref<any>;
|
|
747
|
+
currentFormattedValue: import("vue").WritableComputedRef<string | null | undefined>;
|
|
655
748
|
isDateTime: import("vue").ComputedRef<boolean>;
|
|
656
749
|
formatRef: import("vue").ComputedRef<string>;
|
|
657
750
|
panelFormatRef: import("vue").ComputedRef<string | [string, string]>;
|
|
@@ -660,15 +753,27 @@ declare const DateRangeInner: import("vue").DefineComponent<{
|
|
|
660
753
|
handleConfirm: (target: HTMLInputElement) => void;
|
|
661
754
|
onUpdateShow: (show: boolean) => void;
|
|
662
755
|
onConfirm: (...args: any[]) => Promise<void>;
|
|
756
|
+
isAllowedInvalidValue: (value?: string) => boolean | "" | undefined;
|
|
663
757
|
NDatePicker: any;
|
|
664
|
-
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin,
|
|
758
|
+
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "update:formatted-value"[], "update:formatted-value", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
665
759
|
updateUnchangedValue: {
|
|
666
760
|
type: BooleanConstructor;
|
|
667
761
|
};
|
|
668
762
|
onConfirm: {
|
|
669
763
|
type: FunctionConstructor;
|
|
670
764
|
};
|
|
671
|
-
|
|
765
|
+
formattedValue: {
|
|
766
|
+
type: StringConstructor;
|
|
767
|
+
};
|
|
768
|
+
placeholder: {
|
|
769
|
+
type: StringConstructor;
|
|
770
|
+
};
|
|
771
|
+
allowedInvalidValue: {
|
|
772
|
+
type: StringConstructor;
|
|
773
|
+
};
|
|
774
|
+
}>> & {
|
|
775
|
+
"onUpdate:formatted-value"?: ((...args: any[]) => any) | undefined;
|
|
776
|
+
}, {
|
|
672
777
|
updateUnchangedValue: boolean;
|
|
673
778
|
}>>;
|
|
674
779
|
DateQuickBtn: import("vue").DefineComponent<{
|
|
@@ -856,6 +961,15 @@ declare const DateRangeOut: import("vue").DefineComponent<{
|
|
|
856
961
|
onConfirm: {
|
|
857
962
|
type: FunctionConstructor;
|
|
858
963
|
};
|
|
964
|
+
formattedValue: {
|
|
965
|
+
type: StringConstructor;
|
|
966
|
+
};
|
|
967
|
+
placeholder: {
|
|
968
|
+
type: StringConstructor;
|
|
969
|
+
};
|
|
970
|
+
allowedInvalidValue: {
|
|
971
|
+
type: StringConstructor;
|
|
972
|
+
};
|
|
859
973
|
}, {
|
|
860
974
|
attrs: {
|
|
861
975
|
[x: string]: unknown;
|
|
@@ -867,9 +981,23 @@ declare const DateRangeOut: import("vue").DefineComponent<{
|
|
|
867
981
|
onConfirm: {
|
|
868
982
|
type: FunctionConstructor;
|
|
869
983
|
};
|
|
870
|
-
|
|
984
|
+
formattedValue: {
|
|
985
|
+
type: StringConstructor;
|
|
986
|
+
};
|
|
987
|
+
placeholder: {
|
|
988
|
+
type: StringConstructor;
|
|
989
|
+
};
|
|
990
|
+
allowedInvalidValue: {
|
|
991
|
+
type: StringConstructor;
|
|
992
|
+
};
|
|
993
|
+
}>> & {
|
|
994
|
+
"onUpdate:formatted-value"?: ((...args: any[]) => any) | undefined;
|
|
995
|
+
}>>;
|
|
996
|
+
emit: (event: "update:formatted-value", ...args: any[]) => void;
|
|
871
997
|
datePickerRef: import("vue").Ref<import("../../../../..").AnyObject | null>;
|
|
872
998
|
panelInstRef: import("vue").Ref<null>;
|
|
999
|
+
placeholderRef: import("vue").Ref<any>;
|
|
1000
|
+
currentFormattedValue: import("vue").WritableComputedRef<string | null | undefined>;
|
|
873
1001
|
isDateTime: import("vue").ComputedRef<boolean>;
|
|
874
1002
|
formatRef: import("vue").ComputedRef<string>;
|
|
875
1003
|
panelFormatRef: import("vue").ComputedRef<string | [string, string]>;
|
|
@@ -878,15 +1006,27 @@ declare const DateRangeOut: import("vue").DefineComponent<{
|
|
|
878
1006
|
handleConfirm: (target: HTMLInputElement) => void;
|
|
879
1007
|
onUpdateShow: (show: boolean) => void;
|
|
880
1008
|
onConfirm: (...args: any[]) => Promise<void>;
|
|
1009
|
+
isAllowedInvalidValue: (value?: string) => boolean | "" | undefined;
|
|
881
1010
|
NDatePicker: any;
|
|
882
|
-
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin,
|
|
1011
|
+
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "update:formatted-value"[], "update:formatted-value", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
883
1012
|
updateUnchangedValue: {
|
|
884
1013
|
type: BooleanConstructor;
|
|
885
1014
|
};
|
|
886
1015
|
onConfirm: {
|
|
887
1016
|
type: FunctionConstructor;
|
|
888
1017
|
};
|
|
889
|
-
|
|
1018
|
+
formattedValue: {
|
|
1019
|
+
type: StringConstructor;
|
|
1020
|
+
};
|
|
1021
|
+
placeholder: {
|
|
1022
|
+
type: StringConstructor;
|
|
1023
|
+
};
|
|
1024
|
+
allowedInvalidValue: {
|
|
1025
|
+
type: StringConstructor;
|
|
1026
|
+
};
|
|
1027
|
+
}>> & {
|
|
1028
|
+
"onUpdate:formatted-value"?: ((...args: any[]) => any) | undefined;
|
|
1029
|
+
}, {
|
|
890
1030
|
updateUnchangedValue: boolean;
|
|
891
1031
|
}>>;
|
|
892
1032
|
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "update:value"[], "update:value", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
@@ -476,6 +476,15 @@ export declare const WidgetCfgMaps: Map<string, {
|
|
|
476
476
|
onConfirm: {
|
|
477
477
|
type: FunctionConstructor;
|
|
478
478
|
};
|
|
479
|
+
formattedValue: {
|
|
480
|
+
type: StringConstructor;
|
|
481
|
+
};
|
|
482
|
+
placeholder: {
|
|
483
|
+
type: StringConstructor;
|
|
484
|
+
};
|
|
485
|
+
allowedInvalidValue: {
|
|
486
|
+
type: StringConstructor;
|
|
487
|
+
};
|
|
479
488
|
}, {
|
|
480
489
|
attrs: {
|
|
481
490
|
[x: string]: unknown;
|
|
@@ -487,9 +496,23 @@ export declare const WidgetCfgMaps: Map<string, {
|
|
|
487
496
|
onConfirm: {
|
|
488
497
|
type: FunctionConstructor;
|
|
489
498
|
};
|
|
490
|
-
|
|
499
|
+
formattedValue: {
|
|
500
|
+
type: StringConstructor;
|
|
501
|
+
};
|
|
502
|
+
placeholder: {
|
|
503
|
+
type: StringConstructor;
|
|
504
|
+
};
|
|
505
|
+
allowedInvalidValue: {
|
|
506
|
+
type: StringConstructor;
|
|
507
|
+
};
|
|
508
|
+
}>> & {
|
|
509
|
+
"onUpdate:formatted-value"?: ((...args: any[]) => any) | undefined;
|
|
510
|
+
}>>;
|
|
511
|
+
emit: (event: "update:formatted-value", ...args: any[]) => void;
|
|
491
512
|
datePickerRef: import("vue").Ref<import("../../../..").AnyObject | null>;
|
|
492
513
|
panelInstRef: import("vue").Ref<null>;
|
|
514
|
+
placeholderRef: import("vue").Ref<any>;
|
|
515
|
+
currentFormattedValue: import("vue").WritableComputedRef<string | null | undefined>;
|
|
493
516
|
isDateTime: import("vue").ComputedRef<boolean>;
|
|
494
517
|
formatRef: import("vue").ComputedRef<string>;
|
|
495
518
|
panelFormatRef: import("vue").ComputedRef<string | [string, string]>;
|
|
@@ -498,15 +521,27 @@ export declare const WidgetCfgMaps: Map<string, {
|
|
|
498
521
|
handleConfirm: (target: HTMLInputElement) => void;
|
|
499
522
|
onUpdateShow: (show: boolean) => void;
|
|
500
523
|
onConfirm: (...args: any[]) => Promise<void>;
|
|
524
|
+
isAllowedInvalidValue: (value?: string) => boolean | "" | undefined;
|
|
501
525
|
NDatePicker: any;
|
|
502
|
-
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin,
|
|
526
|
+
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "update:formatted-value"[], "update:formatted-value", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
503
527
|
updateUnchangedValue: {
|
|
504
528
|
type: BooleanConstructor;
|
|
505
529
|
};
|
|
506
530
|
onConfirm: {
|
|
507
531
|
type: FunctionConstructor;
|
|
508
532
|
};
|
|
509
|
-
|
|
533
|
+
formattedValue: {
|
|
534
|
+
type: StringConstructor;
|
|
535
|
+
};
|
|
536
|
+
placeholder: {
|
|
537
|
+
type: StringConstructor;
|
|
538
|
+
};
|
|
539
|
+
allowedInvalidValue: {
|
|
540
|
+
type: StringConstructor;
|
|
541
|
+
};
|
|
542
|
+
}>> & {
|
|
543
|
+
"onUpdate:formatted-value"?: ((...args: any[]) => any) | undefined;
|
|
544
|
+
}, {
|
|
510
545
|
updateUnchangedValue: boolean;
|
|
511
546
|
}>>;
|
|
512
547
|
DateQuickBtn: import("vue").DefineComponent<{
|
|
@@ -701,6 +736,15 @@ export declare const WidgetCfgMaps: Map<string, {
|
|
|
701
736
|
onConfirm: {
|
|
702
737
|
type: FunctionConstructor;
|
|
703
738
|
};
|
|
739
|
+
formattedValue: {
|
|
740
|
+
type: StringConstructor;
|
|
741
|
+
};
|
|
742
|
+
placeholder: {
|
|
743
|
+
type: StringConstructor;
|
|
744
|
+
};
|
|
745
|
+
allowedInvalidValue: {
|
|
746
|
+
type: StringConstructor;
|
|
747
|
+
};
|
|
704
748
|
}, {
|
|
705
749
|
attrs: {
|
|
706
750
|
[x: string]: unknown;
|
|
@@ -712,9 +756,23 @@ export declare const WidgetCfgMaps: Map<string, {
|
|
|
712
756
|
onConfirm: {
|
|
713
757
|
type: FunctionConstructor;
|
|
714
758
|
};
|
|
715
|
-
|
|
759
|
+
formattedValue: {
|
|
760
|
+
type: StringConstructor;
|
|
761
|
+
};
|
|
762
|
+
placeholder: {
|
|
763
|
+
type: StringConstructor;
|
|
764
|
+
};
|
|
765
|
+
allowedInvalidValue: {
|
|
766
|
+
type: StringConstructor;
|
|
767
|
+
};
|
|
768
|
+
}>> & {
|
|
769
|
+
"onUpdate:formatted-value"?: ((...args: any[]) => any) | undefined;
|
|
770
|
+
}>>;
|
|
771
|
+
emit: (event: "update:formatted-value", ...args: any[]) => void;
|
|
716
772
|
datePickerRef: import("vue").Ref<import("../../../..").AnyObject | null>;
|
|
717
773
|
panelInstRef: import("vue").Ref<null>;
|
|
774
|
+
placeholderRef: import("vue").Ref<any>;
|
|
775
|
+
currentFormattedValue: import("vue").WritableComputedRef<string | null | undefined>;
|
|
718
776
|
isDateTime: import("vue").ComputedRef<boolean>;
|
|
719
777
|
formatRef: import("vue").ComputedRef<string>;
|
|
720
778
|
panelFormatRef: import("vue").ComputedRef<string | [string, string]>;
|
|
@@ -723,15 +781,27 @@ export declare const WidgetCfgMaps: Map<string, {
|
|
|
723
781
|
handleConfirm: (target: HTMLInputElement) => void;
|
|
724
782
|
onUpdateShow: (show: boolean) => void;
|
|
725
783
|
onConfirm: (...args: any[]) => Promise<void>;
|
|
784
|
+
isAllowedInvalidValue: (value?: string) => boolean | "" | undefined;
|
|
726
785
|
NDatePicker: any;
|
|
727
|
-
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin,
|
|
786
|
+
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "update:formatted-value"[], "update:formatted-value", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
728
787
|
updateUnchangedValue: {
|
|
729
788
|
type: BooleanConstructor;
|
|
730
789
|
};
|
|
731
790
|
onConfirm: {
|
|
732
791
|
type: FunctionConstructor;
|
|
733
792
|
};
|
|
734
|
-
|
|
793
|
+
formattedValue: {
|
|
794
|
+
type: StringConstructor;
|
|
795
|
+
};
|
|
796
|
+
placeholder: {
|
|
797
|
+
type: StringConstructor;
|
|
798
|
+
};
|
|
799
|
+
allowedInvalidValue: {
|
|
800
|
+
type: StringConstructor;
|
|
801
|
+
};
|
|
802
|
+
}>> & {
|
|
803
|
+
"onUpdate:formatted-value"?: ((...args: any[]) => any) | undefined;
|
|
804
|
+
}, {
|
|
735
805
|
updateUnchangedValue: boolean;
|
|
736
806
|
}>>;
|
|
737
807
|
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "update:value"[], "update:value", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
@@ -888,6 +958,15 @@ export declare const WidgetCfgMaps: Map<string, {
|
|
|
888
958
|
onConfirm: {
|
|
889
959
|
type: FunctionConstructor;
|
|
890
960
|
};
|
|
961
|
+
formattedValue: {
|
|
962
|
+
type: StringConstructor;
|
|
963
|
+
};
|
|
964
|
+
placeholder: {
|
|
965
|
+
type: StringConstructor;
|
|
966
|
+
};
|
|
967
|
+
allowedInvalidValue: {
|
|
968
|
+
type: StringConstructor;
|
|
969
|
+
};
|
|
891
970
|
}, {
|
|
892
971
|
attrs: {
|
|
893
972
|
[x: string]: unknown;
|
|
@@ -899,9 +978,23 @@ export declare const WidgetCfgMaps: Map<string, {
|
|
|
899
978
|
onConfirm: {
|
|
900
979
|
type: FunctionConstructor;
|
|
901
980
|
};
|
|
902
|
-
|
|
981
|
+
formattedValue: {
|
|
982
|
+
type: StringConstructor;
|
|
983
|
+
};
|
|
984
|
+
placeholder: {
|
|
985
|
+
type: StringConstructor;
|
|
986
|
+
};
|
|
987
|
+
allowedInvalidValue: {
|
|
988
|
+
type: StringConstructor;
|
|
989
|
+
};
|
|
990
|
+
}>> & {
|
|
991
|
+
"onUpdate:formatted-value"?: ((...args: any[]) => any) | undefined;
|
|
992
|
+
}>>;
|
|
993
|
+
emit: (event: "update:formatted-value", ...args: any[]) => void;
|
|
903
994
|
datePickerRef: import("vue").Ref<import("../../../..").AnyObject | null>;
|
|
904
995
|
panelInstRef: import("vue").Ref<null>;
|
|
996
|
+
placeholderRef: import("vue").Ref<any>;
|
|
997
|
+
currentFormattedValue: import("vue").WritableComputedRef<string | null | undefined>;
|
|
905
998
|
isDateTime: import("vue").ComputedRef<boolean>;
|
|
906
999
|
formatRef: import("vue").ComputedRef<string>;
|
|
907
1000
|
panelFormatRef: import("vue").ComputedRef<string | [string, string]>;
|
|
@@ -910,15 +1003,27 @@ export declare const WidgetCfgMaps: Map<string, {
|
|
|
910
1003
|
handleConfirm: (target: HTMLInputElement) => void;
|
|
911
1004
|
onUpdateShow: (show: boolean) => void;
|
|
912
1005
|
onConfirm: (...args: any[]) => Promise<void>;
|
|
1006
|
+
isAllowedInvalidValue: (value?: string) => boolean | "" | undefined;
|
|
913
1007
|
NDatePicker: any;
|
|
914
|
-
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin,
|
|
1008
|
+
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "update:formatted-value"[], "update:formatted-value", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
915
1009
|
updateUnchangedValue: {
|
|
916
1010
|
type: BooleanConstructor;
|
|
917
1011
|
};
|
|
918
1012
|
onConfirm: {
|
|
919
1013
|
type: FunctionConstructor;
|
|
920
1014
|
};
|
|
921
|
-
|
|
1015
|
+
formattedValue: {
|
|
1016
|
+
type: StringConstructor;
|
|
1017
|
+
};
|
|
1018
|
+
placeholder: {
|
|
1019
|
+
type: StringConstructor;
|
|
1020
|
+
};
|
|
1021
|
+
allowedInvalidValue: {
|
|
1022
|
+
type: StringConstructor;
|
|
1023
|
+
};
|
|
1024
|
+
}>> & {
|
|
1025
|
+
"onUpdate:formatted-value"?: ((...args: any[]) => any) | undefined;
|
|
1026
|
+
}, {
|
|
922
1027
|
updateUnchangedValue: boolean;
|
|
923
1028
|
}>>;
|
|
924
1029
|
DateQuickBtn: import("vue").DefineComponent<{
|
|
@@ -1120,6 +1225,15 @@ export declare const WidgetCfgMaps: Map<string, {
|
|
|
1120
1225
|
onConfirm: {
|
|
1121
1226
|
type: FunctionConstructor;
|
|
1122
1227
|
};
|
|
1228
|
+
formattedValue: {
|
|
1229
|
+
type: StringConstructor;
|
|
1230
|
+
};
|
|
1231
|
+
placeholder: {
|
|
1232
|
+
type: StringConstructor;
|
|
1233
|
+
};
|
|
1234
|
+
allowedInvalidValue: {
|
|
1235
|
+
type: StringConstructor;
|
|
1236
|
+
};
|
|
1123
1237
|
}, {
|
|
1124
1238
|
attrs: {
|
|
1125
1239
|
[x: string]: unknown;
|
|
@@ -1131,9 +1245,23 @@ export declare const WidgetCfgMaps: Map<string, {
|
|
|
1131
1245
|
onConfirm: {
|
|
1132
1246
|
type: FunctionConstructor;
|
|
1133
1247
|
};
|
|
1134
|
-
|
|
1248
|
+
formattedValue: {
|
|
1249
|
+
type: StringConstructor;
|
|
1250
|
+
};
|
|
1251
|
+
placeholder: {
|
|
1252
|
+
type: StringConstructor;
|
|
1253
|
+
};
|
|
1254
|
+
allowedInvalidValue: {
|
|
1255
|
+
type: StringConstructor;
|
|
1256
|
+
};
|
|
1257
|
+
}>> & {
|
|
1258
|
+
"onUpdate:formatted-value"?: ((...args: any[]) => any) | undefined;
|
|
1259
|
+
}>>;
|
|
1260
|
+
emit: (event: "update:formatted-value", ...args: any[]) => void;
|
|
1135
1261
|
datePickerRef: import("vue").Ref<import("../../../..").AnyObject | null>;
|
|
1136
1262
|
panelInstRef: import("vue").Ref<null>;
|
|
1263
|
+
placeholderRef: import("vue").Ref<any>;
|
|
1264
|
+
currentFormattedValue: import("vue").WritableComputedRef<string | null | undefined>;
|
|
1137
1265
|
isDateTime: import("vue").ComputedRef<boolean>;
|
|
1138
1266
|
formatRef: import("vue").ComputedRef<string>;
|
|
1139
1267
|
panelFormatRef: import("vue").ComputedRef<string | [string, string]>;
|
|
@@ -1142,15 +1270,27 @@ export declare const WidgetCfgMaps: Map<string, {
|
|
|
1142
1270
|
handleConfirm: (target: HTMLInputElement) => void;
|
|
1143
1271
|
onUpdateShow: (show: boolean) => void;
|
|
1144
1272
|
onConfirm: (...args: any[]) => Promise<void>;
|
|
1273
|
+
isAllowedInvalidValue: (value?: string) => boolean | "" | undefined;
|
|
1145
1274
|
NDatePicker: any;
|
|
1146
|
-
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin,
|
|
1275
|
+
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "update:formatted-value"[], "update:formatted-value", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
1147
1276
|
updateUnchangedValue: {
|
|
1148
1277
|
type: BooleanConstructor;
|
|
1149
1278
|
};
|
|
1150
1279
|
onConfirm: {
|
|
1151
1280
|
type: FunctionConstructor;
|
|
1152
1281
|
};
|
|
1153
|
-
|
|
1282
|
+
formattedValue: {
|
|
1283
|
+
type: StringConstructor;
|
|
1284
|
+
};
|
|
1285
|
+
placeholder: {
|
|
1286
|
+
type: StringConstructor;
|
|
1287
|
+
};
|
|
1288
|
+
allowedInvalidValue: {
|
|
1289
|
+
type: StringConstructor;
|
|
1290
|
+
};
|
|
1291
|
+
}>> & {
|
|
1292
|
+
"onUpdate:formatted-value"?: ((...args: any[]) => any) | undefined;
|
|
1293
|
+
}, {
|
|
1154
1294
|
updateUnchangedValue: boolean;
|
|
1155
1295
|
}>>;
|
|
1156
1296
|
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "update:value"[], "update:value", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{defineComponent as e,useAttrs as r,ref as
|
|
1
|
+
import{defineComponent as e,useAttrs as r,ref as t,computed as s,openBlock as o,createBlock as m,unref as i,createSlots as f,renderList as a,withCtx as u,renderSlot as l}from"vue";import{NTimePicker as n}from"naive-ui";import"../../../shared/utils/index.js";import"lodash-es";import{useDateTime as p}from"../../../shared/hooks/useDateTime.js";var c=e({__name:"TimePicker",setup(e,{expose:c}){const d=r(),k=t(null),h=s((()=>Reflect.get(d,"format")?d.format:"HH:mm:ss")),{focus:_,blur:v}=p(k,{formatRef:h,attrs:d});return c({$timePicker:k,focus:_,blur:v}),(e,r)=>(o(),m(i(n),{ref_key:"timePickerRef",ref:k},f({_:2},[a(e.$slots,((r,t)=>({name:t,fn:u((()=>[l(e.$slots,t)]))})))]),1536))}});export{c as default};
|
|
@@ -26,6 +26,10 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
26
26
|
popperProps: {
|
|
27
27
|
type: PropType<AnyObject>;
|
|
28
28
|
};
|
|
29
|
+
slashSymbol: {
|
|
30
|
+
type: StringConstructor;
|
|
31
|
+
default: string;
|
|
32
|
+
};
|
|
29
33
|
}, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
30
34
|
value: {
|
|
31
35
|
type: (NumberConstructor | StringConstructor)[];
|
|
@@ -52,7 +56,12 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
52
56
|
popperProps: {
|
|
53
57
|
type: PropType<AnyObject>;
|
|
54
58
|
};
|
|
59
|
+
slashSymbol: {
|
|
60
|
+
type: StringConstructor;
|
|
61
|
+
default: string;
|
|
62
|
+
};
|
|
55
63
|
}>>, {
|
|
56
64
|
onChange: Func<any[], any>;
|
|
65
|
+
slashSymbol: string;
|
|
57
66
|
}>;
|
|
58
67
|
export default _default;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{defineComponent as e,computed as
|
|
1
|
+
import{defineComponent as e,computed as l,ref as t,watch as u,createVNode as n,mergeProps as o}from"vue";import{findAncestor as a}from"../../utils/index.js";import{isArray as s,isString as i,isNumber as r,isObject as v}from"lodash-es";import{NInput as p,NDropdown as c}from"naive-ui";import"../../../components/form-render/index.js";import{createInputSlot as m}from"../../../components/form-render/src/utils/index.js";var f=e({props:{value:{type:[Number,String]},onChange:{type:Function,default:()=>({})},prefix:{type:[String,Function,Object]},suffix:{type:[String,Function,Object]},precision:{type:Number},whiteList:{type:Array},inputProps:{type:Object},popperProps:{type:Object},slashSymbol:{type:String,default:"/"}},setup(e){const f=m(e),d=l((()=>s(e.whiteList)?e.whiteList.reduce(((e,l)=>(i(l)&&e.push({label:l,value:l}),e)),[]):[]));const h=t(),b=l({get:()=>h.value,set:l=>r(l)?h.value=l+"":i(l)?l.endsWith(e.slashSymbol)?h.value=e.slashSymbol:void(h.value=d.value.some((e=>e.label!==l&&e.label.includes(l)))?"":l):void 0});function g(e=-1){const l=r(+e)&&e>=0?+e:null;return new RegExp(`^-?(0|[1-9][0-9]*)?${0===l?"":`(\\.[0-9]${r(l)?`{0,${l}}`:"*"})?`}$`)}u((()=>e.value),(e=>b.value=e),{immediate:!0});const y=g();function S(){if(b.value===e.slashSymbol||function(e,l=!1){return d.value.length&&d.value.some((({value:t})=>l?t.includes(e):t===e))}(b.value))e.onChange(b.value);else if(i(b.value)&&"-"!==b.value)if(y.test(b.value)){const l=b.value.endsWith(".")?b.value.slice(0,-1):b.value;e.onChange(b.value=l)}else b.value=e.value;else b.value=e.value}const j=t(!1),w=t();function x(){j.value=!0}function $(e){var l;if(!e.target)return;const t=e.target;(null==(l=w.value)?void 0:l.$el)&&a(t,(e=>e===w.value.$el))||(j.value=!1)}function C(e,l){var t,u;v(l)&&(b.value=l.value,null==(u=null==(t=w.value)?void 0:t.focus)||u.call(t))}const F=l((()=>g(e.precision)));function O(l){return!(null!=l&&""!==l&&l!==e.slashSymbol&&i(l)&&!l.endsWith(e.slashSymbol))||(!(!d.value.length||!d.value.some((e=>e.label.includes(l))))||F.value.test(l)&&"-."!==l&&!l.startsWith("."))}return()=>{const l=n(p,o({ref:w,value:b.value,"onUpdate:value":e=>b.value=e,"allow-input":O,onBlur:S,onClick:x,onFocus:x},e.inputProps),f.value);return d.value.length?n(c,o({onSelect:C,options:d.value,show:j.value,width:"trigger",onClickoutside:$},e.popperProps),{default:()=>l}):l}}});export{f as default};
|
|
@@ -1,6 +1,12 @@
|
|
|
1
1
|
import { Ref, ComputedRef } from 'vue';
|
|
2
|
-
import { AnyObject } from '../../../es/shared/types';
|
|
3
|
-
export declare function useDateTime(datePickerRef: Ref<AnyObject | null>, formatRef
|
|
2
|
+
import { AnyObject, Func } from '../../../es/shared/types';
|
|
3
|
+
export declare function useDateTime(datePickerRef: Ref<AnyObject | null>, { formatRef, attrs, emit, allowedInvalidValue, isPanel }: {
|
|
4
|
+
formatRef: ComputedRef<string | [string, string]>;
|
|
5
|
+
attrs: AnyObject;
|
|
6
|
+
allowedInvalidValue?: string;
|
|
7
|
+
emit?: Func;
|
|
8
|
+
isPanel?: boolean;
|
|
9
|
+
}): {
|
|
4
10
|
handleConfirm: (target: HTMLInputElement) => void;
|
|
5
11
|
focus: () => any;
|
|
6
12
|
blur: () => any;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{computed as e,unref as t}from"vue";import{useEventListener as n}from"@vueuse/core";import{isValid as l}from"date-fns";function i(e,t=""){e.value=t,e.dispatchEvent(new InputEvent("input"))}function o(e,t,n,l){const o=e.value;if(!o)return;const u=e.selectionEnd||0,
|
|
1
|
+
import{computed as e,unref as t}from"vue";import{useEventListener as n}from"@vueuse/core";import{isValid as l}from"date-fns";function i(e,t=""){e.value=t,e.dispatchEvent(new InputEvent("input"))}function o(e,t,n,l){const o=e.value;if(!o)return;const u=e.selectionEnd||0,r=o.length;let a=0,s=0,c=0,d="",f=0;for(;a<r;){const e=o[a++];if(/\d/.test(e)&&(d+=e),a===u){c=d.length;const e=o.slice(a).match(/^\d+/);f=e?e[0].length:0}}const v=Array.isArray(t)?function(e){var t,n;let l=!1,i=e.parentNode||null;for(;i;){if(null==(n=null==(t=i.classList)?void 0:t.contains)?void 0:n.call(t,"n-time-picker")){l=!0;break}i=i.parentNode||null}return l}(e)?t[1]:t[0]:t;let g="",m=0,p=0;for(a=0;a<v.length&&(l||!(s>=d.length));){const e=v[a++];if(/[yMdHms]/.test(e)?g+=d[s++]||"0":g+=e,n&&s===c){c=-1,m=g.length,p=m;let e=v.slice(a).match(/^[yMdHms]+/);e?(f=Math.min(f,e[0].length),f&&(g+=d.slice(s,s+f),s+=f),a+=e[0].length):(e=v.slice(a).match(/^([^yMdHms]+)([yMdHms]*)/),e&&(m+=e[1].length,p=m+e[2].length))}}const h=g!==o;return h&&i(e,g),n&&(m=m||g.length+1,p=p||g.length+1,e.setSelectionRange(m,p)),h}function u(u,{formatRef:r,attrs:a,emit:s,allowedInvalidValue:c,isPanel:d}){const f=e((()=>{var e;return null==(e=u.value)?void 0:e.$el})),v=e((()=>{const e={};return["date","time","hour","minute","second"].forEach((t=>function(e,t){const n=`is-${t}-disabled`;a[n]&&(e[n.replace(/-(\w)/g,((e,t)=>t.toUpperCase()))]=a[n])}(e,t))),e}));function g(e){if(function(e=""){return c&&c===e&&!d}(e.value))return void(null==s||s("update:formatted-value",c,null));o(e,t(r),!1,!0);const n=null==e?void 0:e.value,u=Reflect.get(a,"type")||"";n&&!u.includes("range")&&l(new Date(n))&&!function(e){const{isTimeDisabled:t,isDateDisabled:n,isHourDisabled:l,isMinuteDisabled:i,isSecondDisabled:o}=v.value;if(null==n?void 0:n(e.getTime()))return;const u=(null==t?void 0:t(e.getTime()).isHourDisabled)||l,r=(null==t?void 0:t(e.getTime()).isMinuteDisabled)||i,a=(null==t?void 0:t(e.getTime()).isSecondDisabled)||o;if(null==u?void 0:u(e.getHours()))return;if(null==r?void 0:r(e.getMinutes()))return;if(null==a?void 0:a(e.getSeconds()))return;return!0}(new Date(n))&&i(e)}return n(f,"input",(function(e){const n=e.target;if(!n.value||!Reflect.get(n,"_f_"))return;Reflect.set(n,"_f_",0),o(n,t(r),!0)&&(e.preventDefault(),e.stopPropagation())}),!0),n(f,"keydown",(function(e){const{key:t}=e,n=e.target;if(/\d/.test(t)&&n)Reflect.set(n,"_f_",1);else if("Enter"===t)g(n);else if("Backspace"===t&&!d){const e=null==n?void 0:n.value;1===(null==e?void 0:e.length)&&(i(n),n.blur(),n.focus())}}),!0),n(f,"mouseup",(function(e){const t=e.target;["INPUT"].includes(t.tagName)&&0===e.button&&function(e){const{selectionStart:t=0,selectionEnd:n=0,value:l}=e;if(t!==n)return;const i=/(\d+)/g;let o,u,r;for(;null!==(o=i.exec(l));)if(t&&o.index<=t&&t<=i.lastIndex){u=o.index,r=i.lastIndex;break}void 0!==u&&void 0!==r&&e.setSelectionRange(u,r)}(t)}),!0),n(f,"paste",(function(e){var t,n;const l=(null==(t=e.clipboardData)?void 0:t.getData("text"))||"",o=null==(n=l.match(/\d+/g))?void 0:n.join(",");if(!o)return;e.preventDefault(),e.stopPropagation();const u=e.target;i(u,o),g(u)}),!0),{handleConfirm:g,focus:()=>{var e,t;return null==(t=null==(e=u.value)?void 0:e.focus)?void 0:t.call(e)},blur:()=>{var e,t;return null==(t=null==(e=u.value)?void 0:e.blur)?void 0:t.call(e)}}}export{u as useDateTime};
|