cnhis-design-vue 3.2.9-beta.9 → 3.2.9-release.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (111) hide show
  1. package/es/components/ai-chat/src/components/ChatMain.js +1 -1
  2. package/es/components/base-search/index.d.ts +2 -0
  3. package/es/components/base-search/src/index.vue.d.ts +2 -0
  4. package/es/components/button-print/index.d.ts +30 -0
  5. package/es/components/button-print/src/ButtonPrint.vue.d.ts +30 -0
  6. package/es/components/button-print/src/ButtonPrint.vue2.js +1 -1
  7. package/es/components/button-print/src/components/NewPrintComponent.vue.d.ts +9 -0
  8. package/es/components/button-print/src/components/NewPrintComponent.vue2.js +1 -1
  9. package/es/components/button-print/src/components/OldPrintComponent.vue.d.ts +9 -0
  10. package/es/components/button-print/src/components/OldPrintComponent.vue2.js +1 -1
  11. package/es/components/button-print/src/utils/print.d.ts +6 -5
  12. package/es/components/button-print/src/utils/print.js +1 -1
  13. package/es/components/classification/index.d.ts +87 -0
  14. package/es/components/classification/src/components/search-filter/index.vue.d.ts +87 -0
  15. package/es/components/classification/src/components/set-classification/index.vue.d.ts +87 -0
  16. package/es/components/classification/src/components/table-modal/index.vue.d.ts +3 -0
  17. package/es/components/classification/src/index.vue.d.ts +87 -0
  18. package/es/components/date-picker/index.d.ts +29 -0
  19. package/es/components/date-picker/src/DatePicker.vue.d.ts +30 -1
  20. package/es/components/date-picker/src/DatePicker.vue2.js +1 -1
  21. package/es/components/fabric-chart/src/hooks/temperature/useLeft.js +1 -1
  22. package/es/components/fabric-chart/src/hooks/temperature/useOther.js +1 -1
  23. package/es/components/field-set/index.d.ts +8 -1
  24. package/es/components/field-set/src/FieldColor.vue.d.ts +90 -7
  25. package/es/components/field-set/src/FieldColor.vue2.js +1 -1
  26. package/es/components/field-set/src/FieldFilter.vue.d.ts +32 -7
  27. package/es/components/field-set/src/FieldFilter.vue2.js +1 -1
  28. package/es/components/field-set/src/FieldSet.vue.d.ts +74 -31
  29. package/es/components/field-set/src/FieldSet.vue2.js +1 -1
  30. package/es/components/field-set/src/Index.vue.d.ts +8 -1
  31. package/es/components/field-set/src/Index.vue2.js +1 -1
  32. package/es/components/field-set/src/TableStyle.vue2.js +1 -1
  33. package/es/components/field-set/src/components/condition.vue.d.ts +29 -0
  34. package/es/components/field-set/src/components/edit-dialog.vue.d.ts +58 -0
  35. package/es/components/field-set/src/components/edit-filter.vue.d.ts +29 -0
  36. package/es/components/field-set/src/components/table-row.vue.d.ts +29 -2
  37. package/es/components/field-set/src/components/table-row.vue2.js +1 -1
  38. package/es/components/field-set/src/types/index.d.ts +4 -3
  39. package/es/components/field-set/src/utils/index.js +1 -1
  40. package/es/components/field-set/style/index.css +1 -1
  41. package/es/components/form-render/src/components/renderer/select.d.ts +2 -1
  42. package/es/components/form-render/src/components/renderer/select.js +1 -1
  43. package/es/components/form-render/src/hooks/useFieldListAdaptor.js +1 -1
  44. package/es/components/iho-chat/index.d.ts +316 -6
  45. package/es/components/iho-chat/src/Index.vue.d.ts +316 -6
  46. package/es/components/iho-chat/src/Index.vue2.js +1 -1
  47. package/es/components/iho-chat/src/api/index.js +1 -1
  48. package/es/components/iho-chat/src/components/ChatAdd.vue.d.ts +5 -0
  49. package/es/components/iho-chat/src/components/ChatAdd.vue2.js +1 -1
  50. package/es/components/iho-chat/src/components/ChatFile.vue.d.ts +121 -1
  51. package/es/components/iho-chat/src/components/ChatFile.vue2.js +1 -1
  52. package/es/components/iho-chat/src/components/ChatFooter.vue.d.ts +6 -0
  53. package/es/components/iho-chat/src/components/ChatFooter.vue2.js +1 -1
  54. package/es/components/iho-chat/src/components/ChatHeader.vue.d.ts +160 -2
  55. package/es/components/iho-chat/src/components/ChatMain.vue.d.ts +122 -0
  56. package/es/components/iho-chat/src/components/ChatMain.vue2.js +1 -1
  57. package/es/components/iho-chat/src/components/ChatRecord.vue.d.ts +29 -0
  58. package/es/components/iho-chat/src/components/ChatRecord.vue2.js +1 -1
  59. package/es/components/iho-chat/src/components/ChatSet.vue.d.ts +6 -1
  60. package/es/components/iho-chat/src/components/ChatSet.vue2.js +1 -1
  61. package/es/components/iho-chat/src/components/ContextMenu.js +1 -1
  62. package/es/components/iho-chat/src/components/MultipleVideo.vue.d.ts +5 -0
  63. package/es/components/iho-chat/src/components/PersonProfile.vue2.js +1 -1
  64. package/es/components/iho-chat/src/components/SiderList.vue.d.ts +1 -3
  65. package/es/components/iho-chat/src/components/SiderList.vue2.js +1 -1
  66. package/es/components/iho-chat/src/constants/index.d.ts +2 -1
  67. package/es/components/iho-chat/src/constants/index.js +1 -1
  68. package/es/components/iho-chat/src/hooks/useSearchUserList.js +1 -1
  69. package/es/components/iho-chat/src/hooks/useSession.js +1 -1
  70. package/es/components/iho-chat/src/hooks/useState.d.ts +6 -0
  71. package/es/components/iho-chat/src/hooks/useState.js +1 -1
  72. package/es/components/iho-chat/src/types/index.d.ts +3 -1
  73. package/es/components/iho-chat/src/types/index.js +1 -1
  74. package/es/components/iho-chat/src/utils/chatSock.js +1 -1
  75. package/es/components/iho-chat/style/index.css +1 -1
  76. package/es/components/iho-table/src/plugins/filterDaterangeRenderPlugin/filter.vue.d.ts +29 -0
  77. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/dateRendererPlugin/editDate.vue.d.ts +29 -0
  78. package/es/components/iho-table/src/plugins/verticalTablePlugin/src/hooks/index.js +1 -1
  79. package/es/components/iho-table/src/plugins/verticalTablePlugin/src/hooks/useRowHeight.d.ts +2 -0
  80. package/es/components/iho-table/src/plugins/verticalTablePlugin/src/hooks/useRowHeight.js +1 -0
  81. package/es/components/iho-table/src/types/index.d.ts +3 -0
  82. package/es/components/iho-table/style/index.css +1 -1
  83. package/es/components/index.css +1 -1
  84. package/es/components/quick-search/index.d.ts +3 -0
  85. package/es/components/quick-search/src/index.vue.d.ts +3 -0
  86. package/es/components/scale-view/src/ScaleView.vue2.js +1 -1
  87. package/es/components/table-filter/src/components/bi-filter/ValueCfg.vue.d.ts +29 -0
  88. package/es/components/table-filter/src/components/bi-filter/components/Date.vue.d.ts +29 -0
  89. package/es/components/table-filter/src/components/bi-filter/components/index.d.ts +29 -0
  90. package/es/components/table-filter/src/components/bi-filter/index.vue.d.ts +29 -0
  91. package/es/components/table-filter/src/components/classify-filter/ValueCfg.vue.d.ts +58 -0
  92. package/es/components/table-filter/src/components/classify-filter/components/Date.vue.d.ts +29 -0
  93. package/es/components/table-filter/src/components/classify-filter/components/DateRange.vue.d.ts +29 -0
  94. package/es/components/table-filter/src/components/classify-filter/components/index.d.ts +58 -0
  95. package/es/components/table-filter/src/components/classify-filter/index.vue.d.ts +58 -0
  96. package/es/components/table-filter/src/components/render-widget/components/DateInner.vue.d.ts +29 -0
  97. package/es/components/table-filter/src/components/render-widget/components/DateOut.vue.d.ts +29 -0
  98. package/es/components/table-filter/src/components/render-widget/components/DateRangeInner.vue.d.ts +29 -0
  99. package/es/components/table-filter/src/components/render-widget/components/DateRangeOut.vue.d.ts +29 -0
  100. package/es/components/table-filter/src/components/render-widget/components/index.d.ts +116 -0
  101. package/es/components/table-filter/src/components/render-widget/widgetCfgMaps.d.ts +116 -0
  102. package/es/components/table-filter/src/hooks/useAdvanced.d.ts +1 -0
  103. package/es/components/table-filter/src/hooks/useAdvanced.js +1 -1
  104. package/es/components/table-filter/src/hooks/useRenderWidget.js +1 -1
  105. package/es/components/table-filter/src/types/index.d.ts +2 -0
  106. package/es/components/vod-chunk-upload/src/chunk-upload-new.vue2.js +1 -1
  107. package/es/env.d.ts +25 -25
  108. package/es/shared/package.json.js +1 -1
  109. package/es/shared/utils/index.d.ts +1 -0
  110. package/es/shared/utils/index.js +1 -1
  111. package/package.json +76 -76
