ia-table 0.15.1 → 0.15.3

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.
@@ -1,1027 +0,0 @@
1
- (function(){"use strict";try{if(typeof document<"u"){var t=document.createElement("style");t.appendChild(document.createTextNode('button.ia-table-btn{border:none;border-radius:8px;text-decoration:none;font-size:14px;font-weight:500;font-family:Manrope,sans-serif;line-height:20px}button.ia-table-btn-url{background-color:transparent;color:#4259ee}button.ia-table-btn-url svg{padding:2px}button.ia-table-btn-url.ia-table-btn-icon{width:24px;height:24px}button.ia-table-btn-primary{background-color:#4259ee;color:#fff}button.ia-table-btn-link{color:#4259ee;background-color:transparent}button.ia-table-btn-danger{color:#fff;background-color:#e15554}button.ia-table-btn-tertiary{border:1px solid #c3c8d4;color:#1f2b4d;background-color:#fff}button.ia-table-btn-tertiary svg{padding:2px!important}button.ia-table-btn-tertiary:hover{border-color:#4259ee;color:#4259ee}button.ia-table-btn-tertiary:hover svg path{fill:#4259ee}button.ia-table-btn-icon{padding:0}button.ia-table-btn.ia-table-btn-disabled{background-color:#c3c8d4;color:#fff}button.ia-table-btn.ia-table-btn-disabled svg path{fill:#b4bac7}button.ia-table-btn-text{height:32px;max-height:32px;border-radius:8px;background-color:#f5f6fa;padding:8px;display:flex;align-items:center;justify-content:center;color:#60697d}button.ia-table-btn-text.ia-table-btn-disabled{background-color:#f8f9fb}button.ia-table-btn-text.ia-table-btn-icon{color:#60697d}button.ia-table-btn-text.ia-table-btn-icon-color{background-color:#eceefd}button.ia-table-btn-text.ia-table-btn-icon-color svg path{fill:#3649c6}button.ia-table-btn svg{height:16px;width:16px;display:flex;align-items:center;justify-content:center}button.ia-table-btn:focus svg path{fill:#3649c6}button.ia-table-btn-small{height:24px;min-width:24px;padding:2px 4px}button.ia-table-btn-small .ia-table-btn-text{padding:2px 12px}button.ia-table-btn-medium{height:28px;min-width:28px;padding:4px 6px}button.ia-table-btn-medium .ia-table-btn-text{padding:4px 12px}button.ia-table-btn-large{height:32px;min-width:32px;padding:6px 8px}button.ia-table-btn.ia-table-btn-simple{width:auto;height:auto;min-width:auto;padding:0}button.ia-table-btn.ia-table-btn-simple svg{padding:0}button.ia-table-btn-url.ia-table-btn-icon{padding:0}button.ia-table-btn-url.ia-table-btn-icon svg{padding:0}button.ia-table-btn-url.ia-table-btn-icon svg:hover path{fill:var(#4259ee);stroke:var(#4259ee)}.tooltip-container{position:relative;display:inline-block}.tooltip{position:absolute;background-color:#1976d2;color:#fff;font-family:Manrope,sans-serif;border-radius:6px;font-size:14px;z-index:9999;box-shadow:0 2px 8px #0003;white-space:normal;max-width:400px;overflow-wrap:break-word;display:flex;align-items:center;justify-content:center;text-align:center;opacity:0;pointer-events:none;transition:opacity .2s ease-in-out}.tooltip-title{font-family:Manrope;font-weight:500;font-size:14px;line-height:20px;vertical-align:middle;padding:6px 12px}.tooltip.tooltip-visible{opacity:1;pointer-events:auto}.tooltip--primary{background:var(--Colors-Primary-Surface-Darker, rgb(54, 73, 198));color:#fff}.tooltip--secondary{background:var(--Colors-Neutrals-Surface-White, rgb(255, 255, 255));color:#000;border:1px solid #ccc}.tooltip--tertiary{background:var(--Colors-Neutrals-Text-icon-Title, rgb(13, 21, 44));color:#fff}.tooltip--feature{min-height:unset;border-radius:12px;background:linear-gradient(274.01deg,#fdf0ec .91%,#fcf8ea 103.39%) padding-box,linear-gradient(270deg,#687af1,#ed7955) border-box;border:1px solid transparent;box-shadow:0 0 20px #687af133,0 0 40px #ed79551f;color:#1e293b;font-size:14px;line-height:1.4;max-width:280px;gap:6px;padding:12px 16px;align-items:start}.tooltip--feature .tooltip-title{font-weight:700;font-size:15px;color:#0f172a;line-height:1.3;padding:0}.tooltip--feature .tooltip-description{font-weight:400;font-size:14px;color:#1e293b;line-height:1.45}.tooltip--feature .tooltip-arrow{background:linear-gradient(274.01deg,#fdf0ec .91%,#fcf8ea 103.39%) padding-box,linear-gradient(270deg,#687af1,#ed7955) border-box;border:1px solid transparent}.tooltip--feature.tooltip--top .tooltip-arrow{border-top:none;border-left:none}.tooltip--feature.tooltip--bottom .tooltip-arrow{border-bottom:none;border-right:none}.tooltip--feature.tooltip--left .tooltip-arrow{border-bottom:none;border-left:none}.tooltip--feature.tooltip--right .tooltip-arrow{border-top:none;border-right:none}.tooltip-arrow{position:absolute;width:10px;height:10px;background-color:inherit;transform:rotate(45deg)}.tooltip--top .tooltip-arrow{bottom:-5px}.tooltip--bottom .tooltip-arrow{top:-5px}.tooltip--left .tooltip-arrow{right:-5px}.tooltip--right .tooltip-arrow{left:-5px}.tooltip-header{padding:8px 12px}.body-text span{display:block;width:100%;text-align:justify;white-space:normal;overflow-wrap:break-word;word-break:break-word;overflow:hidden;text-overflow:ellipsis}.tooltip-btns{align-self:flex-end;gap:4px;margin-left:auto}.tooltip-btn{font-size:8px;border-radius:4px;padding:6px 12px;cursor:pointer;transition:background-color .2s ease,color .2s ease;border:none}.btn-no-bg{background:transparent;color:inherit;border:none;padding:0;min-width:auto}.btn--primary{background-color:#1976d2;color:#fff}.btn--primary:hover{background-color:#1565c0}.btn--secondary{background-color:#fff;color:#333}.btn--secondary:hover{background-color:#fff}.btn--default{background:transparent;color:inherit;border:none;padding:0;min-width:auto}.tooltip-illustration{margin:0;padding:0}.tooltip-illustration img{width:100%;max-width:100%;height:120px;object-fit:cover;border-radius:4px}.tooltip-close{background:none;position:relative;border:none;font-size:16px;cursor:pointer;color:inherit;padding:0;margin-left:auto;flex-shrink:0;width:24px;height:24px;border-radius:50%;transition:background-color .2s ease}.tooltip-close:hover{background-color:#ffffff1a}.tooltip-pagination{justify-content:flex-start;gap:5px;max-width:100%;overflow:hidden}.tooltip-pagination-bar{width:20px;height:5px;border-radius:1px;background-color:#fff;flex-shrink:0}.tooltip-pagination-bar.secondary-variant{background-color:#1976d2}.ia-table-badge{display:inline-flex;border-radius:100px;font-family:Manrope,sans-serif;font-weight:500;white-space:nowrap;padding:0 8px;max-width:-webkit-fill-available}.ia-table-badge-size-small{height:20px;font-size:10px;line-height:16px}.ia-table-badge-size-default{height:24px;font-size:12px;line-height:16px}.ia-table-badge-filled.ia-table-badge-default{background-color:#5f6673;color:#fff}.ia-table-badge-filled.ia-table-badge-success{background-color:#0f8431;color:#fff}.ia-table-badge-filled.ia-table-badge-warning{background-color:#8b6f06;color:#1f2b4d}.ia-table-badge-filled.ia-table-badge-error{background-color:#d62f4c;color:#fff}.ia-table-badge-filled.ia-table-badge-info{background-color:#4159ee;color:#fff}.ia-table-badge-stroke{background-color:#fff}.ia-table-badge-stroke.ia-table-badge-default{border:1px solid #5f6673;color:#5f6673}.ia-table-badge-stroke.ia-table-badge-success{border:1px solid #0f8431;color:#0f8431}.ia-table-badge-stroke.ia-table-badge-warning{border:1px solid #8b6f06;color:#8b6f06}.ia-table-badge-stroke.ia-table-badge-error{border:1px solid #d62f4c;color:#d62f4c}.ia-table-badge-stroke.ia-table-badge-info{border:1px solid #4159ee;color:#4159ee}.ia-table-badge-subtile.ia-table-badge-default{background:#f2f3f4;color:#5f6673}.ia-table-badge-subtile.ia-table-badge-success{background:#f4fff7;color:#0f8431}.ia-table-badge-subtile.ia-table-badge-warning{background:#fdfae9;color:#8b6f06}.ia-table-badge-subtile.ia-table-badge-error{background:#fef4f5;color:#d62f4c}.ia-table-badge-subtile.ia-table-badge-info{background:#f1f3fe;color:#4159ee}.ia-table-badge-label{display:inline-block}.ia-table-modal-overlay{position:fixed;top:0;left:0;right:0;bottom:0;background-color:#00000080;z-index:1000;animation:ia-table-modal-fade-in .2s ease-out}.ia-table-modal-overlay .ia-table-modal{background-color:#fff;border-radius:8px;box-shadow:0 4px 16px #00000029;max-height:90vh;animation:ia-table-modal-slide-in .2s ease-out;position:relative;max-width:95vw;overflow:hidden}.ia-table-modal-overlay .ia-table-modal-small{width:400px}.ia-table-modal-overlay .ia-table-modal-small .ia-table-close-button svg{height:12px;width:12px}.ia-table-modal-overlay .ia-table-modal-medium{width:600px}.ia-table-modal-overlay .ia-table-modal-large{width:800px}.ia-table-modal-overlay .ia-table-modal .ia-table-modal-header{min-height:48px;padding:12px 16px;background-color:#eceefd;flex-shrink:0}.ia-table-modal-overlay .ia-table-modal .ia-table-modal-header .ia-table-modal-title{font-family:Manrope,sans-serif;font-weight:800;font-size:16px;line-height:24px;color:#0d152c;margin:0}.ia-table-modal-overlay .ia-table-modal .ia-table-modal-content{padding:16px;flex:1;overflow-y:auto;min-height:100px}.ia-table-modal-overlay .ia-table-modal .ia-table-modal-footer{border-top:1px solid #d9dde7;padding:12px 16px;height:56px;flex-shrink:0;background-color:#fff;border-radius:0 0 8px 8px}.ia-table-modal-overlay .ia-table-close-button svg:hover path{fill:#60697d!important;stroke:none!important}@keyframes ia-table-modal-fade-in{0%{opacity:0}to{opacity:1}}@keyframes ia-table-modal-slide-in{0%{transform:translateY(-20px);opacity:0}to{transform:translateY(0);opacity:1}}@media(max-width:768px){.ia-table-modal-overlay .ia-table-modal-small,.ia-table-modal-overlay .ia-table-modal-medium,.ia-table-modal-overlay .ia-table-modal-large{width:95vw}}.ia-table-inputbox-container{width:100%;font-family:Manrope,sans-serif;height:32px;margin:0;padding:0}.ia-table-inputbox-container .ia-table-input-label{font-size:12px;font-weight:500;color:#60697d;line-height:16px;margin-bottom:6px}.ia-table-inputbox-container .ia-table-input-container{width:100%;height:inherit;border:1px solid #d9dde7;border-radius:8px;background-color:#fff;padding:0 12px;transition:all .2s ease-in-out;margin:0}.ia-table-inputbox-container .ia-table-input-container:hover:not(.ia-table-input-disabled,.ia-table-cellrender-input){border-color:#4259ee}.ia-table-inputbox-container .ia-table-input-container:focus-within:not(.ia-table-input-disabled,.ia-table-cellrender-input){border-color:#4259ee}.ia-table-inputbox-container .ia-table-input-container.ia-table-input-error{border-color:#ff3b30}.ia-table-inputbox-container .ia-table-input-container.ia-table-input-disabled{background-color:#f7f7f7;border-color:#e2e8f0;cursor:not-allowed}.ia-table-inputbox-container .ia-table-input-container.ia-table-cellrender-input{border:none}.ia-table-inputbox-container .ia-table-input-container.has-left-icon{padding-left:8px}.ia-table-inputbox-container .ia-table-input-container.has-right-icon{padding-right:8px}.ia-table-inputbox-container .ia-table-input-container.has-left-icon-button{padding-left:8px}.ia-table-inputbox-container .ia-table-input-container.has-right-icon-button{padding-right:8px}.ia-table-inputbox-container .ia-table-input-container .left-input-icon,.ia-table-inputbox-container .ia-table-input-container .right-input-icon,.ia-table-inputbox-container .ia-table-input-container .left-input-icon-button,.ia-table-inputbox-container .ia-table-input-container .right-input-icon-button{height:24px;color:#60697d}.ia-table-inputbox-container .ia-table-input-container .left-input-icon svg,.ia-table-inputbox-container .ia-table-input-container .right-input-icon svg,.ia-table-inputbox-container .ia-table-input-container .left-input-icon-button svg,.ia-table-inputbox-container .ia-table-input-container .right-input-icon-button svg{width:16px;height:16px}.ia-table-inputbox-container .ia-table-input-container .left-input-icon.hidden,.ia-table-inputbox-container .ia-table-input-container .right-input-icon.hidden,.ia-table-inputbox-container .ia-table-input-container .left-input-icon-button.hidden,.ia-table-inputbox-container .ia-table-input-container .right-input-icon-button.hidden{opacity:0;visibility:hidden;transition:opacity .2s ease-in-out,visibility .2s ease-in-out}.ia-table-inputbox-container .ia-table-input-container .left-input-icon.hidden.ia-table-body-cell-lock,.ia-table-inputbox-container .ia-table-input-container .right-input-icon.hidden.ia-table-body-cell-lock,.ia-table-inputbox-container .ia-table-input-container .left-input-icon-button.hidden.ia-table-body-cell-lock,.ia-table-inputbox-container .ia-table-input-container .right-input-icon-button.hidden.ia-table-body-cell-lock{opacity:1;visibility:visible}.ia-table-inputbox-container .ia-table-input-container .left-input-icon.hidden.ia-table-body-cell-lock svg path,.ia-table-inputbox-container .ia-table-input-container .right-input-icon.hidden.ia-table-body-cell-lock svg path,.ia-table-inputbox-container .ia-table-input-container .left-input-icon-button.hidden.ia-table-body-cell-lock svg path,.ia-table-inputbox-container .ia-table-input-container .right-input-icon-button.hidden.ia-table-body-cell-lock svg path{fill:#b4bac7}.ia-table-inputbox-container .ia-table-input-container .left-input-icon.visible,.ia-table-inputbox-container .ia-table-input-container .right-input-icon.visible,.ia-table-inputbox-container .ia-table-input-container .left-input-icon-button.visible,.ia-table-inputbox-container .ia-table-input-container .right-input-icon-button.visible{opacity:1;visibility:visible;transition:opacity .2s ease-in-out,visibility .2s ease-in-out}.ia-table-inputbox-container .ia-table-input-container .ia-table-input-wrapper{flex:1;height:100%;margin:0;padding:0}.ia-table-inputbox-container .ia-table-input-container .ia-table-input-wrapper .ia-table-input{width:100%;height:100%;border:none;outline:none;background:transparent;font-size:14px;font-weight:400;color:#1f2b4d;padding:0 4px;margin:0}.ia-table-inputbox-container .ia-table-input-container .ia-table-input-wrapper .ia-table-input::placeholder{color:#a0a8b1}.ia-table-inputbox-container .ia-table-input-container .ia-table-input-wrapper .ia-table-input:disabled{cursor:not-allowed;color:#a0a8b1}.ia-table-inputbox-container .ia-table-input-container .ia-table-input-wrapper .ia-table-input::-webkit-inner-spin-button,.ia-table-inputbox-container .ia-table-input-container .ia-table-input-wrapper .ia-table-input::-webkit-outer-spin-button{-webkit-appearance:none;-moz-appearance:none;appearance:none;margin:0}.ia-table-inputbox-container .ia-table-input-container .ia-table-input-wrapper .ia-table-input[type=number]{-moz-appearance:textfield;-webkit-appearance:textfield;appearance:textfield}.ia-table-inputbox-container .ia-table-input-error-message{font-size:12px;font-weight:400;color:#ff3b30;margin-top:4px}.ia-table-cell-render-input-disabled{cursor:not-allowed;border:none!important;background-color:#fafafa!important}.ia-table-cell-render-input-disabled input{color:#b4bac7!important;font-weight:400!important}.ia-checkbox-container{-webkit-user-select:none;user-select:none}.ia-checkbox-input,.ia-checkbox-icon{width:16px;height:16px}.ia-checkbox-input{position:absolute;opacity:0;margin:0}.ia-checkbox-custom{width:16px;height:16px;transition:all .2s ease}.ia-checkbox-label{font-family:Manrope,sans-serif;font-weight:500;font-size:14px;line-height:20px;color:#60697d}.ia-checkbox-disabled{opacity:.5;cursor:not-allowed}.ia-checkbox-disabled .ia-checkbox-input,.ia-checkbox-disabled .ia-checkbox-custom{cursor:not-allowed}.ia-checkbox-container:not(.ia-checkbox-disabled):hover .ia-checkbox-custom{opacity:.9}.ia-checkbox-input:focus-visible+.ia-checkbox-custom{outline-offset:1px}.ia-table-radio-group-container{width:100%}.ia-table-radio-group-container.vertical{flex-direction:column}.ia-table-radio-group-container.horizontal{flex-direction:row}.ia-table-radio-option{padding:0;margin:0;-webkit-user-select:none;user-select:none;font-family:Manrope,sans-serif;font-weight:500;font-size:14px;line-height:20px;color:#60697d}.ia-table-radio-option.ia-table-radio-group-selected{color:#1f2b4d}.ia-table-radio-input{opacity:0;height:0;width:0}.ia-table-radio-custom{height:16px;width:16px;min-width:16px;background-color:#fff;border:1px solid #c3c8d4;border-radius:50%;transition:all .2s ease}.ia-table-radio-custom:after{content:"";position:absolute;display:none;width:8px;height:8px;border-radius:50%;background:#4259ee}.ia-table-radio-input:checked~.ia-table-radio-custom{border-color:#4259ee}.ia-table-radio-input:checked~.ia-table-radio-custom:after{display:block}.ia-table-radio-input:focus-visible~.ia-table-radio-custom{box-shadow:0 0 0 3px #4259ee33;outline:none}.ia-table-radio-input:disabled~.ia-table-radio-custom{background-color:#f4f5f7;border-color:#dfe1e6;cursor:not-allowed}.ia-table-radio-input:disabled~.ia-table-radio-custom:after{background:#a5adba}.ia-table-radio-input:disabled~.ia-table-radio-label{color:#a5adba;cursor:not-allowed}.ia-table-radio-label.ia-table-radio-label-selected{color:#1f2b4d}')),document.head.appendChild(t)}}catch(a){console.error("vite-plugin-css-injected-by-js",a)}})();
2
- import { jsxs as A, jsx as b } from "react/jsx-runtime";
3
- import * as _ from "react";
4
- import { useRef as F, useEffect as V, memo as q, useCallback as j, useState as X } from "react";
5
- import { createPortal as J } from "react-dom";
6
- const Ee = 200, ve = 2, Q = 56, ee = 48, ye = {
7
- default: {
8
- height: 46,
9
- padding: 24
10
- },
11
- compact: {
12
- height: 30,
13
- padding: 9
14
- },
15
- comfortable: {
16
- height: 52,
17
- padding: 32
18
- }
19
- }, we = {
20
- 46: "32px",
21
- 30: "24px",
22
- 52: "32px"
23
- }, Ce = 16, $e = [
24
- "int",
25
- "str",
26
- "percentage",
27
- "number",
28
- "date",
29
- "datetime",
30
- "time",
31
- "float",
32
- "dollar",
33
- "decimal",
34
- "DateTimeField",
35
- "daterangepicker",
36
- "list",
37
- "dropdown"
38
- ], Ne = 0, Le = "furthestFromViewport", xe = 2, _e = !1, He = "infiniteCache", Ae = {
39
- maxPersistedBlocks: 5,
40
- persistBlockData: !0,
41
- compressionEnabled: !1
42
- }, Pe = 1e6, K = 3, Se = 7, ke = 6, Me = ({
43
- isFrozen: e,
44
- column: t,
45
- frozenColumns: s
46
- }) => {
47
- const l = e && t.pinned !== "right", i = e && t.pinned === "right", n = P(t), o = l && s.positions ? s.positions[n] : null, p = l && s.indexes ? s.indexes.indexOf(n) : null, r = i && s.rightPinned && s.rightPinned.positions ? s.rightPinned.positions[n] : null;
48
- return {
49
- isPinnedLeft: l,
50
- isPinnedRight: i,
51
- frozenPosition: o,
52
- frozenIndex: p,
53
- rightPinnedPosition: r
54
- };
55
- }, te = (e, t, s) => e ? t || s ? ee : Q : 0, Te = (e, t) => {
56
- let s = e;
57
- return t.includes(".") && !s[t] ? (t.split(".").every((i) => s[i] ? (s = s[i], !0) : !1), s) : Object.prototype.hasOwnProperty.call(s, t);
58
- }, P = (e) => e && (e.colId || e.field || e.column_name || e.accessor || e.groupId || e.headerName) || "", ne = (e, t = !1) => e.uniqueHierarchyId ? t && e.originalPath ? e.originalPath : e.path || [] : e.path || [], H = (e) => e.is_hidden || e.hidden || e.hide || !1, M = (e, t, s) => {
59
- let l = t;
60
- return e.length <= t && (l = e.findIndex((i) => i === s)), l >= 1 && e.length > 1 ? `${e.slice(0, l).join("/")}/${s ?? ""}` : s ?? "";
61
- }, Y = (e, t = 0) => !e || !e.length ? t : e.every(
62
- (l) => l.headerName === ""
63
- ) ? t - 1 : Math.max(
64
- ...e.map((l) => l.children && l.children.length ? Y(l.children, t + 1) : t),
65
- t
66
- ), ie = (e, t) => {
67
- if (!Array.isArray(e) || t < 0) return [];
68
- if (t === 0) {
69
- const p = /* @__PURE__ */ new Set(), r = [];
70
- for (const d of e) {
71
- const a = d.path;
72
- if (!(a != null && a.length) || !a[0]) continue;
73
- P(d) === a[0] ? r.push(`null-${a[0]}`) : p.has(a[0]) || (p.add(a[0]), r.push(a[0]));
74
- }
75
- return r;
76
- }
77
- const s = /* @__PURE__ */ Object.create(null), l = /* @__PURE__ */ new Map(), i = [], n = [];
78
- let o;
79
- for (const p of e) {
80
- const r = p.path;
81
- if (!(r != null && r.length) || !r[0]) continue;
82
- const d = r[0];
83
- s[d] || (s[d] = [], i.push(d)), s[d].push(r);
84
- const a = P(p);
85
- a && l.set(r, a);
86
- }
87
- for (let p = 0; p < i.length; p++) {
88
- const r = s[i[p]];
89
- if (r.length > 1 && r.some((a) => a.length > 1))
90
- for (const a of r) {
91
- const c = l.get(a);
92
- if (a.length > t) {
93
- const h = a[t];
94
- if (c === a[t]) {
95
- const f = M(
96
- a,
97
- t,
98
- c
99
- );
100
- n.push(`null-${f}`), o = `null-${c}`;
101
- } else if (h !== o) {
102
- const f = M(
103
- a,
104
- t,
105
- h
106
- );
107
- n.push(f), o = h;
108
- }
109
- } else {
110
- const h = M(
111
- a,
112
- t,
113
- c
114
- ), f = h ? `null-${h}` : "null", u = c ? `null-${c}` : "null";
115
- n.push(f), o = u;
116
- }
117
- }
118
- else {
119
- const a = r[0], c = l.get(a), h = M(
120
- a,
121
- t,
122
- c
123
- );
124
- if (a.length > t) {
125
- const f = a[t];
126
- if (c === a[t])
127
- n.push(`null-${h}`);
128
- else if (f !== n[n.length - 1]) {
129
- const u = M(
130
- a,
131
- t,
132
- f
133
- );
134
- n.push(u);
135
- }
136
- } else {
137
- const f = h ? `null-${h}` : "null";
138
- n.push(f);
139
- }
140
- }
141
- }
142
- return n;
143
- }, se = (e) => {
144
- const t = {}, s = (l) => {
145
- Array.isArray(l) && l.forEach((i) => {
146
- var d;
147
- if (typeof i != "object" || i === null) return;
148
- const n = P(i), o = M(
149
- i.path || [],
150
- (((d = i.path) == null ? void 0 : d.length) || 1) - 1,
151
- n
152
- ), p = i.value ? `[${i.value}]` : "", r = o ? `${o}${p}`.toLowerCase() : "";
153
- r && (t[r] = i), o && !t[o.toLowerCase()] && (t[o.toLowerCase()] = i), Array.isArray(i.children) && s(i.children);
154
- });
155
- };
156
- return s(e), t;
157
- }, Re = (e) => {
158
- const t = {}, s = (l) => {
159
- Array.isArray(l) && l.forEach((i) => {
160
- if (!(typeof i != "object" || i === null))
161
- if (!Array.isArray(i.children) || i.children.length === 0) {
162
- const n = P(i);
163
- n && (t[n.toLowerCase()] = i);
164
- } else
165
- s(i.children);
166
- });
167
- };
168
- return s(e), t;
169
- }, Z = (e, t, s = 0, l = null, i = 150, n = [], o = [], p = !1, r = null) => !e || !Array.isArray(e) ? {} : { processedColumns: e.map((a) => {
170
- var W;
171
- const c = a.autoHeight === !0 || p, h = P(a), f = a.value ? `${h}[${a.value}]` : h, u = [...o, f], g = a.children && a.children.length > 0, v = a.children && a.children.some((R) => R.columnGroupShow !== "open") || !1, E = ((W = a.children) == null ? void 0 : W.length) && !v, y = t.isAllGroupExpanded || t[h] === !0 || n.includes(h) || E || !1, m = l ? t[l] === !0 || t.isAllGroupExpanded || n.includes(l) || E : !0, C = a.columnGroupShow === "open" && !m || !l && H(a);
172
- y && m && t[h] !== !0 && !n.includes(h) && E && n.push(h);
173
- const $ = g ? Z(
174
- a.children || [],
175
- t,
176
- s + 1,
177
- f,
178
- // Use pathIdentifier (includes value) for unique parent field
179
- i,
180
- n,
181
- u,
182
- // Pass current path to children
183
- c,
184
- // Pass down autoHeight to children
185
- r
186
- // Pass down column counts
187
- ) : {}, N = g ? $.processedColumns.reduce(
188
- (R, w) => R + (w.colSpan || 1),
189
- 0
190
- ) : 1, L = l !== null, S = L ? !1 : C, T = Object.prototype.hasOwnProperty.call(
191
- a,
192
- "headerName"
193
- ), O = !g, x = {
194
- ...a,
195
- level: s,
196
- parentField: l,
197
- // Store the unique path identifier for this column (includes value for pivot columns)
198
- pathIdentifier: f,
199
- path: u,
200
- // Track column's position in the hierarchy
201
- notApplyGrouping: E,
202
- headerName: a.headerName || a.label || (T ? "" : P(a)),
203
- hasChildren: g,
204
- isExpanded: y,
205
- hidden: S,
206
- is_hidden: C,
207
- belongsToColumnGroup: L,
208
- children: $.processedColumns || [],
209
- colSpan: N,
210
- field: a.field || P(a),
211
- is_frozen: a.is_frozen || a.pinned === "left" || a.pinned === "right",
212
- pinned: a.pinned ? a.pinned : a.is_frozen ? "left" : null,
213
- // rowSpan: 1, // Will be adjusted during header rendering
214
- isLeaf: O,
215
- autoHeight: c,
216
- // Explicitly set autoHeight based on parent or own value
217
- isSearchable: a.isSearchable || a.is_searchable
218
- };
219
- return r && O && !C && (x.is_frozen && x.pinned !== "right" || x.pinned === "left" ? r.left++ : x.is_frozen && x.pinned === "right" ? r.right++ : r.normal++), x;
220
- }), initialGroupedColumns: n };
221
- let D = 0;
222
- const ae = (e, {
223
- pinnedType: t,
224
- minWidth: s = 150
225
- } = {}) => {
226
- if (!e || !Array.isArray(e))
227
- return { headerRows: [], leafColumns: [] };
228
- D = 0;
229
- const l = (c) => H(c) ? !1 : t === "leftPinnedOnly" ? U(c) : t === "rightPinnedOnly" ? G(c) : t === "normal" ? !U(c) && !G(c) : !0, i = Y(e), n = Array(i + 1).fill(null).map(() => []), o = [];
230
- B(
231
- e,
232
- n,
233
- o,
234
- /* @__PURE__ */ new Set(),
235
- i,
236
- l
237
- ), Math.max(...n.map((c) => c.length));
238
- const r = [];
239
- n.forEach((c, h) => {
240
- if (h !== n.length - 1) {
241
- const f = ie(
242
- n[n.length - 1],
243
- h
244
- );
245
- r[h] = f;
246
- } else
247
- r[h] = c;
248
- });
249
- const d = se(e), a = r.map(
250
- (c, h) => h === n.length - 1 ? c : c.map(
251
- (f, u) => {
252
- var g;
253
- if (f.startsWith("null")) {
254
- const v = (g = f.split("-")[1]) == null ? void 0 : g.toLowerCase(), E = d[v], y = (E == null ? void 0 : E.width) || s, m = (E == null ? void 0 : E.is_hidden) || !1;
255
- return {
256
- headerName: "",
257
- isPlaceholder: !0,
258
- isLastInGroup: !1,
259
- depth: h,
260
- colSpan: 1,
261
- rowSpan: 1,
262
- isLeaf: !1,
263
- isStandalone: !1,
264
- field: `empty_${h}_${u}`,
265
- id: `empty_${h}_${u}`,
266
- accessor: `empty_${h}_${u}`,
267
- width: y,
268
- is_hidden: m,
269
- emptyCell: !0,
270
- is_frozen: t === "leftPinnedOnly" || t === "rightPinnedOnly",
271
- pinned: t === "leftPinnedOnly" ? "left" : t === "rightPinnedOnly" ? "right" : null,
272
- children: [],
273
- childColumn: E
274
- };
275
- } else
276
- return d[f.toLowerCase()];
277
- }
278
- )
279
- );
280
- return a.forEach((c) => {
281
- let h = 0, f = 0;
282
- c.forEach((u) => {
283
- const g = le(u, u.hasChildren, s);
284
- u.width = g, h += u.isWithEmptyHeaderName ? 0 : g || 0, f += u.isParentWithChildEmptyHeaderName ? g : 0, u.isWithEmptyHeaderName ? (u.leftTotalWidth = h + g - f, f -= g) : u.leftTotalWidth = h;
285
- });
286
- }), {
287
- headerRows: a,
288
- leafColumns: o
289
- };
290
- }, B = (e, t, s, l, i, n, o = 0, p = [], r = !1) => {
291
- !e || !Array.isArray(e) || e.length === 0 || e.forEach((d) => {
292
- var C, $;
293
- const a = d.field || P(d), c = ne(d, !0), h = d.value ? `[${d.value}]` : "", f = (c == null ? void 0 : c.length) > 1 ? `${c.slice(0, c.length - 1).join("/")}/${a}${h}` : `${a}${h}`;
294
- if (!n(d) || l.has(f))
295
- return;
296
- l.add(f);
297
- const u = d.children && d.children.some((N) => n(N)), g = u && (($ = (C = d.children) == null ? void 0 : C.every) == null ? void 0 : $.call(
298
- C,
299
- (N) => !N.headerName && !N.columnGroupShow
300
- )), v = !u || g, E = v ? i : o;
301
- v || D++;
302
- const y = v ? null : D % 2 === 0 ? "even-column-group" : "odd-column-group";
303
- d.colorClass = y || "";
304
- const m = {
305
- ...d,
306
- isLastInGroup: !1,
307
- // Will be set later
308
- depth: o,
309
- isLeaf: v,
310
- field: a,
311
- isStandalone: v || r,
312
- isParentWithChildEmptyHeaderName: g
313
- };
314
- t[E].push(m), g && d.children && (d.children.forEach((N) => {
315
- N.isLeaf = !0, N.isStandalone = !0, N.isWithEmptyHeaderName = !0;
316
- }), t[E].push(...d.children)), v && (s.push(m), g && s.push(...d.children || [])), u && !g && u && B(
317
- d.children || [],
318
- t,
319
- s,
320
- l,
321
- i,
322
- n,
323
- o + 1,
324
- [...p, a],
325
- !1
326
- );
327
- });
328
- }, Oe = (e, t, s = {}, l) => {
329
- const i = { left: 0, normal: 0, right: 0 }, {
330
- processedColumns: n
331
- // initialGroupedColumns
332
- } = Z(
333
- e,
334
- s,
335
- 0,
336
- null,
337
- l,
338
- [],
339
- [],
340
- !1,
341
- i
342
- ), { headerRows: o, leafColumns: p } = ae(n, {
343
- pinnedType: t,
344
- minWidth: l
345
- });
346
- return {
347
- secondRowColumns: p,
348
- // parentColumns: allParentColumns,
349
- // expandableParentColumns,
350
- headerRows: o,
351
- // New: Include the full header hierarchy
352
- // leafColumns, // New: All leaf nodes (columns with data)
353
- // initialGroupedColumns,
354
- globalColumnCounts: i,
355
- totalColumnsCount: i.left + i.normal + i.right
356
- };
357
- }, We = (e, t) => {
358
- const s = (l) => l.reduce((i, n) => {
359
- if (H(n)) return i + 0;
360
- if (n.children && n.children.length > 0)
361
- return i + s(n.children);
362
- const o = n.width || t;
363
- return i + (o < t ? t : o);
364
- }, 0);
365
- return s(e);
366
- }, U = (e) => e.pinned === "right" ? !1 : e.is_frozen || e.pinned === "left", G = (e) => e.pinned === "right";
367
- function Ie(e, t = {}) {
368
- if (t && typeof t == "object") {
369
- const {
370
- leftPinned: s = !1,
371
- rightPinned: l = !1,
372
- includeHidden: i = !1
373
- } = t;
374
- return l ? e.filter(
375
- (n) => G(n) && (i || !H(n))
376
- ) : s ? e.filter(
377
- (n) => U(n) && (i || !H(n))
378
- ) : e.filter(
379
- (n) => !U(n) && !G(n) && (i || !H(n))
380
- );
381
- }
382
- return e;
383
- }
384
- const le = (e, t, s = 150) => {
385
- const l = (i) => i.children && i.children.length > 0 ? H(i) ? 0 : i.children.reduce(
386
- (n, o) => n + l(o),
387
- 0
388
- ) : H(i) ? 0 : i.width && i.width < s ? s : i.width || s;
389
- return t && e.children && e.children.length > 0 ? H(e) ? 0 : e.children.reduce(
390
- (i, n) => i + l(n),
391
- 0
392
- ) : H(e) ? 0 : e.width && e.width < s ? s : e.width || s;
393
- }, je = (e, t, s, l, i, n) => {
394
- var r;
395
- const o = [];
396
- let p = 0;
397
- for (let d = 0; d < e.length; d++) {
398
- o[d] = p;
399
- const a = e[d];
400
- if (a.__parentId !== void 0) continue;
401
- const c = a.id || a[t] || d;
402
- if (i && ((r = l == null ? void 0 : l.expandedRows) != null && r.includes(c))) {
403
- const f = l.detailRowHeight || 200;
404
- p += f;
405
- }
406
- const h = a[t] || "";
407
- n[d] !== void 0 ? p += n[d] - s : n[h] && (p += n[h] - s);
408
- }
409
- return o;
410
- }, Fe = (e, t, s, l, i, n, o, p, r, d) => {
411
- let a = 0;
412
- const c = Object.keys(r) || [];
413
- if (r && c.length > 0) {
414
- let h = 0;
415
- c.forEach((f) => {
416
- const u = String(f);
417
- if (u.includes("/") && l.includes(u))
418
- a += r[u];
419
- else if (u.includes("/")) {
420
- const g = u.split("/"), v = g.slice(0, g.length - 1).join("/");
421
- l.includes(v) ? a += r[u] : h += 1;
422
- } else
423
- a += r[u];
424
- }), a += (e.length - c.length + h) * t;
425
- } else
426
- a += e.length * t;
427
- return s && (i != null && i.expandedRows) && i.expandedRows.length > 0 && e.forEach((h) => {
428
- var u;
429
- const f = h.id || h[n];
430
- (u = i == null ? void 0 : i.expandedRows) != null && u.includes(f) && (a += (i == null ? void 0 : i.detailRowHeight) || 200);
431
- }), o && (a += K * t), p.length && d && (a += K * t), a;
432
- }, Ve = (e, t, s) => {
433
- var p;
434
- const l = ((p = t.path) == null ? void 0 : p.length) || 0, i = s.length - (e - l + 2), n = s.slice(
435
- i
436
- );
437
- return n.reduce((r, d) => r + d, 0) + 19 * n.length;
438
- }, Ue = (e, t, s = 40) => {
439
- const i = [
440
- e[`left_pinned_${t}`],
441
- e[`normal_${t}`],
442
- e[`right_pinned_${t}`]
443
- ].filter((n) => n);
444
- return i.length === 0 ? { maxHeight: s, maxLineCount: 1 } : i.reduce((n, o) => !n || o.maxHeight > n.maxHeight ? o : n, i[0]);
445
- }, Ge = (e, t, s, l, i) => e ? `${(t.leftTotalWidth || 0) - s + te(
446
- e,
447
- i,
448
- l
449
- )}px` : `${(t.leftTotalWidth || 0) - s}px`, re = (e, t, s) => (e.is_frozen = t, e.pinned = s, e.children && Array.isArray(e.children) && e.children.length > 0 && e.children.forEach((l) => {
450
- re(l, t, s);
451
- }), e), z = ({
452
- onClick: e,
453
- children: t,
454
- variant: s = "primary",
455
- size: l = "large",
456
- iconButton: i = !1,
457
- className: n = "",
458
- disabled: o = !1,
459
- leftIcon: p = null,
460
- rightIcon: r = null,
461
- buttonRef: d = null,
462
- simpleButton: a = !1,
463
- ariaLabel: c = "",
464
- ...h
465
- }) => /* @__PURE__ */ A(
466
- "button",
467
- {
468
- ref: d,
469
- onClick: (f) => {
470
- !o && e && e(f);
471
- },
472
- className: `ia-table-btn cursor-pointer d-flex align-items-center justify-content-center ia-table-btn-${s} ia-table-btn-${l} ${i ? "ia-table-btn-icon" : ""} ${n} ${o ? "ia-table-btn-disabled pointer-events-none" : ""} gap-4 ${a ? "ia-table-btn-simple" : ""}`,
473
- "aria-label": c,
474
- ...h,
475
- children: [
476
- p && p,
477
- i ? t : /* @__PURE__ */ b("div", { className: "ia-table-btn-text", children: t }),
478
- r && r
479
- ]
480
- }
481
- );
482
- class oe {
483
- constructor() {
484
- this.tooltipElement = null, this.currentConfig = null, this.hideTimeout = null;
485
- }
486
- initialize() {
487
- this.tooltipElement || (this.tooltipElement = document.createElement("div"), this.tooltipElement.className = "tooltip d-flex align-items-center justify-content-center", this.tooltipElement.style.position = "absolute", this.tooltipElement.style.top = "0", this.tooltipElement.style.left = "0", document.body.appendChild(this.tooltipElement));
488
- }
489
- show(t) {
490
- this.initialize(), this.currentConfig = t, this.hideTimeout && (clearTimeout(this.hideTimeout), this.hideTimeout = null), this.updateContent(t), requestAnimationFrame(() => {
491
- var s;
492
- this.calculatePosition(t), (s = this.tooltipElement) == null || s.classList.add("tooltip-visible");
493
- });
494
- }
495
- hide() {
496
- this.tooltipElement && (this.tooltipElement.classList.remove("tooltip-visible"), this.currentConfig = null, setTimeout(() => {
497
- this.tooltipElement && !this.currentConfig && (this.tooltipElement.innerHTML = "");
498
- }, 200));
499
- }
500
- updateContent(t) {
501
- const {
502
- title: s,
503
- description: l,
504
- varient: i,
505
- illustration: n,
506
- icon: o,
507
- bodyText: p,
508
- btns: r,
509
- showPaginationAbove: d,
510
- pagination: a
511
- } = t;
512
- if (!this.tooltipElement) return;
513
- this.tooltipElement.className = `tooltip tooltip--${i || "primary"} ${s && l ? "d-flex flex-column align-items-start" : ""}`;
514
- let c = "";
515
- a && d && (c += this.getPaginationHTML(i)), n || (o && (c += `<div class="tooltip-icon">${o}</div>`), s && (c += `<div class="tooltip-title">${s}</div>`), l && (c += `<div class="tooltip-description">${l}</div>`)), (p || r || n || a) && (c += `<button class="tooltip-close d-flex align-items-center justify-content-center" aria-label="Close tooltip">
516
- <svg width="16" height="16" viewBox="0 0 16 16" fill="currentColor">
517
- <path d="M8 7.293l3.646-3.647a.5.5 0 01.708.708L8.707 8l3.647 3.646a.5.5 0 01-.708.708L8 8.707l-3.646 3.647a.5.5 0 01-.708-.708L7.293 8 3.646 4.354a.5.5 0 01.708-.708L8 7.293z"/>
518
- </svg>
519
- </button>`), n && (c += `<div class="tooltip-illustration"><img src="${n}" alt="Illustration" /></div>`), n && (c += '<div class="tooltip-header d-flex align-items-center">', o && (c += `<div class="tooltip-icon">${o}</div>`), s && (c += `<div class="tooltip-title">${s}</div>`), l && (c += `<div class="tooltip-description">${l}</div>`), c += "</div>"), a && !d && (c += this.getPaginationHTML(i)), r && (c += '<div class="tooltip-btns d-flex">', r.forEach((f) => {
520
- let u = f.type;
521
- f.type !== "default" && (i === "primary" || i === "tertiary" ? u = "secondary" : i === "secondary" && (u = "primary")), c += `<button class="${u === "default" ? "btn-no-bg" : `tooltip-btn btn--${u}`}">${f.label}</button>`;
522
- }), c += "</div>"), c += "</div></div>", c += '<div class="tooltip-arrow"></div>', this.tooltipElement.innerHTML = c;
523
- const h = this.tooltipElement.querySelector(
524
- ".tooltip-close"
525
- );
526
- h && (h.onclick = () => this.hide());
527
- }
528
- getPaginationHTML(t) {
529
- return `<div class="tooltip-pagination d-flex align-items-center">
530
- <div class="tooltip-pagination-bar ${t === "secondary" ? "secondary-variant" : ""}"></div>
531
- <div class="tooltip-pagination-bar ${t === "secondary" ? "secondary-variant" : ""}"></div>
532
- <div class="tooltip-pagination-bar ${t === "secondary" ? "secondary-variant" : ""}"></div>
533
- <div class="tooltip-pagination-bar ${t === "secondary" ? "secondary-variant" : ""}"></div>
534
- </div>`;
535
- }
536
- calculatePosition(t) {
537
- var v, E;
538
- const { targetRef: s, orientation: l = "top", varient: i } = t;
539
- if (!(s != null && s.current) || !this.tooltipElement) return;
540
- const n = s.current.getBoundingClientRect(), o = this.tooltipElement.getBoundingClientRect(), p = 8, r = 16, d = {
541
- top: n.top - r,
542
- bottom: window.innerHeight - n.bottom - r,
543
- left: n.left - r,
544
- right: window.innerWidth - n.right - r
545
- }, a = l === "top" ? d.top > o.height : l === "bottom" ? d.bottom > o.height : l === "left" ? d.left > o.width : d.right > o.width, c = Object.entries(d).sort(
546
- (y, m) => m[1] - y[1]
547
- )[0][0], h = a ? l : c;
548
- let f = 0, u = 0;
549
- switch (h) {
550
- case "top":
551
- f = n.top - o.height - p, u = n.left + n.width / 2 - o.width / 2;
552
- break;
553
- case "bottom":
554
- f = n.bottom + p, u = n.left + n.width / 2 - o.width / 2;
555
- break;
556
- case "left":
557
- f = n.top + n.height / 2 - o.height / 2, u = n.left - o.width - p;
558
- break;
559
- case "right":
560
- f = n.top + n.height / 2 - o.height / 2, u = n.right + p;
561
- break;
562
- default:
563
- f = n.top - o.height - p, u = n.left + n.width / 2 - o.width / 2;
564
- }
565
- u = Math.max(
566
- r,
567
- Math.min(u, window.innerWidth - o.width - r)
568
- ), f = Math.max(
569
- r,
570
- Math.min(f, window.innerHeight - o.height - r)
571
- ), this.tooltipElement.style.top = `${f + window.scrollY}px`, this.tooltipElement.style.left = `${u + window.scrollX}px`, this.tooltipElement.className = `tooltip tooltip--${i || "primary"} tooltip--${h} ${(v = this.currentConfig) != null && v.title && ((E = this.currentConfig) != null && E.description) ? "d-flex flex-column align-items-start" : ""}`;
572
- const g = this.tooltipElement.querySelector(
573
- ".tooltip-arrow"
574
- );
575
- if (g)
576
- if (h === "top" || h === "bottom") {
577
- let m = (n.left + n.width / 2 - u) / o.width * 100;
578
- m = Math.max(10, Math.min(90, m)), g.style.left = `${m}%`, g.style.top = "";
579
- } else {
580
- let m = (n.top + n.height / 2 - f) / o.height * 100;
581
- m = Math.max(10, Math.min(90, m)), g.style.top = `${m}%`, g.style.left = "";
582
- }
583
- }
584
- cleanup() {
585
- this.tooltipElement && this.tooltipElement.parentNode && (this.tooltipElement.parentNode.removeChild(this.tooltipElement), this.tooltipElement = null);
586
- }
587
- }
588
- const I = new oe(), ze = ({
589
- title: e,
590
- varient: t,
591
- orientation: s,
592
- children: l,
593
- description: i,
594
- targetRef: n,
595
- illustration: o = "",
596
- icon: p = null,
597
- bodyText: r = "",
598
- btns: d = null,
599
- showPaginationAbove: a = null,
600
- pagination: c = null,
601
- justifyBodyContent: h = null,
602
- forceShowTooltip: f = !1,
603
- className: u = "ia-table-width-inherit"
604
- }) => {
605
- const g = F({
606
- title: e,
607
- description: i,
608
- varient: t,
609
- orientation: s,
610
- targetRef: n,
611
- illustration: o,
612
- icon: p,
613
- bodyText: r,
614
- btns: d,
615
- showPaginationAbove: a,
616
- pagination: c,
617
- justifyBodyContent: h
618
- });
619
- g.current = {
620
- title: e,
621
- description: i,
622
- varient: t,
623
- orientation: s,
624
- targetRef: n,
625
- illustration: o,
626
- icon: p,
627
- bodyText: r,
628
- btns: d,
629
- showPaginationAbove: a,
630
- pagination: c,
631
- justifyBodyContent: h
632
- }, V(() => () => {
633
- I.hide();
634
- }, []);
635
- const v = () => {
636
- if (!(n != null && n.current) || !e)
637
- return;
638
- if (f && e) {
639
- I.show(g.current);
640
- return;
641
- }
642
- const y = n.current, m = y.querySelector("input") || // element.querySelector("div[data-tooltip-title]") ||
643
- y.querySelector(".text-overflow-ellipsis") || y.querySelector(".ia-table-header-string-title") || y.querySelector("span") || y, C = m.classList.contains("ia-table-line-clamp-2") || m.classList.contains("ia-table-line-clamp-3") || window.getComputedStyle(m).webkitLineClamp !== "none";
644
- let $ = !1;
645
- if (C) {
646
- const N = m.scrollHeight, L = m.clientHeight;
647
- $ = N > L;
648
- } else {
649
- const N = m.scrollWidth, L = m.clientWidth;
650
- $ = N > L;
651
- }
652
- $ && I.show(g.current);
653
- }, E = () => {
654
- I.hide();
655
- };
656
- return /* @__PURE__ */ b(
657
- "div",
658
- {
659
- ref: n,
660
- className: `tooltip-container ${u}`,
661
- onMouseEnter: v,
662
- onMouseLeave: E,
663
- onFocus: v,
664
- onBlur: E,
665
- children: l
666
- }
667
- );
668
- }, ce = (e) => /* @__PURE__ */ _.createElement("svg", { width: "1em", height: "1em", viewBox: "0 0 10 10", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...e }, /* @__PURE__ */ _.createElement("path", { d: "M9.66659 1.27325L8.72659 0.333252L4.99992 4.05992L1.27325 0.333252L0.333252 1.27325L4.05992 4.99992L0.333252 8.72659L1.27325 9.66659L4.99992 5.93992L8.72659 9.66659L9.66659 8.72659L5.93992 4.99992L9.66659 1.27325Z", fill: "currentColor" })), De = (e) => /* @__PURE__ */ _.createElement("svg", { width: "1em", height: "1em", viewBox: "0 0 13 12", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...e }, /* @__PURE__ */ _.createElement("path", { d: "M9.09808 7.54717H8.52308L8.31929 7.36192C9.03258 6.57976 9.46201 5.56432 9.46201 4.45969C9.46201 1.99657 7.34397 0 4.731 0C2.11803 0 0 1.99657 0 4.45969C0 6.92281 2.11803 8.91938 4.731 8.91938C5.90284 8.91938 6.98005 8.51458 7.80979 7.8422L8.00631 8.0343V8.57633L11.6455 12L12.73 10.9777L9.09808 7.54717ZM4.731 7.54717C2.91866 7.54717 1.45569 6.1681 1.45569 4.45969C1.45569 2.75129 2.91866 1.37221 4.731 1.37221C6.54334 1.37221 8.00631 2.75129 8.00631 4.45969C8.00631 6.1681 6.54334 7.54717 4.731 7.54717Z", fill: "#60697D" })), de = ({
669
- label: e,
670
- variant: t = "filled",
671
- color: s = "default",
672
- size: l = "default",
673
- className: i = "",
674
- onClick: n,
675
- ...o
676
- }) => {
677
- if (!e) return null;
678
- const p = `ia-table-badge align-items-center justify-content-center ia-table-badge-${t} ia-table-badge-${s} ia-table-badge-size-${l} ${i} ${n ? "cursor-pointer" : ""}`;
679
- return /* @__PURE__ */ b("div", { className: p, onClick: n, ...o, children: /* @__PURE__ */ b("span", { className: "ia-table-badge-label text-overflow-ellipsis", children: e }) });
680
- }, qe = q(de), he = ({
681
- open: e = !1,
682
- onClose: t,
683
- title: s,
684
- children: l,
685
- size: i = "medium",
686
- width: n,
687
- height: o,
688
- className: p = "",
689
- onPrimaryButtonClick: r,
690
- primaryButtonLabel: d = "Confirm",
691
- onSecondaryButtonClick: a,
692
- secondaryButtonLabel: c = "Cancel",
693
- closeOnOutsideClick: h = !0,
694
- primaryButtonVariant: f = "primary",
695
- primaryButtonProps: u = {},
696
- showCloseButton: g = !0,
697
- showPrimaryButton: v = !0,
698
- showSecondaryButton: E = !0
699
- }) => {
700
- const y = F(null);
701
- V(() => {
702
- const S = (T) => {
703
- T.key === "Escape" && e && t();
704
- };
705
- return e && (document.addEventListener("keydown", S), document.body.style.overflow = "hidden"), () => {
706
- document.removeEventListener("keydown", S), document.body.style.overflow = "";
707
- };
708
- }, [e, t]);
709
- const m = j(
710
- (S) => {
711
- h && y.current && !y.current.contains(S.target) && t();
712
- },
713
- [h, t]
714
- );
715
- if (!e) return null;
716
- const C = `ia-table-modal-${i}`, $ = {};
717
- n && ($.width = typeof n == "number" ? `${n}px` : n), o && ($.height = typeof o == "number" ? `${o}px` : o);
718
- const N = v && d || E && c, L = /* @__PURE__ */ b(
719
- "div",
720
- {
721
- className: `ia-table-modal-overlay d-flex align-items-center justify-content-center ${p}`,
722
- onClick: m,
723
- children: /* @__PURE__ */ A(
724
- "div",
725
- {
726
- className: `ia-table-modal d-flex flex-column ${C} `,
727
- style: $,
728
- ref: y,
729
- children: [
730
- /* @__PURE__ */ A("div", { className: "ia-table-modal-header d-flex justify-content-between align-items-center", children: [
731
- /* @__PURE__ */ b("div", { className: "ia-table-modal-header-content", children: s && /* @__PURE__ */ b("h2", { className: "ia-table-modal-title", children: s }) }),
732
- g && /* @__PURE__ */ b(
733
- z,
734
- {
735
- onClick: t,
736
- "aria-label": "Close",
737
- variant: "url",
738
- className: "ia-table-close-button",
739
- size: "small",
740
- iconButton: !0,
741
- children: /* @__PURE__ */ b(ce, { className: "ia-table-close-icon" })
742
- }
743
- )
744
- ] }),
745
- /* @__PURE__ */ b("div", { className: "ia-table-modal-content", children: l }),
746
- N && /* @__PURE__ */ A("div", { className: "ia-table-modal-footer d-flex justify-content-end align-items-center gap-12", children: [
747
- E && c && /* @__PURE__ */ b(
748
- z,
749
- {
750
- onClick: a || t,
751
- variant: "link",
752
- children: c
753
- }
754
- ),
755
- v && d && r && /* @__PURE__ */ b(
756
- z,
757
- {
758
- onClick: r,
759
- variant: f,
760
- ...u,
761
- children: d
762
- }
763
- )
764
- ] })
765
- ]
766
- }
767
- )
768
- }
769
- );
770
- return J(L, document.body);
771
- }, Ke = q(he), fe = ({
772
- placeholder: e = "",
773
- label: t = "",
774
- value: s = "",
775
- onChange: l,
776
- type: i = "text",
777
- disabled: n = !1,
778
- error: o = "",
779
- leftIcon: p = null,
780
- rightIcon: r = null,
781
- className: d = "",
782
- width: a = "100%",
783
- onClick: c = (C) => C.stopPropagation(),
784
- isCellRenderer: h = !1,
785
- inputType: f = "text",
786
- iconButton: u = null,
787
- iconButtonClassName: g = "",
788
- height: v,
789
- autoFocus: E = !1,
790
- rightIconClick: y,
791
- ...m
792
- }) => {
793
- const C = F(null), $ = F(null), [N, L] = X(s);
794
- V(() => {
795
- L(s);
796
- }, [s]), V(() => {
797
- E && C.current && C.current.focus();
798
- }, [E]);
799
- const S = j(() => {
800
- var w;
801
- (w = C.current) == null || w.focus();
802
- }, []), T = j(
803
- (w) => {
804
- if (f === "int" && (w.key === "." || w.keyCode === 190 || w.keyCode === 110))
805
- return w.preventDefault(), !1;
806
- },
807
- [f]
808
- ), O = j(
809
- (w) => {
810
- const k = w.target.value;
811
- switch (f) {
812
- case "int":
813
- (k === "" || /^-?\d*$/.test(k)) && (L(w.target.value), l(w));
814
- break;
815
- case "float":
816
- case "decimal":
817
- (k === "" || /^-?\d*\.?\d*$/.test(k)) && (L(w.target.value), l(w));
818
- break;
819
- case "percentage":
820
- (k === "" || /^\d*\.?\d*%?$/.test(k)) && (L(w.target.value), l(w));
821
- break;
822
- case "dollar":
823
- (k === "" || /^\$?\d*\.?\d*$/.test(k)) && (L(w.target.value), l(w));
824
- break;
825
- case "str":
826
- default:
827
- L(w.target.value), l(w);
828
- break;
829
- }
830
- },
831
- [l, f]
832
- ), x = f === "str" || f === "text", W = f === "str" || f === "text" ? "left" : "right", R = `ia-table-input-container d-flex align-items-center ${n ? h ? "ia-table-cell-render-input-disabled" : "ia-table-input-disabled" : ""} ${o ? "ia-table-input-error" : ""} ${p ? "has-left-icon" : ""} ${r ? "has-right-icon" : ""} ${u && !x ? "has-left-icon-button" : ""} ${u && x ? "has-right-icon-button" : ""} ${h ? "ia-table-cellrender-input" : ""} ${d}
833
- `;
834
- return /* @__PURE__ */ A(
835
- "div",
836
- {
837
- className: `ia-table-inputbox-container d-flex flex-column ${n && h ? "ia-table-cell-render-input-disabled" : ""} `,
838
- style: { width: a, ...v ? { height: v } : {} },
839
- children: [
840
- t && /* @__PURE__ */ b("label", { className: "ia-table-input-label", children: t }),
841
- /* @__PURE__ */ A(
842
- "div",
843
- {
844
- className: R,
845
- onClick: S,
846
- onMouseEnter: () => {
847
- $.current && $.current.classList.add("visible");
848
- },
849
- onMouseLeave: () => {
850
- $.current && $.current.classList.remove("visible");
851
- },
852
- children: [
853
- p && /* @__PURE__ */ b("div", { className: "left-input-icon d-flex align-items-center justify-content-center", children: p }),
854
- u && !x && /* @__PURE__ */ b(
855
- "div",
856
- {
857
- ref: $,
858
- className: `left-input-icon-button d-flex align-items-center justify-content-center ${g}`,
859
- children: u
860
- }
861
- ),
862
- /* @__PURE__ */ b("div", { className: "ia-table-input-wrapper", children: /* @__PURE__ */ b(
863
- "input",
864
- {
865
- ref: C,
866
- type: i,
867
- value: N,
868
- onChange: O,
869
- onClick: c,
870
- onKeyDown: T,
871
- placeholder: e,
872
- disabled: n,
873
- className: "ia-table-input",
874
- style: { textAlign: W },
875
- ...m
876
- }
877
- ) }),
878
- r && /* @__PURE__ */ b(
879
- "div",
880
- {
881
- className: `right-input-icon d-flex align-items-center justify-content-center ${y ? "cursor-pointer" : ""} `,
882
- onClick: y || void 0,
883
- children: r
884
- }
885
- ),
886
- u && x && /* @__PURE__ */ b(
887
- "div",
888
- {
889
- className: `right-input-icon-button d-flex align-items-center justify-content-center ${g}`,
890
- children: u
891
- }
892
- )
893
- ]
894
- }
895
- ),
896
- o && /* @__PURE__ */ b("div", { className: "ia-table-input-error-message", children: o })
897
- ]
898
- }
899
- );
900
- }, Ye = q(fe), ue = (e) => /* @__PURE__ */ _.createElement("svg", { width: "1em", height: "1em", viewBox: "0 0 16 16", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...e }, /* @__PURE__ */ _.createElement("path", { d: "M4 0.5H12C13.933 0.5 15.5 2.067 15.5 4V12C15.5 13.933 13.933 15.5 12 15.5H4C2.067 15.5 0.5 13.933 0.5 12V4C0.5 2.067 2.067 0.5 4 0.5Z", fill: "#ECEEFD" }), /* @__PURE__ */ _.createElement("path", { d: "M4 0.5H12C13.933 0.5 15.5 2.067 15.5 4V12C15.5 13.933 13.933 15.5 12 15.5H4C2.067 15.5 0.5 13.933 0.5 12V4C0.5 2.067 2.067 0.5 4 0.5Z", stroke: "#4259EE" }), /* @__PURE__ */ _.createElement("path", { d: "M11.4375 5.4375L6.75 10.125L4.5625 7.9375", stroke: "#4259EE", strokeWidth: 1.5, strokeLinecap: "round", strokeLinejoin: "round" })), pe = (e) => /* @__PURE__ */ _.createElement("svg", { width: "1em", height: "1em", viewBox: "0 0 16 16", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...e }, /* @__PURE__ */ _.createElement("path", { d: "M4 0.5H12C13.933 0.5 15.5 2.067 15.5 4V12C15.5 13.933 13.933 15.5 12 15.5H4C2.067 15.5 0.5 13.933 0.5 12V4C0.5 2.067 2.067 0.5 4 0.5Z", fill: "white" }), /* @__PURE__ */ _.createElement("path", { d: "M4 0.5H12C13.933 0.5 15.5 2.067 15.5 4V12C15.5 13.933 13.933 15.5 12 15.5H4C2.067 15.5 0.5 13.933 0.5 12V4C0.5 2.067 2.067 0.5 4 0.5Z", stroke: "#C3C8D4" })), Ze = ({
901
- checked: e = !1,
902
- onChange: t,
903
- label: s,
904
- disabled: l = !1,
905
- className: i = ""
906
- }) => {
907
- const n = (o) => {
908
- o.stopPropagation(), !l && t && t(o);
909
- };
910
- return /* @__PURE__ */ A(
911
- "label",
912
- {
913
- className: `ia-checkbox-container d-flex align-items-center gap-6 cursor-pointer ${i} ${l ? "ia-checkbox-disabled" : ""} `,
914
- children: [
915
- /* @__PURE__ */ A("div", { className: "ia-checkbox-wrapper d-flex align-items-center justify-content-center position-relative", children: [
916
- /* @__PURE__ */ b(
917
- "input",
918
- {
919
- type: "checkbox",
920
- checked: e,
921
- onChange: n,
922
- disabled: l,
923
- className: "ia-checkbox-input cursor-pointer"
924
- }
925
- ),
926
- /* @__PURE__ */ b("span", { className: "ia-checkbox-custom d-flex align-items-center justify-content-center", children: e ? /* @__PURE__ */ b(ue, { className: "ia-checkbox-icon" }) : /* @__PURE__ */ b(pe, { className: "ia-checkbox-icon" }) })
927
- ] }),
928
- s && /* @__PURE__ */ b("span", { className: "ia-checkbox-label", children: s })
929
- ]
930
- }
931
- );
932
- }, Be = ({
933
- options: e,
934
- selectedOption: t,
935
- onChange: s,
936
- orientation: l = "vertical",
937
- disabled: i = !1,
938
- name: n = "radio-group",
939
- className: o = ""
940
- }) => {
941
- const p = (r, d) => {
942
- !i && s && s(r, d);
943
- };
944
- return /* @__PURE__ */ b(
945
- "div",
946
- {
947
- className: `ia-table-radio-group-container d-flex gap-16 ${l} ${o}`,
948
- children: e.map((r) => /* @__PURE__ */ A(
949
- "label",
950
- {
951
- className: `ia-table-radio-option d-flex align-items-center gap-8 cursor-pointer position-relative ${t === r.value ? "ia-table-radio-group-selected" : ""}`,
952
- children: [
953
- /* @__PURE__ */ b(
954
- "input",
955
- {
956
- type: "radio",
957
- name: n,
958
- value: r.value,
959
- checked: t === r.value,
960
- onChange: (d) => p(d, r.value),
961
- disabled: i || r.disabled,
962
- "aria-label": r.label,
963
- className: "ia-table-radio-input position-absolute cursor-pointer"
964
- }
965
- ),
966
- /* @__PURE__ */ b("span", { className: "ia-table-radio-custom position-relative d-flex align-items-center justify-content-center" }),
967
- r.label && /* @__PURE__ */ b(
968
- "span",
969
- {
970
- className: `ia-table-radio-label ${t === r.value ? "ia-table-radio-label-selected" : ""}`,
971
- children: r.label
972
- }
973
- )
974
- ]
975
- },
976
- r.value
977
- ))
978
- }
979
- );
980
- };
981
- export {
982
- He as A,
983
- z as B,
984
- Ze as C,
985
- Ae as D,
986
- _e as E,
987
- Le as F,
988
- Ee as G,
989
- ve as H,
990
- Ye as I,
991
- Ne as J,
992
- Pe as K,
993
- Z as L,
994
- Ke as M,
995
- ue as N,
996
- pe as O,
997
- re as P,
998
- Be as R,
999
- ce as S,
1000
- ze as T,
1001
- Ie as a,
1002
- De as b,
1003
- qe as c,
1004
- Ge as d,
1005
- K as e,
1006
- H as f,
1007
- P as g,
1008
- Re as h,
1009
- Ce as i,
1010
- Me as j,
1011
- Te as k,
1012
- $e as l,
1013
- te as m,
1014
- je as n,
1015
- we as o,
1016
- ye as p,
1017
- Fe as q,
1018
- Se as r,
1019
- se as s,
1020
- ke as t,
1021
- M as u,
1022
- Ue as v,
1023
- Ve as w,
1024
- Oe as x,
1025
- We as y,
1026
- xe as z
1027
- };