cnhis-design-vue 3.1.52-release.1 → 3.1.52-release.3

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.
Files changed (96) hide show
  1. package/README.md +87 -87
  2. package/es/components/body-select/index.d.ts +47 -0
  3. package/es/components/body-select/index.js +1 -0
  4. package/es/components/body-select/src/config/index.d.ts +101 -0
  5. package/es/components/body-select/src/config/index.js +1 -0
  6. package/es/components/body-select/src/hooks/renderCanvas.d.ts +6 -0
  7. package/es/components/body-select/src/hooks/renderCanvas.js +1 -0
  8. package/es/components/body-select/src/index.vue.d.ts +48 -0
  9. package/es/components/body-select/src/index.vue.js +1 -0
  10. package/es/components/body-select/src/index.vue2.js +1 -0
  11. package/es/components/body-select/style/index.css +1 -0
  12. package/es/components/callback/src/components/render/popupMaps.d.ts +1 -1
  13. package/es/components/classification/index.d.ts +76 -6
  14. package/es/components/classification/src/components/search-filter/index.vue.d.ts +76 -6
  15. package/es/components/classification/src/components/set-classification/index.vue.d.ts +76 -6
  16. package/es/components/classification/src/index.vue.d.ts +76 -6
  17. package/es/components/date-picker/index.d.ts +38 -3
  18. package/es/components/date-picker/src/DatePicker.vue.d.ts +38 -3
  19. package/es/components/date-picker/src/DatePicker.vue2.js +1 -1
  20. package/es/components/expand-field/src/components/form.vue2.js +1 -1
  21. package/es/components/form-config/index.d.ts +2 -2
  22. package/es/components/form-config/src/FormConfig.vue.d.ts +2 -2
  23. package/es/components/form-config/src/components/FormConfigCreator.vue.d.ts +1 -1
  24. package/es/components/form-config/src/components/FormConfigEdit.vue.d.ts +1 -1
  25. package/es/components/form-config/src/hooks/useConfigurationField.js +1 -1
  26. package/es/components/form-render/index.d.ts +1 -1
  27. package/es/components/form-render/src/FormRender.vue.d.ts +1 -1
  28. package/es/components/form-render/src/FormRenderWrapper.vue.d.ts +1 -1
  29. package/es/components/form-render/src/components/renderer/date.d.ts +25 -0
  30. package/es/components/form-render/src/components/renderer/date.js +1 -1
  31. package/es/components/form-render/src/components/renderer/levelSearchCascader.js +1 -1
  32. package/es/components/form-render/src/components/renderer/radio_checkbox.js +1 -1
  33. package/es/components/form-render/src/hooks/useFormEvent.d.ts +2 -2
  34. package/es/components/form-render/src/hooks/useFormEvent.js +1 -1
  35. package/es/components/form-render/src/types/index.d.ts +2 -2
  36. package/es/components/iho-table/index.js +1 -1
  37. package/es/components/iho-table/src/plugins/filterDaterangeRenderPlugin/filter.vue.d.ts +38 -3
  38. package/es/components/iho-table/src/plugins/keyboardEventPlugin/index.js +1 -1
  39. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/dateRendererPlugin/editDate.vue.d.ts +38 -3
  40. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/dateRendererPlugin/editDate.vue2.js +1 -1
  41. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/dateRendererPlugin/index.js +1 -1
  42. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/timeRendererPlugin/index.js +1 -1
  43. package/es/components/iho-table/src/types/index.d.ts +1 -1
  44. package/es/components/iho-table/src/utils/index.d.ts +2 -0
  45. package/es/components/iho-table/src/utils/index.js +1 -1
  46. package/es/components/index.css +1 -1
  47. package/es/components/index.d.ts +2 -1
  48. package/es/components/index.js +1 -1
  49. package/es/components/info-header/index.d.ts +2 -2
  50. package/es/components/info-header/src/InfoHeader.vue.d.ts +2 -2
  51. package/es/components/info-header/src/components/infoDescription/index.vue.d.ts +1 -1
  52. package/es/components/info-header/src/components/patientInfo/index.vue.d.ts +1 -1
  53. package/es/components/keyboard/src/Keyboard.vue2.js +1 -1
  54. package/es/components/scale-view/src/ScaleView.vue2.js +1 -1
  55. package/es/components/select-label/src/LabelFormContent.vue2.js +1 -1
  56. package/es/components/select-person/src/SearchMultiple.vue.d.ts +6 -0
  57. package/es/components/select-person/src/SearchOrgAndStaff.vue2.js +1 -1
  58. package/es/components/shortcut-setter/index.d.ts +1 -1
  59. package/es/components/shortcut-setter/src/ShortcutSetter.vue.d.ts +1 -1
  60. package/es/components/table-export-field/src/components/ExportModal.vue.d.ts +0 -3
  61. package/es/components/table-filter/src/components/classify-filter/ValueCfg.vue.d.ts +76 -6
  62. package/es/components/table-filter/src/components/classify-filter/components/Date.vue.d.ts +38 -3
  63. package/es/components/table-filter/src/components/classify-filter/components/DateRange.vue.d.ts +38 -3
  64. package/es/components/table-filter/src/components/classify-filter/components/index.d.ts +76 -6
  65. package/es/components/table-filter/src/components/classify-filter/index.vue.d.ts +76 -6
  66. package/es/components/table-filter/src/components/render-widget/components/DateInner.vue.d.ts +38 -3
  67. package/es/components/table-filter/src/components/render-widget/components/DateOut.vue.d.ts +38 -3
  68. package/es/components/table-filter/src/components/render-widget/components/DateRangeInner.vue.d.ts +38 -3
  69. package/es/components/table-filter/src/components/render-widget/components/DateRangeOut.vue.d.ts +38 -3
  70. package/es/components/table-filter/src/components/render-widget/components/index.d.ts +152 -12
  71. package/es/components/table-filter/src/components/render-widget/widgetCfgMaps.d.ts +152 -12
  72. package/es/components/time-picker/src/TimePicker.vue2.js +1 -1
  73. package/es/env.d.ts +25 -25
  74. package/es/shared/assets/img/failure.png.js +1 -1
  75. package/es/shared/assets/img/no-permission.png.js +1 -1
  76. package/es/shared/assets/img/nodata.png.js +1 -1
  77. package/es/shared/assets/img/notfound.png.js +1 -1
  78. package/es/shared/assets/img/qr.png.js +1 -1
  79. package/es/shared/assets/img/success.png.js +1 -1
  80. package/es/shared/assets/img/video.png.js +1 -1
  81. package/es/shared/assets/img/video_default_cover.png.js +1 -1
  82. package/es/shared/assets/img/xb_big.png.js +1 -1
  83. package/es/shared/assets/img/xb_small.png.js +1 -1
  84. package/es/shared/components/InputNumberSlash/InputNumberSlash.d.ts +9 -0
  85. package/es/shared/components/InputNumberSlash/InputNumberSlash.js +1 -1
  86. package/es/shared/hooks/useDateTime.d.ts +8 -2
  87. package/es/shared/hooks/useDateTime.js +1 -1
  88. package/es/shared/package.json.js +1 -1
  89. package/package.json +2 -2
  90. package/es/components/bpmn-workflow/src/BpmnWorkflow.d.ts +0 -0
  91. package/es/components/bpmn-workflow/types/BpmnViewer.d.ts +0 -1
  92. package/es/components/bpmn-workflow/types/ModelingModule.d.ts +0 -1
  93. package/es/components/bpmn-workflow/types/MoveCanvasModule.d.ts +0 -1
  94. package/es/shared/components/VueDraggable/src/vuedraggable.d.ts +0 -86
  95. package/es/shared/utils/fabricjs/index.d.ts +0 -6823
  96. package/es/shared/utils/tapable/index.d.ts +0 -139
