cnhis-design-vue 3.3.3-beta.74 → 3.3.3-beta.76

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 (41) hide show
  1. package/es/components/classification/index.d.ts +16 -258
  2. package/es/components/classification/src/components/search-filter/index.vue.d.ts +16 -258
  3. package/es/components/classification/src/components/set-classification/index.vue.d.ts +16 -258
  4. package/es/components/classification/src/index.vue.d.ts +16 -258
  5. package/es/components/field-set/src/FieldColor.vue.d.ts +1 -1
  6. package/es/components/field-set/src/FieldFilter.vue.d.ts +1 -1
  7. package/es/components/field-set/src/FieldSet.vue.d.ts +1 -1
  8. package/es/components/field-set/src/components/table-row.vue.d.ts +1 -1
  9. package/es/components/field-set/src/constants/index.js +4 -4
  10. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/timeRendererPlugin/editTime.vue.d.ts +36 -4
  11. package/es/components/info-header/index.d.ts +9 -17
  12. package/es/components/info-header/src/InfoHeader.vue.d.ts +9 -17
  13. package/es/components/info-header/src/InfoHeader.vue2.js +2 -2
  14. package/es/components/info-header/src/components/infoDescription/DescriptionList.vue.d.ts +3 -2
  15. package/es/components/info-header/src/components/infoDescription/DescriptionList.vue2.js +1 -1
  16. package/es/components/info-header/src/components/infoDescription/index.vue.d.ts +9 -17
  17. package/es/components/info-header/src/constants/index.d.ts +1 -1
  18. package/es/components/shortcut-provider/src/hooks/useShortcuts.js +1 -1
  19. package/es/components/shortcut-provider/src/types/index.d.ts +1 -0
  20. package/es/components/shortcut-provider/src/utils/index.d.ts +1 -1
  21. package/es/components/shortcut-provider/src/utils/index.js +3 -1
  22. package/es/components/table-filter/src/components/classify-filter/ValueCfg.vue.d.ts +14 -258
  23. package/es/components/table-filter/src/components/classify-filter/components/Base/DateOption.vue.d.ts +7 -129
  24. package/es/components/table-filter/src/components/classify-filter/components/Base/DateOption.vue2.js +107 -13
  25. package/es/components/table-filter/src/components/classify-filter/components/Date.vue.d.ts +7 -129
  26. package/es/components/table-filter/src/components/classify-filter/components/DateRange.vue.d.ts +7 -129
  27. package/es/components/table-filter/src/components/classify-filter/components/DateRange.vue2.js +2 -8
  28. package/es/components/table-filter/src/components/classify-filter/components/index.d.ts +14 -258
  29. package/es/components/table-filter/src/components/classify-filter/helpers/options.js +30 -5
  30. package/es/components/table-filter/src/components/classify-filter/index.vue.d.ts +16 -258
  31. package/es/components/table-filter/src/components/classify-filter/index.vue2.js +3 -1
  32. package/es/components/table-filter/src/components/render-widget/helpers/presetValToTimestamp.js +16 -1
  33. package/es/components/table-filter/src/hooks/useAdvanced.js +1 -1
  34. package/es/components/table-filter/src/types/enums.d.ts +1 -0
  35. package/es/components/table-filter/src/types/enums.js +1 -0
  36. package/es/components/time-picker/index.d.ts +36 -4
  37. package/es/components/time-picker/src/TimePicker.vue.d.ts +36 -4
  38. package/es/components/time-picker/src/TimePicker.vue2.js +98 -13
  39. package/es/shared/hooks/useDateTime.d.ts +1 -1
  40. package/es/shared/package.json.js +1 -1
  41. package/package.json +2 -3
@@ -22,12 +22,37 @@ const baseConditionOptions = [{
22
22
  value: ConditionEnums.NULL
23
23
  }];
