@baishuyun/ui-base 6.16.0 → 6.17.0

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 (140) hide show
  1. package/dist/Amap/Amap-CNsoge6e.js +826 -0
  2. package/dist/Amap/index.js +3 -10
  3. package/dist/Calendar/Calendar-BlsUX2vX.js +1608 -0
  4. package/dist/Calendar/index.js +10 -20
  5. package/dist/Card/index.js +2 -2
  6. package/dist/CheckBox/{CheckBox-B92dxWNo.js → CheckBox-CM24-quL.js} +1 -1
  7. package/dist/CheckBox/index.js +3 -3
  8. package/dist/ColorPicker/{ColorPicker-CPr5j6ZN.js → ColorPicker-B_wLqurt.js} +5 -5
  9. package/dist/ColorPicker/index.js +5 -5
  10. package/dist/ConfigProvider/index.js +1 -1
  11. package/dist/DatePicker/DatePicker-BRwPZeui.js +111 -0
  12. package/dist/DatePicker/{DatePickerPanel-CRnLvIwc.js → DatePickerPanel-UwjSXS-U.js} +3 -4
  13. package/dist/DatePicker/index.js +6 -8
  14. package/dist/DatePicker/pickerLocale-Brf7_Tnd.js +30 -0
  15. package/dist/DropDown/{DropDown-CvG9IFVk.js → DropDown-B_szM67V.js} +86 -82
  16. package/dist/DropDown/index.js +8 -9
  17. package/dist/Editor/index.js +2839 -880
  18. package/dist/Gantt/index.js +3055 -197
  19. package/dist/Icon/index.js +1 -1
  20. package/dist/InputTag/{InputTag-BfZycXw4.js → InputTag-C_5nm0eo.js} +2 -2
  21. package/dist/InputTag/index.js +4 -4
  22. package/dist/Loading/{Loading-DpbJSRYf.js → Loading-Cherk9Ax.js} +1 -1
  23. package/dist/Loading/index.js +3 -3
  24. package/dist/Modal/index.js +2 -2
  25. package/dist/NotFoundContent/index.js +2 -2
  26. package/dist/Overlay/index.js +1 -1
  27. package/dist/Radio/index.js +2 -2
  28. package/dist/ScrollBar/{ScrollBar-N2pOLv-8.js → ScrollBar-IMTuAOF5.js} +1 -1
  29. package/dist/ScrollBar/index.js +2 -2
  30. package/dist/Segmented/{Segmented-BCQRrc65.js → Segmented-DpmwFerw.js} +1 -1
  31. package/dist/Segmented/index.js +2 -2
  32. package/dist/Select/{Select-Bla1mQ8v.js → Select-VIy6OKEj.js} +262 -259
  33. package/dist/Select/{SelectInputSearch-CRgBcsq2.js → SelectInputSearch-MApQHnU9.js} +21 -10
  34. package/dist/Select/index.js +12 -13
  35. package/dist/Table/Table-8ac6xLZv.js +808 -0
  36. package/dist/Table/index.js +4 -8
  37. package/dist/Tabs/{Tabs-B9uCGlxM.js → Tabs-DnoZ8BO0.js} +3 -3
  38. package/dist/Tabs/index.js +4 -4
  39. package/dist/Tooltip/{Tooltip-nJU13gX4.js → Tooltip-DBrt3t2r.js} +3 -3
  40. package/dist/Tooltip/index.js +3 -3
  41. package/dist/Tree/index.js +4 -4
  42. package/dist/components/Editor/EditorHtmlPreview.d.ts +3 -0
  43. package/dist/components/Editor/Preview/HtmlPreview.d.ts +2 -3
  44. package/dist/components/Editor/__tests__/createTestEditor.d.ts +1 -0
  45. package/dist/components/Editor/constants/portableEditorStyles.d.ts +2 -0
  46. package/dist/components/Editor/hooks/useEditorFocus.d.ts +1 -0
  47. package/dist/components/Editor/hooks/useTextFormatsState.d.ts +1 -2
  48. package/dist/components/Editor/index.d.ts +1 -0
  49. package/dist/components/Editor/nodes/ExtendedLinkNode.d.ts +9 -0
  50. package/dist/components/Editor/utils/getToolbarItems.d.ts +14 -0
  51. package/dist/components/Editor/utils/placeProgrammaticCaret.d.ts +5 -0
  52. package/dist/components/Editor/utils/readTextFormats.d.ts +6 -0
  53. package/dist/components/Editor/utils/retainCodeSelection.d.ts +3 -0
  54. package/dist/components/Select/SelectInputSearch/SelectInputSearch.d.ts +2 -0
  55. package/dist/index.js +28 -50
  56. package/dist/style.css +1 -1
  57. package/dist/vendors/Tree-D0Q1IZ2D.js +267 -0
  58. package/dist/vendors/{version-CFii9VTt.js → version-CfjNx5v2.js} +1 -1
  59. package/package.json +1 -1
  60. package/dist/Amap/Amap-BLSziesG.js +0 -77
  61. package/dist/Amap/AmapCircle/index.js +0 -5
  62. package/dist/Amap/AmapCircle-2qupysHe.js +0 -55
  63. package/dist/Amap/AmapContext-CJBe6lld.js +0 -11
  64. package/dist/Amap/AmapMarker/index.js +0 -6
  65. package/dist/Amap/AmapMarker-xEqoVnFR.js +0 -153
  66. package/dist/Amap/AmapMarkerCluster/index.js +0 -6
  67. package/dist/Amap/AmapMarkerCluster-CvEQa3o9.js +0 -240
  68. package/dist/Amap/AmapProvider/index.js +0 -7
  69. package/dist/Amap/AmapProvider-B-R2DrkJ.js +0 -107
  70. package/dist/Amap/hooks/index.js +0 -4
  71. package/dist/Amap/hooks-BTcFpdd0.js +0 -121
  72. package/dist/Amap/useMarkerInfoWindowController-Cjx0xQXw.js +0 -94
  73. package/dist/Calendar/AllDaySection-pO7suGJM.js +0 -53
  74. package/dist/Calendar/Calendar-DUD4iffO.js +0 -795
  75. package/dist/Calendar/CurrentTimeIndicator-BF3_INSL.js +0 -65
  76. package/dist/Calendar/EventCard-DKEZQRTp.js +0 -155
  77. package/dist/Calendar/TimeAxis-DUc6EL-j.js +0 -13
  78. package/dist/Calendar/TimeGrid-BV8x9VnF.js +0 -47
  79. package/dist/Calendar/colorUtils-BbeSMnOs.js +0 -55
  80. package/dist/Calendar/context/index.js +0 -3
  81. package/dist/Calendar/context-CamSpkj3.js +0 -21
  82. package/dist/Calendar/layout-CpOabFQ2.js +0 -300
  83. package/dist/Calendar/subcomponents/AllDaySection/index.js +0 -11
  84. package/dist/Calendar/subcomponents/CurrentTimeIndicator/index.js +0 -8
  85. package/dist/Calendar/subcomponents/EventCard/index.js +0 -9
  86. package/dist/Calendar/subcomponents/TimeAxis/index.js +0 -5
  87. package/dist/Calendar/subcomponents/TimeGrid/index.js +0 -7
  88. package/dist/Calendar/theme-Dc8hjcdo.js +0 -71
  89. package/dist/Calendar/utils/index.js +0 -111
  90. package/dist/Calendar/utils/layout/index.js +0 -4
  91. package/dist/Calendar/utils/theme/index.js +0 -3
  92. package/dist/DatePicker/DatePicker-BWMmI6rl.js +0 -101
  93. package/dist/DatePicker/ensureDayjsPlugins-CSqhjLS7.js +0 -15
  94. package/dist/DatePicker/pickerLocale-CcPLUbZO.js +0 -15
  95. package/dist/DatePicker/style/index.js +0 -3
  96. package/dist/DatePicker/style-W7f5wyUb.js +0 -15
  97. package/dist/DropDown/style/index.js +0 -3
  98. package/dist/DropDown/style-DZpkarne.js +0 -9
  99. package/dist/Editor/Buttons-vt3gwedu.js +0 -1841
  100. package/dist/Editor/ToolbarPlugin/Buttons/index.js +0 -21
  101. package/dist/Editor/constants/index.js +0 -61
  102. package/dist/Gantt/GanttChart/index.js +0 -21
  103. package/dist/Gantt/GanttChart-DRzJdEm-.js +0 -2292
  104. package/dist/Gantt/GanttHighlightContext-dtyoq-oj.js +0 -12
  105. package/dist/Gantt/GanttTable/index.js +0 -13
  106. package/dist/Gantt/GanttTable-fOv1Zn2-.js +0 -84
  107. package/dist/Gantt/GanttToolBar/index.js +0 -17
  108. package/dist/Gantt/GanttToolBar-4kxZP6oS.js +0 -120
  109. package/dist/Gantt/collapseKeys-BV_8sIA-.js +0 -160
  110. package/dist/Gantt/columnResize-Bkenlbab.js +0 -46
  111. package/dist/Gantt/constants-mEGQ1U1Q.js +0 -39
  112. package/dist/Gantt/highlightTarget-D3Nf9_7S.js +0 -25
  113. package/dist/Gantt/theme-B7Iap-tZ.js +0 -31
  114. package/dist/Gantt/timelineViewConfig-DNt7yi83.js +0 -118
  115. package/dist/Gantt/utils/index.js +0 -7
  116. package/dist/Gantt/utils/theme/index.js +0 -3
  117. package/dist/Select/style/index.js +0 -3
  118. package/dist/Select/style-C4A8kUd1.js +0 -9
  119. package/dist/Table/Table-3LSO0xSH.js +0 -545
  120. package/dist/Table/constants-D7wLH8Qy.js +0 -25
  121. package/dist/Table/hooks/index.js +0 -3
  122. package/dist/Table/hooks-DSBl2e4O.js +0 -108
  123. package/dist/Table/processRowspan-B6HMqw0Q.js +0 -144
  124. package/dist/Table/style/index.js +0 -3
  125. package/dist/Table/style-B8Cw8HJe.js +0 -9
  126. package/dist/Table/utils/index.js +0 -3
  127. package/dist/Tree/utils/index.js +0 -26
  128. package/dist/vendors/Tree-DSl4lDjx.js +0 -248
  129. /package/dist/Card/{Card-rJeWgxu5.js → Card-DAz0dvA3.js} +0 -0
  130. /package/dist/CheckBox/{CheckBox-DOK5N7z6.js → CheckBox-CcHskTz_.js} +0 -0
  131. /package/dist/Modal/{Modal-CRKitOOj.js → Modal-eZijJ7CB.js} +0 -0
  132. /package/dist/NotFoundContent/{NotFoundContent-BLmzWNBi.js → NotFoundContent-DJUQ0_2D.js} +0 -0
  133. /package/dist/Radio/{Radio-CX9cUqb7.js → Radio-D9jhW7K6.js} +0 -0
  134. /package/dist/vendors/{animations-Dn_5xJ7B.js → animations-ISccYUE3.js} +0 -0
  135. /package/dist/vendors/{cssVars-l4-kP_14.js → cssVars-UpriQzph.js} +0 -0
  136. /package/dist/vendors/{mergeRefs-TiJ0xjUN.js → mergeRefs-mEH9TBYV.js} +0 -0
  137. /package/dist/vendors/{useFloatingOverlay-B3M9k8nj.js → useFloatingOverlay-B66lOL8v.js} +0 -0
  138. /package/dist/vendors/{useFloatingPortal-VpzL-EPh.js → useFloatingPortal-DJ1iKmW-.js} +0 -0
  139. /package/dist/vendors/{useLatchedPopupPortalRoot-4fVhqVT4.js → useLatchedPopupPortalRoot-CC6af8t-.js} +0 -0
  140. /package/dist/vendors/{useLocale-D31qCCff.js → useLocale-Be4e7Xfn.js} +0 -0
