ia-table 0.14.2 → 0.14.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,7 +1,7 @@
1
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}.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-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-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}@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-table-select-search{padding:9.5px 12px}.ia-table-select-search svg path{fill:#a0a8b1}.ia-table-select-search .ia-table-select-search-input{width:100%;border:none;border-radius:8px;padding:0 10px;font-size:14px;outline:none;background-color:inherit;color:#1f2b4d;line-height:16px}.ia-table-select-search .ia-table-select-search-input:focus{border-color:#4259ee}.ia-table-select-search .ia-table-select-search-input::placeholder{color:#b4bac7}.ia-table-select-dropdown{position:absolute;margin-top:6px;border-radius:12px;box-shadow:0 1px 6px #1a277c24;border:none;padding:8px 6px;background-color:#fff;font-family:Manrope,sans-serif;z-index:1050;min-height:135px;max-height:262px}.ia-table-select-reset{width:20px;height:20px;background:transparent;border:none;margin-left:8px}.ia-table-select-reset svg path{fill:#60697d}.ia-table-select-options{max-height:240px;overflow-y:auto;margin-top:2px}.ia-table-select-options::-webkit-scrollbar{width:6px}.ia-table-select-options::-webkit-scrollbar-track{background:transparent}.ia-table-select-options::-webkit-scrollbar-thumb{background-color:#c3c8d4;border-radius:3px}.ia-table-select-options .ia-table-select-option{padding:7.5px 12px;font-size:14px;color:#1f2b4d;line-height:20px;font-weight:500;transition:background-color .2s ease;border-radius:8px}.ia-table-select-options .ia-table-select-option:hover{background-color:#f5f6fa}.ia-table-select-options .ia-table-select-option.ia-table-select-option-selected,.ia-table-select-options .ia-table-select-option.ia-table-select-option-highlighted{background-color:#eef0ff}.ia-table-select-options .ia-table-select-option.ia-table-option-disabled{cursor:not-allowed;-webkit-user-select:none;user-select:none;color:#b4bac7}.ia-table-select-options .ia-table-select-no-options{padding:12px;text-align:center;color:#a0a8b1;font-style:italic}.ia-table-selectbox-container{width:100%;font-family:Manrope,sans-serif;position:relative;margin:0;padding:0}.ia-table-selectbox-container .ia-table-select-label{font-size:12px;font-weight:500;color:#60697d;line-height:16px;margin-bottom:6px;display:block}.ia-table-selectbox-container .ia-table-select-container{width:100%;height:32px;border:1px solid #d9dde7;border-radius:8px;background-color:#fff;padding:0 12px;cursor:pointer;transition:all .2s ease-in-out;position:relative;margin:0}.ia-table-selectbox-container .ia-table-select-container:hover:not(.ia-table-select-disabled,.ia-table-selectrenderer){border-color:#4259ee}.ia-table-selectbox-container .ia-table-select-container.ia-table-select-disabled{background-color:#f2f4fb;border-color:#e2e8f0;cursor:not-allowed;opacity:.7}.ia-table-selectbox-container .ia-table-select-container.ia-table-selectrenderer{border:none}.ia-table-selectbox-container .ia-table-select-container .ia-table-select-value{flex:1;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-size:14px;font-weight:400;color:#1f2b4d;line-height:19px}.ia-table-selectbox-container .ia-table-select-container .ia-table-select-value:empty:before{content:"Select an option";color:#b4bac7}.ia-table-selectbox-container .ia-table-select-container .ia-table-select-arrow{width:16px;height:16px;transition:transform .2s ease}.ia-table-selectbox-container .ia-table-select-container .ia-table-select-arrow svg{transition:transform .2s ease;fill:#404b62}.ia-table-cell-render-select-disabled .ia-table-select-disabled .ia-table-select-value{color:#b4bac7!important;font-weight:400!important}.ia-table-cell-render-select-disabled .ia-table-select-disabled{border:none!important;background-color:inherit!important;cursor:not-allowed!important}.ia-table-cell-render-select-disabled .ia-table-select-disabled svg path{fill:#d9dde7}.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:2px solid var(--focus-color, #4259ee);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-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
2
  import { jsxs as I, jsx as m } from "react/jsx-runtime";
3
3
  import * as L from "react";
4
- import { useRef as G, useEffect as F, memo as te, useCallback as U, useState as X } from "react";
4
+ import { useRef as G, useEffect as V, memo as te, useCallback as U, useState as X } from "react";
5
5
  import { createPortal as se } from "react-dom";
6
6
  const We = 200, je = 2, ve = 56, be = 48, De = {
7
7
  default: {
@@ -44,7 +44,7 @@ const We = 200, je = 2, ve = 56, be = 48, De = {
44
44
  column: t,
45
45
  frozenColumns: n
46
46
  }) => {
47
- const s = e && t.pinned !== "right", a = e && t.pinned === "right", i = Z(t), o = s && n.positions ? n.positions[i] : null, c = s && n.indexes ? n.indexes.indexOf(i) : null, r = a && n.rightPinned && n.rightPinned.positions ? n.rightPinned.positions[i] : null;
47
+ const s = e && t.pinned !== "right", a = e && t.pinned === "right", i = F(t), o = s && n.positions ? n.positions[i] : null, c = s && n.indexes ? n.indexes.indexOf(i) : null, r = a && n.rightPinned && n.rightPinned.positions ? n.rightPinned.positions[i] : null;
48
48
  return {
49
49
  isPinnedLeft: s,
50
50
  isPinnedRight: a,
@@ -55,7 +55,7 @@ const We = 200, je = 2, ve = 56, be = 48, De = {
55
55
  }, we = (e, t, n) => e ? t || n ? be : ve : 0, et = (e, t) => {
56
56
  let n = e;
57
57
  return t.includes(".") && !n[t] ? (t.split(".").every((a) => n[a] ? (n = n[a], !0) : !1), n) : Object.prototype.hasOwnProperty.call(n, t);
58
- }, Z = (e) => e && (e.colId || e.field || e.column_name || e.accessor || e.groupId || e.headerName) || "", Ce = (e, t = !1) => e.uniqueHierarchyId ? t && e.originalPath ? e.originalPath : e.path || [] : e.path || [], W = (e) => e.is_hidden || e.hidden || e.hide || !1, z = (e, t, n) => {
58
+ }, F = (e) => e && (e.colId || e.field || e.column_name || e.accessor || e.groupId || e.headerName) || "", Ce = (e, t = !1) => e.uniqueHierarchyId ? t && e.originalPath ? e.originalPath : e.path || [] : e.path || [], W = (e) => e.is_hidden || e.hidden || e.hide || !1, z = (e, t, n) => {
59
59
  let s = t;
60
60
  return e.length <= t && (s = e.findIndex((a) => a === n)), s >= 1 && e.length > 1 ? `${e.slice(0, s).join("/")}/${n ?? ""}` : n ?? "";
61
61
  }, re = (e, t = 0) => !e || !e.length ? t : e.every(
@@ -70,7 +70,7 @@ const We = 200, je = 2, ve = 56, be = 48, De = {
70
70
  for (const f of e) {
71
71
  const l = f.path;
72
72
  if (!(l != null && l.length) || !l[0]) continue;
73
- Z(f) === l[0] ? r.push(`null-${l[0]}`) : c.has(l[0]) || (c.add(l[0]), r.push(l[0]));
73
+ F(f) === l[0] ? r.push(`null-${l[0]}`) : c.has(l[0]) || (c.add(l[0]), r.push(l[0]));
74
74
  }
75
75
  return r;
76
76
  }
@@ -81,7 +81,7 @@ const We = 200, je = 2, ve = 56, be = 48, De = {
81
81
  if (!(r != null && r.length) || !r[0]) continue;
82
82
  const f = r[0];
83
83
  n[f] || (n[f] = [], a.push(f)), n[f].push(r);
84
- const l = Z(c);
84
+ const l = F(c);
85
85
  l && s.set(r, l);
86
86
  }
87
87
  for (let c = 0; c < a.length; c++) {
@@ -145,7 +145,7 @@ const We = 200, je = 2, ve = 56, be = 48, De = {
145
145
  Array.isArray(s) && s.forEach((a) => {
146
146
  var f;
147
147
  if (typeof a != "object" || a === null) return;
148
- const i = Z(a), o = z(
148
+ const i = F(a), o = z(
149
149
  a.path || [],
150
150
  (((f = a.path) == null ? void 0 : f.length) || 1) - 1,
151
151
  i
@@ -159,7 +159,7 @@ const We = 200, je = 2, ve = 56, be = 48, De = {
159
159
  Array.isArray(s) && s.forEach((a) => {
160
160
  if (!(typeof a != "object" || a === null))
161
161
  if (!Array.isArray(a.children) || a.children.length === 0) {
162
- const i = Z(a);
162
+ const i = F(a);
163
163
  i && (t[i.toLowerCase()] = a);
164
164
  } else
165
165
  n(a.children);
@@ -167,9 +167,9 @@ const We = 200, je = 2, ve = 56, be = 48, De = {
167
167
  };
168
168
  return n(e), t;
169
169
  }, oe = (e, t, n = 0, s = null, a = 150, i = [], o = [], c = !1, r = null) => !e || !Array.isArray(e) ? {} : { processedColumns: e.map((l) => {
170
- var j;
171
- const p = l.autoHeight === !0 || c, d = Z(l), u = l.value ? `${d}[${l.value}]` : d, h = [...o, u], g = l.children && l.children.length > 0, w = l.children && l.children.some((B) => B.columnGroupShow !== "open") || !1, v = ((j = l.children) == null ? void 0 : j.length) && !w, C = t.isAllGroupExpanded || t[d] === !0 || i.includes(d) || v || !1, N = s ? t[s] === !0 || t.isAllGroupExpanded || i.includes(s) || v : !0, S = l.columnGroupShow === "open" && !N || !s && W(l);
172
- C && N && t[d] !== !0 && !i.includes(d) && v && i.push(d);
170
+ var k;
171
+ const p = l.autoHeight === !0 || c, d = F(l), u = l.value ? `${d}[${l.value}]` : d, h = [...o, u], g = l.children && l.children.length > 0, w = l.children && l.children.some((B) => B.columnGroupShow !== "open") || !1, v = ((k = l.children) == null ? void 0 : k.length) && !w, N = t.isAllGroupExpanded || t[d] === !0 || i.includes(d) || v || !1, $ = s ? t[s] === !0 || t.isAllGroupExpanded || i.includes(s) || v : !0, x = l.columnGroupShow === "open" && !$ || !s && W(l);
172
+ N && $ && t[d] !== !0 && !i.includes(d) && v && i.push(d);
173
173
  const _ = g ? oe(
174
174
  l.children || [],
175
175
  t,
@@ -184,13 +184,13 @@ const We = 200, je = 2, ve = 56, be = 48, De = {
184
184
  // Pass down autoHeight to children
185
185
  r
186
186
  // Pass down column counts
187
- ) : {}, H = g ? _.processedColumns.reduce(
187
+ ) : {}, S = g ? _.processedColumns.reduce(
188
188
  (B, Y) => B + (Y.colSpan || 1),
189
189
  0
190
- ) : 1, A = s !== null, R = A ? !1 : S, V = Object.prototype.hasOwnProperty.call(
190
+ ) : 1, Z = s !== null, A = Z ? !1 : x, R = Object.prototype.hasOwnProperty.call(
191
191
  l,
192
192
  "headerName"
193
- ), $ = !g, x = {
193
+ ), j = !g, y = {
194
194
  ...l,
195
195
  level: n,
196
196
  parentField: s,
@@ -199,24 +199,24 @@ const We = 200, je = 2, ve = 56, be = 48, De = {
199
199
  path: h,
200
200
  // Track column's position in the hierarchy
201
201
  notApplyGrouping: v,
202
- headerName: l.headerName || l.label || (V ? "" : Z(l)),
202
+ headerName: l.headerName || l.label || (R ? "" : F(l)),
203
203
  hasChildren: g,
204
- isExpanded: C,
205
- hidden: R,
206
- is_hidden: S,
207
- belongsToColumnGroup: A,
204
+ isExpanded: N,
205
+ hidden: A,
206
+ is_hidden: x,
207
+ belongsToColumnGroup: Z,
208
208
  children: _.processedColumns || [],
209
- colSpan: H,
210
- field: l.field || Z(l),
209
+ colSpan: S,
210
+ field: l.field || F(l),
211
211
  is_frozen: l.is_frozen || l.pinned === "left" || l.pinned === "right",
212
212
  pinned: l.pinned ? l.pinned : l.is_frozen ? "left" : null,
213
213
  // rowSpan: 1, // Will be adjusted during header rendering
214
- isLeaf: $,
214
+ isLeaf: j,
215
215
  autoHeight: p,
216
216
  // Explicitly set autoHeight based on parent or own value
217
217
  isSearchable: l.isSearchable || l.is_searchable
218
218
  };
219
- return r && $ && !S && (x.is_frozen && x.pinned !== "right" || x.pinned === "left" ? r.left++ : x.is_frozen && x.pinned === "right" ? r.right++ : r.normal++), x;
219
+ return r && j && !x && (y.is_frozen && y.pinned !== "right" || y.pinned === "left" ? r.left++ : y.is_frozen && y.pinned === "right" ? r.right++ : r.normal++), y;
220
220
  }), initialGroupedColumns: i };
221
221
  let ae = 0;
222
222
  const Ne = (e, {
@@ -251,7 +251,7 @@ const Ne = (e, {
251
251
  (u, h) => {
252
252
  var g;
253
253
  if (u.startsWith("null")) {
254
- const w = (g = u.split("-")[1]) == null ? void 0 : g.toLowerCase(), v = f[w], C = (v == null ? void 0 : v.width) || n, N = (v == null ? void 0 : v.is_hidden) || !1;
254
+ const w = (g = u.split("-")[1]) == null ? void 0 : g.toLowerCase(), v = f[w], N = (v == null ? void 0 : v.width) || n, $ = (v == null ? void 0 : v.is_hidden) || !1;
255
255
  return {
256
256
  headerName: "",
257
257
  isPlaceholder: !0,
@@ -264,8 +264,8 @@ const Ne = (e, {
264
264
  field: `empty_${d}_${h}`,
265
265
  id: `empty_${d}_${h}`,
266
266
  accessor: `empty_${d}_${h}`,
267
- width: C,
268
- is_hidden: N,
267
+ width: N,
268
+ is_hidden: $,
269
269
  emptyCell: !0,
270
270
  is_frozen: t === "leftPinnedOnly" || t === "rightPinnedOnly",
271
271
  pinned: t === "leftPinnedOnly" ? "left" : t === "rightPinnedOnly" ? "right" : null,
@@ -289,19 +289,19 @@ const Ne = (e, {
289
289
  };
290
290
  }, ce = (e, t, n, s, a, i, o = 0, c = [], r = !1) => {
291
291
  !e || !Array.isArray(e) || e.length === 0 || e.forEach((f) => {
292
- var S, _;
293
- const l = f.field || Z(f), p = Ce(f, !0), d = f.value ? `[${f.value}]` : "", u = (p == null ? void 0 : p.length) > 1 ? `${p.slice(0, p.length - 1).join("/")}/${l}${d}` : `${l}${d}`;
292
+ var x, _;
293
+ const l = f.field || F(f), p = Ce(f, !0), d = f.value ? `[${f.value}]` : "", u = (p == null ? void 0 : p.length) > 1 ? `${p.slice(0, p.length - 1).join("/")}/${l}${d}` : `${l}${d}`;
294
294
  if (!i(f) || s.has(u))
295
295
  return;
296
296
  s.add(u);
297
- const h = f.children && f.children.some((H) => i(H)), g = h && ((_ = (S = f.children) == null ? void 0 : S.every) == null ? void 0 : _.call(
298
- S,
299
- (H) => !H.headerName && !H.columnGroupShow
297
+ const h = f.children && f.children.some((S) => i(S)), g = h && ((_ = (x = f.children) == null ? void 0 : x.every) == null ? void 0 : _.call(
298
+ x,
299
+ (S) => !S.headerName && !S.columnGroupShow
300
300
  )), w = !h || g, v = w ? a : o;
301
301
  w || ae++;
302
- const C = w ? null : ae % 2 === 0 ? "even-column-group" : "odd-column-group";
303
- f.colorClass = C || "";
304
- const N = {
302
+ const N = w ? null : ae % 2 === 0 ? "even-column-group" : "odd-column-group";
303
+ f.colorClass = N || "";
304
+ const $ = {
305
305
  ...f,
306
306
  isLastInGroup: !1,
307
307
  // Will be set later
@@ -311,9 +311,9 @@ const Ne = (e, {
311
311
  isStandalone: w || r,
312
312
  isParentWithChildEmptyHeaderName: g
313
313
  };
314
- t[v].push(N), g && f.children && (f.children.forEach((H) => {
315
- H.isLeaf = !0, H.isStandalone = !0, H.isWithEmptyHeaderName = !0;
316
- }), t[v].push(...f.children)), w && (n.push(N), g && n.push(...f.children || [])), h && !g && h && ce(
314
+ t[v].push($), g && f.children && (f.children.forEach((S) => {
315
+ S.isLeaf = !0, S.isStandalone = !0, S.isWithEmptyHeaderName = !0;
316
+ }), t[v].push(...f.children)), w && (n.push($), g && n.push(...f.children || [])), h && !g && h && ce(
317
317
  f.children || [],
318
318
  t,
319
319
  n,
@@ -621,7 +621,7 @@ const J = new Le(), dt = ({
621
621
  showPaginationAbove: f,
622
622
  pagination: l,
623
623
  justifyBodyContent: p
624
- }, F(() => () => {
624
+ }, V(() => () => {
625
625
  J.hide();
626
626
  }, []);
627
627
  const g = () => {
@@ -631,17 +631,17 @@ const J = new Le(), dt = ({
631
631
  J.show(h.current);
632
632
  return;
633
633
  }
634
- const v = a.current, C = v.querySelector("input") || // element.querySelector("div[data-tooltip-title]") ||
635
- v.querySelector(".text-overflow-ellipsis") || v.querySelector(".ia-table-header-string-title") || v.querySelector("span") || v, N = C.classList.contains("ia-table-line-clamp-2") || C.classList.contains("ia-table-line-clamp-3") || window.getComputedStyle(C).webkitLineClamp !== "none";
636
- let S = !1;
637
- if (N) {
638
- const _ = C.scrollHeight, H = C.clientHeight;
639
- S = _ > H;
634
+ const v = a.current, N = v.querySelector("input") || // element.querySelector("div[data-tooltip-title]") ||
635
+ v.querySelector(".text-overflow-ellipsis") || v.querySelector(".ia-table-header-string-title") || v.querySelector("span") || v, $ = N.classList.contains("ia-table-line-clamp-2") || N.classList.contains("ia-table-line-clamp-3") || window.getComputedStyle(N).webkitLineClamp !== "none";
636
+ let x = !1;
637
+ if ($) {
638
+ const _ = N.scrollHeight, S = N.clientHeight;
639
+ x = _ > S;
640
640
  } else {
641
- const _ = C.scrollWidth, H = C.clientWidth;
642
- S = _ > H;
641
+ const _ = N.scrollWidth, S = N.clientWidth;
642
+ x = _ > S;
643
643
  }
644
- S && J.show(h.current);
644
+ x && J.show(h.current);
645
645
  }, w = () => {
646
646
  J.hide();
647
647
  };
@@ -689,35 +689,35 @@ const J = new Le(), dt = ({
689
689
  showPrimaryButton: w = !0,
690
690
  showSecondaryButton: v = !0
691
691
  }) => {
692
- const C = G(null);
693
- F(() => {
694
- const R = (V) => {
695
- V.key === "Escape" && e && t();
692
+ const N = G(null);
693
+ V(() => {
694
+ const A = (R) => {
695
+ R.key === "Escape" && e && t();
696
696
  };
697
- return e && (document.addEventListener("keydown", R), document.body.style.overflow = "hidden"), () => {
698
- document.removeEventListener("keydown", R), document.body.style.overflow = "";
697
+ return e && (document.addEventListener("keydown", A), document.body.style.overflow = "hidden"), () => {
698
+ document.removeEventListener("keydown", A), document.body.style.overflow = "";
699
699
  };
700
700
  }, [e, t]);
701
- const N = U(
702
- (R) => {
703
- d && C.current && !C.current.contains(R.target) && t();
701
+ const $ = U(
702
+ (A) => {
703
+ d && N.current && !N.current.contains(A.target) && t();
704
704
  },
705
705
  [d, t]
706
706
  );
707
707
  if (!e) return null;
708
- const S = `ia-table-modal-${a}`, _ = {};
708
+ const x = `ia-table-modal-${a}`, _ = {};
709
709
  i && (_.width = typeof i == "number" ? `${i}px` : i), o && (_.height = typeof o == "number" ? `${o}px` : o);
710
- const H = w && f || v && p, A = /* @__PURE__ */ m(
710
+ const S = w && f || v && p, Z = /* @__PURE__ */ m(
711
711
  "div",
712
712
  {
713
713
  className: "ia-table-modal-overlay d-flex align-items-center justify-content-center",
714
- onClick: N,
714
+ onClick: $,
715
715
  children: /* @__PURE__ */ I(
716
716
  "div",
717
717
  {
718
- className: `ia-table-modal d-flex flex-column ${S} ${c}`,
718
+ className: `ia-table-modal d-flex flex-column ${x} ${c}`,
719
719
  style: _,
720
- ref: C,
720
+ ref: N,
721
721
  children: [
722
722
  /* @__PURE__ */ I("div", { className: "ia-table-modal-header d-flex justify-content-between align-items-center", children: [
723
723
  /* @__PURE__ */ m("div", { className: "ia-table-modal-header-content", children: n && /* @__PURE__ */ m("h2", { className: "ia-table-modal-title", children: n }) }),
@@ -735,7 +735,7 @@ const J = new Le(), dt = ({
735
735
  )
736
736
  ] }),
737
737
  /* @__PURE__ */ m("div", { className: "ia-table-modal-content", children: s }),
738
- H && /* @__PURE__ */ I("div", { className: "ia-table-modal-footer d-flex justify-content-end align-items-center gap-12", children: [
738
+ S && /* @__PURE__ */ I("div", { className: "ia-table-modal-footer d-flex justify-content-end align-items-center gap-12", children: [
739
739
  v && p && /* @__PURE__ */ m(
740
740
  ie,
741
741
  {
@@ -759,7 +759,7 @@ const J = new Le(), dt = ({
759
759
  )
760
760
  }
761
761
  );
762
- return se(A, document.body);
762
+ return se(Z, document.body);
763
763
  }, pt = te(He), ke = ({
764
764
  placeholder: e = "",
765
765
  label: t = "",
@@ -772,48 +772,53 @@ const J = new Le(), dt = ({
772
772
  rightIcon: r = null,
773
773
  className: f = "",
774
774
  width: l = "100%",
775
- onClick: p = (C) => C.stopPropagation(),
775
+ onClick: p = ($) => $.stopPropagation(),
776
776
  isCellRenderer: d = !1,
777
777
  inputType: u = "text",
778
778
  iconButton: h = null,
779
779
  iconButtonClassName: g = "",
780
780
  height: w,
781
- ...v
781
+ autoFocus: v = !1,
782
+ ...N
782
783
  }) => {
783
- const C = G(null), N = G(null), S = U(() => {
784
- var $;
785
- ($ = C.current) == null || $.focus();
786
- }, []), _ = U(
787
- ($) => {
788
- if (u === "int" && ($.key === "." || $.keyCode === 190 || $.keyCode === 110))
789
- return $.preventDefault(), !1;
784
+ const $ = G(null), x = G(null);
785
+ V(() => {
786
+ v && $.current && $.current.focus();
787
+ }, [v]);
788
+ const _ = U(() => {
789
+ var y;
790
+ (y = $.current) == null || y.focus();
791
+ }, []), S = U(
792
+ (y) => {
793
+ if (u === "int" && (y.key === "." || y.keyCode === 190 || y.keyCode === 110))
794
+ return y.preventDefault(), !1;
790
795
  },
791
796
  [u]
792
- ), H = U(
793
- ($) => {
794
- const x = $.target.value;
797
+ ), Z = U(
798
+ (y) => {
799
+ const k = y.target.value;
795
800
  switch (u) {
796
801
  case "int":
797
- (x === "" || /^-?\d*$/.test(x)) && s($);
802
+ (k === "" || /^-?\d*$/.test(k)) && s(y);
798
803
  break;
799
804
  case "float":
800
805
  case "decimal":
801
- (x === "" || /^-?\d*\.?\d*$/.test(x)) && s($);
806
+ (k === "" || /^-?\d*\.?\d*$/.test(k)) && s(y);
802
807
  break;
803
808
  case "percentage":
804
- (x === "" || /^\d*\.?\d*%?$/.test(x)) && s($);
809
+ (k === "" || /^\d*\.?\d*%?$/.test(k)) && s(y);
805
810
  break;
806
811
  case "dollar":
807
- (x === "" || /^\$?\d*\.?\d*$/.test(x)) && s($);
812
+ (k === "" || /^\$?\d*\.?\d*$/.test(k)) && s(y);
808
813
  break;
809
814
  case "str":
810
815
  default:
811
- s($);
816
+ s(y);
812
817
  break;
813
818
  }
814
819
  },
815
820
  [s, u]
816
- ), A = u === "str" || u === "text", R = u === "str" || u === "text" ? "left" : "right", V = `ia-table-input-container d-flex align-items-center ${i ? d ? "ia-table-cell-render-input-disabled" : "ia-table-input-disabled" : ""} ${o ? "ia-table-input-error" : ""} ${c ? "has-left-icon" : ""} ${r ? "has-right-icon" : ""} ${h && !A ? "has-left-icon-button" : ""} ${h && A ? "has-right-icon-button" : ""} ${d ? "ia-table-cellrender-input" : ""} ${f}
821
+ ), A = u === "str" || u === "text", R = u === "str" || u === "text" ? "left" : "right", j = `ia-table-input-container d-flex align-items-center ${i ? d ? "ia-table-cell-render-input-disabled" : "ia-table-input-disabled" : ""} ${o ? "ia-table-input-error" : ""} ${c ? "has-left-icon" : ""} ${r ? "has-right-icon" : ""} ${h && !A ? "has-left-icon-button" : ""} ${h && A ? "has-right-icon-button" : ""} ${d ? "ia-table-cellrender-input" : ""} ${f}
817
822
  `;
818
823
  return /* @__PURE__ */ I(
819
824
  "div",
@@ -825,20 +830,20 @@ const J = new Le(), dt = ({
825
830
  /* @__PURE__ */ I(
826
831
  "div",
827
832
  {
828
- className: V,
829
- onClick: S,
833
+ className: j,
834
+ onClick: _,
830
835
  onMouseEnter: () => {
831
- N.current && N.current.classList.add("visible");
836
+ x.current && x.current.classList.add("visible");
832
837
  },
833
838
  onMouseLeave: () => {
834
- N.current && N.current.classList.remove("visible");
839
+ x.current && x.current.classList.remove("visible");
835
840
  },
836
841
  children: [
837
842
  c && /* @__PURE__ */ m("div", { className: "left-input-icon d-flex align-items-center justify-content-center", children: c }),
838
843
  h && !A && /* @__PURE__ */ m(
839
844
  "div",
840
845
  {
841
- ref: N,
846
+ ref: x,
842
847
  className: `left-input-icon-button d-flex align-items-center justify-content-center ${g}`,
843
848
  children: h
844
849
  }
@@ -846,17 +851,17 @@ const J = new Le(), dt = ({
846
851
  /* @__PURE__ */ m("div", { className: "ia-table-input-wrapper", children: /* @__PURE__ */ m(
847
852
  "input",
848
853
  {
849
- ref: C,
854
+ ref: $,
850
855
  type: a,
851
856
  value: n,
852
- onChange: H,
857
+ onChange: Z,
853
858
  onClick: p,
854
- onKeyDown: _,
859
+ onKeyDown: S,
855
860
  placeholder: e,
856
861
  disabled: i,
857
862
  className: "ia-table-input",
858
863
  style: { textAlign: R },
859
- ...v
864
+ ...N
860
865
  }
861
866
  ) }),
862
867
  r && /* @__PURE__ */ m("div", { className: "right-input-icon d-flex align-items-center justify-content-center", children: r }),
@@ -889,7 +894,7 @@ const J = new Le(), dt = ({
889
894
  }
890
895
  )
891
896
  ] }), Me = (e, t, n) => {
892
- F(() => {
897
+ V(() => {
893
898
  var a;
894
899
  const s = (a = n == null ? void 0 : n.getTableInstance) == null ? void 0 : a.call(n);
895
900
  if (e && t && (s != null && s.current)) {
@@ -930,43 +935,43 @@ const J = new Le(), dt = ({
930
935
  lazyLoadCellRenderer: w = !1,
931
936
  isEnableResetButton: v = !0
932
937
  }) => {
933
- const C = G(null), N = G(null), S = G(null), [_, H] = X(!1), [A, R] = X(""), [V, $] = X(null), [x, j] = X(-1), [B, Y] = X(c), q = p || B || c, T = i !== void 0 ? i : _, D = o || H;
938
+ const N = G(null), $ = G(null), x = G(null), [_, S] = X(!1), [Z, A] = X(""), [R, j] = X(null), [y, k] = X(-1), [B, Y] = X(c), q = p || B || c, T = i !== void 0 ? i : _, D = o || S;
934
939
  Me(T, h, g);
935
940
  const O = U(() => {
936
- if (C.current) {
937
- const E = C.current.getBoundingClientRect();
941
+ if (N.current) {
942
+ const C = N.current.getBoundingClientRect();
938
943
  return {
939
- top: E.bottom + window.scrollY,
940
- left: E.left + window.scrollX,
941
- width: E.width
944
+ top: C.bottom + window.scrollY,
945
+ left: C.left + window.scrollX,
946
+ width: C.width
942
947
  };
943
948
  }
944
949
  return null;
945
950
  }, []);
946
- F(() => {
951
+ V(() => {
947
952
  if (w) {
948
953
  if (r) {
949
- const E = O();
950
- E && $(E);
954
+ const C = O();
955
+ C && j(C);
951
956
  }
952
957
  D(w);
953
958
  }
954
- }, [w, r, O]), F(() => {
959
+ }, [w, r, O]), V(() => {
955
960
  if (T && r) {
956
- const E = O();
957
- E && $(E);
961
+ const C = O();
962
+ C && j(C);
958
963
  }
959
- }, [T, r, O]), F(() => {
960
- const E = (b) => {
961
- C.current && !C.current.contains(b.target) && N.current && !N.current.contains(b.target) && (D(!1), u && u(), h && (g != null && g.tableId) && (window.iaTablePortalOpen || (window.iaTablePortalOpen = {}), window.iaTablePortalOpen[g.tableId] = !1));
962
- }, y = () => {
964
+ }, [T, r, O]), V(() => {
965
+ const C = (b) => {
966
+ N.current && !N.current.contains(b.target) && $.current && !$.current.contains(b.target) && (D(!1), u && u(), h && (g != null && g.tableId) && (window.iaTablePortalOpen || (window.iaTablePortalOpen = {}), window.iaTablePortalOpen[g.tableId] = !1));
967
+ }, E = () => {
963
968
  if (T && r) {
964
969
  const b = O();
965
- b && $(b);
970
+ b && j(b);
966
971
  }
967
972
  };
968
- return T && (document.addEventListener("mousedown", E), r && (window.addEventListener("scroll", y, !0), window.addEventListener("resize", y))), () => {
969
- document.removeEventListener("mousedown", E), r && (window.removeEventListener("scroll", y, !0), window.removeEventListener("resize", y));
973
+ return T && (document.addEventListener("mousedown", C), r && (window.addEventListener("scroll", E, !0), window.addEventListener("resize", E))), () => {
974
+ document.removeEventListener("mousedown", C), r && (window.removeEventListener("scroll", E, !0), window.removeEventListener("resize", E));
970
975
  };
971
976
  }, [
972
977
  T,
@@ -976,149 +981,149 @@ const J = new Le(), dt = ({
976
981
  u,
977
982
  g,
978
983
  O
979
- ]), F(() => {
980
- T && S.current && (S.current.focus(), j(-1));
981
- }, [T]), F(() => {
984
+ ]), V(() => {
985
+ T && x.current && (x.current.focus(), k(-1));
986
+ }, [T]), V(() => {
982
987
  p || c && c.length > 0 && Y(c);
983
988
  }, [c, p, d]);
984
989
  const ue = U(
985
- (E) => {
986
- if (E.stopPropagation(), !a) {
990
+ (C) => {
991
+ if (C.stopPropagation(), !a) {
987
992
  if (!T && r) {
988
- const y = O();
989
- y && $(y);
993
+ const E = O();
994
+ E && j(E);
990
995
  }
991
996
  D(!T), T && u && u();
992
997
  }
993
998
  },
994
999
  [a, T, D, r, O]
995
1000
  ), ne = U(
996
- (E) => {
1001
+ (C) => {
997
1002
  if (l)
998
- if (Array.isArray(n) && n.some((b) => b.value === E.value))
1003
+ if (Array.isArray(n) && n.some((b) => b.value === C.value))
999
1004
  s(
1000
1005
  n.filter(
1001
- (b) => b.value !== E.value
1006
+ (b) => b.value !== C.value
1002
1007
  )
1003
1008
  );
1004
1009
  else {
1005
1010
  const b = Array.isArray(n) ? n : [];
1006
- s([...b, E]);
1011
+ s([...b, C]);
1007
1012
  }
1008
1013
  else
1009
- s(E), D(!1), h && (g != null && g.tableId) && (window.iaTablePortalOpen || (window.iaTablePortalOpen = {}), window.iaTablePortalOpen[g.tableId] = !1);
1014
+ s(C), D(!1), h && (g != null && g.tableId) && (window.iaTablePortalOpen || (window.iaTablePortalOpen = {}), window.iaTablePortalOpen[g.tableId] = !1);
1010
1015
  },
1011
1016
  [l, n, s, D, h]
1012
1017
  ), pe = U(
1013
- (E) => {
1014
- const y = E.target.value.toLowerCase();
1015
- R(y), j(-1);
1018
+ (C) => {
1019
+ const E = C.target.value.toLowerCase();
1020
+ A(E), k(-1);
1016
1021
  const b = p || c;
1017
- if (y) {
1018
- const P = b.filter((k) => k.label && typeof k.label == "string" ? k.label.toLowerCase().includes(y) : k.value && typeof k.value == "string" ? k.value.toLowerCase().includes(y) : k.label && typeof k.label == "number" ? k.label == Number(y) : k.value && typeof k.value == "number" ? k.value == Number(y) : !1);
1022
+ if (E) {
1023
+ const P = b.filter((H) => H.label && typeof H.label == "string" ? H.label.toLowerCase().includes(E) : H.value && typeof H.value == "string" ? H.value.toLowerCase().includes(E) : H.label && typeof H.label == "number" ? H.label == Number(E) : H.value && typeof H.value == "number" ? H.value == Number(E) : !1);
1019
1024
  d ? d(P) : Y(P);
1020
1025
  } else
1021
1026
  d ? d(c) : Y(c);
1022
1027
  },
1023
1028
  [c, p, d]
1024
1029
  );
1025
- F(() => {
1030
+ V(() => {
1026
1031
  if (!T) return;
1027
- const E = (y) => {
1032
+ const C = (E) => {
1028
1033
  const b = q.filter((P) => !P.isDisabled);
1029
- switch (y.key) {
1034
+ switch (E.key) {
1030
1035
  case "ArrowDown":
1031
- y.preventDefault(), y.stopPropagation(), j((P) => {
1032
- const k = P < b.length - 1 ? P + 1 : 0;
1036
+ E.preventDefault(), E.stopPropagation(), k((P) => {
1037
+ const H = P < b.length - 1 ? P + 1 : 0;
1033
1038
  return setTimeout(() => {
1034
1039
  var K;
1035
- const M = (K = N.current) == null ? void 0 : K.querySelector(
1036
- `[data-option-index="${k}"]`
1040
+ const M = (K = $.current) == null ? void 0 : K.querySelector(
1041
+ `[data-option-index="${H}"]`
1037
1042
  );
1038
1043
  M == null || M.scrollIntoView({ block: "nearest" });
1039
- }, 0), k;
1044
+ }, 0), H;
1040
1045
  });
1041
1046
  break;
1042
1047
  case "ArrowUp":
1043
- y.preventDefault(), y.stopPropagation(), j((P) => {
1044
- const k = P > 0 ? P - 1 : b.length - 1;
1048
+ E.preventDefault(), E.stopPropagation(), k((P) => {
1049
+ const H = P > 0 ? P - 1 : b.length - 1;
1045
1050
  return setTimeout(() => {
1046
1051
  var K;
1047
- const M = (K = N.current) == null ? void 0 : K.querySelector(
1048
- `[data-option-index="${k}"]`
1052
+ const M = (K = $.current) == null ? void 0 : K.querySelector(
1053
+ `[data-option-index="${H}"]`
1049
1054
  );
1050
1055
  M == null || M.scrollIntoView({ block: "nearest" });
1051
- }, 0), k;
1056
+ }, 0), H;
1052
1057
  });
1053
1058
  break;
1054
1059
  case "Enter":
1055
- if (y.preventDefault(), y.stopPropagation(), x >= 0 && x < b.length) {
1056
- const P = b[x];
1060
+ if (E.preventDefault(), E.stopPropagation(), y >= 0 && y < b.length) {
1061
+ const P = b[y];
1057
1062
  P && !P.isDisabled && ne(P);
1058
1063
  }
1059
1064
  break;
1060
1065
  case "Escape":
1061
- y.preventDefault(), y.stopPropagation(), D(!1), h && (g != null && g.tableId) && (window.iaTablePortalOpen || (window.iaTablePortalOpen = {}), window.iaTablePortalOpen[g.tableId] = !1);
1066
+ E.preventDefault(), E.stopPropagation(), D(!1), h && (g != null && g.tableId) && (window.iaTablePortalOpen || (window.iaTablePortalOpen = {}), window.iaTablePortalOpen[g.tableId] = !1);
1062
1067
  break;
1063
1068
  }
1064
1069
  };
1065
- return document.addEventListener("keydown", E), () => {
1066
- document.removeEventListener("keydown", E);
1070
+ return document.addEventListener("keydown", C), () => {
1071
+ document.removeEventListener("keydown", C);
1067
1072
  };
1068
1073
  }, [
1069
1074
  T,
1070
1075
  q,
1071
- x,
1076
+ y,
1072
1077
  ne,
1073
1078
  D,
1074
1079
  h,
1075
1080
  g
1076
1081
  ]);
1077
1082
  const ge = `ia-table-select-container d-flex justify-content-between align-items-center ${a ? "ia-table-select-disabled" : ""} ${T ? "ia-table-select-open" : ""} ${h ? "ia-table-selectrenderer" : ""} ${f}`, me = () => {
1078
- const E = q.filter((b) => !b.isDisabled), y = /* @__PURE__ */ I(
1083
+ const C = q.filter((b) => !b.isDisabled), E = /* @__PURE__ */ I(
1079
1084
  "div",
1080
1085
  {
1081
- ref: N,
1086
+ ref: $,
1082
1087
  className: "ia-table-select-dropdown d-flex flex-column",
1083
1088
  onClick: (b) => b.stopPropagation(),
1084
1089
  style: {
1085
- ...r && V ? {
1090
+ ...r && R ? {
1086
1091
  position: "absolute",
1087
- top: `${V.top}px`,
1088
- left: `${V.left}px`,
1089
- width: `${V.width}px`
1092
+ top: `${R.top}px`,
1093
+ left: `${R.left}px`,
1094
+ width: `${R.width}px`
1090
1095
  } : { width: t }
1091
1096
  },
1092
1097
  children: [
1093
1098
  /* @__PURE__ */ m(
1094
1099
  Te,
1095
1100
  {
1096
- inputRef: S,
1101
+ inputRef: x,
1097
1102
  type: "text",
1098
- value: A,
1103
+ value: Z,
1099
1104
  onChange: pe,
1100
1105
  placeholder: "Search here..."
1101
1106
  }
1102
1107
  ),
1103
1108
  /* @__PURE__ */ m("div", { className: "ia-table-select-options d-flex flex-column gap-2", children: q && q.length > 0 ? q.map((b) => {
1104
- const P = E.findIndex(
1109
+ const P = C.findIndex(
1105
1110
  (M) => M.value === b.value
1106
- ), k = P === x;
1111
+ ), H = P === y;
1107
1112
  return /* @__PURE__ */ I(
1108
1113
  "div",
1109
1114
  {
1110
1115
  "data-option-index": P,
1111
1116
  className: `ia-table-select-option cursor-pointer d-flex align-items-center gap-6 ${l ? Array.isArray(n) && n.some(
1112
1117
  (M) => M.value === b.value
1113
- ) ? "ia-table-select-option-selected" : "" : n && !Array.isArray(n) && n.value === b.value ? "ia-table-select-option-selected" : ""} ${b.isDisabled ? "ia-table-option-disabled" : ""} ${k ? "ia-table-select-option-highlighted" : ""}`,
1118
+ ) ? "ia-table-select-option-selected" : "" : n && !Array.isArray(n) && n.value === b.value ? "ia-table-select-option-selected" : ""} ${b.isDisabled ? "ia-table-option-disabled" : ""} ${H ? "ia-table-select-option-highlighted" : ""}`,
1114
1119
  onClick: (M) => {
1115
1120
  M.stopPropagation(), b.isDisabled || ne(b);
1116
1121
  },
1117
1122
  onMouseEnter: () => {
1118
- b.isDisabled || j(P);
1123
+ b.isDisabled || k(P);
1119
1124
  },
1120
1125
  onMouseLeave: () => {
1121
- b.isDisabled || j(-1);
1126
+ b.isDisabled || k(-1);
1122
1127
  },
1123
1128
  children: [
1124
1129
  l && Array.isArray(n) && n.some(
@@ -1133,7 +1138,7 @@ const J = new Le(), dt = ({
1133
1138
  ]
1134
1139
  }
1135
1140
  );
1136
- return r ? se(y, document.body) : y;
1141
+ return r ? se(E, document.body) : E;
1137
1142
  };
1138
1143
  return /* @__PURE__ */ I(
1139
1144
  "div",
@@ -1145,7 +1150,7 @@ const J = new Le(), dt = ({
1145
1150
  /* @__PURE__ */ I(
1146
1151
  "div",
1147
1152
  {
1148
- ref: C,
1153
+ ref: N,
1149
1154
  className: ge,
1150
1155
  onClick: ue,
1151
1156
  children: [
@@ -1154,8 +1159,8 @@ const J = new Le(), dt = ({
1154
1159
  "button",
1155
1160
  {
1156
1161
  className: "ia-table-select-reset cursor-pointer flex-shrink-0 d-flex align-items-center justify-content-center",
1157
- onClick: (E) => {
1158
- E.stopPropagation(), s([]);
1162
+ onClick: (C) => {
1163
+ C.stopPropagation(), s([]);
1159
1164
  },
1160
1165
  children: /* @__PURE__ */ m(de, { className: "icon-10" })
1161
1166
  }
@@ -1295,7 +1300,7 @@ export {
1295
1300
  tt as d,
1296
1301
  we as e,
1297
1302
  ft as f,
1298
- Z as g,
1303
+ F as g,
1299
1304
  at as h,
1300
1305
  ht as i,
1301
1306
  bt as j,