@juspay/svelte-ui-components 4.19.1 → 4.21.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.
- package/dist/Card/Card.svelte +22 -0
- package/dist/ChatMessage/ChatMessage.svelte +39 -0
- package/dist/Combobox/Combobox.svelte.d.ts +1 -1
- package/dist/MarkdownText/MarkdownText.svelte +4 -1
- package/dist/MarkdownText/markdown.js +24 -4
- package/dist/MarkdownText/properties.d.ts +11 -0
- package/dist/Pill/Pill.svelte +22 -0
- package/dist/Select/Select.svelte.d.ts +1 -1
- package/dist/Table/Table.svelte +12 -7
- package/dist/Table/properties.d.ts +32 -0
- package/dist/_chart/narrationHighlighter.d.ts +83 -0
- package/dist/_chart/narrationHighlighter.js +113 -0
- package/dist/attrs-discard.d.ts +56 -0
- package/dist/attrs-discard.js +64 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +1 -0
- package/dist-wc/index.js +257 -215
- package/package.json +1 -1
package/dist-wc/index.js
CHANGED
|
@@ -5921,15 +5921,19 @@ var rest_excludes$79 = new Set([
|
|
|
5921
5921
|
"$$events",
|
|
5922
5922
|
"$$legacy",
|
|
5923
5923
|
"$$host",
|
|
5924
|
-
"checkboxAriaLabel"
|
|
5924
|
+
"checkboxAriaLabel",
|
|
5925
|
+
"checkboxAttributes"
|
|
5925
5926
|
]);
|
|
5926
5927
|
function Checkbox_wc(e, t) {
|
|
5927
5928
|
push(t, !0);
|
|
5928
|
-
let n = prop(t, "checkboxAriaLabel", 7), i = /* @__PURE__ */ rest_props(t, rest_excludes$79);
|
|
5929
|
-
return Checkbox(e, spread_props(() =>
|
|
5929
|
+
let n = prop(t, "checkboxAriaLabel", 7), i = prop(t, "checkboxAttributes", 7), a = /* @__PURE__ */ rest_props(t, rest_excludes$79);
|
|
5930
|
+
return Checkbox(e, spread_props(() => a, {
|
|
5930
5931
|
get ariaLabel() {
|
|
5931
5932
|
return n();
|
|
5932
5933
|
},
|
|
5934
|
+
get attributes() {
|
|
5935
|
+
return i();
|
|
5936
|
+
},
|
|
5933
5937
|
checkedIcon: (e) => {
|
|
5934
5938
|
var n = comment();
|
|
5935
5939
|
slot(first_child(n), t, "checked-icon", {}, null), append(e, n);
|
|
@@ -5948,6 +5952,12 @@ function Checkbox_wc(e, t) {
|
|
|
5948
5952
|
},
|
|
5949
5953
|
set checkboxAriaLabel(e) {
|
|
5950
5954
|
n(e), flushSync();
|
|
5955
|
+
},
|
|
5956
|
+
get checkboxAttributes() {
|
|
5957
|
+
return i();
|
|
5958
|
+
},
|
|
5959
|
+
set checkboxAttributes(e) {
|
|
5960
|
+
i(e), flushSync();
|
|
5951
5961
|
}
|
|
5952
5962
|
});
|
|
5953
5963
|
}
|
|
@@ -5987,7 +5997,7 @@ customElements.define("sui-checkbox", create_custom_element(Checkbox_wc, {
|
|
|
5987
5997
|
reflect: !0,
|
|
5988
5998
|
type: "Boolean"
|
|
5989
5999
|
},
|
|
5990
|
-
|
|
6000
|
+
checkboxAttributes: { type: "Object" },
|
|
5991
6001
|
onclick: { type: "Object" }
|
|
5992
6002
|
}, ["checked-icon", "indeterminate-icon"], [], { mode: "open" }));
|
|
5993
6003
|
//#endregion
|
|
@@ -19371,21 +19381,21 @@ delegate(["click", "keydown"]), create_custom_element(BuiltinCell, {
|
|
|
19371
19381
|
}, [], [], { mode: "open" });
|
|
19372
19382
|
//#endregion
|
|
19373
19383
|
//#region src/lib/assets/sort-default.svg?raw
|
|
19374
|
-
var sort_default_default = "<svg width=\"12\" height=\"12\" viewBox=\"0 0 12 12\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <path fill-rule=\"evenodd\" clip-rule=\"evenodd\" d=\"M5.64645 1.64645C5.84171 1.45118 6.15829 1.45118 6.35355 1.64645L8.85355 4.14645C9.04882 4.34171 9.04882 4.65829 8.85355 4.85355C8.65829 5.04882 8.34171 5.04882 8.14645 4.85355L6 2.70711L3.85355 4.85355C3.65829 5.04882 3.34171 5.04882 3.14645 4.85355C2.95118 4.65829 2.95118 4.34171 3.14645 4.14645L5.64645 1.64645Z\" fill=\"currentColor\"/>\n <path fill-rule=\"evenodd\" clip-rule=\"evenodd\" d=\"M3.14645 7.14645C3.34171 6.95118 3.65829 6.95118 3.85355 7.14645L6 9.29289L8.14645 7.14645C8.34171 6.95118 8.65829 6.95118 8.85355 7.14645C9.04882 7.34171 9.04882 7.65829 8.85355 7.85355L6.35355 10.3536C6.15829 10.5488 5.84171 10.5488 5.64645 10.3536L3.14645 7.85355C2.95118 7.65829 2.95118 7.34171 3.14645 7.14645Z\" fill=\"currentColor\"/>\n</svg>\n", root$31 = /* @__PURE__ */ from_html("<div class=\"table-title svelte-171ci2i\"> </div>"), root_1$28 = /* @__PURE__ */ from_html("<button class=\"table-search-clear svelte-171ci2i\" type=\"button\"
|
|
19384
|
+
var sort_default_default = "<svg width=\"12\" height=\"12\" viewBox=\"0 0 12 12\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <path fill-rule=\"evenodd\" clip-rule=\"evenodd\" d=\"M5.64645 1.64645C5.84171 1.45118 6.15829 1.45118 6.35355 1.64645L8.85355 4.14645C9.04882 4.34171 9.04882 4.65829 8.85355 4.85355C8.65829 5.04882 8.34171 5.04882 8.14645 4.85355L6 2.70711L3.85355 4.85355C3.65829 5.04882 3.34171 5.04882 3.14645 4.85355C2.95118 4.65829 2.95118 4.34171 3.14645 4.14645L5.64645 1.64645Z\" fill=\"currentColor\"/>\n <path fill-rule=\"evenodd\" clip-rule=\"evenodd\" d=\"M3.14645 7.14645C3.34171 6.95118 3.65829 6.95118 3.85355 7.14645L6 9.29289L8.14645 7.14645C8.34171 6.95118 8.65829 6.95118 8.85355 7.14645C9.04882 7.34171 9.04882 7.65829 8.85355 7.85355L6.35355 10.3536C6.15829 10.5488 5.84171 10.5488 5.64645 10.3536L3.14645 7.85355C2.95118 7.65829 2.95118 7.34171 3.14645 7.14645Z\" fill=\"currentColor\"/>\n</svg>\n", root$31 = /* @__PURE__ */ from_html("<div class=\"table-title svelte-171ci2i\"> </div>"), root_1$28 = /* @__PURE__ */ from_html("<button class=\"table-search-clear svelte-171ci2i\" type=\"button\"></button>"), root_2$22 = /* @__PURE__ */ from_html("<div class=\"table-search svelte-171ci2i\"><span class=\"table-search-icon svelte-171ci2i\"></span> <input class=\"table-search-input svelte-171ci2i\" type=\"search\" autocomplete=\"off\"/> <!></div>"), root_3$19 = /* @__PURE__ */ from_html("<div class=\"table-toolbar svelte-171ci2i\"><!></div>"), root_4$16 = /* @__PURE__ */ from_html("<caption class=\"sr-only svelte-171ci2i\"> </caption>"), root_5$15 = /* @__PURE__ */ from_html("<th><!></th>"), root_6$14 = /* @__PURE__ */ from_html("<th></th>"), root_7$13 = /* @__PURE__ */ from_html("<th> </th>"), root_8$12 = /* @__PURE__ */ from_html("<span> </span>"), root_9$9 = /* @__PURE__ */ from_html("<span class=\"table-header-filter-icon svelte-171ci2i\"></span>"), root_10$8 = /* @__PURE__ */ from_html("<span><!></span>"), root_11$7 = /* @__PURE__ */ from_html("<span class=\"table-header-filter svelte-171ci2i\"><!></span>"), root_12$6 = /* @__PURE__ */ from_html("<span class=\"sort-icon sort-icon-asc\"></span>"), root_13$5 = /* @__PURE__ */ from_html("<span class=\"sort-icon sort-icon-desc\"></span>"), root_14$5 = /* @__PURE__ */ from_html("<span class=\"sort-icon sort-icon-idle\"></span>"), root_15$5 = /* @__PURE__ */ from_html("<div class=\"sort-button svelte-171ci2i\"><!></div>"), root_16$4 = /* @__PURE__ */ from_html("<!> <span class=\"table-inline-search-clear svelte-171ci2i\"><!></span>", 1), root_17$3 = /* @__PURE__ */ from_html("<span class=\"table-inline-search-trigger svelte-171ci2i\"><!></span>"), root_18$3 = /* @__PURE__ */ from_html("<span class=\"table-header-inline-search svelte-171ci2i\"><!></span>"), root_19$3 = /* @__PURE__ */ from_html("<th><span class=\"table-header-content svelte-171ci2i\"><!> <!> <!> <!></span></th>"), root_20$2 = /* @__PURE__ */ from_html("<tr><td class=\"table-empty svelte-171ci2i\"><!></td></tr>"), root_21$2 = /* @__PURE__ */ from_html("<td class=\"table-content table-checkbox-col svelte-171ci2i\"><!></td>"), root_22$2 = /* @__PURE__ */ from_html("<td class=\"table-content table-row-number-col svelte-171ci2i\"> </td>"), root_23$2 = /* @__PURE__ */ from_html("<td><div><!></div></td>"), root_24$2 = /* @__PURE__ */ from_html("<tr><!><!><!></tr>"), root_25$1 = /* @__PURE__ */ from_html("<div class=\"table-footer svelte-171ci2i\"><!></div>"), root_26$1 = /* @__PURE__ */ from_html("<span class=\"table-paginator-size svelte-171ci2i\"><!></span>"), root_27 = /* @__PURE__ */ from_html("<span class=\"table-paginator-controls svelte-171ci2i\"><!> <!></span>"), root_28 = /* @__PURE__ */ from_html("<div class=\"table-footer table-paginator svelte-171ci2i\"><span class=\"table-paginator-range svelte-171ci2i\"> </span> <!></div>"), root_29 = /* @__PURE__ */ from_html("<div><div><div class=\"table-scroll svelte-171ci2i\"><table class=\"svelte-171ci2i\"><!><thead><tr><!><!><!></tr></thead><tbody><!></tbody></table></div></div> <!></div>"), root_30 = /* @__PURE__ */ from_html("<!> <!> <!> <!>", 1), $$css$33 = {
|
|
19375
19385
|
hash: "svelte-171ci2i",
|
|
19376
19386
|
code: "\n /* ── Title ─────────────────────────────────────────────────────────────── */.table-title.svelte-171ci2i {margin:var(--table-title-margin, 0px 0px 12px 0px);font-size:var(--table-title-font-size, var(--table-tile-font-size, 18px));font-weight:var(--table-title-font-weight, 600);color:var(--table-title-color, #111827);font-family:var(--table-title-font-family);padding:var(--table-title-padding);}\n\n /* ── C2-3 Search bar ────────────────────────────────────────────────────── */.table-search.svelte-171ci2i {display:flex;align-items:center;gap:var(--table-search-gap, 8px);padding:var(--table-search-padding, 8px 12px);border:var(--table-search-border, 1px solid #e5e7eb);border-radius:var(--table-search-border-radius, var(--radius, 4px));background-color:var(--table-search-background, #ffffff);margin-bottom:var(--table-search-margin-bottom, 8px);}.table-search-icon.svelte-171ci2i {display:inline-flex;align-items:center;color:var(--table-search-icon-color, #9ca3af);flex-shrink:0;}.table-search-icon.svelte-171ci2i svg {width:var(--table-search-icon-size, 16px);height:var(--table-search-icon-size, 16px);}.table-search-input.svelte-171ci2i {flex:1;border:none;outline:none;background:transparent;font-size:var(--table-search-font-size, 14px);color:var(--table-search-color, #111827);min-width:0;}.table-search-input.svelte-171ci2i:focus-visible {outline:2px solid var(--table-focus-outline-color, #3b82f6);outline-offset:2px;border-radius:var(--table-search-focus-border-radius, var(--radius, 4px));}.table-search-input.svelte-171ci2i::placeholder {color:var(--table-search-placeholder-color, #9ca3af);}\n\n /* Hide browser-default clear button on search inputs */.table-search-input.svelte-171ci2i::-webkit-search-cancel-button {display:none;}.table-search-clear.svelte-171ci2i {display:inline-flex;align-items:center;padding:2px;border:none;background:transparent;color:var(--table-search-clear-color, #6b7280);cursor:pointer;border-radius:4px;flex-shrink:0;}.table-search-clear.svelte-171ci2i:hover {color:var(--table-search-clear-hover-color, #111827);background-color:var(--table-search-clear-hover-background, rgba(0, 0, 0, 0.05));}.table-search-clear.svelte-171ci2i svg {width:var(--table-search-clear-icon-size, 14px);height:var(--table-search-clear-icon-size, 14px);}.table-header-inline-search.svelte-171ci2i {display:inline-flex;align-items:center;gap:var(--table-inline-search-gap, 6px);margin-left:auto;}.table-inline-search-trigger.svelte-171ci2i {--button-color: transparent;--button-border: none;--button-padding: var(--table-inline-search-trigger-padding, 4px);--button-text-color: var(--table-inline-search-icon-color, #9ca3af);}.table-inline-search-trigger.svelte-171ci2i svg {width:var(--table-inline-search-icon-size, 16px);height:var(--table-inline-search-icon-size, 16px);display:block;}.table-inline-search-input.svelte-171ci2i {--input-margin: 0;width:var(--table-inline-search-input-width, 160px);}.table-inline-search-clear.svelte-171ci2i {--button-color: transparent;--button-border: none;--button-padding: var(--table-inline-search-clear-padding, 2px);--button-text-color: var(--table-inline-search-clear-color, #6b7280);}.table-inline-search-clear.svelte-171ci2i svg {width:var(--table-inline-search-clear-icon-size, 14px);height:var(--table-inline-search-clear-icon-size, 14px);}\n\n /* ── Container ──────────────────────────────────────────────────────────── */.table-container.svelte-171ci2i {border:var(--table-border, 1px solid #e5e7eb);border-radius:var(--table-border-radius, var(--radius, 4px));width:var(--table-container-width, 100%);overflow:hidden;}.scrollable-table.svelte-171ci2i {height:var(--table-container-height, 143px);overflow-y:auto;}.table-scroll-shell.svelte-171ci2i {position:relative;min-width:0;}\n\n /* Edge scrims: fade the clipped side of the table into its background so\n hidden columns read as \"more content this way\". Class-driven from live\n scroll state — never shown when the table fits. pointer-events: none\n keeps cells under the fade clickable; z-index 2 paints above sticky\n headers (z-index 1). */.table-scroll-shell.svelte-171ci2i::before,\n .table-scroll-shell.svelte-171ci2i::after {content:'';position:absolute;top:0;bottom:0;width:var(--table-scroll-scrim-width, 32px);opacity:0;pointer-events:none;transition:opacity 0.2s ease;z-index:2;}.table-scroll-shell.svelte-171ci2i::before {left:0;border-radius:var(--table-border-radius, var(--radius, 4px)) 0 0\n var(--table-border-radius, var(--radius, 4px));background:linear-gradient(to right, var(--table-scroll-scrim-color, #ffffff), transparent);}.table-scroll-shell.svelte-171ci2i::after {right:0;border-radius:0 var(--table-border-radius, var(--radius, 4px))\n var(--table-border-radius, var(--radius, 4px)) 0;background:linear-gradient(to left, var(--table-scroll-scrim-color, #ffffff), transparent);}.table-scroll-shell.scrollable-left.svelte-171ci2i::before {opacity:1;}.table-scroll-shell.scrollable-right.svelte-171ci2i::after {opacity:1;}.table-scroll.svelte-171ci2i {overflow-x:auto;min-width:0;scrollbar-width:thin;}table.svelte-171ci2i {width:var(--table-width, 100%);border-collapse:var(--table-border-collapse, collapse);}.table-header.svelte-171ci2i,\n .table-content.svelte-171ci2i {border:var(--table-inner-border, none);padding:var(--table-padding, 12px 16px);text-align:var(--table-text-align, left);width:var(--table-column-width);\n /* Wrap at word boundaries; only a single word wider than the column may\n split as a last resort. break-word (not anywhere) keeps each column's\n min-content width at its longest word, so ordinary labels never split\n mid-word — the old break-all default did. Opt back in per consumer via\n --table-word-break / --table-overflow-wrap. */word-break:var(--table-word-break, normal);overflow-wrap:var(--table-overflow-wrap, break-word);}.scrollable-content.svelte-171ci2i {overflow-y:auto;height:var(--scrollable-column-height, 20px);}.table-header.svelte-171ci2i {background-color:var(--table-header-background, var(--table-header-border-bgcolor, #f9fafb));font-size:var(--table-header-font-size, 13px);font-family:var(--table-header-font-family);font-weight:var(--table-header-font-weight, 600);letter-spacing:var(--table-header-letter-spacing, 0.02em);text-transform:var(--table-header-text-transform);color:var(--table-header-color, var(--table-header-font-color, #6b7280));border-bottom:var(--table-header-border, var(--table-inner-border, none));}.table-header-content.svelte-171ci2i {display:flex;align-items:center;gap:4px;justify-content:var(--table-header-justify, flex-start);}.table-header-label.svelte-171ci2i {text-decoration:var(--table-header-tooltip-underline, underline dotted);text-underline-offset:2px;cursor:help;}.table-header-label-plain.svelte-171ci2i {text-decoration:none;}.table-header-filter.svelte-171ci2i {display:inline-flex;align-items:center;}.table-header-filter-trigger.svelte-171ci2i {--button-color: transparent;--button-border: none;--button-padding: 2px;--button-margin: 0;--button-width: fit-content;--button-height: fit-content;--button-text-color: var(--table-sort-button-color, inherit);--button-border-radius: 4px;--button-hover-color: var(--table-sort-button-hover-background, rgba(0, 0, 0, 0.05));display:inline-flex;align-items:center;opacity:var(--table-sort-idle-opacity, 0.5);}.table-header-filter-trigger.svelte-171ci2i:hover {opacity:var(--table-sort-idle-hover-opacity, 0.85);}.table-header-filter-active.svelte-171ci2i {opacity:1;color:var(--table-filter-active-color, #2563eb);}.table-header-filter-icon.svelte-171ci2i svg {width:var(--table-sort-icon-size, 14px);height:var(--table-sort-icon-size, 14px);display:block;}.table-cell-clamp.svelte-171ci2i {overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}.table-header-sticky.svelte-171ci2i {position:sticky;top:var(--table-header-sticky-top, 0);z-index:1;}.table-content.svelte-171ci2i {background-color:var(--table-content-background, var(--table-content-border-bgcolor));font-size:var(--table-content-font-size, 14px);font-family:var(--table-content-font-family);color:var(--table-content-color, var(--table-content-font-color, #111827));}\n\n /* Column highlight (TableColumn.highlighted). Row hover keeps higher\n specificity and row selection is declared later at equal specificity, so\n both row states paint over the column wash. */.table-header.table-col-highlighted.svelte-171ci2i {background-color:var(\n --table-col-highlight-header-background,\n var(--table-col-highlight-background, #f3f9ff)\n );}.table-content.table-col-highlighted.svelte-171ci2i {background-color:var(--table-col-highlight-background, #f3f9ff);}.table-row.svelte-171ci2i {border-bottom:var(--table-row-border, 1px solid #f3f4f6);background-color:var(--table-row-background);}.table-row.svelte-171ci2i:last-child {border-bottom:var(--table-row-last-border, none);}.table-row.svelte-171ci2i:nth-child(even) {background-color:var(--table-row-alt-background, var(--table-row-background));}.table-row.svelte-171ci2i:hover {background-color:var(--table-row-hover-background);}.table-row.svelte-171ci2i:hover > .table-content:where(.svelte-171ci2i) {background-color:var(\n --table-row-hover-background,\n var(--table-content-background, var(--table-content-border-bgcolor))\n );}.table-row-clickable.svelte-171ci2i {cursor:pointer;}.table-row-clickable.svelte-171ci2i:focus-visible {outline:2px solid var(--table-focus-outline-color, #3b82f6);outline-offset:-2px;}\n\n /* C2-1: Selected row highlight */.table-row-selected.svelte-171ci2i {background-color:var(--table-row-selected-background, #eff6ff);}.table-row-selected.svelte-171ci2i > .table-content:where(.svelte-171ci2i) {background-color:var(--table-row-selected-background, #eff6ff);}\n\n /* Summary/period-total row (summaryRowIndex): both the row and its cells,\n since a themed --table-content-background would otherwise paint over a\n row-level background. Falls back to the regular cell background. */.table-summary-row.svelte-171ci2i {background-color:var(--table-summary-row-background, var(--table-content-background));}.table-summary-row.svelte-171ci2i > .table-content:where(.svelte-171ci2i) {background-color:var(--table-summary-row-background, var(--table-content-background));}\n\n /* ── C2-1 Checkbox column ───────────────────────────────────────────────── */\n /* The column renders the library Checkbox. The table's own --table-checkbox-*\n tokens stay the public API and are bridged onto Checkbox's --checkbox-*\n variables here, so a consumer theming the table keeps working and a\n consumer theming Checkbox app-wide is overridden only inside the table. */.table-checkbox-col.svelte-171ci2i {width:var(--table-checkbox-col-width, 44px);padding:var(--table-checkbox-col-padding, 12px 12px);--checkbox-container-gap: 0;--checkbox-size: var(--table-checkbox-size, 18px);--checkbox-border: var(--table-checkbox-border, 2px solid #9ca3af);--checkbox-border-radius: var(--table-checkbox-border-radius, var(--radius, 4px));--checkbox-background: var(--table-checkbox-background, transparent);--checkbox-hover-border-color: var(--table-checkbox-hover-border-color, #6b7280);--checkbox-checked-background: var(--table-checkbox-checked-background, #2563eb);--checkbox-checked-border: var(\n --table-checkbox-checked-border,\n 2px solid var(--table-checkbox-checked-border-color, #2563eb)\n );--checkbox-indeterminate-background: var(--table-checkbox-indeterminate-background, #2563eb);--checkbox-indeterminate-border: var(\n --table-checkbox-indeterminate-border,\n 2px solid var(--table-checkbox-indeterminate-border-color, #2563eb)\n );--checkbox-disabled-opacity: var(--table-checkbox-disabled-opacity, 0.4);--checkbox-focus-ring: var(--table-checkbox-focus-ring, 0 0 0 3px rgba(59, 130, 246, 0.3));--checkbox-icon-size: var(--table-checkbox-icon-size, 12px);--checkbox-checkmark-color: var(--table-checkbox-icon-color, #ffffff);--checkbox-dash-color: var(--table-checkbox-icon-color, #ffffff);--checkbox-transition: 0.15s;}\n\n /* ── Sort button ────────────────────────────────────────────────────────── */.sort-button.svelte-171ci2i {--button-color: transparent;--button-border: none;--button-padding: 2px;--button-margin: 0;--button-text-color: var(--table-sort-button-color, inherit);--button-border-radius: 4px;--button-width: fit-content;--button-height: fit-content;--button-hover-color: var(--table-sort-button-hover-background, rgba(0, 0, 0, 0.05));--button-hover-text-color: var(\n --table-sort-button-hover-color,\n var(--table-sort-button-color, inherit)\n );display:inline-flex;align-items:center;line-height:1;}.sort-button.svelte-171ci2i .sort-icon {display:inline-flex;align-items:center;}\n\n /* The sorted-direction half paints via currentColor; without an explicit\n color it inherits the Button's text color (white on the default button\n theme), which disappears on light headers. Default to the design\n system's active blue. */.sort-button.svelte-171ci2i .sort-icon:not(.sort-icon-idle) {color:var(--table-sort-active-color, #1b85ff);}.sort-button.svelte-171ci2i .sort-icon svg {width:var(--table-sort-icon-size, 14px);height:var(--table-sort-icon-size, 14px);display:block;}\n\n /* Two-tone state painting. The shared sort-default.svg asset stays\n color-agnostic (fill=\"currentColor\", like every other icon asset); the\n state colors live here. All halves default to the inactive fill, then\n the sorted direction's half is released back to currentColor (the\n active color above). Path order in the asset is up-chevron first,\n down-chevron second. */.sort-button.svelte-171ci2i .sort-icon svg path {fill:var(--table-sort-inactive-color, #c7c7c7);}.sort-button.svelte-171ci2i .sort-icon-asc svg path:first-child,\n .sort-button.svelte-171ci2i .sort-icon-desc svg path:last-child {fill:currentColor;}\n\n /* The design system draws every sort state fully opaque — faintness comes\n from the glyph fills (inactive halves #C7C7C7, active direction\n currentColor), never from transparency. The opacity vars remain for\n consumers that prefer a fade but now default to solid; hover steps the\n inactive halves to the design system's hover gray. */.sort-button.svelte-171ci2i .sort-icon-idle {opacity:var(--table-sort-idle-opacity, 1);}.sort-button.svelte-171ci2i:hover .sort-icon-idle {opacity:var(--table-sort-idle-hover-opacity, 1);--table-sort-inactive-color: var(--table-sort-hover-color, #797979);}\n\n /* ── Empty ──────────────────────────────────────────────────────────────── */.table-empty.svelte-171ci2i {padding:var(--table-empty-padding, 32px 24px);text-align:center;color:var(--table-empty-color, #9ca3af);}\n\n /* ── Footer ─────────────────────────────────────────────────────────────── */.table-footer.svelte-171ci2i {border-top:var(--table-footer-border, 1px solid #e5e7eb);padding:var(--table-footer-padding, 8px 16px);background-color:var(--table-footer-background, transparent);}.table-paginator.svelte-171ci2i {display:flex;align-items:center;justify-content:space-between;gap:var(--table-paginator-gap, 12px);flex-wrap:wrap;}.table-paginator-range.svelte-171ci2i {font-size:var(--table-paginator-range-font-size, 13px);color:var(--table-paginator-range-color, #6b7280);font-variant-numeric:tabular-nums;}.table-paginator-controls.svelte-171ci2i {display:flex;align-items:center;gap:var(--table-paginator-gap, 12px);}.table-paginator-size.svelte-171ci2i {display:inline-flex;min-width:var(--table-paginator-size-width, 72px);}\n\n /* ── Toolbar (bulk actions) ─────────────────────────────────────────────── */.table-toolbar.svelte-171ci2i {display:flex;align-items:center;gap:var(--table-toolbar-gap, 12px);padding:var(--table-toolbar-padding, 8px 12px);border:var(--table-toolbar-border, 1px solid #e5e7eb);border-radius:var(--table-toolbar-border-radius, var(--radius, 4px));background-color:var(--table-toolbar-background, #f9fafb);margin-bottom:var(--table-toolbar-margin-bottom, 8px);}\n\n /* ── Row-number column ──────────────────────────────────────────────────── */.table-row-number-col.svelte-171ci2i {width:var(--table-row-number-col-width, 48px);color:var(--table-row-number-color, #6b7280);font-variant-numeric:tabular-nums;text-align:var(--table-row-number-align, var(--table-text-align, left));}\n\n /* ── Accessibility ──────────────────────────────────────────────────────── */.sr-only.svelte-171ci2i {position:absolute;width:1px;height:1px;padding:0;overflow:hidden;clip:rect(0, 0, 0, 0);clip-path:inset(50%);white-space:nowrap;border-width:0;}"
|
|
19377
19387
|
};
|
|
19378
19388
|
function Table(e, t) {
|
|
19379
19389
|
push(t, !0), append_styles$1(e, $$css$33);
|
|
19380
|
-
let n = prop(t, "tableTitle", 7, ""), i = prop(t, "tableHeaders", 23, () => []), a = prop(t, "tableData", 23, () => []), o = prop(t, "columns", 7), s = prop(t, "rows", 7), c = prop(t, "sortable", 7, !0), l = prop(t, "sortableColumns", 7), u = prop(t, "sortMode", 7, "client"), f = prop(t, "stickyHeader", 7, !1), p = prop(t, "isTableScrollable", 7, !1), h = prop(t, "isContentScrollable", 7, !1), S = prop(t, "testId", 7), C = prop(t, "caption", 7), k = prop(t, "sortAscIcon", 7), R = prop(t, "sortDescIcon", 7), te = prop(t, "sortDefaultIcon", 7), ne = prop(t, "cell", 7), re = prop(t, "empty", 7), G = prop(t, "onrowclick", 7), be = prop(t, "onsort", 7), Me = prop(t, "classes", 7), Re = prop(t, "paginatorSlot", 7), Ue = prop(t, "getRowTestId", 7), it = prop(t, "getCellTestId", 7), at = prop(t, "checkboxSelection", 7), ot = prop(t, "searchConfig", 7), ct = prop(t, "onsearchchange", 7), lt = prop(t, "pagination", 7), ut = prop(t, "toolbarSlot", 7), dt = prop(t, "rowNumberColumn", 7, !1), ft = prop(t, "rowNumberLabel", 7, "#"), pt = prop(t, "summaryRowIndex", 7, null), mt = prop(t, "headerTooltipIcon", 7), ht = prop(t, "headerTooltipPosition", 7), gt = prop(t, "usePortal", 7, !1), _t = /* @__PURE__ */ user_derived(() => o() ? normalizeColumns(o(), s() ?? []) : null),
|
|
19381
|
-
|
|
19382
|
-
},
|
|
19390
|
+
let n = prop(t, "tableTitle", 7, ""), i = prop(t, "tableHeaders", 23, () => []), a = prop(t, "tableData", 23, () => []), o = prop(t, "columns", 7), s = prop(t, "rows", 7), c = prop(t, "sortable", 7, !0), l = prop(t, "sortableColumns", 7), u = prop(t, "sortMode", 7, "client"), f = prop(t, "stickyHeader", 7, !1), p = prop(t, "isTableScrollable", 7, !1), h = prop(t, "isContentScrollable", 7, !1), S = prop(t, "testId", 7), C = prop(t, "caption", 7), k = prop(t, "sortAscIcon", 7), R = prop(t, "sortDescIcon", 7), te = prop(t, "sortDefaultIcon", 7), ne = prop(t, "cell", 7), re = prop(t, "empty", 7), G = prop(t, "onrowclick", 7), be = prop(t, "onsort", 7), Me = prop(t, "classes", 7), Re = prop(t, "paginatorSlot", 7), Ue = prop(t, "getRowTestId", 7), it = prop(t, "getCellTestId", 7), at = prop(t, "checkboxSelection", 7), ot = prop(t, "searchConfig", 7), ct = prop(t, "onsearchchange", 7), lt = prop(t, "pagination", 7), ut = prop(t, "toolbarSlot", 7), dt = prop(t, "rowNumberColumn", 7, !1), ft = prop(t, "rowNumberLabel", 7, "#"), pt = prop(t, "summaryRowIndex", 7, null), mt = prop(t, "headerTooltipIcon", 7), ht = prop(t, "headerTooltipPosition", 7), gt = prop(t, "usePortal", 7, !1), _t = prop(t, "labels", 7), vt = /* @__PURE__ */ user_derived(() => o() ? normalizeColumns(o(), s() ?? []) : null), yt = /* @__PURE__ */ user_derived(() => get(vt) ? get(vt).tableHeaders : i()), bt = /* @__PURE__ */ user_derived(() => get(vt) ? get(vt).tableData : a()), xt = /* @__PURE__ */ user_derived(() => new Map(get(bt).map((e, t) => [e, t]))), St = /* @__PURE__ */ user_derived(() => get(vt) ? get(vt).sortableColumns : l()), Ct = /* @__PURE__ */ user_derived(() => !get(vt) || !s() ? null : new Map(get(vt).tableData.map((e, t) => [e, s()[t]]))), wt = /* @__PURE__ */ state(null), Tt = /* @__PURE__ */ state("asc"), Et = (e) => c() ? get(St) ? get(St).includes(e) : !0 : !1, Dt = (e) => {
|
|
19391
|
+
Et(e) && (get(wt) === e ? set(Tt, get(Tt) === "asc" ? "desc" : "asc", !0) : (set(wt, e, !0), set(Tt, "asc")), be()?.(e, get(Tt)));
|
|
19392
|
+
}, Ot = (e, t, n) => {
|
|
19383
19393
|
G()?.(e, t, n);
|
|
19384
|
-
},
|
|
19394
|
+
}, kt = (e, t, n, i) => {
|
|
19385
19395
|
(e.key === "Enter" || e.key === " ") && (e.preventDefault(), G()?.(t, n, i));
|
|
19386
|
-
},
|
|
19396
|
+
}, At = /* @__PURE__ */ user_derived(() => typeof G() == "function"), jt = /* @__PURE__ */ user_derived(() => f() || p()), Mt = /* @__PURE__ */ state(!1), Nt = /* @__PURE__ */ state(!1), Pt = (e) => {
|
|
19387
19397
|
let t = () => {
|
|
19388
|
-
set(
|
|
19398
|
+
set(Mt, e.scrollLeft > 2), set(Nt, e.scrollLeft + e.clientWidth < e.scrollWidth - 2);
|
|
19389
19399
|
};
|
|
19390
19400
|
t(), e.addEventListener("scroll", t, { passive: !0 });
|
|
19391
19401
|
let n = new ResizeObserver(t);
|
|
@@ -19394,26 +19404,26 @@ function Table(e, t) {
|
|
|
19394
19404
|
return i && n.observe(i), { destroy: () => {
|
|
19395
19405
|
e.removeEventListener("scroll", t), n.disconnect();
|
|
19396
19406
|
} };
|
|
19397
|
-
},
|
|
19398
|
-
set(
|
|
19399
|
-
}, Zt = () => {
|
|
19400
|
-
get(Rt) && qt(get(Rt).value);
|
|
19407
|
+
}, It = /* @__PURE__ */ state(""), Lt = /* @__PURE__ */ user_derived(() => !!ot()), Rt = /* @__PURE__ */ user_derived(() => typeof ct() == "function"), zt = /* @__PURE__ */ state(null), Bt = /* @__PURE__ */ state(null), Ht = /* @__PURE__ */ state(null), Gt = /* @__PURE__ */ user_derived(() => ot()?.displayMode === "inline"), qt = /* @__PURE__ */ state(!1), Zt = (e) => {
|
|
19408
|
+
set(It, e, !0), set(sn, 1), lt()?.onPageChange?.(1), get(Rt) && ct()?.(e);
|
|
19401
19409
|
}, Qt = () => {
|
|
19402
|
-
|
|
19403
|
-
qt(""), set(Gt, !1), e && en();
|
|
19410
|
+
get(zt) && Zt(get(zt).value);
|
|
19404
19411
|
}, $t = () => {
|
|
19405
|
-
|
|
19412
|
+
let e = get(qt);
|
|
19413
|
+
Zt(""), set(qt, !1), e && tn();
|
|
19406
19414
|
}, en = () => {
|
|
19407
|
-
queueMicrotask(() => get(Bt)?.
|
|
19415
|
+
set(qt, !0), queueMicrotask(() => get(Bt)?.focus());
|
|
19408
19416
|
}, tn = () => {
|
|
19409
|
-
|
|
19410
|
-
}, nn = (
|
|
19411
|
-
|
|
19412
|
-
}, rn =
|
|
19413
|
-
|
|
19414
|
-
|
|
19417
|
+
queueMicrotask(() => get(Ht)?.querySelector("button")?.focus());
|
|
19418
|
+
}, nn = () => {
|
|
19419
|
+
get(qt) && get(It).trim() === "" && $t();
|
|
19420
|
+
}, rn = (e) => {
|
|
19421
|
+
e.key === "Escape" && (e.stopPropagation(), $t());
|
|
19422
|
+
}, an = /* @__PURE__ */ user_derived(() => {
|
|
19423
|
+
if (get(wt) === null || u() === "server") return [...get(bt)];
|
|
19424
|
+
let e = get(wt), t = get(Tt), n = o()?.[e]?.getSortValue, i = get(Ct);
|
|
19415
19425
|
if (typeof n == "function" && i) {
|
|
19416
|
-
let e = {}, a = get(
|
|
19426
|
+
let e = {}, a = get(bt).map((t, a) => ({
|
|
19417
19427
|
row: t,
|
|
19418
19428
|
sortValue: n(i.get(t) ?? e, a)
|
|
19419
19429
|
}));
|
|
@@ -19422,7 +19432,7 @@ function Table(e, t) {
|
|
|
19422
19432
|
return o = typeof i == "number" && typeof a == "number" ? i - a : typeof i == "boolean" && typeof a == "boolean" ? i === a ? 0 : i ? -1 : 1 : String(i).localeCompare(String(a)), t === "asc" ? o : -o;
|
|
19423
19433
|
}), a.map((e) => e.row);
|
|
19424
19434
|
}
|
|
19425
|
-
return [...get(
|
|
19435
|
+
return [...get(bt)].sort((n, i) => {
|
|
19426
19436
|
let a = n[e], o = i[e];
|
|
19427
19437
|
if (typeof a == "number" && typeof o == "number") return t === "asc" ? a - o : o - a;
|
|
19428
19438
|
if (typeof a == "string" && typeof o == "string") {
|
|
@@ -19431,68 +19441,68 @@ function Table(e, t) {
|
|
|
19431
19441
|
} else if (typeof a == "boolean" && typeof o == "boolean") return t === "asc" ? a === o ? 0 : a ? -1 : 1 : a === o ? 0 : a ? 1 : -1;
|
|
19432
19442
|
return 0;
|
|
19433
19443
|
});
|
|
19434
|
-
}),
|
|
19435
|
-
if (!get(
|
|
19436
|
-
let e = get(
|
|
19437
|
-
return get(
|
|
19444
|
+
}), on = /* @__PURE__ */ user_derived(() => {
|
|
19445
|
+
if (!get(Lt) || get(Rt) || get(It).trim() === "") return get(an);
|
|
19446
|
+
let e = get(It).trim().toLowerCase(), t = ot()?.searchableColumnIndices;
|
|
19447
|
+
return get(an).filter((n) => (t || n.map((e, t) => t)).some((t) => {
|
|
19438
19448
|
let i = n[t];
|
|
19439
19449
|
return i !== null && String(i).toLowerCase().includes(e);
|
|
19440
19450
|
}));
|
|
19441
|
-
}),
|
|
19442
|
-
if (!lt() || get(
|
|
19443
|
-
let e = (get(
|
|
19444
|
-
return get(
|
|
19445
|
-
}),
|
|
19451
|
+
}), sn = /* @__PURE__ */ state(null), cn = /* @__PURE__ */ state(null), ln = /* @__PURE__ */ user_derived(() => lt()?.mode ?? "client"), un = /* @__PURE__ */ user_derived(() => get(cn) ?? lt()?.pageSize ?? 10), dn = /* @__PURE__ */ user_derived(() => lt() ? get(ln) === "server" ? lt().page ?? 1 : get(sn) ?? lt().page ?? 1 : 1), fn = /* @__PURE__ */ user_derived(() => lt() ? get(ln) === "server" ? lt().totalItems ?? 0 : get(on).length : 0), pn = /* @__PURE__ */ user_derived(() => Math.max(1, Math.ceil(get(fn) / Math.max(1, get(un))))), mn = /* @__PURE__ */ user_derived(() => {
|
|
19452
|
+
if (!lt() || get(ln) === "server") return get(on);
|
|
19453
|
+
let e = (get(dn) - 1) * get(un);
|
|
19454
|
+
return get(on).slice(e, e + get(un));
|
|
19455
|
+
}), hn = /* @__PURE__ */ user_derived(() => {
|
|
19446
19456
|
if (!lt()) return "";
|
|
19447
|
-
let e = get(
|
|
19457
|
+
let e = get(fn), t = e === 0 ? 0 : (get(dn) - 1) * get(un) + 1, n = Math.min(get(dn) * get(un), e);
|
|
19448
19458
|
return lt().rangeLabel ? lt().rangeLabel(t, n, e) : e > 0 ? `${t}-${n} of ${e}` : "";
|
|
19449
|
-
}),
|
|
19459
|
+
}), gn = /* @__PURE__ */ user_derived(() => lt()?.pageSizeOptions ?? [
|
|
19450
19460
|
10,
|
|
19451
19461
|
25,
|
|
19452
19462
|
50,
|
|
19453
19463
|
100
|
|
19454
|
-
]),
|
|
19455
|
-
set(
|
|
19456
|
-
},
|
|
19457
|
-
set(
|
|
19458
|
-
},
|
|
19459
|
-
let e = new Map(get(
|
|
19460
|
-
return get(
|
|
19464
|
+
]), _n = /* @__PURE__ */ user_derived(() => (lt()?.hideControls || lt()?.hidePageSizeSelector) ?? !1), vn = /* @__PURE__ */ user_derived(() => (lt()?.hideControls || lt()?.hideSteppers) ?? !1), yn = (e) => {
|
|
19465
|
+
set(sn, e, !0), lt()?.onPageChange?.(e);
|
|
19466
|
+
}, bn = (e) => {
|
|
19467
|
+
set(cn, e, !0), set(sn, 1), lt()?.onPageSizeChange?.(e);
|
|
19468
|
+
}, xn = (e) => lt() ? (get(dn) - 1) * get(un) + e + 1 : e + 1, Sn = /* @__PURE__ */ user_derived(() => lt() && (lt().mode ?? "client") === "client" ? (get(dn) - 1) * get(un) : 0), Cn = (e, t, n, i) => e.getRowId ? e.getRowId(t, n, i) : String(n), wn = new SvelteSet(), Tn = /* @__PURE__ */ user_derived(() => at()?.selectedIds ?? null), En = /* @__PURE__ */ user_derived(() => get(Tn) ?? wn), Dn = (e) => at()?.disabledRowIds?.has(e) ?? !1, On = (e) => get(En).has(e), kn = /* @__PURE__ */ user_derived(() => {
|
|
19469
|
+
let e = new Map(get(an).map((e, t) => [e, t]));
|
|
19470
|
+
return get(on).map((t, n) => {
|
|
19461
19471
|
let i = e.get(t) ?? -1, a = i === -1 ? n : i;
|
|
19462
|
-
return at() && at().enabled !== !1 ?
|
|
19472
|
+
return at() && at().enabled !== !1 ? Cn(at(), t, a, get(xt).get(t) ?? a) : String(a);
|
|
19463
19473
|
});
|
|
19464
|
-
}),
|
|
19465
|
-
let t = get(
|
|
19466
|
-
return t !== null && !
|
|
19467
|
-
})),
|
|
19468
|
-
if (!at() || at().enabled === !1 || get(
|
|
19469
|
-
let e = get(
|
|
19470
|
-
return e === 0 ? "none" : e === get(
|
|
19471
|
-
}),
|
|
19472
|
-
if (!(!at() || at().enabled === !1 ||
|
|
19473
|
-
if (get(
|
|
19474
|
-
let t = get(
|
|
19474
|
+
}), An = /* @__PURE__ */ user_derived(() => new Map(get(on).map((e, t) => [e, get(kn)[t]]))), jn = /* @__PURE__ */ user_derived(() => !at() || at().enabled === !1 ? [] : get(mn).flatMap((e) => {
|
|
19475
|
+
let t = get(An).get(e) ?? null;
|
|
19476
|
+
return t !== null && !Dn(t) ? [t] : [];
|
|
19477
|
+
})), Mn = /* @__PURE__ */ user_derived(() => {
|
|
19478
|
+
if (!at() || at().enabled === !1 || get(jn).length === 0) return "none";
|
|
19479
|
+
let e = get(jn).filter((e) => get(En).has(e)).length;
|
|
19480
|
+
return e === 0 ? "none" : e === get(jn).length ? "all" : "some";
|
|
19481
|
+
}), Nn = (e) => {
|
|
19482
|
+
if (!(!at() || at().enabled === !1 || Dn(e))) {
|
|
19483
|
+
if (get(Tn)) {
|
|
19484
|
+
let t = get(Tn).has(e), n = at().selectionMode === "single" ? new Set(t ? [] : [e]) : t ? new Set([...get(Tn)].filter((t) => t !== e)) : new Set([...get(Tn), e]);
|
|
19475
19485
|
at().onSelectionChange?.(n);
|
|
19476
19486
|
return;
|
|
19477
19487
|
}
|
|
19478
19488
|
if (at().selectionMode === "single") {
|
|
19479
|
-
let t =
|
|
19480
|
-
|
|
19481
|
-
} else
|
|
19482
|
-
at().onSelectionChange?.(new Set(
|
|
19489
|
+
let t = wn.has(e);
|
|
19490
|
+
wn.clear(), t || wn.add(e);
|
|
19491
|
+
} else wn.has(e) ? wn.delete(e) : wn.add(e);
|
|
19492
|
+
at().onSelectionChange?.(new Set(wn));
|
|
19483
19493
|
}
|
|
19484
|
-
},
|
|
19494
|
+
}, Pn = () => {
|
|
19485
19495
|
if (!(!at() || at().enabled === !1)) {
|
|
19486
|
-
if (get(
|
|
19487
|
-
let e = new Set(get(
|
|
19496
|
+
if (get(Tn)) {
|
|
19497
|
+
let e = new Set(get(jn)), t = get(Mn) === "all" ? new Set([...get(Tn)].filter((t) => !e.has(t))) : new Set([...get(Tn), ...get(jn)]);
|
|
19488
19498
|
at().onSelectionChange?.(t);
|
|
19489
19499
|
return;
|
|
19490
19500
|
}
|
|
19491
|
-
if (get(
|
|
19492
|
-
else for (let e of get(
|
|
19493
|
-
at().onSelectionChange?.(new Set(
|
|
19501
|
+
if (get(Mn) === "all") for (let e of get(jn)) wn.delete(e);
|
|
19502
|
+
else for (let e of get(jn)) wn.add(e);
|
|
19503
|
+
at().onSelectionChange?.(new Set(wn));
|
|
19494
19504
|
}
|
|
19495
|
-
},
|
|
19505
|
+
}, Fn = (e, t) => {
|
|
19496
19506
|
let n = t === -1 ? "select-all" : `row-checkbox-${e}`, i = t === -1 ? {} : { id: `row-checkbox-${e}` };
|
|
19497
19507
|
typeof S() == "string" && (i["data-pw"] = `${S()}-${n}`, i.testID = `${S()}-${n}`);
|
|
19498
19508
|
let a = at()?.getRowAttributes ? at().getRowAttributes(e, t) : {};
|
|
@@ -19500,8 +19510,8 @@ function Table(e, t) {
|
|
|
19500
19510
|
...i,
|
|
19501
19511
|
...a
|
|
19502
19512
|
};
|
|
19503
|
-
},
|
|
19504
|
-
var
|
|
19513
|
+
}, In = /* @__PURE__ */ user_derived(() => !!at() && at().enabled !== !1), Ln = /* @__PURE__ */ user_derived(() => at()?.selectionMode === "single");
|
|
19514
|
+
var Rn = {
|
|
19505
19515
|
get tableTitle() {
|
|
19506
19516
|
return n();
|
|
19507
19517
|
},
|
|
@@ -19711,40 +19721,46 @@ function Table(e, t) {
|
|
|
19711
19721
|
},
|
|
19712
19722
|
set usePortal(e = !1) {
|
|
19713
19723
|
gt(e), flushSync();
|
|
19724
|
+
},
|
|
19725
|
+
get labels() {
|
|
19726
|
+
return _t();
|
|
19727
|
+
},
|
|
19728
|
+
set labels(e) {
|
|
19729
|
+
_t(e), flushSync();
|
|
19714
19730
|
}
|
|
19715
|
-
},
|
|
19731
|
+
}, zn = root_30(), Bn = first_child(zn), Vn = (e) => {
|
|
19716
19732
|
var t = root$31(), i = child(t, !0);
|
|
19717
19733
|
reset(t), template_effect(() => set_text(i, n())), append(e, t);
|
|
19718
19734
|
};
|
|
19719
|
-
if_block(
|
|
19720
|
-
typeof n() == "string" && n().length > 0 && e(
|
|
19735
|
+
if_block(Bn, (e) => {
|
|
19736
|
+
typeof n() == "string" && n().length > 0 && e(Vn);
|
|
19721
19737
|
});
|
|
19722
|
-
var
|
|
19738
|
+
var Hn = sibling(Bn, 2), Un = (e) => {
|
|
19723
19739
|
var t = root_2$22(), n = child(t);
|
|
19724
19740
|
html(n, () => search_default, !0), reset(n);
|
|
19725
19741
|
var i = sibling(n, 2);
|
|
19726
|
-
remove_input_defaults(i), bind_this(i, (e) => set(
|
|
19742
|
+
remove_input_defaults(i), bind_this(i, (e) => set(zt, e), () => get(zt));
|
|
19727
19743
|
var a = sibling(i, 2), o = (e) => {
|
|
19728
19744
|
var t = root_1$28();
|
|
19729
|
-
html(t, () => close_default, !0), reset(t), delegated("click", t,
|
|
19745
|
+
html(t, () => close_default, !0), reset(t), template_effect(() => set_attribute(t, "aria-label", _t()?.clearSearch ?? "Clear search")), delegated("click", t, $t), append(e, t);
|
|
19730
19746
|
};
|
|
19731
19747
|
if_block(a, (e) => {
|
|
19732
|
-
get(
|
|
19748
|
+
get(It).length > 0 && e(o);
|
|
19733
19749
|
}), reset(t), template_effect(() => {
|
|
19734
|
-
set_attribute(i, "placeholder", ot()?.placeholder ?? "Search…"), set_value(i, get(
|
|
19735
|
-
}), delegated("input", i,
|
|
19750
|
+
set_attribute(i, "placeholder", ot()?.placeholder ?? "Search…"), set_value(i, get(It)), set_attribute(i, "data-pw", ot()?.testId ?? null), set_attribute(i, "testid", ot()?.testId ?? null), set_attribute(i, "aria-label", ot()?.placeholder ?? "Search");
|
|
19751
|
+
}), delegated("input", i, Qt), append(e, t);
|
|
19736
19752
|
};
|
|
19737
|
-
if_block(
|
|
19738
|
-
get(
|
|
19753
|
+
if_block(Hn, (e) => {
|
|
19754
|
+
get(Lt) && !get(Gt) && e(Un);
|
|
19739
19755
|
});
|
|
19740
|
-
var
|
|
19756
|
+
var Wn = sibling(Hn, 2), Gn = (e) => {
|
|
19741
19757
|
var t = root_3$19();
|
|
19742
|
-
snippet(child(t), ut, () => ({ selectedIds: new Set(get(
|
|
19758
|
+
snippet(child(t), ut, () => ({ selectedIds: new Set(get(En)) })), reset(t), append(e, t);
|
|
19743
19759
|
};
|
|
19744
|
-
if_block(
|
|
19745
|
-
typeof ut() == "function" && get(
|
|
19760
|
+
if_block(Wn, (e) => {
|
|
19761
|
+
typeof ut() == "function" && get(In) && get(En).size > 0 && e(Gn);
|
|
19746
19762
|
});
|
|
19747
|
-
var
|
|
19763
|
+
var Kn = sibling(Wn, 2), qn = (e) => {
|
|
19748
19764
|
var t = root_29(), n = child(t);
|
|
19749
19765
|
let i;
|
|
19750
19766
|
var a = child(n), s = child(a), c = child(s), l = (e) => {
|
|
@@ -19759,46 +19775,48 @@ function Table(e, t) {
|
|
|
19759
19775
|
let n;
|
|
19760
19776
|
var i = child(t);
|
|
19761
19777
|
{
|
|
19762
|
-
let e = /* @__PURE__ */ user_derived(() => get(
|
|
19778
|
+
let e = /* @__PURE__ */ user_derived(() => _t()?.selectAllRows ?? "Select all rows"), t = /* @__PURE__ */ user_derived(() => get(Mn) === "all"), n = /* @__PURE__ */ user_derived(() => get(Mn) === "some"), a = /* @__PURE__ */ user_derived(() => get(jn).map((e) => `row-checkbox-${e}`).join(" ")), o = /* @__PURE__ */ user_derived(() => Fn("__header__", -1));
|
|
19763
19779
|
Checkbox(i, {
|
|
19764
19780
|
text: "",
|
|
19765
|
-
ariaLabel
|
|
19781
|
+
get ariaLabel() {
|
|
19782
|
+
return get(e);
|
|
19783
|
+
},
|
|
19766
19784
|
controlled: !0,
|
|
19767
19785
|
get checked() {
|
|
19768
|
-
return get(
|
|
19786
|
+
return get(t);
|
|
19769
19787
|
},
|
|
19770
19788
|
get indeterminate() {
|
|
19771
|
-
return get(
|
|
19789
|
+
return get(n);
|
|
19772
19790
|
},
|
|
19773
19791
|
get ariaControls() {
|
|
19774
|
-
return get(
|
|
19792
|
+
return get(a);
|
|
19775
19793
|
},
|
|
19776
19794
|
get attributes() {
|
|
19777
|
-
return get(
|
|
19795
|
+
return get(o);
|
|
19778
19796
|
},
|
|
19779
|
-
onclick:
|
|
19797
|
+
onclick: Pn
|
|
19780
19798
|
});
|
|
19781
19799
|
}
|
|
19782
|
-
reset(t), template_effect(() => n = set_class(t, 1, "table-header table-checkbox-col svelte-171ci2i", null, n, { "table-header-sticky": get(
|
|
19800
|
+
reset(t), template_effect(() => n = set_class(t, 1, "table-header table-checkbox-col svelte-171ci2i", null, n, { "table-header-sticky": get(jt) })), append(e, t);
|
|
19783
19801
|
}, at = (e) => {
|
|
19784
19802
|
var t = root_6$14();
|
|
19785
19803
|
let n;
|
|
19786
|
-
template_effect(() => n = set_class(t, 1, "table-header table-checkbox-col svelte-171ci2i", null, n, { "table-header-sticky": get(
|
|
19804
|
+
template_effect(() => n = set_class(t, 1, "table-header table-checkbox-col svelte-171ci2i", null, n, { "table-header-sticky": get(jt) })), append(e, t);
|
|
19787
19805
|
};
|
|
19788
19806
|
if_block(G, (e) => {
|
|
19789
|
-
get(
|
|
19807
|
+
get(In) && !get(Ln) ? e(be) : get(In) && get(Ln) && e(at, 1);
|
|
19790
19808
|
});
|
|
19791
19809
|
var ct = sibling(G), ut = (e) => {
|
|
19792
19810
|
var t = root_7$13();
|
|
19793
19811
|
let n;
|
|
19794
19812
|
var i = child(t, !0);
|
|
19795
19813
|
reset(t), template_effect(() => {
|
|
19796
|
-
n = set_class(t, 1, "table-header table-row-number-col svelte-171ci2i", null, n, { "table-header-sticky": get(
|
|
19814
|
+
n = set_class(t, 1, "table-header table-row-number-col svelte-171ci2i", null, n, { "table-header-sticky": get(jt) }), set_text(i, ft());
|
|
19797
19815
|
}), append(e, t);
|
|
19798
19816
|
};
|
|
19799
19817
|
if_block(ct, (e) => {
|
|
19800
19818
|
dt() && e(ut);
|
|
19801
|
-
}), each(sibling(ct), 17, () => get(
|
|
19819
|
+
}), each(sibling(ct), 17, () => get(yt), index, (e, t, n) => {
|
|
19802
19820
|
let i = /* @__PURE__ */ user_derived(() => o()?.[n]);
|
|
19803
19821
|
var a = root_19$3();
|
|
19804
19822
|
let s, c;
|
|
@@ -19845,13 +19863,13 @@ function Table(e, t) {
|
|
|
19845
19863
|
let e = (e) => {
|
|
19846
19864
|
var t = root_9$9();
|
|
19847
19865
|
html(t, () => chevron_down_sm_default, !0), reset(t), append(e, t);
|
|
19848
|
-
}, n = /* @__PURE__ */ user_derived(() => get(i).testId && `${get(i).testId}-filter-trigger`);
|
|
19866
|
+
}, n = /* @__PURE__ */ user_derived(() => _t()?.filterBy?.(get(t)) ?? `Filter by ${get(t)}`), o = /* @__PURE__ */ user_derived(() => get(i).testId && `${get(i).testId}-filter-trigger`);
|
|
19849
19867
|
Button(c, spread_props(a, {
|
|
19850
19868
|
get ariaLabel() {
|
|
19851
|
-
return
|
|
19869
|
+
return get(n);
|
|
19852
19870
|
},
|
|
19853
19871
|
get testId() {
|
|
19854
|
-
return get(
|
|
19872
|
+
return get(o);
|
|
19855
19873
|
},
|
|
19856
19874
|
icon: e,
|
|
19857
19875
|
$$slots: { icon: !0 }
|
|
@@ -19885,49 +19903,53 @@ function Table(e, t) {
|
|
|
19885
19903
|
get(i)?.filter && e(C);
|
|
19886
19904
|
});
|
|
19887
19905
|
var ne = sibling(S, 2), re = (e) => {
|
|
19888
|
-
var i = root_15$5();
|
|
19889
|
-
|
|
19890
|
-
|
|
19891
|
-
|
|
19892
|
-
|
|
19893
|
-
|
|
19894
|
-
|
|
19895
|
-
|
|
19896
|
-
|
|
19897
|
-
|
|
19898
|
-
|
|
19899
|
-
|
|
19900
|
-
|
|
19901
|
-
|
|
19902
|
-
|
|
19903
|
-
|
|
19904
|
-
|
|
19905
|
-
|
|
19906
|
-
|
|
19907
|
-
|
|
19906
|
+
var i = root_15$5(), a = child(i);
|
|
19907
|
+
{
|
|
19908
|
+
let e = /* @__PURE__ */ user_derived(() => _t()?.sortBy?.(get(t)) ?? `Sort by ${get(t)}`);
|
|
19909
|
+
Button(a, {
|
|
19910
|
+
onclick: () => Dt(n),
|
|
19911
|
+
get ariaLabel() {
|
|
19912
|
+
return get(e);
|
|
19913
|
+
},
|
|
19914
|
+
children: (e, t) => {
|
|
19915
|
+
var i = comment(), a = first_child(i), o = (e) => {
|
|
19916
|
+
var t = comment(), n = first_child(t), i = (e) => {
|
|
19917
|
+
var t = comment();
|
|
19918
|
+
snippet(first_child(t), k), append(e, t);
|
|
19919
|
+
}, a = (e) => {
|
|
19920
|
+
var t = root_12$6();
|
|
19921
|
+
html(t, () => sort_default_default, !0), reset(t), append(e, t);
|
|
19922
|
+
};
|
|
19923
|
+
if_block(n, (e) => {
|
|
19924
|
+
typeof k() == "function" ? e(i) : e(a, -1);
|
|
19925
|
+
}), append(e, t);
|
|
19926
|
+
}, s = (e) => {
|
|
19927
|
+
var t = comment(), n = first_child(t), i = (e) => {
|
|
19928
|
+
var t = comment();
|
|
19929
|
+
snippet(first_child(t), R), append(e, t);
|
|
19930
|
+
}, a = (e) => {
|
|
19931
|
+
var t = root_13$5();
|
|
19932
|
+
html(t, () => sort_default_default, !0), reset(t), append(e, t);
|
|
19933
|
+
};
|
|
19934
|
+
if_block(n, (e) => {
|
|
19935
|
+
typeof R() == "function" ? e(i) : e(a, -1);
|
|
19936
|
+
}), append(e, t);
|
|
19937
|
+
}, c = (e) => {
|
|
19908
19938
|
var t = comment();
|
|
19909
|
-
snippet(first_child(t),
|
|
19910
|
-
},
|
|
19911
|
-
var t =
|
|
19939
|
+
snippet(first_child(t), te), append(e, t);
|
|
19940
|
+
}, l = (e) => {
|
|
19941
|
+
var t = root_14$5();
|
|
19912
19942
|
html(t, () => sort_default_default, !0), reset(t), append(e, t);
|
|
19913
19943
|
};
|
|
19914
|
-
if_block(
|
|
19915
|
-
typeof
|
|
19916
|
-
}), append(e,
|
|
19917
|
-
},
|
|
19918
|
-
|
|
19919
|
-
|
|
19920
|
-
|
|
19921
|
-
|
|
19922
|
-
|
|
19923
|
-
};
|
|
19924
|
-
if_block(a, (e) => {
|
|
19925
|
-
get(Ct) === n && get(wt) === "asc" ? e(o) : get(Ct) === n && get(wt) === "desc" ? e(s, 1) : typeof te() == "function" ? e(c, 2) : e(l, -1);
|
|
19926
|
-
}), append(e, i);
|
|
19927
|
-
},
|
|
19928
|
-
$$slots: { default: !0 }
|
|
19929
|
-
}), reset(i), append(e, i);
|
|
19930
|
-
}, G = /* @__PURE__ */ user_derived(() => Tt(n));
|
|
19944
|
+
if_block(a, (e) => {
|
|
19945
|
+
get(wt) === n && get(Tt) === "asc" ? e(o) : get(wt) === n && get(Tt) === "desc" ? e(s, 1) : typeof te() == "function" ? e(c, 2) : e(l, -1);
|
|
19946
|
+
}), append(e, i);
|
|
19947
|
+
},
|
|
19948
|
+
$$slots: { default: !0 }
|
|
19949
|
+
});
|
|
19950
|
+
}
|
|
19951
|
+
reset(i), append(e, i);
|
|
19952
|
+
}, G = /* @__PURE__ */ user_derived(() => Et(n));
|
|
19931
19953
|
if_block(ne, (e) => {
|
|
19932
19954
|
get(G) && e(re);
|
|
19933
19955
|
});
|
|
@@ -19938,7 +19960,7 @@ function Table(e, t) {
|
|
|
19938
19960
|
let e = /* @__PURE__ */ user_derived(() => ot()?.placeholder ?? "Search…"), t = /* @__PURE__ */ user_derived(() => ot()?.testId ?? ""), i = /* @__PURE__ */ user_derived(() => ot()?.placeholder ?? "Search");
|
|
19939
19961
|
bind_this(Input(n, {
|
|
19940
19962
|
get value() {
|
|
19941
|
-
return get(
|
|
19963
|
+
return get(It);
|
|
19942
19964
|
},
|
|
19943
19965
|
get placeholder() {
|
|
19944
19966
|
return get(e);
|
|
@@ -19950,24 +19972,30 @@ function Table(e, t) {
|
|
|
19950
19972
|
return get(i);
|
|
19951
19973
|
},
|
|
19952
19974
|
autoComplete: "off",
|
|
19953
|
-
oninput: (e) =>
|
|
19954
|
-
onblur:
|
|
19955
|
-
onkeydown:
|
|
19975
|
+
oninput: (e) => Zt(e),
|
|
19976
|
+
onblur: nn,
|
|
19977
|
+
onkeydown: rn,
|
|
19956
19978
|
classes: "table-inline-search-input"
|
|
19957
|
-
}), (e) => set(
|
|
19979
|
+
}), (e) => set(Bt, e, !0), () => get(Bt));
|
|
19958
19980
|
}
|
|
19959
|
-
var i = sibling(n, 2);
|
|
19960
|
-
|
|
19961
|
-
|
|
19962
|
-
iconOnly: !0,
|
|
19963
|
-
ariaLabel: "Close search",
|
|
19964
|
-
onclick: Qt,
|
|
19965
|
-
icon: (e) => {
|
|
19981
|
+
var i = sibling(n, 2), a = child(i);
|
|
19982
|
+
{
|
|
19983
|
+
let e = (e) => {
|
|
19966
19984
|
var t = comment();
|
|
19967
19985
|
html(first_child(t), () => close_default), append(e, t);
|
|
19968
|
-
},
|
|
19969
|
-
|
|
19970
|
-
|
|
19986
|
+
}, t = /* @__PURE__ */ user_derived(() => _t()?.closeSearch ?? "Close search");
|
|
19987
|
+
Button(a, {
|
|
19988
|
+
variant: "ghost",
|
|
19989
|
+
iconOnly: !0,
|
|
19990
|
+
get ariaLabel() {
|
|
19991
|
+
return get(t);
|
|
19992
|
+
},
|
|
19993
|
+
onclick: $t,
|
|
19994
|
+
icon: e,
|
|
19995
|
+
$$slots: { icon: !0 }
|
|
19996
|
+
});
|
|
19997
|
+
}
|
|
19998
|
+
reset(i), append(e, t);
|
|
19971
19999
|
}, a = (e) => {
|
|
19972
20000
|
var t = root_17$3(), n = child(t);
|
|
19973
20001
|
{
|
|
@@ -19984,22 +20012,22 @@ function Table(e, t) {
|
|
|
19984
20012
|
get testId() {
|
|
19985
20013
|
return get(i);
|
|
19986
20014
|
},
|
|
19987
|
-
onclick:
|
|
20015
|
+
onclick: en,
|
|
19988
20016
|
icon: e,
|
|
19989
20017
|
$$slots: { icon: !0 }
|
|
19990
20018
|
});
|
|
19991
20019
|
}
|
|
19992
|
-
reset(t), bind_this(t, (e) => set(
|
|
20020
|
+
reset(t), bind_this(t, (e) => set(Ht, e), () => get(Ht)), append(e, t);
|
|
19993
20021
|
};
|
|
19994
20022
|
if_block(n, (e) => {
|
|
19995
|
-
get(
|
|
20023
|
+
get(qt) ? e(i) : e(a, -1);
|
|
19996
20024
|
}), reset(t), append(e, t);
|
|
19997
20025
|
};
|
|
19998
20026
|
if_block(be, (e) => {
|
|
19999
|
-
get(
|
|
20027
|
+
get(Lt) && get(Gt) && n === get(yt).length - 1 && e(Me);
|
|
20000
20028
|
}), reset(l), reset(a), template_effect(() => {
|
|
20001
20029
|
s = set_class(a, 1, "table-header svelte-171ci2i", null, s, {
|
|
20002
|
-
"table-header-sticky": get(
|
|
20030
|
+
"table-header-sticky": get(jt),
|
|
20003
20031
|
"table-col-highlighted": get(i)?.highlighted === !0
|
|
20004
20032
|
}), set_attribute(a, "data-pw", get(i)?.testId ?? null), set_attribute(a, "testid", get(i)?.testId ?? null), c = set_style(a, "", c, {
|
|
20005
20033
|
"text-align": get(i)?.align ?? null,
|
|
@@ -20008,19 +20036,19 @@ function Table(e, t) {
|
|
|
20008
20036
|
}), u = set_style(l, "", u, { "justify-content": get(i)?.align === "right" ? "flex-end" : get(i)?.align === "center" ? "center" : null });
|
|
20009
20037
|
}), append(e, a);
|
|
20010
20038
|
}), reset(f), reset(u);
|
|
20011
|
-
var
|
|
20039
|
+
var vt = sibling(u), bt = child(vt), St = (e) => {
|
|
20012
20040
|
var t = root_20$2(), n = child(t);
|
|
20013
|
-
snippet(child(n), re), reset(n), reset(t), template_effect(() => set_attribute(n, "colspan", get(
|
|
20014
|
-
},
|
|
20041
|
+
snippet(child(n), re), reset(n), reset(t), template_effect(() => set_attribute(n, "colspan", get(yt).length + +!!get(In) + +!!dt())), append(e, t);
|
|
20042
|
+
}, Rt = (e) => {
|
|
20015
20043
|
var t = comment();
|
|
20016
|
-
each(first_child(t), 19, () => get(
|
|
20017
|
-
let i = /* @__PURE__ */ user_derived(() => get(n) + get(
|
|
20044
|
+
each(first_child(t), 19, () => get(mn), (e, t) => get(An).get(e) ?? t, (e, t, n) => {
|
|
20045
|
+
let i = /* @__PURE__ */ user_derived(() => get(n) + get(Sn)), a = /* @__PURE__ */ user_derived(() => get(xt).get(get(t)) ?? get(i)), s = /* @__PURE__ */ user_derived(() => get(An).get(get(t)) ?? String(get(i))), c = /* @__PURE__ */ user_derived(() => get(In) && Dn(get(s))), l = /* @__PURE__ */ user_derived(() => get(In) && On(get(s)));
|
|
20018
20046
|
var u = root_24$2();
|
|
20019
20047
|
let f;
|
|
20020
20048
|
var p = child(u), S = (e) => {
|
|
20021
20049
|
var t = root_21$2(), n = child(t);
|
|
20022
20050
|
{
|
|
20023
|
-
let e = /* @__PURE__ */ user_derived(() => `Select row ${get(s) || "non-selectable"}`), t = /* @__PURE__ */ user_derived(() =>
|
|
20051
|
+
let e = /* @__PURE__ */ user_derived(() => _t()?.selectRow?.(get(s)) ?? `Select row ${get(s) || "non-selectable"}`), t = /* @__PURE__ */ user_derived(() => Fn(get(s), get(i)));
|
|
20024
20052
|
Checkbox(n, {
|
|
20025
20053
|
text: "",
|
|
20026
20054
|
get ariaLabel() {
|
|
@@ -20036,22 +20064,22 @@ function Table(e, t) {
|
|
|
20036
20064
|
get attributes() {
|
|
20037
20065
|
return get(t);
|
|
20038
20066
|
},
|
|
20039
|
-
onclick: () =>
|
|
20067
|
+
onclick: () => Nn(get(s))
|
|
20040
20068
|
});
|
|
20041
20069
|
}
|
|
20042
20070
|
reset(t), delegated("click", t, (e) => e.stopPropagation()), delegated("keydown", t, (e) => e.stopPropagation()), append(e, t);
|
|
20043
20071
|
};
|
|
20044
20072
|
if_block(p, (e) => {
|
|
20045
|
-
get(
|
|
20073
|
+
get(In) && e(S);
|
|
20046
20074
|
});
|
|
20047
20075
|
var C = sibling(p), k = (e) => {
|
|
20048
20076
|
var t = root_22$2(), i = child(t, !0);
|
|
20049
|
-
reset(t), template_effect((e) => set_text(i, e), [() =>
|
|
20077
|
+
reset(t), template_effect((e) => set_text(i, e), [() => xn(get(n))]), append(e, t);
|
|
20050
20078
|
};
|
|
20051
20079
|
if_block(C, (e) => {
|
|
20052
20080
|
dt() && e(k);
|
|
20053
20081
|
}), each(sibling(C), 17, () => get(t), index, (e, n, s) => {
|
|
20054
|
-
let c = /* @__PURE__ */ user_derived(() => o()?.[s]), l = /* @__PURE__ */ user_derived(() => get(
|
|
20082
|
+
let c = /* @__PURE__ */ user_derived(() => o()?.[s]), l = /* @__PURE__ */ user_derived(() => get(Ct)?.get(get(t))), u = /* @__PURE__ */ user_derived(() => typeof get(n) == "string" || typeof get(n) == "number" || typeof get(n) == "boolean");
|
|
20055
20083
|
var f = root_23$2();
|
|
20056
20084
|
let p, S;
|
|
20057
20085
|
var C = child(f);
|
|
@@ -20099,34 +20127,34 @@ function Table(e, t) {
|
|
|
20099
20127
|
]), append(e, f);
|
|
20100
20128
|
}), reset(u), template_effect((e, t) => {
|
|
20101
20129
|
f = set_class(u, 1, "table-row svelte-171ci2i", null, f, {
|
|
20102
|
-
"table-row-clickable": get(
|
|
20130
|
+
"table-row-clickable": get(At),
|
|
20103
20131
|
"table-row-selected": get(l),
|
|
20104
20132
|
"table-summary-row": pt() !== null && get(a) === pt()
|
|
20105
|
-
}), set_attribute(u, "data-pw", e), set_attribute(u, "testid", t), set_attribute(u, "tabindex", get(
|
|
20133
|
+
}), set_attribute(u, "data-pw", e), set_attribute(u, "testid", t), set_attribute(u, "tabindex", get(At) ? 0 : null);
|
|
20106
20134
|
}, [() => typeof Ue() == "function" ? Ue()(get(t), get(i)) : null, () => typeof Ue() == "function" ? Ue()(get(t), get(i)) : null]), delegated("click", u, function(...e) {
|
|
20107
|
-
(get(
|
|
20135
|
+
(get(At) ? () => Ot(get(i), get(t), get(a)) : null)?.apply(this, e);
|
|
20108
20136
|
}), delegated("keydown", u, function(...e) {
|
|
20109
|
-
(get(
|
|
20137
|
+
(get(At) ? (e) => kt(e, get(i), get(t), get(a)) : null)?.apply(this, e);
|
|
20110
20138
|
}), append(e, u);
|
|
20111
20139
|
}), append(e, t);
|
|
20112
20140
|
};
|
|
20113
|
-
if_block(
|
|
20114
|
-
get(
|
|
20115
|
-
}), reset(
|
|
20116
|
-
var
|
|
20141
|
+
if_block(bt, (e) => {
|
|
20142
|
+
get(on).length === 0 && typeof re() == "function" ? e(St) : e(Rt, -1);
|
|
20143
|
+
}), reset(vt), reset(s), reset(a), action(a, (e) => Pt?.(e)), reset(n);
|
|
20144
|
+
var zt = sibling(n, 2), Qt = (e) => {
|
|
20117
20145
|
var t = root_25$1();
|
|
20118
20146
|
snippet(child(t), Re), reset(t), append(e, t);
|
|
20119
|
-
},
|
|
20147
|
+
}, tn = (e) => {
|
|
20120
20148
|
var t = root_28(), n = child(t), i = child(n, !0);
|
|
20121
20149
|
reset(n);
|
|
20122
20150
|
var a = sibling(n, 2), o = (e) => {
|
|
20123
20151
|
var t = root_27(), n = child(t), i = (e) => {
|
|
20124
20152
|
var t = root_26$1(), n = child(t);
|
|
20125
20153
|
{
|
|
20126
|
-
let e = /* @__PURE__ */ user_derived(() => get(
|
|
20154
|
+
let e = /* @__PURE__ */ user_derived(() => get(gn).map((e) => ({
|
|
20127
20155
|
id: String(e),
|
|
20128
20156
|
label: String(e)
|
|
20129
|
-
}))), t = /* @__PURE__ */ user_derived(() => [String(get(
|
|
20157
|
+
}))), t = /* @__PURE__ */ user_derived(() => [String(get(un))]), i = /* @__PURE__ */ user_derived(() => lt().isLoading ?? !1), a = /* @__PURE__ */ user_derived(() => lt().testId && `${lt().testId}-page-size`);
|
|
20130
20158
|
Select(n, {
|
|
20131
20159
|
get items() {
|
|
20132
20160
|
return get(e);
|
|
@@ -20142,24 +20170,24 @@ function Table(e, t) {
|
|
|
20142
20170
|
return get(a);
|
|
20143
20171
|
},
|
|
20144
20172
|
onchange: (e) => {
|
|
20145
|
-
e.length > 0 &&
|
|
20173
|
+
e.length > 0 && bn(Number(e[0]));
|
|
20146
20174
|
}
|
|
20147
20175
|
});
|
|
20148
20176
|
}
|
|
20149
20177
|
reset(t), append(e, t);
|
|
20150
20178
|
};
|
|
20151
20179
|
if_block(n, (e) => {
|
|
20152
|
-
!get(
|
|
20180
|
+
!get(_n) && get(gn).length > 0 && e(i);
|
|
20153
20181
|
});
|
|
20154
20182
|
var a = sibling(n, 2), o = (e) => {
|
|
20155
20183
|
{
|
|
20156
20184
|
let t = /* @__PURE__ */ user_derived(() => lt().hasMore ?? !1), n = /* @__PURE__ */ user_derived(() => lt().isLoading ?? !1), i = /* @__PURE__ */ user_derived(() => lt().testId && `${lt().testId}-pages`);
|
|
20157
20185
|
Pagination(e, {
|
|
20158
20186
|
get totalPages() {
|
|
20159
|
-
return get(
|
|
20187
|
+
return get(pn);
|
|
20160
20188
|
},
|
|
20161
20189
|
get currentPage() {
|
|
20162
|
-
return get(
|
|
20190
|
+
return get(dn);
|
|
20163
20191
|
},
|
|
20164
20192
|
get hasMore() {
|
|
20165
20193
|
return get(t);
|
|
@@ -20176,7 +20204,7 @@ function Table(e, t) {
|
|
|
20176
20204
|
get nextButtonTestId() {
|
|
20177
20205
|
return lt().nextButtonTestId;
|
|
20178
20206
|
},
|
|
20179
|
-
onchange:
|
|
20207
|
+
onchange: yn,
|
|
20180
20208
|
get onloadmore() {
|
|
20181
20209
|
return lt().onLoadMore;
|
|
20182
20210
|
}
|
|
@@ -20184,27 +20212,27 @@ function Table(e, t) {
|
|
|
20184
20212
|
}
|
|
20185
20213
|
};
|
|
20186
20214
|
if_block(a, (e) => {
|
|
20187
|
-
get(
|
|
20215
|
+
get(vn) || e(o);
|
|
20188
20216
|
}), reset(t), append(e, t);
|
|
20189
20217
|
};
|
|
20190
20218
|
if_block(a, (e) => {
|
|
20191
|
-
(!get(
|
|
20219
|
+
(!get(_n) || !get(vn)) && e(o);
|
|
20192
20220
|
}), reset(t), template_effect(() => {
|
|
20193
|
-
set_attribute(t, "data-pw", lt().testId ?? null), set_attribute(t, "testid", lt().testId ?? null), set_attribute(n, "data-pw", lt().rangeTestId ?? (typeof S() == "string" ? `${S()}-paginator-range` : lt()?.testId ? `${lt().testId}-range` : null)), set_attribute(n, "testid", lt().rangeTestId ?? (typeof S() == "string" ? `${S()}-paginator-range` : lt()?.testId ? `${lt().testId}-range` : null)), set_text(i, get(
|
|
20221
|
+
set_attribute(t, "data-pw", lt().testId ?? null), set_attribute(t, "testid", lt().testId ?? null), set_attribute(n, "data-pw", lt().rangeTestId ?? (typeof S() == "string" ? `${S()}-paginator-range` : lt()?.testId ? `${lt().testId}-range` : null)), set_attribute(n, "testid", lt().rangeTestId ?? (typeof S() == "string" ? `${S()}-paginator-range` : lt()?.testId ? `${lt().testId}-range` : null)), set_text(i, get(hn));
|
|
20194
20222
|
}), append(e, t);
|
|
20195
20223
|
};
|
|
20196
|
-
if_block(
|
|
20197
|
-
typeof Re() == "function" ? e(
|
|
20224
|
+
if_block(zt, (e) => {
|
|
20225
|
+
typeof Re() == "function" ? e(Qt) : lt() && (get(pn) > 1 || lt().hasMore || lt().showFooterOnSinglePage || get(_n) && get(vn)) && e(tn, 1);
|
|
20198
20226
|
}), reset(t), template_effect(() => {
|
|
20199
20227
|
set_class(t, 1, `table-container ${p() ? "scrollable-table" : ""} ${Me() ?? "" ?? ""}`, "svelte-171ci2i"), set_attribute(t, "data-pw", S()), set_attribute(t, "testid", S()), i = set_class(n, 1, "table-scroll-shell svelte-171ci2i", null, i, {
|
|
20200
|
-
"scrollable-left": get(
|
|
20201
|
-
"scrollable-right": get(
|
|
20228
|
+
"scrollable-left": get(Mt),
|
|
20229
|
+
"scrollable-right": get(Nt)
|
|
20202
20230
|
});
|
|
20203
20231
|
}), append(e, t);
|
|
20204
20232
|
};
|
|
20205
|
-
return if_block(
|
|
20206
|
-
(get(
|
|
20207
|
-
}), append(e,
|
|
20233
|
+
return if_block(Kn, (e) => {
|
|
20234
|
+
(get(yt).length !== 0 || get(bt).length !== 0) && e(qn);
|
|
20235
|
+
}), append(e, zn), pop(Rn);
|
|
20208
20236
|
}
|
|
20209
20237
|
delegate([
|
|
20210
20238
|
"input",
|
|
@@ -20245,7 +20273,8 @@ delegate([
|
|
|
20245
20273
|
summaryRowIndex: {},
|
|
20246
20274
|
headerTooltipIcon: {},
|
|
20247
20275
|
headerTooltipPosition: {},
|
|
20248
|
-
usePortal: {}
|
|
20276
|
+
usePortal: {},
|
|
20277
|
+
labels: {}
|
|
20249
20278
|
}, [], [], { mode: "open" });
|
|
20250
20279
|
//#endregion
|
|
20251
20280
|
//#region src/wc/components/Table.wc.svelte
|
|
@@ -20364,7 +20393,8 @@ customElements.define("sui-table", create_custom_element(Table_wc, {
|
|
|
20364
20393
|
},
|
|
20365
20394
|
onrowclick: { type: "Object" },
|
|
20366
20395
|
onsort: { type: "Object" },
|
|
20367
|
-
onsearchchange: { type: "Object" }
|
|
20396
|
+
onsearchchange: { type: "Object" },
|
|
20397
|
+
labels: { type: "Object" }
|
|
20368
20398
|
}, [
|
|
20369
20399
|
"empty",
|
|
20370
20400
|
"sort-asc-icon",
|
|
@@ -40070,9 +40100,9 @@ function createSanitizingRenderer(e, t, n, i) {
|
|
|
40070
40100
|
function annotateExternalLinks(e) {
|
|
40071
40101
|
return e.replace(EXTERNAL_ANCHOR_PATTERN, "<a href=\"$1\" target=\"_blank\" rel=\"noopener noreferrer\"");
|
|
40072
40102
|
}
|
|
40073
|
-
function wrapTables(e, t) {
|
|
40074
|
-
let n = typeof t == "string" && t.length > 0 ? `<div class="
|
|
40075
|
-
return e.replace(TABLE_OPEN, `${
|
|
40103
|
+
function wrapTables(e, t, n) {
|
|
40104
|
+
let i = typeof n == "string" ? n.trim() : "", a = i.length > 0 ? `${DEFAULT_TABLE_WRAPPER_CLASS} ${escapeHtml(i)}` : DEFAULT_TABLE_WRAPPER_CLASS, o = typeof t == "string" && t.length > 0 ? `<div class="${a}" tabindex="0" role="region" aria-label="${escapeHtml(t)}">` : `<div class="${a}" tabindex="0">`;
|
|
40105
|
+
return e.replace(TABLE_OPEN, `${o}<table>`).replace(TABLE_CLOSE, "</table></div>");
|
|
40076
40106
|
}
|
|
40077
40107
|
function instanceFor(e) {
|
|
40078
40108
|
let t = e.breaks === !0, n = resolveProtocolSets(e.sanitize), i = resolveTagAllowList(e.sanitize?.allowedTags), a = e.sanitize?.disableTaskLists === !0, o = resolveRawHtmlMode(e.sanitize?.rawHtml), s = [
|
|
@@ -40093,18 +40123,18 @@ function renderMarkdown(e, t = {}) {
|
|
|
40093
40123
|
let n = instanceFor(t), i = t.inline === !0 ? n.parseInline(e) : n.parse(e);
|
|
40094
40124
|
if (typeof i != "string") return "";
|
|
40095
40125
|
let a = annotateExternalLinks(i);
|
|
40096
|
-
return t.inline === !0 ? a : wrapTables(a, t.tableLabel);
|
|
40126
|
+
return t.inline === !0 ? a : wrapTables(a, t.tableLabel, t.tableWrapperClass);
|
|
40097
40127
|
}
|
|
40098
|
-
var SAFE_LINK_PROTOCOLS, SAFE_IMAGE_PROTOCOLS, NUMERIC_REFERENCE, NAMED_WHITESPACE_REFERENCE, STRIPPED_BY_URL_PARSER, instances, EXTERNAL_ANCHOR_PATTERN, TABLE_OPEN, TABLE_CLOSE, init_markdown = __esmMin((() => {
|
|
40128
|
+
var SAFE_LINK_PROTOCOLS, SAFE_IMAGE_PROTOCOLS, NUMERIC_REFERENCE, NAMED_WHITESPACE_REFERENCE, STRIPPED_BY_URL_PARSER, instances, EXTERNAL_ANCHOR_PATTERN, TABLE_OPEN, TABLE_CLOSE, DEFAULT_TABLE_WRAPPER_CLASS, init_markdown = __esmMin((() => {
|
|
40099
40129
|
init_marked_esm(), init_dist(), SAFE_LINK_PROTOCOLS = new Set([
|
|
40100
40130
|
"http:",
|
|
40101
40131
|
"https:",
|
|
40102
40132
|
"mailto:",
|
|
40103
40133
|
"tel:"
|
|
40104
|
-
]), SAFE_IMAGE_PROTOCOLS = new Set(["http:", "https:"]), NUMERIC_REFERENCE = /&#(x[0-9a-f]+|[0-9]+);?/gi, NAMED_WHITESPACE_REFERENCE = /&(tab|newline);/gi, STRIPPED_BY_URL_PARSER = /[\u0000-\u0020\u007f]/g, instances = /* @__PURE__ */ new Map(), EXTERNAL_ANCHOR_PATTERN = /<a href="(https?:\/\/[^"]*)"/g, TABLE_OPEN = /<table>/g, TABLE_CLOSE = /<\/table>/g;
|
|
40134
|
+
]), SAFE_IMAGE_PROTOCOLS = new Set(["http:", "https:"]), NUMERIC_REFERENCE = /&#(x[0-9a-f]+|[0-9]+);?/gi, NAMED_WHITESPACE_REFERENCE = /&(tab|newline);/gi, STRIPPED_BY_URL_PARSER = /[\u0000-\u0020\u007f]/g, instances = /* @__PURE__ */ new Map(), EXTERNAL_ANCHOR_PATTERN = /<a href="(https?:\/\/[^"]*)"/g, TABLE_OPEN = /<table>/g, TABLE_CLOSE = /<\/table>/g, DEFAULT_TABLE_WRAPPER_CLASS = "markdown-table-wrapper";
|
|
40105
40135
|
})), root$11 = /* @__PURE__ */ from_html("<div class=\"avatar svelte-ivh8u\"><!></div>"), root_1$10 = /* @__PURE__ */ from_html("<div class=\"header svelte-ivh8u\"><!></div>"), root_2$7 = /* @__PURE__ */ from_html("<span class=\"marker svelte-ivh8u\" aria-hidden=\"true\"></span>"), root_3$7 = /* @__PURE__ */ from_html("<div class=\"body svelte-ivh8u\"><!></div>"), root_4$6 = /* @__PURE__ */ from_html("<div class=\"body svelte-ivh8u\"></div>"), root_5$6 = /* @__PURE__ */ from_html("<div class=\"body text svelte-ivh8u\"> </div>"), root_6$6 = /* @__PURE__ */ from_html("<div class=\"clamp-toggle svelte-ivh8u\"><!></div>"), root_7$5 = /* @__PURE__ */ from_html("<span class=\"typing svelte-ivh8u\"><!></span>"), root_8$5 = /* @__PURE__ */ from_html("<div class=\"message-attachments svelte-ivh8u\"><!></div>"), root_9$3 = /* @__PURE__ */ from_html("<div class=\"action svelte-ivh8u\"><!></div>"), root_10$2 = /* @__PURE__ */ from_html("<div class=\"action svelte-ivh8u\"><!></div> <div class=\"action svelte-ivh8u\"><!></div>", 1), root_11$1 = /* @__PURE__ */ from_html("<div class=\"actions svelte-ivh8u\"><!> <!> <!> <!></div>"), root_12$1 = /* @__PURE__ */ from_html("<article><div class=\"row svelte-ivh8u\"><!> <div class=\"content svelte-ivh8u\"><!> <div><!> <!> <!> <!></div> <!> <!></div></div></article>"), $$css$12 = {
|
|
40106
40136
|
hash: "svelte-ivh8u",
|
|
40107
|
-
code: ".chat-message.svelte-ivh8u {box-sizing:border-box;display:flex;flex-direction:column;max-width:var(--chat-message-max-width, 82%);margin:var(--chat-message-margin, 0);}.chat-message.party-sender.svelte-ivh8u {align-self:flex-end;align-items:flex-end;}.chat-message.party-responder.svelte-ivh8u {align-self:flex-start;align-items:flex-start;}.row.svelte-ivh8u {display:flex;gap:var(--chat-message-gap, 10px);align-items:flex-end;width:100%;}.chat-message.party-sender.svelte-ivh8u .row:where(.svelte-ivh8u) {flex-direction:row-reverse;}.avatar.svelte-ivh8u {display:flex;flex-shrink:0;align-items:center;justify-content:center;}.content.svelte-ivh8u {display:flex;flex-direction:column;gap:var(--chat-message-content-gap, 6px);min-width:0;}.header.svelte-ivh8u {font-size:var(--chat-message-header-font-size, 0.75rem);color:var(--chat-message-header-color, #71717a);}.bubble.svelte-ivh8u {box-sizing:border-box;padding:var(--chat-message-bubble-padding, 9px 13px);border-radius:var(--chat-message-bubble-border-radius, 16px);font-size:var(--chat-message-font-size, 0.9375rem);line-height:var(--chat-message-line-height, 1.5);color:var(--chat-message-color, #27272a);background:var(--chat-message-background, #f4f4f5);border:var(--chat-message-border, none);box-shadow:var(--chat-message-box-shadow, none);word-wrap:break-word;overflow-wrap:anywhere;}\n\n /* Only the marker variant becomes a containing block: making every bubble relative\n would silently re-base any absolutely-positioned content a consumer renders in a\n body snippet. */.bubble.has-marker.svelte-ivh8u {position:relative;}.marker.svelte-ivh8u {\n /* Decorative and absolutely positioned, so it sits over the bubble's leading\n padding — where a link at the start of a responder message also sits. Without\n this it silently eats those clicks. */pointer-events:none;position:absolute;inset-block:var(--chat-message-marker-inset-block, 0);\n /* Logical, so the bar follows `role` alignment into RTL instead of pinning left. */inset-inline-start:var(--chat-message-marker-offset, 0px);width:var(--chat-message-marker-width, 2px);border-radius:var(--chat-message-marker-border-radius, 0);background:var(--chat-message-marker-color, #6d28d9);}.chat-message.party-sender.svelte-ivh8u .bubble:where(.svelte-ivh8u) {color:var(--chat-message-sender-color, #ffffff);background:var(--chat-message-sender-background, #18181b);border:var(--chat-message-sender-border, none);border-radius:var(\n --chat-message-sender-border-radius,\n var(--chat-message-bubble-border-radius, 16px)\n );}.chat-message.party-responder.svelte-ivh8u .bubble:where(.svelte-ivh8u) {color:var(--chat-message-responder-color, var(--chat-message-color, #27272a));background:var(--chat-message-responder-background, transparent);border:var(--chat-message-responder-border, none);padding:var(--chat-message-responder-padding, 2px 0);}.chat-message.error.svelte-ivh8u .bubble:where(.svelte-ivh8u) {color:var(--chat-message-error-color, #e0334b);}.text.svelte-ivh8u {white-space:pre-wrap;}.typing.svelte-ivh8u {display:inline-flex;align-items:center;}.message-attachments.svelte-ivh8u {display:flex;flex-direction:column;gap:var(--chat-message-attachments-gap, 8px);margin:var(--chat-message-attachments-margin, 4px 0 0 0);}.message-attachments.svelte-ivh8u:empty {display:none;}.actions.svelte-ivh8u {display:flex;align-items:center;gap:var(--chat-message-actions-gap, 2px);opacity:var(--chat-message-actions-opacity, 0);transition:var(--chat-message-actions-transition, opacity 0.15s ease);--button-width: var(--chat-message-action-size, 28px);--button-height: var(--chat-message-action-size, 28px);--button-padding: var(--chat-message-action-padding, 6px);--button-border-radius: var(--chat-message-action-border-radius, 6px);--button-color: var(--chat-message-action-background-color, transparent);--button-text-color: var(--chat-message-action-color, #71717a);--button-content-gap: 0px;--button-hover-color: var(--chat-message-action-hover-background-color, #f4f4f5);}.chat-message.svelte-ivh8u:hover .actions:where(.svelte-ivh8u),\n .chat-message.svelte-ivh8u:focus-within .actions:where(.svelte-ivh8u) {opacity:1;}.action.svelte-ivh8u {display:flex;}.action.svelte-ivh8u svg {height:100%;width:100%;}\n\n @media (hover: none) {.actions.svelte-ivh8u {opacity:1;}\n }.clamp-toggle.svelte-ivh8u {display:flex;margin-top:var(--chat-message-clamp-toggle-margin-top, 4px);}\n\n /* Clamp the rendered body, not the source: the message keeps its markup and its\n copy text, and expanding is a state change rather than a re-render. */.bubble[data-clamped='true'].svelte-ivh8u .body:where(.svelte-ivh8u) {display:-webkit-box;line-clamp:var(--chat-message-clamp-lines, var(--chat-message-clamp-lines-prop, 2));-webkit-line-clamp:var(--chat-message-clamp-lines, var(--chat-message-clamp-lines-prop, 2));-webkit-box-orient:vertical;overflow:hidden;}.body.svelte-ivh8u p {margin:var(--chat-message-paragraph-margin, 0 0 0.5em 0);}.body.svelte-ivh8u p:last-child {margin-bottom:0;}.body.svelte-ivh8u a {color:var(--chat-message-link-color, #6d28d9);text-decoration:underline;text-underline-offset:2px;}.body.svelte-ivh8u code {font-family:var(--chat-message-code-font-family, ui-monospace, monospace);font-size:0.88em;background:var(--chat-message-code-background, rgba(0, 0, 0, 0.05));padding:1px 5px;border-radius:4px;}.body.svelte-ivh8u pre {background:var(--chat-message-pre-background, rgba(0, 0, 0, 0.05));padding:10px 12px;border-radius:8px;overflow-x:auto;margin:0.5em 0;}.body.svelte-ivh8u pre code {background:transparent;padding:0;}.body.svelte-ivh8u ul,\n .body.svelte-ivh8u ol {margin:var(--chat-message-list-margin, 0.4em 0);padding-left:var(--chat-message-list-padding, 1.4em);}.body.svelte-ivh8u li {margin:0.2em 0;}.body.svelte-ivh8u h1,\n .body.svelte-ivh8u h2,\n .body.svelte-ivh8u h3,\n .body.svelte-ivh8u h4,\n .body.svelte-ivh8u h5,\n .body.svelte-ivh8u h6 {margin:var(--chat-message-heading-margin, 0.8em 0 0.4em 0);line-height:1.3;}.body.svelte-ivh8u h1 {font-size:1.35em;}.body.svelte-ivh8u h2 {font-size:1.2em;}.body.svelte-ivh8u h3 {font-size:1.1em;}.body.svelte-ivh8u h4,\n .body.svelte-ivh8u h5,\n .body.svelte-ivh8u h6 {font-size:1em;}.body.svelte-ivh8u blockquote {margin:0.5em 0;padding:2px 0 2px 12px;border-left:3px solid var(--chat-message-blockquote-border-color, rgba(0, 0, 0, 0.15));opacity:var(--chat-message-blockquote-opacity, 0.85);}.body.svelte-ivh8u table {display:block;max-width:100%;overflow-x:auto;border-collapse:collapse;margin:0.5em 0;}.body.svelte-ivh8u th,\n .body.svelte-ivh8u td {padding:5px 10px;border:1px solid var(--chat-message-table-border-color, rgba(0, 0, 0, 0.12));text-align:left;}.body.svelte-ivh8u th {background:var(--chat-message-table-header-background, rgba(0, 0, 0, 0.04));}.body.svelte-ivh8u img {max-width:100%;border-radius:var(--chat-message-image-border-radius, 8px);}.body.svelte-ivh8u hr {border:none;border-top:1px solid var(--chat-message-hr-color, rgba(0, 0, 0, 0.12));margin:0.8em 0;}"
|
|
40137
|
+
code: ".chat-message.svelte-ivh8u {box-sizing:border-box;display:flex;flex-direction:column;max-width:var(--chat-message-max-width, 82%);margin:var(--chat-message-margin, 0);}.chat-message.party-sender.svelte-ivh8u {align-self:flex-end;align-items:flex-end;}.chat-message.party-responder.svelte-ivh8u {align-self:flex-start;align-items:flex-start;}.row.svelte-ivh8u {display:flex;gap:var(--chat-message-gap, 10px);align-items:flex-end;width:100%;}.chat-message.party-sender.svelte-ivh8u .row:where(.svelte-ivh8u) {flex-direction:row-reverse;}.avatar.svelte-ivh8u {display:flex;flex-shrink:0;align-items:center;justify-content:center;}.content.svelte-ivh8u {display:flex;flex-direction:column;gap:var(--chat-message-content-gap, 6px);min-width:0;}.header.svelte-ivh8u {font-size:var(--chat-message-header-font-size, 0.75rem);color:var(--chat-message-header-color, #71717a);}.bubble.svelte-ivh8u {box-sizing:border-box;padding:var(--chat-message-bubble-padding, 9px 13px);border-radius:var(--chat-message-bubble-border-radius, 16px);font-size:var(--chat-message-font-size, 0.9375rem);line-height:var(--chat-message-line-height, 1.5);color:var(--chat-message-color, #27272a);background:var(--chat-message-background, #f4f4f5);border:var(--chat-message-border, none);box-shadow:var(--chat-message-box-shadow, none);word-wrap:break-word;overflow-wrap:anywhere;}\n\n /* Only the marker variant becomes a containing block: making every bubble relative\n would silently re-base any absolutely-positioned content a consumer renders in a\n body snippet. */.bubble.has-marker.svelte-ivh8u {position:relative;}.marker.svelte-ivh8u {\n /* Decorative and absolutely positioned, so it sits over the bubble's leading\n padding — where a link at the start of a responder message also sits. Without\n this it silently eats those clicks. */pointer-events:none;position:absolute;inset-block:var(--chat-message-marker-inset-block, 0);\n /* Logical, so the bar follows `role` alignment into RTL instead of pinning left. */inset-inline-start:var(--chat-message-marker-offset, 0px);width:var(--chat-message-marker-width, 2px);border-radius:var(--chat-message-marker-border-radius, 0);background:var(--chat-message-marker-color, #6d28d9);}.chat-message.party-sender.svelte-ivh8u .bubble:where(.svelte-ivh8u) {color:var(--chat-message-sender-color, #ffffff);background:var(--chat-message-sender-background, #18181b);border:var(--chat-message-sender-border, none);border-radius:var(\n --chat-message-sender-border-radius,\n var(--chat-message-bubble-border-radius, 16px)\n );}.chat-message.party-responder.svelte-ivh8u .bubble:where(.svelte-ivh8u) {color:var(--chat-message-responder-color, var(--chat-message-color, #27272a));background:var(--chat-message-responder-background, transparent);border:var(--chat-message-responder-border, none);padding:var(--chat-message-responder-padding, 2px 0);}.chat-message.error.svelte-ivh8u .bubble:where(.svelte-ivh8u) {color:var(--chat-message-error-color, #e0334b);}.text.svelte-ivh8u {white-space:pre-wrap;}.typing.svelte-ivh8u {display:inline-flex;align-items:center;}.message-attachments.svelte-ivh8u {display:flex;flex-direction:column;gap:var(--chat-message-attachments-gap, 8px);margin:var(--chat-message-attachments-margin, 4px 0 0 0);}.message-attachments.svelte-ivh8u:empty {display:none;}.actions.svelte-ivh8u {display:flex;align-items:center;gap:var(--chat-message-actions-gap, 2px);opacity:var(--chat-message-actions-opacity, 0);transition:var(--chat-message-actions-transition, opacity 0.15s ease);--button-width: var(--chat-message-action-size, 28px);--button-height: var(--chat-message-action-size, 28px);--button-padding: var(--chat-message-action-padding, 6px);--button-border-radius: var(--chat-message-action-border-radius, 6px);--button-color: var(--chat-message-action-background-color, transparent);--button-text-color: var(--chat-message-action-color, #71717a);--button-content-gap: 0px;--button-hover-color: var(--chat-message-action-hover-background-color, #f4f4f5);}.chat-message.svelte-ivh8u:hover .actions:where(.svelte-ivh8u),\n .chat-message.svelte-ivh8u:focus-within .actions:where(.svelte-ivh8u) {opacity:1;}.action.svelte-ivh8u {display:flex;}.action.svelte-ivh8u svg {height:100%;width:100%;}\n\n @media (hover: none) {.actions.svelte-ivh8u {opacity:1;}\n }.clamp-toggle.svelte-ivh8u {display:flex;margin-top:var(--chat-message-clamp-toggle-margin-top, 4px);}\n\n /* Clamp the rendered body, not the source: the message keeps its markup and its\n copy text, and expanding is a state change rather than a re-render. */.bubble[data-clamped='true'].svelte-ivh8u .body:where(.svelte-ivh8u) {display:-webkit-box;line-clamp:var(--chat-message-clamp-lines, var(--chat-message-clamp-lines-prop, 2));-webkit-line-clamp:var(--chat-message-clamp-lines, var(--chat-message-clamp-lines-prop, 2));-webkit-box-orient:vertical;overflow:hidden;}.body.svelte-ivh8u p {margin:var(--chat-message-paragraph-margin, 0 0 0.5em 0);}.body.svelte-ivh8u p:last-child {margin-bottom:0;}.body.svelte-ivh8u a {color:var(--chat-message-link-color, #6d28d9);text-decoration:underline;text-underline-offset:2px;}.body.svelte-ivh8u code {font-family:var(--chat-message-code-font-family, ui-monospace, monospace);font-size:0.88em;background:var(--chat-message-code-background, rgba(0, 0, 0, 0.05));padding:1px 5px;border-radius:4px;}.body.svelte-ivh8u pre {background:var(--chat-message-pre-background, rgba(0, 0, 0, 0.05));padding:10px 12px;border-radius:8px;overflow-x:auto;margin:0.5em 0;}.body.svelte-ivh8u pre code {background:transparent;padding:0;}.body.svelte-ivh8u ul,\n .body.svelte-ivh8u ol {margin:var(--chat-message-list-margin, 0.4em 0);padding-left:var(--chat-message-list-padding, 1.4em);}.body.svelte-ivh8u li {margin:0.2em 0;}.body.svelte-ivh8u h1,\n .body.svelte-ivh8u h2,\n .body.svelte-ivh8u h3,\n .body.svelte-ivh8u h4,\n .body.svelte-ivh8u h5,\n .body.svelte-ivh8u h6 {margin:var(--chat-message-heading-margin, 0.8em 0 0.4em 0);line-height:1.3;}.body.svelte-ivh8u h1 {font-size:1.35em;}.body.svelte-ivh8u h2 {font-size:1.2em;}.body.svelte-ivh8u h3 {font-size:1.1em;}.body.svelte-ivh8u h4,\n .body.svelte-ivh8u h5,\n .body.svelte-ivh8u h6 {font-size:1em;}.body.svelte-ivh8u blockquote {margin:0.5em 0;padding:2px 0 2px 12px;border-left:3px solid var(--chat-message-blockquote-border-color, rgba(0, 0, 0, 0.15));opacity:var(--chat-message-blockquote-opacity, 0.85);}\n\n /* Fallback for a bare <table> in caller-supplied `html`, which has no scroll\n container of its own: it keeps the block treatment so a wide table scrolls\n rather than overflowing the message. A table that came from `markdown` (or\n from `renderMarkdown`) arrives inside `.markdown-table-wrapper`, and the\n rules below take it back out of block layout. */.body.svelte-ivh8u table {display:block;max-width:100%;overflow-x:auto;border-collapse:collapse;margin:0.5em 0;}\n\n /* The wrapper scrolls, not the table. `display: block` on a <table> is what\n makes `overflow-x` work on the element itself, but it strips the table's\n semantics for assistive technology -- a screen reader loses row and column\n navigation. MarkdownText separates the scroll container from the table for\n exactly that reason; this component rendered the same wrapper markup and\n styled the table instead, so a chat table was scrollable and no longer a\n table. Chat is where markdown tables overwhelmingly land. */.body.svelte-ivh8u .markdown-table-wrapper {display:block;max-width:100%;overflow-x:auto;margin:0.5em 0;}\n\n /* The wrapper is a tab stop (the renderer emits tabindex=\"0\" so the scroll is\n reachable by keyboard). The browser's default ring already applies; this\n replaces it with the same 2px treatment the rest of the library uses, since\n the 1px UA default is easy to miss against a message bubble. */.body.svelte-ivh8u .markdown-table-wrapper:focus-visible {outline:2px solid var(--chat-message-table-focus-outline-color, #3b82f6);outline-offset:2px;}\n\n /* Without an intrinsic width the table is exactly its container's width and a\n wide table compresses instead of scrolling. `max-content` supplies it;\n `min-width` keeps a narrow table filling the bubble. */.body.svelte-ivh8u .markdown-table-wrapper table {display:table;width:max-content;min-width:100%;overflow-x:visible;margin:0;}.body.svelte-ivh8u th,\n .body.svelte-ivh8u td {padding:5px 10px;border:1px solid var(--chat-message-table-border-color, rgba(0, 0, 0, 0.12));text-align:left;}.body.svelte-ivh8u th {background:var(--chat-message-table-header-background, rgba(0, 0, 0, 0.04));}.body.svelte-ivh8u img {max-width:100%;border-radius:var(--chat-message-image-border-radius, 8px);}.body.svelte-ivh8u hr {border:none;border-top:1px solid var(--chat-message-hr-color, rgba(0, 0, 0, 0.12));margin:0.8em 0;}"
|
|
40108
40138
|
};
|
|
40109
40139
|
function ChatMessage(e, t) {
|
|
40110
40140
|
let n = props_id();
|
|
@@ -43475,12 +43505,13 @@ var root$4 = /* @__PURE__ */ from_html("<div></div>"), $$css$5 = {
|
|
|
43475
43505
|
};
|
|
43476
43506
|
function MarkdownText(e, t) {
|
|
43477
43507
|
push(t, !0), append_styles$1(e, $$css$5);
|
|
43478
|
-
let n = prop(t, "markdown", 7), i = prop(t, "breaks", 7, !1), a = prop(t, "testId", 7), o = prop(t, "classes", 7), s = prop(t, "tableLabel", 7), c = prop(t, "
|
|
43508
|
+
let n = prop(t, "markdown", 7), i = prop(t, "breaks", 7, !1), a = prop(t, "testId", 7), o = prop(t, "classes", 7), s = prop(t, "tableLabel", 7), c = prop(t, "tableWrapperClass", 7), l = prop(t, "sanitize", 7), u = /* @__PURE__ */ user_derived(() => renderMarkdown(n(), {
|
|
43479
43509
|
breaks: i(),
|
|
43480
43510
|
tableLabel: s(),
|
|
43481
|
-
|
|
43511
|
+
tableWrapperClass: c(),
|
|
43512
|
+
sanitize: l()
|
|
43482
43513
|
}));
|
|
43483
|
-
var
|
|
43514
|
+
var f = {
|
|
43484
43515
|
get markdown() {
|
|
43485
43516
|
return n();
|
|
43486
43517
|
},
|
|
@@ -43511,16 +43542,22 @@ function MarkdownText(e, t) {
|
|
|
43511
43542
|
set tableLabel(e) {
|
|
43512
43543
|
s(e), flushSync();
|
|
43513
43544
|
},
|
|
43514
|
-
get
|
|
43545
|
+
get tableWrapperClass() {
|
|
43515
43546
|
return c();
|
|
43516
43547
|
},
|
|
43517
|
-
set
|
|
43548
|
+
set tableWrapperClass(e) {
|
|
43518
43549
|
c(e), flushSync();
|
|
43550
|
+
},
|
|
43551
|
+
get sanitize() {
|
|
43552
|
+
return l();
|
|
43553
|
+
},
|
|
43554
|
+
set sanitize(e) {
|
|
43555
|
+
l(e), flushSync();
|
|
43519
43556
|
}
|
|
43520
|
-
},
|
|
43521
|
-
return html(
|
|
43522
|
-
set_class(
|
|
43523
|
-
}), append(e,
|
|
43557
|
+
}, p = root$4();
|
|
43558
|
+
return html(p, () => get(u), !0), reset(p), template_effect(() => {
|
|
43559
|
+
set_class(p, 1, `markdown-text ${o() ?? "" ?? ""}`, "svelte-1d6q5h0"), set_attribute(p, "data-pw", typeof a() == "string" ? a() : null), set_attribute(p, "testid", typeof a() == "string" ? a() : null);
|
|
43560
|
+
}), append(e, p), pop(f);
|
|
43524
43561
|
}
|
|
43525
43562
|
create_custom_element(MarkdownText, {
|
|
43526
43563
|
markdown: {},
|
|
@@ -43528,6 +43565,7 @@ create_custom_element(MarkdownText, {
|
|
|
43528
43565
|
testId: {},
|
|
43529
43566
|
classes: {},
|
|
43530
43567
|
tableLabel: {},
|
|
43568
|
+
tableWrapperClass: {},
|
|
43531
43569
|
sanitize: {}
|
|
43532
43570
|
}, [], [], { mode: "open" });
|
|
43533
43571
|
//#endregion
|
|
@@ -43554,6 +43592,10 @@ customElements.define("sui-markdown-text", create_custom_element(MarkdownText_wc
|
|
|
43554
43592
|
attribute: "table-label",
|
|
43555
43593
|
type: "String"
|
|
43556
43594
|
},
|
|
43595
|
+
tableWrapperClass: {
|
|
43596
|
+
attribute: "table-wrapper-class",
|
|
43597
|
+
type: "String"
|
|
43598
|
+
},
|
|
43557
43599
|
sanitize: { type: "Object" }
|
|
43558
43600
|
}, [], [], { mode: "open" }));
|
|
43559
43601
|
//#endregion
|