cnhis-design-vue 3.2.9-beta.8 → 3.2.9-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 (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 -13
  5. package/es/components/button-print/src/ButtonPrint.vue.d.ts +30 -13
  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 -4
  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 -4
  10. package/es/components/button-print/src/components/OldPrintComponent.vue2.js +1 -1
  11. package/es/components/button-print/src/utils/print.d.ts +8 -6
  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 +89 -6
  25. package/es/components/field-set/src/FieldColor.vue2.js +1 -1
  26. package/es/components/field-set/src/FieldFilter.vue.d.ts +31 -6
  27. package/es/components/field-set/src/FieldFilter.vue2.js +1 -1
  28. package/es/components/field-set/src/FieldSet.vue.d.ts +73 -30
  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 +28 -1
  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 +2 -2
@@ -591,6 +591,14 @@ declare const _default: import("vue").DefineComponent<{
591
591
  type: import("vue").PropType<string | false | HTMLElement>;
592
592
  default: string;
593
593
  };
594
+ holidays: {
595
+ type: import("vue").PropType<Date[]>;
596
+ default: () => never[];
597
+ };
598
+ type: {
599
+ type: StringConstructor;
600
+ default: string;
601
+ };
594
602
  }, {
595
603
  attrs: {
596
604
  [x: string]: unknown;
@@ -615,6 +623,14 @@ declare const _default: import("vue").DefineComponent<{
615
623
  type: import("vue").PropType<string | false | HTMLElement>;
616
624
  default: string;
617
625
  };
626
+ holidays: {
627
+ type: import("vue").PropType<Date[]>;
628
+ default: () => never[];
629
+ };
630
+ type: {
631
+ type: StringConstructor;
632
+ default: string;
633
+ };
618
634
  }>> & {
619
635
  "onUpdate:formatted-value"?: ((...args: any[]) => any) | undefined;
620
636
  }>>;
@@ -631,6 +647,9 @@ declare const _default: import("vue").DefineComponent<{
631
647
  blur: () => any;
632
648
  handleConfirm: (target: HTMLInputElement) => void;
633
649
  onUpdateShow: (show: boolean) => Promise<void>;
650
+ watchers: import("../../../../../shared/types").AnyFn[];
651
+ stopWatcher: () => void;
652
+ setHoliday: (show: boolean) => Promise<void>;
634
653
  onConfirm: (...args: any[]) => Promise<void>;
635
654
  isAllowedInvalidValue: (value: (string | [string, string]) | null | undefined) => boolean | "" | undefined;
636
655
  setShortcutValue: (type: "month" | "week") => Promise<void>;
@@ -655,11 +674,21 @@ declare const _default: import("vue").DefineComponent<{
655
674
  type: import("vue").PropType<string | false | HTMLElement>;
656
675
  default: string;
657
676
  };
677
+ holidays: {
678
+ type: import("vue").PropType<Date[]>;
679
+ default: () => never[];
680
+ };
681
+ type: {
682
+ type: StringConstructor;
683
+ default: string;
684
+ };
658
685
  }>> & {
659
686
  "onUpdate:formatted-value"?: ((...args: any[]) => any) | undefined;
660
687
  }, {
688
+ type: string;
661
689
  updateUnchangedValue: boolean;
662
690
  to: string | false | HTMLElement;
691
+ holidays: Date[];
663
692
  }>>;
664
693
  NSelect: any;
665
694
  WidgetValEnums: {
@@ -1253,6 +1282,14 @@ declare const _default: import("vue").DefineComponent<{
1253
1282
  type: import("vue").PropType<string | false | HTMLElement>;
1254
1283
  default: string;
1255
1284
  };
1285
+ holidays: {
1286
+ type: import("vue").PropType<Date[]>;
1287
+ default: () => never[];
1288
+ };
1289
+ type: {
1290
+ type: StringConstructor;
1291
+ default: string;
1292
+ };
1256
1293
  }, {
1257
1294
  attrs: {
1258
1295
  [x: string]: unknown;
@@ -1277,6 +1314,14 @@ declare const _default: import("vue").DefineComponent<{
1277
1314
  type: import("vue").PropType<string | false | HTMLElement>;
1278
1315
  default: string;
1279
1316
  };
1317
+ holidays: {
1318
+ type: import("vue").PropType<Date[]>;
1319
+ default: () => never[];
1320
+ };
1321
+ type: {
1322
+ type: StringConstructor;
1323
+ default: string;
1324
+ };
1280
1325
  }>> & {
1281
1326
  "onUpdate:formatted-value"?: ((...args: any[]) => any) | undefined;
1282
1327
  }>>;
@@ -1293,6 +1338,9 @@ declare const _default: import("vue").DefineComponent<{
1293
1338
  blur: () => any;
1294
1339
  handleConfirm: (target: HTMLInputElement) => void;
1295
1340
  onUpdateShow: (show: boolean) => Promise<void>;
1341
+ watchers: import("../../../../../shared/types").AnyFn[];
1342
+ stopWatcher: () => void;
1343
+ setHoliday: (show: boolean) => Promise<void>;
1296
1344
  onConfirm: (...args: any[]) => Promise<void>;
1297
1345
  isAllowedInvalidValue: (value: (string | [string, string]) | null | undefined) => boolean | "" | undefined;
1298
1346
  setShortcutValue: (type: "month" | "week") => Promise<void>;
@@ -1317,11 +1365,21 @@ declare const _default: import("vue").DefineComponent<{
1317
1365
  type: import("vue").PropType<string | false | HTMLElement>;
1318
1366
  default: string;
1319
1367
  };
1368
+ holidays: {
1369
+ type: import("vue").PropType<Date[]>;
1370
+ default: () => never[];
1371
+ };
1372
+ type: {
1373
+ type: StringConstructor;
1374
+ default: string;
1375
+ };
1320
1376
  }>> & {
1321
1377
  "onUpdate:formatted-value"?: ((...args: any[]) => any) | undefined;
1322
1378
  }, {
1379
+ type: string;
1323
1380
  updateUnchangedValue: boolean;
1324
1381
  to: string | false | HTMLElement;
1382
+ holidays: Date[];
1325
1383
  }>>;
1326
1384
  WidgetValEnums: {
1327
1385
  CUSTOM: string;
@@ -1716,6 +1774,14 @@ declare const _default: import("vue").DefineComponent<{
1716
1774
  type: import("vue").PropType<string | false | HTMLElement>;
1717
1775
  default: string;
1718
1776
  };
1777
+ holidays: {
1778
+ type: import("vue").PropType<Date[]>;
1779
+ default: () => never[];
1780
+ };
1781
+ type: {
1782
+ type: StringConstructor;
1783
+ default: string;
1784
+ };
1719
1785
  }, {
1720
1786
  attrs: {
1721
1787
  [x: string]: unknown;
@@ -1740,6 +1806,14 @@ declare const _default: import("vue").DefineComponent<{
1740
1806
  type: import("vue").PropType<string | false | HTMLElement>;
1741
1807
  default: string;
1742
1808
  };
1809
+ holidays: {
1810
+ type: import("vue").PropType<Date[]>;
1811
+ default: () => never[];
1812
+ };
1813
+ type: {
1814
+ type: StringConstructor;
1815
+ default: string;
1816
+ };
1743
1817
  }>> & {
1744
1818
  "onUpdate:formatted-value"?: ((...args: any[]) => any) | undefined;
1745
1819
  }>>;
@@ -1756,6 +1830,9 @@ declare const _default: import("vue").DefineComponent<{
1756
1830
  blur: () => any;
1757
1831
  handleConfirm: (target: HTMLInputElement) => void;
1758
1832
  onUpdateShow: (show: boolean) => Promise<void>;
1833
+ watchers: import("../../../../../shared/types").AnyFn[];
1834
+ stopWatcher: () => void;
1835
+ setHoliday: (show: boolean) => Promise<void>;
1759
1836
  onConfirm: (...args: any[]) => Promise<void>;
1760
1837
  isAllowedInvalidValue: (value: (string | [string, string]) | null | undefined) => boolean | "" | undefined;
1761
1838
  setShortcutValue: (type: "month" | "week") => Promise<void>;
@@ -1780,11 +1857,21 @@ declare const _default: import("vue").DefineComponent<{
1780
1857
  type: import("vue").PropType<string | false | HTMLElement>;
1781
1858
  default: string;
1782
1859
  };
1860
+ holidays: {
1861
+ type: import("vue").PropType<Date[]>;
1862
+ default: () => never[];
1863
+ };
1864
+ type: {
1865
+ type: StringConstructor;
1866
+ default: string;
1867
+ };
1783
1868
  }>> & {
1784
1869
  "onUpdate:formatted-value"?: ((...args: any[]) => any) | undefined;
1785
1870
  }, {
1871
+ type: string;
1786
1872
  updateUnchangedValue: boolean;
1787
1873
  to: string | false | HTMLElement;
1874
+ holidays: Date[];
1788
1875
  }>>;
1789
1876
  }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "update:modelValue"[], "update:modelValue", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
1790
1877
  componentCfg: {
@@ -175,6 +175,9 @@ declare const _default: import("vue").DefineComponent<{
175
175
  modelValue: unknown[];
176
176
  componentData: Record<string, any>;
177
177
  } & {
178
+ /**
179
+ * 改变弹窗大小
180
+ */
178
181
  itemKey?: string | Function | undefined;
179
182
  }>, {
180
183
  move: Function;
@@ -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;