ia-table 0.15.0 → 0.15.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/RadioGroup-D3RQET6P.js +1099 -0
- package/dist/chat.d.ts +10 -0
- package/dist/chat.js +8327 -8228
- package/dist/{chat.type-_co7njq2.js → chat.type-DlHf-J-u.js} +1636 -1620
- package/dist/index.d.ts +17 -0
- package/dist/index.js +5720 -5596
- package/dist/pivot.d.ts +10 -0
- package/dist/pivot.js +2 -2
- package/dist/right-arrow-CAPmbx1Z.js +413 -0
- package/package.json +1 -1
- package/dist/RadioGroup-Cv9QL-Yd.js +0 -1027
- package/dist/right-arrow-5CR5OWUs.js +0 -340
|
@@ -0,0 +1,1099 @@
|
|
|
1
|
+
(function(){"use strict";try{if(typeof document<"u"){var a=document.createElement("style");a.appendChild(document.createTextNode('@charset "UTF-8";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-table-skeleton{display:block;background-color:#0000001c;height:1.2em}.ia-table-skeleton:before{content:" "}.ia-table-skeleton-text{margin-top:0;margin-bottom:0;height:auto;transform-origin:0 55%;transform:scaleY(.6);border-radius:4px/6.7px}.ia-table-skeleton-text:empty:before{content:" "}.ia-table-skeleton-circular{border-radius:50%}.ia-table-skeleton-rectangular{border-radius:0}.ia-table-skeleton-rounded{border-radius:4px}.ia-table-skeleton-pulse{animation:ia-table-skeleton-pulse 2s ease-in-out .5s infinite}@keyframes ia-table-skeleton-pulse{0%{opacity:1}50%{opacity:.4}to{opacity:1}}.ia-table-skeleton-wave{position:relative;overflow:hidden}.ia-table-skeleton-wave:after{content:"";position:absolute;top:0;right:0;bottom:0;left:0;transform:translate(-100%);background:linear-gradient(90deg,transparent,rgba(255,255,255,.4),transparent);animation:ia-table-skeleton-wave 1.6s linear .5s infinite}@keyframes ia-table-skeleton-wave{0%{transform:translate(-100%)}50%{transform:translate(100%)}to{transform:translate(100%)}}.ia-table-skeleton-with-children{max-width:fit-content}.ia-table-skeleton-with-children .ia-table-skeleton-children{visibility:hidden}.ia-table-skeleton-inline{display:inline-block}.ia-table-loader{display:flex;flex-direction:column;align-items:center;position:relative}.ia-table-loader--small .ia-table-loader__spinner,.ia-table-loader--small .ia-table-loader__progress,.ia-table-loader--small .ia-table-loader__spinner-outer,.ia-table-loader--small .ia-table-loader__progress-outer{width:24px;height:24px}.ia-table-loader--small .ia-table-loader__spinner-inner,.ia-table-loader--small .ia-table-loader__progress-inner{width:20px;height:20px;top:2px;left:2px}.ia-table-loader--medium .ia-table-loader__spinner,.ia-table-loader--medium .ia-table-loader__progress,.ia-table-loader--medium .ia-table-loader__spinner-outer,.ia-table-loader--medium .ia-table-loader__progress-outer{width:48px;height:48px}.ia-table-loader--medium .ia-table-loader__spinner-inner,.ia-table-loader--medium .ia-table-loader__progress-inner{width:40px;height:40px;top:4px;left:4px}.ia-table-loader--large .ia-table-loader__spinner,.ia-table-loader--large .ia-table-loader__progress,.ia-table-loader--large .ia-table-loader__spinner-outer,.ia-table-loader--large .ia-table-loader__progress-outer{width:72px;height:72px}.ia-table-loader--large .ia-table-loader__spinner-inner,.ia-table-loader--large .ia-table-loader__progress-inner{width:60px;height:60px;top:6px;left:6px}.ia-table-loader__spinner{position:relative}.ia-table-loader__spinner-outer{border-radius:50%;position:relative;background:conic-gradient(from 180deg at 50% 50%,#4259ee00,#4259ee 360deg);animation:ia-table-loader-spin 1s linear infinite}.ia-table-loader__spinner-inner{border-radius:50%;background-color:#fff;position:absolute;animation:ia-table-loader-spin 1s linear infinite reverse}.ia-table-loader__progress{position:relative}.ia-table-loader__progress-outer{border-radius:50%;position:relative;background:conic-gradient(from 180deg at 50% 50%,#4259ee00,#4259ee 360deg);animation:ia-table-loader-spin 1s linear infinite}.ia-table-loader__progress-inner{border-radius:50%;background-color:#fff;position:absolute;display:flex;justify-content:center;align-items:center;animation:ia-table-loader-spin 1s linear infinite reverse}.ia-table-loader__progress-text{font-family:Manrope,sans-serif;font-size:12px;font-weight:500;line-height:16.39px;text-align:center;color:#0d152c}.ia-table-loader__text{font-family:Manrope,sans-serif;font-size:12px;font-weight:500;line-height:16.39px;text-align:center;margin-top:4px;color:#0d152c}@keyframes ia-table-loader-spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.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(a)}}catch(t){console.error("vite-plugin-css-injected-by-js",t)}})();
|
|
2
|
+
import { jsxs as _, jsx as g } from "react/jsx-runtime";
|
|
3
|
+
import * as H from "react";
|
|
4
|
+
import { useRef as F, useEffect as V, memo as B, useCallback as I, useState as J } from "react";
|
|
5
|
+
import { createPortal as Q } from "react-dom";
|
|
6
|
+
const ye = 200, we = 2, ee = 56, te = 48, $e = {
|
|
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
|
+
}, Ne = {
|
|
20
|
+
46: "32px",
|
|
21
|
+
30: "24px",
|
|
22
|
+
52: "32px"
|
|
23
|
+
}, Ce = 16, Le = [
|
|
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
|
+
], _e = 0, xe = "furthestFromViewport", He = 2, ke = !1, Ae = "infiniteCache", Pe = {
|
|
39
|
+
maxPersistedBlocks: 5,
|
|
40
|
+
persistBlockData: !0,
|
|
41
|
+
compressionEnabled: !1
|
|
42
|
+
}, Se = 1e6, K = 3, Me = 7, Te = 6, Re = ({
|
|
43
|
+
isFrozen: e,
|
|
44
|
+
column: t,
|
|
45
|
+
frozenColumns: a
|
|
46
|
+
}) => {
|
|
47
|
+
const s = e && t.pinned !== "right", n = e && t.pinned === "right", i = A(t), r = s && a.positions ? a.positions[i] : null, h = s && a.indexes ? a.indexes.indexOf(i) : null, o = n && a.rightPinned && a.rightPinned.positions ? a.rightPinned.positions[i] : null;
|
|
48
|
+
return {
|
|
49
|
+
isPinnedLeft: s,
|
|
50
|
+
isPinnedRight: n,
|
|
51
|
+
frozenPosition: r,
|
|
52
|
+
frozenIndex: h,
|
|
53
|
+
rightPinnedPosition: o
|
|
54
|
+
};
|
|
55
|
+
}, ie = (e, t, a) => e ? t || a ? te : ee : 0, Oe = (e, t) => {
|
|
56
|
+
let a = e;
|
|
57
|
+
return t.includes(".") && !a[t] ? (t.split(".").every((n) => a[n] ? (a = a[n], !0) : !1), a) : Object.prototype.hasOwnProperty.call(a, t);
|
|
58
|
+
}, A = (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 || [], k = (e) => e.is_hidden || e.hidden || e.hide || !1, M = (e, t, a) => {
|
|
59
|
+
let s = t;
|
|
60
|
+
return e.length <= t && (s = e.findIndex((n) => n === a)), s >= 1 && e.length > 1 ? `${e.slice(0, s).join("/")}/${a ?? ""}` : a ?? "";
|
|
61
|
+
}, Y = (e, t = 0) => !e || !e.length ? t : e.every(
|
|
62
|
+
(s) => s.headerName === ""
|
|
63
|
+
) ? t - 1 : Math.max(
|
|
64
|
+
...e.map((s) => s.children && s.children.length ? Y(s.children, t + 1) : t),
|
|
65
|
+
t
|
|
66
|
+
), ae = (e, t) => {
|
|
67
|
+
if (!Array.isArray(e) || t < 0) return [];
|
|
68
|
+
if (t === 0) {
|
|
69
|
+
const h = /* @__PURE__ */ new Set(), o = [];
|
|
70
|
+
for (const d of e) {
|
|
71
|
+
const l = d.path;
|
|
72
|
+
if (!(l != null && l.length) || !l[0]) continue;
|
|
73
|
+
A(d) === l[0] ? o.push(`null-${l[0]}`) : h.has(l[0]) || (h.add(l[0]), o.push(l[0]));
|
|
74
|
+
}
|
|
75
|
+
return o;
|
|
76
|
+
}
|
|
77
|
+
const a = /* @__PURE__ */ Object.create(null), s = /* @__PURE__ */ new Map(), n = [], i = [];
|
|
78
|
+
let r;
|
|
79
|
+
for (const h of e) {
|
|
80
|
+
const o = h.path;
|
|
81
|
+
if (!(o != null && o.length) || !o[0]) continue;
|
|
82
|
+
const d = o[0];
|
|
83
|
+
a[d] || (a[d] = [], n.push(d)), a[d].push(o);
|
|
84
|
+
const l = A(h);
|
|
85
|
+
l && s.set(o, l);
|
|
86
|
+
}
|
|
87
|
+
for (let h = 0; h < n.length; h++) {
|
|
88
|
+
const o = a[n[h]];
|
|
89
|
+
if (o.length > 1 && o.some((l) => l.length > 1))
|
|
90
|
+
for (const l of o) {
|
|
91
|
+
const c = s.get(l);
|
|
92
|
+
if (l.length > t) {
|
|
93
|
+
const f = l[t];
|
|
94
|
+
if (c === l[t]) {
|
|
95
|
+
const u = M(
|
|
96
|
+
l,
|
|
97
|
+
t,
|
|
98
|
+
c
|
|
99
|
+
);
|
|
100
|
+
i.push(`null-${u}`), r = `null-${c}`;
|
|
101
|
+
} else if (f !== r) {
|
|
102
|
+
const u = M(
|
|
103
|
+
l,
|
|
104
|
+
t,
|
|
105
|
+
f
|
|
106
|
+
);
|
|
107
|
+
i.push(u), r = f;
|
|
108
|
+
}
|
|
109
|
+
} else {
|
|
110
|
+
const f = M(
|
|
111
|
+
l,
|
|
112
|
+
t,
|
|
113
|
+
c
|
|
114
|
+
), u = f ? `null-${f}` : "null", p = c ? `null-${c}` : "null";
|
|
115
|
+
i.push(u), r = p;
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
else {
|
|
119
|
+
const l = o[0], c = s.get(l), f = M(
|
|
120
|
+
l,
|
|
121
|
+
t,
|
|
122
|
+
c
|
|
123
|
+
);
|
|
124
|
+
if (l.length > t) {
|
|
125
|
+
const u = l[t];
|
|
126
|
+
if (c === l[t])
|
|
127
|
+
i.push(`null-${f}`);
|
|
128
|
+
else if (u !== i[i.length - 1]) {
|
|
129
|
+
const p = M(
|
|
130
|
+
l,
|
|
131
|
+
t,
|
|
132
|
+
u
|
|
133
|
+
);
|
|
134
|
+
i.push(p);
|
|
135
|
+
}
|
|
136
|
+
} else {
|
|
137
|
+
const u = f ? `null-${f}` : "null";
|
|
138
|
+
i.push(u);
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
return i;
|
|
143
|
+
}, se = (e) => {
|
|
144
|
+
const t = {}, a = (s) => {
|
|
145
|
+
Array.isArray(s) && s.forEach((n) => {
|
|
146
|
+
var d;
|
|
147
|
+
if (typeof n != "object" || n === null) return;
|
|
148
|
+
const i = A(n), r = M(
|
|
149
|
+
n.path || [],
|
|
150
|
+
(((d = n.path) == null ? void 0 : d.length) || 1) - 1,
|
|
151
|
+
i
|
|
152
|
+
), h = n.value ? `[${n.value}]` : "", o = r ? `${r}${h}`.toLowerCase() : "";
|
|
153
|
+
o && (t[o] = n), r && !t[r.toLowerCase()] && (t[r.toLowerCase()] = n), Array.isArray(n.children) && a(n.children);
|
|
154
|
+
});
|
|
155
|
+
};
|
|
156
|
+
return a(e), t;
|
|
157
|
+
}, We = (e) => {
|
|
158
|
+
const t = {}, a = (s) => {
|
|
159
|
+
Array.isArray(s) && s.forEach((n) => {
|
|
160
|
+
if (!(typeof n != "object" || n === null))
|
|
161
|
+
if (!Array.isArray(n.children) || n.children.length === 0) {
|
|
162
|
+
const i = A(n);
|
|
163
|
+
i && (t[i.toLowerCase()] = n);
|
|
164
|
+
} else
|
|
165
|
+
a(n.children);
|
|
166
|
+
});
|
|
167
|
+
};
|
|
168
|
+
return a(e), t;
|
|
169
|
+
}, Z = (e, t, a = 0, s = null, n = 150, i = [], r = [], h = !1, o = null) => !e || !Array.isArray(e) ? {} : { processedColumns: e.map((l) => {
|
|
170
|
+
var W;
|
|
171
|
+
const c = l.autoHeight === !0 || h, f = A(l), u = l.value ? `${f}[${l.value}]` : f, p = [...r, u], m = l.children && l.children.length > 0, E = l.children && l.children.some((R) => R.columnGroupShow !== "open") || !1, v = ((W = l.children) == null ? void 0 : W.length) && !E, y = t.isAllGroupExpanded || t[f] === !0 || i.includes(f) || v || !1, b = s ? t[s] === !0 || t.isAllGroupExpanded || i.includes(s) || v : !0, $ = l.columnGroupShow === "open" && !b || !s && k(l);
|
|
172
|
+
y && b && t[f] !== !0 && !i.includes(f) && v && i.push(f);
|
|
173
|
+
const N = m ? Z(
|
|
174
|
+
l.children || [],
|
|
175
|
+
t,
|
|
176
|
+
a + 1,
|
|
177
|
+
u,
|
|
178
|
+
// Use pathIdentifier (includes value) for unique parent field
|
|
179
|
+
n,
|
|
180
|
+
i,
|
|
181
|
+
p,
|
|
182
|
+
// Pass current path to children
|
|
183
|
+
c,
|
|
184
|
+
// Pass down autoHeight to children
|
|
185
|
+
o
|
|
186
|
+
// Pass down column counts
|
|
187
|
+
) : {}, C = m ? N.processedColumns.reduce(
|
|
188
|
+
(R, w) => R + (w.colSpan || 1),
|
|
189
|
+
0
|
|
190
|
+
) : 1, L = s !== null, P = L ? !1 : $, T = Object.prototype.hasOwnProperty.call(
|
|
191
|
+
l,
|
|
192
|
+
"headerName"
|
|
193
|
+
), O = !m, x = {
|
|
194
|
+
...l,
|
|
195
|
+
level: a,
|
|
196
|
+
parentField: s,
|
|
197
|
+
// Store the unique path identifier for this column (includes value for pivot columns)
|
|
198
|
+
pathIdentifier: u,
|
|
199
|
+
path: p,
|
|
200
|
+
// Track column's position in the hierarchy
|
|
201
|
+
notApplyGrouping: v,
|
|
202
|
+
headerName: l.headerName || l.label || (T ? "" : A(l)),
|
|
203
|
+
hasChildren: m,
|
|
204
|
+
isExpanded: y,
|
|
205
|
+
hidden: P,
|
|
206
|
+
is_hidden: $,
|
|
207
|
+
belongsToColumnGroup: L,
|
|
208
|
+
children: N.processedColumns || [],
|
|
209
|
+
colSpan: C,
|
|
210
|
+
field: l.field || A(l),
|
|
211
|
+
is_frozen: l.is_frozen || l.pinned === "left" || l.pinned === "right",
|
|
212
|
+
pinned: l.pinned ? l.pinned : l.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: l.isSearchable || l.is_searchable
|
|
218
|
+
};
|
|
219
|
+
return o && O && !$ && (x.is_frozen && x.pinned !== "right" || x.pinned === "left" ? o.left++ : x.is_frozen && x.pinned === "right" ? o.right++ : o.normal++), x;
|
|
220
|
+
}), initialGroupedColumns: i };
|
|
221
|
+
let z = 0;
|
|
222
|
+
const le = (e, {
|
|
223
|
+
pinnedType: t,
|
|
224
|
+
minWidth: a = 150
|
|
225
|
+
} = {}) => {
|
|
226
|
+
if (!e || !Array.isArray(e))
|
|
227
|
+
return { headerRows: [], leafColumns: [] };
|
|
228
|
+
z = 0;
|
|
229
|
+
const s = (c) => k(c) ? !1 : t === "leftPinnedOnly" ? U(c) : t === "rightPinnedOnly" ? D(c) : t === "normal" ? !U(c) && !D(c) : !0, n = Y(e), i = Array(n + 1).fill(null).map(() => []), r = [];
|
|
230
|
+
X(
|
|
231
|
+
e,
|
|
232
|
+
i,
|
|
233
|
+
r,
|
|
234
|
+
/* @__PURE__ */ new Set(),
|
|
235
|
+
n,
|
|
236
|
+
s
|
|
237
|
+
), Math.max(...i.map((c) => c.length));
|
|
238
|
+
const o = [];
|
|
239
|
+
i.forEach((c, f) => {
|
|
240
|
+
if (f !== i.length - 1) {
|
|
241
|
+
const u = ae(
|
|
242
|
+
i[i.length - 1],
|
|
243
|
+
f
|
|
244
|
+
);
|
|
245
|
+
o[f] = u;
|
|
246
|
+
} else
|
|
247
|
+
o[f] = c;
|
|
248
|
+
});
|
|
249
|
+
const d = se(e), l = o.map(
|
|
250
|
+
(c, f) => f === i.length - 1 ? c : c.map(
|
|
251
|
+
(u, p) => {
|
|
252
|
+
var m;
|
|
253
|
+
if (u.startsWith("null")) {
|
|
254
|
+
const E = (m = u.split("-")[1]) == null ? void 0 : m.toLowerCase(), v = d[E], y = (v == null ? void 0 : v.width) || a, b = (v == null ? void 0 : v.is_hidden) || !1;
|
|
255
|
+
return {
|
|
256
|
+
headerName: "",
|
|
257
|
+
isPlaceholder: !0,
|
|
258
|
+
isLastInGroup: !1,
|
|
259
|
+
depth: f,
|
|
260
|
+
colSpan: 1,
|
|
261
|
+
rowSpan: 1,
|
|
262
|
+
isLeaf: !1,
|
|
263
|
+
isStandalone: !1,
|
|
264
|
+
field: `empty_${f}_${p}`,
|
|
265
|
+
id: `empty_${f}_${p}`,
|
|
266
|
+
accessor: `empty_${f}_${p}`,
|
|
267
|
+
width: y,
|
|
268
|
+
is_hidden: b,
|
|
269
|
+
emptyCell: !0,
|
|
270
|
+
is_frozen: t === "leftPinnedOnly" || t === "rightPinnedOnly",
|
|
271
|
+
pinned: t === "leftPinnedOnly" ? "left" : t === "rightPinnedOnly" ? "right" : null,
|
|
272
|
+
children: [],
|
|
273
|
+
childColumn: v
|
|
274
|
+
};
|
|
275
|
+
} else
|
|
276
|
+
return d[u.toLowerCase()];
|
|
277
|
+
}
|
|
278
|
+
)
|
|
279
|
+
);
|
|
280
|
+
return l.forEach((c) => {
|
|
281
|
+
let f = 0, u = 0;
|
|
282
|
+
c.forEach((p) => {
|
|
283
|
+
const m = re(p, p.hasChildren, a);
|
|
284
|
+
p.width = m, f += p.isWithEmptyHeaderName ? 0 : m || 0, u += p.isParentWithChildEmptyHeaderName ? m : 0, p.isWithEmptyHeaderName ? (p.leftTotalWidth = f + m - u, u -= m) : p.leftTotalWidth = f;
|
|
285
|
+
});
|
|
286
|
+
}), {
|
|
287
|
+
headerRows: l,
|
|
288
|
+
leafColumns: r
|
|
289
|
+
};
|
|
290
|
+
}, X = (e, t, a, s, n, i, r = 0, h = [], o = !1) => {
|
|
291
|
+
!e || !Array.isArray(e) || e.length === 0 || e.forEach((d) => {
|
|
292
|
+
var $, N;
|
|
293
|
+
const l = d.field || A(d), c = ne(d, !0), f = d.value ? `[${d.value}]` : "", u = (c == null ? void 0 : c.length) > 1 ? `${c.slice(0, c.length - 1).join("/")}/${l}${f}` : `${l}${f}`;
|
|
294
|
+
if (!i(d) || s.has(u))
|
|
295
|
+
return;
|
|
296
|
+
s.add(u);
|
|
297
|
+
const p = d.children && d.children.some((C) => i(C)), m = p && ((N = ($ = d.children) == null ? void 0 : $.every) == null ? void 0 : N.call(
|
|
298
|
+
$,
|
|
299
|
+
(C) => !C.headerName && !C.columnGroupShow
|
|
300
|
+
)), E = !p || m, v = E ? n : r;
|
|
301
|
+
E || z++;
|
|
302
|
+
const y = E ? null : z % 2 === 0 ? "even-column-group" : "odd-column-group";
|
|
303
|
+
d.colorClass = y || "";
|
|
304
|
+
const b = {
|
|
305
|
+
...d,
|
|
306
|
+
isLastInGroup: !1,
|
|
307
|
+
// Will be set later
|
|
308
|
+
depth: r,
|
|
309
|
+
isLeaf: E,
|
|
310
|
+
field: l,
|
|
311
|
+
isStandalone: E || o,
|
|
312
|
+
isParentWithChildEmptyHeaderName: m
|
|
313
|
+
};
|
|
314
|
+
t[v].push(b), m && d.children && (d.children.forEach((C) => {
|
|
315
|
+
C.isLeaf = !0, C.isStandalone = !0, C.isWithEmptyHeaderName = !0;
|
|
316
|
+
}), t[v].push(...d.children)), E && (a.push(b), m && a.push(...d.children || [])), p && !m && p && X(
|
|
317
|
+
d.children || [],
|
|
318
|
+
t,
|
|
319
|
+
a,
|
|
320
|
+
s,
|
|
321
|
+
n,
|
|
322
|
+
i,
|
|
323
|
+
r + 1,
|
|
324
|
+
[...h, l],
|
|
325
|
+
!1
|
|
326
|
+
);
|
|
327
|
+
});
|
|
328
|
+
}, je = (e, t, a = {}, s) => {
|
|
329
|
+
const n = { left: 0, normal: 0, right: 0 }, {
|
|
330
|
+
processedColumns: i
|
|
331
|
+
// initialGroupedColumns
|
|
332
|
+
} = Z(
|
|
333
|
+
e,
|
|
334
|
+
a,
|
|
335
|
+
0,
|
|
336
|
+
null,
|
|
337
|
+
s,
|
|
338
|
+
[],
|
|
339
|
+
[],
|
|
340
|
+
!1,
|
|
341
|
+
n
|
|
342
|
+
), { headerRows: r, leafColumns: h } = le(i, {
|
|
343
|
+
pinnedType: t,
|
|
344
|
+
minWidth: s
|
|
345
|
+
});
|
|
346
|
+
return {
|
|
347
|
+
secondRowColumns: h,
|
|
348
|
+
// parentColumns: allParentColumns,
|
|
349
|
+
// expandableParentColumns,
|
|
350
|
+
headerRows: r,
|
|
351
|
+
// New: Include the full header hierarchy
|
|
352
|
+
// leafColumns, // New: All leaf nodes (columns with data)
|
|
353
|
+
// initialGroupedColumns,
|
|
354
|
+
globalColumnCounts: n,
|
|
355
|
+
totalColumnsCount: n.left + n.normal + n.right
|
|
356
|
+
};
|
|
357
|
+
}, Ie = (e, t) => {
|
|
358
|
+
const a = (s) => s.reduce((n, i) => {
|
|
359
|
+
if (k(i)) return n + 0;
|
|
360
|
+
if (i.children && i.children.length > 0)
|
|
361
|
+
return n + a(i.children);
|
|
362
|
+
const r = i.width || t;
|
|
363
|
+
return n + (r < t ? t : r);
|
|
364
|
+
}, 0);
|
|
365
|
+
return a(e);
|
|
366
|
+
}, U = (e) => e.pinned === "right" ? !1 : e.is_frozen || e.pinned === "left", D = (e) => e.pinned === "right";
|
|
367
|
+
function Fe(e, t = {}) {
|
|
368
|
+
if (t && typeof t == "object") {
|
|
369
|
+
const {
|
|
370
|
+
leftPinned: a = !1,
|
|
371
|
+
rightPinned: s = !1,
|
|
372
|
+
includeHidden: n = !1
|
|
373
|
+
} = t;
|
|
374
|
+
return s ? e.filter(
|
|
375
|
+
(i) => D(i) && (n || !k(i))
|
|
376
|
+
) : a ? e.filter(
|
|
377
|
+
(i) => U(i) && (n || !k(i))
|
|
378
|
+
) : e.filter(
|
|
379
|
+
(i) => !U(i) && !D(i) && (n || !k(i))
|
|
380
|
+
);
|
|
381
|
+
}
|
|
382
|
+
return e;
|
|
383
|
+
}
|
|
384
|
+
const re = (e, t, a = 150) => {
|
|
385
|
+
const s = (n) => n.children && n.children.length > 0 ? k(n) ? 0 : n.children.reduce(
|
|
386
|
+
(i, r) => i + s(r),
|
|
387
|
+
0
|
|
388
|
+
) : k(n) ? 0 : n.width && n.width < a ? a : n.width || a;
|
|
389
|
+
return t && e.children && e.children.length > 0 ? k(e) ? 0 : e.children.reduce(
|
|
390
|
+
(n, i) => n + s(i),
|
|
391
|
+
0
|
|
392
|
+
) : k(e) ? 0 : e.width && e.width < a ? a : e.width || a;
|
|
393
|
+
}, Ve = (e, t, a, s, n, i) => {
|
|
394
|
+
var o;
|
|
395
|
+
const r = [];
|
|
396
|
+
let h = 0;
|
|
397
|
+
for (let d = 0; d < e.length; d++) {
|
|
398
|
+
r[d] = h;
|
|
399
|
+
const l = e[d];
|
|
400
|
+
if (l.__parentId !== void 0) continue;
|
|
401
|
+
const c = l.id || l[t] || d;
|
|
402
|
+
if (n && ((o = s == null ? void 0 : s.expandedRows) != null && o.includes(c))) {
|
|
403
|
+
const u = s.detailRowHeight || 200;
|
|
404
|
+
h += u;
|
|
405
|
+
}
|
|
406
|
+
const f = l[t] || "";
|
|
407
|
+
i[d] !== void 0 ? h += i[d] - a : i[f] && (h += i[f] - a);
|
|
408
|
+
}
|
|
409
|
+
return r;
|
|
410
|
+
}, Ue = (e, t, a, s, n, i, r, h, o, d) => {
|
|
411
|
+
let l = 0;
|
|
412
|
+
const c = Object.keys(o) || [];
|
|
413
|
+
if (o && c.length > 0) {
|
|
414
|
+
let f = 0;
|
|
415
|
+
c.forEach((u) => {
|
|
416
|
+
const p = String(u);
|
|
417
|
+
if (p.includes("/") && s.includes(p))
|
|
418
|
+
l += o[p];
|
|
419
|
+
else if (p.includes("/")) {
|
|
420
|
+
const m = p.split("/"), E = m.slice(0, m.length - 1).join("/");
|
|
421
|
+
s.includes(E) ? l += o[p] : f += 1;
|
|
422
|
+
} else
|
|
423
|
+
l += o[p];
|
|
424
|
+
}), l += (e.length - c.length + f) * t;
|
|
425
|
+
} else
|
|
426
|
+
l += e.length * t;
|
|
427
|
+
return a && (n != null && n.expandedRows) && n.expandedRows.length > 0 && e.forEach((f) => {
|
|
428
|
+
var p;
|
|
429
|
+
const u = f.id || f[i];
|
|
430
|
+
(p = n == null ? void 0 : n.expandedRows) != null && p.includes(u) && (l += (n == null ? void 0 : n.detailRowHeight) || 200);
|
|
431
|
+
}), r && (l += K * t), h.length && d && (l += K * t), l;
|
|
432
|
+
}, De = (e, t, a) => {
|
|
433
|
+
var h;
|
|
434
|
+
const s = ((h = t.path) == null ? void 0 : h.length) || 0, n = a.length - (e - s + 2), i = a.slice(
|
|
435
|
+
n
|
|
436
|
+
);
|
|
437
|
+
return i.reduce((o, d) => o + d, 0) + 19 * i.length;
|
|
438
|
+
}, Ge = (e, t, a = 40) => {
|
|
439
|
+
const n = [
|
|
440
|
+
e[`left_pinned_${t}`],
|
|
441
|
+
e[`normal_${t}`],
|
|
442
|
+
e[`right_pinned_${t}`]
|
|
443
|
+
].filter((i) => i);
|
|
444
|
+
return n.length === 0 ? { maxHeight: a, maxLineCount: 1 } : n.reduce((i, r) => !i || r.maxHeight > i.maxHeight ? r : i, n[0]);
|
|
445
|
+
}, qe = (e, t, a, s, n) => e ? `${(t.leftTotalWidth || 0) - a + ie(
|
|
446
|
+
e,
|
|
447
|
+
n,
|
|
448
|
+
s
|
|
449
|
+
)}px` : `${(t.leftTotalWidth || 0) - a}px`, oe = (e, t, a) => (e.is_frozen = t, e.pinned = a, e.children && Array.isArray(e.children) && e.children.length > 0 && e.children.forEach((s) => {
|
|
450
|
+
oe(s, t, a);
|
|
451
|
+
}), e), G = ({
|
|
452
|
+
onClick: e,
|
|
453
|
+
children: t,
|
|
454
|
+
variant: a = "primary",
|
|
455
|
+
size: s = "large",
|
|
456
|
+
iconButton: n = !1,
|
|
457
|
+
className: i = "",
|
|
458
|
+
disabled: r = !1,
|
|
459
|
+
leftIcon: h = null,
|
|
460
|
+
rightIcon: o = null,
|
|
461
|
+
buttonRef: d = null,
|
|
462
|
+
simpleButton: l = !1,
|
|
463
|
+
ariaLabel: c = "",
|
|
464
|
+
...f
|
|
465
|
+
}) => /* @__PURE__ */ _(
|
|
466
|
+
"button",
|
|
467
|
+
{
|
|
468
|
+
ref: d,
|
|
469
|
+
onClick: (u) => {
|
|
470
|
+
!r && e && e(u);
|
|
471
|
+
},
|
|
472
|
+
className: `ia-table-btn cursor-pointer d-flex align-items-center justify-content-center ia-table-btn-${a} ia-table-btn-${s} ${n ? "ia-table-btn-icon" : ""} ${i} ${r ? "ia-table-btn-disabled pointer-events-none" : ""} gap-4 ${l ? "ia-table-btn-simple" : ""}`,
|
|
473
|
+
"aria-label": c,
|
|
474
|
+
...f,
|
|
475
|
+
children: [
|
|
476
|
+
h && h,
|
|
477
|
+
n ? t : /* @__PURE__ */ g("div", { className: "ia-table-btn-text", children: t }),
|
|
478
|
+
o && o
|
|
479
|
+
]
|
|
480
|
+
}
|
|
481
|
+
);
|
|
482
|
+
class ce {
|
|
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 a;
|
|
492
|
+
this.calculatePosition(t), (a = this.tooltipElement) == null || a.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: a,
|
|
503
|
+
description: s,
|
|
504
|
+
varient: n,
|
|
505
|
+
illustration: i,
|
|
506
|
+
icon: r,
|
|
507
|
+
bodyText: h,
|
|
508
|
+
btns: o,
|
|
509
|
+
showPaginationAbove: d,
|
|
510
|
+
pagination: l
|
|
511
|
+
} = t;
|
|
512
|
+
if (!this.tooltipElement) return;
|
|
513
|
+
this.tooltipElement.className = `tooltip tooltip--${n || "primary"} ${a && s ? "d-flex flex-column align-items-start" : ""}`;
|
|
514
|
+
let c = "";
|
|
515
|
+
l && d && (c += this.getPaginationHTML(n)), i || (r && (c += `<div class="tooltip-icon">${r}</div>`), a && (c += `<div class="tooltip-title">${a}</div>`), s && (c += `<div class="tooltip-description">${s}</div>`)), (h || o || i || l) && (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>`), i && (c += `<div class="tooltip-illustration"><img src="${i}" alt="Illustration" /></div>`), i && (c += '<div class="tooltip-header d-flex align-items-center">', r && (c += `<div class="tooltip-icon">${r}</div>`), a && (c += `<div class="tooltip-title">${a}</div>`), s && (c += `<div class="tooltip-description">${s}</div>`), c += "</div>"), l && !d && (c += this.getPaginationHTML(n)), o && (c += '<div class="tooltip-btns d-flex">', o.forEach((u) => {
|
|
520
|
+
let p = u.type;
|
|
521
|
+
u.type !== "default" && (n === "primary" || n === "tertiary" ? p = "secondary" : n === "secondary" && (p = "primary")), c += `<button class="${p === "default" ? "btn-no-bg" : `tooltip-btn btn--${p}`}">${u.label}</button>`;
|
|
522
|
+
}), c += "</div>"), c += "</div></div>", c += '<div class="tooltip-arrow"></div>', this.tooltipElement.innerHTML = c;
|
|
523
|
+
const f = this.tooltipElement.querySelector(
|
|
524
|
+
".tooltip-close"
|
|
525
|
+
);
|
|
526
|
+
f && (f.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 E, v;
|
|
538
|
+
const { targetRef: a, orientation: s = "top", varient: n } = t;
|
|
539
|
+
if (!(a != null && a.current) || !this.tooltipElement) return;
|
|
540
|
+
const i = a.current.getBoundingClientRect(), r = this.tooltipElement.getBoundingClientRect(), h = 8, o = 16, d = {
|
|
541
|
+
top: i.top - o,
|
|
542
|
+
bottom: window.innerHeight - i.bottom - o,
|
|
543
|
+
left: i.left - o,
|
|
544
|
+
right: window.innerWidth - i.right - o
|
|
545
|
+
}, l = s === "top" ? d.top > r.height : s === "bottom" ? d.bottom > r.height : s === "left" ? d.left > r.width : d.right > r.width, c = Object.entries(d).sort(
|
|
546
|
+
(y, b) => b[1] - y[1]
|
|
547
|
+
)[0][0], f = l ? s : c;
|
|
548
|
+
let u = 0, p = 0;
|
|
549
|
+
switch (f) {
|
|
550
|
+
case "top":
|
|
551
|
+
u = i.top - r.height - h, p = i.left + i.width / 2 - r.width / 2;
|
|
552
|
+
break;
|
|
553
|
+
case "bottom":
|
|
554
|
+
u = i.bottom + h, p = i.left + i.width / 2 - r.width / 2;
|
|
555
|
+
break;
|
|
556
|
+
case "left":
|
|
557
|
+
u = i.top + i.height / 2 - r.height / 2, p = i.left - r.width - h;
|
|
558
|
+
break;
|
|
559
|
+
case "right":
|
|
560
|
+
u = i.top + i.height / 2 - r.height / 2, p = i.right + h;
|
|
561
|
+
break;
|
|
562
|
+
default:
|
|
563
|
+
u = i.top - r.height - h, p = i.left + i.width / 2 - r.width / 2;
|
|
564
|
+
}
|
|
565
|
+
p = Math.max(
|
|
566
|
+
o,
|
|
567
|
+
Math.min(p, window.innerWidth - r.width - o)
|
|
568
|
+
), u = Math.max(
|
|
569
|
+
o,
|
|
570
|
+
Math.min(u, window.innerHeight - r.height - o)
|
|
571
|
+
), this.tooltipElement.style.top = `${u + window.scrollY}px`, this.tooltipElement.style.left = `${p + window.scrollX}px`, this.tooltipElement.className = `tooltip tooltip--${n || "primary"} tooltip--${f} ${(E = this.currentConfig) != null && E.title && ((v = this.currentConfig) != null && v.description) ? "d-flex flex-column align-items-start" : ""}`;
|
|
572
|
+
const m = this.tooltipElement.querySelector(
|
|
573
|
+
".tooltip-arrow"
|
|
574
|
+
);
|
|
575
|
+
if (m)
|
|
576
|
+
if (f === "top" || f === "bottom") {
|
|
577
|
+
let b = (i.left + i.width / 2 - p) / r.width * 100;
|
|
578
|
+
b = Math.max(10, Math.min(90, b)), m.style.left = `${b}%`, m.style.top = "";
|
|
579
|
+
} else {
|
|
580
|
+
let b = (i.top + i.height / 2 - u) / r.height * 100;
|
|
581
|
+
b = Math.max(10, Math.min(90, b)), m.style.top = `${b}%`, m.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 j = new ce(), ze = ({
|
|
589
|
+
title: e,
|
|
590
|
+
varient: t,
|
|
591
|
+
orientation: a,
|
|
592
|
+
children: s,
|
|
593
|
+
description: n,
|
|
594
|
+
targetRef: i,
|
|
595
|
+
illustration: r = "",
|
|
596
|
+
icon: h = null,
|
|
597
|
+
bodyText: o = "",
|
|
598
|
+
btns: d = null,
|
|
599
|
+
showPaginationAbove: l = null,
|
|
600
|
+
pagination: c = null,
|
|
601
|
+
justifyBodyContent: f = null,
|
|
602
|
+
forceShowTooltip: u = !1,
|
|
603
|
+
className: p = "ia-table-width-inherit"
|
|
604
|
+
}) => {
|
|
605
|
+
const m = F({
|
|
606
|
+
title: e,
|
|
607
|
+
description: n,
|
|
608
|
+
varient: t,
|
|
609
|
+
orientation: a,
|
|
610
|
+
targetRef: i,
|
|
611
|
+
illustration: r,
|
|
612
|
+
icon: h,
|
|
613
|
+
bodyText: o,
|
|
614
|
+
btns: d,
|
|
615
|
+
showPaginationAbove: l,
|
|
616
|
+
pagination: c,
|
|
617
|
+
justifyBodyContent: f
|
|
618
|
+
});
|
|
619
|
+
m.current = {
|
|
620
|
+
title: e,
|
|
621
|
+
description: n,
|
|
622
|
+
varient: t,
|
|
623
|
+
orientation: a,
|
|
624
|
+
targetRef: i,
|
|
625
|
+
illustration: r,
|
|
626
|
+
icon: h,
|
|
627
|
+
bodyText: o,
|
|
628
|
+
btns: d,
|
|
629
|
+
showPaginationAbove: l,
|
|
630
|
+
pagination: c,
|
|
631
|
+
justifyBodyContent: f
|
|
632
|
+
}, V(() => () => {
|
|
633
|
+
j.hide();
|
|
634
|
+
}, []);
|
|
635
|
+
const E = () => {
|
|
636
|
+
if (!(i != null && i.current) || !e)
|
|
637
|
+
return;
|
|
638
|
+
if (u && e) {
|
|
639
|
+
j.show(m.current);
|
|
640
|
+
return;
|
|
641
|
+
}
|
|
642
|
+
const y = i.current, b = 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, $ = b.classList.contains("ia-table-line-clamp-2") || b.classList.contains("ia-table-line-clamp-3") || window.getComputedStyle(b).webkitLineClamp !== "none";
|
|
644
|
+
let N = !1;
|
|
645
|
+
if ($) {
|
|
646
|
+
const C = b.scrollHeight, L = b.clientHeight;
|
|
647
|
+
N = C > L;
|
|
648
|
+
} else {
|
|
649
|
+
const C = b.scrollWidth, L = b.clientWidth;
|
|
650
|
+
N = C > L;
|
|
651
|
+
}
|
|
652
|
+
N && j.show(m.current);
|
|
653
|
+
}, v = () => {
|
|
654
|
+
j.hide();
|
|
655
|
+
};
|
|
656
|
+
return /* @__PURE__ */ g(
|
|
657
|
+
"div",
|
|
658
|
+
{
|
|
659
|
+
ref: i,
|
|
660
|
+
className: `tooltip-container ${p}`,
|
|
661
|
+
onMouseEnter: E,
|
|
662
|
+
onMouseLeave: v,
|
|
663
|
+
onFocus: E,
|
|
664
|
+
onBlur: v,
|
|
665
|
+
children: s
|
|
666
|
+
}
|
|
667
|
+
);
|
|
668
|
+
}, de = (e) => /* @__PURE__ */ H.createElement("svg", { width: "1em", height: "1em", viewBox: "0 0 10 10", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...e }, /* @__PURE__ */ H.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" })), Be = (e) => /* @__PURE__ */ H.createElement("svg", { width: "1em", height: "1em", viewBox: "0 0 13 12", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...e }, /* @__PURE__ */ H.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" })), he = ({
|
|
669
|
+
label: e,
|
|
670
|
+
variant: t = "filled",
|
|
671
|
+
color: a = "default",
|
|
672
|
+
size: s = "default",
|
|
673
|
+
className: n = "",
|
|
674
|
+
onClick: i,
|
|
675
|
+
...r
|
|
676
|
+
}) => {
|
|
677
|
+
if (!e) return null;
|
|
678
|
+
const h = `ia-table-badge align-items-center justify-content-center ia-table-badge-${t} ia-table-badge-${a} ia-table-badge-size-${s} ${n} ${i ? "cursor-pointer" : ""}`;
|
|
679
|
+
return /* @__PURE__ */ g("div", { className: h, onClick: i, ...r, children: /* @__PURE__ */ g("span", { className: "ia-table-badge-label text-overflow-ellipsis", children: e }) });
|
|
680
|
+
}, Ke = B(he), fe = ({
|
|
681
|
+
open: e = !1,
|
|
682
|
+
onClose: t,
|
|
683
|
+
title: a,
|
|
684
|
+
children: s,
|
|
685
|
+
size: n = "medium",
|
|
686
|
+
width: i,
|
|
687
|
+
height: r,
|
|
688
|
+
className: h = "",
|
|
689
|
+
onPrimaryButtonClick: o,
|
|
690
|
+
primaryButtonLabel: d = "Confirm",
|
|
691
|
+
onSecondaryButtonClick: l,
|
|
692
|
+
secondaryButtonLabel: c = "Cancel",
|
|
693
|
+
closeOnOutsideClick: f = !0,
|
|
694
|
+
primaryButtonVariant: u = "primary",
|
|
695
|
+
primaryButtonProps: p = {},
|
|
696
|
+
showCloseButton: m = !0,
|
|
697
|
+
showPrimaryButton: E = !0,
|
|
698
|
+
showSecondaryButton: v = !0
|
|
699
|
+
}) => {
|
|
700
|
+
const y = F(null);
|
|
701
|
+
V(() => {
|
|
702
|
+
const P = (T) => {
|
|
703
|
+
T.key === "Escape" && e && t();
|
|
704
|
+
};
|
|
705
|
+
return e && (document.addEventListener("keydown", P), document.body.style.overflow = "hidden"), () => {
|
|
706
|
+
document.removeEventListener("keydown", P), document.body.style.overflow = "";
|
|
707
|
+
};
|
|
708
|
+
}, [e, t]);
|
|
709
|
+
const b = I(
|
|
710
|
+
(P) => {
|
|
711
|
+
f && y.current && !y.current.contains(P.target) && t();
|
|
712
|
+
},
|
|
713
|
+
[f, t]
|
|
714
|
+
);
|
|
715
|
+
if (!e) return null;
|
|
716
|
+
const $ = `ia-table-modal-${n}`, N = {};
|
|
717
|
+
i && (N.width = typeof i == "number" ? `${i}px` : i), r && (N.height = typeof r == "number" ? `${r}px` : r);
|
|
718
|
+
const C = E && d || v && c, L = /* @__PURE__ */ g(
|
|
719
|
+
"div",
|
|
720
|
+
{
|
|
721
|
+
className: `ia-table-modal-overlay d-flex align-items-center justify-content-center ${h}`,
|
|
722
|
+
onClick: b,
|
|
723
|
+
children: /* @__PURE__ */ _(
|
|
724
|
+
"div",
|
|
725
|
+
{
|
|
726
|
+
className: `ia-table-modal d-flex flex-column ${$} `,
|
|
727
|
+
style: N,
|
|
728
|
+
ref: y,
|
|
729
|
+
children: [
|
|
730
|
+
/* @__PURE__ */ _("div", { className: "ia-table-modal-header d-flex justify-content-between align-items-center", children: [
|
|
731
|
+
/* @__PURE__ */ g("div", { className: "ia-table-modal-header-content", children: a && /* @__PURE__ */ g("h2", { className: "ia-table-modal-title", children: a }) }),
|
|
732
|
+
m && /* @__PURE__ */ g(
|
|
733
|
+
G,
|
|
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__ */ g(de, { className: "ia-table-close-icon" })
|
|
742
|
+
}
|
|
743
|
+
)
|
|
744
|
+
] }),
|
|
745
|
+
/* @__PURE__ */ g("div", { className: "ia-table-modal-content", children: s }),
|
|
746
|
+
C && /* @__PURE__ */ _("div", { className: "ia-table-modal-footer d-flex justify-content-end align-items-center gap-12", children: [
|
|
747
|
+
v && c && /* @__PURE__ */ g(
|
|
748
|
+
G,
|
|
749
|
+
{
|
|
750
|
+
onClick: l || t,
|
|
751
|
+
variant: "link",
|
|
752
|
+
children: c
|
|
753
|
+
}
|
|
754
|
+
),
|
|
755
|
+
E && d && o && /* @__PURE__ */ g(
|
|
756
|
+
G,
|
|
757
|
+
{
|
|
758
|
+
onClick: o,
|
|
759
|
+
variant: u,
|
|
760
|
+
...p,
|
|
761
|
+
children: d
|
|
762
|
+
}
|
|
763
|
+
)
|
|
764
|
+
] })
|
|
765
|
+
]
|
|
766
|
+
}
|
|
767
|
+
)
|
|
768
|
+
}
|
|
769
|
+
);
|
|
770
|
+
return Q(L, document.body);
|
|
771
|
+
}, Ye = B(fe), ue = ({
|
|
772
|
+
placeholder: e = "",
|
|
773
|
+
label: t = "",
|
|
774
|
+
value: a = "",
|
|
775
|
+
onChange: s,
|
|
776
|
+
type: n = "text",
|
|
777
|
+
disabled: i = !1,
|
|
778
|
+
error: r = "",
|
|
779
|
+
leftIcon: h = null,
|
|
780
|
+
rightIcon: o = null,
|
|
781
|
+
className: d = "",
|
|
782
|
+
width: l = "100%",
|
|
783
|
+
onClick: c = ($) => $.stopPropagation(),
|
|
784
|
+
isCellRenderer: f = !1,
|
|
785
|
+
inputType: u = "text",
|
|
786
|
+
iconButton: p = null,
|
|
787
|
+
iconButtonClassName: m = "",
|
|
788
|
+
height: E,
|
|
789
|
+
autoFocus: v = !1,
|
|
790
|
+
rightIconClick: y,
|
|
791
|
+
...b
|
|
792
|
+
}) => {
|
|
793
|
+
const $ = F(null), N = F(null), [C, L] = J(a);
|
|
794
|
+
V(() => {
|
|
795
|
+
L(a);
|
|
796
|
+
}, [a]), V(() => {
|
|
797
|
+
v && $.current && $.current.focus();
|
|
798
|
+
}, [v]);
|
|
799
|
+
const P = I(() => {
|
|
800
|
+
var w;
|
|
801
|
+
(w = $.current) == null || w.focus();
|
|
802
|
+
}, []), T = I(
|
|
803
|
+
(w) => {
|
|
804
|
+
if (u === "int" && (w.key === "." || w.keyCode === 190 || w.keyCode === 110))
|
|
805
|
+
return w.preventDefault(), !1;
|
|
806
|
+
},
|
|
807
|
+
[u]
|
|
808
|
+
), O = I(
|
|
809
|
+
(w) => {
|
|
810
|
+
const S = w.target.value;
|
|
811
|
+
switch (u) {
|
|
812
|
+
case "int":
|
|
813
|
+
(S === "" || /^-?\d*$/.test(S)) && (L(w.target.value), s(w));
|
|
814
|
+
break;
|
|
815
|
+
case "float":
|
|
816
|
+
case "decimal":
|
|
817
|
+
(S === "" || /^-?\d*\.?\d*$/.test(S)) && (L(w.target.value), s(w));
|
|
818
|
+
break;
|
|
819
|
+
case "percentage":
|
|
820
|
+
(S === "" || /^\d*\.?\d*%?$/.test(S)) && (L(w.target.value), s(w));
|
|
821
|
+
break;
|
|
822
|
+
case "dollar":
|
|
823
|
+
(S === "" || /^\$?\d*\.?\d*$/.test(S)) && (L(w.target.value), s(w));
|
|
824
|
+
break;
|
|
825
|
+
case "str":
|
|
826
|
+
default:
|
|
827
|
+
L(w.target.value), s(w);
|
|
828
|
+
break;
|
|
829
|
+
}
|
|
830
|
+
},
|
|
831
|
+
[s, u]
|
|
832
|
+
), x = u === "str" || u === "text", W = u === "str" || u === "text" ? "left" : "right", R = `ia-table-input-container d-flex align-items-center ${i ? f ? "ia-table-cell-render-input-disabled" : "ia-table-input-disabled" : ""} ${r ? "ia-table-input-error" : ""} ${h ? "has-left-icon" : ""} ${o ? "has-right-icon" : ""} ${p && !x ? "has-left-icon-button" : ""} ${p && x ? "has-right-icon-button" : ""} ${f ? "ia-table-cellrender-input" : ""} ${d}
|
|
833
|
+
`;
|
|
834
|
+
return /* @__PURE__ */ _(
|
|
835
|
+
"div",
|
|
836
|
+
{
|
|
837
|
+
className: `ia-table-inputbox-container d-flex flex-column ${i && f ? "ia-table-cell-render-input-disabled" : ""} `,
|
|
838
|
+
style: { width: l, ...E ? { height: E } : {} },
|
|
839
|
+
children: [
|
|
840
|
+
t && /* @__PURE__ */ g("label", { className: "ia-table-input-label", children: t }),
|
|
841
|
+
/* @__PURE__ */ _(
|
|
842
|
+
"div",
|
|
843
|
+
{
|
|
844
|
+
className: R,
|
|
845
|
+
onClick: P,
|
|
846
|
+
onMouseEnter: () => {
|
|
847
|
+
N.current && N.current.classList.add("visible");
|
|
848
|
+
},
|
|
849
|
+
onMouseLeave: () => {
|
|
850
|
+
N.current && N.current.classList.remove("visible");
|
|
851
|
+
},
|
|
852
|
+
children: [
|
|
853
|
+
h && /* @__PURE__ */ g("div", { className: "left-input-icon d-flex align-items-center justify-content-center", children: h }),
|
|
854
|
+
p && !x && /* @__PURE__ */ g(
|
|
855
|
+
"div",
|
|
856
|
+
{
|
|
857
|
+
ref: N,
|
|
858
|
+
className: `left-input-icon-button d-flex align-items-center justify-content-center ${m}`,
|
|
859
|
+
children: p
|
|
860
|
+
}
|
|
861
|
+
),
|
|
862
|
+
/* @__PURE__ */ g("div", { className: "ia-table-input-wrapper", children: /* @__PURE__ */ g(
|
|
863
|
+
"input",
|
|
864
|
+
{
|
|
865
|
+
ref: $,
|
|
866
|
+
type: n,
|
|
867
|
+
value: C,
|
|
868
|
+
onChange: O,
|
|
869
|
+
onClick: c,
|
|
870
|
+
onKeyDown: T,
|
|
871
|
+
placeholder: e,
|
|
872
|
+
disabled: i,
|
|
873
|
+
className: "ia-table-input",
|
|
874
|
+
style: { textAlign: W },
|
|
875
|
+
...b
|
|
876
|
+
}
|
|
877
|
+
) }),
|
|
878
|
+
o && /* @__PURE__ */ g(
|
|
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: o
|
|
884
|
+
}
|
|
885
|
+
),
|
|
886
|
+
p && x && /* @__PURE__ */ g(
|
|
887
|
+
"div",
|
|
888
|
+
{
|
|
889
|
+
className: `right-input-icon-button d-flex align-items-center justify-content-center ${m}`,
|
|
890
|
+
children: p
|
|
891
|
+
}
|
|
892
|
+
)
|
|
893
|
+
]
|
|
894
|
+
}
|
|
895
|
+
),
|
|
896
|
+
r && /* @__PURE__ */ g("div", { className: "ia-table-input-error-message", children: r })
|
|
897
|
+
]
|
|
898
|
+
}
|
|
899
|
+
);
|
|
900
|
+
}, Ze = B(ue), pe = (e) => /* @__PURE__ */ H.createElement("svg", { width: "1em", height: "1em", viewBox: "0 0 16 16", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...e }, /* @__PURE__ */ H.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__ */ H.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__ */ H.createElement("path", { d: "M11.4375 5.4375L6.75 10.125L4.5625 7.9375", stroke: "#4259EE", strokeWidth: 1.5, strokeLinecap: "round", strokeLinejoin: "round" })), ge = (e) => /* @__PURE__ */ H.createElement("svg", { width: "1em", height: "1em", viewBox: "0 0 16 16", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...e }, /* @__PURE__ */ H.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__ */ H.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" })), q = ({
|
|
901
|
+
variant: e = "text",
|
|
902
|
+
width: t,
|
|
903
|
+
height: a,
|
|
904
|
+
className: s = "",
|
|
905
|
+
style: n = {},
|
|
906
|
+
animation: i = "pulse",
|
|
907
|
+
children: r
|
|
908
|
+
}) => {
|
|
909
|
+
const h = {
|
|
910
|
+
...n
|
|
911
|
+
};
|
|
912
|
+
t !== void 0 && (h.width = typeof t == "number" ? `${t}px` : t), a !== void 0 && (h.height = typeof a == "number" ? `${a}px` : a), e === "circular" && t !== void 0 && a === void 0 && (h.height = h.width);
|
|
913
|
+
const o = `ia-table-skeleton ia-table-skeleton-${e} ${i ? `ia-table-skeleton-${i}` : ""} ${r ? "ia-table-skeleton-with-children" : ""} ${s}`;
|
|
914
|
+
return /* @__PURE__ */ g("span", { className: o, style: h, children: r && /* @__PURE__ */ g("span", { className: "ia-table-skeleton-children", children: r }) });
|
|
915
|
+
}, me = (e) => {
|
|
916
|
+
switch (e) {
|
|
917
|
+
case "small":
|
|
918
|
+
return { circular: 20, rectangularWidth: 200, rectangularHeight: 10 };
|
|
919
|
+
case "medium":
|
|
920
|
+
return { circular: 25, rectangularWidth: 250, rectangularHeight: 12 };
|
|
921
|
+
case "large":
|
|
922
|
+
default:
|
|
923
|
+
return { circular: 30, rectangularWidth: 268, rectangularHeight: 12 };
|
|
924
|
+
}
|
|
925
|
+
}, Xe = ({
|
|
926
|
+
size: e = "large",
|
|
927
|
+
progress: t,
|
|
928
|
+
text: a = "Loading...",
|
|
929
|
+
showProgress: s = !1,
|
|
930
|
+
className: n = "",
|
|
931
|
+
showSkeleton: i = !1
|
|
932
|
+
}) => {
|
|
933
|
+
if (i) {
|
|
934
|
+
const h = me(e);
|
|
935
|
+
return /* @__PURE__ */ _("div", { className: "d-flex align-items-center", children: [
|
|
936
|
+
/* @__PURE__ */ g(
|
|
937
|
+
q,
|
|
938
|
+
{
|
|
939
|
+
variant: "rectangular",
|
|
940
|
+
width: h.circular,
|
|
941
|
+
height: h.circular
|
|
942
|
+
}
|
|
943
|
+
),
|
|
944
|
+
/* @__PURE__ */ _("div", { className: "d-flex flex-column justify-space-between", children: [
|
|
945
|
+
/* @__PURE__ */ g(
|
|
946
|
+
q,
|
|
947
|
+
{
|
|
948
|
+
variant: "rectangular",
|
|
949
|
+
width: h.rectangularWidth,
|
|
950
|
+
height: h.rectangularHeight,
|
|
951
|
+
style: { marginBottom: 4 }
|
|
952
|
+
}
|
|
953
|
+
),
|
|
954
|
+
/* @__PURE__ */ g(
|
|
955
|
+
q,
|
|
956
|
+
{
|
|
957
|
+
variant: "rectangular",
|
|
958
|
+
width: h.rectangularWidth,
|
|
959
|
+
height: h.rectangularHeight
|
|
960
|
+
}
|
|
961
|
+
)
|
|
962
|
+
] })
|
|
963
|
+
] });
|
|
964
|
+
}
|
|
965
|
+
const r = `ia-table-loader ia-table-loader--${e}${n ? ` ${n}` : ""}`;
|
|
966
|
+
return s ? /* @__PURE__ */ _("div", { className: r, children: [
|
|
967
|
+
/* @__PURE__ */ g("div", { className: "ia-table-loader__progress", children: /* @__PURE__ */ g("div", { className: "ia-table-loader__progress-outer", children: /* @__PURE__ */ g("div", { className: "ia-table-loader__progress-inner", children: e !== "small" && /* @__PURE__ */ g("span", { className: "ia-table-loader__progress-text", children: t !== void 0 ? `${t}%` : "20%" }) }) }) }),
|
|
968
|
+
e !== "small" && a && /* @__PURE__ */ g("div", { className: "ia-table-loader__text", children: a })
|
|
969
|
+
] }) : /* @__PURE__ */ g("div", { className: r, children: /* @__PURE__ */ g("div", { className: "ia-table-loader__spinner", children: /* @__PURE__ */ g("div", { className: "ia-table-loader__spinner-outer", children: /* @__PURE__ */ g("div", { className: "ia-table-loader__spinner-inner" }) }) }) });
|
|
970
|
+
}, Je = ({
|
|
971
|
+
checked: e = !1,
|
|
972
|
+
onChange: t,
|
|
973
|
+
label: a,
|
|
974
|
+
disabled: s = !1,
|
|
975
|
+
className: n = ""
|
|
976
|
+
}) => {
|
|
977
|
+
const i = (r) => {
|
|
978
|
+
r.stopPropagation(), !s && t && t(r);
|
|
979
|
+
};
|
|
980
|
+
return /* @__PURE__ */ _(
|
|
981
|
+
"label",
|
|
982
|
+
{
|
|
983
|
+
className: `ia-checkbox-container d-flex align-items-center gap-6 cursor-pointer ${n} ${s ? "ia-checkbox-disabled" : ""} `,
|
|
984
|
+
children: [
|
|
985
|
+
/* @__PURE__ */ _("div", { className: "ia-checkbox-wrapper d-flex align-items-center justify-content-center position-relative", children: [
|
|
986
|
+
/* @__PURE__ */ g(
|
|
987
|
+
"input",
|
|
988
|
+
{
|
|
989
|
+
type: "checkbox",
|
|
990
|
+
checked: e,
|
|
991
|
+
onChange: i,
|
|
992
|
+
disabled: s,
|
|
993
|
+
className: "ia-checkbox-input cursor-pointer"
|
|
994
|
+
}
|
|
995
|
+
),
|
|
996
|
+
/* @__PURE__ */ g("span", { className: "ia-checkbox-custom d-flex align-items-center justify-content-center", children: e ? /* @__PURE__ */ g(pe, { className: "ia-checkbox-icon" }) : /* @__PURE__ */ g(ge, { className: "ia-checkbox-icon" }) })
|
|
997
|
+
] }),
|
|
998
|
+
a && /* @__PURE__ */ g("span", { className: "ia-checkbox-label", children: a })
|
|
999
|
+
]
|
|
1000
|
+
}
|
|
1001
|
+
);
|
|
1002
|
+
}, Qe = ({
|
|
1003
|
+
options: e,
|
|
1004
|
+
selectedOption: t,
|
|
1005
|
+
onChange: a,
|
|
1006
|
+
orientation: s = "vertical",
|
|
1007
|
+
disabled: n = !1,
|
|
1008
|
+
name: i = "radio-group",
|
|
1009
|
+
className: r = ""
|
|
1010
|
+
}) => {
|
|
1011
|
+
const h = (o, d) => {
|
|
1012
|
+
!n && a && a(o, d);
|
|
1013
|
+
};
|
|
1014
|
+
return /* @__PURE__ */ g(
|
|
1015
|
+
"div",
|
|
1016
|
+
{
|
|
1017
|
+
className: `ia-table-radio-group-container d-flex gap-16 ${s} ${r}`,
|
|
1018
|
+
children: e.map((o) => /* @__PURE__ */ _(
|
|
1019
|
+
"label",
|
|
1020
|
+
{
|
|
1021
|
+
className: `ia-table-radio-option d-flex align-items-center gap-8 cursor-pointer position-relative ${t === o.value ? "ia-table-radio-group-selected" : ""}`,
|
|
1022
|
+
children: [
|
|
1023
|
+
/* @__PURE__ */ g(
|
|
1024
|
+
"input",
|
|
1025
|
+
{
|
|
1026
|
+
type: "radio",
|
|
1027
|
+
name: i,
|
|
1028
|
+
value: o.value,
|
|
1029
|
+
checked: t === o.value,
|
|
1030
|
+
onChange: (d) => h(d, o.value),
|
|
1031
|
+
disabled: n || o.disabled,
|
|
1032
|
+
"aria-label": o.label,
|
|
1033
|
+
className: "ia-table-radio-input position-absolute cursor-pointer"
|
|
1034
|
+
}
|
|
1035
|
+
),
|
|
1036
|
+
/* @__PURE__ */ g("span", { className: "ia-table-radio-custom position-relative d-flex align-items-center justify-content-center" }),
|
|
1037
|
+
o.label && /* @__PURE__ */ g(
|
|
1038
|
+
"span",
|
|
1039
|
+
{
|
|
1040
|
+
className: `ia-table-radio-label ${t === o.value ? "ia-table-radio-label-selected" : ""}`,
|
|
1041
|
+
children: o.label
|
|
1042
|
+
}
|
|
1043
|
+
)
|
|
1044
|
+
]
|
|
1045
|
+
},
|
|
1046
|
+
o.value
|
|
1047
|
+
))
|
|
1048
|
+
}
|
|
1049
|
+
);
|
|
1050
|
+
};
|
|
1051
|
+
export {
|
|
1052
|
+
Ae as A,
|
|
1053
|
+
G as B,
|
|
1054
|
+
Je as C,
|
|
1055
|
+
Pe as D,
|
|
1056
|
+
ke as E,
|
|
1057
|
+
xe as F,
|
|
1058
|
+
ye as G,
|
|
1059
|
+
we as H,
|
|
1060
|
+
Ze as I,
|
|
1061
|
+
_e as J,
|
|
1062
|
+
Se as K,
|
|
1063
|
+
Z as L,
|
|
1064
|
+
Ye as M,
|
|
1065
|
+
pe as N,
|
|
1066
|
+
ge as O,
|
|
1067
|
+
Xe as P,
|
|
1068
|
+
q as Q,
|
|
1069
|
+
Qe as R,
|
|
1070
|
+
de as S,
|
|
1071
|
+
ze as T,
|
|
1072
|
+
oe as U,
|
|
1073
|
+
Fe as a,
|
|
1074
|
+
Be as b,
|
|
1075
|
+
Ke as c,
|
|
1076
|
+
qe as d,
|
|
1077
|
+
K as e,
|
|
1078
|
+
k as f,
|
|
1079
|
+
A as g,
|
|
1080
|
+
We as h,
|
|
1081
|
+
Ce as i,
|
|
1082
|
+
Re as j,
|
|
1083
|
+
Oe as k,
|
|
1084
|
+
Le as l,
|
|
1085
|
+
ie as m,
|
|
1086
|
+
Ve as n,
|
|
1087
|
+
Ne as o,
|
|
1088
|
+
$e as p,
|
|
1089
|
+
Ue as q,
|
|
1090
|
+
Me as r,
|
|
1091
|
+
se as s,
|
|
1092
|
+
Te as t,
|
|
1093
|
+
M as u,
|
|
1094
|
+
Ge as v,
|
|
1095
|
+
De as w,
|
|
1096
|
+
je as x,
|
|
1097
|
+
Ie as y,
|
|
1098
|
+
He as z
|
|
1099
|
+
};
|