@alfadocs/ui-kit-debug 1.0.0 → 1.2.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/_chunks/{actions-cell-renderer-DaL80uqL.js → actions-cell-renderer-ClGCSQnA.js} +600 -565
- package/dist/_chunks/actions-cell-renderer-ClGCSQnA.js.map +1 -0
- package/dist/_chunks/{ai-consent-banner-BXD7W6FI.js → ai-consent-banner-DKgFfSzc.js} +2 -2
- package/dist/_chunks/{ai-consent-banner-BXD7W6FI.js.map → ai-consent-banner-DKgFfSzc.js.map} +1 -1
- package/dist/_chunks/{alert-Cxaqd-QO.js → alert-DS22ha1n.js} +103 -98
- package/dist/_chunks/alert-DS22ha1n.js.map +1 -0
- package/dist/_chunks/{annotation-marker-qt5R9WZX.js → annotation-marker-CsUJGZjQ.js} +7 -5
- package/dist/_chunks/annotation-marker-CsUJGZjQ.js.map +1 -0
- package/dist/_chunks/{audio-recorder-BjnB7V8n.js → audio-recorder-sRsGS-0V.js} +2 -2
- package/dist/_chunks/{audio-recorder-BjnB7V8n.js.map → audio-recorder-sRsGS-0V.js.map} +1 -1
- package/dist/_chunks/{booking-DSOK-bnR.js → booking-D8fCzcUd.js} +2 -2
- package/dist/_chunks/{booking-DSOK-bnR.js.map → booking-D8fCzcUd.js.map} +1 -1
- package/dist/_chunks/{care-plan-card-BrwhyIJI.js → care-plan-card-DjjVnBYz.js} +2 -2
- package/dist/_chunks/{care-plan-card-BrwhyIJI.js.map → care-plan-card-DjjVnBYz.js.map} +1 -1
- package/dist/_chunks/{care-plan-entry-card-DWEdCQM3.js → care-plan-entry-card-BVhpvd-P.js} +2 -2
- package/dist/_chunks/{care-plan-entry-card-DWEdCQM3.js.map → care-plan-entry-card-BVhpvd-P.js.map} +1 -1
- package/dist/_chunks/{collapsible-BrnRiCC6.js → collapsible-CGL9ontS.js} +65 -61
- package/dist/_chunks/collapsible-CGL9ontS.js.map +1 -0
- package/dist/_chunks/{document-preview-DXsCEj4U.js → document-preview-DAczwybt.js} +2 -2
- package/dist/_chunks/{document-preview-DXsCEj4U.js.map → document-preview-DAczwybt.js.map} +1 -1
- package/dist/_chunks/{document-scanner-cS_ispQs.js → document-scanner-BRYIc3A-.js} +2 -2
- package/dist/_chunks/{document-scanner-cS_ispQs.js.map → document-scanner-BRYIc3A-.js.map} +1 -1
- package/dist/_chunks/{entity-summary-BILN4wEG.js → entity-summary-BS6n7Iah.js} +2 -2
- package/dist/_chunks/{entity-summary-BILN4wEG.js.map → entity-summary-BS6n7Iah.js.map} +1 -1
- package/dist/_chunks/{face-scheme-CjQAHvSP.js → face-scheme-Cou2efl7.js} +2 -2
- package/dist/_chunks/{face-scheme-CjQAHvSP.js.map → face-scheme-Cou2efl7.js.map} +1 -1
- package/dist/_chunks/{file-manager-B9LZzT5E.js → file-manager-CNSLiuLo.js} +2 -2
- package/dist/_chunks/{file-manager-B9LZzT5E.js.map → file-manager-CNSLiuLo.js.map} +1 -1
- package/dist/_chunks/{freemium-paywall-Dr2342_S.js → freemium-paywall-DsT7MaLd.js} +2 -2
- package/dist/_chunks/{freemium-paywall-Dr2342_S.js.map → freemium-paywall-DsT7MaLd.js.map} +1 -1
- package/dist/_chunks/link-cell-renderer-_DlEZHLI.js +772 -0
- package/dist/_chunks/link-cell-renderer-_DlEZHLI.js.map +1 -0
- package/dist/_chunks/{marketplace-app-shell-pCHBp8bo.js → marketplace-app-shell-DQC9Gpm0.js} +2 -2
- package/dist/_chunks/{marketplace-app-shell-pCHBp8bo.js.map → marketplace-app-shell-DQC9Gpm0.js.map} +1 -1
- package/dist/_chunks/{muscle-scheme-kgCX5qfO.js → muscle-scheme-yfzP_xoJ.js} +2 -2
- package/dist/_chunks/{muscle-scheme-kgCX5qfO.js.map → muscle-scheme-yfzP_xoJ.js.map} +1 -1
- package/dist/_chunks/notes-panel-CCz0J140.js +370 -0
- package/dist/_chunks/notes-panel-CCz0J140.js.map +1 -0
- package/dist/_chunks/{patient-details-UmNcxL0c.js → patient-details-l7pnsUq9.js} +2 -2
- package/dist/_chunks/{patient-details-UmNcxL0c.js.map → patient-details-l7pnsUq9.js.map} +1 -1
- package/dist/_chunks/{patient-search-vtRTSdf6.js → patient-search-H54Utav2.js} +2 -2
- package/dist/_chunks/{patient-search-vtRTSdf6.js.map → patient-search-H54Utav2.js.map} +1 -1
- package/dist/_chunks/{patient-table-QEVsFvwq.js → patient-table-DXk0wW8Q.js} +243 -239
- package/dist/_chunks/patient-table-DXk0wW8Q.js.map +1 -0
- package/dist/_chunks/payment-automation-upsell-C4LIw1iQ.js +305 -0
- package/dist/_chunks/payment-automation-upsell-C4LIw1iQ.js.map +1 -0
- package/dist/_chunks/{payment-form-BoGxEmGn.js → payment-form-CyKT20xZ.js} +2 -2
- package/dist/_chunks/{payment-form-BoGxEmGn.js.map → payment-form-CyKT20xZ.js.map} +1 -1
- package/dist/_chunks/{payment-request-card-CygO1anM.js → payment-request-card-CN30J6yM.js} +107 -138
- package/dist/_chunks/payment-request-card-CN30J6yM.js.map +1 -0
- package/dist/_chunks/{pdf-viewer-CcOuR2wj.js → pdf-viewer-DHg8SfUI.js} +2 -2
- package/dist/_chunks/{pdf-viewer-CcOuR2wj.js.map → pdf-viewer-DHg8SfUI.js.map} +1 -1
- package/dist/_chunks/{practice-results-yKbwIxqa.js → practice-results-qvJRkvLn.js} +2 -2
- package/dist/_chunks/{practice-results-yKbwIxqa.js.map → practice-results-qvJRkvLn.js.map} +1 -1
- package/dist/_chunks/receipt-euro-C6k4Gzhr.js +36 -0
- package/dist/_chunks/receipt-euro-C6k4Gzhr.js.map +1 -0
- package/dist/_chunks/{reviews-panel-DmOjvmyH.js → reviews-panel-BfUJhx3m.js} +2 -2
- package/dist/_chunks/{reviews-panel-DmOjvmyH.js.map → reviews-panel-BfUJhx3m.js.map} +1 -1
- package/dist/_chunks/{sign-document-cH9CboWB.js → sign-document-D70TEUw9.js} +2 -2
- package/dist/_chunks/{sign-document-cH9CboWB.js.map → sign-document-D70TEUw9.js.map} +1 -1
- package/dist/_chunks/{signature-request-BzXTV_RH.js → signature-request-BlNCXpRN.js} +2 -2
- package/dist/_chunks/{signature-request-BzXTV_RH.js.map → signature-request-BlNCXpRN.js.map} +1 -1
- package/dist/_chunks/sparkline-DJtZBe7O.js +501 -0
- package/dist/_chunks/sparkline-DJtZBe7O.js.map +1 -0
- package/dist/_chunks/{warning-stack-DKeAfj5M.js → warning-stack-IVf0oxh2.js} +2 -2
- package/dist/_chunks/{warning-stack-DKeAfj5M.js.map → warning-stack-IVf0oxh2.js.map} +1 -1
- package/dist/_chunks/{workflow-map-SIfAhmWz.js → workflow-map-ByyBYj6Y.js} +2 -2
- package/dist/_chunks/{workflow-map-SIfAhmWz.js.map → workflow-map-ByyBYj6Y.js.map} +1 -1
- package/dist/agent-catalog.json +237 -7
- package/dist/agent-i18n/en.json +17 -5
- package/dist/components/ai-consent-banner/index.js +1 -1
- package/dist/components/alert/alert.d.ts +20 -0
- package/dist/components/alert/alert.d.ts.map +1 -1
- package/dist/components/alert/index.d.ts +1 -1
- package/dist/components/alert/index.d.ts.map +1 -1
- package/dist/components/alert/index.js +1 -1
- package/dist/components/annotation-marker/annotation-marker.d.ts.map +1 -1
- package/dist/components/annotation-marker/index.js +1 -1
- package/dist/components/audio-recorder/index.js +1 -1
- package/dist/components/booking/index.js +1 -1
- package/dist/components/care-plan-card/index.js +1 -1
- package/dist/components/care-plan-entry-card/index.js +1 -1
- package/dist/components/collapsible/collapsible.d.ts.map +1 -1
- package/dist/components/collapsible/index.js +1 -1
- package/dist/components/data-table/data-table.d.ts.map +1 -1
- package/dist/components/data-table/filters/select-filter.d.ts +6 -0
- package/dist/components/data-table/filters/select-filter.d.ts.map +1 -1
- package/dist/components/data-table/hooks/use-presentational-aria-fix.d.ts +19 -0
- package/dist/components/data-table/hooks/use-presentational-aria-fix.d.ts.map +1 -0
- package/dist/components/data-table/index.js +2 -2
- package/dist/components/document-preview/index.js +1 -1
- package/dist/components/document-scanner/index.js +1 -1
- package/dist/components/entity-summary/index.js +1 -1
- package/dist/components/face-scheme/index.js +1 -1
- package/dist/components/file-manager/index.js +1 -1
- package/dist/components/freemium-paywall/index.js +1 -1
- package/dist/components/muscle-scheme/index.js +1 -1
- package/dist/components/notes-panel/index.js +1 -1
- package/dist/components/notes-panel/notes-panel.agent.d.ts.map +1 -1
- package/dist/components/notes-panel/notes-panel.d.ts +45 -2
- package/dist/components/notes-panel/notes-panel.d.ts.map +1 -1
- package/dist/components/patient-details/index.js +1 -1
- package/dist/components/patient-search/index.js +1 -1
- package/dist/components/patient-table/columns.d.ts.map +1 -1
- package/dist/components/patient-table/index.js +1 -1
- package/dist/components/payment-card/index.js +1 -1
- package/dist/components/payment-form/index.js +1 -1
- package/dist/components/pdf-viewer/index.js +1 -1
- package/dist/components/practice-results/index.js +1 -1
- package/dist/components/reviews-panel/index.js +1 -1
- package/dist/components/sign-document/index.js +1 -1
- package/dist/components/skeleton-scheme/index.js +1 -1
- package/dist/components/sparkline/index.d.ts +1 -1
- package/dist/components/sparkline/index.d.ts.map +1 -1
- package/dist/components/sparkline/index.js +1 -1
- package/dist/components/sparkline/sparkline.agent.d.ts.map +1 -1
- package/dist/components/sparkline/sparkline.d.ts +60 -3
- package/dist/components/sparkline/sparkline.d.ts.map +1 -1
- package/dist/components/warning-stack/index.js +1 -1
- package/dist/components/workflow/index.js +1 -1
- package/dist/host-compat.css +13 -1
- package/dist/i18n/locales/ar.d.ts +3 -0
- package/dist/i18n/locales/ar.d.ts.map +1 -1
- package/dist/i18n/locales/ar.js +3 -0
- package/dist/i18n/locales/ar.js.map +1 -1
- package/dist/i18n/locales/de.d.ts +3 -0
- package/dist/i18n/locales/de.d.ts.map +1 -1
- package/dist/i18n/locales/de.js +3 -0
- package/dist/i18n/locales/de.js.map +1 -1
- package/dist/i18n/locales/el.d.ts +3 -0
- package/dist/i18n/locales/el.d.ts.map +1 -1
- package/dist/i18n/locales/el.js +3 -0
- package/dist/i18n/locales/el.js.map +1 -1
- package/dist/i18n/locales/en.d.ts +3 -0
- package/dist/i18n/locales/en.d.ts.map +1 -1
- package/dist/i18n/locales/en.js +3 -0
- package/dist/i18n/locales/en.js.map +1 -1
- package/dist/i18n/locales/es.d.ts +3 -0
- package/dist/i18n/locales/es.d.ts.map +1 -1
- package/dist/i18n/locales/es.js +3 -0
- package/dist/i18n/locales/es.js.map +1 -1
- package/dist/i18n/locales/fr.d.ts +3 -0
- package/dist/i18n/locales/fr.d.ts.map +1 -1
- package/dist/i18n/locales/fr.js +3 -0
- package/dist/i18n/locales/fr.js.map +1 -1
- package/dist/i18n/locales/hi.d.ts +3 -0
- package/dist/i18n/locales/hi.d.ts.map +1 -1
- package/dist/i18n/locales/hi.js +3 -0
- package/dist/i18n/locales/hi.js.map +1 -1
- package/dist/i18n/locales/it.d.ts +3 -0
- package/dist/i18n/locales/it.d.ts.map +1 -1
- package/dist/i18n/locales/it.js +3 -0
- package/dist/i18n/locales/it.js.map +1 -1
- package/dist/i18n/locales/ja.d.ts +3 -0
- package/dist/i18n/locales/ja.d.ts.map +1 -1
- package/dist/i18n/locales/ja.js +3 -0
- package/dist/i18n/locales/ja.js.map +1 -1
- package/dist/i18n/locales/nl.d.ts +3 -0
- package/dist/i18n/locales/nl.d.ts.map +1 -1
- package/dist/i18n/locales/nl.js +3 -0
- package/dist/i18n/locales/nl.js.map +1 -1
- package/dist/i18n/locales/pl.d.ts +3 -0
- package/dist/i18n/locales/pl.d.ts.map +1 -1
- package/dist/i18n/locales/pl.js +3 -0
- package/dist/i18n/locales/pl.js.map +1 -1
- package/dist/i18n/locales/pt.d.ts +3 -0
- package/dist/i18n/locales/pt.d.ts.map +1 -1
- package/dist/i18n/locales/pt.js +3 -0
- package/dist/i18n/locales/pt.js.map +1 -1
- package/dist/i18n/locales/ro.d.ts +3 -0
- package/dist/i18n/locales/ro.d.ts.map +1 -1
- package/dist/i18n/locales/ro.js +3 -0
- package/dist/i18n/locales/ro.js.map +1 -1
- package/dist/i18n/locales/ru.d.ts +3 -0
- package/dist/i18n/locales/ru.d.ts.map +1 -1
- package/dist/i18n/locales/ru.js +3 -0
- package/dist/i18n/locales/ru.js.map +1 -1
- package/dist/i18n/locales/sq.d.ts +3 -0
- package/dist/i18n/locales/sq.d.ts.map +1 -1
- package/dist/i18n/locales/sq.js +3 -0
- package/dist/i18n/locales/sq.js.map +1 -1
- package/dist/i18n/locales/sv.d.ts +3 -0
- package/dist/i18n/locales/sv.d.ts.map +1 -1
- package/dist/i18n/locales/sv.js +3 -0
- package/dist/i18n/locales/sv.js.map +1 -1
- package/dist/i18n/locales/tr.d.ts +3 -0
- package/dist/i18n/locales/tr.d.ts.map +1 -1
- package/dist/i18n/locales/tr.js +3 -0
- package/dist/i18n/locales/tr.js.map +1 -1
- package/dist/i18n/locales/zh.d.ts +3 -0
- package/dist/i18n/locales/zh.d.ts.map +1 -1
- package/dist/i18n/locales/zh.js +3 -0
- package/dist/i18n/locales/zh.js.map +1 -1
- package/dist/index.js +974 -1268
- package/dist/index.js.map +1 -1
- package/dist/locales/ar.json +3 -0
- package/dist/locales/de.json +3 -0
- package/dist/locales/el.json +3 -0
- package/dist/locales/en.json +3 -0
- package/dist/locales/es.json +3 -0
- package/dist/locales/fr.json +3 -0
- package/dist/locales/hi.json +3 -0
- package/dist/locales/it.json +3 -0
- package/dist/locales/ja.json +3 -0
- package/dist/locales/nl.json +3 -0
- package/dist/locales/pl.json +3 -0
- package/dist/locales/pt.json +3 -0
- package/dist/locales/ro.json +3 -0
- package/dist/locales/ru.json +3 -0
- package/dist/locales/sq.json +3 -0
- package/dist/locales/sv.json +3 -0
- package/dist/locales/tr.json +3 -0
- package/dist/locales/zh.json +3 -0
- package/dist/patterns/marketplace-app-shell/index.js +1 -1
- package/dist/patterns/payment-automation-upsell/index.js +5 -0
- package/dist/patterns/payment-automation-upsell/index.js.map +1 -0
- package/dist/patterns/signature-request/index.js +1 -1
- package/dist/tokens.css +1 -1
- package/package.json +5 -1
- package/dist/_chunks/actions-cell-renderer-DaL80uqL.js.map +0 -1
- package/dist/_chunks/alert-Cxaqd-QO.js.map +0 -1
- package/dist/_chunks/annotation-marker-qt5R9WZX.js.map +0 -1
- package/dist/_chunks/collapsible-BrnRiCC6.js.map +0 -1
- package/dist/_chunks/link-cell-renderer-Bt-mXeQY.js +0 -728
- package/dist/_chunks/link-cell-renderer-Bt-mXeQY.js.map +0 -1
- package/dist/_chunks/notes-panel-CTcOLLVo.js +0 -324
- package/dist/_chunks/notes-panel-CTcOLLVo.js.map +0 -1
- package/dist/_chunks/patient-table-QEVsFvwq.js.map +0 -1
- package/dist/_chunks/payment-request-card-CygO1anM.js.map +0 -1
- package/dist/_chunks/sparkline-DcXqRZoq.js +0 -283
- package/dist/_chunks/sparkline-DcXqRZoq.js.map +0 -1
|
@@ -1,728 +0,0 @@
|
|
|
1
|
-
import { jsx as u, jsxs as k } from "react/jsx-runtime";
|
|
2
|
-
import { useState as w, useEffect as R, useMemo as z } from "react";
|
|
3
|
-
import { useGridFilter as q } from "ag-grid-react";
|
|
4
|
-
import { D as H } from "./date-range-picker-pEG3Ln3i.js";
|
|
5
|
-
import { useTranslation as O } from "react-i18next";
|
|
6
|
-
import { C as Z } from "./checkbox-BuZ1u__2.js";
|
|
7
|
-
import { B as D } from "./button-CPGiR_bH.js";
|
|
8
|
-
import { M as J } from "./multi-select-CC52Qws6.js";
|
|
9
|
-
import { S as K } from "./scroll-area-BZOvUhwQ.js";
|
|
10
|
-
import { A as U } from "./autocomplete-BrONKN8l.js";
|
|
11
|
-
import { N as E } from "./number-input-DjWzmlEY.js";
|
|
12
|
-
import { S as Q } from "./select-BW5ecXlX.js";
|
|
13
|
-
import { B as W } from "./badge-DCOqV9mI.js";
|
|
14
|
-
import { A as $ } from "./avatar-BNQNhoyL.js";
|
|
15
|
-
import { T as j } from "./tag-3wgkwwDB.js";
|
|
16
|
-
import { T as X } from "./tooltip-DvmfrNvB.js";
|
|
17
|
-
import { T as V } from "./timestamp-BV2lC-wV.js";
|
|
18
|
-
function L(t) {
|
|
19
|
-
return t ? t.toISOString().slice(0, 10) : null;
|
|
20
|
-
}
|
|
21
|
-
function S(t) {
|
|
22
|
-
if (!t) return;
|
|
23
|
-
const e = new Date(t);
|
|
24
|
-
return Number.isNaN(e.getTime()) ? void 0 : e;
|
|
25
|
-
}
|
|
26
|
-
function ke(t) {
|
|
27
|
-
var c;
|
|
28
|
-
const { model: e, onModelChange: n, getValue: a, doesRowPassOtherFilter: l } = t, i = ((c = t.colDef) == null ? void 0 : c.filterParams) ?? {}, [r, p] = w(() => ({
|
|
29
|
-
from: S(e == null ? void 0 : e.dateFrom),
|
|
30
|
-
to: S(e == null ? void 0 : e.dateTo)
|
|
31
|
-
}));
|
|
32
|
-
R(() => {
|
|
33
|
-
p({
|
|
34
|
-
from: S(e == null ? void 0 : e.dateFrom),
|
|
35
|
-
to: S(e == null ? void 0 : e.dateTo)
|
|
36
|
-
});
|
|
37
|
-
}, [e == null ? void 0 : e.dateFrom, e == null ? void 0 : e.dateTo]), q({
|
|
38
|
-
doesFilterPass: (s) => {
|
|
39
|
-
const m = S(e == null ? void 0 : e.dateFrom), y = S(e == null ? void 0 : e.dateTo);
|
|
40
|
-
if (!m && !y) return !0;
|
|
41
|
-
const h = a(s.node);
|
|
42
|
-
if (!h) return !1;
|
|
43
|
-
const b = h instanceof Date ? h : S(String(h));
|
|
44
|
-
return !(!b || m && b < m || y && b > y);
|
|
45
|
-
}
|
|
46
|
-
});
|
|
47
|
-
function f(s) {
|
|
48
|
-
if (p(s), !s.from && !s.to) {
|
|
49
|
-
n(null);
|
|
50
|
-
return;
|
|
51
|
-
}
|
|
52
|
-
n({
|
|
53
|
-
type: "inRange",
|
|
54
|
-
dateFrom: L(s.from),
|
|
55
|
-
dateTo: L(s.to)
|
|
56
|
-
});
|
|
57
|
-
}
|
|
58
|
-
return /* @__PURE__ */ u(
|
|
59
|
-
"div",
|
|
60
|
-
{
|
|
61
|
-
"data-component": "date-range-filter",
|
|
62
|
-
className: "ds:p-[var(--spacing-sm)] ds:min-w-[280px]",
|
|
63
|
-
children: /* @__PURE__ */ u(
|
|
64
|
-
H,
|
|
65
|
-
{
|
|
66
|
-
value: r,
|
|
67
|
-
onChange: f,
|
|
68
|
-
commitMode: i.commitMode,
|
|
69
|
-
size: "sm"
|
|
70
|
-
}
|
|
71
|
-
)
|
|
72
|
-
}
|
|
73
|
-
);
|
|
74
|
-
}
|
|
75
|
-
function we(t) {
|
|
76
|
-
var f, c;
|
|
77
|
-
const { model: e, onModelChange: n, column: a } = t, l = ((c = (f = a == null ? void 0 : a.getColDef) == null ? void 0 : f.call(a)) == null ? void 0 : c.filterParams) ?? {}, [i, r] = w(() => ({
|
|
78
|
-
from: S(e == null ? void 0 : e.dateFrom),
|
|
79
|
-
to: S(e == null ? void 0 : e.dateTo)
|
|
80
|
-
}));
|
|
81
|
-
R(() => {
|
|
82
|
-
r({
|
|
83
|
-
from: S(e == null ? void 0 : e.dateFrom),
|
|
84
|
-
to: S(e == null ? void 0 : e.dateTo)
|
|
85
|
-
});
|
|
86
|
-
}, [e == null ? void 0 : e.dateFrom, e == null ? void 0 : e.dateTo]);
|
|
87
|
-
function p(s) {
|
|
88
|
-
if (r(s), !s.from && !s.to) {
|
|
89
|
-
n(null);
|
|
90
|
-
return;
|
|
91
|
-
}
|
|
92
|
-
n({
|
|
93
|
-
type: "inRange",
|
|
94
|
-
dateFrom: L(s.from),
|
|
95
|
-
dateTo: L(s.to)
|
|
96
|
-
});
|
|
97
|
-
}
|
|
98
|
-
return /* @__PURE__ */ u("div", { "data-component": "date-range-floating-filter", className: "ds:w-full", children: /* @__PURE__ */ u(
|
|
99
|
-
H,
|
|
100
|
-
{
|
|
101
|
-
value: i,
|
|
102
|
-
onChange: p,
|
|
103
|
-
commitMode: l.commitMode,
|
|
104
|
-
size: "sm",
|
|
105
|
-
placeholder: l.placeholder
|
|
106
|
-
}
|
|
107
|
-
) });
|
|
108
|
-
}
|
|
109
|
-
function P(t) {
|
|
110
|
-
return typeof t == "number" ? `n:${t}` : `s:${t}`;
|
|
111
|
-
}
|
|
112
|
-
function ze(t) {
|
|
113
|
-
const { model: e, onModelChange: n, getValue: a, api: l, column: i, options: r, placeholder: p } = t, { t: f } = O("ui"), c = z(() => {
|
|
114
|
-
if (r && r.length > 0) return r;
|
|
115
|
-
if (!l || !i) return [];
|
|
116
|
-
const v = /* @__PURE__ */ new Map();
|
|
117
|
-
return l.forEachNode((o) => {
|
|
118
|
-
const d = a(o);
|
|
119
|
-
if (d == null) return;
|
|
120
|
-
const g = typeof d == "string" || typeof d == "number" ? d : String(d), C = P(g);
|
|
121
|
-
v.has(C) || v.set(C, { value: g, label: String(g) });
|
|
122
|
-
}), Array.from(v.values()).sort(
|
|
123
|
-
(o, d) => String(o.label).localeCompare(String(d.label))
|
|
124
|
-
);
|
|
125
|
-
}, [r, l, i, a]), s = z(() => {
|
|
126
|
-
const v = /* @__PURE__ */ new Set(), o = (e == null ? void 0 : e.values) ?? [];
|
|
127
|
-
for (const d of o) v.add(P(d));
|
|
128
|
-
return v;
|
|
129
|
-
}, [e]), [m, y] = w(s);
|
|
130
|
-
R(() => {
|
|
131
|
-
y(s);
|
|
132
|
-
}, [s]), q({
|
|
133
|
-
doesFilterPass: (v) => {
|
|
134
|
-
const o = e == null ? void 0 : e.values;
|
|
135
|
-
if (!o || o.length === 0) return !0;
|
|
136
|
-
const d = a(v.node);
|
|
137
|
-
if (d == null) return !1;
|
|
138
|
-
const g = typeof d == "string" || typeof d == "number" ? d : String(d), C = P(g);
|
|
139
|
-
return o.some((N) => P(N) === C);
|
|
140
|
-
}
|
|
141
|
-
});
|
|
142
|
-
function h(v) {
|
|
143
|
-
y((o) => {
|
|
144
|
-
const d = new Set(o);
|
|
145
|
-
return d.has(v) ? d.delete(v) : d.add(v), d;
|
|
146
|
-
});
|
|
147
|
-
}
|
|
148
|
-
function b() {
|
|
149
|
-
if (m.size === 0) {
|
|
150
|
-
n(null);
|
|
151
|
-
return;
|
|
152
|
-
}
|
|
153
|
-
const v = [];
|
|
154
|
-
for (const o of c)
|
|
155
|
-
m.has(P(o.value)) && v.push(o.value);
|
|
156
|
-
n({ type: "set", values: v });
|
|
157
|
-
}
|
|
158
|
-
function F() {
|
|
159
|
-
y(/* @__PURE__ */ new Set()), n(null);
|
|
160
|
-
}
|
|
161
|
-
const T = p ?? f("dataTable.selectFilter.all");
|
|
162
|
-
return /* @__PURE__ */ k(
|
|
163
|
-
"div",
|
|
164
|
-
{
|
|
165
|
-
"data-component": "select-filter",
|
|
166
|
-
className: "ds:flex ds:flex-col ds:gap-[var(--spacing-sm)] ds:p-[var(--spacing-sm)] ds:min-w-[200px] ds:max-w-[260px]",
|
|
167
|
-
children: [
|
|
168
|
-
/* @__PURE__ */ u(K, { orientation: "vertical", className: "ds:max-h-[240px]", children: /* @__PURE__ */ u(
|
|
169
|
-
"div",
|
|
170
|
-
{
|
|
171
|
-
role: "group",
|
|
172
|
-
"aria-label": T,
|
|
173
|
-
className: "ds:flex ds:flex-col ds:gap-[var(--spacing-xs)]",
|
|
174
|
-
children: c.length === 0 ? /* @__PURE__ */ u("p", { className: "ds:text-[length:var(--font-size-sm)] ds:text-[var(--muted-foreground)] ds:py-[var(--spacing-xs)]", children: f("dataTable.agGrid.noRowsToShow") }) : c.map((v) => {
|
|
175
|
-
const o = P(v.value);
|
|
176
|
-
return /* @__PURE__ */ u(
|
|
177
|
-
Z,
|
|
178
|
-
{
|
|
179
|
-
size: "sm",
|
|
180
|
-
label: v.label,
|
|
181
|
-
checked: m.has(o),
|
|
182
|
-
onCheckedChange: () => h(o)
|
|
183
|
-
},
|
|
184
|
-
o
|
|
185
|
-
);
|
|
186
|
-
})
|
|
187
|
-
}
|
|
188
|
-
) }),
|
|
189
|
-
/* @__PURE__ */ k("div", { className: "ds:flex ds:items-center ds:justify-end ds:gap-[var(--spacing-xs)] ds:pt-[var(--spacing-xs)] ds:border-t ds:border-[var(--border)]", children: [
|
|
190
|
-
/* @__PURE__ */ u(D, { intent: "ghost", size: "sm", onClick: F, type: "button", children: f("dataTable.selectFilter.clear") }),
|
|
191
|
-
/* @__PURE__ */ u(D, { intent: "primary", size: "sm", onClick: b, type: "button", children: f("dataTable.selectFilter.apply") })
|
|
192
|
-
] })
|
|
193
|
-
]
|
|
194
|
-
}
|
|
195
|
-
);
|
|
196
|
-
}
|
|
197
|
-
function Re(t) {
|
|
198
|
-
var y;
|
|
199
|
-
const { model: e, onModelChange: n, column: a } = t, l = (y = a == null ? void 0 : a.getColDef) == null ? void 0 : y.call(a), i = (l == null ? void 0 : l.filterParams) ?? {}, r = i.options ?? [], p = i.placeholder ?? (typeof (l == null ? void 0 : l.headerName) == "string" ? l.headerName : void 0), f = z(() => {
|
|
200
|
-
const h = /* @__PURE__ */ new Map();
|
|
201
|
-
for (const b of r) h.set(String(b.value), b.value);
|
|
202
|
-
return h;
|
|
203
|
-
}, [r]), c = z(
|
|
204
|
-
() => r.map((h) => ({
|
|
205
|
-
value: String(h.value),
|
|
206
|
-
label: h.label
|
|
207
|
-
})),
|
|
208
|
-
[r]
|
|
209
|
-
), s = z(
|
|
210
|
-
() => ((e == null ? void 0 : e.values) ?? []).map((h) => String(h)),
|
|
211
|
-
[e]
|
|
212
|
-
);
|
|
213
|
-
function m(h) {
|
|
214
|
-
if (h.length === 0) {
|
|
215
|
-
n(null);
|
|
216
|
-
return;
|
|
217
|
-
}
|
|
218
|
-
const b = [];
|
|
219
|
-
for (const F of h) {
|
|
220
|
-
const T = f.get(F);
|
|
221
|
-
T !== void 0 && b.push(T);
|
|
222
|
-
}
|
|
223
|
-
n({ type: "set", values: b });
|
|
224
|
-
}
|
|
225
|
-
return /* @__PURE__ */ u("div", { "data-component": "select-floating-filter", className: "ds:w-full", children: /* @__PURE__ */ u(
|
|
226
|
-
J,
|
|
227
|
-
{
|
|
228
|
-
size: "sm",
|
|
229
|
-
options: c,
|
|
230
|
-
value: s,
|
|
231
|
-
onChange: m,
|
|
232
|
-
placeholder: i.placeholder,
|
|
233
|
-
"aria-label": p,
|
|
234
|
-
allowClear: !0
|
|
235
|
-
}
|
|
236
|
-
) });
|
|
237
|
-
}
|
|
238
|
-
function M(t) {
|
|
239
|
-
return t.trim().toLocaleLowerCase();
|
|
240
|
-
}
|
|
241
|
-
function Oe(t) {
|
|
242
|
-
const {
|
|
243
|
-
model: e,
|
|
244
|
-
onModelChange: n,
|
|
245
|
-
getValue: a,
|
|
246
|
-
api: l,
|
|
247
|
-
column: i,
|
|
248
|
-
options: r,
|
|
249
|
-
loadOptions: p,
|
|
250
|
-
placeholder: f
|
|
251
|
-
} = t, { t: c } = O("ui"), s = z(() => {
|
|
252
|
-
if (r && r.length > 0) return r;
|
|
253
|
-
if (!l || !i) return [];
|
|
254
|
-
const o = /* @__PURE__ */ new Map();
|
|
255
|
-
return l.forEachNode((d) => {
|
|
256
|
-
const g = a(d);
|
|
257
|
-
if (g == null) return;
|
|
258
|
-
const C = typeof g == "string" ? g : String(g);
|
|
259
|
-
o.has(C) || o.set(C, { value: C, label: C });
|
|
260
|
-
}), Array.from(o.values()).sort(
|
|
261
|
-
(d, g) => d.label.localeCompare(g.label)
|
|
262
|
-
);
|
|
263
|
-
}, [r, l, i, a]), m = z(() => async (o, d) => {
|
|
264
|
-
if (p)
|
|
265
|
-
return (await p(o, d)).map((x) => ({ value: x.value, label: x.label }));
|
|
266
|
-
const g = M(o);
|
|
267
|
-
return (g ? s.filter((N) => M(N.label).includes(g)) : s).slice(0, 50).map((N) => ({ value: N.value, label: N.label }));
|
|
268
|
-
}, [p, s]), [y, h] = w((e == null ? void 0 : e.value) ?? "");
|
|
269
|
-
R(() => {
|
|
270
|
-
h((e == null ? void 0 : e.value) ?? "");
|
|
271
|
-
}, [e == null ? void 0 : e.value]), q({
|
|
272
|
-
doesFilterPass: (o) => {
|
|
273
|
-
const d = e == null ? void 0 : e.value;
|
|
274
|
-
if (!d) return !0;
|
|
275
|
-
const g = a(o.node);
|
|
276
|
-
if (g == null) return !1;
|
|
277
|
-
const C = typeof g == "string" ? g : String(g);
|
|
278
|
-
return M(C) === M(d);
|
|
279
|
-
}
|
|
280
|
-
});
|
|
281
|
-
function b(o) {
|
|
282
|
-
h(o.label), n({ type: "equals", value: o.value });
|
|
283
|
-
}
|
|
284
|
-
function F(o) {
|
|
285
|
-
h(o), o === "" && e && n(null);
|
|
286
|
-
}
|
|
287
|
-
function T() {
|
|
288
|
-
h(""), n(null);
|
|
289
|
-
}
|
|
290
|
-
const v = f ?? c("dataTable.typeaheadFilter.placeholder");
|
|
291
|
-
return /* @__PURE__ */ k(
|
|
292
|
-
"div",
|
|
293
|
-
{
|
|
294
|
-
"data-component": "typeahead-filter",
|
|
295
|
-
className: "ds:flex ds:flex-col ds:gap-[var(--spacing-sm)] ds:p-[var(--spacing-sm)] ds:min-w-[240px]",
|
|
296
|
-
children: [
|
|
297
|
-
/* @__PURE__ */ u(
|
|
298
|
-
U,
|
|
299
|
-
{
|
|
300
|
-
size: "sm",
|
|
301
|
-
value: y,
|
|
302
|
-
onChange: F,
|
|
303
|
-
onSelect: b,
|
|
304
|
-
loadOptions: m,
|
|
305
|
-
placeholder: v,
|
|
306
|
-
"aria-label": v
|
|
307
|
-
}
|
|
308
|
-
),
|
|
309
|
-
/* @__PURE__ */ u("div", { className: "ds:flex ds:items-center ds:justify-end ds:pt-[var(--spacing-xs)] ds:border-t ds:border-[var(--border)]", children: /* @__PURE__ */ u(D, { intent: "ghost", size: "sm", onClick: T, type: "button", children: c("dataTable.typeaheadFilter.clear") }) })
|
|
310
|
-
]
|
|
311
|
-
}
|
|
312
|
-
);
|
|
313
|
-
}
|
|
314
|
-
function Pe(t) {
|
|
315
|
-
var b, F;
|
|
316
|
-
const { model: e, onModelChange: n, column: a } = t, { t: l } = O("ui"), i = ((F = (b = a == null ? void 0 : a.getColDef) == null ? void 0 : b.call(a)) == null ? void 0 : F.filterParams) ?? {}, r = i.options ?? [], p = i.loadOptions, f = i.placeholder ?? l("dataTable.typeaheadFilter.placeholder"), c = z(() => async (T, v) => {
|
|
317
|
-
if (p)
|
|
318
|
-
return (await p(T, v)).map((C) => ({ value: C.value, label: C.label }));
|
|
319
|
-
const o = M(T);
|
|
320
|
-
return (o ? r.filter((g) => M(g.label).includes(o)) : r).slice(0, 50).map((g) => ({ value: g.value, label: g.label }));
|
|
321
|
-
}, [p, r]), [s, m] = w((e == null ? void 0 : e.value) ?? "");
|
|
322
|
-
R(() => {
|
|
323
|
-
m((e == null ? void 0 : e.value) ?? "");
|
|
324
|
-
}, [e == null ? void 0 : e.value]);
|
|
325
|
-
function y(T) {
|
|
326
|
-
m(T.label), n({ type: "equals", value: T.value });
|
|
327
|
-
}
|
|
328
|
-
function h(T) {
|
|
329
|
-
m(T), T === "" && e && n(null);
|
|
330
|
-
}
|
|
331
|
-
return /* @__PURE__ */ u("div", { "data-component": "typeahead-floating-filter", className: "ds:w-full", children: /* @__PURE__ */ u(
|
|
332
|
-
U,
|
|
333
|
-
{
|
|
334
|
-
size: "sm",
|
|
335
|
-
value: s,
|
|
336
|
-
onChange: h,
|
|
337
|
-
onSelect: y,
|
|
338
|
-
loadOptions: c,
|
|
339
|
-
placeholder: f,
|
|
340
|
-
"aria-label": f
|
|
341
|
-
}
|
|
342
|
-
) });
|
|
343
|
-
}
|
|
344
|
-
const Y = [
|
|
345
|
-
"equals",
|
|
346
|
-
"notEqual",
|
|
347
|
-
"greaterThan",
|
|
348
|
-
"greaterThanOrEqual",
|
|
349
|
-
"lessThan",
|
|
350
|
-
"lessThanOrEqual",
|
|
351
|
-
"inRange",
|
|
352
|
-
"blank",
|
|
353
|
-
"notBlank"
|
|
354
|
-
];
|
|
355
|
-
function B(t) {
|
|
356
|
-
return t !== "blank" && t !== "notBlank";
|
|
357
|
-
}
|
|
358
|
-
function I(t) {
|
|
359
|
-
return t === "inRange";
|
|
360
|
-
}
|
|
361
|
-
function ee(t, e, n, a) {
|
|
362
|
-
if (t === "blank") return e === null;
|
|
363
|
-
if (t === "notBlank") return e !== null;
|
|
364
|
-
if (e === null) return !1;
|
|
365
|
-
if (n === null) return !0;
|
|
366
|
-
switch (t) {
|
|
367
|
-
case "equals":
|
|
368
|
-
return e === n;
|
|
369
|
-
case "notEqual":
|
|
370
|
-
return e !== n;
|
|
371
|
-
case "greaterThan":
|
|
372
|
-
return e > n;
|
|
373
|
-
case "greaterThanOrEqual":
|
|
374
|
-
return e >= n;
|
|
375
|
-
case "lessThan":
|
|
376
|
-
return e < n;
|
|
377
|
-
case "lessThanOrEqual":
|
|
378
|
-
return e <= n;
|
|
379
|
-
case "inRange": {
|
|
380
|
-
if (a === null) return e >= n;
|
|
381
|
-
const l = Math.min(n, a), i = Math.max(n, a);
|
|
382
|
-
return e >= l && e <= i;
|
|
383
|
-
}
|
|
384
|
-
default:
|
|
385
|
-
return !0;
|
|
386
|
-
}
|
|
387
|
-
}
|
|
388
|
-
function te(t) {
|
|
389
|
-
if (t == null || t === "") return null;
|
|
390
|
-
const e = typeof t == "number" ? t : Number(t);
|
|
391
|
-
return Number.isNaN(e) ? null : e;
|
|
392
|
-
}
|
|
393
|
-
function Me(t) {
|
|
394
|
-
const {
|
|
395
|
-
model: e,
|
|
396
|
-
onModelChange: n,
|
|
397
|
-
getValue: a,
|
|
398
|
-
defaultOperator: l,
|
|
399
|
-
min: i,
|
|
400
|
-
max: r,
|
|
401
|
-
step: p,
|
|
402
|
-
placeholder: f
|
|
403
|
-
} = t, { t: c } = O("ui"), s = (e == null ? void 0 : e.type) ?? l ?? "equals", [m, y] = w(s), [h, b] = w((e == null ? void 0 : e.filter) ?? null), [F, T] = w(
|
|
404
|
-
(e == null ? void 0 : e.filterTo) ?? null
|
|
405
|
-
);
|
|
406
|
-
R(() => {
|
|
407
|
-
if (e == null) {
|
|
408
|
-
y(l ?? "equals"), b(null), T(null);
|
|
409
|
-
return;
|
|
410
|
-
}
|
|
411
|
-
y(e.type), b(e.filter ?? null), T(e.filterTo ?? null);
|
|
412
|
-
}, [e, l]), q({
|
|
413
|
-
doesFilterPass: (x) => {
|
|
414
|
-
if (!e) return !0;
|
|
415
|
-
const G = te(a(x.node));
|
|
416
|
-
return ee(
|
|
417
|
-
e.type,
|
|
418
|
-
G,
|
|
419
|
-
e.filter ?? null,
|
|
420
|
-
e.filterTo ?? null
|
|
421
|
-
);
|
|
422
|
-
}
|
|
423
|
-
});
|
|
424
|
-
const v = z(
|
|
425
|
-
() => Y.map((x) => ({
|
|
426
|
-
value: x,
|
|
427
|
-
label: c(`dataTable.numberFilter.operators.${x}`)
|
|
428
|
-
})),
|
|
429
|
-
[c]
|
|
430
|
-
), o = f ?? c("dataTable.numberFilter.placeholder");
|
|
431
|
-
function d() {
|
|
432
|
-
if (!B(m)) {
|
|
433
|
-
n({ type: m, filter: 0 });
|
|
434
|
-
return;
|
|
435
|
-
}
|
|
436
|
-
if (h === null) {
|
|
437
|
-
n(null);
|
|
438
|
-
return;
|
|
439
|
-
}
|
|
440
|
-
if (I(m)) {
|
|
441
|
-
n({
|
|
442
|
-
type: m,
|
|
443
|
-
filter: h,
|
|
444
|
-
filterTo: F ?? void 0
|
|
445
|
-
});
|
|
446
|
-
return;
|
|
447
|
-
}
|
|
448
|
-
n({ type: m, filter: h });
|
|
449
|
-
}
|
|
450
|
-
function g() {
|
|
451
|
-
y(l ?? "equals"), b(null), T(null), n(null);
|
|
452
|
-
}
|
|
453
|
-
const C = B(m), N = I(m);
|
|
454
|
-
return /* @__PURE__ */ k(
|
|
455
|
-
"div",
|
|
456
|
-
{
|
|
457
|
-
"data-component": "number-filter",
|
|
458
|
-
className: "ds:flex ds:flex-col ds:gap-[var(--spacing-sm)] ds:p-[var(--spacing-sm)] ds:min-w-[240px]",
|
|
459
|
-
children: [
|
|
460
|
-
/* @__PURE__ */ u(
|
|
461
|
-
Q,
|
|
462
|
-
{
|
|
463
|
-
size: "sm",
|
|
464
|
-
options: v,
|
|
465
|
-
value: m,
|
|
466
|
-
onValueChange: (x) => {
|
|
467
|
-
x !== "" && y(x);
|
|
468
|
-
},
|
|
469
|
-
"aria-label": c("dataTable.numberFilter.operators.equals")
|
|
470
|
-
}
|
|
471
|
-
),
|
|
472
|
-
C && !N && /* @__PURE__ */ u(
|
|
473
|
-
E,
|
|
474
|
-
{
|
|
475
|
-
size: "sm",
|
|
476
|
-
value: h,
|
|
477
|
-
onChange: b,
|
|
478
|
-
min: i,
|
|
479
|
-
max: r,
|
|
480
|
-
step: p,
|
|
481
|
-
placeholder: o,
|
|
482
|
-
"aria-label": o
|
|
483
|
-
}
|
|
484
|
-
),
|
|
485
|
-
N && /* @__PURE__ */ k("div", { className: "ds:flex ds:items-center ds:gap-[var(--spacing-xs)]", children: [
|
|
486
|
-
/* @__PURE__ */ u(
|
|
487
|
-
E,
|
|
488
|
-
{
|
|
489
|
-
size: "sm",
|
|
490
|
-
value: h,
|
|
491
|
-
onChange: b,
|
|
492
|
-
min: i,
|
|
493
|
-
max: r,
|
|
494
|
-
step: p,
|
|
495
|
-
placeholder: c("dataTable.numberFilter.from"),
|
|
496
|
-
"aria-label": c("dataTable.numberFilter.from")
|
|
497
|
-
}
|
|
498
|
-
),
|
|
499
|
-
/* @__PURE__ */ u(
|
|
500
|
-
E,
|
|
501
|
-
{
|
|
502
|
-
size: "sm",
|
|
503
|
-
value: F,
|
|
504
|
-
onChange: T,
|
|
505
|
-
min: i,
|
|
506
|
-
max: r,
|
|
507
|
-
step: p,
|
|
508
|
-
placeholder: c("dataTable.numberFilter.to"),
|
|
509
|
-
"aria-label": c("dataTable.numberFilter.to")
|
|
510
|
-
}
|
|
511
|
-
)
|
|
512
|
-
] }),
|
|
513
|
-
/* @__PURE__ */ k("div", { className: "ds:flex ds:items-center ds:justify-end ds:gap-[var(--spacing-xs)] ds:pt-[var(--spacing-xs)] ds:border-t ds:border-[var(--border)]", children: [
|
|
514
|
-
/* @__PURE__ */ u(D, { intent: "ghost", size: "sm", onClick: g, type: "button", children: c("dataTable.numberFilter.clear") }),
|
|
515
|
-
/* @__PURE__ */ u(D, { intent: "primary", size: "sm", onClick: d, type: "button", children: c("dataTable.numberFilter.apply") })
|
|
516
|
-
] })
|
|
517
|
-
]
|
|
518
|
-
}
|
|
519
|
-
);
|
|
520
|
-
}
|
|
521
|
-
function De(t) {
|
|
522
|
-
var s, m;
|
|
523
|
-
const { model: e, onModelChange: n, column: a } = t, { t: l } = O("ui"), i = ((m = (s = a == null ? void 0 : a.getColDef) == null ? void 0 : s.call(a)) == null ? void 0 : m.filterParams) ?? {}, r = i.defaultOperator ?? "equals", p = i.placeholder ?? l("dataTable.numberFilter.placeholder"), [f, c] = w((e == null ? void 0 : e.filter) ?? null);
|
|
524
|
-
return R(() => {
|
|
525
|
-
c((e == null ? void 0 : e.filter) ?? null);
|
|
526
|
-
}, [e == null ? void 0 : e.filter]), R(() => {
|
|
527
|
-
if (f === ((e == null ? void 0 : e.filter) ?? null)) return;
|
|
528
|
-
const y = setTimeout(() => {
|
|
529
|
-
if (f === null || Number.isNaN(f)) {
|
|
530
|
-
n(null);
|
|
531
|
-
return;
|
|
532
|
-
}
|
|
533
|
-
n({ type: r, filter: f });
|
|
534
|
-
}, 200);
|
|
535
|
-
return () => clearTimeout(y);
|
|
536
|
-
}, [f, r]), /* @__PURE__ */ u("div", { "data-component": "number-floating-filter", className: "ds:w-full", children: /* @__PURE__ */ u(
|
|
537
|
-
E,
|
|
538
|
-
{
|
|
539
|
-
size: "sm",
|
|
540
|
-
value: f,
|
|
541
|
-
onChange: c,
|
|
542
|
-
min: i.min,
|
|
543
|
-
max: i.max,
|
|
544
|
-
step: i.step,
|
|
545
|
-
placeholder: p,
|
|
546
|
-
"aria-label": p
|
|
547
|
-
}
|
|
548
|
-
) });
|
|
549
|
-
}
|
|
550
|
-
function Ee(t) {
|
|
551
|
-
const { value: e, variantMap: n } = t, a = (n == null ? void 0 : n[e]) ?? "neutral";
|
|
552
|
-
return /* @__PURE__ */ u(W, { variant: a, withDot: !0, size: "sm", children: String(e ?? "") });
|
|
553
|
-
}
|
|
554
|
-
function Le(t) {
|
|
555
|
-
const { value: e } = t;
|
|
556
|
-
return e ? /* @__PURE__ */ k("span", { className: "ds:inline-flex ds:items-center ds:gap-[var(--spacing-sm)]", children: [
|
|
557
|
-
/* @__PURE__ */ u($, { name: e.name, src: e.src, size: "sm" }),
|
|
558
|
-
/* @__PURE__ */ u("span", { children: e.name })
|
|
559
|
-
] }) : null;
|
|
560
|
-
}
|
|
561
|
-
const ne = {
|
|
562
|
-
sm: "ds:size-8",
|
|
563
|
-
md: "ds:size-10",
|
|
564
|
-
lg: "ds:size-12"
|
|
565
|
-
}, ae = {
|
|
566
|
-
square: "ds:rounded-none",
|
|
567
|
-
rounded: "ds:rounded-[var(--radius-md)]",
|
|
568
|
-
circle: "ds:rounded-[var(--radius-full)]"
|
|
569
|
-
};
|
|
570
|
-
function A(t, e) {
|
|
571
|
-
if (!t || typeof t != "object") return;
|
|
572
|
-
const n = t[e];
|
|
573
|
-
return typeof n == "string" ? n : void 0;
|
|
574
|
-
}
|
|
575
|
-
const re = /^(?:https?:|data:image\/)/i;
|
|
576
|
-
function le(t) {
|
|
577
|
-
if (!t) return;
|
|
578
|
-
const e = t.trim();
|
|
579
|
-
if (e.length !== 0)
|
|
580
|
-
return re.test(e) ? e : void 0;
|
|
581
|
-
}
|
|
582
|
-
function qe(t) {
|
|
583
|
-
const {
|
|
584
|
-
data: e,
|
|
585
|
-
srcField: n,
|
|
586
|
-
altField: a,
|
|
587
|
-
fallbackField: l,
|
|
588
|
-
size: i = "md",
|
|
589
|
-
shape: r = "rounded"
|
|
590
|
-
} = t;
|
|
591
|
-
if (!e) return null;
|
|
592
|
-
const p = A(e, n), f = le(p), c = a ? A(e, a) ?? "" : "", s = l ? A(e, l) : void 0;
|
|
593
|
-
return f ? /* @__PURE__ */ u(
|
|
594
|
-
"img",
|
|
595
|
-
{
|
|
596
|
-
src: f,
|
|
597
|
-
alt: c,
|
|
598
|
-
loading: "lazy",
|
|
599
|
-
decoding: "async",
|
|
600
|
-
className: ["ds:object-cover", ne[i], ae[r]].join(
|
|
601
|
-
" "
|
|
602
|
-
)
|
|
603
|
-
}
|
|
604
|
-
) : s ? /* @__PURE__ */ u($, { name: s, size: i }) : null;
|
|
605
|
-
}
|
|
606
|
-
function Ae(t) {
|
|
607
|
-
const { value: e, maxVisible: n = 3 } = t, { t: a } = O();
|
|
608
|
-
if (!Array.isArray(e) || e.length === 0) return null;
|
|
609
|
-
const l = e.slice(0, n), i = e.length - n;
|
|
610
|
-
return /* @__PURE__ */ k("span", { className: "ds:inline-flex ds:flex-wrap ds:items-center ds:gap-[var(--spacing-xs)]", children: [
|
|
611
|
-
l.map((r) => /* @__PURE__ */ u(j, { label: r, size: "sm" }, r)),
|
|
612
|
-
i > 0 && /* @__PURE__ */ u(X, { label: e.slice(n).join(", "), children: /* @__PURE__ */ u(
|
|
613
|
-
j,
|
|
614
|
-
{
|
|
615
|
-
label: a("inputs.multiSelect.overflow", { count: i }),
|
|
616
|
-
size: "sm",
|
|
617
|
-
variant: "neutral",
|
|
618
|
-
fill: "outline"
|
|
619
|
-
}
|
|
620
|
-
) })
|
|
621
|
-
] });
|
|
622
|
-
}
|
|
623
|
-
const se = {
|
|
624
|
-
date: { year: "numeric", month: "short", day: "numeric" },
|
|
625
|
-
time: { hour: "2-digit", minute: "2-digit" },
|
|
626
|
-
datetime: {
|
|
627
|
-
year: "numeric",
|
|
628
|
-
month: "short",
|
|
629
|
-
day: "numeric",
|
|
630
|
-
hour: "2-digit",
|
|
631
|
-
minute: "2-digit"
|
|
632
|
-
}
|
|
633
|
-
};
|
|
634
|
-
function je(t) {
|
|
635
|
-
const { value: e, format: n = "date", options: a } = t;
|
|
636
|
-
return e == null || e === "" ? null : n === "relative" && !a ? /* @__PURE__ */ u(V, { value: e, shape: "bare" }) : /* @__PURE__ */ u(
|
|
637
|
-
V,
|
|
638
|
-
{
|
|
639
|
-
value: e,
|
|
640
|
-
format: "absolute",
|
|
641
|
-
shape: "bare",
|
|
642
|
-
absoluteFormat: a ?? se[n === "relative" ? "date" : n]
|
|
643
|
-
}
|
|
644
|
-
);
|
|
645
|
-
}
|
|
646
|
-
function ie(t) {
|
|
647
|
-
if (t == null || t === "") return null;
|
|
648
|
-
const e = typeof t == "number" ? t : Number(t);
|
|
649
|
-
return Number.isFinite(e) ? e : null;
|
|
650
|
-
}
|
|
651
|
-
function Ve(t) {
|
|
652
|
-
const {
|
|
653
|
-
value: e,
|
|
654
|
-
currency: n = "EUR",
|
|
655
|
-
colorNegative: a,
|
|
656
|
-
strikethrough: l,
|
|
657
|
-
options: i
|
|
658
|
-
} = t, { i18n: r } = O(), p = ie(e);
|
|
659
|
-
if (p === null) return null;
|
|
660
|
-
const f = r.language || "en", c = new Intl.NumberFormat(f, {
|
|
661
|
-
style: "currency",
|
|
662
|
-
currency: n,
|
|
663
|
-
...i
|
|
664
|
-
}).format(p), s = ["ds:tabular-nums"];
|
|
665
|
-
return a && p < 0 && s.push("ds:text-[color:var(--destructive)]"), l && s.push("line-through"), /* @__PURE__ */ u("span", { className: s.join(" "), children: c });
|
|
666
|
-
}
|
|
667
|
-
function _(t, e) {
|
|
668
|
-
return typeof t == "function" ? t(e) : t;
|
|
669
|
-
}
|
|
670
|
-
function oe(t) {
|
|
671
|
-
return /^(https?:\/\/|\/|#|mailto:|tel:)/i.test(t) ? t : "#";
|
|
672
|
-
}
|
|
673
|
-
function Be(t) {
|
|
674
|
-
const { value: e, data: n, href: a, onClick: l, secondary: i } = t;
|
|
675
|
-
if (!n) return null;
|
|
676
|
-
const r = _(a, n), p = _(i, n), f = e == null || e === "" ? "" : String(e), c = [
|
|
677
|
-
"ds:text-[color:var(--primary)]",
|
|
678
|
-
"ds:hover:underline",
|
|
679
|
-
"ds:focus-visible:outline-[length:var(--focus-ring-width)]",
|
|
680
|
-
"ds:focus-visible:outline-solid",
|
|
681
|
-
"ds:focus-visible:outline-[color:var(--ring)]",
|
|
682
|
-
"ds:focus-visible:outline-offset-[length:var(--focus-ring-offset)]",
|
|
683
|
-
"ds:rounded-[var(--radius-sm)]"
|
|
684
|
-
].join(" "), s = (m) => {
|
|
685
|
-
l && (r || m.preventDefault(), m.stopPropagation(), l(n));
|
|
686
|
-
};
|
|
687
|
-
return /* @__PURE__ */ k("span", { className: "ds:flex ds:flex-col ds:leading-tight", children: [
|
|
688
|
-
r ? /* @__PURE__ */ u(
|
|
689
|
-
"a",
|
|
690
|
-
{
|
|
691
|
-
href: oe(r),
|
|
692
|
-
onClick: s,
|
|
693
|
-
className: c,
|
|
694
|
-
children: f
|
|
695
|
-
}
|
|
696
|
-
) : /* @__PURE__ */ u(
|
|
697
|
-
"button",
|
|
698
|
-
{
|
|
699
|
-
type: "button",
|
|
700
|
-
onClick: s,
|
|
701
|
-
className: [
|
|
702
|
-
"ds:appearance-none ds:bg-transparent ds:p-0 ds:text-start",
|
|
703
|
-
c
|
|
704
|
-
].join(" "),
|
|
705
|
-
children: f
|
|
706
|
-
}
|
|
707
|
-
),
|
|
708
|
-
p ? /* @__PURE__ */ u("span", { className: "type-meta ds:text-[color:var(--muted-foreground)]", children: p }) : null
|
|
709
|
-
] });
|
|
710
|
-
}
|
|
711
|
-
export {
|
|
712
|
-
Ve as C,
|
|
713
|
-
je as D,
|
|
714
|
-
qe as I,
|
|
715
|
-
Be as L,
|
|
716
|
-
Me as N,
|
|
717
|
-
ze as S,
|
|
718
|
-
Ae as T,
|
|
719
|
-
Le as U,
|
|
720
|
-
ke as a,
|
|
721
|
-
we as b,
|
|
722
|
-
De as c,
|
|
723
|
-
Re as d,
|
|
724
|
-
Ee as e,
|
|
725
|
-
Oe as f,
|
|
726
|
-
Pe as g
|
|
727
|
-
};
|
|
728
|
-
//# sourceMappingURL=link-cell-renderer-Bt-mXeQY.js.map
|