24
24
  const dateConditionOptions = [
25
- ...baseConditionOptions,
26
25
  {
27
26
  label: function() {
28
27
  var _a, _b, _c;
29
28
  try {
30
- return ((_a = window.getLanguageByCode) == null ? void 0 : _a.call(window, "10010.1.334")) || ((_c = (_b = window.top) == null ? void 0 : _b.getLanguageByCode) == null ? void 0 : _c.call(_b, "10010.1.334")) || "\u8FC7\u53BB\u5185";
29
+ return ((_a = window.getLanguageByCode) == null ? void 0 : _a.call(window, "10010.1.376")) || ((_c = (_b = window.top) == null ? void 0 : _b.getLanguageByCode) == null ? void 0 : _c.call(_b, "10010.1.376")) || "\u81EA\u5B9A\u4E49";
30
+ } catch (e) {
31
+ return "\u81EA\u5B9A\u4E49";
32
+ }
33
+ }(),
34
+ value: ConditionEnums.EQUAL
35
+ },
36
+ {
37
+ label: "\u81EA\u5B9A\u4E49\u8303\u56F4",
38
+ value: ConditionEnums.CUSTOM_RANGE
39
+ },
40
+ {
41
+ label: function() {
42
+ var _a, _b, _c;
43
+ try {
44
+ return ((_a = window.getLanguageByCode) == null ? void 0 : _a.call(window, "10010.1.338")) || ((_c = (_b = window.top) == null ? void 0 : _b.getLanguageByCode) == null ? void 0 : _c.call(_b, "10010.1.338")) || "\u4E3A\u7A7A";
45
+ } catch (e) {
46
+ return "\u4E3A\u7A7A";
47
+ }
48
+ }(),
49
+ value: ConditionEnums.NULL
50
+ },
51
+ {
52
+ label: function() {
53
+ var _a, _b, _c;
54
+ try {
55
+ return ((_a = window.getLanguageByCode) == null ? void 0 : _a.call(window, "10010.1.672")) || ((_c = (_b = window.top) == null ? void 0 : _b.getLanguageByCode) == null ? void 0 : _c.call(_b, "10010.1.672")) || "\u8FC7\u53BB\u5185";
31
56
  } catch (e) {
32
57
  return "\u8FC7\u53BB\u5185";
33
58
  }
@@ -38,7 +63,7 @@ const dateConditionOptions = [
38
63
  label: function() {
39
64
  var _a, _b, _c;
40
65
  try {
41
- return ((_a = window.getLanguageByCode) == null ? void 0 : _a.call(window, "10010.1.335")) || ((_c = (_b = window.top) == null ? void 0 : _b.getLanguageByCode) == null ? void 0 : _c.call(_b, "10010.1.335")) || "\u672A\u6765\u5185";
66
+ return ((_a = window.getLanguageByCode) == null ? void 0 : _a.call(window, "10010.1.673")) || ((_c = (_b = window.top) == null ? void 0 : _b.getLanguageByCode) == null ? void 0 : _c.call(_b, "10010.1.673")) || "\u672A\u6765\u5185";
42
67
  } catch (e) {
43
68
  return "\u672A\u6765\u5185";
44
69
  }
@@ -49,7 +74,7 @@ const dateConditionOptions = [
49
74
  label: function() {
50
75
  var _a, _b, _c;
51
76
  try {
52
- return ((_a = window.getLanguageByCode) == null ? void 0 : _a.call(window, "10010.1.336")) || ((_c = (_b = window.top) == null ? void 0 : _b.getLanguageByCode) == null ? void 0 : _c.call(_b, "10010.1.336")) || "\u8FC7\u53BB\u7B2C";
77
+ return ((_a = window.getLanguageByCode) == null ? void 0 : _a.call(window, "10010.1.674")) || ((_c = (_b = window.top) == null ? void 0 : _b.getLanguageByCode) == null ? void 0 : _c.call(_b, "10010.1.674")) || "\u8FC7\u53BB\u7B2C";
53
78
  } catch (e) {
54
79
  return "\u8FC7\u53BB\u7B2C";
55
80
  }
@@ -60,7 +85,7 @@ const dateConditionOptions = [
60
85
  label: function() {
61
86
  var _a, _b, _c;
62
87
  try {
63
- return ((_a = window.getLanguageByCode) == null ? void 0 : _a.call(window, "10010.1.337")) || ((_c = (_b = window.top) == null ? void 0 : _b.getLanguageByCode) == null ? void 0 : _c.call(_b, "10010.1.337")) || "\u672A\u6765\u7B2C";
88
+ return ((_a = window.getLanguageByCode) == null ? void 0 : _a.call(window, "10010.1.675")) || ((_c = (_b = window.top) == null ? void 0 : _b.getLanguageByCode) == null ? void 0 : _c.call(_b, "10010.1.675")) || "\u672A\u6765\u7B2C";
64
89
  } catch (e) {
65
90
  return "\u672A\u6765\u7B2C";
66
91
  }
@@ -31,6 +31,7 @@ declare const _default: import("vue").DefineComponent<{
31
31
  class: string;
32
32
  };
33
33
  specialDateRange: string[];
34
+ specialCustomDateRange: string[];
34
35
  props: Readonly<import("@vue/shared").LooseRequired<Readonly<import("vue").ExtractPropTypes<{
35
36
  actionList_prop: {
36
37
  type: PropType<IClassifyListType>;
@@ -422,6 +423,12 @@ declare const _default: import("vue").DefineComponent<{
422
423
  label: string;
423
424
  value: string;
424
425
  }[];
426
+ widgetRangeOptions: {
427
+ label: string;
428
+ value: string;
429
+ }[];
430
+ startDateNum: import("vue").Ref<any>;
431
+ endDateNum: import("vue").Ref<any>;
425
432
  props: Readonly<import("@vue/shared").LooseRequired<Readonly<import("vue").ExtractPropTypes<{
426
433
  filterType: {
427
434
  type: StringConstructor;
@@ -454,135 +461,7 @@ declare const _default: import("vue").DefineComponent<{
454
461
  emit: (event: "update:modelValue" | "update:presetVal", ...args: any[]) => void;
455
462
  valueCp: import("vue").WritableComputedRef<any>;
456
463
  presetValCp: import("vue").WritableComputedRef<string>;
457
- CDatePicker: import("../../../../../shared/types").SFCWithInstall<import("vue").DefineComponent<{
458
- updateUnchangedValue: {
459
- type: BooleanConstructor;
460
- };
461
- onConfirm: {
462
- type: FunctionConstructor;
463
- };
464
- formattedValue: {
465
- type: PropType<(string | [string, string]) | null | undefined>;
466
- };
467
- placeholder: {
468
- type: StringConstructor;
469
- };
470
- allowedInvalidValue: {
471
- type: StringConstructor;
472
- };
473
- to: {
474
- type: PropType<string | false | HTMLElement>;
475
- default: string;
476
- };
477
- holidays: {
478
- type: PropType<Date[]>;
479
- default: () => never[];
480
- };
481
- type: {
482
- type: StringConstructor;
483
- default: string;
484
- };
485
- isDateDisabled: {
486
- type: PropType<(current: number, ...arg: any[]) => boolean>;
487
- };
488
- }, {
489
- attrs: {
490
- [x: string]: unknown;
491
- };
492
- props: Readonly<import("@vue/shared").LooseRequired<Readonly<import("vue").ExtractPropTypes<{
493
- updateUnchangedValue: {
494
- type: BooleanConstructor;
495
- };
496
- onConfirm: {
497
- type: FunctionConstructor;
498
- };
499
- formattedValue: {
500
- type: PropType<(string | [string, string]) | null | undefined>;
501
- };
502
- placeholder: {
503
- type: StringConstructor;
504
- };
505
- allowedInvalidValue: {
506
- type: StringConstructor;
507
- };
508
- to: {
509
- type: PropType<string | false | HTMLElement>;
510
- default: string;
511
- };
512
- holidays: {
513
- type: PropType<Date[]>;
514
- default: () => never[];
515
- };
516
- type: {
517
- type: StringConstructor;
518
- default: string;
519
- };
520
- isDateDisabled: {
521
- type: PropType<(current: number, ...arg: any[]) => boolean>;
522
- };
523
- }>> & {
524
- "onUpdate:formatted-value"?: ((...args: any[]) => any) | undefined;
525
- }>>;
526
- emit: (event: "update:formatted-value", ...args: any[]) => void;
527
- datePickerRef: import("vue").Ref<import("../../../../../shared/types").AnyObject | null>;
528
- panelInstRef: import("vue").Ref<null>;
529
- placeholderRef: import("vue").Ref<any>;
530
- oldValue: string;
531
- currentFormattedValue: import("vue").WritableComputedRef<(string | [string, string]) | null | undefined>;
532
- isDateTime: import("vue").ComputedRef<boolean>;
533
- formatRef: import("vue").ComputedRef<string>;
534
- panelFormatRef: import("vue").ComputedRef<string | [string, string]>;
535
- _isDateDisabled: import("vue").ComputedRef<(current: number, ...arg: any[]) => boolean>;
536
- focus: () => any;
537
- blur: () => any;
538
- handleConfirm: (target: HTMLInputElement) => void;
539
- onUpdateShow: (show: boolean) => Promise<void>;
540
- watchers: import("../../../../../shared/types").AnyFn[];
541
- stopWatcher: () => void;
542
- setHoliday: (show: boolean) => Promise<void>;
543
- onConfirm: (...args: any[]) => Promise<void>;
544
- isAllowedInvalidValue: (value: (string | [string, string]) | null | undefined) => boolean | "" | undefined;
545
- setShortcutValue: (type: "month" | "week") => Promise<void>;
546
- NDatePicker: any;
547
- }, 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<{
548
- updateUnchangedValue: {
549
- type: BooleanConstructor;
550
- };
551
- onConfirm: {
552
- type: FunctionConstructor;
553
- };
554
- formattedValue: {
555
- type: PropType<(string | [string, string]) | null | undefined>;
556
- };
557
- placeholder: {
558
- type: StringConstructor;
559
- };
560
- allowedInvalidValue: {
561
- type: StringConstructor;
562
- };
563
- to: {
564
- type: PropType<string | false | HTMLElement>;
565
- default: string;
566
- };
567
- holidays: {
568
- type: PropType<Date[]>;
569
- default: () => never[];
570
- };
571
- type: {
572
- type: StringConstructor;
573
- default: string;
574
- };
575
- isDateDisabled: {
576
- type: PropType<(current: number, ...arg: any[]) => boolean>;
577
- };
578
- }>> & {
579
- "onUpdate:formatted-value"?: ((...args: any[]) => any) | undefined;
580
- }, {
581
- type: string;
582
- updateUnchangedValue: boolean;
583
- to: string | false | HTMLElement;
584
- holidays: Date[];
585
- }>>;
464
+ handleChange: (val: any, type: "start" | "end") => void;
586
465
  NSelect: any;
587
466
  NInputNumber: any;
588
467
  }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("update:modelValue" | "update:presetVal")[], "update:modelValue" | "update:presetVal", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
@@ -1377,6 +1256,12 @@ declare const _default: import("vue").DefineComponent<{
1377
1256
  label: string;
1378
1257
  value: string;
1379
1258
  }[];
1259
+ widgetRangeOptions: {
1260
+ label: string;
1261
+ value: string;
1262
+ }[];
1263
+ startDateNum: import("vue").Ref<any>;
1264
+ endDateNum: import("vue").Ref<any>;
1380
1265
  props: Readonly<import("@vue/shared").LooseRequired<Readonly<import("vue").ExtractPropTypes<{
1381
1266
  filterType: {
1382
1267
  type: StringConstructor;
@@ -1409,135 +1294,7 @@ declare const _default: import("vue").DefineComponent<{
1409
1294
  emit: (event: "update:modelValue" | "update:presetVal", ...args: any[]) => void;
1410
1295
  valueCp: import("vue").WritableComputedRef<any>;
1411
1296
  presetValCp: import("vue").WritableComputedRef<string>;
1412
- CDatePicker: import("../../../../../shared/types").SFCWithInstall<import("vue").DefineComponent<{
1413
- updateUnchangedValue: {
1414
- type: BooleanConstructor;
1415
- };
1416
- onConfirm: {
1417
- type: FunctionConstructor;
1418
- };
1419
- formattedValue: {
1420
- type: PropType<(string | [string, string]) | null | undefined>;
1421
- };
1422
- placeholder: {
1423
- type: StringConstructor;
1424
- };
1425
- allowedInvalidValue: {
1426
- type: StringConstructor;
1427
- };
1428
- to: {
1429
- type: PropType<string | false | HTMLElement>;
1430
- default: string;
1431
- };
1432
- holidays: {
1433
- type: PropType<Date[]>;
1434
- default: () => never[];
1435
- };
1436
- type: {
1437
- type: StringConstructor;
1438
- default: string;
1439
- };
1440
- isDateDisabled: {
1441
- type: PropType<(current: number, ...arg: any[]) => boolean>;
1442
- };
1443
- }, {
1444
- attrs: {
1445
- [x: string]: unknown;
1446
- };
1447
- props: Readonly<import("@vue/shared").LooseRequired<Readonly<import("vue").ExtractPropTypes<{
1448
- updateUnchangedValue: {
1449
- type: BooleanConstructor;
1450
- };
1451
- onConfirm: {
1452
- type: FunctionConstructor;
1453
- };
1454
- formattedValue: {
1455
- type: PropType<(string | [string, string]) | null | undefined>;
1456
- };
1457
- placeholder: {
1458
- type: StringConstructor;
1459
- };
1460
- allowedInvalidValue: {
1461
- type: StringConstructor;
1462
- };
1463
- to: {
1464
- type: PropType<string | false | HTMLElement>;
1465
- default: string;
1466
- };
1467
- holidays: {
1468
- type: PropType<Date[]>;
1469
- default: () => never[];
1470
- };
1471
- type: {
1472
- type: StringConstructor;
1473
- default: string;
1474
- };
1475
- isDateDisabled: {
1476
- type: PropType<(current: number, ...arg: any[]) => boolean>;
1477
- };
1478
- }>> & {
1479
- "onUpdate:formatted-value"?: ((...args: any[]) => any) | undefined;
1480
- }>>;
1481
- emit: (event: "update:formatted-value", ...args: any[]) => void;
1482
- datePickerRef: import("vue").Ref<import("../../../../../shared/types").AnyObject | null>;
1483
- panelInstRef: import("vue").Ref<null>;
1484
- placeholderRef: import("vue").Ref<any>;
1485
- oldValue: string;
1486
- currentFormattedValue: import("vue").WritableComputedRef<(string | [string, string]) | null | undefined>;
1487
- isDateTime: import("vue").ComputedRef<boolean>;
1488
- formatRef: import("vue").ComputedRef<string>;
1489
- panelFormatRef: import("vue").ComputedRef<string | [string, string]>;
1490
- _isDateDisabled: import("vue").ComputedRef<(current: number, ...arg: any[]) => boolean>;
1491
- focus: () => any;
1492
- blur: () => any;
1493
- handleConfirm: (target: HTMLInputElement) => void;
1494
- onUpdateShow: (show: boolean) => Promise<void>;
1495
- watchers: import("../../../../../shared/types").AnyFn[];
1496
- stopWatcher: () => void;
1497
- setHoliday: (show: boolean) => Promise<void>;
1498
- onConfirm: (...args: any[]) => Promise<void>;
1499
- isAllowedInvalidValue: (value: (string | [string, string]) | null | undefined) => boolean | "" | undefined;
1500
- setShortcutValue: (type: "month" | "week") => Promise<void>;
1501
- NDatePicker: any;
1502
- }, 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<{
1503
- updateUnchangedValue: {
1504
- type: BooleanConstructor;
1505
- };
1506
- onConfirm: {
1507
- type: FunctionConstructor;
1508
- };
1509
- formattedValue: {
1510
- type: PropType<(string | [string, string]) | null | undefined>;
1511
- };
1512
- placeholder: {
1513
- type: StringConstructor;
1514
- };
1515
- allowedInvalidValue: {
1516
- type: StringConstructor;
1517
- };
1518
- to: {
1519
- type: PropType<string | false | HTMLElement>;
1520
- default: string;
1521
- };
1522
- holidays: {
1523
- type: PropType<Date[]>;
1524
- default: () => never[];
1525
- };
1526
- type: {
1527
- type: StringConstructor;
1528
- default: string;
1529
- };
1530
- isDateDisabled: {
1531
- type: PropType<(current: number, ...arg: any[]) => boolean>;
1532
- };
1533
- }>> & {
1534
- "onUpdate:formatted-value"?: ((...args: any[]) => any) | undefined;
1535
- }, {
1536
- type: string;
1537
- updateUnchangedValue: boolean;
1538
- to: string | false | HTMLElement;
1539
- holidays: Date[];
1540
- }>>;
1297
+ handleChange: (val: any, type: "start" | "end") => void;
1541
1298
  NSelect: any;
1542
1299
  NInputNumber: any;
1543
1300
  }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("update:modelValue" | "update:presetVal")[], "update:modelValue" | "update:presetVal", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
@@ -1799,6 +1556,7 @@ declare const _default: import("vue").DefineComponent<{
1799
1556
  ConditionEnums: {
1800
1557
  NULL: string;
1801
1558
  EQUAL: string;
1559
+ CUSTOM_RANGE: string;
1802
1560
  IN_THE_PAST: string;
1803
1561
  IN_THE_FUTURE: string;
1804
1562
  IN_THE_PAST_DI: string;
@@ -94,6 +94,7 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
94
94
  class: "classify-fieldkey-popover"
95
95
  };
96
96
  const specialDateRange = [ConditionEnums.IN_THE_PAST, ConditionEnums.IN_THE_FUTURE, ConditionEnums.IN_THE_PAST_DI, ConditionEnums.IN_THE_FUTURE_DI];
97
+ const specialCustomDateRange = [ConditionEnums.CUSTOM_RANGE];
97
98
  const $attrs = useAttrs();
98
99
  const FormState = reactive({
99
100
  className: "",
@@ -209,7 +210,8 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
209
210
  presetVal,
210
211
  customDate
211
212
  }) => {
212
- return !key || !condition || condition === ConditionEnums.EQUAL && !value && !presetVal && !customDate || specialDateRange.includes(condition) && (!value || !presetVal);
213
+ var _a;
214
+ return !key || !condition || condition === ConditionEnums.EQUAL && !value && !presetVal && !customDate || specialDateRange.includes(condition) && (!value || !presetVal) || specialCustomDateRange.includes(condition) && (!value || ((_a = (value != null ? value : "").split("~")) == null ? void 0 : _a.length) < 2 || !presetVal);
213
215
  });
214
216
  if (isEmpty) {
215
217
  $message.warning(function() {
@@ -144,9 +144,24 @@ const formatDateRangeInfo = (key, format = "x", optionSetting = WidgetOptionEnum
144
144
  };
145
145
  const formatSpecialDateRange = (conObj, format = "x") => {
146
146
  if (Array.isArray(conObj.value) && conObj.con && conObj.unit) {
147
- const num = Number(conObj.value);
147
+ let num = 0;
148
+ let startNum = 0;
149
+ let endNum = 0;
150
+ const getStartAndEndValue = (result) => {
151
+ const [start, end] = result.split("~");
152
+ if (start.trim())
153
+ startNum = Number(start.trim());
154
+ if (end.trim())
155
+ endNum = Number(end.trim());
156
+ };
157
+ ConditionEnums.CUSTOM_RANGE === conObj.con ? getStartAndEndValue(conObj.value[0]) : num = Number(conObj.value);
148
158
  const unit = conObj.unit.toLowerCase();
149
159
  switch (conObj.con) {
160
+ case ConditionEnums.CUSTOM_RANGE: {
161
+ const startResult = startNum < 0 ? moment().subtract(Math.abs(startNum), unit).startOf("day").format(format) : moment().add(startNum, unit).startOf("day").format(format);
162
+ const endResult = endNum < 0 ? moment().subtract(Math.abs(endNum), unit).endOf("day").format(format) : moment().add(endNum, unit).endOf("day").format(format);
163
+ return `${startResult} ~ ${endResult}`;
164
+ }
150
165
  case ConditionEnums.IN_THE_PAST: {
151
166
  return `${moment().subtract(num, unit).startOf("day").format(format)} ~ ${moment().format(format)}`;
152
167
  }
@@ -13,7 +13,7 @@ const advanceOptionSettingMap = {
13
13
  [WidgetOptionEnums.PAST_TIME]: "2",
14
14
  [WidgetOptionEnums.FUTURE_TIME]: "3"
15
15
  };
16
- const specialDateRange = [ConditionEnums.IN_THE_PAST, ConditionEnums.IN_THE_FUTURE, ConditionEnums.IN_THE_PAST_DI, ConditionEnums.IN_THE_FUTURE_DI];
16
+ const specialDateRange = [ConditionEnums.CUSTOM_RANGE, ConditionEnums.IN_THE_PAST, ConditionEnums.IN_THE_FUTURE, ConditionEnums.IN_THE_PAST_DI, ConditionEnums.IN_THE_FUTURE_DI];
17
17
  const limitValue = 10;
18
18
  function useAdvanced() {
19
19
  function transformDataToFieldCfg(advancedFilterCfg) {
@@ -81,6 +81,7 @@ export declare const WidgetValEnums: {
81
81
  export declare const ConditionEnums: {
82
82
  NULL: string;
83
83
  EQUAL: string;
84
+ CUSTOM_RANGE: string;
84
85
  IN_THE_PAST: string;
85
86
  IN_THE_FUTURE: string;
86
87
  IN_THE_PAST_DI: string;
@@ -81,6 +81,7 @@ const WidgetValEnums = {
81
81
  const ConditionEnums = {
82
82
  NULL: "NULL",
83
83
  EQUAL: "EQ",
84
+ CUSTOM_RANGE: "CUSTOM_RANGE",
84
85
  IN_THE_PAST: "IN_THE_PAST",
85
86
  IN_THE_FUTURE: "IN_THE_FUTURE",
86
87
  IN_THE_PAST_DI: "IN_THE_PAST_DI",
@@ -4,27 +4,59 @@ declare const TimePicker: SFCWithInstall<import("vue").DefineComponent<{
4
4
  type: import("vue").PropType<string | false | HTMLElement>;
5
5
  default: string;
6
6
  };
7
+ shortcuts: {
8
+ type: import("vue").PropType<string[]>;
9
+ default: () => never[];
10
+ };
7
11
  }, {
8
12
  attrs: {
9
13
  [x: string]: unknown;
10
14
  };
15
+ emit: (event: "update:formatted-value" | "update:show", ...args: any[]) => void;
11
16
  props: Readonly<import("@vue/shared").LooseRequired<Readonly<import("vue").ExtractPropTypes<{
12
17
  to: {
13
18
  type: import("vue").PropType<string | false | HTMLElement>;
14
19
  default: string;
15
20
  };
16
- }>> & {}>>;
17
- timePickerRef: import("vue").Ref<import("../../shared/types").AnyObject | null>;
21
+ shortcuts: {
22
+ type: import("vue").PropType<string[]>;
23
+ default: () => never[];
24
+ };
25
+ }>> & {
26
+ "onUpdate:formatted-value"?: ((...args: any[]) => any) | undefined;
27
+ "onUpdate:show"?: ((...args: any[]) => any) | undefined;
28
+ }>>;
29
+ timePickerRef: import("vue").Ref<import("../../shared/types").AnyObject | null | undefined>;
30
+ isTimePickerOpen: import("vue").Ref<boolean>;
31
+ panelContainer: import("vue").Ref<HTMLElement | null | undefined>;
32
+ timePickerAttrs: import("vue").ComputedRef<{
33
+ [x: string]: unknown;
34
+ }>;
18
35
  formatRef: import("vue").ComputedRef<string>;
36
+ handleFormattedTimeUpdate: (value: string) => void;
37
+ handleShortcutClick: (shortcut: string) => void;
38
+ isDisabled: (value: string) => any;
39
+ onUpdateShow: (show: boolean) => void;
19
40
  focus: () => any;
20
41
  blur: () => any;
21
42
  NTimePicker: any;
22
- }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
43
+ NScrollbar: any;
44
+ NButton: any;
45
+ NSpace: any;
46
+ }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("update:formatted-value" | "update:show")[], "update:formatted-value" | "update:show", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
23
47
  to: {
24
48
  type: import("vue").PropType<string | false | HTMLElement>;
25
49
  default: string;
26
50
  };
27
- }>>, {
51
+ shortcuts: {
52
+ type: import("vue").PropType<string[]>;
53
+ default: () => never[];
54
+ };
55
+ }>> & {
56
+ "onUpdate:formatted-value"?: ((...args: any[]) => any) | undefined;
57
+ "onUpdate:show"?: ((...args: any[]) => any) | undefined;
58
+ }, {
59
+ shortcuts: string[];
28
60
  to: string | false | HTMLElement;
29
61
  }>>;
30
62
  export default TimePicker;
@@ -5,27 +5,59 @@ declare const _default: import("vue").DefineComponent<{
5
5
  type: PropType<string | false | HTMLElement>;
6
6
  default: string;
7
7
  };
8
+ shortcuts: {
9
+ type: PropType<string[]>;
10
+ default: () => never[];
11
+ };
8
12
  }, {
9
13
  attrs: {
10
14
  [x: string]: unknown;
11
15
  };
16
+ emit: (event: "update:formatted-value" | "update:show", ...args: any[]) => void;
12
17
  props: Readonly<import("@vue/shared").LooseRequired<Readonly<import("vue").ExtractPropTypes<{
13
18
  to: {
14
19
  type: PropType<string | false | HTMLElement>;
15
20
  default: string;
16
21
  };
17
- }>> & {}>>;
18
- timePickerRef: import("vue").Ref<AnyObject | null>;
22
+ shortcuts: {
23
+ type: PropType<string[]>;
24
+ default: () => never[];
25
+ };
26
+ }>> & {
27
+ "onUpdate:formatted-value"?: ((...args: any[]) => any) | undefined;
28
+ "onUpdate:show"?: ((...args: any[]) => any) | undefined;
29
+ }>>;
30
+ timePickerRef: import("vue").Ref<AnyObject | null | undefined>;
31
+ isTimePickerOpen: import("vue").Ref<boolean>;
32
+ panelContainer: import("vue").Ref<HTMLElement | null | undefined>;
33
+ timePickerAttrs: import("vue").ComputedRef<{
34
+ [x: string]: unknown;
35
+ }>;
19
36
  formatRef: import("vue").ComputedRef<string>;
37
+ handleFormattedTimeUpdate: (value: string) => void;
38
+ handleShortcutClick: (shortcut: string) => void;
39
+ isDisabled: (value: string) => any;
40
+ onUpdateShow: (show: boolean) => void;
20
41
  focus: () => any;
21
42
  blur: () => any;
22
43
  NTimePicker: any;
23
- }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
44
+ NScrollbar: any;
45
+ NButton: any;
46
+ NSpace: any;
47
+ }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("update:formatted-value" | "update:show")[], "update:formatted-value" | "update:show", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
24
48
  to: {
25
49
  type: PropType<string | false | HTMLElement>;
26
50
  default: string;
27
51
  };
28
- }>>, {
52
+ shortcuts: {
53
+ type: PropType<string[]>;
54
+ default: () => never[];
55
+ };
56
+ }>> & {
57
+ "onUpdate:formatted-value"?: ((...args: any[]) => any) | undefined;
58
+ "onUpdate:show"?: ((...args: any[]) => any) | undefined;
59
+ }, {
60
+ shortcuts: string[];
29
61
  to: string | false | HTMLElement;
30
62
  }>;
31
63
  export default _default;