@mono-lit/helper 0.0.5 → 0.0.7
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/{control-tooltip-C3rA_nSH.js → control-tooltip-CoPD37_h.js} +20 -11
- package/dist/{data-source-options-Cz9fVLK8.js → data-source-options-CS0w0wlO.js} +26 -9
- package/dist/{data-source-options-QjuI73g8.js → data-source-options-lDR-g9Eb.js} +26 -9
- package/dist/{data-source-read-FxqzQkk2.js → data-source-read-Cp_h7NIf.js} +5 -2
- package/dist/{data-source-read-i6CYSUEl.js → data-source-read-DTJ_Mnez.js} +5 -2
- package/dist/{excel-BPdDt06G.js → excel-DtRpxmxs.js} +1 -1
- package/dist/{export-DgomqI_3.js → export-D27RJa1w.js} +1 -1
- package/dist/export.js +3 -3
- package/dist/{field-tooltip-FyMi9vNM.js → field-tooltip-Csk4s2ve.js} +2 -3
- package/dist/field-tooltip-addon-B32dizW_.js +22 -0
- package/dist/{control-tooltip-7vegYmq3.js → field-tooltip-addon-CWCp19mJ.js} +36 -12
- package/dist/{field-tooltip.css_raw-DEctHXKm.js → field-tooltip.css_raw-U5UeTa2d.js} +3 -4
- package/dist/{field-validation-CHHQi1zl.js → field-validation-CFmUmuDx.js} +1 -1
- package/dist/field-validation.css_raw-Cx6SGrfP.js +178 -0
- package/dist/{form-control-core-CIdMLXMo.js → form-control-core-BbiACMtL.js} +1 -1
- package/dist/{hydration-flush-DHrl4_KK.js → hydration-flush-BaE9gN3C.js} +450 -3
- package/dist/index.js +11 -11
- package/dist/{index.node-DzCuvHLg.js → index.node-Mg0Snp0t.js} +5 -5
- package/dist/index.node.js +11 -11
- package/dist/input.css_raw-Br-T8RWv.js +5 -0
- package/dist/{light-slots-DdDdZ6zs.js → light-slots-B5Ck0t_E.js} +1 -1
- package/dist/{light-slots-4ZCjOcBg.js → light-slots-_no0r2Z-.js} +1 -1
- package/dist/mono-button-CLkHg3WW.js +871 -0
- package/dist/{mono-button.shadow-D9NdMsmH.js → mono-button.shadow-DqZMpcqY.js} +1 -2
- package/dist/{mono-data-chart-ChkelNT7.js → mono-data-chart-BAH9Zb3p.js} +2 -2
- package/dist/{mono-data-dropdown-DxpUUk2y.js → mono-data-dropdown-BsY5IuIo.js} +72 -6
- package/dist/{mono-data-grid-KDpu4d4_.js → mono-data-grid-CZFjpnOD.js} +125 -18
- package/dist/{mono-data-grid-8jmeIXUU.js → mono-data-grid-kV4jYu2g.js} +124 -17
- package/dist/{mono-element-C7vCschg.js → mono-element-CKcT0rwv.js} +1 -1
- package/dist/{mono-form-controller-BkMR8g14.js → mono-form-controller-BrA10erm.js} +12 -1
- package/dist/mono-ui-kvLVIf1V.js +786 -0
- package/dist/{popup-portal-C8ttHDRX.js → popup-portal-CINuVjNY.js} +53 -6
- package/dist/src/components/accordion/mono-accordion.d.ts +0 -1
- package/dist/src/components/alert/mono-alert.d.ts +0 -1
- package/dist/src/components/breadcrumb/mono-breadcrumb-list.d.ts +0 -1
- package/dist/src/components/breadcrumb/mono-breadcrumb.d.ts +0 -1
- package/dist/src/components/button/mono-button-dropdown.d.ts +0 -1
- package/dist/src/components/button/mono-button.d.ts +0 -1
- package/dist/src/components/card/mono-card.d.ts +0 -1
- package/dist/src/components/chart/mono-chart-presets.d.ts +0 -4
- package/dist/src/components/chart/mono-chart.d.ts +0 -1
- package/dist/src/components/checkbox/mono-checkbox.d.ts +0 -1
- package/dist/src/components/chip/mono-chip.d.ts +0 -1
- package/dist/src/components/date/mono-date.d.ts +0 -1
- package/dist/src/components/drawer/mono-drawer.d.ts +0 -1
- package/dist/src/components/dropdown/mono-dropdown.d.ts +0 -1
- package/dist/src/components/dropdown-table/mono-dropdown-table.d.ts +0 -1
- package/dist/src/components/file-upload/mono-file-upload.d.ts +0 -1
- package/dist/src/components/filter/mono-filter-builder.d.ts +0 -1
- package/dist/src/components/input/mono-input.d.ts +0 -1
- package/dist/src/components/menu/mono-menu.d.ts +0 -1
- package/dist/src/components/modal/mono-modal.d.ts +0 -1
- package/dist/src/components/nav/mono-nav.d.ts +0 -1
- package/dist/src/components/otp/mono-otp.d.ts +0 -1
- package/dist/src/components/radio/mono-radio.d.ts +0 -1
- package/dist/src/components/rich-text-editor/mono-rich-text-editor.d.ts +0 -1
- package/dist/src/components/select/mono-select.d.ts +0 -1
- package/dist/src/components/sidebar/mono-sidebar.d.ts +0 -1
- package/dist/src/components/slider/mono-slider.d.ts +0 -1
- package/dist/src/components/switch/mono-switch.d.ts +0 -1
- package/dist/src/components/table/column-autosize.d.ts +96 -0
- package/dist/src/components/table/mono-data-grid.d.ts +16 -0
- package/dist/src/components/table/mono-table-checkbox.d.ts +0 -1
- package/dist/src/components/table/mono-table-detail.d.ts +0 -1
- package/dist/src/components/table/mono-table-empty.d.ts +0 -1
- package/dist/src/components/table/mono-table-error.d.ts +0 -1
- package/dist/src/components/table/mono-table-info.d.ts +0 -1
- package/dist/src/components/table/mono-table-loading.d.ts +0 -1
- package/dist/src/components/table/mono-table-page-size.d.ts +0 -1
- package/dist/src/components/table/mono-table-paging-group.d.ts +0 -1
- package/dist/src/components/table/mono-table-paging.d.ts +0 -1
- package/dist/src/components/table/mono-table-search.d.ts +0 -1
- package/dist/src/components/table/mono-table-sort.d.ts +0 -1
- package/dist/src/components/table/mono-table-summary.d.ts +0 -1
- package/dist/src/components/table/mono-table-th-core.d.ts +3 -0
- package/dist/src/components/table/mono-table-th.d.ts +0 -1
- package/dist/src/components/table/table-controller-core.d.ts +2 -0
- package/dist/src/components/table/table-types.d.ts +8 -1
- package/dist/src/components/tabs/mono-tabs.d.ts +0 -1
- package/dist/src/components/tag-input/mono-tag-input.d.ts +12 -1
- package/dist/src/components/tag-input/mono-tag-input.shadow.d.ts +9 -1
- package/dist/src/components/tag-input/tag-input-core.d.ts +9 -1
- package/dist/src/components/tag-input/tag-input-types.d.ts +2 -0
- package/dist/src/components/textarea/mono-textarea.d.ts +0 -1
- package/dist/src/components/tooltip/field-tooltip-addon.d.ts +5 -0
- package/dist/src/composables/mono-size-attrs.d.ts +10 -0
- package/dist/src/composables/popup-portal.d.ts +24 -1
- package/dist/src/entries/index.d.ts +2 -1
- package/dist/src/entries/index.node.d.ts +2 -1
- package/dist/{styles-BODNpZV1.js → styles-D-ergrfR.js} +1 -1
- package/dist/{tooltip-Drekihf5.js → tooltip-Cu5IrDS9.js} +1 -2
- package/dist/tooltip.js +2 -3
- package/dist/ui/accordion.js +4 -11
- package/dist/ui/alert.js +3 -10
- package/dist/ui/breadcrumb.js +4 -14
- package/dist/ui/button-dropdown.js +22 -15
- package/dist/ui/button.js +1 -1
- package/dist/ui/card.js +4 -11
- package/dist/ui/chart.js +4 -24
- package/dist/ui/checkbox.js +4 -11
- package/dist/ui/chip.js +6 -9
- package/dist/ui/date.js +5 -12
- package/dist/ui/drawer.js +5 -12
- package/dist/ui/dropdown-table.js +89 -38
- package/dist/ui/dropdown.js +34 -21
- package/dist/ui/file-upload.js +4 -11
- package/dist/ui/filter.js +3 -10
- package/dist/ui/form.js +1 -1
- package/dist/ui/index.css +5414 -8564
- package/dist/ui/input.js +6 -14
- package/dist/ui/menu.js +4 -11
- package/dist/ui/modal.js +6 -13
- package/dist/ui/nav.js +4 -11
- package/dist/ui/otp.js +6 -14
- package/dist/ui/radio.js +4 -11
- package/dist/ui/rich-text-editor.js +4 -12
- package/dist/ui/select.js +12 -15
- package/dist/ui/shadow/accordion.js +1 -1
- package/dist/ui/shadow/alert.js +1 -1
- package/dist/ui/shadow/breadcrumb.js +1 -1
- package/dist/ui/shadow/button-dropdown.js +21 -7
- package/dist/ui/shadow/button.js +1 -1
- package/dist/ui/shadow/card.js +1 -2
- package/dist/ui/shadow/chart.js +3 -4
- package/dist/ui/shadow/checkbox.js +2 -2
- package/dist/ui/shadow/chip.js +1 -1
- package/dist/ui/shadow/date.js +4 -5
- package/dist/ui/shadow/drawer.js +2 -2
- package/dist/ui/shadow/dropdown-table.js +159 -35
- package/dist/ui/shadow/dropdown.js +31 -11
- package/dist/ui/shadow/file-upload.js +2 -2
- package/dist/ui/shadow/filter.js +1 -2
- package/dist/ui/shadow/input.js +5 -6
- package/dist/ui/shadow/menu.js +1 -1
- package/dist/ui/shadow/modal.js +3 -3
- package/dist/ui/shadow/nav.js +1 -1
- package/dist/ui/shadow/otp.js +5 -6
- package/dist/ui/shadow/radio.js +2 -2
- package/dist/ui/shadow/rich-text-editor.js +2 -3
- package/dist/ui/shadow/select.js +11 -7
- package/dist/ui/shadow/sidebar.js +2 -2
- package/dist/ui/shadow/slider.js +4 -5
- package/dist/ui/shadow/switch.js +2 -2
- package/dist/ui/shadow/table.js +113 -20
- package/dist/ui/shadow/tabs.js +1 -1
- package/dist/ui/shadow/tag-input.js +203 -27
- package/dist/ui/shadow/textarea.js +4 -5
- package/dist/ui/sidebar.js +4 -11
- package/dist/ui/slider.js +5 -13
- package/dist/ui/switch.js +4 -11
- package/dist/ui/table.js +114 -64
- package/dist/ui/tabs.js +4 -11
- package/dist/ui/tag-input.js +215 -30
- package/dist/ui/textarea.js +6 -14
- package/dist/ui/theme/luma.css +495 -495
- package/dist/ui/theme/lyra.css +495 -495
- package/dist/ui/theme/maia.css +495 -495
- package/dist/ui/theme/mira.css +495 -495
- package/dist/ui/theme/nova.css +495 -495
- package/dist/ui/theme/one.css +742 -742
- package/dist/ui/theme/rhea.css +495 -495
- package/dist/ui/theme/sera.css +495 -495
- package/dist/ui/theme/vega.css +495 -495
- package/package.json +2 -2
- package/dist/css-size-DWAPgQdT.js +0 -38
- package/dist/field-validation.css_raw-B3Iu33rS.js +0 -178
- package/dist/input.css_raw-CQu2fAsU.js +0 -5
- package/dist/mono-button-CeDB9khW.js +0 -878
- package/dist/mono-ui-BwUc0L6B.js +0 -360
- package/dist/tooltip-loader-3U9FTOXj.js +0 -20
- package/dist/tooltip-loader-Dcp9AUZn.js +0 -23
|
@@ -217,6 +217,431 @@ function monoHostChildren(host) {
|
|
|
217
217
|
return Array.from(host.children).filter((n) => !isMonoSkeletonWrapper(n));
|
|
218
218
|
}
|
|
219
219
|
|
|
220
|
+
//#endregion
|
|
221
|
+
//#region src/composables/css-size.ts
|
|
222
|
+
/**
|
|
223
|
+
* Normalize a sizing prop to a CSS length string.
|
|
224
|
+
* - `number` (or numeric string) → `${n}px`
|
|
225
|
+
* - any other non-empty string → passed through verbatim (`"12rem"`, `"80%"`, …)
|
|
226
|
+
* - `null` / `undefined` / `''` → `undefined` (treated as "not set")
|
|
227
|
+
*/
|
|
228
|
+
function toCssSize(value) {
|
|
229
|
+
if (value === null || value === void 0) return void 0;
|
|
230
|
+
if (typeof value === "number") return Number.isFinite(value) ? `${value}px` : void 0;
|
|
231
|
+
const trimmed = String(value).trim();
|
|
232
|
+
if (trimmed === "") return void 0;
|
|
233
|
+
if (/^-?\d+(\.\d+)?$/.test(trimmed)) return `${trimmed}px`;
|
|
234
|
+
return trimmed;
|
|
235
|
+
}
|
|
236
|
+
/**
|
|
237
|
+
* Build a Lit `styleMap` object from the six sizing props, normalizing each via
|
|
238
|
+
* `toCssSize` and omitting the ones that aren't set.
|
|
239
|
+
*/
|
|
240
|
+
function buildSizeStyle(src) {
|
|
241
|
+
const style = {};
|
|
242
|
+
const width = toCssSize(src.width);
|
|
243
|
+
const height = toCssSize(src.height);
|
|
244
|
+
const minWidth = toCssSize(src.minWidth);
|
|
245
|
+
const maxWidth = toCssSize(src.maxWidth);
|
|
246
|
+
const minHeight = toCssSize(src.minHeight);
|
|
247
|
+
const maxHeight = toCssSize(src.maxHeight);
|
|
248
|
+
if (width) style.width = width;
|
|
249
|
+
if (height) style.height = height;
|
|
250
|
+
if (minWidth) style["min-width"] = minWidth;
|
|
251
|
+
if (maxWidth) style["max-width"] = maxWidth;
|
|
252
|
+
if (minHeight) style["min-height"] = minHeight;
|
|
253
|
+
if (maxHeight) style["max-height"] = maxHeight;
|
|
254
|
+
return style;
|
|
255
|
+
}
|
|
256
|
+
|
|
257
|
+
//#endregion
|
|
258
|
+
//#region src/components/table/column-autosize.ts
|
|
259
|
+
/**
|
|
260
|
+
* Content-sized columns — what `mono-table-th`'s `width="auto"` drives.
|
|
261
|
+
*
|
|
262
|
+
* Under `mono-table-fixed` (`table-layout: fixed`) CSS cannot do this: an `auto` column takes
|
|
263
|
+
* the WHOLE surplus instead of fitting its content, and `min-width` / `max-width` on a cell are
|
|
264
|
+
* ignored by the table algorithm. So the column is measured here and handed a concrete px width,
|
|
265
|
+
* clamped to `minWidth` / `maxWidth`, written to its `<col>` (which wins under fixed layout) and
|
|
266
|
+
* to the header cell.
|
|
267
|
+
*
|
|
268
|
+
* Text is measured with a canvas, not read back from the cell: reading the cell's own width would
|
|
269
|
+
* return the width last written, and a column could then never shrink. Measuring text also keeps
|
|
270
|
+
* the pass free of layout reads, so re-running it on every change is cheap.
|
|
271
|
+
*
|
|
272
|
+
* What is measured: the header (caption + its icons), every body cell and every FOOTER cell of
|
|
273
|
+
* the column. The footer matters — a `<mono-table-summary>` total covers the whole set, so a
|
|
274
|
+
* virtual-scroll window that only shows small figures still sizes for the largest one.
|
|
275
|
+
*
|
|
276
|
+
* Cell content is treated as one line (what a money column is). An editor (`<input>`, including
|
|
277
|
+
* the one inside `mono-input`) counts with its value and its own padding / border.
|
|
278
|
+
*/
|
|
279
|
+
/** The text measurer — swappable so tests can run where there is no canvas (jsdom). */
|
|
280
|
+
const autosizeEnv = { measure: defaultMeasure };
|
|
281
|
+
let ctx;
|
|
282
|
+
function defaultMeasure(text, font) {
|
|
283
|
+
if (ctx === void 0) ctx = document.createElement("canvas").getContext("2d");
|
|
284
|
+
if (!ctx) return text.length * 8;
|
|
285
|
+
ctx.font = font;
|
|
286
|
+
return ctx.measureText(text).width;
|
|
287
|
+
}
|
|
288
|
+
/**
|
|
289
|
+
* A canvas `font` string for a computed style — always built from the longhands.
|
|
290
|
+
*
|
|
291
|
+
* NOT `style.font`: the shorthand serialises to `''` whenever a longhand it cannot express is set,
|
|
292
|
+
* and `font-variant-numeric: tabular-nums` (every `mono-table-summary`) is one. The old fallback then
|
|
293
|
+
* put `fontVariant` (`tabular-nums`) into the string, canvas rejected it, kept its default
|
|
294
|
+
* `10px sans-serif`, and a footer total measured far too narrow — the largest figure ellipsed.
|
|
295
|
+
* Only `small-caps` is a variant canvas takes; tabular figures are handled in `measureStyled`.
|
|
296
|
+
*/
|
|
297
|
+
function fontOf(style) {
|
|
298
|
+
const caps = style.fontVariantCaps === "small-caps" ? "small-caps" : "";
|
|
299
|
+
return [
|
|
300
|
+
style.fontStyle,
|
|
301
|
+
caps,
|
|
302
|
+
style.fontWeight,
|
|
303
|
+
style.fontSize,
|
|
304
|
+
style.fontFamily
|
|
305
|
+
].filter(Boolean).join(" ");
|
|
306
|
+
}
|
|
307
|
+
const px = (v) => parseFloat(v) || 0;
|
|
308
|
+
/** The widest digit in `font` — a tabular figure's advance, which canvas cannot be asked for. */
|
|
309
|
+
const digitWidths = /* @__PURE__ */ new Map();
|
|
310
|
+
function maxDigit(font) {
|
|
311
|
+
let w = digitWidths.get(font);
|
|
312
|
+
if (w === void 0) {
|
|
313
|
+
w = Math.max(..."0123456789".split("").map((d) => autosizeEnv.measure(d, font)));
|
|
314
|
+
digitWidths.set(font, w);
|
|
315
|
+
}
|
|
316
|
+
return w;
|
|
317
|
+
}
|
|
318
|
+
/**
|
|
319
|
+
* `text` as the element renders it: its `text-transform`, its `letter-spacing` (canvas ignores
|
|
320
|
+
* both) and its `font-variant-numeric: tabular-nums` (every digit at the widest digit's advance —
|
|
321
|
+
* a safe upper bound; tabular figures are wider than the proportional ones canvas measures).
|
|
322
|
+
*/
|
|
323
|
+
function measureStyled(text, style) {
|
|
324
|
+
const font = fontOf(style);
|
|
325
|
+
if (style.textTransform === "uppercase") text = text.toUpperCase();
|
|
326
|
+
else if (style.textTransform === "lowercase") text = text.toLowerCase();
|
|
327
|
+
let width;
|
|
328
|
+
if (/tabular-nums/.test(style.fontVariantNumeric ?? "")) {
|
|
329
|
+
const digits = text.replace(/\D/g, "").length;
|
|
330
|
+
width = autosizeEnv.measure(text.replace(/\d/g, ""), font) + digits * maxDigit(font);
|
|
331
|
+
} else width = autosizeEnv.measure(text, font);
|
|
332
|
+
return width + px(style.letterSpacing) * text.length;
|
|
333
|
+
}
|
|
334
|
+
/** Horizontal padding + border of an element's box. */
|
|
335
|
+
function boxX(style) {
|
|
336
|
+
return px(style.paddingLeft) + px(style.paddingRight) + px(style.borderLeftWidth) + px(style.borderRightWidth);
|
|
337
|
+
}
|
|
338
|
+
/**
|
|
339
|
+
* A size prop as px: a number / bare numeric string / `px` → px, `rem` → × the root font size,
|
|
340
|
+
* `em` → × `el`'s font size. Anything else (`%`, `auto`, a var) → `undefined`: not a bound.
|
|
341
|
+
*/
|
|
342
|
+
function cssLengthToPx(value, el) {
|
|
343
|
+
if (value == null) return void 0;
|
|
344
|
+
if (typeof value === "number") return Number.isFinite(value) ? value : void 0;
|
|
345
|
+
const m = /^\s*(-?\d+(?:\.\d+)?)\s*(px|rem|em)?\s*$/i.exec(value);
|
|
346
|
+
if (!m) return void 0;
|
|
347
|
+
const n = parseFloat(m[1]);
|
|
348
|
+
const unit = (m[2] ?? "px").toLowerCase();
|
|
349
|
+
if (unit === "px") return n;
|
|
350
|
+
const ref = unit === "rem" ? document.documentElement : el ?? document.documentElement;
|
|
351
|
+
return n * (px(getComputedStyle(ref).fontSize) || 16);
|
|
352
|
+
}
|
|
353
|
+
/** `w` clamped to `[min, max]`; an unset bound does not clamp. `min` wins over a smaller `max`. */
|
|
354
|
+
function clampWidth(w, min, max) {
|
|
355
|
+
if (max != null) w = Math.min(w, max);
|
|
356
|
+
if (min != null) w = Math.max(w, min);
|
|
357
|
+
return w;
|
|
358
|
+
}
|
|
359
|
+
/**
|
|
360
|
+
* The grid column a header cell STARTS at — a walk over its section's rows honouring `rowspan`
|
|
361
|
+
* and `colspan`, so a leaf header under a band row (`<th colspan>` above it) maps to its real
|
|
362
|
+
* column. `cellIndex` alone would count only the cells of its own row.
|
|
363
|
+
*/
|
|
364
|
+
function headerColumnIndex(cell) {
|
|
365
|
+
const section = cell.parentElement?.parentElement;
|
|
366
|
+
if (!section) return cell.cellIndex;
|
|
367
|
+
const taken = [];
|
|
368
|
+
const rows = Array.from(section.children).filter((r) => r.tagName === "TR");
|
|
369
|
+
for (let r = 0; r < rows.length; r++) {
|
|
370
|
+
taken[r] ??= [];
|
|
371
|
+
let c = 0;
|
|
372
|
+
for (const cur of Array.from(rows[r].cells)) {
|
|
373
|
+
while (taken[r][c]) c++;
|
|
374
|
+
if (cur === cell) return c;
|
|
375
|
+
for (let dr = 0; dr < Math.max(1, cur.rowSpan); dr++) {
|
|
376
|
+
const row = taken[r + dr] ??= [];
|
|
377
|
+
for (let dc = 0; dc < Math.max(1, cur.colSpan); dc++) row[c + dc] = true;
|
|
378
|
+
}
|
|
379
|
+
c += Math.max(1, cur.colSpan);
|
|
380
|
+
}
|
|
381
|
+
}
|
|
382
|
+
return cell.cellIndex;
|
|
383
|
+
}
|
|
384
|
+
/** The single-column cell of `row` at grid column `col` — a spanning cell (a spacer row) is none. */
|
|
385
|
+
function cellAt(row, col) {
|
|
386
|
+
let c = 0;
|
|
387
|
+
for (const cell of Array.from(row.cells)) {
|
|
388
|
+
const span = Math.max(1, cell.colSpan);
|
|
389
|
+
if (c === col) return span === 1 ? cell : void 0;
|
|
390
|
+
if (c > col) return void 0;
|
|
391
|
+
c += span;
|
|
392
|
+
}
|
|
393
|
+
}
|
|
394
|
+
/** The `<col>` at grid column `col`, honouring `<col span>`. */
|
|
395
|
+
function colAt(table, col) {
|
|
396
|
+
let c = 0;
|
|
397
|
+
for (const group of Array.from(table.children).filter((e) => e.tagName === "COLGROUP")) {
|
|
398
|
+
const cols = Array.from(group.children).filter((e) => e.tagName === "COL");
|
|
399
|
+
for (const el of cols) {
|
|
400
|
+
const span = Math.max(1, el.span || 1);
|
|
401
|
+
if (col < c + span) return span === 1 ? el : void 0;
|
|
402
|
+
c += span;
|
|
403
|
+
}
|
|
404
|
+
}
|
|
405
|
+
}
|
|
406
|
+
/** An element hidden by `v-show` / `hidden` — its text does not show, so it does not count. */
|
|
407
|
+
function isHidden(el) {
|
|
408
|
+
return el.hidden === true || el.style?.display === "none";
|
|
409
|
+
}
|
|
410
|
+
/** The one-line width a cell's content needs, padding included. */
|
|
411
|
+
function contentWidth(cell) {
|
|
412
|
+
let width = 0;
|
|
413
|
+
const walk = (node) => {
|
|
414
|
+
for (const child of Array.from(node.childNodes)) if (child.nodeType === Node.TEXT_NODE) {
|
|
415
|
+
const text = (child.textContent ?? "").replace(/\s+/g, " ");
|
|
416
|
+
if (!text.trim()) continue;
|
|
417
|
+
const parent = child.parentElement ?? node.host ?? cell;
|
|
418
|
+
width += measureStyled(text, getComputedStyle(parent));
|
|
419
|
+
} else if (child.nodeType === Node.ELEMENT_NODE) {
|
|
420
|
+
const el = child;
|
|
421
|
+
if (isHidden(el)) continue;
|
|
422
|
+
if (el.tagName === "INPUT" || el.tagName === "TEXTAREA") {
|
|
423
|
+
const input = el;
|
|
424
|
+
const style = getComputedStyle(input);
|
|
425
|
+
width += measureStyled(input.value || input.placeholder || "", style) + boxX(style);
|
|
426
|
+
continue;
|
|
427
|
+
}
|
|
428
|
+
if (el.tagName === "SVG" || el.tagName === "svg") {
|
|
429
|
+
width += el.getBoundingClientRect?.().width || 0;
|
|
430
|
+
continue;
|
|
431
|
+
}
|
|
432
|
+
walk(el.shadowRoot ?? el);
|
|
433
|
+
}
|
|
434
|
+
};
|
|
435
|
+
walk(cell);
|
|
436
|
+
return width + boxX(getComputedStyle(cell));
|
|
437
|
+
}
|
|
438
|
+
/** The header cell's need: the caption text plus whatever icons sit beside it. */
|
|
439
|
+
function headerWidth(cell, host) {
|
|
440
|
+
const label = host.querySelector("[data-mono-slot=\"label\"]");
|
|
441
|
+
const text = (label?.textContent ?? host.textContent ?? "").replace(/\s+/g, " ").trim();
|
|
442
|
+
let width = text ? measureStyled(text, getComputedStyle(label ?? host)) : 0;
|
|
443
|
+
for (const icon of Array.from(host.querySelectorAll(".mono-th-filter-ind, .mono-table-sort-btn:not(.label-trigger), .mono-th-required"))) {
|
|
444
|
+
const w = icon.getBoundingClientRect?.().width || 0;
|
|
445
|
+
width += w ? w + 4 : 0;
|
|
446
|
+
}
|
|
447
|
+
return width + boxX(getComputedStyle(cell));
|
|
448
|
+
}
|
|
449
|
+
/**
|
|
450
|
+
* One auto-sized column, owned by its `mono-table-th`. `schedule()` coalesces every trigger (a
|
|
451
|
+
* controller notify, a body mutation, typing in an editor) into one measurement per frame.
|
|
452
|
+
*/
|
|
453
|
+
var ColumnAutoSize = class ColumnAutoSize {
|
|
454
|
+
constructor(host) {
|
|
455
|
+
this.host = host;
|
|
456
|
+
this.growOnly = false;
|
|
457
|
+
this._floor = 0;
|
|
458
|
+
this._raf = 0;
|
|
459
|
+
this._onInput = (e) => {
|
|
460
|
+
const t = e.target;
|
|
461
|
+
if (t && this._table && !this._table.tHead?.contains(t)) this.schedule();
|
|
462
|
+
};
|
|
463
|
+
this._onFonts = () => {
|
|
464
|
+
digitWidths.clear();
|
|
465
|
+
this.schedule();
|
|
466
|
+
};
|
|
467
|
+
}
|
|
468
|
+
static {
|
|
469
|
+
this._queued = /* @__PURE__ */ new Set();
|
|
470
|
+
}
|
|
471
|
+
static {
|
|
472
|
+
this._frame = 0;
|
|
473
|
+
}
|
|
474
|
+
static _flush() {
|
|
475
|
+
ColumnAutoSize._frame = 0;
|
|
476
|
+
const batch = [...ColumnAutoSize._queued];
|
|
477
|
+
ColumnAutoSize._queued.clear();
|
|
478
|
+
const writes = batch.map((s) => {
|
|
479
|
+
s._raf = 0;
|
|
480
|
+
return s._measure();
|
|
481
|
+
});
|
|
482
|
+
for (const write of writes) write?.();
|
|
483
|
+
}
|
|
484
|
+
schedule() {
|
|
485
|
+
if (this._raf) return;
|
|
486
|
+
this._raf = 1;
|
|
487
|
+
ColumnAutoSize._queued.add(this);
|
|
488
|
+
ColumnAutoSize._frame ||= requestAnimationFrame(() => ColumnAutoSize._flush());
|
|
489
|
+
}
|
|
490
|
+
/** Forget the grow-only floor (new rows) and re-measure. */
|
|
491
|
+
resetFloor() {
|
|
492
|
+
if (!this._floor) return;
|
|
493
|
+
this._floor = 0;
|
|
494
|
+
this.schedule();
|
|
495
|
+
}
|
|
496
|
+
/** Stop watching, and hand the column back to whatever width it is given next. */
|
|
497
|
+
stop(clear = false) {
|
|
498
|
+
ColumnAutoSize._queued.delete(this);
|
|
499
|
+
this._raf = 0;
|
|
500
|
+
this._unwatch();
|
|
501
|
+
if (clear && this._wrote) {
|
|
502
|
+
if (this._wrote.col) this._wrote.col.style.width = "";
|
|
503
|
+
this._wrote.cell.style.width = "";
|
|
504
|
+
}
|
|
505
|
+
this._wrote = void 0;
|
|
506
|
+
}
|
|
507
|
+
_watch(table) {
|
|
508
|
+
if (this._table === table) return;
|
|
509
|
+
this._unwatch();
|
|
510
|
+
this._table = table;
|
|
511
|
+
this._observer = new MutationObserver((records) => {
|
|
512
|
+
const head = table.tHead;
|
|
513
|
+
if (records.some((r) => !head?.contains(r.target))) this.schedule();
|
|
514
|
+
});
|
|
515
|
+
this._observer.observe(table, {
|
|
516
|
+
childList: true,
|
|
517
|
+
characterData: true,
|
|
518
|
+
subtree: true
|
|
519
|
+
});
|
|
520
|
+
table.addEventListener("input", this._onInput, true);
|
|
521
|
+
document.fonts?.addEventListener?.("loadingdone", this._onFonts);
|
|
522
|
+
}
|
|
523
|
+
_unwatch() {
|
|
524
|
+
this._observer?.disconnect();
|
|
525
|
+
this._observer = void 0;
|
|
526
|
+
this._table?.removeEventListener("input", this._onInput, true);
|
|
527
|
+
document.fonts?.removeEventListener?.("loadingdone", this._onFonts);
|
|
528
|
+
this._table = void 0;
|
|
529
|
+
}
|
|
530
|
+
/** Measure now (reads only); returns the write to apply after every sizer has measured. */
|
|
531
|
+
_measure() {
|
|
532
|
+
const cell = this.host.closest("th, td");
|
|
533
|
+
const table = cell?.closest("table");
|
|
534
|
+
if (!cell || !table || !this.host.isConnected) return null;
|
|
535
|
+
this._watch(table);
|
|
536
|
+
const index = headerColumnIndex(cell);
|
|
537
|
+
let width = headerWidth(cell, this.host);
|
|
538
|
+
const sections = [...Array.from(table.tBodies), ...table.tFoot ? [table.tFoot] : []];
|
|
539
|
+
for (const section of sections) for (const row of Array.from(section.rows)) {
|
|
540
|
+
const target = cellAt(row, index);
|
|
541
|
+
if (target) width = Math.max(width, contentWidth(target));
|
|
542
|
+
}
|
|
543
|
+
width = Math.ceil(clampWidth(width + 1, this.min, this.max));
|
|
544
|
+
if (this.growOnly) width = this._floor = Math.max(width, this._floor);
|
|
545
|
+
else this._floor = 0;
|
|
546
|
+
const value = `${width}px`;
|
|
547
|
+
const col = colAt(table, index);
|
|
548
|
+
return () => {
|
|
549
|
+
if (cell.style.width !== value) cell.style.width = value;
|
|
550
|
+
if (col && col.style.width !== value) col.style.width = value;
|
|
551
|
+
this._wrote = {
|
|
552
|
+
col,
|
|
553
|
+
cell
|
|
554
|
+
};
|
|
555
|
+
};
|
|
556
|
+
}
|
|
557
|
+
};
|
|
558
|
+
|
|
559
|
+
//#endregion
|
|
560
|
+
//#region src/composables/mono-size-attrs.ts
|
|
561
|
+
const ATTRS = [
|
|
562
|
+
"mono-width",
|
|
563
|
+
"mono-min-width",
|
|
564
|
+
"mono-max-width"
|
|
565
|
+
];
|
|
566
|
+
const SELECTOR = ATTRS.map((a) => `[${a}]`).join(", ");
|
|
567
|
+
/** Auto-sized cells and their sizers — a cell that loses `auto` or the document gets stopped. */
|
|
568
|
+
const sizers = /* @__PURE__ */ new Map();
|
|
569
|
+
let observer = null;
|
|
570
|
+
const isCell = (el) => el.tagName === "TH" || el.tagName === "TD";
|
|
571
|
+
/** Apply the three attributes to one element. Re-run whenever one of them changes. */
|
|
572
|
+
function applyMonoSizeAttributes(el) {
|
|
573
|
+
const width = el.getAttribute("mono-width")?.trim() ?? "";
|
|
574
|
+
const min = el.getAttribute("mono-min-width")?.trim() ?? "";
|
|
575
|
+
const max = el.getAttribute("mono-max-width")?.trim() ?? "";
|
|
576
|
+
const auto = width.toLowerCase() === "auto";
|
|
577
|
+
el.style.minWidth = min ? toCssSize(min) ?? "" : "";
|
|
578
|
+
el.style.maxWidth = max ? toCssSize(max) ?? "" : "";
|
|
579
|
+
if (!isCell(el)) {
|
|
580
|
+
el.style.width = auto ? "fit-content" : width ? toCssSize(width) ?? "" : "";
|
|
581
|
+
return;
|
|
582
|
+
}
|
|
583
|
+
let sizer = sizers.get(el);
|
|
584
|
+
if (!auto) {
|
|
585
|
+
if (sizer) {
|
|
586
|
+
sizer.stop(true);
|
|
587
|
+
sizers.delete(el);
|
|
588
|
+
}
|
|
589
|
+
el.style.width = width ? toCssSize(width) ?? "" : "";
|
|
590
|
+
return;
|
|
591
|
+
}
|
|
592
|
+
if (!sizer) sizers.set(el, sizer = new ColumnAutoSize(el));
|
|
593
|
+
sizer.min = cssLengthToPx(min || null, el);
|
|
594
|
+
sizer.max = cssLengthToPx(max || null, el);
|
|
595
|
+
sizer.schedule();
|
|
596
|
+
}
|
|
597
|
+
/** Stop the sizers of cells that left the document. */
|
|
598
|
+
function sweep() {
|
|
599
|
+
for (const [el, sizer] of sizers) {
|
|
600
|
+
if (el.isConnected) continue;
|
|
601
|
+
sizer.stop();
|
|
602
|
+
sizers.delete(el);
|
|
603
|
+
}
|
|
604
|
+
}
|
|
605
|
+
function scan(root) {
|
|
606
|
+
if (root instanceof HTMLElement && root.matches(SELECTOR)) applyMonoSizeAttributes(root);
|
|
607
|
+
for (const el of Array.from(root.querySelectorAll(SELECTOR))) applyMonoSizeAttributes(el);
|
|
608
|
+
}
|
|
609
|
+
/**
|
|
610
|
+
* Turn the attributes on for the whole document — idempotent, so every caller may call it.
|
|
611
|
+
* Returns a stop function (tests; an app never needs it).
|
|
612
|
+
*/
|
|
613
|
+
function startMonoSizeAttributes() {
|
|
614
|
+
if (typeof document === "undefined" || typeof MutationObserver === "undefined") return () => {};
|
|
615
|
+
if (!observer) {
|
|
616
|
+
observer = new MutationObserver((records) => {
|
|
617
|
+
let removed = false;
|
|
618
|
+
for (const r of records) {
|
|
619
|
+
if (r.type === "attributes") {
|
|
620
|
+
applyMonoSizeAttributes(r.target);
|
|
621
|
+
continue;
|
|
622
|
+
}
|
|
623
|
+
for (const node of Array.from(r.addedNodes)) if (node.nodeType === 1 && node.isConnected) scan(node);
|
|
624
|
+
if (r.removedNodes.length) removed = true;
|
|
625
|
+
}
|
|
626
|
+
if (removed && sizers.size) sweep();
|
|
627
|
+
});
|
|
628
|
+
observer.observe(document.documentElement, {
|
|
629
|
+
subtree: true,
|
|
630
|
+
childList: true,
|
|
631
|
+
attributes: true,
|
|
632
|
+
attributeFilter: [...ATTRS]
|
|
633
|
+
});
|
|
634
|
+
scan(document);
|
|
635
|
+
}
|
|
636
|
+
return stopMonoSizeAttributes;
|
|
637
|
+
}
|
|
638
|
+
function stopMonoSizeAttributes() {
|
|
639
|
+
observer?.disconnect();
|
|
640
|
+
observer = null;
|
|
641
|
+
for (const sizer of sizers.values()) sizer.stop();
|
|
642
|
+
sizers.clear();
|
|
643
|
+
}
|
|
644
|
+
|
|
220
645
|
//#endregion
|
|
221
646
|
//#region src/composables/mono-ui.ts
|
|
222
647
|
const STATE_KEY = Symbol.for("mono-helper.ui");
|
|
@@ -680,6 +1105,27 @@ let _iconSheet = null;
|
|
|
680
1105
|
let _iconSheetReady = false;
|
|
681
1106
|
/** How many icon rules the last collection saw, so a later one can be detected. */
|
|
682
1107
|
let _iconRuleCount = -1;
|
|
1108
|
+
/**
|
|
1109
|
+
* The refresh poll ran its course without seeing a glyph rule (a page whose icons are all inline
|
|
1110
|
+
* SVG has none). From then on the sheet is treated like a ready one — re-collected only when the
|
|
1111
|
+
* rule count moves — instead of a full collect + `replaceSync` on every adopt, and the poll is
|
|
1112
|
+
* never re-armed.
|
|
1113
|
+
*/
|
|
1114
|
+
let _iconPollDone = false;
|
|
1115
|
+
/** A rule count was taken this frame — later adopts in the same frame trust it. */
|
|
1116
|
+
let _iconCountFresh = false;
|
|
1117
|
+
/**
|
|
1118
|
+
* `countIconRules()` walks every rule of every stylesheet. `adoptIconStyles` runs from
|
|
1119
|
+
* `updated()` (every render of a shadow button-dropdown, for one), so the walk is taken at most
|
|
1120
|
+
* once per frame; a rule UnoCSS generates mid-frame is picked up on the next.
|
|
1121
|
+
*/
|
|
1122
|
+
function iconRulesUnchanged() {
|
|
1123
|
+
if (_iconCountFresh) return true;
|
|
1124
|
+
_iconCountFresh = true;
|
|
1125
|
+
if (typeof requestAnimationFrame !== "undefined") requestAnimationFrame(() => _iconCountFresh = false);
|
|
1126
|
+
else _iconCountFresh = false;
|
|
1127
|
+
return countIconRules() === _iconRuleCount;
|
|
1128
|
+
}
|
|
683
1129
|
/** Selectors that target an icon utility class (`.i-…`) or the `.mono-icon` helper. */
|
|
684
1130
|
const ICON_SELECTOR = /(^|[\s,>+~(])\.(i-[a-z0-9]|mono-icon)/i;
|
|
685
1131
|
/** A real data-driven icon utility (`.i-mdi-…`) — what we actually wait for. */
|
|
@@ -737,7 +1183,7 @@ function ensureIconSheet() {
|
|
|
737
1183
|
} catch {
|
|
738
1184
|
return null;
|
|
739
1185
|
}
|
|
740
|
-
if (_iconSheetReady
|
|
1186
|
+
if ((_iconSheetReady || _iconPollDone) && iconRulesUnchanged()) return _iconSheet;
|
|
741
1187
|
const collected = [];
|
|
742
1188
|
const seen = /* @__PURE__ */ new Set();
|
|
743
1189
|
let glyphFound = false;
|
|
@@ -778,7 +1224,7 @@ let _refreshScheduled = false;
|
|
|
778
1224
|
* glyphs appear as soon as the rules land — no component re-render required.
|
|
779
1225
|
*/
|
|
780
1226
|
function scheduleIconRefresh() {
|
|
781
|
-
if (_refreshScheduled || _iconSheetReady || isServer) return;
|
|
1227
|
+
if (_refreshScheduled || _iconSheetReady || _iconPollDone || isServer) return;
|
|
782
1228
|
const raf = typeof requestAnimationFrame !== "undefined" ? requestAnimationFrame : typeof setTimeout !== "undefined" ? (cb) => setTimeout(cb, 16) : null;
|
|
783
1229
|
if (!raf) return;
|
|
784
1230
|
_refreshScheduled = true;
|
|
@@ -788,6 +1234,7 @@ function scheduleIconRefresh() {
|
|
|
788
1234
|
ensureIconSheet();
|
|
789
1235
|
if (_iconSheetReady || attempts > 60) {
|
|
790
1236
|
_refreshScheduled = false;
|
|
1237
|
+
if (!_iconSheetReady) _iconPollDone = true;
|
|
791
1238
|
return;
|
|
792
1239
|
}
|
|
793
1240
|
raf(tick);
|
|
@@ -1011,4 +1458,4 @@ function flushSsrHydration(el, options = {}) {
|
|
|
1011
1458
|
}
|
|
1012
1459
|
|
|
1013
1460
|
//#endregion
|
|
1014
|
-
export { monoPendingActive as _, __decorate as a, defineHybridPropAlias as c, optionalNumberConverter as d, customElement as f,
|
|
1461
|
+
export { monoPendingGrace as C, monoPendingActive as S, buildSizeStyle as _, __decorate as a, monoHostChildNodes as b, defineHybridPropAlias as c, optionalNumberConverter as d, customElement as f, cssLengthToPx as g, ColumnAutoSize as h, withShadowUtilityStyles as i, defineHybridPropAliases as l, startMonoSizeAttributes as m, adoptIconStyles as n, arrayHasChanged as o, defineMonoElement as p, toShadowCss as r, booleanStringConverter as s, flushSsrHydration as t, numberStringConverter as u, toCssSize as v, monoPhantomOptions as w, monoHostChildren as x, monoApplyPhantomOptions as y };
|
package/dist/index.js
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
import { a as parseFieldPath, c as toODataClause, l as toODataSelector, n as isPath, r as mergePatch, s as setFieldValue, t as getFieldValue } from "./field-path-BabiMrrA.js";
|
|
2
|
-
import { a as buildGroups, c as isGroupNode, o as collectGroupPaths, s as flattenLeaves } from "./data-source-read-
|
|
2
|
+
import { a as buildGroups, c as isGroupNode, o as collectGroupPaths, s as flattenLeaves } from "./data-source-read-Cp_h7NIf.js";
|
|
3
3
|
import { _ as plainSearchFields, b as searchRemoteFilter, c as resolveErrorMessages, d as DEFAULT_SEARCH_OPERATION, f as MonoSourceSearch, g as parseSearchValue, h as mergeSearchFields, l as setErrorMessages, m as isFoldableSearch, n as describeError, p as SEARCH_FIELDS_KEYS, r as errorStatus, s as normalizeError, t as DEFAULT_ERROR_MESSAGES, v as readSearchField, x as searchRowPredicate, y as resolveSearchFields } from "./normalize-error-D93O4q8g.js";
|
|
4
|
-
import { h as monoArraySource } from "./data-source-options-
|
|
4
|
+
import { h as monoArraySource } from "./data-source-options-lDR-g9Eb.js";
|
|
5
5
|
import { t as resolveMaybeReactive } from "./reactive-Dtd-esHO.js";
|
|
6
|
-
import { t as monoDataGrid } from "./mono-data-grid-
|
|
6
|
+
import { t as monoDataGrid } from "./mono-data-grid-kV4jYu2g.js";
|
|
7
7
|
import { d as OPERATOR_ARITY, l as treeToArray, m as operatorsFor, n as arrayToTree, s as odataStringToArray, t as arrayToODataString, u as DEFAULT_TEXTS } from "./filter-odata-Bi27XUpQ.js";
|
|
8
8
|
import { t as monoFilterBuilder } from "./filter-builder-C0T3pMx2.js";
|
|
9
|
-
import { a as resetMonoUI,
|
|
10
|
-
import { t as monoForm } from "./mono-form-controller-
|
|
9
|
+
import { C as resetMonoSkeleton, a as resetMonoUI, c as stopMonoSizeAttributes, i as getMonoUIStatus, m as isMonoSsrApp, n as createMonoUI, o as applyMonoSizeAttributes, p as getMonoSkeletonStatus, r as getMonoUI, s as startMonoSizeAttributes } from "./mono-ui-kvLVIf1V.js";
|
|
10
|
+
import { t as monoForm } from "./mono-form-controller-BrA10erm.js";
|
|
11
11
|
import { t as monoModal } from "./mono-modal-controller-ClObbHUs.js";
|
|
12
|
-
import { i as composeApply, n as buildChartApply, r as buildChartOdataRequest, t as monoChart } from "./mono-data-chart-
|
|
13
|
-
import { t as monoDataDropdown } from "./mono-data-dropdown-
|
|
14
|
-
import {
|
|
15
|
-
import { a as resetMonoTooltip, n as createMonoTooltip, r as destroyAllMonoTooltips } from "./tooltip-
|
|
16
|
-
import { _ as DEFAULT_FLAVOR, a as flavors, b as themePresets, c as getCurrentFlavor, d as getThemeData, f as isValidFlavor, g as themes, h as resetTheme, i as createThemeClass, l as getCurrentTheme, m as resetFlavor, n as applyTheme, o as getAllFlavors, p as isValidTheme, r as createFlavorClass, s as getAllThemes, t as applyFlavor, u as getFlavorData, v as DEFAULT_THEME, y as flavorPresets } from "./index.node-
|
|
12
|
+
import { i as composeApply, n as buildChartApply, r as buildChartOdataRequest, t as monoChart } from "./mono-data-chart-BAH9Zb3p.js";
|
|
13
|
+
import { t as monoDataDropdown } from "./mono-data-dropdown-BsY5IuIo.js";
|
|
14
|
+
import { a as monoTooltip, c as getMonoTooltipGlobal, t as controlMonoTooltip } from "./control-tooltip-CoPD37_h.js";
|
|
15
|
+
import { a as resetMonoTooltip, n as createMonoTooltip, r as destroyAllMonoTooltips } from "./tooltip-Cu5IrDS9.js";
|
|
16
|
+
import { _ as DEFAULT_FLAVOR, a as flavors, b as themePresets, c as getCurrentFlavor, d as getThemeData, f as isValidFlavor, g as themes, h as resetTheme, i as createThemeClass, l as getCurrentTheme, m as resetFlavor, n as applyTheme, o as getAllFlavors, p as isValidTheme, r as createFlavorClass, s as getAllThemes, t as applyFlavor, u as getFlavorData, v as DEFAULT_THEME, y as flavorPresets } from "./index.node-Mg0Snp0t.js";
|
|
17
17
|
|
|
18
|
-
export { DEFAULT_ERROR_MESSAGES, DEFAULT_FLAVOR, DEFAULT_SEARCH_OPERATION, DEFAULT_THEME, OPERATOR_ARITY as MONO_FILTER_OPERATOR_ARITY, DEFAULT_TEXTS as MONO_FILTER_TEXTS, MonoSourceSearch, SEARCH_FIELDS_KEYS, applyFlavor, applyTheme, arrayToODataString, arrayToTree, buildChartApply, buildChartOdataRequest, buildGroups, collectGroupPaths, composeApply, monoChart as controlMonoChart, monoChart, monoDataDropdown as controlMonoDataDropdown, monoDataDropdown, monoFilterBuilder as controlMonoFilterBuilder, monoFilterBuilder, monoForm as controlMonoForm, monoForm, monoModal as controlMonoModal, monoModal, monoDataGrid as controlMonoTable, monoDataGrid, controlMonoTooltip, createFlavorClass, createMonoTooltip, createMonoUI, createThemeClass, describeError, destroyAllMonoTooltips, errorStatus, flattenLeaves, flavorPresets, flavors, getAllFlavors, getAllThemes, getCurrentFlavor, getCurrentTheme, getFieldValue, getFlavorData, getMonoSkeletonStatus, getMonoTooltipGlobal, getMonoUI, getMonoUIStatus, getThemeData, isFoldableSearch, isGroupNode, isMonoSsrApp, isPath, isValidFlavor, isValidTheme, mergePatch, mergeSearchFields, monoArraySource, operatorsFor as monoFilterOperatorsFor, monoTooltip, normalizeError, odataStringToArray, parseFieldPath, parseSearchValue, plainSearchFields, readSearchField, resetFlavor, resetMonoSkeleton, resetMonoTooltip, resetMonoUI, resetTheme, resolveErrorMessages, resolveMaybeReactive, resolveSearchFields, searchRemoteFilter, searchRowPredicate, setErrorMessages, setFieldValue, themePresets, themes, toODataClause, toODataSelector, treeToArray };
|
|
18
|
+
export { DEFAULT_ERROR_MESSAGES, DEFAULT_FLAVOR, DEFAULT_SEARCH_OPERATION, DEFAULT_THEME, OPERATOR_ARITY as MONO_FILTER_OPERATOR_ARITY, DEFAULT_TEXTS as MONO_FILTER_TEXTS, MonoSourceSearch, SEARCH_FIELDS_KEYS, applyFlavor, applyMonoSizeAttributes, applyTheme, arrayToODataString, arrayToTree, buildChartApply, buildChartOdataRequest, buildGroups, collectGroupPaths, composeApply, monoChart as controlMonoChart, monoChart, monoDataDropdown as controlMonoDataDropdown, monoDataDropdown, monoFilterBuilder as controlMonoFilterBuilder, monoFilterBuilder, monoForm as controlMonoForm, monoForm, monoModal as controlMonoModal, monoModal, monoDataGrid as controlMonoTable, monoDataGrid, controlMonoTooltip, createFlavorClass, createMonoTooltip, createMonoUI, createThemeClass, describeError, destroyAllMonoTooltips, errorStatus, flattenLeaves, flavorPresets, flavors, getAllFlavors, getAllThemes, getCurrentFlavor, getCurrentTheme, getFieldValue, getFlavorData, getMonoSkeletonStatus, getMonoTooltipGlobal, getMonoUI, getMonoUIStatus, getThemeData, isFoldableSearch, isGroupNode, isMonoSsrApp, isPath, isValidFlavor, isValidTheme, mergePatch, mergeSearchFields, monoArraySource, operatorsFor as monoFilterOperatorsFor, monoTooltip, normalizeError, odataStringToArray, parseFieldPath, parseSearchValue, plainSearchFields, readSearchField, resetFlavor, resetMonoSkeleton, resetMonoTooltip, resetMonoUI, resetTheme, resolveErrorMessages, resolveMaybeReactive, resolveSearchFields, searchRemoteFilter, searchRowPredicate, setErrorMessages, setFieldValue, startMonoSizeAttributes, stopMonoSizeAttributes, themePresets, themes, toODataClause, toODataSelector, treeToArray };
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import "./normalize-error-D93O4q8g.js";
|
|
2
|
-
import "./mono-data-grid-
|
|
3
|
-
import "./mono-ui-
|
|
4
|
-
import "./mono-data-chart-
|
|
5
|
-
import "./mono-data-dropdown-
|
|
6
|
-
import "./tooltip-
|
|
2
|
+
import "./mono-data-grid-kV4jYu2g.js";
|
|
3
|
+
import "./mono-ui-kvLVIf1V.js";
|
|
4
|
+
import "./mono-data-chart-BAH9Zb3p.js";
|
|
5
|
+
import "./mono-data-dropdown-BsY5IuIo.js";
|
|
6
|
+
import "./tooltip-Cu5IrDS9.js";
|
|
7
7
|
|
|
8
8
|
//#region src/data/theme/presets.json
|
|
9
9
|
var presets_default = {
|
package/dist/index.node.js
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
import { a as parseFieldPath, c as toODataClause, l as toODataSelector, n as isPath, r as mergePatch, s as setFieldValue, t as getFieldValue } from "./field-path-BabiMrrA.js";
|
|
2
|
-
import { a as buildGroups, c as isGroupNode, o as collectGroupPaths, s as flattenLeaves } from "./data-source-read-
|
|
2
|
+
import { a as buildGroups, c as isGroupNode, o as collectGroupPaths, s as flattenLeaves } from "./data-source-read-Cp_h7NIf.js";
|
|
3
3
|
import { _ as plainSearchFields, b as searchRemoteFilter, c as resolveErrorMessages, d as DEFAULT_SEARCH_OPERATION, f as MonoSourceSearch, g as parseSearchValue, h as mergeSearchFields, l as setErrorMessages, m as isFoldableSearch, n as describeError, p as SEARCH_FIELDS_KEYS, r as errorStatus, s as normalizeError, t as DEFAULT_ERROR_MESSAGES, v as readSearchField, x as searchRowPredicate, y as resolveSearchFields } from "./normalize-error-D93O4q8g.js";
|
|
4
|
-
import { h as monoArraySource } from "./data-source-options-
|
|
4
|
+
import { h as monoArraySource } from "./data-source-options-lDR-g9Eb.js";
|
|
5
5
|
import { t as resolveMaybeReactive } from "./reactive-Dtd-esHO.js";
|
|
6
|
-
import { t as monoDataGrid } from "./mono-data-grid-
|
|
6
|
+
import { t as monoDataGrid } from "./mono-data-grid-kV4jYu2g.js";
|
|
7
7
|
import { d as OPERATOR_ARITY, l as treeToArray, m as operatorsFor, n as arrayToTree, s as odataStringToArray, t as arrayToODataString, u as DEFAULT_TEXTS } from "./filter-odata-Bi27XUpQ.js";
|
|
8
8
|
import { t as monoFilterBuilder } from "./filter-builder-C0T3pMx2.js";
|
|
9
|
-
import { a as resetMonoUI,
|
|
10
|
-
import { t as monoForm } from "./mono-form-controller-
|
|
9
|
+
import { C as resetMonoSkeleton, a as resetMonoUI, c as stopMonoSizeAttributes, i as getMonoUIStatus, m as isMonoSsrApp, n as createMonoUI, o as applyMonoSizeAttributes, p as getMonoSkeletonStatus, r as getMonoUI, s as startMonoSizeAttributes } from "./mono-ui-kvLVIf1V.js";
|
|
10
|
+
import { t as monoForm } from "./mono-form-controller-BrA10erm.js";
|
|
11
11
|
import { t as monoModal } from "./mono-modal-controller-ClObbHUs.js";
|
|
12
|
-
import { i as composeApply, n as buildChartApply, r as buildChartOdataRequest, t as monoChart } from "./mono-data-chart-
|
|
13
|
-
import { t as monoDataDropdown } from "./mono-data-dropdown-
|
|
14
|
-
import {
|
|
15
|
-
import { a as resetMonoTooltip, n as createMonoTooltip, r as destroyAllMonoTooltips } from "./tooltip-
|
|
16
|
-
import { _ as DEFAULT_FLAVOR, a as flavors, b as themePresets, c as getCurrentFlavor, d as getThemeData, f as isValidFlavor, g as themes, h as resetTheme, i as createThemeClass, l as getCurrentTheme, m as resetFlavor, n as applyTheme, o as getAllFlavors, p as isValidTheme, r as createFlavorClass, s as getAllThemes, t as applyFlavor, u as getFlavorData, v as DEFAULT_THEME, y as flavorPresets } from "./index.node-
|
|
12
|
+
import { i as composeApply, n as buildChartApply, r as buildChartOdataRequest, t as monoChart } from "./mono-data-chart-BAH9Zb3p.js";
|
|
13
|
+
import { t as monoDataDropdown } from "./mono-data-dropdown-BsY5IuIo.js";
|
|
14
|
+
import { a as monoTooltip, c as getMonoTooltipGlobal, t as controlMonoTooltip } from "./control-tooltip-CoPD37_h.js";
|
|
15
|
+
import { a as resetMonoTooltip, n as createMonoTooltip, r as destroyAllMonoTooltips } from "./tooltip-Cu5IrDS9.js";
|
|
16
|
+
import { _ as DEFAULT_FLAVOR, a as flavors, b as themePresets, c as getCurrentFlavor, d as getThemeData, f as isValidFlavor, g as themes, h as resetTheme, i as createThemeClass, l as getCurrentTheme, m as resetFlavor, n as applyTheme, o as getAllFlavors, p as isValidTheme, r as createFlavorClass, s as getAllThemes, t as applyFlavor, u as getFlavorData, v as DEFAULT_THEME, y as flavorPresets } from "./index.node-Mg0Snp0t.js";
|
|
17
17
|
|
|
18
|
-
export { DEFAULT_ERROR_MESSAGES, DEFAULT_FLAVOR, DEFAULT_SEARCH_OPERATION, DEFAULT_THEME, OPERATOR_ARITY as MONO_FILTER_OPERATOR_ARITY, DEFAULT_TEXTS as MONO_FILTER_TEXTS, MonoSourceSearch, SEARCH_FIELDS_KEYS, applyFlavor, applyTheme, arrayToODataString, arrayToTree, buildChartApply, buildChartOdataRequest, buildGroups, collectGroupPaths, composeApply, monoChart as controlMonoChart, monoChart, monoDataDropdown as controlMonoDataDropdown, monoDataDropdown, monoFilterBuilder as controlMonoFilterBuilder, monoFilterBuilder, monoForm as controlMonoForm, monoForm, monoModal as controlMonoModal, monoModal, monoDataGrid as controlMonoTable, monoDataGrid, controlMonoTooltip, createFlavorClass, createMonoTooltip, createMonoUI, createThemeClass, describeError, destroyAllMonoTooltips, errorStatus, flattenLeaves, flavorPresets, flavors, getAllFlavors, getAllThemes, getCurrentFlavor, getCurrentTheme, getFieldValue, getFlavorData, getMonoSkeletonStatus, getMonoTooltipGlobal, getMonoUI, getMonoUIStatus, getThemeData, isFoldableSearch, isGroupNode, isMonoSsrApp, isPath, isValidFlavor, isValidTheme, mergePatch, mergeSearchFields, monoArraySource, operatorsFor as monoFilterOperatorsFor, monoTooltip, normalizeError, odataStringToArray, parseFieldPath, parseSearchValue, plainSearchFields, readSearchField, resetFlavor, resetMonoSkeleton, resetMonoTooltip, resetMonoUI, resetTheme, resolveErrorMessages, resolveMaybeReactive, resolveSearchFields, searchRemoteFilter, searchRowPredicate, setErrorMessages, setFieldValue, themePresets, themes, toODataClause, toODataSelector, treeToArray };
|
|
18
|
+
export { DEFAULT_ERROR_MESSAGES, DEFAULT_FLAVOR, DEFAULT_SEARCH_OPERATION, DEFAULT_THEME, OPERATOR_ARITY as MONO_FILTER_OPERATOR_ARITY, DEFAULT_TEXTS as MONO_FILTER_TEXTS, MonoSourceSearch, SEARCH_FIELDS_KEYS, applyFlavor, applyMonoSizeAttributes, applyTheme, arrayToODataString, arrayToTree, buildChartApply, buildChartOdataRequest, buildGroups, collectGroupPaths, composeApply, monoChart as controlMonoChart, monoChart, monoDataDropdown as controlMonoDataDropdown, monoDataDropdown, monoFilterBuilder as controlMonoFilterBuilder, monoFilterBuilder, monoForm as controlMonoForm, monoForm, monoModal as controlMonoModal, monoModal, monoDataGrid as controlMonoTable, monoDataGrid, controlMonoTooltip, createFlavorClass, createMonoTooltip, createMonoUI, createThemeClass, describeError, destroyAllMonoTooltips, errorStatus, flattenLeaves, flavorPresets, flavors, getAllFlavors, getAllThemes, getCurrentFlavor, getCurrentTheme, getFieldValue, getFlavorData, getMonoSkeletonStatus, getMonoTooltipGlobal, getMonoUI, getMonoUIStatus, getThemeData, isFoldableSearch, isGroupNode, isMonoSsrApp, isPath, isValidFlavor, isValidTheme, mergePatch, mergeSearchFields, monoArraySource, operatorsFor as monoFilterOperatorsFor, monoTooltip, normalizeError, odataStringToArray, parseFieldPath, parseSearchValue, plainSearchFields, readSearchField, resetFlavor, resetMonoSkeleton, resetMonoTooltip, resetMonoUI, resetTheme, resolveErrorMessages, resolveMaybeReactive, resolveSearchFields, searchRemoteFilter, searchRowPredicate, setErrorMessages, setFieldValue, startMonoSizeAttributes, stopMonoSizeAttributes, themePresets, themes, toODataClause, toODataSelector, treeToArray };
|