@@ -1,12 +0,0 @@
1
- import { createContext as e } from "use-context-selector";
2
- //#region src/components/Gantt/GanttHighlightContext.ts
3
- var t = e({
4
- getHighlightTarget: () => null,
5
- setHighlightTarget: () => {},
6
- setTableHighlightTarget: () => {},
7
- subscribeHighlight: () => () => {},
8
- notifyScrollActivity: () => {},
9
- getIsScrollActive: () => !1
10
- });
11
- //#endregion
12
- export { t };
@@ -1,13 +0,0 @@
1
- import "../../vendors/version-CFii9VTt.js";
2
- import "../../ScrollBar/style-D26azwz6.js";
3
- import "../../vendors/LocaleContext-DXQoOKM2.js";
4
- import "../../vendors/useLocale-D31qCCff.js";
5
- import "../../Table/processRowspan-B6HMqw0Q.js";
6
- import "../../Table/Table-3LSO0xSH.js";
7
- import "../../Table/hooks-DSBl2e4O.js";
8
- import "../../Table/style-B8Cw8HJe.js";
9
- import "../constants-mEGQ1U1Q.js";
10
- import "../columnResize-Bkenlbab.js";
11
- import { t as e } from "../GanttTable-fOv1Zn2-.js";
12
- import "../GanttHighlightContext-dtyoq-oj.js";
13
- export { e as default };
@@ -1,84 +0,0 @@
1
- import { t as e } from "../Table/Table-3LSO0xSH.js";
2
- import { l as t } from "./constants-mEGQ1U1Q.js";
3
- import { r as n } from "./columnResize-Bkenlbab.js";
4
- import { t as r } from "./GanttHighlightContext-dtyoq-oj.js";
5
- import { r as i } from "./highlightTarget-D3Nf9_7S.js";
6
- import { jsx as a } from "react/jsx-runtime";
7
- import { useCallback as o, useMemo as s } from "react";
8
- import { useContextSelector as c } from "use-context-selector";
9
- //#region src/components/Gantt/GanttTable/utils/mapGanttColumns.ts
10
- var l = (e) => ({
11
- key: e.key,
12
- title: e.title ?? "",
13
- width: e.width ?? 120,
14
- align: e.align,
15
- className: e.className,
16
- fixed: e.fixed,
17
- render: (t, n, r) => {
18
- let i = t ?? (e.dataIndex !== null && e.dataIndex !== void 0 ? n?.[e.dataIndex] : n?.label);
19
- return typeof e.render == "function" ? e.render({
20
- item: n,
21
- rowIndex: r,
22
- column: e,
23
- value: i
24
- }) : i ?? "";
25
- }
26
- });
27
- function u(e = []) {
28
- return !Array.isArray(e) || e.length === 0 ? [{
29
- key: "label",
30
- title: "",
31
- width: 200,
32
- render: (e, t) => t?.label ?? ""
33
- }] : e.map((e) => Array.isArray(e.children) && e.children.length > 0 ? {
34
- key: e.key,
35
- title: e.title ?? "",
36
- width: e.width ?? 120,
37
- align: e.align,
38
- fixed: e.fixed,
39
- children: e.children.map((e) => l(e)),
40
- render: () => null
41
- } : l(e));
42
- }
43
- //#endregion
44
- //#region src/components/Gantt/GanttTable/GanttTable.tsx
45
- var d = ({ data: l = [], columns: d = [], onRowClick: f, rowHeight: p = 34, tableTheme: m }) => {
46
- let h = c(r, (e) => e.setTableHighlightTarget), { columns: g, resizable: _, disabledResizeColumns: v, onColumnResizeEnd: y } = n(s(() => u(d), [d])), b = o((e) => {
47
- let t = i(e);
48
- t && h?.(t);
49
- }, [h]), x = o(() => {
50
- h?.(null);
51
- }, [h]);
52
- return /* @__PURE__ */ a(e, {
53
- columns: g,
54
- dataSource: l,
55
- rowKey: "id",
56
- rowHeightStyle: "low",
57
- bordered: !1,
58
- hasFooter: !1,
59
- resizable: _,
60
- disabledResizeColumns: v,
61
- onColumnResizeEnd: y,
62
- scroll: { y: "100%" },
63
- estimateSize: () => p,
64
- headerRowSpan: t,
65
- onRowClick: o((e, t, n) => {
66
- f?.(e, t, n);
67
- }, [f]),
68
- onRow: o((e, t, n) => {
69
- let r = i(e);
70
- return {
71
- ...n,
72
- "data-highlight-id": r?.id || "",
73
- "data-highlight-type": r?.type || "",
74
- onMouseEnter: () => b(e),
75
- onMouseLeave: x
76
- };
77
- }, [b, x]),
78
- emptyText: " ",
79
- theme: m
80
- });
81
- };
82
- d.displayName = "GanttTable";
83
- //#endregion
84
- export { d as t };
@@ -1,17 +0,0 @@
1
- import "../../vendors/version-CFii9VTt.js";
2
- import "../../ScrollBar/style-D26azwz6.js";
3
- import "../../Icon/Icon-DrdQOEJE.js";
4
- import "../../vendors/LocaleContext-DXQoOKM2.js";
5
- import "../../Overlay/OverlayContext-CVSFoyqN.js";
6
- import "../../vendors/useLocale-D31qCCff.js";
7
- import "../../vendors/useLatchedPopupPortalRoot-4fVhqVT4.js";
8
- import "../../Select/SelectInputSearch-CRgBcsq2.js";
9
- import "../../NotFoundContent/NotFoundContent-BLmzWNBi.js";
10
- import "../../ScrollBar/ScrollBar-N2pOLv-8.js";
11
- import "../../vendors/useFloatingPortal-VpzL-EPh.js";
12
- import "../../DropDown/DropDown-CvG9IFVk.js";
13
- import "../../DropDown/style-DZpkarne.js";
14
- import "../constants-mEGQ1U1Q.js";
15
- import "../timelineViewConfig-DNt7yi83.js";
16
- import { t as e } from "../GanttToolBar-4kxZP6oS.js";
17
- export { e as default };
@@ -1,120 +0,0 @@
1
- import { t as e } from "../Icon/Icon-DrdQOEJE.js";
2
- import { t } from "../vendors/useLocale-D31qCCff.js";
3
- import { t as n } from "../DropDown/DropDown-CvG9IFVk.js";
4
- import { l as r } from "./timelineViewConfig-DNt7yi83.js";
5
- import { jsx as i, jsxs as a } from "react/jsx-runtime";
6
- import { createContext as o, useCallback as s, useContext as c, useMemo as l, useRef as u, useState as d } from "react";
7
- import f from "clsx";
8
- //#region src/components/Gantt/utils/localeKey.ts
9
- var p = (e) => e.startsWith("gantt.") ? e : `gantt.${e}`, m = o(void 0), h = m.Provider, g = () => c(m), _ = {
10
- modeTrigger: "_modeTrigger_cbumr_1",
11
- todayBtn: "_todayBtn_cbumr_1",
12
- iconBtn: "_iconBtn_cbumr_1",
13
- root: "_root_cbumr_8",
14
- modeTriggerArrow: "_modeTriggerArrow_cbumr_29",
15
- isActive: "_isActive_cbumr_29",
16
- modeTriggerLabel: "_modeTriggerLabel_cbumr_36",
17
- divider: "_divider_cbumr_60",
18
- scrollBtns: "_scrollBtns_cbumr_67"
19
- }, v = ".bsy-form-view-data-manager", y = {
20
- oneMinute: "mode.oneMinute",
21
- tenMinute: "mode.tenMinute",
22
- halfHour: "mode.halfHour",
23
- hour: "mode.hour",
24
- sixHour: "mode.sixHour",
25
- halfDay: "mode.halfDay",
26
- day: "mode.day",
27
- week: "mode.week",
28
- month: "mode.month",
29
- quarter: "mode.quarter",
30
- quarterMonth: "mode.quarterMonth",
31
- year: "mode.year"
32
- }, b = ({ viewMode: o = "day", availableModes: c, onViewModeChange: m, onTodayClick: h, onScrollPrev: b, onScrollNext: x, className: S = "" }) => {
33
- let { t: C } = t(), w = g()?.dropdownTheme, T = s((e) => C(p(y[e])), [C]), E = u(null), [D, O] = d(!1), k = s(() => {
34
- let e = E.current;
35
- if (!e) return document.body;
36
- let t = e.closest(v);
37
- return t instanceof HTMLElement ? t : document.body;
38
- }, []), A = l(() => {
39
- let e = new Set(c ?? r);
40
- return r.filter((t) => e.has(t)).map((e) => ({
41
- key: e,
42
- label: T(e)
43
- }));
44
- }, [c, T]), j = l(() => A.find((e) => e.key === o)?.label ?? o, [A, o]), M = s((e) => {
45
- e?.key && e.key !== o && m?.(e.key);
46
- }, [m, o]);
47
- return /* @__PURE__ */ a("div", {
48
- className: f(_.root, S),
49
- "data-testid": "gantt-toolbar",
50
- ref: E,
51
- children: [
52
- /* @__PURE__ */ i(n, {
53
- menus: A,
54
- activeKey: [o],
55
- showSearch: !1,
56
- visible: D,
57
- onOpenChange: O,
58
- offset: {
59
- x: 0,
60
- y: 4
61
- },
62
- getPopupContainer: k,
63
- onClick: M,
64
- theme: w,
65
- style: {
66
- width: 100,
67
- minWidth: 100
68
- },
69
- children: /* @__PURE__ */ a("button", {
70
- type: "button",
71
- className: f(_.modeTrigger, { [_.isActive]: D }),
72
- "data-testid": "gantt-toolbar-mode-trigger",
73
- "aria-haspopup": "listbox",
74
- "aria-expanded": D,
75
- children: [/* @__PURE__ */ i("span", {
76
- className: _.modeTriggerLabel,
77
- children: j
78
- }), /* @__PURE__ */ i("span", {
79
- className: _.modeTriggerArrow,
80
- children: /* @__PURE__ */ i(e, {
81
- name: "arrow-down",
82
- size: 16
83
- })
84
- })]
85
- })
86
- }),
87
- /* @__PURE__ */ i("span", { className: _.divider }),
88
- /* @__PURE__ */ i("button", {
89
- type: "button",
90
- className: _.todayBtn,
91
- onClick: h,
92
- children: C("gantt.today")
93
- }),
94
- /* @__PURE__ */ a("div", {
95
- className: _.scrollBtns,
96
- children: [/* @__PURE__ */ i("button", {
97
- type: "button",
98
- className: _.iconBtn,
99
- "aria-label": C("gantt.aria.scrollPrev"),
100
- onClick: b,
101
- children: /* @__PURE__ */ i(e, {
102
- name: "Pulldownleft",
103
- size: 16
104
- })
105
- }), /* @__PURE__ */ i("button", {
106
- type: "button",
107
- className: _.iconBtn,
108
- "aria-label": C("gantt.aria.scrollNext"),
109
- onClick: x,
110
- children: /* @__PURE__ */ i(e, {
111
- name: "Pulldownright",
112
- size: 16
113
- })
114
- })]
115
- })
116
- ]
117
- });
118
- };
119
- //#endregion
120
- export { h as n, p as r, b as t };
@@ -1,160 +0,0 @@
1
- import { m as e, n as t, r as n, t as r } from "./constants-mEGQ1U1Q.js";
2
- import { n as i, r as a, t as o } from "./timelineViewConfig-DNt7yi83.js";
3
- import { isString as s } from "lodash-es";
4
- import c from "dayjs";
5
- import l from "dayjs/plugin/isoWeek";
6
- import u from "dayjs/plugin/quarterOfYear";
7
- //#region src/components/Gantt/GanttChart/utils/timezoneUtils.ts
8
- var d = () => -(/* @__PURE__ */ new Date()).getTimezoneOffset() / 60, f = () => {
9
- let e = d();
10
- return e === null ? 0 : ((/* @__PURE__ */ new Date()).getTimezoneOffset() + e * 60) * 60 * 1e3;
11
- }, p = (e) => e + f(), m = (e) => e - f(), h = () => Date.now() + f(), g = (e) => m(c(p(e)).startOf("day").valueOf()), _ = (e, t) => m(c(p(e)).startOf(t).valueOf()), v = (e, t) => m(c(p(e)).endOf(t).valueOf()), y = (e) => {
12
- let t = p(e);
13
- return new Date(t).getDay();
14
- }, b = (e) => c(p(e));
15
- //#endregion
16
- //#region src/components/Gantt/GanttChart/utils/quarterMonthScale.ts
17
- c.extend(u);
18
- var x = o("quarterMonth").bottomCellWidthPx, S = (e) => {
19
- if (!Number.isFinite(e)) return 0;
20
- let t = b(e), n = _(e, "month"), r = g(v(e, "month") + 1) - n, i = r > 0 ? (e - n) / r : 0;
21
- return (t.year() * 12 + t.month() + i) * (x ?? 100);
22
- }, C = (e, t) => Math.max(0, S(t) - S(e)), w = (e, t) => {
23
- let n = b(e), r = n.quarter();
24
- return t("header.top.quarter", {
25
- year: n.year(),
26
- ordinal: t(`quarter.${r}`)
27
- });
28
- }, T = (e, t) => t("header.lower.month", { month: b(e).month() + 1 }), E = (e, t) => {
29
- if (!Array.isArray(e) || e.length === 0) return null;
30
- let n = 0, r = e.length - 1;
31
- for (; n <= r;) {
32
- let i = n + r >> 1, a = e[i];
33
- if (t < a.startMs) r = i - 1;
34
- else if (t >= a.endMs) n = i + 1;
35
- else return a;
36
- }
37
- return t < e[0].startMs ? e[0] : e[e.length - 1];
38
- }, D = (e, t) => {
39
- if (!t) return 0;
40
- let n = t.endMs - t.startMs;
41
- if (n <= 0) return t.left;
42
- let r = Math.max(0, Math.min(1, (e - t.startMs) / n));
43
- return t.left + r * t.width;
44
- }, O = (e, t) => Number.isFinite(e) ? D(e, E(t, e)) : 0, k = (e, t, n) => {
45
- if (!Number.isFinite(e) || !Number.isFinite(t)) return 0;
46
- let r = E(n, e), i = E(n, t);
47
- return r === i ? Math.max(0, D(t, r) - D(e, r)) : Math.max(0, D(t, i) - D(e, r));
48
- }, A = (e, t, n) => {
49
- if (!Array.isArray(t) || t.length === 0) return 0;
50
- if (!Number.isFinite(e) || e <= 0) return t[0].startMs;
51
- let r = 0, i = t.length - 1;
52
- for (; r <= i;) {
53
- let a = r + i >> 1, o = t[a], s = o.left + o.width;
54
- if (e < o.left) i = a - 1;
55
- else if (e >= s) r = a + 1;
56
- else {
57
- let t = o.width > 0 ? (e - o.left) / o.width : 0, r = o.startMs + t * (o.endMs - o.startMs);
58
- return Math.min(r, n);
59
- }
60
- }
61
- let a = t[t.length - 1];
62
- return Math.min(a.endMs, n);
63
- };
64
- c.extend(l), c.extend(u);
65
- var j = (e) => {
66
- if (e == null || s(e) && e.trim() === "") return 0;
67
- let t = Number(e);
68
- return Number.isFinite(t) ? t < 0 || t > 1 ? 1 : t : 0;
69
- }, M = (e) => {
70
- if (e == null) return null;
71
- let t = c(e);
72
- return t.isValid() ? t.valueOf() : null;
73
- }, N = (e) => g(e), P = (n, r = t) => {
74
- let a = Number(r?.[n]);
75
- if (a > 0) return a;
76
- if (i(n)) {
77
- let { bottomCellWidthPx: t, bottomCellMs: r } = o(n);
78
- return (t ?? 100) / (r / e);
79
- }
80
- let s = Number(t[n]);
81
- return s > 0 ? s : t.day;
82
- }, F = (e, t) => {
83
- let n = Number(e);
84
- return Number.isFinite(n) ? n : t;
85
- }, I = (e, t = n) => {
86
- let i = Number(r[e]);
87
- return Number.isFinite(i) && i >= 0 ? {
88
- bufferDaysBefore: i,
89
- bufferDaysAfter: i
90
- } : {
91
- bufferDaysBefore: F(t?.bufferDaysBefore, n.bufferDaysBefore),
92
- bufferDaysAfter: F(t?.bufferDaysAfter, n.bufferDaysAfter)
93
- };
94
- }, L = (t = n, r = h()) => {
95
- let i = F(t?.bufferDaysBefore, n.bufferDaysBefore), a = F(t?.bufferDaysAfter, n.bufferDaysAfter), o = N(r);
96
- return {
97
- startMs: o - i * e,
98
- endMs: o + (a + 1) * e
99
- };
100
- }, R = (t, n, r) => {
101
- let i = c(t).isValid() ? t : Date.now(), a = c(n).isValid() ? n : Date.now() + e;
102
- switch (r) {
103
- case "week": return {
104
- startMs: _(i, "isoWeek"),
105
- endMs: g(v(a, "isoWeek") + 1)
106
- };
107
- case "month":
108
- case "quarterMonth": return {
109
- startMs: _(i, "month"),
110
- endMs: g(v(a, "month") + 1)
111
- };
112
- case "quarter": return {
113
- startMs: _(i, "quarter"),
114
- endMs: g(v(a, "quarter") + 1)
115
- };
116
- case "year": return {
117
- startMs: _(i, "year"),
118
- endMs: g(v(a, "year") + 1)
119
- };
120
- default: {
121
- let t = N(i), n = N(a);
122
- return {
123
- startMs: t,
124
- endMs: a === n ? a : n + e
125
- };
126
- }
127
- }
128
- }, z = (t, n, r, a, o) => i(a) && Array.isArray(o) && o.length ? O(t, o) : (t - n) / e * r, B = (t, n, r, a, o, s) => i(a) && Array.isArray(s) && s.length ? k(t, n, s) : (n - t) / e * r, V = (t, n, r, a, o, s) => i(a) && Array.isArray(s) && s.length ? A(t, s, o ?? n) : n + t / r * e, H = ({ viewMode: e, timelineStartMs: t, timelineEndMs: n, pixelsPerDay: r, lowerSegments: i }) => ({
129
- toX: (n) => z(n, t, r, e, i),
130
- toWidth: (n, a) => B(n, a, r, e, t, i),
131
- timeAtX: (a) => V(a, t, r, e, n, i)
132
- }), U = (e) => e !== null && e !== N(e), W = ({ rawStartMs: e, rawEndMs: t, baseStartMs: n, baseEndMs: r }, i) => a(i) && (U(e) || U(t)) ? {
133
- startMs: e,
134
- endMs: t
135
- } : {
136
- startMs: n,
137
- endMs: r
138
- }, G = (t, n) => {
139
- let r = M(t), i = M(n), a = r === null ? null : N(r), o = i === null ? null : N(i) + e;
140
- return {
141
- rawStartMs: r,
142
- rawEndMs: i,
143
- baseStartMs: a,
144
- baseEndMs: o,
145
- invalid: r !== null && i !== null && r > i || a === null || o === null || o <= a
146
- };
147
- };
148
- //#endregion
149
- //#region src/components/Gantt/utils/collapseKeys.ts
150
- function K(e, t) {
151
- if (t == null || t === "" || !e) return !1;
152
- let n = String(t);
153
- return e instanceof Set ? e.has(n) : Array.isArray(e) ? e.includes(n) : !1;
154
- }
155
- function q(e, t) {
156
- let n = String(t), r = e instanceof Set ? e : new Set(Array.isArray(e) ? e : []), i = new Set(r);
157
- return i.has(n) ? i.delete(n) : i.add(n), i;
158
- }
159
- //#endregion
160
- export { C as _, R as a, b, j as c, N as d, B as f, w as g, T as h, W as i, P as l, x as m, q as n, L as o, z as p, G as r, H as s, K as t, I as u, m as v, p as x, y };
@@ -1,46 +0,0 @@
1
- import { useCallback as e, useEffect as t, useMemo as n, useState as r } from "react";
2
- //#region src/components/Gantt/utils/constants.ts
3
- var i = 333, a = 300, o = 300, s = ["select"];
4
- function c(e, t) {
5
- return !Array.isArray(e) || Object.keys(t).length === 0 ? e : e.map((e) => {
6
- if (Array.isArray(e.children) && e.children.length > 0) {
7
- let n = e.children.map((e) => t[e.key] === void 0 ? e : {
8
- ...e,
9
- width: t[e.key]
10
- });
11
- return {
12
- ...e,
13
- children: n,
14
- width: n.reduce((e, t) => e + (t.width || 120), 0)
15
- };
16
- }
17
- return t[e.key] === void 0 ? e : {
18
- ...e,
19
- width: t[e.key]
20
- };
21
- });
22
- }
23
- function l(i) {
24
- let [a, o] = r({}), l = e((e, t) => {
25
- o((n) => ({
26
- ...n,
27
- [e]: t
28
- }));
29
- }, []);
30
- return t(() => {
31
- if (Object.keys(a).length === 0) return;
32
- let e = new Set(i.flatMap((e) => Array.isArray(e.children) && e.children.length > 0 ? e.children.map((e) => e.key) : [e.key]));
33
- Object.keys(a).some((t) => !e.has(t)) && o((t) => {
34
- let n = {};
35
- for (let r of Object.keys(t)) e.has(r) && (n[r] = t[r]);
36
- return n;
37
- });
38
- }, [i]), {
39
- columns: n(() => c(i, a) ?? i, [i, a]),
40
- onColumnResizeEnd: l,
41
- resizable: !0,
42
- disabledResizeColumns: s
43
- };
44
- }
45
- //#endregion
46
- export { o as a, i, c as n, a as o, l as r, s as t };
@@ -1,39 +0,0 @@
1
- //#region src/components/Gantt/GanttChart/utils/constants.ts
2
- var e = 34, t = 34, n = 200, r = 34, i = 68 / 34, a = 1440 * 60 * 1e3, o = "move", s = "resize-start", c = "resize-end", l = 3e4, u = 1.5, d = "__empty__", f = /^#([a-f\d]{3}|[a-f\d]{6})$/i, p = {
3
- bufferDaysBefore: 90,
4
- bufferDaysAfter: 90
5
- }, m = {
6
- halfDay: 30,
7
- sixHour: 14,
8
- hour: 7,
9
- halfHour: 3,
10
- tenMinute: 2,
11
- oneMinute: 0
12
- }, h = {
13
- week: 20,
14
- month: 20,
15
- quarter: 20,
16
- year: 10,
17
- quarterMonth: 20
18
- }, g = {
19
- ...m,
20
- week: h.week * 7,
21
- month: h.month * 30,
22
- quarter: h.quarter * 90,
23
- year: h.year * 365,
24
- quarterMonth: h.quarterMonth * 30
25
- }, _ = {
26
- day: 40,
27
- week: 14,
28
- month: 200 / 30,
29
- quarter: 200 / 90,
30
- year: 200 / 180,
31
- halfDay: 160,
32
- sixHour: 280,
33
- hour: 1200,
34
- halfHour: 2160,
35
- tenMinute: 5760,
36
- oneMinute: 57600
37
- };
38
- //#endregion
39
- export { c as a, r as c, e as d, f, l as g, u as h, o as i, i as l, a as m, _ as n, s as o, n as p, p as r, d as s, g as t, t as u };
@@ -1,25 +0,0 @@
1
- //#region src/components/Gantt/utils/highlightTarget.ts
2
- function e(e, t) {
3
- return e === t ? !0 : !e || !t ? !1 : e.type === t.type && e.id === t.id;
4
- }
5
- function t(e, t) {
6
- return !!e?.id && !!e?.type && t?.id === e.id && t?.type === e.type;
7
- }
8
- function n(e) {
9
- if (!e) return null;
10
- if (e.type === "summary") return e.groupKey !== null && e.groupKey !== void 0 && e.groupKey !== "" ? {
11
- type: "group",
12
- id: String(e.groupKey)
13
- } : null;
14
- if (e.parentId !== null && e.parentId !== void 0 && e.parentId !== "") return {
15
- type: "record",
16
- id: String(e.parentId)
17
- };
18
- let t = e.recordId ?? e.id;
19
- return t != null && t !== "" ? {
20
- type: "record",
21
- id: String(t)
22
- } : null;
23
- }
24
- //#endregion
25
- export { e as n, n as r, t };
@@ -1,31 +0,0 @@
1
- import { t as e } from "../vendors/cssVars-l4-kP_14.js";
2
- import t from "tinycolor2";
3
- //#region src/components/Gantt/utils/theme/resolveGanttTheme.ts
4
- var n = "#0265ff", r = "#121111", i = "#fff", a = (e) => {
5
- if (!e) return;
6
- let a = e.colorPrimary ?? n, o = t(a), s = (e) => o.isValid() ? o.clone().setAlpha(e).toRgbString() : void 0, c = { ...e };
7
- c.todayLineColor === void 0 && (c.todayLineColor = s(.2)), c.toolbarTodayHoverBg === void 0 && (c.toolbarTodayHoverBg = s(.1));
8
- let l = e.colorText ?? r, u = {
9
- colorBgContainer: e.toolbarBg ?? e.colorBgContainer ?? i,
10
- colorText: l,
11
- itemActiveBg: a,
12
- itemActiveColor: l,
13
- itemHoverBg: s(.3)
14
- };
15
- return c.dropdownTheme = e.dropdownTheme === void 0 ? u : {
16
- ...u,
17
- ...e.dropdownTheme
18
- }, c;
19
- }, o = (t) => {
20
- let n = {};
21
- return e(n, "--bsy-gantt-color-text", t.colorText), e(n, "--bsy-gantt-color-text-secondary", t.colorTextSecondary), e(n, "--bsy-gantt-color-split", t.colorSplit), e(n, "--bsy-gantt-color-border", t.colorBorder), e(n, "--bsy-gantt-color-primary", t.colorPrimary), e(n, "--bsy-gantt-color-bg-container", t.colorBgContainer), e(n, "--bsy-gantt-color-bg-weekend", t.colorBgWeekend), e(n, "--bsy-gantt-color-bg-row-hover", t.colorBgRowHover), e(n, "--bsy-gantt-color-today-line", t.todayLineColor), e(n, "--bsy-gantt-toolbar-today-hover-bg", t.toolbarTodayHoverBg), e(n, "--bsy-gantt-toolbar-icon-color", t.toolbarIconColor), e(n, "--bsy-gantt-toolbar-icon-hover-color", t.toolbarIconHoverColor), e(n, "--bsy-gantt-arrow-bg", t.arrowBg), e(n, "--bsy-gantt-toolbar-bg", t.toolbarBg), n;
22
- }, s = (e) => {
23
- let t = a(e);
24
- return t ? o(t) : {};
25
- }, c = (e) => e.colorBorder !== void 0 || e.colorBgContainer !== void 0 || e.colorText !== void 0 || e.colorBgRowHover !== void 0, l = (e) => {
26
- if (!e || !c(e)) return;
27
- let t = {};
28
- return e.colorBorder !== void 0 && (t.colorBorder = e.colorBorder), e.colorBgContainer !== void 0 && (t.colorBgContainer = e.colorBgContainer, t.colorBgHeader = e.colorBgContainer), e.colorText !== void 0 && (t.colorText = e.colorText, t.colorTextHeading = e.colorText), e.colorBgRowHover !== void 0 && (t.colorBgRowHover = e.colorBgRowHover), t;
29
- };
30
- //#endregion
31
- export { a as i, o as n, s as r, l as t };
@@ -1,118 +0,0 @@
1
- import { m as e } from "./constants-mEGQ1U1Q.js";
2
- //#region src/components/Gantt/interface.ts
3
- var t = [
4
- "day",
5
- "week",
6
- "month",
7
- "quarter",
8
- "quarterMonth",
9
- "year"
10
- ], n = [
11
- "halfDay",
12
- "sixHour",
13
- "hour",
14
- "halfHour",
15
- "tenMinute",
16
- "oneMinute"
17
- ], r = [...t, ...n], i = [...[...n].reverse(), ...t], a = "day";
18
- function o(e) {
19
- return r.includes(e);
20
- }
21
- function s(e) {
22
- return n.includes(e);
23
- }
24
- //#endregion
25
- //#region src/components/Gantt/GanttChart/utils/timelineViewConfig.ts
26
- var c = e / 24, l = c / 60, u = {
27
- hour: c,
28
- tenMinute: 10 * l,
29
- oneMinute: l
30
- }, d = {
31
- day: {
32
- tier: "calendar",
33
- headerLayout: "flat",
34
- topGroup: "month",
35
- bottomCellMs: e,
36
- snapUnitMs: e
37
- },
38
- week: {
39
- tier: "calendar",
40
- headerLayout: "flat",
41
- topGroup: "month",
42
- bottomCellMs: 7 * e,
43
- snapUnitMs: e
44
- },
45
- month: {
46
- tier: "calendar",
47
- headerLayout: "flat",
48
- topGroup: "year",
49
- bottomCellMs: 30 * e,
50
- snapUnitMs: e
51
- },
52
- quarter: {
53
- tier: "calendar",
54
- headerLayout: "flat",
55
- topGroup: "year",
56
- bottomCellMs: 90 * e,
57
- snapUnitMs: e
58
- },
59
- quarterMonth: {
60
- tier: "calendar",
61
- headerLayout: "quarterNested",
62
- topGroup: "quarter",
63
- bottomCellMs: 30 * e,
64
- bottomCellWidthPx: 100,
65
- snapUnitMs: e
66
- },
67
- year: {
68
- tier: "calendar",
69
- headerLayout: "flat",
70
- topGroup: "year",
71
- bottomCellMs: 180 * e,
72
- snapUnitMs: e
73
- },
74
- halfDay: {
75
- tier: "subDay",
76
- headerLayout: "dayNested",
77
- topGroup: "day",
78
- bottomCellMs: 12 * c,
79
- snapUnitMs: u.hour
80
- },
81
- sixHour: {
82
- tier: "subDay",
83
- headerLayout: "dayNested",
84
- topGroup: "day",
85
- bottomCellMs: 6 * c,
86
- snapUnitMs: u.hour
87
- },
88
- hour: {
89
- tier: "subDay",
90
- headerLayout: "dayNested",
91
- topGroup: "day",
92
- bottomCellMs: c,
93
- snapUnitMs: u.hour
94
- },
95
- halfHour: {
96
- tier: "subDay",
97
- headerLayout: "hourNested",
98
- topGroup: "hour",
99
- bottomCellMs: 30 * l,
100
- snapUnitMs: u.tenMinute
101
- },
102
- tenMinute: {
103
- tier: "subDay",
104
- headerLayout: "hourNested",
105
- topGroup: "hour",
106
- bottomCellMs: 10 * l,
107
- snapUnitMs: u.tenMinute
108
- },
109
- oneMinute: {
110
- tier: "subDay",
111
- headerLayout: "hourNested",
112
- topGroup: "hour",
113
- bottomCellMs: l,
114
- snapUnitMs: u.oneMinute
115
- }
116
- }, f = (e) => d[o(e) ? e : "day"], p = (e) => o(e) ? s(e) : f(e).tier === "subDay", m = (e) => e === "quarterMonth", h = (e) => f(e).snapUnitMs, g = (e) => f(e).bottomCellMs;
117
- //#endregion
118
- export { h as a, a as c, s as d, g as i, i as l, m as n, r as o, p as r, t as s, f as t, o as u };
@@ -1,7 +0,0 @@
1
- import "../../vendors/version-CFii9VTt.js";
2
- import { a as e, c as t, d as n, i as r, l as i, o as a, p as o, s, u as c } from "../constants-mEGQ1U1Q.js";
3
- import { a as l, i as u, n as d, o as f, r as p, t as m } from "../columnResize-Bkenlbab.js";
4
- import { n as h, r as g, t as _ } from "../highlightTarget-D3Nf9_7S.js";
5
- import { c as v, o as y, r as b, s as x } from "../timelineViewConfig-DNt7yi83.js";
6
- import { n as S, r as C, t as w } from "../collapseKeys-BV_8sIA-.js";
7
- export { y as ALL_GANTT_MODES, x as CALENDAR_TIER_MODES, v as DEFAULT_GANTT_MODE, u as DEFAULT_TABLE_WIDTH_FALLBACK, r as DRAG_MODE_MOVE, e as DRAG_MODE_RESIZE_END, a as DRAG_MODE_RESIZE_START, s as EMPTY_GROUP_VALUE, t as GANTT_DEFAULT_ROW_HEIGHT, m as GANTT_TABLE_DISABLED_RESIZE_COLUMNS, i as GANTT_TABLE_HEADER_ROW_SPAN, c as HEADER_BOTTOM_HEIGHT, n as HEADER_TOP_HEIGHT, l as MIN_CHART_WIDTH, o as MIN_TABLE_WIDTH, f as TABLE_WIDTH_PLACEHOLDER, w as isGroupCollapsed, _ as isHighlightMatch, h as isSameHighlightTarget, b as isSubDayViewMode, d as mergeColumnWidths, C as normalizeTaskDateRange, g as resolveChartHighlightTarget, S as toggleCollapsedKey, p as useGanttTableColumnResize };
@@ -1,3 +0,0 @@
1
- import "../../../vendors/version-CFii9VTt.js";
2
- import { i as e, n as t, r as n, t as r } from "../../theme-B7Iap-tZ.js";
3
- export { t as mapGanttThemeToCssVars, e as resolveGanttTheme, n as resolveGanttThemeVars, r as resolveTableThemeFromGantt };