laif-ds 0.1.35 → 0.1.37
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.
- package/dist/_virtual/index.js +5 -2
- package/dist/_virtual/index3.js +2 -7
- package/dist/_virtual/index4.js +2 -5
- package/dist/_virtual/index5.js +4 -4
- package/dist/_virtual/index6.js +5 -2
- package/dist/_virtual/index7.js +5 -2
- package/dist/_virtual/index8.js +5 -0
- package/dist/_virtual/index9.js +5 -0
- package/dist/_virtual/use-sync-external-store-shim.development.js +5 -0
- package/dist/_virtual/use-sync-external-store-shim.production.js +5 -0
- package/dist/components/ui/checkbox.js +12 -12
- package/dist/components/ui/gantt/components/Chart/Chart.js +1 -1
- package/dist/components/ui/message-input.js +1 -1
- package/dist/components/ui/tables/data-cross-table/data-cross-table.js +348 -0
- package/dist/components/ui/tables/data-cross-table/edit-controls.js +47 -0
- package/dist/components/ui/tables/data-cross-table/editable-input.js +100 -0
- package/dist/components/ui/tables/data-cross-table/truncated-text.js +19 -0
- package/dist/index.d.ts +30 -4
- package/dist/index.js +1 -1
- package/dist/node_modules/@floating-ui/core/dist/floating-ui.core.js +126 -122
- package/dist/node_modules/@floating-ui/dom/dist/floating-ui.dom.js +10 -6
- package/dist/node_modules/@radix-ui/react-accordion/dist/index.js +44 -42
- package/dist/node_modules/@radix-ui/react-avatar/dist/index.js +33 -43
- package/dist/node_modules/@radix-ui/react-checkbox/dist/index.js +237 -120
- package/dist/node_modules/@radix-ui/react-collapsible/dist/index.js +17 -16
- package/dist/node_modules/@radix-ui/react-context-menu/dist/index.js +95 -94
- package/dist/node_modules/@radix-ui/react-dialog/dist/index.js +20 -19
- package/dist/node_modules/@radix-ui/react-dropdown-menu/dist/index.js +3 -3
- package/dist/node_modules/@radix-ui/react-hover-card/dist/index.js +14 -13
- package/dist/node_modules/@radix-ui/react-menu/dist/index.js +136 -136
- package/dist/node_modules/@radix-ui/react-menubar/dist/index.js +70 -68
- package/dist/node_modules/@radix-ui/react-navigation-menu/dist/index.js +66 -64
- package/dist/node_modules/@radix-ui/react-popover/dist/index.js +10 -9
- package/dist/node_modules/@radix-ui/react-presence/dist/index.js +16 -16
- package/dist/node_modules/@radix-ui/react-primitive/dist/index.js +11 -10
- package/dist/node_modules/@radix-ui/react-radio-group/dist/index.js +161 -146
- package/dist/node_modules/@radix-ui/react-roving-focus/dist/index.js +87 -84
- package/dist/node_modules/@radix-ui/react-select/dist/index.js +269 -257
- package/dist/node_modules/@radix-ui/react-slider/dist/index.js +3 -3
- package/dist/node_modules/@radix-ui/react-slot/dist/index.js +29 -28
- package/dist/node_modules/@radix-ui/react-switch/dist/index.js +101 -86
- package/dist/node_modules/@radix-ui/react-tabs/dist/index.js +23 -22
- package/dist/node_modules/@radix-ui/react-toggle/dist/index.js +17 -16
- package/dist/node_modules/@radix-ui/react-toggle-group/dist/index.js +25 -23
- package/dist/node_modules/@radix-ui/react-tooltip/dist/index.js +77 -76
- package/dist/node_modules/@radix-ui/react-use-controllable-state/dist/index.js +43 -21
- package/dist/node_modules/@radix-ui/react-use-is-hydrated/dist/index.js +16 -0
- package/dist/node_modules/@radix-ui/react-visually-hidden/dist/index.js +18 -18
- package/dist/node_modules/@tanstack/react-virtual/dist/esm/index.js +36 -0
- package/dist/node_modules/@tanstack/virtual-core/dist/esm/index.js +491 -0
- package/dist/node_modules/@tanstack/virtual-core/dist/esm/utils.js +53 -0
- package/dist/node_modules/classnames/index.js +1 -1
- package/dist/node_modules/hast-util-to-jsx-runtime/lib/index.js +1 -1
- package/dist/node_modules/property-information/lib/html.js +9 -9
- package/dist/node_modules/react-hook-form/dist/index.esm.js +88 -88
- package/dist/node_modules/react-is/index.js +1 -1
- package/dist/node_modules/react-resizable-panels/dist/react-resizable-panels.browser.esm.js +830 -801
- package/dist/node_modules/recharts/es6/util/ReactUtils.js +1 -1
- package/dist/node_modules/remeda/dist/chunk-AIG3BDKO.js +9 -0
- package/dist/node_modules/remeda/dist/{chunk-A3PVMI4K.js → chunk-KI5X74E2.js} +1 -1
- package/dist/node_modules/style-to-object/cjs/index.js +1 -1
- package/dist/node_modules/tailwind-merge/dist/bundle-mjs.js +3 -3
- package/dist/node_modules/unified/lib/index.js +1 -1
- package/dist/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.development.js +68 -0
- package/dist/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.production.js +56 -0
- package/dist/node_modules/use-sync-external-store/shim/index.js +11 -0
- package/dist/styles.css +1 -1
- package/package.json +2 -1
- package/dist/components/ui/data-cross-table.js +0 -216
- package/dist/node_modules/@radix-ui/react-dropdown-menu/node_modules/@radix-ui/react-arrow/dist/index.js +0 -25
- package/dist/node_modules/@radix-ui/react-dropdown-menu/node_modules/@radix-ui/react-collection/dist/index.js +0 -49
- package/dist/node_modules/@radix-ui/react-dropdown-menu/node_modules/@radix-ui/react-dismissable-layer/dist/index.js +0 -128
- package/dist/node_modules/@radix-ui/react-dropdown-menu/node_modules/@radix-ui/react-focus-scope/dist/index.js +0 -138
- package/dist/node_modules/@radix-ui/react-dropdown-menu/node_modules/@radix-ui/react-menu/dist/index.js +0 -625
- package/dist/node_modules/@radix-ui/react-dropdown-menu/node_modules/@radix-ui/react-popper/dist/index.js +0 -221
- package/dist/node_modules/@radix-ui/react-dropdown-menu/node_modules/@radix-ui/react-portal/dist/index.js +0 -17
- package/dist/node_modules/@radix-ui/react-dropdown-menu/node_modules/@radix-ui/react-primitive/dist/index.js +0 -37
- package/dist/node_modules/@radix-ui/react-dropdown-menu/node_modules/@radix-ui/react-roving-focus/dist/index.js +0 -184
- package/dist/node_modules/@radix-ui/react-dropdown-menu/node_modules/@radix-ui/react-use-controllable-state/dist/index.js +0 -55
- package/dist/node_modules/@radix-ui/react-slider/node_modules/@radix-ui/react-collection/dist/index.js +0 -49
- package/dist/node_modules/@radix-ui/react-slider/node_modules/@radix-ui/react-primitive/dist/index.js +0 -33
- package/dist/node_modules/@radix-ui/react-slider/node_modules/@radix-ui/react-use-controllable-state/dist/index.js +0 -55
- package/dist/node_modules/remeda/dist/chunk-OAMXQXGR.js +0 -9
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as i, jsxs as l } from "react/jsx-runtime";
|
|
3
|
+
import { TooltipProvider as c, Tooltip as d, TooltipTrigger as e, TooltipContent as p } from "../../tooltip.js";
|
|
4
|
+
function s({
|
|
5
|
+
text: r,
|
|
6
|
+
maxLength: n,
|
|
7
|
+
className: o = ""
|
|
8
|
+
}) {
|
|
9
|
+
return !r || ((r == null ? void 0 : r.length) ?? 0) <= n ? /* @__PURE__ */ i("div", { className: o, children: r }) : /* @__PURE__ */ i(c, { children: /* @__PURE__ */ l(d, { children: [
|
|
10
|
+
/* @__PURE__ */ i(e, { asChild: !0, children: /* @__PURE__ */ l("div", { className: `truncate ${o} cursor-pointer`, children: [
|
|
11
|
+
r.substring(0, n),
|
|
12
|
+
"…"
|
|
13
|
+
] }) }),
|
|
14
|
+
/* @__PURE__ */ i(p, { children: /* @__PURE__ */ i("p", { children: r }) })
|
|
15
|
+
] }) });
|
|
16
|
+
}
|
|
17
|
+
export {
|
|
18
|
+
s as TruncatedText
|
|
19
|
+
};
|
package/dist/index.d.ts
CHANGED
|
@@ -490,6 +490,18 @@ export declare function CommandShortcut({ className, ...props }: React_2.Compone
|
|
|
490
490
|
declare const confirm_2: (payload: ConfirmOptions) => Promise<boolean>;
|
|
491
491
|
export { confirm_2 as confirm }
|
|
492
492
|
|
|
493
|
+
export declare interface ConfirmedCell {
|
|
494
|
+
fromId: string;
|
|
495
|
+
toId: string;
|
|
496
|
+
id?: string;
|
|
497
|
+
value: any;
|
|
498
|
+
}
|
|
499
|
+
|
|
500
|
+
export declare interface ConfirmedCellsData {
|
|
501
|
+
editedCells: ConfirmedCell[];
|
|
502
|
+
toDefaultCells: ConfirmedCell[];
|
|
503
|
+
}
|
|
504
|
+
|
|
493
505
|
export declare const Confirmer: () => JSX.Element;
|
|
494
506
|
|
|
495
507
|
declare interface ConfirmOptions {
|
|
@@ -560,13 +572,18 @@ export declare interface CrossTableCell {
|
|
|
560
572
|
id?: string;
|
|
561
573
|
}
|
|
562
574
|
|
|
563
|
-
declare interface CrossTableData {
|
|
564
|
-
headerTop:
|
|
565
|
-
headerLeft:
|
|
575
|
+
export declare interface CrossTableData {
|
|
576
|
+
headerTop: CrossTableHeader[];
|
|
577
|
+
headerLeft: CrossTableHeader[];
|
|
566
578
|
data: (CrossTableCell | null)[][];
|
|
567
579
|
}
|
|
568
580
|
|
|
569
|
-
export declare
|
|
581
|
+
export declare interface CrossTableHeader {
|
|
582
|
+
id: string;
|
|
583
|
+
label: string;
|
|
584
|
+
}
|
|
585
|
+
|
|
586
|
+
export declare function DataCrossTable({ crossTableData, filterable, loading, emptyComponent, className, notFoundMessage, cornerHeaderFrom, cornerHeaderTo, maxHeaderLength, minWidthCell, editable, editMode, editConfirmLabel, editCancelLabel, onConfirmedCells, onEditModeChange, onSelectedRow, selectedRow, rowSortAsc, }: DataCrossTableProps): JSX.Element;
|
|
570
587
|
|
|
571
588
|
export declare interface DataCrossTableProps {
|
|
572
589
|
crossTableData: CrossTableData;
|
|
@@ -580,6 +597,15 @@ export declare interface DataCrossTableProps {
|
|
|
580
597
|
maxHeaderLength?: number;
|
|
581
598
|
minWidthCell?: number;
|
|
582
599
|
showFreezeControls?: boolean;
|
|
600
|
+
editable?: boolean;
|
|
601
|
+
editMode?: boolean;
|
|
602
|
+
editConfirmLabel?: string;
|
|
603
|
+
editCancelLabel?: string;
|
|
604
|
+
onConfirmedCells?: (cells: ConfirmedCellsData) => void;
|
|
605
|
+
onEditModeChange?: (editMode: boolean) => void;
|
|
606
|
+
onSelectedRow?: (row: CrossTableHeader) => void;
|
|
607
|
+
selectedRow?: CrossTableHeader;
|
|
608
|
+
rowSortAsc?: boolean;
|
|
583
609
|
}
|
|
584
610
|
|
|
585
611
|
export declare enum DataRepeatTypes {
|
package/dist/index.js
CHANGED
|
@@ -74,7 +74,7 @@ import { AppSidebar as _a } from "./components/ui/app-sidebar.js";
|
|
|
74
74
|
import { Confirmer as en, confirm as rn } from "./components/ui/confirmer.js";
|
|
75
75
|
import { AppSelect as tn } from "./components/ui/app-select.js";
|
|
76
76
|
import { AppMultipleSelectDropdown as nn } from "./components/ui/app-multiple-select-dropdown.js";
|
|
77
|
-
import { DataCrossTable as mn } from "./components/ui/data-cross-table.js";
|
|
77
|
+
import { DataCrossTable as mn } from "./components/ui/tables/data-cross-table/data-cross-table.js";
|
|
78
78
|
import { useAudioRecording as un } from "./hooks/use-audio-recording.js";
|
|
79
79
|
import { useAutoScroll as dn } from "./hooks/use-auto-scroll.js";
|
|
80
80
|
import { useAutosizeTextArea as bn } from "./hooks/use-autosize-textarea.js";
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { evaluate as
|
|
3
|
-
function
|
|
2
|
+
import { evaluate as T, getSideAxis as B, getSide as W, clamp as X, getOppositePlacement as ee, getExpandedPlacements as te, getOppositeAxisPlacements as ne, getAlignmentSides as ie, getAlignment as I, min as $, max as Y, getPaddingObject as K, rectToClientRect as _, getOppositeAxis as N, getAlignmentAxis as Q, sides as se, getAxisLength as U } from "../../utils/dist/floating-ui.utils.js";
|
|
3
|
+
function q(t, e, d) {
|
|
4
4
|
let {
|
|
5
5
|
reference: a,
|
|
6
6
|
floating: r
|
|
7
7
|
} = t;
|
|
8
|
-
const n =
|
|
8
|
+
const n = B(e), o = Q(e), m = U(o), g = W(e), h = n === "y", c = a.x + a.width / 2 - r.width / 2, s = a.y + a.height / 2 - r.height / 2, f = a[m] / 2 - r[m] / 2;
|
|
9
9
|
let i;
|
|
10
10
|
switch (g) {
|
|
11
11
|
case "top":
|
|
@@ -38,7 +38,7 @@ function I(t, e, d) {
|
|
|
38
38
|
y: a.y
|
|
39
39
|
};
|
|
40
40
|
}
|
|
41
|
-
switch (
|
|
41
|
+
switch (I(e)) {
|
|
42
42
|
case "start":
|
|
43
43
|
i[o] -= f * (d && h ? -1 : 1);
|
|
44
44
|
break;
|
|
@@ -48,7 +48,7 @@ function I(t, e, d) {
|
|
|
48
48
|
}
|
|
49
49
|
return i;
|
|
50
50
|
}
|
|
51
|
-
const
|
|
51
|
+
const ce = async (t, e, d) => {
|
|
52
52
|
const {
|
|
53
53
|
placement: a = "bottom",
|
|
54
54
|
strategy: r = "absolute",
|
|
@@ -62,17 +62,17 @@ const ae = async (t, e, d) => {
|
|
|
62
62
|
}), {
|
|
63
63
|
x: c,
|
|
64
64
|
y: s
|
|
65
|
-
} =
|
|
65
|
+
} = q(h, a, g), f = a, i = {}, l = 0;
|
|
66
66
|
for (let u = 0; u < m.length; u++) {
|
|
67
67
|
const {
|
|
68
68
|
name: x,
|
|
69
|
-
fn:
|
|
69
|
+
fn: A
|
|
70
70
|
} = m[u], {
|
|
71
|
-
x:
|
|
71
|
+
x: v,
|
|
72
72
|
y: p,
|
|
73
|
-
data:
|
|
73
|
+
data: y,
|
|
74
74
|
reset: w
|
|
75
|
-
} = await
|
|
75
|
+
} = await A({
|
|
76
76
|
x: c,
|
|
77
77
|
y: s,
|
|
78
78
|
initialPlacement: a,
|
|
@@ -86,11 +86,11 @@ const ae = async (t, e, d) => {
|
|
|
86
86
|
floating: e
|
|
87
87
|
}
|
|
88
88
|
});
|
|
89
|
-
c =
|
|
89
|
+
c = v ?? c, s = p ?? s, i = {
|
|
90
90
|
...i,
|
|
91
91
|
[x]: {
|
|
92
92
|
...i[x],
|
|
93
|
-
...
|
|
93
|
+
...y
|
|
94
94
|
}
|
|
95
95
|
}, w && l <= 50 && (l++, typeof w == "object" && (w.placement && (f = w.placement), w.rects && (h = w.rects === !0 ? await o.getElementRects({
|
|
96
96
|
reference: t,
|
|
@@ -99,7 +99,7 @@ const ae = async (t, e, d) => {
|
|
|
99
99
|
}) : w.rects), {
|
|
100
100
|
x: c,
|
|
101
101
|
y: s
|
|
102
|
-
} =
|
|
102
|
+
} = q(h, f, g)), u = -1);
|
|
103
103
|
}
|
|
104
104
|
return {
|
|
105
105
|
x: c,
|
|
@@ -109,7 +109,7 @@ const ae = async (t, e, d) => {
|
|
|
109
109
|
middlewareData: i
|
|
110
110
|
};
|
|
111
111
|
};
|
|
112
|
-
async function
|
|
112
|
+
async function z(t, e) {
|
|
113
113
|
var d;
|
|
114
114
|
e === void 0 && (e = {});
|
|
115
115
|
const {
|
|
@@ -125,17 +125,17 @@ async function Y(t, e) {
|
|
|
125
125
|
elementContext: s = "floating",
|
|
126
126
|
altBoundary: f = !1,
|
|
127
127
|
padding: i = 0
|
|
128
|
-
} =
|
|
128
|
+
} = T(e, t), l = K(i), x = m[f ? s === "floating" ? "reference" : "floating" : s], A = _(await n.getClippingRect({
|
|
129
129
|
element: (d = await (n.isElement == null ? void 0 : n.isElement(x))) == null || d ? x : x.contextElement || await (n.getDocumentElement == null ? void 0 : n.getDocumentElement(m.floating)),
|
|
130
130
|
boundary: h,
|
|
131
131
|
rootBoundary: c,
|
|
132
132
|
strategy: g
|
|
133
|
-
})),
|
|
133
|
+
})), v = s === "floating" ? {
|
|
134
134
|
x: a,
|
|
135
135
|
y: r,
|
|
136
136
|
width: o.floating.width,
|
|
137
137
|
height: o.floating.height
|
|
138
|
-
} : o.reference, p = await (n.getOffsetParent == null ? void 0 : n.getOffsetParent(m.floating)),
|
|
138
|
+
} : o.reference, p = await (n.getOffsetParent == null ? void 0 : n.getOffsetParent(m.floating)), y = await (n.isElement == null ? void 0 : n.isElement(p)) ? await (n.getScale == null ? void 0 : n.getScale(p)) || {
|
|
139
139
|
x: 1,
|
|
140
140
|
y: 1
|
|
141
141
|
} : {
|
|
@@ -143,18 +143,18 @@ async function Y(t, e) {
|
|
|
143
143
|
y: 1
|
|
144
144
|
}, w = _(n.convertOffsetParentRelativeRectToViewportRelativeRect ? await n.convertOffsetParentRelativeRectToViewportRelativeRect({
|
|
145
145
|
elements: m,
|
|
146
|
-
rect:
|
|
146
|
+
rect: v,
|
|
147
147
|
offsetParent: p,
|
|
148
148
|
strategy: g
|
|
149
|
-
}) :
|
|
149
|
+
}) : v);
|
|
150
150
|
return {
|
|
151
|
-
top: (
|
|
152
|
-
bottom: (w.bottom -
|
|
153
|
-
left: (
|
|
154
|
-
right: (w.right -
|
|
151
|
+
top: (A.top - w.top + l.top) / y.y,
|
|
152
|
+
bottom: (w.bottom - A.bottom + l.bottom) / y.y,
|
|
153
|
+
left: (A.left - w.left + l.left) / y.x,
|
|
154
|
+
right: (w.right - A.right + l.right) / y.x
|
|
155
155
|
};
|
|
156
156
|
}
|
|
157
|
-
const
|
|
157
|
+
const le = (t) => ({
|
|
158
158
|
name: "arrow",
|
|
159
159
|
options: t,
|
|
160
160
|
async fn(e) {
|
|
@@ -169,29 +169,29 @@ const ce = (t) => ({
|
|
|
169
169
|
} = e, {
|
|
170
170
|
element: h,
|
|
171
171
|
padding: c = 0
|
|
172
|
-
} =
|
|
172
|
+
} = T(t, e) || {};
|
|
173
173
|
if (h == null)
|
|
174
174
|
return {};
|
|
175
|
-
const s =
|
|
175
|
+
const s = K(c), f = {
|
|
176
176
|
x: d,
|
|
177
177
|
y: a
|
|
178
|
-
}, i =
|
|
178
|
+
}, i = Q(r), l = U(i), u = await o.getDimensions(h), x = i === "y", A = x ? "top" : "left", v = x ? "bottom" : "right", p = x ? "clientHeight" : "clientWidth", y = n.reference[l] + n.reference[i] - f[i] - n.floating[l], w = f[i] - n.reference[i], O = await (o.getOffsetParent == null ? void 0 : o.getOffsetParent(h));
|
|
179
179
|
let P = O ? O[p] : 0;
|
|
180
180
|
(!P || !await (o.isElement == null ? void 0 : o.isElement(O))) && (P = m.floating[p] || n.floating[l]);
|
|
181
|
-
const
|
|
181
|
+
const M = y / 2 - w / 2, R = P / 2 - u[l] / 2 - 1, b = $(s[A], R), L = $(s[v], R), S = b, H = P - u[l] - L, k = P / 2 - u[l] / 2 + M, C = X(S, k, H), j = !g.arrow && I(r) != null && k !== C && n.reference[l] / 2 - (k < S ? b : L) - u[l] / 2 < 0, E = j ? k < S ? k - S : k - H : 0;
|
|
182
182
|
return {
|
|
183
|
-
[i]: f[i] +
|
|
183
|
+
[i]: f[i] + E,
|
|
184
184
|
data: {
|
|
185
|
-
[i]:
|
|
186
|
-
centerOffset:
|
|
187
|
-
...
|
|
188
|
-
alignmentOffset:
|
|
185
|
+
[i]: C,
|
|
186
|
+
centerOffset: k - C - E,
|
|
187
|
+
...j && {
|
|
188
|
+
alignmentOffset: E
|
|
189
189
|
}
|
|
190
190
|
},
|
|
191
|
-
reset:
|
|
191
|
+
reset: j
|
|
192
192
|
};
|
|
193
193
|
}
|
|
194
|
-
}),
|
|
194
|
+
}), re = function(t) {
|
|
195
195
|
return t === void 0 && (t = {}), {
|
|
196
196
|
name: "flip",
|
|
197
197
|
options: t,
|
|
@@ -212,58 +212,62 @@ const ce = (t) => ({
|
|
|
212
212
|
fallbackAxisSideDirection: l = "none",
|
|
213
213
|
flipAlignment: u = !0,
|
|
214
214
|
...x
|
|
215
|
-
} =
|
|
215
|
+
} = T(t, e);
|
|
216
216
|
if ((d = n.arrow) != null && d.alignmentOffset)
|
|
217
217
|
return {};
|
|
218
|
-
const
|
|
219
|
-
!f && O && w.push(...
|
|
220
|
-
const P = [m, ...w],
|
|
221
|
-
let
|
|
222
|
-
if (c && R.push(
|
|
223
|
-
const
|
|
224
|
-
R.push(
|
|
218
|
+
const A = W(r), v = B(m), p = W(m) === m, y = await (g.isRTL == null ? void 0 : g.isRTL(h.floating)), w = f || (p || !u ? [ee(m)] : te(m)), O = l !== "none";
|
|
219
|
+
!f && O && w.push(...ne(m, u, l, y));
|
|
220
|
+
const P = [m, ...w], M = await z(e, x), R = [];
|
|
221
|
+
let b = ((a = n.flip) == null ? void 0 : a.overflows) || [];
|
|
222
|
+
if (c && R.push(M[A]), s) {
|
|
223
|
+
const C = ie(r, o, y);
|
|
224
|
+
R.push(M[C[0]], M[C[1]]);
|
|
225
225
|
}
|
|
226
|
-
if (
|
|
226
|
+
if (b = [...b, {
|
|
227
227
|
placement: r,
|
|
228
228
|
overflows: R
|
|
229
|
-
}], !R.every((
|
|
230
|
-
var
|
|
231
|
-
const
|
|
232
|
-
if (j)
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
229
|
+
}], !R.every((C) => C <= 0)) {
|
|
230
|
+
var L, S;
|
|
231
|
+
const C = (((L = n.flip) == null ? void 0 : L.index) || 0) + 1, j = P[C];
|
|
232
|
+
if (j) {
|
|
233
|
+
var H;
|
|
234
|
+
const F = s === "alignment" ? v !== B(j) : !1, D = ((H = b[0]) == null ? void 0 : H.overflows[0]) > 0;
|
|
235
|
+
if (!F || D)
|
|
236
|
+
return {
|
|
237
|
+
data: {
|
|
238
|
+
index: C,
|
|
239
|
+
overflows: b
|
|
240
|
+
},
|
|
241
|
+
reset: {
|
|
242
|
+
placement: j
|
|
243
|
+
}
|
|
244
|
+
};
|
|
245
|
+
}
|
|
246
|
+
let E = (S = b.filter((F) => F.overflows[0] <= 0).sort((F, D) => F.overflows[1] - D.overflows[1])[0]) == null ? void 0 : S.placement;
|
|
247
|
+
if (!E)
|
|
244
248
|
switch (i) {
|
|
245
249
|
case "bestFit": {
|
|
246
|
-
var
|
|
247
|
-
const
|
|
250
|
+
var k;
|
|
251
|
+
const F = (k = b.filter((D) => {
|
|
248
252
|
if (O) {
|
|
249
|
-
const
|
|
250
|
-
return
|
|
253
|
+
const V = B(D.placement);
|
|
254
|
+
return V === v || // Create a bias to the `y` side axis due to horizontal
|
|
251
255
|
// reading directions favoring greater width.
|
|
252
|
-
|
|
256
|
+
V === "y";
|
|
253
257
|
}
|
|
254
258
|
return !0;
|
|
255
|
-
}).map((
|
|
256
|
-
|
|
259
|
+
}).map((D) => [D.placement, D.overflows.filter((V) => V > 0).reduce((V, Z) => V + Z, 0)]).sort((D, V) => D[1] - V[1])[0]) == null ? void 0 : k[0];
|
|
260
|
+
F && (E = F);
|
|
257
261
|
break;
|
|
258
262
|
}
|
|
259
263
|
case "initialPlacement":
|
|
260
|
-
|
|
264
|
+
E = m;
|
|
261
265
|
break;
|
|
262
266
|
}
|
|
263
|
-
if (r !==
|
|
267
|
+
if (r !== E)
|
|
264
268
|
return {
|
|
265
269
|
reset: {
|
|
266
|
-
placement:
|
|
270
|
+
placement: E
|
|
267
271
|
}
|
|
268
272
|
};
|
|
269
273
|
}
|
|
@@ -271,7 +275,7 @@ const ce = (t) => ({
|
|
|
271
275
|
}
|
|
272
276
|
};
|
|
273
277
|
};
|
|
274
|
-
function
|
|
278
|
+
function G(t, e) {
|
|
275
279
|
return {
|
|
276
280
|
top: t.top - e.height,
|
|
277
281
|
right: t.right - e.width,
|
|
@@ -279,10 +283,10 @@ function q(t, e) {
|
|
|
279
283
|
left: t.left - e.width
|
|
280
284
|
};
|
|
281
285
|
}
|
|
282
|
-
function
|
|
283
|
-
return
|
|
286
|
+
function J(t) {
|
|
287
|
+
return se.some((e) => t[e] >= 0);
|
|
284
288
|
}
|
|
285
|
-
const
|
|
289
|
+
const fe = function(t) {
|
|
286
290
|
return t === void 0 && (t = {}), {
|
|
287
291
|
name: "hide",
|
|
288
292
|
options: t,
|
|
@@ -292,29 +296,29 @@ const re = function(t) {
|
|
|
292
296
|
} = e, {
|
|
293
297
|
strategy: a = "referenceHidden",
|
|
294
298
|
...r
|
|
295
|
-
} =
|
|
299
|
+
} = T(t, e);
|
|
296
300
|
switch (a) {
|
|
297
301
|
case "referenceHidden": {
|
|
298
|
-
const n = await
|
|
302
|
+
const n = await z(e, {
|
|
299
303
|
...r,
|
|
300
304
|
elementContext: "reference"
|
|
301
|
-
}), o =
|
|
305
|
+
}), o = G(n, d.reference);
|
|
302
306
|
return {
|
|
303
307
|
data: {
|
|
304
308
|
referenceHiddenOffsets: o,
|
|
305
|
-
referenceHidden:
|
|
309
|
+
referenceHidden: J(o)
|
|
306
310
|
}
|
|
307
311
|
};
|
|
308
312
|
}
|
|
309
313
|
case "escaped": {
|
|
310
|
-
const n = await
|
|
314
|
+
const n = await z(e, {
|
|
311
315
|
...r,
|
|
312
316
|
altBoundary: !0
|
|
313
|
-
}), o =
|
|
317
|
+
}), o = G(n, d.floating);
|
|
314
318
|
return {
|
|
315
319
|
data: {
|
|
316
320
|
escapedOffsets: o,
|
|
317
|
-
escaped:
|
|
321
|
+
escaped: J(o)
|
|
318
322
|
}
|
|
319
323
|
};
|
|
320
324
|
}
|
|
@@ -324,12 +328,12 @@ const re = function(t) {
|
|
|
324
328
|
}
|
|
325
329
|
};
|
|
326
330
|
};
|
|
327
|
-
async function
|
|
331
|
+
async function oe(t, e) {
|
|
328
332
|
const {
|
|
329
333
|
placement: d,
|
|
330
334
|
platform: a,
|
|
331
335
|
elements: r
|
|
332
|
-
} = t, n = await (a.isRTL == null ? void 0 : a.isRTL(r.floating)), o =
|
|
336
|
+
} = t, n = await (a.isRTL == null ? void 0 : a.isRTL(r.floating)), o = W(d), m = I(d), g = B(d) === "y", h = ["left", "top"].includes(o) ? -1 : 1, c = n && g ? -1 : 1, s = T(e, t);
|
|
333
337
|
let {
|
|
334
338
|
mainAxis: f,
|
|
335
339
|
crossAxis: i,
|
|
@@ -351,7 +355,7 @@ async function se(t, e) {
|
|
|
351
355
|
y: i * c
|
|
352
356
|
};
|
|
353
357
|
}
|
|
354
|
-
const
|
|
358
|
+
const me = function(t) {
|
|
355
359
|
return t === void 0 && (t = 0), {
|
|
356
360
|
name: "offset",
|
|
357
361
|
options: t,
|
|
@@ -362,7 +366,7 @@ const fe = function(t) {
|
|
|
362
366
|
y: n,
|
|
363
367
|
placement: o,
|
|
364
368
|
middlewareData: m
|
|
365
|
-
} = e, g = await
|
|
369
|
+
} = e, g = await oe(e, t);
|
|
366
370
|
return o === ((d = m.offset) == null ? void 0 : d.placement) && (a = m.arrow) != null && a.alignmentOffset ? {} : {
|
|
367
371
|
x: r + g.x,
|
|
368
372
|
y: n + g.y,
|
|
@@ -373,7 +377,7 @@ const fe = function(t) {
|
|
|
373
377
|
};
|
|
374
378
|
}
|
|
375
379
|
};
|
|
376
|
-
},
|
|
380
|
+
}, de = function(t) {
|
|
377
381
|
return t === void 0 && (t = {}), {
|
|
378
382
|
name: "shift",
|
|
379
383
|
options: t,
|
|
@@ -388,28 +392,28 @@ const fe = function(t) {
|
|
|
388
392
|
limiter: m = {
|
|
389
393
|
fn: (x) => {
|
|
390
394
|
let {
|
|
391
|
-
x:
|
|
392
|
-
y:
|
|
395
|
+
x: A,
|
|
396
|
+
y: v
|
|
393
397
|
} = x;
|
|
394
398
|
return {
|
|
395
|
-
x:
|
|
396
|
-
y:
|
|
399
|
+
x: A,
|
|
400
|
+
y: v
|
|
397
401
|
};
|
|
398
402
|
}
|
|
399
403
|
},
|
|
400
404
|
...g
|
|
401
|
-
} =
|
|
405
|
+
} = T(t, e), h = {
|
|
402
406
|
x: d,
|
|
403
407
|
y: a
|
|
404
|
-
}, c = await
|
|
408
|
+
}, c = await z(e, g), s = B(W(r)), f = N(s);
|
|
405
409
|
let i = h[f], l = h[s];
|
|
406
410
|
if (n) {
|
|
407
|
-
const x = f === "y" ? "top" : "left",
|
|
408
|
-
i = X(
|
|
411
|
+
const x = f === "y" ? "top" : "left", A = f === "y" ? "bottom" : "right", v = i + c[x], p = i - c[A];
|
|
412
|
+
i = X(v, i, p);
|
|
409
413
|
}
|
|
410
414
|
if (o) {
|
|
411
|
-
const x = s === "y" ? "top" : "left",
|
|
412
|
-
l = X(
|
|
415
|
+
const x = s === "y" ? "top" : "left", A = s === "y" ? "bottom" : "right", v = l + c[x], p = l - c[A];
|
|
416
|
+
l = X(v, l, p);
|
|
413
417
|
}
|
|
414
418
|
const u = m.fn({
|
|
415
419
|
...e,
|
|
@@ -429,7 +433,7 @@ const fe = function(t) {
|
|
|
429
433
|
};
|
|
430
434
|
}
|
|
431
435
|
};
|
|
432
|
-
},
|
|
436
|
+
}, xe = function(t) {
|
|
433
437
|
return t === void 0 && (t = {}), {
|
|
434
438
|
options: t,
|
|
435
439
|
fn(e) {
|
|
@@ -443,12 +447,12 @@ const fe = function(t) {
|
|
|
443
447
|
offset: m = 0,
|
|
444
448
|
mainAxis: g = !0,
|
|
445
449
|
crossAxis: h = !0
|
|
446
|
-
} =
|
|
450
|
+
} = T(t, e), c = {
|
|
447
451
|
x: d,
|
|
448
452
|
y: a
|
|
449
|
-
}, s =
|
|
453
|
+
}, s = B(r), f = N(s);
|
|
450
454
|
let i = c[f], l = c[s];
|
|
451
|
-
const u =
|
|
455
|
+
const u = T(m, e), x = typeof u == "number" ? {
|
|
452
456
|
mainAxis: u,
|
|
453
457
|
crossAxis: 0
|
|
454
458
|
} : {
|
|
@@ -457,12 +461,12 @@ const fe = function(t) {
|
|
|
457
461
|
...u
|
|
458
462
|
};
|
|
459
463
|
if (g) {
|
|
460
|
-
const p = f === "y" ? "height" : "width",
|
|
461
|
-
i <
|
|
464
|
+
const p = f === "y" ? "height" : "width", y = n.reference[f] - n.floating[p] + x.mainAxis, w = n.reference[f] + n.reference[p] - x.mainAxis;
|
|
465
|
+
i < y ? i = y : i > w && (i = w);
|
|
462
466
|
}
|
|
463
467
|
if (h) {
|
|
464
|
-
var
|
|
465
|
-
const p = f === "y" ? "width" : "height",
|
|
468
|
+
var A, v;
|
|
469
|
+
const p = f === "y" ? "width" : "height", y = ["top", "left"].includes(W(r)), w = n.reference[s] - n.floating[p] + (y && ((A = o.offset) == null ? void 0 : A[s]) || 0) + (y ? 0 : x.crossAxis), O = n.reference[s] + n.reference[p] + (y ? 0 : ((v = o.offset) == null ? void 0 : v[s]) || 0) - (y ? x.crossAxis : 0);
|
|
466
470
|
l < w ? l = w : l > O && (l = O);
|
|
467
471
|
}
|
|
468
472
|
return {
|
|
@@ -471,7 +475,7 @@ const fe = function(t) {
|
|
|
471
475
|
};
|
|
472
476
|
}
|
|
473
477
|
};
|
|
474
|
-
},
|
|
478
|
+
}, ue = function(t) {
|
|
475
479
|
return t === void 0 && (t = {}), {
|
|
476
480
|
name: "size",
|
|
477
481
|
options: t,
|
|
@@ -486,21 +490,21 @@ const fe = function(t) {
|
|
|
486
490
|
apply: g = () => {
|
|
487
491
|
},
|
|
488
492
|
...h
|
|
489
|
-
} =
|
|
493
|
+
} = T(t, e), c = await z(e, h), s = W(r), f = I(r), i = B(r) === "y", {
|
|
490
494
|
width: l,
|
|
491
495
|
height: u
|
|
492
496
|
} = n.floating;
|
|
493
|
-
let x,
|
|
494
|
-
s === "top" || s === "bottom" ? (x = s,
|
|
495
|
-
const
|
|
496
|
-
let P =
|
|
497
|
-
if ((d = e.middlewareData.shift) != null && d.enabled.x && (
|
|
498
|
-
const
|
|
499
|
-
i ?
|
|
497
|
+
let x, A;
|
|
498
|
+
s === "top" || s === "bottom" ? (x = s, A = f === (await (o.isRTL == null ? void 0 : o.isRTL(m.floating)) ? "start" : "end") ? "left" : "right") : (A = s, x = f === "end" ? "top" : "bottom");
|
|
499
|
+
const v = u - c.top - c.bottom, p = l - c.left - c.right, y = $(u - c[x], v), w = $(l - c[A], p), O = !e.middlewareData.shift;
|
|
500
|
+
let P = y, M = w;
|
|
501
|
+
if ((d = e.middlewareData.shift) != null && d.enabled.x && (M = p), (a = e.middlewareData.shift) != null && a.enabled.y && (P = v), O && !f) {
|
|
502
|
+
const b = Y(c.left, 0), L = Y(c.right, 0), S = Y(c.top, 0), H = Y(c.bottom, 0);
|
|
503
|
+
i ? M = l - 2 * (b !== 0 || L !== 0 ? b + L : Y(c.left, c.right)) : P = u - 2 * (S !== 0 || H !== 0 ? S + H : Y(c.top, c.bottom));
|
|
500
504
|
}
|
|
501
505
|
await g({
|
|
502
506
|
...e,
|
|
503
|
-
availableWidth:
|
|
507
|
+
availableWidth: M,
|
|
504
508
|
availableHeight: P
|
|
505
509
|
});
|
|
506
510
|
const R = await o.getDimensions(m.floating);
|
|
@@ -513,14 +517,14 @@ const fe = function(t) {
|
|
|
513
517
|
};
|
|
514
518
|
};
|
|
515
519
|
export {
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
520
|
+
le as arrow,
|
|
521
|
+
ce as computePosition,
|
|
522
|
+
z as detectOverflow,
|
|
523
|
+
re as flip,
|
|
524
|
+
fe as hide,
|
|
525
|
+
xe as limitShift,
|
|
526
|
+
me as offset,
|
|
523
527
|
_ as rectToClientRect,
|
|
524
|
-
|
|
525
|
-
|
|
528
|
+
de as shift,
|
|
529
|
+
ue as size
|
|
526
530
|
};
|
|
@@ -214,15 +214,19 @@ function Ct(t, e, i) {
|
|
|
214
214
|
scrollTop: 0
|
|
215
215
|
};
|
|
216
216
|
const l = m(0);
|
|
217
|
+
function f() {
|
|
218
|
+
l.x = k(o);
|
|
219
|
+
}
|
|
217
220
|
if (n || !n && !r)
|
|
218
221
|
if ((M(e) !== "body" || _(o)) && (c = N(e)), n) {
|
|
219
|
-
const
|
|
220
|
-
l.x =
|
|
221
|
-
} else o && (
|
|
222
|
-
|
|
222
|
+
const a = T(e, !0, r, e);
|
|
223
|
+
l.x = a.x + e.clientLeft, l.y = a.y + e.clientTop;
|
|
224
|
+
} else o && f();
|
|
225
|
+
r && !n && o && f();
|
|
226
|
+
const u = o && !n && !r ? tt(o, c) : m(0), h = s.left + c.scrollLeft - l.x - u.x, p = s.top + c.scrollTop - l.y - u.y;
|
|
223
227
|
return {
|
|
224
|
-
x:
|
|
225
|
-
y:
|
|
228
|
+
x: h,
|
|
229
|
+
y: p,
|
|
226
230
|
width: s.width,
|
|
227
231
|
height: s.height
|
|
228
232
|
};
|