@ynput/ayon-frontend-shared 0.6.0 → 0.6.1

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 (89) hide show
  1. package/dist/ContextMenu.es.js +34 -16
  2. package/dist/DetailsPanel.es.js +292 -298
  3. package/dist/Feed.es.js +179 -50
  4. package/dist/ListTable.es.js +32 -35
  5. package/dist/NewEntity.es.js +1256 -11
  6. package/dist/ProjectTreeTable.es.js +4451 -2965
  7. package/dist/SimpleTable.es.js +8 -7
  8. package/dist/Slicer.es.js +451 -147
  9. package/dist/Views.es.js +918 -310
  10. package/dist/chunks/Actions.es.js +9 -4
  11. package/dist/chunks/ColumnDropIndicator.es.js +174 -328
  12. package/dist/chunks/ColumnDropIndicator.styled.es.js +281 -0
  13. package/dist/chunks/ColumnHeaderMenuUI.es.js +52 -0
  14. package/dist/chunks/ContextMenuContextInstance.es.js +12 -0
  15. package/dist/chunks/DeleteEntitiesConfirmDialog.es.js +229 -0
  16. package/dist/chunks/DeleteEntitiesContextInstance.es.js +827 -0
  17. package/dist/chunks/EmptyPlaceholder.es.js +4 -4
  18. package/dist/chunks/EntityPath.es.js +58 -53
  19. package/dist/chunks/EntityPickerDialog.es.js +24 -20
  20. package/dist/chunks/EntityTooltip.es.js +20 -13
  21. package/dist/chunks/EntityUpdatesContext.es.js +38 -96
  22. package/dist/chunks/Feed.es.js +1495 -1439
  23. package/dist/chunks/FilterErrorActions.es.js +25 -229
  24. package/dist/chunks/Menu.es.js +21 -17
  25. package/dist/chunks/MenuContext.es.js +14 -65
  26. package/dist/chunks/MenuItem.es.js +34 -24
  27. package/dist/chunks/MetaWidget.es.js +2835 -4301
  28. package/dist/chunks/NewEntityContextInstance.es.js +11 -0
  29. package/dist/chunks/PlayableIcon.es.js +1532 -1594
  30. package/dist/chunks/ProjectContext.es.js +102 -66
  31. package/dist/chunks/RepresentationsList.es.js +1 -1
  32. package/dist/chunks/ReviewablesSelector.es.js +457 -458
  33. package/dist/chunks/SimpleForm.es.js +9 -9
  34. package/dist/chunks/SimpleTable.es.js +15 -13
  35. package/dist/chunks/Slicer.es.js +163 -154
  36. package/dist/chunks/TableSettingsFallback.es.js +25 -13
  37. package/dist/chunks/ThumbnailSimple.es.js +150 -261
  38. package/dist/chunks/VersionUploadContextInstance.es.js +12 -0
  39. package/dist/chunks/VideoPlayer.es.js +24 -28
  40. package/dist/chunks/Watchers.es.js +384 -389
  41. package/dist/chunks/entityDefinitions.es.js +2 -350
  42. package/dist/chunks/extractVersionFromFilename.es.js +28 -0
  43. package/dist/chunks/getBundleMode.es.js +61 -16
  44. package/dist/chunks/getUris.es.js +737 -712
  45. package/dist/chunks/searchTerms.es.js +57 -56
  46. package/dist/chunks/useAttributeEnums.es.js +4 -4
  47. package/dist/chunks/useCreateContextMenu.es.js +66 -90
  48. package/dist/chunks/useHierarchySelection.es.js +24 -0
  49. package/dist/chunks/useLoadModule.es.js +74 -0
  50. package/dist/chunks/useQueryArgumentChangeLoading.es.js +11 -0
  51. package/dist/chunks/versionUploadHelpers.es.js +16 -42
  52. package/dist/chunks/viewUpdateHelper.es.js +67 -50
  53. package/dist/components.es.js +1425 -999
  54. package/dist/context.es.js +791 -80
  55. package/dist/hooks.es.js +115 -120
  56. package/dist/index.es.js +19 -23
  57. package/dist/types/Actions.d.ts +7 -7
  58. package/dist/types/ContextMenu.d.ts +11 -8
  59. package/dist/types/DetailsPanel.d.ts +102 -9
  60. package/dist/types/EntityPickerDialog.d.ts +7 -7
  61. package/dist/types/Feed.d.ts +11 -8
  62. package/dist/types/ListTable.d.ts +7 -7
  63. package/dist/types/NewEntity.d.ts +16 -10
  64. package/dist/types/ProjectTreeTable.d.ts +22 -115
  65. package/dist/types/RepresentationsList.d.ts +7 -7
  66. package/dist/types/SimpleTable.d.ts +11 -8
  67. package/dist/types/Slicer.d.ts +10 -7
  68. package/dist/types/Views.d.ts +10 -7
  69. package/dist/types/api.d.ts +132 -120
  70. package/dist/types/components.d.ts +13 -8
  71. package/dist/types/context.d.ts +56 -16
  72. package/dist/types/hooks.d.ts +7 -7
  73. package/dist/types/index.d.ts +7 -7
  74. package/dist/types/util.d.ts +12 -7
  75. package/dist/util.es.js +72 -71
  76. package/package.json +1 -1
  77. package/dist/chunks/DeleteEntitiesContext.es.js +0 -748
  78. package/dist/chunks/DetailsPanelContext.es.js +0 -155
  79. package/dist/chunks/GlobalContext.es.js +0 -52
  80. package/dist/chunks/NewEntityContext.es.js +0 -1242
  81. package/dist/chunks/ProjectFoldersContext.es.js +0 -134
  82. package/dist/chunks/ProjectFoldersContextInstance.es.js +0 -7
  83. package/dist/chunks/VersionUploadContext.es.js +0 -232
  84. package/dist/chunks/ViewsContext.es.js +0 -878
  85. package/dist/chunks/uriUtils.es.js +0 -48
  86. package/dist/chunks/useColumnDragRestriction.es.js +0 -158
  87. package/dist/chunks/useLocalStorage.es.js +0 -355
  88. package/dist/chunks/useSessionStorage.es.js +0 -61
  89. /package/dist/{useCreateContextMenu.css → ContextMenuContextInstance.css} +0 -0