@@ -280,6 +280,15 @@ declare const _default: import("vue").DefineComponent<{
280
280
  onConfirm: {
281
281
  type: FunctionConstructor;
282
282
  };
283
+ formattedValue: {
284
+ type: StringConstructor;
285
+ };
286
+ placeholder: {
287
+ type: StringConstructor;
288
+ };
289
+ allowedInvalidValue: {
290
+ type: StringConstructor;
291
+ };
283
292
  }, {
284
293
  attrs: {
285
294
  [x: string]: unknown;
@@ -291,9 +300,23 @@ declare const _default: import("vue").DefineComponent<{
291
300
  onConfirm: {
292
301
  type: FunctionConstructor;
293
302
  };
294
- }>> & {}>>;
303
+ formattedValue: {
304
+ type: StringConstructor;
305
+ };
306
+ placeholder: {
307
+ type: StringConstructor;
308
+ };
309
+ allowedInvalidValue: {
310
+ type: StringConstructor;
311
+ };
312
+ }>> & {
313
+ "onUpdate:formatted-value"?: ((...args: any[]) => any) | undefined;
314
+ }>>;
315
+ emit: (event: "update:formatted-value", ...args: any[]) => void;
295
316
  datePickerRef: import("vue").Ref<import("../../../..").AnyObject | null>;
296
317
  panelInstRef: import("vue").Ref<null>;
318
+ placeholderRef: import("vue").Ref<any>;
319
+ currentFormattedValue: import("vue").WritableComputedRef<string | null | undefined>;
297
320
  isDateTime: import("vue").ComputedRef<boolean>;
298
321
  formatRef: import("vue").ComputedRef<string>;
299
322
  panelFormatRef: import("vue").ComputedRef<string | [string, string]>;
@@ -302,15 +325,27 @@ declare const _default: import("vue").DefineComponent<{
302
325
  handleConfirm: (target: HTMLInputElement) => void;
303
326
  onUpdateShow: (show: boolean) => void;
304
327
  onConfirm: (...args: any[]) => Promise<void>;
328
+ isAllowedInvalidValue: (value?: string) => boolean | "" | undefined;
305
329
  NDatePicker: any;
306
- }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
330
+ }, 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<{
307
331
  updateUnchangedValue: {
308
332
  type: BooleanConstructor;
309
333
  };
310
334
  onConfirm: {
311
335
  type: FunctionConstructor;
312
336
  };
313
- }>>, {
337
+ formattedValue: {
338
+ type: StringConstructor;
339
+ };
340
+ placeholder: {
341
+ type: StringConstructor;
342
+ };
343
+ allowedInvalidValue: {
344
+ type: StringConstructor;
345
+ };
346
+ }>> & {
347
+ "onUpdate:formatted-value"?: ((...args: any[]) => any) | undefined;
348
+ }, {
314
349
  updateUnchangedValue: boolean;
315
350
  }>>;
