monobill-mintui 0.6.638 → 0.6.640
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/components/chunks/{confirm-action-CholVruh.js → confirm-action-D4U-R6zW.js} +1 -1
- package/dist/components/chunks/{confirm-action-B7vFRCIg.js → confirm-action-DxvkO8OY.js} +1 -1
- package/dist/components/chunks/{modal-C-x5AluM.js → modal-DVbvAPLU.js} +1 -1
- package/dist/components/chunks/{modal-DvjdEuxj.js → modal-DaAORJq2.js} +1 -1
- package/dist/components/chunks/{sortable-BWbidfTB.js → sortable-CparUKN_.js} +5 -7
- package/dist/components/chunks/{sortable-DCa1G1-x.js → sortable-DX2PwFLN.js} +1 -1
- package/dist/components/confirm-action/browser.js +1 -1
- package/dist/components/confirm-action/index.cjs +1 -1
- package/dist/components/confirm-action/index.js +1 -1
- package/dist/components/icon/index.d.ts +1 -0
- package/dist/components/icon/index.d.ts.map +1 -1
- package/dist/components/modal/browser.js +1 -1
- package/dist/components/modal/index.cjs +1 -1
- package/dist/components/modal/index.js +1 -1
- package/dist/components/sortable/Sortable.d.ts.map +1 -1
- package/dist/components/sortable/browser.js +1 -1
- package/dist/components/sortable/index.cjs +1 -1
- package/dist/components/sortable/index.js +1 -1
- package/dist/components/tree/Tree.d.ts.map +1 -1
- package/dist/components/tree/browser.js +9 -8
- package/dist/components/tree/index.cjs +1 -1
- package/dist/components/tree/index.js +9 -8
- package/dist/index.cjs +3 -3
- package/dist/index.css +1 -1
- package/dist/index.js +13 -14
- package/dist/tree.css +1 -1
- package/package.json +1 -1
|
@@ -13,9 +13,9 @@ import "../chunks/icon-DZP-hLHj.js";
|
|
|
13
13
|
import { t as e } from "../chunks/register-element-BFYmIynH.js";
|
|
14
14
|
import "../chunks/spinner-BsaFHuS6.js";
|
|
15
15
|
import "../chunks/button-M7gi8RMZ.js";
|
|
16
|
-
import "../chunks/confirm-action-
|
|
16
|
+
import "../chunks/confirm-action-D4U-R6zW.js";
|
|
17
17
|
import "../chunks/popover-CV-QCPjW.js";
|
|
18
|
-
import "../chunks/sortable-
|
|
18
|
+
import "../chunks/sortable-CparUKN_.js";
|
|
19
19
|
//#region src/components/tree/tree-utils.js
|
|
20
20
|
function t(e = []) {
|
|
21
21
|
s(e);
|
|
@@ -213,7 +213,7 @@ var p = class extends HTMLElement {
|
|
|
213
213
|
}));
|
|
214
214
|
}
|
|
215
215
|
}, this._onSortableStart = () => {
|
|
216
|
-
this._dragHoverExpandedId = null, this._dragExpansion?.timer !== null && this._dragExpansion?.timer !== void 0 && window.clearTimeout(this._dragExpansion.timer), this._dragExpansion = null;
|
|
216
|
+
this.classList.add("mint-tree-drag-active"), this._dragHoverExpandedId = null, this._dragExpansion?.timer !== null && this._dragExpansion?.timer !== void 0 && window.clearTimeout(this._dragExpansion.timer), this._dragExpansion = null;
|
|
217
217
|
let e = this._root?.querySelector(".mint-sortable-dragging[data-tree-id]"), t = e?.getAttribute("data-tree-id") || "", n = e?.querySelector(":scope > mint-sortable.mint-tree-children");
|
|
218
218
|
if (!e || !t || !n || n.hidden || !this._expandedIds.has(t)) return;
|
|
219
219
|
let r = e.querySelector(":scope > .mint-tree-row"), i = this._root?.querySelector(".mint-sortable-placeholder"), a = n.getBoundingClientRect().height;
|
|
@@ -226,6 +226,7 @@ var p = class extends HTMLElement {
|
|
|
226
226
|
this._dragExpansion?.childList === n && (n.classList.add("mint-tree-drag-collapse"), n.style.height = "0px", i && r && (i.style.minHeight = `${r.getBoundingClientRect().height}px`));
|
|
227
227
|
});
|
|
228
228
|
}, this._onSortableEnd = (e) => {
|
|
229
|
+
this.classList.remove("mint-tree-drag-active");
|
|
229
230
|
let t = e.detail, r = t && !t.cancelled ? f(t.newParentId) : null;
|
|
230
231
|
for (let e of this._autoExpandedIds) {
|
|
231
232
|
if (e === r) continue;
|
|
@@ -350,7 +351,7 @@ var p = class extends HTMLElement {
|
|
|
350
351
|
this._root || (this._selectedId = f(this.getAttribute("selected-id")), this._expandedIds = this.hasAttribute("expanded-ids") ? this._readExpandedIds(this.getAttribute("expanded-ids")) : this._defaultExpandedIds(this._items), this.addEventListener("click", this._onClick), this.addEventListener("keydown", this._onKeydown, !0), this.addEventListener("mint-sortable-start", this._onSortableStart), this.addEventListener("mint-sortable-end", this._onSortableEnd), this.addEventListener("mint-sortable-drag", this._onSortableDrag), this.addEventListener("mint-sortable-drag-over", this._onSortableDragOver), this.addEventListener("mint-sortable-before-drop", this._onSortableBeforeDrop), this.addEventListener("mint-sortable-change", this._onSortableChange), this._render());
|
|
351
352
|
}
|
|
352
353
|
disconnectedCallback() {
|
|
353
|
-
this._dragExpansion?.timer !== null && this._dragExpansion?.timer !== void 0 && window.clearTimeout(this._dragExpansion.timer), this._keyboardFocusRestore && window.clearTimeout(this._keyboardFocusRestore.timer), this._keyboardFocusRestore = null, this._dragExpansion = null, this._autoExpandedIds.clear(), this._dragHoverExpandedId = null, this.removeEventListener("click", this._onClick), this.removeEventListener("keydown", this._onKeydown, !0), this.removeEventListener("mint-sortable-start", this._onSortableStart), this.removeEventListener("mint-sortable-end", this._onSortableEnd), this.removeEventListener("mint-sortable-drag", this._onSortableDrag), this.removeEventListener("mint-sortable-drag-over", this._onSortableDragOver), this.removeEventListener("mint-sortable-before-drop", this._onSortableBeforeDrop), this.removeEventListener("mint-sortable-change", this._onSortableChange), this._root = null;
|
|
354
|
+
this._dragExpansion?.timer !== null && this._dragExpansion?.timer !== void 0 && window.clearTimeout(this._dragExpansion.timer), this._keyboardFocusRestore && window.clearTimeout(this._keyboardFocusRestore.timer), this._keyboardFocusRestore = null, this._dragExpansion = null, this._autoExpandedIds.clear(), this._dragHoverExpandedId = null, this.classList.remove("mint-tree-drag-active"), this.removeEventListener("click", this._onClick), this.removeEventListener("keydown", this._onKeydown, !0), this.removeEventListener("mint-sortable-start", this._onSortableStart), this.removeEventListener("mint-sortable-end", this._onSortableEnd), this.removeEventListener("mint-sortable-drag", this._onSortableDrag), this.removeEventListener("mint-sortable-drag-over", this._onSortableDragOver), this.removeEventListener("mint-sortable-before-drop", this._onSortableBeforeDrop), this.removeEventListener("mint-sortable-change", this._onSortableChange), this._root = null;
|
|
354
355
|
}
|
|
355
356
|
attributeChangedCallback(e, t, n) {
|
|
356
357
|
if (!(t === n || !this.isConnected)) {
|
|
@@ -466,7 +467,7 @@ var p = class extends HTMLElement {
|
|
|
466
467
|
}
|
|
467
468
|
_createList(e, t, n) {
|
|
468
469
|
let r = document.createElement("mint-sortable");
|
|
469
|
-
r.id = `${this._treeId}-list-${t ?? "root"}`, r.setAttribute("group", this._treeId), r.setAttribute("data-tree-parent-id", t ?? ""), r.setAttribute("role", "group"), r.setAttribute("data-tree-depth", String(n)), r.setAttribute("direction", "vertical"), r.setAttribute("gap", "1"), r.setAttribute("handle-selector", "[data-mint-sortable-handle]"), r.setAttribute("animation-duration", "320"), r.setAttribute("item-key-attribute", "data-tree-id")
|
|
470
|
+
r.id = `${this._treeId}-list-${t ?? "root"}`, r.setAttribute("group", this._treeId), r.setAttribute("data-tree-parent-id", t ?? ""), r.setAttribute("role", "group"), r.setAttribute("data-tree-depth", String(n)), r.setAttribute("direction", "vertical"), r.setAttribute("gap", "1"), r.setAttribute("handle-selector", "[data-mint-sortable-handle]"), r.setAttribute("animation-duration", "320"), r.setAttribute("item-key-attribute", "data-tree-id");
|
|
470
471
|
let i = document.createElement("mint-stack");
|
|
471
472
|
i.setAttribute("direction", "vertical"), i.setAttribute("gap", "1");
|
|
472
473
|
for (let t of e) i.appendChild(this._createNode(t, n));
|
|
@@ -476,7 +477,7 @@ var p = class extends HTMLElement {
|
|
|
476
477
|
let n = String(e.id), r = Array.isArray(e.children) ? e.children : [], i = e.canHaveChildren !== !1 && this._allowNesting() && t + a(e) < this._maxDepth(), o = document.createElement("div");
|
|
477
478
|
o.className = "mint-tree-node", o.setAttribute("data-tree-id", n), o.setAttribute("role", "treeitem"), o.setAttribute("data-mint-tree-row", ""), o.setAttribute("aria-level", String(t + 1)), o.setAttribute("aria-selected", String(this._selectedId === n)), o.setAttribute("tabindex", this._selectedId === n || this._selectedId === null && t === 0 && this._items[0]?.id === e.id ? "0" : "-1"), o.setAttribute("aria-label", e.label), r.length && o.setAttribute("aria-expanded", String(this._expandedIds.has(n))), (e.disabled || this._disabled()) && o.setAttribute("aria-disabled", "true"), (e.draggable === !1 || this._disabled()) && o.setAttribute("data-sortable-disabled", "");
|
|
478
479
|
let s = document.createElement("div");
|
|
479
|
-
s.className = "mint-tree-row", s.setAttribute("data-tree-id", n)
|
|
480
|
+
s.className = "mint-tree-row", s.setAttribute("data-tree-id", n);
|
|
480
481
|
let c = document.createElement("span");
|
|
481
482
|
c.className = "mint-tree-drag-handle", c.setAttribute("data-mint-sortable-handle", ""), c.setAttribute("role", "button"), c.setAttribute("tabindex", "-1"), c.setAttribute("aria-label", `Drag ${e.label} to move`);
|
|
482
483
|
let l = document.createElement("mint-icon");
|
|
@@ -488,7 +489,7 @@ var p = class extends HTMLElement {
|
|
|
488
489
|
e.className = "mint-tree-expand-spacer", e.setAttribute("aria-hidden", "true"), s.appendChild(e);
|
|
489
490
|
}
|
|
490
491
|
let u = document.createElement("span");
|
|
491
|
-
if (u.className = "mint-tree-label", u.setAttribute("data-tree-command", "select"), u.setAttribute("data-tree-id", n), e.icon) {
|
|
492
|
+
if (u.className = "mint-tree-label", u.setAttribute("data-tree-command", "select"), u.setAttribute("data-tree-id", n), i && (u.setAttribute("data-mint-sortable-drop-container", `${this._treeId}-list-${n}`), u.setAttribute("data-mint-sortable-drop-end", "")), e.icon) {
|
|
492
493
|
let t = document.createElement("mint-icon");
|
|
493
494
|
t.setAttribute("name", String(e.icon)), t.setAttribute("aria-hidden", "true"), u.appendChild(t);
|
|
494
495
|
}
|
|
@@ -498,7 +499,7 @@ var p = class extends HTMLElement {
|
|
|
498
499
|
t.className = "mint-tree-metadata", t.textContent = String(e.metadata), s.appendChild(t);
|
|
499
500
|
}
|
|
500
501
|
let f = document.createElement("span");
|
|
501
|
-
f.className = "mint-tree-nest-target", f.setAttribute("data-mint-sortable-drop-container", `${this._treeId}-list-${n}`), f.setAttribute("aria-hidden", "true");
|
|
502
|
+
f.className = "mint-tree-nest-target", f.setAttribute("data-mint-sortable-drop-container", `${this._treeId}-list-${n}`), f.setAttribute("data-mint-sortable-drop-end", ""), f.setAttribute("aria-hidden", "true");
|
|
502
503
|
let p = document.createElement("mint-icon");
|
|
503
504
|
p.setAttribute("name", "arrow-right"), p.setAttribute("aria-hidden", "true"), f.appendChild(p), i && s.appendChild(f);
|
|
504
505
|
let m = this._createActions(e, i);
|