@@ -4,14 +4,19 @@ import x, { keyframes as ge } from "styled-components";
4
4
  import { useRef as fe, useMemo as f, useState as $, useEffect as me } from "react";
5
5
  import B from "clsx";
6
6
  import { toast as w } from "react-toastify";
7
- import { be as he } from "./searchTerms.es.js";
7
+ import { bi as he } from "./searchTerms.es.js";
8
8
  import { d0 as be, bb as ve, cP as ye, bc as xe, b7 as Ae } from "./getUris.es.js";
9
9
  import "primereact/confirmdialog";
10
10
  import { upperFirst as Q } from "lodash";
11
11
  import { u as we } from "./useActionTriggers.es.js";
12
12
  import { S as R } from "./SimpleFormDialog.es.js";
13
13
  import "uuid";
14
- import { u as Ce } from "./GlobalContext.es.js";
14
+ import "@module-federation/enhanced/runtime";
15
+ import { d as Ce } from "./DeleteEntitiesContextInstance.es.js";
16
+ import "semver";
17
+ import "./ContextMenuContextInstance.es.js";
18
+ import "react-dom";
19
+ import "react-redux";
15
20
  const Se = x.div`
16
21
  position: relative;
17
22
  width: fit-content;
@@ -246,7 +251,7 @@ const Se = x.div`
246
251
  isPlaceholder: !0,
247
252
  icon: { type: "material-symbols", name: "sync" },
248
253
  groupLabel: ""
