@caspeco/casper-ui-library 12.0.0 → 12.1.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.
- package/README.md +5 -5
- package/dist/_virtual/builtin_esm-external-require-react.js +1 -1
- package/dist/components/accordion/accordion-item.js +1 -1
- package/dist/components/alert/alert.d.ts.map +1 -1
- package/dist/components/alert/alert.js +4 -4
- package/dist/components/alert/helper.d.ts +3 -3
- package/dist/components/alert/helper.d.ts.map +1 -1
- package/dist/components/alert/helper.js +1 -1
- package/dist/components/badge/badge.js +1 -1
- package/dist/components/badge/helper.d.ts +3 -3
- package/dist/components/badge/helper.d.ts.map +1 -1
- package/dist/components/badge/helper.js +1 -1
- package/dist/components/box/box.composition.d.ts.map +1 -1
- package/dist/components/breadcrumbs/breadcrumbs.js +4 -4
- package/dist/components/button/button.d.ts.map +1 -1
- package/dist/components/button/button.js +1 -1
- package/dist/components/checkbox/checkbox.js +1 -1
- package/dist/components/collapsible/collapsible.js +1 -1
- package/dist/components/combobox/combobox-button.js +1 -1
- package/dist/components/combobox/combobox-item.js +1 -1
- package/dist/components/combobox/combobox-menu.js +1 -1
- package/dist/components/combobox/combobox-recipe.js +1 -1
- package/dist/components/combobox/combobox.d.ts.map +1 -1
- package/dist/components/combobox/combobox.js +88 -93
- package/dist/components/date-picker/base-date-picker.d.ts.map +1 -1
- package/dist/components/date-picker/base-date-picker.js +3 -3
- package/dist/components/date-picker/date-picker-date-cell.d.ts.map +1 -1
- package/dist/components/date-picker/date-picker-date-cell.js +1 -1
- package/dist/components/date-picker/date-picker-header.js +3 -3
- package/dist/components/date-picker/date-picker-week-cell.js +1 -1
- package/dist/components/divider/divider.d.ts.map +1 -1
- package/dist/components/divider/divider.js +1 -1
- package/dist/components/drawer/inline-drawer.js +1 -1
- package/dist/components/form-control/form-label.d.ts.map +1 -1
- package/dist/components/form-control/form-label.js +1 -1
- package/dist/components/heading/heading.d.ts.map +1 -1
- package/dist/components/heading/heading.js +2 -2
- package/dist/components/highlight/highlight.js +1 -1
- package/dist/components/icon/create-icon.d.ts +2 -2
- package/dist/components/icon/create-icon.d.ts.map +1 -1
- package/dist/components/icon/create-icon.js +1 -1
- package/dist/components/icon/icon.composition.d.ts.map +1 -1
- package/dist/components/icon-button/icon-button.d.ts.map +1 -1
- package/dist/components/icon-button/icon-button.js +1 -1
- package/dist/components/image-upload/image-cropper.js +1 -1
- package/dist/components/image-upload/image-upload-dropzone.js +3 -7
- package/dist/components/image-upload/image-upload-modal.d.ts.map +1 -1
- package/dist/components/image-upload/image-upload-modal.js +3 -3
- package/dist/components/image-upload/image-upload.js +1 -1
- package/dist/components/input/helper.js +1 -1
- package/dist/components/input/input-recipe.js +1 -1
- package/dist/components/input/input.js +1 -1
- package/dist/components/list/list.d.ts.map +1 -1
- package/dist/components/list/list.js +1 -1
- package/dist/components/menu/menu-divider.js +1 -1
- package/dist/components/menu/menu-group.d.ts.map +1 -1
- package/dist/components/menu/menu-group.js +1 -2
- package/dist/components/menu/menu-item.d.ts.map +1 -1
- package/dist/components/menu/menu-item.js +1 -1
- package/dist/components/menu/menu-recipe.d.ts.map +1 -1
- package/dist/components/menu/menu-recipe.js +1 -1
- package/dist/components/message/message.js +1 -1
- package/dist/components/modal/modal-close-button.js +1 -1
- package/dist/components/modal/modal.composition.d.ts.map +1 -1
- package/dist/components/navigation-list/navigation-list-item.js +3 -3
- package/dist/components/paginator/paginator-recipe.d.ts.map +1 -1
- package/dist/components/paginator/paginator-recipe.js +3 -3
- package/dist/components/phone-input/country-selector.d.ts.map +1 -1
- package/dist/components/phone-input/country-selector.js +1 -1
- package/dist/components/quantity-button/quantity-button.composition.d.ts.map +1 -1
- package/dist/components/quantity-button/quantity-button.d.ts.map +1 -1
- package/dist/components/quantity-button/quantity-button.js +1 -1
- package/dist/components/radio/hover-styles.js +1 -1
- package/dist/components/radio/radio-group-recipe.js +1 -1
- package/dist/components/radio/radio.d.ts.map +1 -1
- package/dist/components/radio/radio.js +1 -1
- package/dist/components/radio-card/hover-styles.js +1 -1
- package/dist/components/radio-card/radio-card-group.d.ts.map +1 -1
- package/dist/components/radio-card/radio-card-group.js +1 -1
- package/dist/components/radio-card/radio-card.js +3 -3
- package/dist/components/rich-text-editor/rich-text-editor-control.d.ts.map +1 -1
- package/dist/components/rich-text-editor/rich-text-editor-control.js +3 -7
- package/dist/components/rich-text-editor/rich-text-editor-recipe.d.ts.map +1 -1
- package/dist/components/rich-text-editor/rich-text-editor-recipe.js +1 -1
- package/dist/components/rich-text-editor/rich-text-editor.d.ts.map +1 -1
- package/dist/components/rich-text-editor/rich-text-editor.js +1 -1
- package/dist/components/segmented-control/segmented-control.d.ts.map +1 -1
- package/dist/components/segmented-control/segmented-control.js +1 -1
- package/dist/components/select/select-recipe.js +1 -1
- package/dist/components/select/select.js +1 -1
- package/dist/components/skeleton/skeleton-text.d.ts.map +1 -1
- package/dist/components/skeleton/skeleton-text.js +1 -1
- package/dist/components/skeleton/skeleton.d.ts.map +1 -1
- package/dist/components/skeleton/skeleton.js +1 -1
- package/dist/components/spinner/spinner.d.ts.map +1 -1
- package/dist/components/spinner/spinner.js +1 -1
- package/dist/components/stepper/step-context.d.ts +4 -4
- package/dist/components/stepper/step-context.d.ts.map +1 -1
- package/dist/components/stepper/step.d.ts.map +1 -1
- package/dist/components/stepper/step.js +3 -3
- package/dist/components/stepper/stepper.js +1 -1
- package/dist/components/stepper/types.d.ts +4 -4
- package/dist/components/stepper/types.d.ts.map +1 -1
- package/dist/components/switch/hover-styles.js +1 -1
- package/dist/components/table/table-cell.js +1 -1
- package/dist/components/table/table-column-resize-handle.js +1 -1
- package/dist/components/table/table-content.d.ts.map +1 -1
- package/dist/components/table/table-content.js +1 -1
- package/dist/components/table/table-filter.js +1 -1
- package/dist/components/table/table-header-dropdown.d.ts.map +1 -1
- package/dist/components/table/table-header-dropdown.js +1 -1
- package/dist/components/table/table-header-row.js +3 -3
- package/dist/components/table/table-recipe.js +1 -1
- package/dist/components/table/table-row-drag-handle.js +1 -1
- package/dist/components/table/table-row-expand-toggle-button.js +1 -1
- package/dist/components/table/table-sorted-reorder-prompt.js +3 -3
- package/dist/components/table/table-toolbar-settings.d.ts.map +1 -1
- package/dist/components/table/table-toolbar-settings.js +1 -1
- package/dist/components/table/table-toolbar.d.ts.map +1 -1
- package/dist/components/table/table-toolbar.js +3 -3
- package/dist/components/table/table.d.ts.map +1 -1
- package/dist/components/table/table.js +1 -1
- package/dist/components/tabs/tab-with-image.js +1 -1
- package/dist/components/tabs/tabs-recipe.js +1 -1
- package/dist/components/tabs/types.d.ts +2 -2
- package/dist/components/tabs/types.d.ts.map +1 -1
- package/dist/components/tag/tag-recipe.js +5 -5
- package/dist/components/text/text.d.ts.map +1 -1
- package/dist/components/text/text.js +2 -2
- package/dist/components/textarea/textarea-recipe.js +1 -1
- package/dist/components/toaster/toast-store.d.ts +2 -2
- package/dist/components/toaster/toast-store.d.ts.map +1 -1
- package/dist/components/toaster/toaster.js +1 -1
- package/dist/components/toggle-button/use-button-children.js +1 -1
- package/dist/components/tooltip/tooltip.js +2 -2
- package/dist/index.js +402 -402
- package/dist/node_modules/@dnd-kit/abstract/index.js +1 -1
- package/dist/node_modules/@dnd-kit/dom/index.js +11 -16
- package/dist/node_modules/@dnd-kit/dom/sortable.js +4 -4
- package/dist/node_modules/@dnd-kit/dom/utilities.js +2 -6
- package/dist/node_modules/@dnd-kit/react/hooks.js +2 -5
- package/dist/node_modules/@dnd-kit/react/sortable.js +4 -4
- package/dist/node_modules/@tanstack/table-core/build/lib/index.js +16 -30
- package/dist/node_modules/@tanstack/virtual-core/dist/esm/index.js +9 -18
- package/dist/node_modules/@tiptap/core/dist/index.js +838 -790
- package/dist/node_modules/@tiptap/extension-code/dist/index.js +14 -3
- package/dist/node_modules/@tiptap/extension-link/dist/index.js +114 -97
- package/dist/node_modules/@tiptap/extension-list/dist/index.js +133 -120
- package/dist/node_modules/@tiptap/extensions/dist/index.js +33 -33
- package/dist/node_modules/country-flag-icons/modules/react/3x2/index.js +1 -2
- package/dist/node_modules/date-fns/_lib/getTimezoneOffsetInMilliseconds.js +1 -1
- package/dist/node_modules/date-fns/getISOWeek.js +1 -1
- package/dist/node_modules/date-fns/getWeek.js +1 -1
- package/dist/node_modules/libphonenumber-js/es6-modern/metadata.js +1 -1
- package/dist/node_modules/prosemirror-commands/dist/index.js +1 -1
- package/dist/node_modules/prosemirror-gapcursor/dist/index.js +2 -6
- package/dist/node_modules/prosemirror-history/dist/index.js +27 -22
- package/dist/node_modules/prosemirror-model/dist/index.js +32 -35
- package/dist/node_modules/prosemirror-view/dist/index.js +10 -11
- package/dist/packages/casper-ui-library/node_modules/@tiptap/react/dist/index.js +74 -57
- package/dist/theme/theme-casper-ui.d.ts.map +1 -1
- package/dist/theme/theme-casper-ui.js +1 -1
- package/dist/theme/theme-style-props.d.ts +25 -25
- package/dist/theme/theme-style-props.d.ts.map +1 -1
- package/dist/theme/theme-types.d.ts +46 -10
- package/dist/theme/theme-types.d.ts.map +1 -1
- package/dist/theme/theme-types.js +2 -2
- package/dist/theme/theme-types.spec.d.ts +2 -0
- package/dist/theme/theme-types.spec.d.ts.map +1 -0
- package/dist/theme/theme.d.ts.map +1 -1
- package/dist/theme/theme.js +1 -1
- package/package.json +13 -13
|
@@ -273,7 +273,7 @@ var z = R, Ee = class {
|
|
|
273
273
|
]);
|
|
274
274
|
super(y(v({}, c), { effects: () => [...s?.() ?? [], () => {
|
|
275
275
|
let { manager: e, plugins: t } = this;
|
|
276
|
-
if (
|
|
276
|
+
if (e && t) for (let n of t) {
|
|
277
277
|
let { plugin: t } = O(n);
|
|
278
278
|
e.registry.plugins.register(t);
|
|
279
279
|
}
|
|
@@ -70,7 +70,7 @@ var Pe = Object.create, Fe = Object.defineProperty, Ie = Object.defineProperties
|
|
|
70
70
|
if (e) return `Picked up draggable item ${e.id}.`;
|
|
71
71
|
},
|
|
72
72
|
dragover({ operation: { source: e, target: t } }) {
|
|
73
|
-
if (
|
|
73
|
+
if (e && e.id !== t?.id) return t ? `Draggable item ${e.id} was moved over droppable target ${t.id}.` : `Draggable item ${e.id} is no longer over a droppable target.`;
|
|
74
74
|
},
|
|
75
75
|
dragend({ operation: { source: e, target: t }, canceled: n }) {
|
|
76
76
|
if (e) return n ? `Dragging was cancelled. Draggable item ${e.id} was dropped.` : t ? `Draggable item ${e.id} was dropped over droppable target ${t.id}` : `Draggable item ${e.id} was dropped.`;
|
|
@@ -98,7 +98,7 @@ var it = ["dragover", "dragmove"], at = class extends y {
|
|
|
98
98
|
constructor(e, t) {
|
|
99
99
|
super(e);
|
|
100
100
|
let { id: n, idPrefix: { description: r = Ze, announcement: i = Qe } = {}, announcements: a = et, screenReaderInstructions: o = $e, debounce: s = 500 } = t ?? {}, c = n ? `${r}-${n}` : ce(r), l = n ? `${i}-${n}` : ce(i), u, d, f, p, m = (e = p) => {
|
|
101
|
-
|
|
101
|
+
f && e && f?.nodeValue !== e && (f.nodeValue = e);
|
|
102
102
|
}, h = () => A.schedule(m), g = ot(h, s), _ = Object.entries(a).map(([e, t]) => this.manager.monitor.addEventListener(e, (n, r) => {
|
|
103
103
|
let i = f;
|
|
104
104
|
if (!i) return;
|
|
@@ -610,7 +610,7 @@ Ut = F(Ht), Wt = /* @__PURE__ */ new WeakMap(), Gt = /* @__PURE__ */ new WeakSet
|
|
|
610
610
|
g === this.overlay ? setTimeout(t, 0) : t();
|
|
611
611
|
}, I = n?.dropAnimation, L = this, R = s(() => {
|
|
612
612
|
let { transform: t, status: a } = i;
|
|
613
|
-
if (
|
|
613
|
+
if ((t.x || t.y || e.current.translate) && a.dragging) {
|
|
614
614
|
let a = h.translate ?? {
|
|
615
615
|
x: 0,
|
|
616
616
|
y: 0
|
|
@@ -661,7 +661,7 @@ Ut = F(Ht), Wt = /* @__PURE__ */ new WeakMap(), Gt = /* @__PURE__ */ new WeakSet
|
|
|
661
661
|
qe(), R();
|
|
662
662
|
};
|
|
663
663
|
}, R(Ut, 4, "overlay", Vt, Jt, Wt), I(Ut, Jt), Jt.configure = b(Jt);
|
|
664
|
-
var Yt = Jt, Xt = !0, Zt = !1, Qt, $t, en
|
|
664
|
+
var Yt = Jt, Xt = !0, Zt = !1, Qt, $t, en = [c], tn = T.Forward, q, nn, rn;
|
|
665
665
|
$t = (Qt = [c], T.Reverse);
|
|
666
666
|
var an = class {
|
|
667
667
|
constructor() {
|
|
@@ -775,7 +775,7 @@ var un, dn, fn, pn, J, mn, hn = class extends (dn = h, un = [c], dn) {
|
|
|
775
775
|
return n = null, null;
|
|
776
776
|
}, a);
|
|
777
777
|
this.getScrollableElements = () => o.value, this.scrollIntentTracker = new cn(e), this.destroy = e.monitor.addEventListener("dragmove", (t) => {
|
|
778
|
-
this.disabled
|
|
778
|
+
!this.disabled && !t.defaultPrevented && Se(e.dragOperation.activatorEvent) && t.by && this.scroll({ by: t.by }) && t.preventDefault();
|
|
779
779
|
});
|
|
780
780
|
}
|
|
781
781
|
};
|
|
@@ -933,9 +933,7 @@ var Dn = Object.freeze({
|
|
|
933
933
|
e.preventDefault();
|
|
934
934
|
let t = jn(e, r.cancel);
|
|
935
935
|
this.handleEnd(e, t);
|
|
936
|
-
|
|
937
|
-
}
|
|
938
|
-
jn(e, r.up) ? this.handleMove("up", e) : jn(e, r.down) && this.handleMove("down", e), jn(e, r.left) ? this.handleMove("left", e) : jn(e, r.right) && this.handleMove("right", e);
|
|
936
|
+
} else jn(e, r.up) ? this.handleMove("up", e) : jn(e, r.down) && this.handleMove("down", e), jn(e, r.left) ? this.handleMove("left", e) : jn(e, r.right) && this.handleMove("right", e);
|
|
939
937
|
}
|
|
940
938
|
handleEnd(e, t) {
|
|
941
939
|
this.manager.actions.stop({
|
|
@@ -1059,7 +1057,7 @@ Z.Delay = Pn, Z.Distance = Mn;
|
|
|
1059
1057
|
var Fn = Object.freeze({
|
|
1060
1058
|
activationConstraints(e, t) {
|
|
1061
1059
|
let { pointerType: n, target: r } = e;
|
|
1062
|
-
if (
|
|
1060
|
+
if (n !== "mouse" || !O(r) || t.handle !== r && !t.handle?.contains(r)) return n === "touch" ? [new Z.Delay({
|
|
1063
1061
|
value: 250,
|
|
1064
1062
|
tolerance: 5
|
|
1065
1063
|
})] : Te(r) && !e.defaultPrevented ? [new Z.Delay({
|
|
@@ -1083,7 +1081,7 @@ var Fn = Object.freeze({
|
|
|
1083
1081
|
coordinates: void 0
|
|
1084
1082
|
}, this.handleMove = () => {
|
|
1085
1083
|
let { event: e, coordinates: t } = this.latest;
|
|
1086
|
-
|
|
1084
|
+
e && t && this.manager.actions.move({
|
|
1087
1085
|
event: e,
|
|
1088
1086
|
to: t
|
|
1089
1087
|
});
|
|
@@ -1142,11 +1140,8 @@ var Fn = Object.freeze({
|
|
|
1142
1140
|
}
|
|
1143
1141
|
handlePointerMove(e, t) {
|
|
1144
1142
|
var n;
|
|
1145
|
-
if (this.controller?.activated === !1)
|
|
1146
|
-
|
|
1147
|
-
return;
|
|
1148
|
-
}
|
|
1149
|
-
if (this.manager.dragOperation.status.dragging) {
|
|
1143
|
+
if (this.controller?.activated === !1) (n = this.controller) == null || n.onEvent(e);
|
|
1144
|
+
else if (this.manager.dragOperation.status.dragging) {
|
|
1150
1145
|
let n = E(e), r = ge(t.element);
|
|
1151
1146
|
n.x = n.x * r.scaleX + r.x, n.y = n.y * r.scaleY + r.y, e.preventDefault(), e.stopPropagation(), this.latest.event = e, this.latest.coordinates = n, A.schedule(this.handleMove);
|
|
1152
1147
|
}
|
|
@@ -1232,7 +1227,7 @@ function Bn(e) {
|
|
|
1232
1227
|
function Vn() {}
|
|
1233
1228
|
var Hn = /* @__PURE__ */ new WeakSet();
|
|
1234
1229
|
function Un(e) {
|
|
1235
|
-
|
|
1230
|
+
e && !Hn.has(e) && (e.addEventListener("touchmove", Vn, {
|
|
1236
1231
|
capture: !1,
|
|
1237
1232
|
passive: !1
|
|
1238
1233
|
}), Hn.add(e));
|
|
@@ -87,7 +87,7 @@ var F = 10, I = class extends o {
|
|
|
87
87
|
let { id: t } = e;
|
|
88
88
|
if (!e.accepts(d) || t === f?.id && P(e) || !e.element) continue;
|
|
89
89
|
let n = e.shape, r = new c(e.element, { getBoundingClientRect: (e) => p(e, void 0, .2) });
|
|
90
|
-
|
|
90
|
+
r.height && r.width && (u == "down" && m.y + F < r.center.y || u == "up" && m.y - F > r.center.y || u == "left" && m.x - F > r.center.x || u == "right" && m.x + F < r.center.x) && (g.push(e), e.shape = r, y.push(() => e.shape = n));
|
|
91
91
|
}
|
|
92
92
|
}), t.preventDefault(), o.disable();
|
|
93
93
|
let b = o.computeCollisions(g, v);
|
|
@@ -248,7 +248,7 @@ var De = "__default__", Oe = class extends o {
|
|
|
248
248
|
let { dragOperation: i } = r, { source: a, target: o } = i;
|
|
249
249
|
if (!P(a) || !P(o) || a.sortable === o.sortable) return;
|
|
250
250
|
let s = n(), c = Te(s), l = a.sortable.group === o.sortable.group, u = s.get(a.sortable.group), d = l ? u : s.get(o.sortable.group);
|
|
251
|
-
|
|
251
|
+
u && d && queueMicrotask(() => {
|
|
252
252
|
t.defaultPrevented || r.renderer.rendering.then(() => {
|
|
253
253
|
let i = n();
|
|
254
254
|
if (Ee(c, s, i)) return;
|
|
@@ -275,7 +275,7 @@ var De = "__default__", Oe = class extends o {
|
|
|
275
275
|
let r = n();
|
|
276
276
|
if (Ee(i, t, r)) return;
|
|
277
277
|
let s = U(o), c = U(o, je), l = a.sortable.element, u = s[c.indexOf(a.sortable)], d = u?.element;
|
|
278
|
-
|
|
278
|
+
u && d && l && (ke(l, u.index, d, a.index), e(() => {
|
|
279
279
|
for (let e of t.values()) {
|
|
280
280
|
let t = Array.from(e).values();
|
|
281
281
|
for (let e of t) e.index = e.initialIndex, e.group = e.initialGroup;
|
|
@@ -380,7 +380,7 @@ var Z = class {
|
|
|
380
380
|
let { manager: e, transition: t } = this, { shape: n } = this.droppable;
|
|
381
381
|
if (!e) return;
|
|
382
382
|
let { idle: r } = e.dragOperation.status;
|
|
383
|
-
|
|
383
|
+
n && t && (!r || t.idle) && e.renderer.rendering.then(() => {
|
|
384
384
|
let { element: r } = this;
|
|
385
385
|
if (!r) return;
|
|
386
386
|
for (let e of r.getAnimations()) "transitionProperty" in e && (e.transitionProperty === "transform" || e.transitionProperty === "translate" || e.transitionProperty === "scale") && e.cancel();
|
|
@@ -236,11 +236,7 @@ var he = S ? ResizeObserver : class {
|
|
|
236
236
|
}, O, ge = class extends he {
|
|
237
237
|
constructor(e) {
|
|
238
238
|
super((t) => {
|
|
239
|
-
|
|
240
|
-
a(this, O, !0);
|
|
241
|
-
return;
|
|
242
|
-
}
|
|
243
|
-
e(t, this);
|
|
239
|
+
r(this, O) ? e(t, this) : a(this, O, !0);
|
|
244
240
|
}), i(this, O, !1);
|
|
245
241
|
}
|
|
246
242
|
};
|
|
@@ -275,7 +271,7 @@ var _e = Array.from({ length: 100 }, (e, t) => t / 100), ve = 75, k, A, j, M, N,
|
|
|
275
271
|
s?.debug && (a(this, P, document.createElement("div")), r(this, P).style.background = "rgba(0,0,0,0.15)", r(this, P).style.position = "fixed", r(this, P).style.pointerEvents = "none", l.body.appendChild(r(this, P))), a(this, N, new IntersectionObserver((e) => {
|
|
276
272
|
var n, i;
|
|
277
273
|
let { boundingClientRect: o, isIntersecting: s } = e[e.length - 1], { width: c, height: l } = o, u = r(this, k);
|
|
278
|
-
a(this, k, s),
|
|
274
|
+
a(this, k, s), (c || l) && (u && !s ? ((n = r(this, M)) == null || n.disconnect(), this.callback(null), (i = r(this, j)) == null || i.disconnect(), a(this, j, void 0), r(this, P) && (r(this, P).style.visibility = "hidden")) : r(this, I).call(this), s && !r(this, j) && (a(this, j, new ge(r(this, I))), r(this, j).observe(t)));
|
|
279
275
|
}, {
|
|
280
276
|
threshold: _e,
|
|
281
277
|
root: l
|
|
@@ -13,11 +13,8 @@ function d() {
|
|
|
13
13
|
function f(n, r) {
|
|
14
14
|
let i = s(/* @__PURE__ */ new Map()), a = d();
|
|
15
15
|
return u(() => {
|
|
16
|
-
if (!n)
|
|
17
|
-
|
|
18
|
-
return;
|
|
19
|
-
}
|
|
20
|
-
return e(() => {
|
|
16
|
+
if (!n) i.current.clear();
|
|
17
|
+
else return e(() => {
|
|
21
18
|
let e = !1, o = !1;
|
|
22
19
|
for (let a of i.current) {
|
|
23
20
|
let [s] = a, c = t(() => a[1]), l = n[s];
|
|
@@ -52,18 +52,18 @@ function x(f) {
|
|
|
52
52
|
M.handle = e ?? void 0;
|
|
53
53
|
}, [M]),
|
|
54
54
|
ref: d((e) => {
|
|
55
|
-
|
|
55
|
+
(e || !M.element?.isConnected || M.manager?.dragOperation.status.idle) && (M.element = e ?? void 0);
|
|
56
56
|
}, [M]),
|
|
57
57
|
sourceRef: d((e) => {
|
|
58
|
-
|
|
58
|
+
(e || !M.source?.isConnected || M.manager?.dragOperation.status.idle) && (M.source = e ?? void 0);
|
|
59
59
|
}, [M]),
|
|
60
60
|
targetRef: d((e) => {
|
|
61
|
-
|
|
61
|
+
(e || !M.target?.isConnected || M.manager?.dragOperation.status.idle) && (M.target = e ?? void 0);
|
|
62
62
|
}, [M])
|
|
63
63
|
};
|
|
64
64
|
}
|
|
65
65
|
function S(e, t, n) {
|
|
66
|
-
return
|
|
66
|
+
return !(e !== "isDragSource" || n || !t);
|
|
67
67
|
}
|
|
68
68
|
//#endregion
|
|
69
69
|
export { x as useSortable };
|
|
@@ -812,13 +812,10 @@ var I = { createTable: (e) => {
|
|
|
812
812
|
createTable: (e) => {
|
|
813
813
|
let t = !1, n = !1;
|
|
814
814
|
e._autoResetExpanded = () => {
|
|
815
|
-
if (!t) {
|
|
816
|
-
|
|
817
|
-
|
|
818
|
-
|
|
819
|
-
return;
|
|
820
|
-
}
|
|
821
|
-
if (e.options.autoResetAll ?? e.options.autoResetExpanded ?? !e.options.manualExpanding) {
|
|
815
|
+
if (!t) e._queue(() => {
|
|
816
|
+
t = !0;
|
|
817
|
+
});
|
|
818
|
+
else if (e.options.autoResetAll ?? e.options.autoResetExpanded ?? !e.options.manualExpanding) {
|
|
822
819
|
if (n) return;
|
|
823
820
|
n = !0, e._queue(() => {
|
|
824
821
|
e.resetExpanded(), n = !1;
|
|
@@ -892,13 +889,10 @@ var I = { createTable: (e) => {
|
|
|
892
889
|
createTable: (e) => {
|
|
893
890
|
let n = !1, r = !1;
|
|
894
891
|
e._autoResetPageIndex = () => {
|
|
895
|
-
if (!n) {
|
|
896
|
-
|
|
897
|
-
|
|
898
|
-
|
|
899
|
-
return;
|
|
900
|
-
}
|
|
901
|
-
if (e.options.autoResetAll ?? e.options.autoResetPageIndex ?? !e.options.manualPagination) {
|
|
892
|
+
if (!n) e._queue(() => {
|
|
893
|
+
n = !0;
|
|
894
|
+
});
|
|
895
|
+
else if (e.options.autoResetAll ?? e.options.autoResetPageIndex ?? !e.options.manualPagination) {
|
|
902
896
|
if (r) return;
|
|
903
897
|
r = !0, e._queue(() => {
|
|
904
898
|
e.resetPageIndex(), r = !1;
|
|
@@ -1119,7 +1113,7 @@ function Y(e, t, n) {
|
|
|
1119
1113
|
if (!((r = e.subRows) != null && r.length)) return !1;
|
|
1120
1114
|
let i = !0, a = !1;
|
|
1121
1115
|
return e.subRows.forEach((e) => {
|
|
1122
|
-
if (!
|
|
1116
|
+
if ((!a || i) && (e.getCanSelect() && (J(e, t) ? a = !0 : i = !1), e.subRows && e.subRows.length)) {
|
|
1123
1117
|
let n = Y(e, t);
|
|
1124
1118
|
n === "all" ? a = !0 : (n === "some" && (a = !0), i = !1);
|
|
1125
1119
|
}
|
|
@@ -1142,11 +1136,11 @@ function me(e, t) {
|
|
|
1142
1136
|
if (isNaN(o[0])) {
|
|
1143
1137
|
if (e > t) return 1;
|
|
1144
1138
|
if (t > e) return -1;
|
|
1145
|
-
|
|
1139
|
+
} else {
|
|
1140
|
+
if (isNaN(o[1])) return isNaN(i) ? -1 : 1;
|
|
1141
|
+
if (i > a) return 1;
|
|
1142
|
+
if (a > i) return -1;
|
|
1146
1143
|
}
|
|
1147
|
-
if (isNaN(o[1])) return isNaN(i) ? -1 : 1;
|
|
1148
|
-
if (i > a) return 1;
|
|
1149
|
-
if (a > i) return -1;
|
|
1150
1144
|
}
|
|
1151
1145
|
return n.length - r.length;
|
|
1152
1146
|
}
|
|
@@ -1364,11 +1358,7 @@ function Se(e, t, n) {
|
|
|
1364
1358
|
var l;
|
|
1365
1359
|
let d = e[u], f = m(n, d.id, d.original, d.index, d.depth, void 0, d.parentId);
|
|
1366
1360
|
if (f.columnFilters = d.columnFilters, (l = d.subRows) != null && l.length && s < a) {
|
|
1367
|
-
if (f.subRows = o(d.subRows, s + 1), d = f, t(d) && !f.subRows.length) {
|
|
1368
|
-
c.push(d), i[d.id] = d, r.push(d);
|
|
1369
|
-
continue;
|
|
1370
|
-
}
|
|
1371
|
-
if (t(d) || f.subRows.length) {
|
|
1361
|
+
if (f.subRows = o(d.subRows, s + 1), d = f, t(d) && !f.subRows.length || t(d) || f.subRows.length) {
|
|
1372
1362
|
c.push(d), i[d.id] = d, r.push(d);
|
|
1373
1363
|
continue;
|
|
1374
1364
|
}
|
|
@@ -1420,15 +1410,11 @@ function we() {
|
|
|
1420
1410
|
let n = e.getColumn(t.id);
|
|
1421
1411
|
if (!n) return;
|
|
1422
1412
|
let r = n.getFilterFn();
|
|
1423
|
-
|
|
1424
|
-
process.env.NODE_ENV !== "production" && console.warn(`Could not find a valid 'column.filterFn' for column with the ID: ${n.id}.`);
|
|
1425
|
-
return;
|
|
1426
|
-
}
|
|
1427
|
-
i.push({
|
|
1413
|
+
r ? i.push({
|
|
1428
1414
|
id: t.id,
|
|
1429
1415
|
filterFn: r,
|
|
1430
1416
|
resolvedValue: (r.resolveFilterValue == null ? void 0 : r.resolveFilterValue(t.value)) ?? t.value
|
|
1431
|
-
});
|
|
1417
|
+
}) : process.env.NODE_ENV !== "production" && console.warn(`Could not find a valid 'column.filterFn' for column with the ID: ${n.id}.`);
|
|
1432
1418
|
});
|
|
1433
1419
|
let o = (n ?? []).map((e) => e.id), s = e.getGlobalFilterFn(), c = e.getAllLeafColumns().filter((e) => e.getCanGlobalFilter());
|
|
1434
1420
|
r && s && c.length && (o.push("__global__"), c.forEach((e) => {
|
|
@@ -109,15 +109,14 @@ var y = class {
|
|
|
109
109
|
e.forEach((e) => {
|
|
110
110
|
let t = () => {
|
|
111
111
|
let t = e.target, n = this.indexFromElement(t);
|
|
112
|
-
if (
|
|
112
|
+
if (t.isConnected) this.isIndexInRange(n) && this.shouldMeasureDuringScroll(n) && this.resizeItem(n, this.options.measureElement(t, e, this));
|
|
113
|
+
else {
|
|
113
114
|
this.observer.unobserve(t);
|
|
114
115
|
for (let [e, n] of this.elementsCache) if (n === t) {
|
|
115
116
|
this.elementsCache.delete(e);
|
|
116
117
|
break;
|
|
117
118
|
}
|
|
118
|
-
return;
|
|
119
119
|
}
|
|
120
|
-
this.isIndexInRange(n) && this.shouldMeasureDuringScroll(n) && this.resizeItem(n, this.options.measureElement(t, e, this));
|
|
121
120
|
};
|
|
122
121
|
this.options.useAnimationFrameWithResizeObserver ? requestAnimationFrame(t) : t();
|
|
123
122
|
});
|
|
@@ -239,7 +238,7 @@ var y = class {
|
|
|
239
238
|
let e = this.scrollElement, t = () => {
|
|
240
239
|
this._iosTouching = !0, this._iosJustTouchEnded = !1, this._iosTouchEndTimerId !== null && this.targetWindow != null && (this.targetWindow.clearTimeout(this._iosTouchEndTimerId), this._iosTouchEndTimerId = null);
|
|
241
240
|
}, n = () => {
|
|
242
|
-
this._iosTouching = !1,
|
|
241
|
+
this._iosTouching = !1, s() && this.targetWindow != null && (this._iosJustTouchEnded = !0, this._iosTouchEndTimerId = this.targetWindow.setTimeout(() => {
|
|
243
242
|
this._iosJustTouchEnded = !1, this._iosTouchEndTimerId = null, this._flushIosDeferredIfReady();
|
|
244
243
|
}, 150));
|
|
245
244
|
};
|
|
@@ -526,14 +525,10 @@ var y = class {
|
|
|
526
525
|
behavior: t
|
|
527
526
|
}), this.scheduleScrollReconcile();
|
|
528
527
|
}, this.scrollToEnd = ({ behavior: e = "auto" } = {}) => {
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
});
|
|
534
|
-
return;
|
|
535
|
-
}
|
|
536
|
-
this.scrollToOffset(Math.max(this.getTotalSize() - this.getSize(), 0), { behavior: e });
|
|
528
|
+
this.options.count > 0 ? this.scrollToIndex(this.options.count - 1, {
|
|
529
|
+
align: "end",
|
|
530
|
+
behavior: e
|
|
531
|
+
}) : this.scrollToOffset(Math.max(this.getTotalSize() - this.getSize(), 0), { behavior: e });
|
|
537
532
|
}, this.getTotalSize = () => {
|
|
538
533
|
let e = this.getMeasurements(), t;
|
|
539
534
|
if (e.length === 0) t = this.options.paddingStart;
|
|
@@ -586,13 +581,9 @@ var y = class {
|
|
|
586
581
|
}
|
|
587
582
|
}
|
|
588
583
|
scheduleScrollReconcile() {
|
|
589
|
-
|
|
590
|
-
this.scrollState = null;
|
|
591
|
-
return;
|
|
592
|
-
}
|
|
593
|
-
this.rafId ??= this.targetWindow.requestAnimationFrame(() => {
|
|
584
|
+
this.targetWindow ? this.rafId ??= this.targetWindow.requestAnimationFrame(() => {
|
|
594
585
|
this.rafId = null, this.reconcileScroll();
|
|
595
|
-
});
|
|
586
|
+
}) : this.scrollState = null;
|
|
596
587
|
}
|
|
597
588
|
reconcileScroll() {
|
|
598
589
|
if (!this.scrollState || !this.scrollElement) return;
|