316
351
  NSelect: any;
@@ -873,6 +908,15 @@ declare const _default: import("vue").DefineComponent<{
873
908
  onConfirm: {
874
909
  type: FunctionConstructor;
875
910
  };
911
+ formattedValue: {
912
+ type: StringConstructor;
913
+ };
914
+ placeholder: {
915
+ type: StringConstructor;
916
+ };
917
+ allowedInvalidValue: {
918
+ type: StringConstructor;
919
+ };
876
920
  }, {
877
921
  attrs: {
878
922
  [x: string]: unknown;
@@ -884,9 +928,23 @@ declare const _default: import("vue").DefineComponent<{
884
928
  onConfirm: {
885
929
  type: FunctionConstructor;
886
930
  };
887
- }>> & {}>>;
931
+ formattedValue: {
932
+ type: StringConstructor;
933
+ };
934
+ placeholder: {
935
+ type: StringConstructor;
936
+ };
937
+ allowedInvalidValue: {
938
+ type: StringConstructor;
939
+ };
940
+ }>> & {
941
+ "onUpdate:formatted-value"?: ((...args: any[]) => any) | undefined;
942
+ }>>;
943
+ emit: (event: "update:formatted-value", ...args: any[]) => void;
888
944
  datePickerRef: import("vue").Ref<import("../../../..").AnyObject | null>;
889
945
  panelInstRef: import("vue").Ref<null>;
946
+ placeholderRef: import("vue").Ref<any>;
947
+ currentFormattedValue: import("vue").WritableComputedRef<string | null | undefined>;
890
948
  isDateTime: import("vue").ComputedRef<boolean>;
891
949
  formatRef: import("vue").ComputedRef<string>;
892
950
  panelFormatRef: import("vue").ComputedRef<string | [string, string]>;
@@ -895,15 +953,27 @@ declare const _default: import("vue").DefineComponent<{
895
953
  handleConfirm: (target: HTMLInputElement) => void;
896
954
  onUpdateShow: (show: boolean) => void;
897
955
  onConfirm: (...args: any[]) => Promise<void>;
956
+ isAllowedInvalidValue: (value?: string) => boolean | "" | undefined;
898
957
  NDatePicker: any;
899
- }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
958
+ }, 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<{
900
959
  updateUnchangedValue: {
901
960
  type: BooleanConstructor;
902
961
  };
903
962
  onConfirm: {
904
963
  type: FunctionConstructor;
905
964
  };
906
- }>>, {
965
+ formattedValue: {
966
+ type: StringConstructor;
967
+ };
968
+ placeholder: {
969
+ type: StringConstructor;
970
+ };
971
+ allowedInvalidValue: {
972
+ type: StringConstructor;
973
+ };
974
+ }>> & {
975
+ "onUpdate:formatted-value"?: ((...args: any[]) => any) | undefined;
976
+ }, {
907
977
  updateUnchangedValue: boolean;
908
978
  }>>;