249
- }, Xe = ({
254
+ }, oo = ({
250
255
  entities: o,
251
256
  entityType: s,
252
257
  entitySubTypes: a,
@@ -438,5 +443,5 @@ const Se = x.div`
438
443
  ] });
439
444
  };
440
445
  export {
441
- Xe as A
446
+ oo as A
442
447
  };
@@ -1,344 +1,190 @@
1
- import { createContext as I, forwardRef as S, useRef as _, useState as M, useEffect as R } from "react";
2
- import { jsxs as g, jsx as i, Fragment as y } from "react/jsx-runtime";
3
- import { Button as v, Icon as D } from "@ynput/ayon-react-components";
4
- import h from "clsx";
5
- import c from "styled-components";
6
- import { u as O } from "./MenuContext.es.js";
7
- import { M as P, a as z } from "./Menu.es.js";
8
- import "./MenuItem.es.js";
9
- import "./useLocalStorage.es.js";
10
- import "@module-federation/enhanced/runtime";
11
- import "semver";
12
- import { R as C, D as w } from "./realtimeUpdatesUtils.es.js";
1
+ import { useMemo as A, useRef as x, useCallback as h, useState as v, useEffect as T } from "react";
2
+ import "react-toastify";
13
3
  import "lodash";
14
4
  import "primereact/confirmdialog";
15
- import "react-toastify";
16
- import { c as A } from "./copyToClipboard.es.js";
5
+ import { g as p } from "./parseHtmlToPlainTextWithLinks.es.js";
6
+ import { bj as E } from "./searchTerms.es.js";
17
7
  import "uuid";
18
- import "./searchTerms.es.js";
19
- import { createPortal as E } from "react-dom";
20
- import { useDndContext as N } from "@dnd-kit/core";
21
- const F = (t) => {
22
- const o = t.getIsPinned(), n = t.id !== C && t.id !== w ? -30 : 0;
23
- return {
24
- left: o === "left" ? `${t.getStart("left") + n}px` : void 0,
25
- right: o === "right" ? `${t.getAfter("right")}px` : void 0,
26
- position: o ? "sticky" : "relative",
27
- width: t.getSize(),
28
- zIndex: o ? 100 : 0
29
- };
30
- }, B = (t) => `calc(var(--col-${t}-size) * 1px)`, ht = I(void 0), gt = S(({ ...t }, o) => /* @__PURE__ */ g(
31
- "svg",
32
- {
33
- width: "25",
34
- height: "22",
35
- viewBox: "0 0 25 22",
36
- fill: "none",
37
- xmlns: "http://www.w3.org/2000/svg",
38
- ...t,
39
- ref: o,
40
- children: [
41
- /* @__PURE__ */ i(
42
- "path",
43
- {
44
- d: "M0.938178 10.6543C0.816721 5.48877 5.1207 1.23771 10.4975 1.11128C15.8743 0.98486 20.3734 5.02894 20.4948 10.1945C20.6163 15.36 16.3122 19.6111 10.9354 19.7376C9.75118 19.7654 8.61022 19.5914 7.5495 19.2479C7.33438 19.1783 7.0983 19.1794 6.88174 19.2638L5.242 19.9017C4.31715 20.2614 3.35776 19.4629 3.54364 18.4881L3.72118 17.557C3.78241 17.2359 3.67515 16.9129 3.45681 16.6832C1.94083 15.0885 0.992941 12.9834 0.938178 10.6543Z",
45
- stroke: "white",
46
- strokeWidth: "1.5"
47
- }
48
- ),
49
- /* @__PURE__ */ i(
50
- "path",
51
- {
52
- d: "M15.3853 4.70168C19.9873 4.59348 23.892 8.06066 23.9977 12.5556C24.0445 14.5475 23.3301 16.3832 22.121 17.8111C22.0428 17.9034 22.0185 18.0146 22.041 18.108L22.2908 19.1496C22.5495 20.2281 21.5204 21.1699 20.469 20.8169L18.8159 20.2617C18.7509 20.2398 18.6726 20.2401 18.5934 20.2693C17.7115 20.5946 16.7586 20.7823 15.764 20.8057C11.1621 20.9139 7.2573 17.4467 7.1516 12.9517C7.04592 8.45675 10.7834 4.80988 15.3853 4.70168Z",
53
- fill: "white",
54
- stroke: "#1C2026",
55
- strokeWidth: "1.5"
56
- }
57
- ),
58
- /* @__PURE__ */ i(
59
- "path",
60
- {
61
- d: "M20.1373 12.6133C19.942 15.1992 17.8037 17.2074 15.2107 17.2402L14.7621 17.2459",
62
- stroke: "#232323",
63
- strokeWidth: "1.5",
64
- strokeLinecap: "round"
65
- }
66
- )
67
- ]
68
- }
69
- )), T = c(v)`
70
- width: 24px;
71
- height: 24px;
72
- padding: 2px;
73
-
74
- &.action {
75
- padding: 0px;
76
- display: flex;
77
- background-color: unset;
78
- }
79
-
80
- &:hover {
81
- background-color: var(--md-sys-color-surface-container-hover) !important;
82
- }
83
-
84
- &.pin-button .material-symbols-outlined.icon {
85
- font-variation-settings: 'FILL' 1, 'wght' 200, 'GRAD' 200, 'opsz' 10;
86
- }
87
-
88
- &.selected {
89
- display: flex !important;
90
- }
91
- `, xt = ({ selected: t, style: o, ...n }) => /* @__PURE__ */ i(
92
- T,
93
- {
94
- ...n,
95
- selected: t,
96
- className: h(n.className, "action", { selected: t }),
97
- variant: "text",
98
- style: { ...o }
99
- }
100
- ), H = c(v)`
101
- background-color: unset !important;
102
- z-index: 110;
103
- position: relative;
104
- padding: 2px;
105
- width: 24px;
106
- height: 24px;
107
-
108
- &.hasIcon {
109
- padding: 2px;
110
- }
111
-
112
- &:hover,
113
- &.active {
114
- background-color: var(--md-sys-color-surface-container-hover) !important;
115
- }
116
-
117
- ${({ $isOpen: t }) => t && `
118
- background-color: var(--md-sys-color-surface-container-hover) !important;
119
- `}
120
- `, Ct = ({ menuItems: t, menuId: o, className: n }) => {
121
- const { toggleMenuOpen: r, menuOpen: d } = O(), a = _(null), p = d === o;
122
- return t.length === 0 ? null : /* @__PURE__ */ g(y, { children: [
123
- /* @__PURE__ */ i(
124
- H,
8
+ import { jsx as L } from "react/jsx-runtime";
9
+ import "clsx";
10
+ import "./PlayableIcon.es.js";
11
+ import "@ynput/ayon-react-components";
12
+ import "lexical";
13
+ import "@lexical/markdown";
14
+ import "@lexical/react/LexicalBlockWithAlignableContents";
15
+ import "@lexical/react/LexicalDecoratorBlockNode";
16
+ import "match-sorter";
17
+ import "date-fns";
18
+ import "@lexical/code";
19
+ import "@lexical/list";
20
+ import "@lexical/rich-text";
21
+ import "@lexical/selection";
22
+ import "@lexical/utils";
23
+ import "./getUris.es.js";
24
+ import "react-router-dom";
25
+ import { a as S, b as k } from "./MetaWidget.es.js";
26
+ import "@module-federation/enhanced/runtime";
27
+ import "./DeleteEntitiesContextInstance.es.js";
28
+ import "semver";
29
+ import "./ContextMenuContextInstance.es.js";
30
+ import { createPortal as R } from "react-dom";
31
+ import "react-redux";
32
+ import "@tanstack/react-table";
33
+ import { useDndContext as D } from "@dnd-kit/core";
34
+ import { a as I } from "./ColumnDropIndicator.styled.es.js";
35
+ const O = ["string", "integer", "float"], B = (o, s, t, n) => (t || O).includes(o.data.type || "") && (!s || o.scope?.includes(s)) ? n ? E(o.data) : !0 : !1, ht = ({
36
+ allowedTypes: o,
37
+ enumOnly: s,
38
+ scope: t
39
+ }) => {
40
+ const { columnOrder: n } = S(), { attribFields: a } = k();
41
+ return A(
42
+ () => [
125
43
  {
126
- ref: a,
127
- className: n,
128
- onClick: (s) => {
129
- s.stopPropagation(), r(o);
130
- },
131
- onPointerDown: (s) => s.stopPropagation(),
132
- icon: "more_horiz",
133
- $isOpen: p
134
- }
135
- ),
136
- /* @__PURE__ */ i(
137
- P,
44
+ value: "folderType",
45
+ label: "Folder type",
46
+ icon: p("folder"),
47
+ scopes: ["folder", "task"]
48
+ },
138
49
  {
139
- target: a.current,
140
- id: o,
141
- align: "left",
142
- onClose: (s) => {
143
- s.stopPropagation(), r(!1);
144
- },
145
- children: /* @__PURE__ */ i(z, { menu: t, onClose: () => r(!1) })
146
- }
147
- )
148
- ] });
149
- }, U = c.tfoot`
150
- display: grid !important;
151
- position: sticky;
152
- bottom: 0;
153
- z-index: 10;
154
- background-color: var(--md-sys-color-surface-container-lowest);
155
- `, W = c.tr`
156
- display: flex;
157
- background-color: var(--md-sys-color-surface-container-low);
158
-
159
- &.clickable {
160
- cursor: pointer;
161
- }
162
- `, $ = c.td`
163
- position: relative;
164
- box-shadow: inset 1px 1px 0 0 var(--md-sys-color-surface-container);
165
- background-color: var(--md-sys-color-surface-container-lowest);
166
- display: flex;
167
- align-items: center;
168
- height: 34px !important;
169
- padding: 0 !important;
170
- overflow: visible;
171
-
172
- &.last-pinned-left {
173
- box-shadow: inset 1px 1px 0 0 var(--md-sys-color-surface-container),
174
- inset -2px 0 0 0 var(--md-sys-color-surface-container);
175
- }
176
-
177
- /* match the special fixed widths used by header/body cells */
178
- &.__row_selection__ {
179
- width: 20px !important;
180
- min-width: unset;
181
- }
182
- &.drag-handle {
183
- width: 24px !important;
184
- min-width: unset;
185
- }
186
- `, V = c.div`
187
- display: flex;
188
- align-items: center;
189
- gap: var(--base-gap-small);
190
- width: 100%;
191
- height: 100%;
192
- padding: 0 8px;
193
- overflow: hidden;
194
- white-space: nowrap;
195
- font-size: 14px;
196
- color: var(--md-sys-color-on-surface-variant);
197
-
198
- .label {
199
- color: var(--md-sys-color-outline);
200
- }
201
- .value {
202
- font-weight: 600;
203
- color: var(--md-sys-color-on-surface);
204
- }
205
- `, b = c.div`
206
- width: calc(100% - 1px);
207
- height: calc(100% - 3px);
208
- margin-left: 1px;
209
-
210
- &.selection {
211
- width: calc(100% - 3px);
212
- margin-left: 1px;
213
- }
214
- `, j = c(b)`
215
- position: absolute;
216
- inset: 1px 0 2px 1px;
217
- width: auto;
218
- height: auto;
219
- margin: 0;
220
- pointer-events: none;
221
- `, vt = ({
222
- columnVirtualizer: t,
223
- table: o,
224
- virtualPaddingLeft: n,
225
- virtualPaddingRight: r,
226
- renderCellContent: d,
227
- onClick: a,
228
- isLoading: p,
229
- statsLoading: s,
230
- error: l
50
+ value: "taskType",
51
+ label: "Task type",
52
+ icon: p("task"),
53
+ scopes: ["task", "version"]
54
+ },
55
+ {
56
+ value: "productType",
57
+ label: "Product type",
58
+ icon: p("product"),
59
+ scopes: ["product", "version"]
60
+ },
61
+ // {
62
+ // value: 'version',
63
+ // label: 'Version',
64
+ // icon: getAttributeIcon('version'),
65
+ // scopes: ['version'],
66
+ // },
67
+ // {
68
+ // value: 'author',
69
+ // label: 'Author',
70
+ // icon: getAttributeIcon('author'),
71
+ // scopes: ['version'],
72
+ // },
73
+ {
74
+ value: "assignees",
75
+ label: "Assignee",
76
+ icon: p("assignees"),
77
+ scopes: ["task"]
78
+ },
79
+ {
80
+ value: "status",
81
+ label: "Status",
82
+ icon: p("status"),
83
+ scopes: ["task", "version", "folder", "product"]
84
+ },
85
+ {
86
+ value: "tags",
87
+ label: "Tags",
88
+ icon: p("tags"),
89
+ scopes: ["task", "version", "folder", "product"]
90
+ },
91
+ ...a.filter((r) => B(r, t, o, s)).map((r) => ({
92
+ value: "attrib." + r.name,
93
+ label: r.data.title || r.name,
94
+ icon: p(r.name)
95
+ }))
96
+ ].filter((r) => !t || ("scopes" in r ? r.scopes.includes(t) : !0)).sort((r, m) => {
97
+ const u = n.indexOf(r.value), c = n.indexOf(m.value);
98
+ return u === -1 && c === -1 ? 0 : u === -1 ? 1 : c === -1 ? -1 : u - c;
99
+ }),
100
+ [a, n, o, s, t]
101
+ );
102
+ }, P = "data-column-dnd-container", y = 100, Ct = ({
103
+ columnPinning: o,
104
+ columnSizing: s
231
105
  }) => {
232
- const u = [
233
- ...o.getLeftVisibleLeafColumns(),
234
- ...o.getCenterVisibleLeafColumns(),
235
- ...o.getRightVisibleLeafColumns()
236
- ], f = t.getVirtualItems(), x = l instanceof Error ? l.message : typeof l == "string" ? l : "";
237
- return /* @__PURE__ */ i(U, { children: /* @__PURE__ */ g(
238
- W,
239
- {
240
- className: h({ clickable: !!a }),
241
- onClick: a,
242
- "data-tooltip": a ? "Power feature" : void 0,
243
- children: [
244
- n ? /* @__PURE__ */ i("td", { style: { display: "flex", width: n } }) : null,
245
- f.map((m) => {
246
- const e = u[m.index];
247
- if (!e) return null;
248
- const k = e.id === w || e.id === C, L = e.getIsPinned() === "left" && e.getIsLastColumn("left");
249
- return /* @__PURE__ */ i(
250
- $,
251
- {
252
- className: h(e.id, { "last-pinned-left": L }),
253
- style: { ...F(e), width: B(e.id) },
254
- children: p ? /* @__PURE__ */ i(
255
- b,
256
- {
257
- className: h("loading", "shimmer-dark", {
258
- selection: e.id === C
259
- })
260
- }
261
- ) : l ? e.id === "name" ? /* @__PURE__ */ g(V, { style: { color: "var(--md-sys-color-error)" }, children: [
262
- "Error loading stats",
263
- /* @__PURE__ */ i(
264
- D,
265
- {
266
- icon: "info",
267
- style: { fontSize: 16, cursor: "help" },
268
- "data-tooltip": x,
269
- "data-tooltip-as": "markdown"
270
- }
271
- ),
272
- /* @__PURE__ */ i(
273
- v,
274
- {
275
- icon: "content_copy",
276
- "data-tooltip": "Copy error message",
277
- onClick: () => A(x),
278
- iconProps: { style: { fontSize: 16 } },
279
- style: { padding: 2 },
280
- variant: "text"
281
- }
282
- )
283
- ] }) : null : !k && /* @__PURE__ */ g(y, { children: [
284
- d?.(e.id),
285
- s && /* @__PURE__ */ i(j, { className: h("loading", "shimmer-dark") })
286
- ] })
287
- },
288
- e.id
289
- );
290
- }),
291
- r ? /* @__PURE__ */ i("td", { style: { display: "flex", width: r } }) : null
292
- ]
293
- }
294
- ) });
295
- }, q = "th[data-column-id]", G = c.div`
296
- position: fixed;
297
- z-index: 2000;
298
- pointer-events: none;
299
- width: 2px;
300
- background-color: var(--md-sys-color-primary);
301
- `, Z = (t, o) => {
302
- const n = t.getBoundingClientRect(), r = t.closest("table")?.getBoundingClientRect() ?? n;
106
+ const t = x(null), n = x(null), a = h(() => {
107
+ const e = o.left || [];
108
+ let l = 24;
109
+ return e.forEach((g) => {
110
+ l += s[g] || 150;
111
+ }), l;
112
+ }, [o.left, s]), r = h(
113
+ ({ transform: e, activeNodeRect: l, draggingNodeRect: g, active: d }) => {
114
+ if (t.current === null || !l || d?.data.current?.type && d.data.current.type !== "column") return e;
115
+ let i = n.current;
116
+ i === null && (i = (document.querySelector(`[${P}]`)?.getBoundingClientRect().left ?? 0) + a());
117
+ const C = g?.left ?? l.left;
118
+ if (t.current) {
119
+ const b = C + l.width + e.x, f = i + y;
120
+ if (b > f)
121
+ return { ...e, x: f - C - l.width };
122
+ } else {
123
+ const b = C + e.x, f = i - y;
124
+ if (b < f)
125
+ return { ...e, x: f - C };
126
+ }
127
+ return e;
128
+ },
129
+ [a]
130
+ ), m = h(
131
+ (e) => {
132
+ if (e === null) {
133
+ t.current = null;
134
+ return;
135
+ }
136
+ t.current = o.left?.includes(e) || !1;
137
+ },
138
+ [o.left]
139
+ ), u = h(() => {
140
+ t.current = null, n.current = null;
141
+ }, []), c = h((e) => {
142
+ n.current = e;
143
+ }, []);
144
+ return {
145
+ restrictToSection: r,
146
+ setDragPinnedState: m,
147
+ clearDragPinnedState: u,
148
+ activePinnedState: t,
149
+ setCachedBoundary: c
150
+ };
151
+ }, F = (o, s) => {
152
+ const t = o.getBoundingClientRect(), n = o.closest("table")?.getBoundingClientRect() ?? t;
303
153
  return {
304
- left: o === "left" ? n.left - 1 : n.right - 1,
305
- top: r.top,
306
- height: r.height
154
+ left: s === "left" ? t.left - 1 : t.right - 1,
155
+ top: n.top,
156
+ height: n.height
307
157
  };
308
- }, yt = () => {
309
- const { active: t, over: o } = N(), n = t?.data?.current?.type === "column" ? String(t.id) : null, r = o ? String(o.id) : null, [d, a] = M(null);
310
- return R(() => {
311
- if (!n || !r || n === r) {
312
- a(null);
158
+ }, _ = "th[data-column-id]", bt = () => {
159
+ const { active: o, over: s } = D(), t = o?.data?.current?.type === "column" ? String(o.id) : null, n = s ? String(s.id) : null, [a, r] = v(null);
160
+ return T(() => {
161
+ if (!t || !n || t === n) {
162
+ r(null);
313
163
  return;
314
164
  }
315
- let p = 0;
316
- const s = () => {
317
- const l = Array.from(
318
- document.querySelectorAll(q)
319
- ), u = l.find((f) => f.dataset.columnId === r);
320
- if (u) {
321
- const f = l.findIndex((e) => e.dataset.columnId === n), x = l.indexOf(u), m = Z(u, f < x ? "right" : "left");
322
- a(
323
- (e) => e && e.left === m.left && e.top === m.top && e.height === m.height ? e : m
165
+ let m = 0;
166
+ const u = () => {
167
+ const c = Array.from(
168
+ document.querySelectorAll(_)
169
+ ), e = c.find((l) => l.dataset.columnId === n);
170
+ if (e) {
171
+ const l = c.findIndex((i) => i.dataset.columnId === t), g = c.indexOf(e), d = F(e, l < g ? "right" : "left");
172
+ r(
173
+ (i) => i && i.left === d.left && i.top === d.top && i.height === d.height ? i : d
324
174
  );
325
175
  }
326
- p = requestAnimationFrame(s);
176
+ m = requestAnimationFrame(u);
327
177
  };
328
- return s(), () => cancelAnimationFrame(p);
329
- }, [n, r]), d ? E(/* @__PURE__ */ i(G, { style: d }), document.body) : null;
178
+ return u(), () => cancelAnimationFrame(m);
179
+ }, [t, n]), a ? R(/* @__PURE__ */ L(I, { style: a }), document.body) : null;
330
180
  };
331
181
  export {
332
- Ct as C,
333
- ht as F,
334
- xt as H,
335
- gt as S,
336
- vt as T,
337
- H as a,
338
- F as b,
339
- yt as c,
340
- G as d,
341
- q as e,
342
- Z as f,
343
- B as g
182
+ _ as C,
183
+ bt as T,
184
+ P as a,
185
+ O as b,
186
+ ht as c,
187
+ F as g,
188
+ B as i,
189
+ Ct as u
344
190
  };