@@ -835,6 +835,14 @@ declare const _default: import("vue").DefineComponent<{
835
835
  type: PropType<string | false | HTMLElement>;
836
836
  default: string;
837
837
  };
838
+ holidays: {
839
+ type: PropType<Date[]>;
840
+ default: () => never[];
841
+ };
842
+ type: {
843
+ type: StringConstructor;
844
+ default: string;
845
+ };
838
846
  }, {
839
847
  attrs: {
840
848
  [x: string]: unknown;
@@ -859,6 +867,14 @@ declare const _default: import("vue").DefineComponent<{
859
867
  type: PropType<string | false | HTMLElement>;
860
868
  default: string;
861
869
  };
870
+ holidays: {
871
+ type: PropType<Date[]>;
872
+ default: () => never[];
873
+ };
874
+ type: {
875
+ type: StringConstructor;
876
+ default: string;
877
+ };
862
878
  }>> & {
863
879
  "onUpdate:formatted-value"?: ((...args: any[]) => any) | undefined;
864
880
  }>>;
@@ -875,6 +891,9 @@ declare const _default: import("vue").DefineComponent<{
875
891
  blur: () => any;
876
892
  handleConfirm: (target: HTMLInputElement) => void;
877
893
  onUpdateShow: (show: boolean) => Promise<void>;
894
+ watchers: import("../../../shared/types").AnyFn[];
895
+ stopWatcher: () => void;
896
+ setHoliday: (show: boolean) => Promise<void>;
878
897
  onConfirm: (...args: any[]) => Promise<void>;
879
898
  isAllowedInvalidValue: (value: (string | [string, string]) | null | undefined) => boolean | "" | undefined;
880
899
  setShortcutValue: (type: "month" | "week") => Promise<void>;
@@ -899,11 +918,21 @@ declare const _default: import("vue").DefineComponent<{
899
918
  type: PropType<string | false | HTMLElement>;
900
919
  default: string;
901
920
  };
921
+ holidays: {
922
+ type: PropType<Date[]>;
923
+ default: () => never[];
924
+ };
925
+ type: {
926
+ type: StringConstructor;
927
+ default: string;
928
+ };
902
929
  }>> & {
903
930
  "onUpdate:formatted-value"?: ((...args: any[]) => any) | undefined;
904
931
  }, {
932
+ type: string;
905
933
  updateUnchangedValue: boolean;
906
934
  to: string | false | HTMLElement;
935
+ holidays: Date[];
907
936
  }>>;
908
937
  NSelect: any;
909
938
  WidgetValEnums: {
@@ -1497,6 +1526,14 @@ declare const _default: import("vue").DefineComponent<{
1497
1526
  type: PropType<string | false | HTMLElement>;
1498
1527
  default: string;
1499
1528
  };
1529
+ holidays: {
1530
+ type: PropType<Date[]>;
1531
+ default: () => never[];
1532
+ };
1533
+ type: {
1534
+ type: StringConstructor;
1535
+ default: string;
1536
+ };
1500
1537
  }, {
1501
1538
  attrs: {
1502
1539
  [x: string]: unknown;
@@ -1521,6 +1558,14 @@ declare const _default: import("vue").DefineComponent<{
1521
1558
  type: PropType<string | false | HTMLElement>;
1522
1559
  default: string;
1523
1560
  };
1561
+ holidays: {
1562
+ type: PropType<Date[]>;
1563
+ default: () => never[];
1564
+ };
1565
+ type: {
1566
+ type: StringConstructor;
1567
+ default: string;
1568
+ };
1524
1569
  }>> & {
1525
1570
  "onUpdate:formatted-value"?: ((...args: any[]) => any) | undefined;
1526
1571
  }>>;
@@ -1537,6 +1582,9 @@ declare const _default: import("vue").DefineComponent<{
1537
1582
  blur: () => any;
1538
1583
  handleConfirm: (target: HTMLInputElement) => void;
1539
1584
  onUpdateShow: (show: boolean) => Promise<void>;
1585
+ watchers: import("../../../shared/types").AnyFn[];
1586
+ stopWatcher: () => void;
1587
+ setHoliday: (show: boolean) => Promise<void>;
1540
1588
  onConfirm: (...args: any[]) => Promise<void>;
1541
1589
  isAllowedInvalidValue: (value: (string | [string, string]) | null | undefined) => boolean | "" | undefined;
1542
1590
  setShortcutValue: (type: "month" | "week") => Promise<void>;
@@ -1561,11 +1609,21 @@ declare const _default: import("vue").DefineComponent<{
1561
1609
  type: PropType<string | false | HTMLElement>;
1562
1610
  default: string;
1563
1611
  };
1612
+ holidays: {
1613
+ type: PropType<Date[]>;
1614
+ default: () => never[];
1615
+ };
1616
+ type: {
1617
+ type: StringConstructor;
1618
+ default: string;
1619
+ };
1564
1620
  }>> & {
1565
1621
  "onUpdate:formatted-value"?: ((...args: any[]) => any) | undefined;
1566
1622
  }, {
1623
+ type: string;
1567
1624
  updateUnchangedValue: boolean;
1568
1625
  to: string | false | HTMLElement;
1626
+ holidays: Date[];
1569
1627
  }>>;
1570
1628
  WidgetValEnums: {
1571
1629
  CUSTOM: string;
@@ -1960,6 +2018,14 @@ declare const _default: import("vue").DefineComponent<{
1960
2018
  type: PropType<string | false | HTMLElement>;
1961
2019
  default: string;
1962
2020
  };
2021
+ holidays: {
2022
+ type: PropType<Date[]>;
2023
+ default: () => never[];
2024
+ };
2025
+ type: {
2026
+ type: StringConstructor;
2027
+ default: string;
2028
+ };
1963
2029
  }, {
1964
2030
  attrs: {
1965
2031
  [x: string]: unknown;
@@ -1984,6 +2050,14 @@ declare const _default: import("vue").DefineComponent<{
1984
2050
  type: PropType<string | false | HTMLElement>;
1985
2051
  default: string;
1986
2052
  };
2053
+ holidays: {
2054
+ type: PropType<Date[]>;
2055
+ default: () => never[];
2056
+ };
2057
+ type: {
2058
+ type: StringConstructor;
2059
+ default: string;
2060
+ };
1987
2061
  }>> & {
1988
2062
  "onUpdate:formatted-value"?: ((...args: any[]) => any) | undefined;
1989
2063
  }>>;
@@ -2000,6 +2074,9 @@ declare const _default: import("vue").DefineComponent<{
2000
2074
  blur: () => any;
2001
2075
  handleConfirm: (target: HTMLInputElement) => void;
2002
2076
  onUpdateShow: (show: boolean) => Promise<void>;
2077
+ watchers: import("../../../shared/types").AnyFn[];
2078
+ stopWatcher: () => void;
2079
+ setHoliday: (show: boolean) => Promise<void>;
2003
2080
  onConfirm: (...args: any[]) => Promise<void>;
2004
2081
  isAllowedInvalidValue: (value: (string | [string, string]) | null | undefined) => boolean | "" | undefined;
2005
2082
  setShortcutValue: (type: "month" | "week") => Promise<void>;
@@ -2024,11 +2101,21 @@ declare const _default: import("vue").DefineComponent<{
2024
2101
  type: PropType<string | false | HTMLElement>;
2025
2102
  default: string;
2026
2103
  };
2104
+ holidays: {
2105
+ type: PropType<Date[]>;
2106
+ default: () => never[];
2107
+ };
2108
+ type: {
2109
+ type: StringConstructor;
2110
+ default: string;
2111
+ };
2027
2112
  }>> & {
2028
2113
  "onUpdate:formatted-value"?: ((...args: any[]) => any) | undefined;
2029
2114
  }, {
2115
+ type: string;
2030
2116
  updateUnchangedValue: boolean;
2031
2117
  to: string | false | HTMLElement;
2118
+ holidays: Date[];
2032
2119
  }>>;
2033
2120
  }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "update:modelValue"[], "update:modelValue", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
2034
2121
  componentCfg: {
@@ -19,6 +19,14 @@ declare const DatePicker: SFCWithInstall<import("vue").DefineComponent<{
19
19
  type: import("vue").PropType<string | false | HTMLElement>;
20
20
  default: string;
21
21
  };
22
+ holidays: {
23
+ type: import("vue").PropType<Date[]>;
24
+ default: () => never[];
25
+ };
26
+ type: {
27
+ type: StringConstructor;
28
+ default: string;
29
+ };
22
30
  }, {
23
31
  attrs: {
24
32
  [x: string]: unknown;
@@ -43,6 +51,14 @@ declare const DatePicker: SFCWithInstall<import("vue").DefineComponent<{
43
51
  type: import("vue").PropType<string | false | HTMLElement>;
44
52
  default: string;
45
53
  };
54
+ holidays: {
55
+ type: import("vue").PropType<Date[]>;
56
+ default: () => never[];
57
+ };
58
+ type: {
59
+ type: StringConstructor;
60
+ default: string;
61
+ };
46
62
  }>> & {
47
63
  "onUpdate:formatted-value"?: ((...args: any[]) => any) | undefined;
48
64
  }>>;
@@ -59,6 +75,9 @@ declare const DatePicker: SFCWithInstall<import("vue").DefineComponent<{
59
75
  blur: () => any;
60
76
  handleConfirm: (target: HTMLInputElement) => void;
61
77
  onUpdateShow: (show: boolean) => Promise<void>;
78
+ watchers: import("../../shared/types").AnyFn[];
79
+ stopWatcher: () => void;
80
+ setHoliday: (show: boolean) => Promise<void>;
62
81
  onConfirm: (...args: any[]) => Promise<void>;
63
82
  isAllowedInvalidValue: (value: (string | [string, string]) | null | undefined) => boolean | "" | undefined;
64
83
  setShortcutValue: (type: "month" | "week") => Promise<void>;
@@ -83,10 +102,20 @@ declare const DatePicker: SFCWithInstall<import("vue").DefineComponent<{
83
102
  type: import("vue").PropType<string | false | HTMLElement>;
84
103
  default: string;
85
104
  };
105
+ holidays: {
106
+ type: import("vue").PropType<Date[]>;
107
+ default: () => never[];
108
+ };
109
+ type: {
110
+ type: StringConstructor;
111
+ default: string;
112
+ };
86
113
  }>> & {
87
114
  "onUpdate:formatted-value"?: ((...args: any[]) => any) | undefined;
88
115
  }, {
116
+ type: string;
89
117
  updateUnchangedValue: boolean;
90
118
  to: string | false | HTMLElement;
119
+ holidays: Date[];
91
120
  }>>;
92
121
  export default DatePicker;
@@ -1,5 +1,5 @@
1
1
  import { PropType } from 'vue';
2
- import { AnyObject } from '../../../shared/types';
2
+ import { AnyFn, AnyObject } from '../../../shared/types';
3
3
  type FormattedValue = string | [string, string];
4
4
  declare const _default: import("vue").DefineComponent<{
5
5
  updateUnchangedValue: {
@@ -21,6 +21,14 @@ declare const _default: import("vue").DefineComponent<{
21
21
  type: PropType<string | false | HTMLElement>;
22
22
  default: string;
23
23
  };
24
+ holidays: {
25
+ type: PropType<Date[]>;
26
+ default: () => never[];
27
+ };
28
+ type: {
29
+ type: StringConstructor;
30
+ default: string;
31
+ };
24
32
  }, {
25
33
  attrs: {
26
34
  [x: string]: unknown;
@@ -45,6 +53,14 @@ declare const _default: import("vue").DefineComponent<{
45
53
  type: PropType<string | false | HTMLElement>;
46
54
  default: string;
47
55
  };
56
+ holidays: {
57
+ type: PropType<Date[]>;
58
+ default: () => never[];
59
+ };
60
+ type: {
61
+ type: StringConstructor;
62
+ default: string;
63
+ };
48
64
  }>> & {
49
65
  "onUpdate:formatted-value"?: ((...args: any[]) => any) | undefined;
50
66
  }>>;
@@ -61,6 +77,9 @@ declare const _default: import("vue").DefineComponent<{
61
77
  blur: () => any;
62
78
  handleConfirm: (target: HTMLInputElement) => void;
63
79
  onUpdateShow: (show: boolean) => Promise<void>;
80
+ watchers: AnyFn[];
81
+ stopWatcher: () => void;
82
+ setHoliday: (show: boolean) => Promise<void>;
64
83
  onConfirm: (...args: any[]) => Promise<void>;
65
84
  isAllowedInvalidValue: (value: FormattedValue | null | undefined) => boolean | "" | undefined;
66
85
  setShortcutValue: (type: 'week' | 'month') => Promise<void>;
@@ -85,10 +104,20 @@ declare const _default: import("vue").DefineComponent<{
85
104
  type: PropType<string | false | HTMLElement>;
86
105
  default: string;
87
106
  };
107
+ holidays: {
108
+ type: PropType<Date[]>;
109
+ default: () => never[];
110
+ };
111
+ type: {
112
+ type: StringConstructor;
113
+ default: string;
114
+ };
88
115
  }>> & {
89
116
  "onUpdate:formatted-value"?: ((...args: any[]) => any) | undefined;
90
117
  }, {
118
+ type: string;
91
119
  updateUnchangedValue: boolean;
92
120
  to: string | false | HTMLElement;
121
+ holidays: Date[];
93
122
  }>;
94
123
  export default _default;
@@ -1 +1 @@
1
- import{defineComponent as e,useAttrs as t,ref as a,computed as l,watch as o,openBlock as n,createBlock as u,unref as r,isRef as i,createSlots as s,renderList as d,withCtx as c,renderSlot as f,nextTick as m}from"vue";import{NDatePicker as p}from"naive-ui";import"../../../shared/utils/index.js";import{useDateTime as v,handleInputEvent as y}from"../../../shared/hooks/useDateTime.js";import{isArray as h,isEqual as g,isString as w}from"lodash-es";import"@vue/shared";import"@vueuse/shared";import"../../../shared/hooks/selectHooks/useSearchContent.js";import"@vicons/ionicons5";import"../../../shared/hooks/useScrollLoading.js";import{format as V,sub as k,startOfDay as R,endOfDay as S}from"date-fns";var D=e({__name:"DatePicker",props:{updateUnchangedValue:{type:Boolean},onConfirm:{type:Function},formattedValue:{type:[String,Array]},placeholder:{type:String},allowedInvalidValue:{type:String},to:{type:[Object,String,Boolean],default:"body"}},emits:["update:formatted-value"],setup(e,{expose:D,emit:I}){const C=e,M=t(),_=a(null),b=a(null),j=a();let $="";const P=l({get:()=>O(C.formattedValue)?null:C.formattedValue,set(e){h(e)&&h($)&&g($,e)||$===e||(I("update:formatted-value",e,w(e)?Date.parse(e):h(e)?[Date.parse(e[0]),Date.parse(e[1])]:null),$=e)}}),U=l((()=>{const e=Reflect.get(M,"type")||"";return["datetime","datetimerange"].includes(e)})),x=l((()=>{if(Reflect.get(M,"format"))return M.format;const e=M.type||"";return U.value?"yyyy-MM-dd HH:mm:ss":"month"===e?"yyyy-MM":"year"===e?"yyyy":"yyyy-MM-dd"})),H=l((()=>U.value?x.value.split(" "):"")),{focus:q,blur:A,handleConfirm:B}=v(_,{formatRef:x,attrs:M,emit:I,allowedInvalidValue:C.allowedInvalidValue});async function F(e){e&&U.value&&(await m(),async function e(t=0){var a;t>2||(b.value=null==(a=_.value)?void 0:a.panelInstRef,b.value?v(b,{formatRef:H,attrs:M,isPanel:!0}):(await m(),e(++t)))}())}async function L(...e){var t,a,l,o,n,u;const r=Reflect.get(M,"type")||"",i=null==(o=null==(l=null==(a=null==(t=_.value)?void 0:t.inputInstRef)?void 0:a.$el)?void 0:l.querySelector)?void 0:o.call(l,"input");if(r.includes("range")?null==(n=C.onConfirm)||n.call(C,...e):(await m(),i.focus(),B(i),i.blur(),null==(u=C.onConfirm)||u.call(C,Date.parse(i.value),i.value)),!(null==i?void 0:i.value)||!C.updateUnchangedValue||r.includes("range"))return;const s=i.value;y(i,V(new Date,x.value)),y(i,s)}function O(e){return C.allowedInvalidValue&&C.allowedInvalidValue===e}return o((()=>C.formattedValue),(e=>{j.value=O(e)?e:C.placeholder?C.placeholder:"选择日期时间",O(e)||($=e)}),{immediate:!0}),D({$datePicker:_,focus:q,blur:A,setShortcutValue:async function(e){const t=Reflect.get(M,"type")||"";if(!t||!t.includes("range")||!_.value)return;const a=_.value.$el.querySelectorAll(".n-input__input-el");let l,o;const n=new Date;if("week"===e){const e=k(n,{weeks:1});l=V(R(e),x.value)}else{const e=k(n,{months:1});l=V(R(e),x.value)}o=V(S(n),x.value),y(a[0],l),await m(),y(a[1],o)}}),(t,a)=>(n(),u(r(p),{ref_key:"datePickerRef",ref:_,"onUpdate:show":F,onConfirm:L,placeholder:j.value,to:e.to,"formatted-value":r(P),"onUpdate:formatted-value":a[0]||(a[0]=e=>i(P)?P.value=e:null)},s({_:2},[d(t.$slots,((e,a)=>({name:a,fn:c((()=>[f(t.$slots,a)]))})))]),1032,["placeholder","to","formatted-value"]))}});export{D as default};
1
+ import{defineComponent as e,useAttrs as t,ref as a,computed as l,onBeforeUnmount as n,watch as o,openBlock as r,createBlock as u,unref as s,isRef as d,createSlots as i,renderList as c,withCtx as p,renderSlot as f,nextTick as y}from"vue";import{NDatePicker as m}from"naive-ui";import"../../../shared/utils/index.js";import{useDateTime as v,handleInputEvent as h}from"../../../shared/hooks/useDateTime.js";import{isArray as g,isEqual as w,isString as D,isNumber as k}from"lodash-es";import"@vue/shared";import"@vueuse/shared";import"../../../shared/hooks/selectHooks/useSearchContent.js";import"@vicons/ionicons5";import"../../../shared/hooks/useScrollLoading.js";import{format as V,sub as S,startOfDay as R,endOfDay as _}from"date-fns";var A=e({__name:"DatePicker",props:{updateUnchangedValue:{type:Boolean},onConfirm:{type:Function},formattedValue:{type:[String,Array]},placeholder:{type:String},allowedInvalidValue:{type:String},to:{type:[Object,String,Boolean],default:"body"},holidays:{type:Array,default:()=>[]},type:{type:String,default:"date"}},emits:["update:formatted-value"],setup(e,{expose:A,emit:I}){const M=e,C=t(),$=a(null),b=a(null),j=a();let P="";const U=l({get:()=>z(M.formattedValue)?null:M.formattedValue,set(e){g(e)&&g(P)&&w(P,e)||P===e||(I("update:formatted-value",e,D(e)?Date.parse(e):g(e)?[Date.parse(e[0]),Date.parse(e[1])]:null),P=e)}}),q=l((()=>{const e=Reflect.get(C,"type")||"";return["datetime","datetimerange"].includes(e)})),x=l((()=>{if(Reflect.get(C,"format"))return C.format;const e=C.type||"";return q.value?"yyyy-MM-dd HH:mm:ss":"month"===e?"yyyy-MM":"year"===e?"yyyy":"yyyy-MM-dd"})),E=l((()=>q.value?x.value.split(" "):"")),{focus:F,blur:H,handleConfirm:L}=v($,{formatRef:x,attrs:C,emit:I,allowedInvalidValue:M.allowedInvalidValue});async function B(e){!async function(e){var t;if(!e||!M.holidays.length)return;await y();const a=null==(t=$.value)?void 0:t.panelInstRef;if(!a)return;const l=a.$el;if(!l)return;O(),"daterange"===M.type?Y.push(n((()=>a.startDateArray),".n-date-panel-calendar--start .n-date-panel-dates>div"),n((()=>a.endDateArray),".n-date-panel-calendar--end .n-date-panel-dates>div")):"date"===M.type&&Y.push(n((()=>a.dateArray),".n-date-panel-calendar .n-date-panel-dates>div"));function n(e,t){const a=[],n=o(e,(e=>{a.forEach((e=>e.classList.remove("c-date-picker__holiday"))),a.length=0,g(e)&&Array.from(l.querySelectorAll(t)).forEach(((t,l)=>{const{ts:n}=e[l]||{};if(!k(n))return;const o=new Date(n);M.holidays.some((e=>e.getDate()===o.getDate()&&e.getMonth()===o.getMonth()&&e.getFullYear()===o.getFullYear()))&&(y((()=>t.classList.add("c-date-picker__holiday"))),a.push(t))}))}),{immediate:!0,deep:!0});return()=>{n(),a.length=0}}}(e),e&&q.value&&(await y(),async function e(t=0){var a;t>2||(b.value=null==(a=$.value)?void 0:a.panelInstRef,b.value?v(b,{formatRef:E,attrs:C,isPanel:!0}):(await y(),e(++t)))}())}const Y=[];function O(){Y.forEach((e=>e())),Y.length=0}async function T(...e){var t,a,l,n,o,r;const u=Reflect.get(C,"type")||"",s=null==(n=null==(l=null==(a=null==(t=$.value)?void 0:t.inputInstRef)?void 0:a.$el)?void 0:l.querySelector)?void 0:n.call(l,"input");if(u.includes("range")?null==(o=M.onConfirm)||o.call(M,...e):(await y(),s.focus(),L(s),s.blur(),null==(r=M.onConfirm)||r.call(M,Date.parse(s.value),s.value)),!(null==s?void 0:s.value)||!M.updateUnchangedValue||u.includes("range"))return;const d=s.value;h(s,V(new Date,x.value)),h(s,d)}function z(e){return M.allowedInvalidValue&&M.allowedInvalidValue===e}return n(O),o((()=>M.formattedValue),(e=>{j.value=z(e)?e:M.placeholder?M.placeholder:"选择日期时间",z(e)||(P=e)}),{immediate:!0}),A({$datePicker:$,focus:F,blur:H,setShortcutValue:async function(e){const t=Reflect.get(C,"type")||"";if(!t||!t.includes("range")||!$.value)return;const a=$.value.$el.querySelectorAll(".n-input__input-el");let l,n;const o=new Date;if("week"===e){const e=S(o,{weeks:1});l=V(R(e),x.value)}else{const e=S(o,{months:1});l=V(R(e),x.value)}n=V(_(o),x.value),h(a[0],l),await y(),h(a[1],n)}}),(t,a)=>(r(),u(s(m),{ref_key:"datePickerRef",ref:$,"onUpdate:show":B,onConfirm:T,placeholder:j.value,to:e.to,type:e.type,"formatted-value":s(U),"onUpdate:formatted-value":a[0]||(a[0]=e=>d(U)?U.value=e:null)},i({_:2},[c(t.$slots,((e,a)=>({name:a,fn:p((()=>[f(t.$slots,a)]))})))]),1032,["placeholder","to","type","formatted-value"]))}});export{A as default};
@@ -1 +1 @@
1
- import{fabric as e}from"../../../../../shared/utils/fabricjs/index.js";import{drawLine as t,defaultTextStyle as i,defaultStyle as n,drawTextAndIconGroup as o,drawTextGroup as l}from"../useDraw.js";import"date-fns";import{getType as s,isOneLine as r}from"../../utils/index.js";import{last as u}from"lodash-es";import"../useEvent.js";import{getScaleInfo as a,drawScaleNumber as h,drawScaleLine as c}from"../useScaleColumn.js";import{useCommon as p}from"../useCommon.js";import"vue";import"./useShadow.js";import"@vueuse/shared";import"naive-ui";import"@vueuse/core";function d(d,g,f,m,v,y,w,S,b,Y,x,j){var C,X;const{getEqualXTypes:N,handleAddPrevent:T,isGridLimit:V}=p(d,f,g),{originY:L,endY:E,originX:M,endX:G,xCellWidth:k,yCellHeight:I,left:O,vitalSignsOriginY:W,painOriginY:A,painHeight:H,iconsWidth:R,itemList:_,painIndex:B,right:J,canvasWidth:$,canvasHeight:q,getRightInfo:D,borderStyle:P,surplusCell:z,painSurplusCell:F}=g;function K(o){var s;if(!(null==o?void 0:o.length))return;const{layout:r}=o[0];let p=R,g=M;"right"===r&&(p=G,g=G+(null!=(s=null==J?void 0:J.width)?s:0));const f=[],m=H&&"right"!==r?o.length-1:o.length,v=(g-p)/m,y=v+(g-p)%m;o.forEach(((o,s)=>{if("pain"===o.type)return void function(n){const{list:o=[],spaceGridNumber:s=5,showScale:r,showNumber:u,position:c,showMaxMinNumber:p,style:g,title:f}=n,m=A.originY-F[0]*I,v=l({width:M-R,height:H+(F[0]+F[1])*I,...P},{value:`${f}`,...i,...g||{}},{left:R,top:m}),y=t([R,m,M,m],P),w=[];if(r||u){const{lineXMain:t,textLeft:i}=a(c,R,M-R),l=o.length;o.forEach(((o,a)=>{let c=A.endY-a*I*s;if(0===a&&0===F[1]&&(c=E-5),u&&(!(0===a||a===l-1)||p||0===a&&F[1]>0||a===l-1&&F[0]>0)&&w.push(h(o,n,i,c)),r&&(0!==a||F[1]>0)){const[i,n]=t,o=new e.Line([i,c,n,c],{...P,...g});w.push(o)}}))}d.value.add(y,v,...w),v.sendToBack()}(o);const g=[],m=0===s?y:v,w=0===s?p:y+p+(s-1)*v,S="right"===r?0:W.originY,b="right"===r?q:W.endY,Y=s>0?t([w,S,w,b],{objectCaching:!1,...P}):null;Y&&g.push(Y);const x=w+m/2,{list:j=[],spaceGridNumber:C=5,showScale:X,showNumber:N,position:T,showMaxMinNumber:V,detailedList:G=[],showdetailedScale:k,showRange:O=[]}=o;if(X||N){const{lineXMain:e,lineXSub:t,textLeft:i}=a(T,w,m),n=(j[1]-j[0])/2,l=k&&!G.length?j.reduce(((e,t,i)=>{const o=e[e.length-1];return 0===i?[t]:e.concat([o+n,o+2*n])}),[]):k&&(null==G?void 0:G.length)?G:j,[s=l[0],r=u(l)]=O;l.forEach(((n,u)=>{if(s&&+n<+s)return;if(r&&+n>+r)return;const a=W.endY-u*I*(k?C/2:C),p=[s,r].includes(n);if(N&&(!p||V)){const e=0==u?a-5:a,t=h(n,o,i,e),l=W.originY+t.height/2;e<l&&t.set({top:l}),g.push(t)}g.push(...c(o,u,e,t,a,I,W.originY,l.findIndex((e=>e==r))+1))}))}let _=o.title||"";o.unit&&(_+="\n"+o.unit);let J=W.originY+I;0!==B&&z[0]>1&&(J=L+I*z[0]/2),_&&g.push(new e.Text(String(_),{...i,left:x,top:J,textAlign:"center",...o.style}));const $=new e.Group(g,{...n,objectCaching:!1});f.push($)}));const w=f.length>0?new e.Group([...f],{...n,objectCaching:!1}):null;w&&d.value.add(w),w&&w.sendToBack()}R&&function(){const e=JSON.parse(JSON.stringify(_));let t=E;const i=R-O.icons.marginRight;e.reverse().forEach((e=>{t-=10;let n=e.title.replace(/(.{2})/g,"$1\n");n.endsWith("\n")&&(n=n.slice(0,n.length-1));const{text:l,icon:u}=o(n,e,{text:{left:i-(e.pointAttr.width||10)-5,top:t,originX:"right"},icon:{originX:"right",left:i,topY:t,origin:{type:s(e.bigType),_type:e.bigType},...g.event}});var a;t-=l.height||30,(a=u).on("moving",(()=>{a.set("originX","center"),function(e){if(e.left>=M&&e.left<=G){e.setCoords();const t="pain"===e.origin.type?A:W;e.top<t.originY&&e.set("top",t.originY),e.top>t.endY&&e.set("top",t.endY)}}(a),V(a)?m(a):v.show=!1})),a.on("mouseup:before",(e=>{if(v.show=!1,0===e.e.button&&V(a)){const e=N([...j],a.left,"_type").includes(a.origin._type),t=Y(a.left);if(!t||e)e&&t&&T("repeat");else{const e={data:{time:S(a.left),value:b(a.origin.type,a.top),...r(a.origin.type)?{key:a.origin.key}:{}},...a.origin};f("add",e),x(e)}}!function(e){e.setCoords().set({originX:"right",left:e.originLeft,top:e.originTop})}(a)})),d.value.add(l,u)}))}();const Q=O.yScaleValue.filter((e=>"left"===e.layout&&"pain"!==e.type&&e.show));if((null==J?void 0:J.width)&&"left"===(null==(C=null==J?void 0:J.yScaleValue)?void 0:C.layout)&&(null==(X=null==J?void 0:J.yScaleValue)?void 0:X.show)&&Q.push(D),B>0&&O.yScaleValue[B].show){const e=O.yScaleValue[B];0===B&&O.yScaleValue.length>1&&Q.unshift(e),B==O.yScaleValue.length-1&&Q.push(e)}const U=Q.findIndex((e=>"pulse"===e.type&&e.show&&e.doubleShow)),Z=Q[U];return U>-1&&Q.splice(U,0,{...Z,title:(null==Z?void 0:Z.doubleTitle)||(null==Z?void 0:Z.title)}),K(Q),{drawScaleValue:K}}export{d as useLeft};
1
+ import{fabric as e}from"../../../../../shared/utils/fabricjs/index.js";import{drawLine as t,defaultTextStyle as i,defaultStyle as n,drawTextAndIconGroup as o,drawTextGroup as l}from"../useDraw.js";import"date-fns";import{getType as s,isOneLine as r}from"../../utils/index.js";import{last as u}from"lodash-es";import"../useEvent.js";import{getScaleInfo as a,drawScaleNumber as h,drawScaleLine as c}from"../useScaleColumn.js";import{useCommon as p}from"../useCommon.js";import"vue";import"./useShadow.js";import"@vueuse/shared";import"naive-ui";import"@vueuse/core";function d(d,g,f,m,v,y,w,S,b,Y,x,j){var C,X;const{getEqualXTypes:N,handleAddPrevent:T,isGridLimit:V}=p(d,f,g),{originY:L,endY:E,originX:M,endX:G,xCellWidth:k,yCellHeight:I,left:O,vitalSignsOriginY:W,painOriginY:A,painHeight:H,iconsWidth:R,itemList:_,painIndex:B,right:J,canvasWidth:$,canvasHeight:q,getRightInfo:D,borderStyle:P,surplusCell:z,painSurplusCell:F}=g;function K(o){var s;if(!(null==o?void 0:o.length))return;const{layout:r}=o[0];let p=R,g=M;"right"===r&&(p=G,g=G+(null!=(s=null==J?void 0:J.width)?s:0));const f=[],m=H&&"right"!==r?o.length-1:o.length,v=(g-p)/m,y=v+(g-p)%m;o.forEach(((o,s)=>{if("pain"===o.type)return void function(n){const{list:o=[],spaceGridNumber:s=5,showScale:r,showNumber:u,position:c,showMaxMinNumber:p,style:g,title:f}=n,m=A.originY-F[0]*I,v=l({width:M-R,height:H+(F[0]+F[1])*I,...P},{value:`${f}`,...i,...g||{}},{left:R,top:m}),y=t([R,m,M,m],P),w=[];if(r||u){const{lineXMain:t,textLeft:i}=a(c,R,M-R),l=o.length;o.forEach(((o,a)=>{let c=A.endY-a*I*s;if(0===a&&0===F[1]&&(c=E-5),u&&(!(0===a||a===l-1)||p||0===a&&F[1]>0||a===l-1&&F[0]>0)&&w.push(h(o,n,i,c)),r&&(0!==a||F[1]>0)){const[i,n]=t,o=new e.Line([i,c,n,c],{...P,...g});w.push(o)}}))}d.value.add(y,v,...w),v.sendToBack()}(o);const g=[],m=0===s?y:v,w=0===s?p:y+p+(s-1)*v,S="right"===r?0:W.originY,b="right"===r?q:W.endY,Y=s>0?t([w,S,w,b],{objectCaching:!1,...P}):null;Y&&g.push(Y);const x=w+m/2,{list:j=[],spaceGridNumber:C=5,showScale:X,showNumber:N,position:T,showMaxMinNumber:V,detailedList:G=[],showdetailedScale:k,showRange:O=[]}=o;if(X||N){const{lineXMain:e,lineXSub:t,textLeft:i}=a(T,w,m),n=(j[1]-j[0])/2,l=k&&!G.length?j.reduce(((e,t,i)=>{const o=e[e.length-1];return 0===i?[t]:e.concat([o+n,o+2*n])}),[]):k&&(null==G?void 0:G.length)?G:j,[s=l[0],r=u(l)]=O;l.forEach(((n,u)=>{if(s&&+n<+s)return;if(r&&+n>+r)return;const a=W.endY-u*I*(k?C/2:C),p=[s,r].includes(n);if(N&&(!p||V)){const e=0==u?a-5:a,t=h(n,o,i,e),l=W.originY+t.height/2;e<l&&t.set({top:l}),g.push(t)}g.push(...c(o,u,e,t,a,I,W.originY,l.findIndex((e=>e==r))+1))}))}let _=o.title||"";o.unit&&(_+="\n"+o.unit);let J=W.originY+2;0!==B&&z[0]>0&&(J=L+2),_&&g.push(new e.Text(String(_),{...i,originY:"top",left:x,top:J,textAlign:"center",...o.style}));const $=new e.Group(g,{...n,objectCaching:!1});f.push($)}));const w=f.length>0?new e.Group([...f],{...n,objectCaching:!1}):null;w&&d.value.add(w),w&&w.sendToBack()}R&&function(){const e=JSON.parse(JSON.stringify(_));let t=E;const i=R-O.icons.marginRight;e.reverse().forEach((e=>{t-=10;let n=e.title.replace(/(.{2})/g,"$1\n");n.endsWith("\n")&&(n=n.slice(0,n.length-1));const{text:l,icon:u}=o(n,e,{text:{left:i-(e.pointAttr.width||10)-5,top:t,originX:"right"},icon:{originX:"right",left:i,topY:t,origin:{type:s(e.bigType),_type:e.bigType},...g.event}});var a;t-=l.height||30,(a=u).on("moving",(()=>{a.set("originX","center"),function(e){if(e.left>=M&&e.left<=G){e.setCoords();const t="pain"===e.origin.type?A:W;e.top<t.originY&&e.set("top",t.originY),e.top>t.endY&&e.set("top",t.endY)}}(a),V(a)?m(a):v.show=!1})),a.on("mouseup:before",(e=>{if(v.show=!1,0===e.e.button&&V(a)){const e=N([...j],a.left,"_type").includes(a.origin._type),t=Y(a.left);if(!t||e)e&&t&&T("repeat");else{const e={data:{time:S(a.left),value:b(a.origin.type,a.top),...r(a.origin.type)?{key:a.origin.key}:{}},...a.origin};f("add",e),x(e)}}!function(e){e.setCoords().set({originX:"right",left:e.originLeft,top:e.originTop})}(a)})),d.value.add(l,u)}))}();const Q=O.yScaleValue.filter((e=>"left"===e.layout&&"pain"!==e.type&&e.show));if((null==J?void 0:J.width)&&"left"===(null==(C=null==J?void 0:J.yScaleValue)?void 0:C.layout)&&(null==(X=null==J?void 0:J.yScaleValue)?void 0:X.show)&&Q.push(D),B>0&&O.yScaleValue[B].show){const e=O.yScaleValue[B];0===B&&O.yScaleValue.length>1&&Q.unshift(e),B==O.yScaleValue.length-1&&Q.push(e)}const U=Q.findIndex((e=>"pulse"===e.type&&e.show&&e.doubleShow)),Z=Q[U];return U>-1&&Q.splice(U,0,{...Z,title:(null==Z?void 0:Z.doubleTitle)||(null==Z?void 0:Z.title)}),K(Q),{drawScaleValue:K}}export{d as useLeft};
@@ -1 +1 @@
1
- import{fabric as e}from"../../../../../shared/utils/fabricjs/index.js";import{defaultStyle as t}from"../useDraw.js";import"date-fns";import{cloneDeep as i,last as l}from"lodash-es";import"../useEvent.js";import"vue";import"./useShadow.js";import"@vueuse/shared";import"naive-ui";import"@vueuse/core";function n(n,o,r,u,a,s){const{left:h,other:f,vitalSignsOriginY:c,xCellWidth:g,yCellHeight:v,endX:p}=o;let d=0;function m(i,l,o,u=!1){const a=[],s=u&&i.fixed&&i.fixedValue?i.fixedValue:i.value;String(s).split("").forEach(((l,n)=>{const o=new e.Text(l,{left:0,top:v*n,originX:"center",...t,objectCaching:!1,...i.style||{}});d=(v-(o.height||0))/2,a.push(o)}));const h=new e.Rect({left:0,top:0,width:g,height:v*a.length,fill:"transparent",originX:"center",...t}),{eventHighlight:c=!1}=f||{},p={originX:"center",left:l,top:o+d,baseTop:(i.baseTop||0)*v,trueLeft:l,trueHeight:a.length*v,objectCaching:!1,hoverCursor:"pointer",highlightObject:h,originData:i,selectable:!1,evented:c},m=new e.Group([h,...a],p);return function(e){const{highlightColor:t="#ffff00"}=f||{};e.on("mouseover",(()=>{e.highlightObject.set("fill",t),n.value.requestRenderAll()})),e.on("mouseout",(()=>{e.highlightObject.set("fill","transparent"),n.value.requestRenderAll()})),e.on("mousedown",(function(){r("eventClick",e.originData)}))}(m),n.value.add(m),m}!function(){var e,t;if(!(null==f?void 0:f.list))return!1;const n=[],o=[];i(f.list).forEach(((e,t)=>{e.value=e.value||"";const i=0===t?"vertical":e.align||"vertical",l=u(e.time,!0);if(l>p)return;const n=o.find((e=>e.left==l));if(n)n[i].push(e);else{const t={left:l,vertical:[],horizontal:[]};t[i].push(e),o.push(t)}}));const r=null==(t=null==(e=h.yScaleValue)?void 0:e.find((e=>"temperature"===e.type)))?void 0:t.list,d=(null==r?void 0:r.length)?a("temperature",35):0;o.forEach((e=>{let t=c.originY,i=e.left,o=0,r=d,u=i;function a(e,t){var o,a;if((e=>e.fixed&&d&&(e.fixedValue||e.value))(e)){const h=[...s].find((e=>Math.abs(e.left-i)<1));h&&(t||Math.abs(i-u)>1)&&(r=h.top+h.height),u=i,n.push(m(e,i,r,!0)),r+=null!=(a=null==(o=l(n))?void 0:o.trueHeight)?a:0}}e.vertical.forEach(((r,u)=>{var s,h,f;const p=(r.baseTop||0)*v,d=(null==(s=l(n))?void 0:s.left)||0;0===u&&e.left<=d&&(i=d+g);if(n.filter((e=>e.trueLeft===i)).length){const e=String(r.value).length;t+=o,t+e*v+p>c.endY&&(t=c.originY,i+=g)}t+=p,String(r.value).length&&(n.push(m(r,i,t)),o=null!=(f=null==(h=l(n))?void 0:h.trueHeight)?f:0),a(r,0===u)})),e.horizontal.forEach(((t,o)=>{var r,u;const s=c.originY+(t.baseTop||0)*v,h=(null==(r=l(n))?void 0:r.left)||0;e.left<=h&&(i=h+g),String(t.value).length&&n.push(m(t,i,s)),a(t,0===(null==(u=e.vertical)?void 0:u.length)&&0===o)}))}))}()}export{n as useOther};
1
+ import{fabric as e}from"../../../../../shared/utils/fabricjs/index.js";import{defaultStyle as t}from"../useDraw.js";import"date-fns";import{cloneDeep as i,last as l}from"lodash-es";import"../useEvent.js";import"vue";import"./useShadow.js";import"@vueuse/shared";import"naive-ui";import"@vueuse/core";function n(n,o,r,u,a,s){const{left:h,other:f,vitalSignsOriginY:c,xCellWidth:g,yCellHeight:v,endX:d}=o,p=(()=>{const e=Math.min(...((null==f?void 0:f.list)||[]).map((e=>{var t,i;return null!=(i=null==(t=e.style)?void 0:t.fontSize)?i:12})));return v<11?e:v})();let m=0;function b(i,l,o,u=!1){const a=[],s=u&&i.fixed&&i.fixedValue?i.fixedValue:i.value;String(s).split("").forEach(((l,n)=>{const o=new e.Text(l,{left:0,top:p*n,originX:"center",...t,objectCaching:!1,...i.style||{}});m=(p-(o.height||0))/2,a.push(o)}));const h=new e.Rect({left:0,top:0,width:g,height:p*a.length,fill:"transparent",originX:"center",...t}),{eventHighlight:c=!1}=f||{},d={originX:"center",left:l,top:o+m,baseTop:(i.baseTop||0)*v,trueLeft:l,trueHeight:a.length*p,objectCaching:!1,hoverCursor:"pointer",highlightObject:h,originData:i,selectable:!1,evented:c},b=new e.Group([h,...a],d);return function(e){const{highlightColor:t="#ffff00"}=f||{};e.on("mouseover",(()=>{e.highlightObject.set("fill",t),n.value.requestRenderAll()})),e.on("mouseout",(()=>{e.highlightObject.set("fill","transparent"),n.value.requestRenderAll()})),e.on("mousedown",(function(){r("eventClick",e.originData)}))}(b),n.value.add(b),b}!function(){var e,t;if(!(null==f?void 0:f.list))return!1;const n=[],o=[];i(f.list).forEach(((e,t)=>{e.value=e.value||"";const i=0===t?"vertical":e.align||"vertical",l=u(e.time,!0);if(l>d)return;const n=o.find((e=>e.left==l));if(n)n[i].push(e);else{const t={left:l,vertical:[],horizontal:[]};t[i].push(e),o.push(t)}}));const r=null==(t=null==(e=h.yScaleValue)?void 0:e.find((e=>"temperature"===e.type)))?void 0:t.list,m=(null==r?void 0:r.length)?a("temperature",35):0;o.forEach((e=>{let t=c.originY,i=e.left,o=0,r=m,u=i;function a(e,t){var o,a;if((e=>e.fixed&&m&&(e.fixedValue||e.value))(e)){const h=[...s].find((e=>Math.abs(e.left-i)<1));h&&(t||Math.abs(i-u)>1)&&(r=h.top+h.height),u=i,n.push(b(e,i,r,!0)),r+=null!=(a=null==(o=l(n))?void 0:o.trueHeight)?a:0}}e.vertical.forEach(((r,u)=>{var s,h,f;const d=(r.baseTop||0)*v,m=(null==(s=l(n))?void 0:s.left)||0;0===u&&e.left<=m&&(i=m+g);if(n.filter((e=>e.trueLeft===i)).length){const e=String(r.value).length;t+=o,t+e*p+d>c.endY&&(t=c.originY,i+=g)}t+=d,String(r.value).length&&(n.push(b(r,i,t)),o=null!=(f=null==(h=l(n))?void 0:h.trueHeight)?f:0),a(r,0===u)})),e.horizontal.forEach(((t,o)=>{var r,u;const s=c.originY+(t.baseTop||0)*v,h=(null==(r=l(n))?void 0:r.left)||0;e.left<=h&&(i=h+g),String(t.value).length&&n.push(b(t,i,s)),a(t,0===(null==(u=e.vertical)?void 0:u.length)&&0===o)}))}))}()}export{n as useOther};
@@ -63,8 +63,15 @@ declare const FieldSet: SFCWithInstall<import("vue").DefineComponent<{
63
63
  }>>;
64
64
  emit: (event: "save", ...args: any[]) => void;
65
65
  setRefs: import("../../shared/types").AnyObject;
66
+ fieldSetRef: import("vue").Ref<any>;
66
67
  primaryColor: import("vue").Ref<string>;
67
- rowHeight: import("vue").ComputedRef<"52px" | "auto">;
68
+ fieldSetHeight: import("vue").Ref<number>;
69
+ dataLength: import("vue").ComputedRef<number>;
70
+ style: import("vue").ComputedRef<{
71
+ '--row-height': string;
72
+ '--primary-color': string;
73
+ '--main-height': any;
74
+ }>;
68
75
  tabList: import("vue").ComputedRef<{
69
76
  name: import("./src/types").FieldSetTab;
70
77
  tab: string;
@@ -46,9 +46,8 @@ declare const _default: import("vue").DefineComponent<{
46
46
  disabledAll?: boolean | undefined;
47
47
  isHeadCheckHide?: boolean | undefined;
48
48
  isShow?: boolean | undefined;
49
- contentRender?: ((column: AnyObject, row: AnyObject) => String | import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
50
- [key: string]: any;
51
- }>) | undefined;
49
+ contentRender?: ((column: AnyObject, row: AnyObject) => import("vue").VNodeChild) | undefined;
50
+ hide?: boolean | undefined;
52
51
  }[]>;
53
52
  rowProps: {
54
53
  columns: {
@@ -60,9 +59,8 @@ declare const _default: import("vue").DefineComponent<{
60
59
  disabledAll?: boolean | undefined;
61
60
  isHeadCheckHide?: boolean | undefined;
62
61
  isShow?: boolean | undefined;
63
- contentRender?: ((column: AnyObject, row: AnyObject) => String | import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
64
- [key: string]: any;
65
- }>) | undefined;
62
+ contentRender?: ((column: AnyObject, row: AnyObject) => import("vue").VNodeChild) | undefined;
63
+ hide?: boolean | undefined;
66
64
  }[];
67
65
  data: AnyObject[];
68
66
  onEdit: (row: AnyObject) => void;
@@ -235,6 +233,13 @@ declare const _default: import("vue").DefineComponent<{
235
233
  type: PropType<AnyObject[]>;
236
234
  default: () => never[];
237
235
  };
236
+ primaryKey: {
237
+ type: StringConstructor;
238
+ default: string;
239
+ };
240
+ titleRender: {
241
+ type: PropType<(row: AnyObject) => import("vue").VNodeChild>;
242
+ };
238
243
  }, {
239
244
  fixedWayOptions: {
240
245
  label: string;
@@ -333,6 +338,13 @@ declare const _default: import("vue").DefineComponent<{
333
338
  type: PropType<AnyObject[]>;
334
339
  default: () => never[];
335
340
  };
341
+ primaryKey: {
342
+ type: StringConstructor;
343
+ default: string;
344
+ };
345
+ titleRender: {
346
+ type: PropType<(row: AnyObject) => import("vue").VNodeChild>;
347
+ };
336
348
  }>> & {
337
349
  onUpdateChecked?: ((...args: any[]) => any) | undefined;
338
350
  onEdit?: ((...args: any[]) => any) | undefined;
@@ -346,10 +358,12 @@ declare const _default: import("vue").DefineComponent<{
346
358
  isMultiple: (field: string) => boolean;
347
359
  isRender: (field: string) => boolean;
348
360
  isShow: (field: string) => any;
361
+ showRelation: (field: string) => boolean;
349
362
  getSortPriorityOptions: () => {
350
363
  label: string;
351
364
  value: number;
352
365
  }[];
366
+ getSelectText: (field: string) => "密码无需设置" | "主键不可设置" | "不支持脱敏设置" | undefined;
353
367
  selectProps: (field: string) => {
354
368
  valueField: string;
355
369
  labelField: string;
@@ -367,12 +381,15 @@ declare const _default: import("vue").DefineComponent<{
367
381
  NIcon: any;
368
382
  NColorPicker: any;
369
383
  NPopconfirm: any;
384
+ NPopover: any;
385
+ NSpace: any;
370
386
  setStyle: typeof setStyle;
371
387
  setColorInfo: typeof setColorInfo;
372
388
  ReorderTwoOutline: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, import("vue").EmitsOptions, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
373
389
  TrashOutline: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, import("vue").EmitsOptions, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
374
390
  CreateOutline: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, import("vue").EmitsOptions, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
375
391
  HelpCircleOutline: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, import("vue").EmitsOptions, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
392
+ CaretDownOutline: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, import("vue").EmitsOptions, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
376
393
  isFunction: (value: any) => value is (...args: any[]) => any;
377
394
  }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("edit" | "updateChecked")[], "edit" | "updateChecked", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
378
395
  element: {
@@ -458,6 +475,13 @@ declare const _default: import("vue").DefineComponent<{
458
475
  type: PropType<AnyObject[]>;
459
476
  default: () => never[];
460
477
  };
478
+ primaryKey: {
479
+ type: StringConstructor;
480
+ default: string;
481
+ };
482
+ titleRender: {
483
+ type: PropType<(row: AnyObject) => import("vue").VNodeChild>;
484
+ };
461
485
  }>> & {
462
486
  onUpdateChecked?: ((...args: any[]) => any) | undefined;
463
487
  onEdit?: ((...args: any[]) => any) | undefined;
@@ -480,6 +504,7 @@ declare const _default: import("vue").DefineComponent<{
480
504
  requiredDisable: boolean;
481
505
  hide: boolean;
482
506
  }>[];
507
+ primaryKey: string;
483
508
  index: number;
484
509
  columns: FieldSetColumnItem[];
485
510
  element: Partial<{
@@ -502,9 +527,9 @@ declare const _default: import("vue").DefineComponent<{
502
527
  }>;
503
528
  developMode: boolean;
504
529
  draggable: boolean;
530
+ isHighlightRow: boolean;
505
531
  idx: number;
506
532
  isHighlight: boolean;
507
- isHighlightRow: boolean;
508
533
  isFieldSet: boolean;
509
534
  fieldDescribeMode: "column" | "tooltip";
510
535
  hideExpressionOption: AnyObject[];
@@ -754,6 +779,14 @@ declare const _default: import("vue").DefineComponent<{
754
779
  type: PropType<string | false | HTMLElement>;
755
780
  default: string;
756
781
  };
782
+ holidays: {
783
+ type: PropType<Date[]>;
784
+ default: () => never[];
785
+ };
786
+ type: {
787
+ type: StringConstructor;
788
+ default: string;
789
+ };
757
790
  }, {
758
791
  attrs: {
759
792
  [x: string]: unknown;
@@ -778,6 +811,14 @@ declare const _default: import("vue").DefineComponent<{
778
811
  type: PropType<string | false | HTMLElement>;
779
812
  default: string;
780
813
  };
814
+ holidays: {
815
+ type: PropType<Date[]>;
816
+ default: () => never[];
817
+ };
818
+ type: {
819
+ type: StringConstructor;
820
+ default: string;
821
+ };
781
822
  }>> & {
782
823
  "onUpdate:formatted-value"?: ((...args: any[]) => any) | undefined;
783
824
  }>>;
@@ -794,6 +835,9 @@ declare const _default: import("vue").DefineComponent<{
794
835
  blur: () => any;
795
836
  handleConfirm: (target: HTMLInputElement) => void;
796
837
  onUpdateShow: (show: boolean) => Promise<void>;
838
+ watchers: import("../../../shared/types").AnyFn[];
839
+ stopWatcher: () => void;
840
+ setHoliday: (show: boolean) => Promise<void>;
797
841
  onConfirm: (...args: any[]) => Promise<void>;
798
842
  isAllowedInvalidValue: (value: (string | [string, string]) | null | undefined) => boolean | "" | undefined;
799
843
  setShortcutValue: (type: "month" | "week") => Promise<void>;
@@ -818,11 +862,21 @@ declare const _default: import("vue").DefineComponent<{
818
862
  type: PropType<string | false | HTMLElement>;
819
863
  default: string;
820
864
  };
865
+ holidays: {
866
+ type: PropType<Date[]>;
867
+ default: () => never[];
868
+ };
869
+ type: {
870
+ type: StringConstructor;
871
+ default: string;
872
+ };
821
873
  }>> & {
822
874
  "onUpdate:formatted-value"?: ((...args: any[]) => any) | undefined;
823
875
  }, {
876
+ type: string;
824
877
  updateUnchangedValue: boolean;
825
878
  to: string | false | HTMLElement;
879
+ holidays: Date[];
826
880
  }>>;
827
881
  }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
828
882
  data: {
@@ -1036,6 +1090,14 @@ declare const _default: import("vue").DefineComponent<{
1036
1090
  type: PropType<string | false | HTMLElement>;
1037
1091
  default: string;
1038
1092
  };
1093
+ holidays: {
1094
+ type: PropType<Date[]>;
1095
+ default: () => never[];
1096
+ };
1097
+ type: {
1098
+ type: StringConstructor;
1099
+ default: string;
1100
+ };
1039
1101
  }, {
1040
1102
  attrs: {
1041
1103
  [x: string]: unknown;
@@ -1060,6 +1122,14 @@ declare const _default: import("vue").DefineComponent<{
1060
1122
  type: PropType<string | false | HTMLElement>;
1061
1123
  default: string;
1062
1124
  };
1125
+ holidays: {
1126
+ type: PropType<Date[]>;
1127
+ default: () => never[];
1128
+ };
1129
+ type: {
1130
+ type: StringConstructor;
1131
+ default: string;
1132
+ };
1063
1133
  }>> & {
1064
1134
  "onUpdate:formatted-value"?: ((...args: any[]) => any) | undefined;
1065
1135
  }>>;
@@ -1076,6 +1146,9 @@ declare const _default: import("vue").DefineComponent<{
1076
1146
  blur: () => any;
1077
1147
  handleConfirm: (target: HTMLInputElement) => void;
1078
1148
  onUpdateShow: (show: boolean) => Promise<void>;
1149
+ watchers: import("../../../shared/types").AnyFn[];
1150
+ stopWatcher: () => void;
1151
+ setHoliday: (show: boolean) => Promise<void>;
1079
1152
  onConfirm: (...args: any[]) => Promise<void>;
1080
1153
  isAllowedInvalidValue: (value: (string | [string, string]) | null | undefined) => boolean | "" | undefined;
1081
1154
  setShortcutValue: (type: "month" | "week") => Promise<void>;
@@ -1100,11 +1173,21 @@ declare const _default: import("vue").DefineComponent<{
1100
1173
  type: PropType<string | false | HTMLElement>;
1101
1174
  default: string;
1102
1175
  };
1176
+ holidays: {
1177
+ type: PropType<Date[]>;
1178
+ default: () => never[];
1179
+ };
1180
+ type: {
1181
+ type: StringConstructor;
1182
+ default: string;
1183
+ };
1103
1184
  }>> & {
1104
1185
  "onUpdate:formatted-value"?: ((...args: any[]) => any) | undefined;
1105
1186
  }, {
1187
+ type: string;
1106
1188
  updateUnchangedValue: boolean;
1107
1189
  to: string | false | HTMLElement;
1190
+ holidays: Date[];
1108
1191
  }>>;
1109
1192
  }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
1110
1193
  data: {