909
979
  WidgetValEnums: {
@@ -590,6 +590,15 @@ declare const _default: import("vue").DefineComponent<{
590
590
  onConfirm: {
591
591
  type: FunctionConstructor;
592
592
  };
593
+ formattedValue: {
594
+ type: StringConstructor;
595
+ };
596
+ placeholder: {
597
+ type: StringConstructor;
598
+ };
599
+ allowedInvalidValue: {
600
+ type: StringConstructor;
601
+ };
593
602
  }, {
594
603
  attrs: {
595
604
  [x: string]: unknown;
@@ -601,9 +610,23 @@ declare const _default: import("vue").DefineComponent<{
601
610
  onConfirm: {
602
611
  type: FunctionConstructor;
603
612
  };
604
- }>> & {}>>;
613
+ formattedValue: {
614
+ type: StringConstructor;
615
+ };
616
+ placeholder: {
617
+ type: StringConstructor;
618
+ };
619
+ allowedInvalidValue: {
620
+ type: StringConstructor;
621
+ };
622
+ }>> & {
623
+ "onUpdate:formatted-value"?: ((...args: any[]) => any) | undefined;
624
+ }>>;
625
+ emit: (event: "update:formatted-value", ...args: any[]) => void;
605
626
  datePickerRef: import("vue").Ref<import("../../../..").AnyObject | null>;
606
627
  panelInstRef: import("vue").Ref<null>;
628
+ placeholderRef: import("vue").Ref<any>;
629
+ currentFormattedValue: import("vue").WritableComputedRef<string | null | undefined>;
607
630
  isDateTime: import("vue").ComputedRef<boolean>;
608
631
  formatRef: import("vue").ComputedRef<string>;
609
632
  panelFormatRef: import("vue").ComputedRef<string | [string, string]>;
@@ -612,15 +635,27 @@ declare const _default: import("vue").DefineComponent<{
612
635
  handleConfirm: (target: HTMLInputElement) => void;
613
636
  onUpdateShow: (show: boolean) => void;
614
637
  onConfirm: (...args: any[]) => Promise<void>;
638
+ isAllowedInvalidValue: (value?: string) => boolean | "" | undefined;
615
639
  NDatePicker: any;
616
- }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
640
+ }, 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<{
617
641
  updateUnchangedValue: {
618
642
  type: BooleanConstructor;
619
643
  };
620
644
  onConfirm: {
621
645
  type: FunctionConstructor;
622
646
  };
623
- }>>, {
647
+ formattedValue: {
648
+ type: StringConstructor;
649
+ };
650
+ placeholder: {
651
+ type: StringConstructor;
652
+ };
653
+ allowedInvalidValue: {
654
+ type: StringConstructor;
655
+ };
656
+ }>> & {
657
+ "onUpdate:formatted-value"?: ((...args: any[]) => any) | undefined;
658
+ }, {
624
659
  updateUnchangedValue: boolean;
625
660
  }>>;
626
661
  NSelect: any;
@@ -1183,6 +1218,15 @@ declare const _default: import("vue").DefineComponent<{
1183
1218
  onConfirm: {
1184
1219
  type: FunctionConstructor;
1185
1220
  };
1221
+ formattedValue: {
1222
+ type: StringConstructor;
1223
+ };
1224
+ placeholder: {
1225
+ type: StringConstructor;
1226
+ };
1227
+ allowedInvalidValue: {
1228
+ type: StringConstructor;
1229
+ };
1186
1230
  }, {
1187
1231
  attrs: {
1188
1232
  [x: string]: unknown;
@@ -1194,9 +1238,23 @@ declare const _default: import("vue").DefineComponent<{
1194
1238
  onConfirm: {
1195
1239
  type: FunctionConstructor;
1196
1240
  };
1197
- }>> & {}>>;
1241
+ formattedValue: {
1242
+ type: StringConstructor;
1243
+ };
1244
+ placeholder: {
1245
+ type: StringConstructor;
1246
+ };
1247
+ allowedInvalidValue: {
1248
+ type: StringConstructor;
1249
+ };
1250
+ }>> & {
1251
+ "onUpdate:formatted-value"?: ((...args: any[]) => any) | undefined;
1252
+ }>>;
1253
+ emit: (event: "update:formatted-value", ...args: any[]) => void;
1198
1254
  datePickerRef: import("vue").Ref<import("../../../..").AnyObject | null>;
1199
1255
  panelInstRef: import("vue").Ref<null>;
1256
+ placeholderRef: import("vue").Ref<any>;
1257
+ currentFormattedValue: import("vue").WritableComputedRef<string | null | undefined>;
1200
1258
  isDateTime: import("vue").ComputedRef<boolean>;
1201
1259
  formatRef: import("vue").ComputedRef<string>;
1202
1260
  panelFormatRef: import("vue").ComputedRef<string | [string, string]>;
@@ -1205,15 +1263,27 @@ declare const _default: import("vue").DefineComponent<{
1205
1263
  handleConfirm: (target: HTMLInputElement) => void;
1206
1264
  onUpdateShow: (show: boolean) => void;
1207
1265
  onConfirm: (...args: any[]) => Promise<void>;
1266
+ isAllowedInvalidValue: (value?: string) => boolean | "" | undefined;
1208
1267
  NDatePicker: any;
1209
- }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
1268
+ }, 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<{
1210
1269
  updateUnchangedValue: {
1211
1270
  type: BooleanConstructor;
1212
1271
  };
1213
1272
  onConfirm: {
1214
1273
  type: FunctionConstructor;
1215
1274
  };
1216
- }>>, {
1275
+ formattedValue: {
1276
+ type: StringConstructor;
1277
+ };
1278
+ placeholder: {
1279
+ type: StringConstructor;
1280
+ };
1281
+ allowedInvalidValue: {
1282
+ type: StringConstructor;
1283
+ };
1284
+ }>> & {
1285
+ "onUpdate:formatted-value"?: ((...args: any[]) => any) | undefined;
1286
+ }, {
1217
1287
  updateUnchangedValue: boolean;
1218
1288
  }>>;
1219
1289
  WidgetValEnums: {
@@ -804,6 +804,15 @@ declare const _default: import("vue").DefineComponent<{
804
804
  onConfirm: {
805
805
  type: FunctionConstructor;
806
806
  };
807
+ formattedValue: {
808
+ type: StringConstructor;
809
+ };
810
+ placeholder: {
811
+ type: StringConstructor;
812
+ };
813
+ allowedInvalidValue: {
814
+ type: StringConstructor;
815
+ };
807
816
  }, {
808
817
  attrs: {
809
818
  [x: string]: unknown;
@@ -815,9 +824,23 @@ declare const _default: import("vue").DefineComponent<{
815
824
  onConfirm: {
816
825
  type: FunctionConstructor;
817
826
  };
818
- }>> & {}>>;
827
+ formattedValue: {
828
+ type: StringConstructor;
829
+ };
830
+ placeholder: {
831
+ type: StringConstructor;
832
+ };
833
+ allowedInvalidValue: {
834
+ type: StringConstructor;
835
+ };
836
+ }>> & {
837
+ "onUpdate:formatted-value"?: ((...args: any[]) => any) | undefined;
838
+ }>>;
839
+ emit: (event: "update:formatted-value", ...args: any[]) => void;
819
840
  datePickerRef: import("vue").Ref<import("../..").AnyObject | null>;
820
841
  panelInstRef: import("vue").Ref<null>;
842
+ placeholderRef: import("vue").Ref<any>;
843
+ currentFormattedValue: import("vue").WritableComputedRef<string | null | undefined>;
821
844
  isDateTime: import("vue").ComputedRef<boolean>;
822
845
  formatRef: import("vue").ComputedRef<string>;
823
846
  panelFormatRef: import("vue").ComputedRef<string | [string, string]>;
@@ -826,15 +849,27 @@ declare const _default: import("vue").DefineComponent<{
826
849
  handleConfirm: (target: HTMLInputElement) => void;
827
850
  onUpdateShow: (show: boolean) => void;
828
851
  onConfirm: (...args: any[]) => Promise<void>;
852
+ isAllowedInvalidValue: (value?: string) => boolean | "" | undefined;
829
853
  NDatePicker: any;
830
- }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
854
+ }, 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<{
831
855
  updateUnchangedValue: {
832
856
  type: BooleanConstructor;
833
857
  };
834
858
  onConfirm: {
835
859
  type: FunctionConstructor;
836
860
  };
837
- }>>, {
861
+ formattedValue: {
862
+ type: StringConstructor;
863
+ };
864
+ placeholder: {
865
+ type: StringConstructor;
866
+ };
867
+ allowedInvalidValue: {
868
+ type: StringConstructor;
869
+ };
870
+ }>> & {
871
+ "onUpdate:formatted-value"?: ((...args: any[]) => any) | undefined;
872
+ }, {
838
873
  updateUnchangedValue: boolean;
839
874
  }>>;
840
875
  NSelect: any;
@@ -1397,6 +1432,15 @@ declare const _default: import("vue").DefineComponent<{
1397
1432
  onConfirm: {
1398
1433
  type: FunctionConstructor;
1399
1434
  };
1435
+ formattedValue: {
1436
+ type: StringConstructor;
1437
+ };
1438
+ placeholder: {
1439
+ type: StringConstructor;
1440
+ };
1441
+ allowedInvalidValue: {
1442
+ type: StringConstructor;
1443
+ };
1400
1444
  }, {
1401
1445
  attrs: {
1402
1446
  [x: string]: unknown;
@@ -1408,9 +1452,23 @@ declare const _default: import("vue").DefineComponent<{
1408
1452
  onConfirm: {
1409
1453
  type: FunctionConstructor;
1410
1454
  };
1411
- }>> & {}>>;
1455
+ formattedValue: {
1456
+ type: StringConstructor;
1457
+ };
1458
+ placeholder: {
1459
+ type: StringConstructor;
1460
+ };
1461
+ allowedInvalidValue: {
1462
+ type: StringConstructor;
1463
+ };
1464
+ }>> & {
1465
+ "onUpdate:formatted-value"?: ((...args: any[]) => any) | undefined;
1466
+ }>>;
1467
+ emit: (event: "update:formatted-value", ...args: any[]) => void;
1412
1468
  datePickerRef: import("vue").Ref<import("../..").AnyObject | null>;
1413
1469
  panelInstRef: import("vue").Ref<null>;
1470
+ placeholderRef: import("vue").Ref<any>;
1471
+ currentFormattedValue: import("vue").WritableComputedRef<string | null | undefined>;
1414
1472
  isDateTime: import("vue").ComputedRef<boolean>;
1415
1473
  formatRef: import("vue").ComputedRef<string>;
1416
1474
  panelFormatRef: import("vue").ComputedRef<string | [string, string]>;
@@ -1419,15 +1477,27 @@ declare const _default: import("vue").DefineComponent<{
1419
1477
  handleConfirm: (target: HTMLInputElement) => void;
1420
1478
  onUpdateShow: (show: boolean) => void;
1421
1479
  onConfirm: (...args: any[]) => Promise<void>;
1480
+ isAllowedInvalidValue: (value?: string) => boolean | "" | undefined;
1422
1481
  NDatePicker: any;
1423
- }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
1482
+ }, 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<{
1424
1483
  updateUnchangedValue: {
1425
1484
  type: BooleanConstructor;
1426
1485
  };
1427
1486
  onConfirm: {
1428
1487
  type: FunctionConstructor;
1429
1488
  };
1430
- }>>, {
1489
+ formattedValue: {
1490
+ type: StringConstructor;
1491
+ };
1492
+ placeholder: {
1493
+ type: StringConstructor;
1494
+ };
1495
+ allowedInvalidValue: {
1496
+ type: StringConstructor;
1497
+ };
1498
+ }>> & {
1499
+ "onUpdate:formatted-value"?: ((...args: any[]) => any) | undefined;
1500
+ }, {
1431
1501
  updateUnchangedValue: boolean;
1432
1502
  }>>;
1433
1503
  WidgetValEnums: {
@@ -6,6 +6,15 @@ declare const DatePicker: SFCWithInstall<import("vue").DefineComponent<{
6
6
  onConfirm: {
7
7
  type: FunctionConstructor;
8
8
  };
9
+ formattedValue: {
10
+ type: StringConstructor;
11
+ };
12
+ placeholder: {
13
+ type: StringConstructor;
14
+ };
15
+ allowedInvalidValue: {
16
+ type: StringConstructor;
17
+ };
9
18
  }, {
10
19
  attrs: {
11
20
  [x: string]: unknown;
@@ -17,9 +26,23 @@ declare const DatePicker: SFCWithInstall<import("vue").DefineComponent<{
17
26
  onConfirm: {
18
27
  type: FunctionConstructor;
19
28
  };
20
- }>> & {}>>;
29
+ formattedValue: {
30
+ type: StringConstructor;
31
+ };
32
+ placeholder: {
33
+ type: StringConstructor;
34
+ };
35
+ allowedInvalidValue: {
36
+ type: StringConstructor;
37
+ };
38
+ }>> & {
39
+ "onUpdate:formatted-value"?: ((...args: any[]) => any) | undefined;
40
+ }>>;
41
+ emit: (event: "update:formatted-value", ...args: any[]) => void;
21
42
  datePickerRef: import("vue").Ref<import("../../../es/shared/types").AnyObject | null>;
22
43
  panelInstRef: import("vue").Ref<null>;
44
+ placeholderRef: import("vue").Ref<any>;
45
+ currentFormattedValue: import("vue").WritableComputedRef<string | null | undefined>;
23
46
  isDateTime: import("vue").ComputedRef<boolean>;
24
47
  formatRef: import("vue").ComputedRef<string>;
25
48
  panelFormatRef: import("vue").ComputedRef<string | [string, string]>;
@@ -28,15 +51,27 @@ declare const DatePicker: SFCWithInstall<import("vue").DefineComponent<{
28
51
  handleConfirm: (target: HTMLInputElement) => void;
29
52
  onUpdateShow: (show: boolean) => void;
30
53
  onConfirm: (...args: any[]) => Promise<void>;
54
+ isAllowedInvalidValue: (value?: string) => boolean | "" | undefined;
31
55
  NDatePicker: any;
32
- }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
56
+ }, 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<{
33
57
  updateUnchangedValue: {
34
58
  type: BooleanConstructor;
35
59
  };
36
60
  onConfirm: {
37
61
  type: FunctionConstructor;
38
62
  };
39
- }>>, {
63
+ formattedValue: {
64
+ type: StringConstructor;
65
+ };
66
+ placeholder: {
67
+ type: StringConstructor;
68
+ };
69
+ allowedInvalidValue: {
70
+ type: StringConstructor;
71
+ };
72
+ }>> & {
73
+ "onUpdate:formatted-value"?: ((...args: any[]) => any) | undefined;
74
+ }, {
40
75
  updateUnchangedValue: boolean;
41
76
  }>>;
42
77
  export default DatePicker;
@@ -6,6 +6,15 @@ declare const _default: import("vue").DefineComponent<{
6
6
  onConfirm: {
7
7
  type: FunctionConstructor;
8
8
  };
9
+ formattedValue: {
10
+ type: StringConstructor;
11
+ };
12
+ placeholder: {
13
+ type: StringConstructor;
14
+ };
15
+ allowedInvalidValue: {
16
+ type: StringConstructor;
17
+ };
9
18
  }, {
10
19
  attrs: {
11
20
  [x: string]: unknown;
@@ -17,9 +26,23 @@ declare const _default: import("vue").DefineComponent<{
17
26
  onConfirm: {
18
27
  type: FunctionConstructor;
19
28
  };
20
- }>> & {}>>;
29
+ formattedValue: {
30
+ type: StringConstructor;
31
+ };
32
+ placeholder: {
33
+ type: StringConstructor;
34
+ };
35
+ allowedInvalidValue: {
36
+ type: StringConstructor;
37
+ };
38
+ }>> & {
39
+ "onUpdate:formatted-value"?: ((...args: any[]) => any) | undefined;
40
+ }>>;
41
+ emit: (event: "update:formatted-value", ...args: any[]) => void;
21
42
  datePickerRef: import("vue").Ref<AnyObject | null>;
22
43
  panelInstRef: import("vue").Ref<null>;
44
+ placeholderRef: import("vue").Ref<any>;
45
+ currentFormattedValue: import("vue").WritableComputedRef<string | null | undefined>;
23
46
  isDateTime: import("vue").ComputedRef<boolean>;
24
47
  formatRef: import("vue").ComputedRef<string>;
25
48
  panelFormatRef: import("vue").ComputedRef<string | [string, string]>;
@@ -28,15 +51,27 @@ declare const _default: import("vue").DefineComponent<{
28
51
  handleConfirm: (target: HTMLInputElement) => void;
29
52
  onUpdateShow: (show: boolean) => void;
30
53
  onConfirm: (...args: any[]) => Promise<void>;
54
+ isAllowedInvalidValue: (value?: string) => boolean | "" | undefined;
31
55
  NDatePicker: any;
32
- }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
56
+ }, 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<{
33
57
  updateUnchangedValue: {
34
58
  type: BooleanConstructor;
35
59
  };
36
60
  onConfirm: {
37
61
  type: FunctionConstructor;
38
62
  };
39
- }>>, {
63
+ formattedValue: {
64
+ type: StringConstructor;
65
+ };
66
+ placeholder: {
67
+ type: StringConstructor;
68
+ };
69
+ allowedInvalidValue: {
70
+ type: StringConstructor;
71
+ };
72
+ }>> & {
73
+ "onUpdate:formatted-value"?: ((...args: any[]) => any) | undefined;
74
+ }, {
40
75
  updateUnchangedValue: boolean;
41
76
  }>;
42
77
  export default _default;
@@ -1 +1 @@
1
- import{defineComponent as e,useAttrs as n,ref as t,computed as l,openBlock as a,createBlock as u,unref as o,mergeProps as r,createSlots as i,renderList as s,withCtx as d,renderSlot as p,nextTick as c}from"vue";import{NDatePicker as f}from"naive-ui";import"../../../shared/utils/index.js";import"lodash-es";import{useDateTime as v}from"../../../shared/hooks/useDateTime.js";import{format as m}from"date-fns";var y=e({__name:"DatePicker",props:{updateUnchangedValue:{type:Boolean},onConfirm:{type:Function}},setup(e,{expose:y}){const h=e,g=n(),M=t(null),R=t(null),k=l((()=>{const e=Reflect.get(g,"type")||"";return["datetime","datetimerange"].includes(e)})),w=l((()=>{if(Reflect.get(g,"format"))return g.format;const e=g.type||"";return k.value?"yyyy-MM-dd HH:mm:ss":"month"===e?"yyyy-MM":"year"===e?"yyyy":"yyyy-MM-dd"})),C=l((()=>k.value?w.value.split(" "):"")),{focus:$,blur:D,handleConfirm:E}=v(M,w,g);function I(e){e&&k.value&&c((()=>{var e;R.value=null==(e=M.value)?void 0:e.panelInstRef,v(R,C,g,!0)}))}async function _(...e){var n,t,l,a,u,o;const r=Reflect.get(g,"type")||"",i=null==(a=null==(l=null==(t=null==(n=M.value)?void 0:n.inputInstRef)?void 0:t.$el)?void 0:l.querySelector)?void 0:a.call(l,"input");if(r.includes("range")?null==(u=h.onConfirm)||u.call(h,...e):(await c(),i.focus(),E(i),i.blur(),null==(o=h.onConfirm)||o.call(h,Date.parse(i.value),i.value)),!(null==i?void 0:i.value)||!h.updateUnchangedValue||r.includes("range"))return;const s=i.value;i.value=m(new Date,w.value),i.dispatchEvent(new InputEvent("input")),i.value=s,i.dispatchEvent(new InputEvent("input"))}return y({$datePicker:M,focus:$,blur:D}),(e,n)=>(a(),u(o(f),r({ref_key:"datePickerRef",ref:M},e.$attrs,{"onUpdate:show":I,onConfirm:_}),i({_:2},[s(e.$slots,((n,t)=>({name:t,fn:d((()=>[p(e.$slots,t)]))})))]),1040))}});export{y as default};
1
+ import{defineComponent as e,useAttrs as t,ref as a,computed as l,watch as n,openBlock as u,createBlock as o,unref as r,isRef as d,createSlots as i,renderList as s,withCtx as f,renderSlot as p,nextTick as v}from"vue";import{NDatePicker as m}from"naive-ui";import"../../../shared/utils/index.js";import"lodash-es";import{useDateTime as c}from"../../../shared/hooks/useDateTime.js";import{format as y}from"date-fns";var h=e({__name:"DatePicker",props:{updateUnchangedValue:{type:Boolean},onConfirm:{type:Function},formattedValue:{type:String},placeholder:{type:String},allowedInvalidValue:{type:String}},emits:["update:formatted-value"],setup(e,{expose:h,emit:g}){const V=e,w=t(),I=a(null),R=a(null),M=a(),k=l({get:()=>b(V.formattedValue)?null:V.formattedValue,set(e){g("update:formatted-value",e,e?Date.parse(e):null)}}),C=l((()=>{const e=Reflect.get(w,"type")||"";return["datetime","datetimerange"].includes(e)})),D=l((()=>{if(Reflect.get(w,"format"))return w.format;const e=w.type||"";return C.value?"yyyy-MM-dd HH:mm:ss":"month"===e?"yyyy-MM":"year"===e?"yyyy":"yyyy-MM-dd"})),E=l((()=>C.value?D.value.split(" "):"")),{focus:P,blur:S,handleConfirm:U}=c(I,{formatRef:D,attrs:w,emit:g,allowedInvalidValue:V.allowedInvalidValue});function $(e){e&&C.value&&v((()=>{var e;R.value=null==(e=I.value)?void 0:e.panelInstRef,c(R,{formatRef:E,attrs:w,isPanel:!0})}))}async function _(...e){var t,a,l,n,u,o;const r=Reflect.get(w,"type")||"",d=null==(n=null==(l=null==(a=null==(t=I.value)?void 0:t.inputInstRef)?void 0:a.$el)?void 0:l.querySelector)?void 0:n.call(l,"input");if(r.includes("range")?null==(u=V.onConfirm)||u.call(V,...e):(await v(),d.focus(),U(d),d.blur(),null==(o=V.onConfirm)||o.call(V,Date.parse(d.value),d.value)),!(null==d?void 0:d.value)||!V.updateUnchangedValue||r.includes("range"))return;const i=d.value;d.value=y(new Date,D.value),d.dispatchEvent(new InputEvent("input")),d.value=i,d.dispatchEvent(new InputEvent("input"))}function b(e=""){return V.allowedInvalidValue&&V.allowedInvalidValue===e}return n((()=>V.formattedValue),(e=>{M.value=b(e)?e:V.placeholder?V.placeholder:"选择日期时间"}),{immediate:!0}),h({$datePicker:I,focus:P,blur:S}),(e,t)=>(u(),o(r(m),{ref_key:"datePickerRef",ref:I,"onUpdate:show":$,onConfirm:_,placeholder:M.value,"formatted-value":r(k),"onUpdate:formatted-value":t[0]||(t[0]=e=>d(k)?k.value=e:null)},i({_:2},[s(e.$slots,((t,a)=>({name:a,fn:f((()=>[p(e.$slots,a)]))})))]),1032,["placeholder","formatted-value"]))}});export{h as default};