@nice2dev/ui 1.4.5 → 1.4.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (36) hide show
  1. package/CHANGELOG.md +76 -0
  2. package/dist/{NiceDataGrid-mrnaLHQk.cjs → NiceDataGrid-D3qRQSjy.cjs} +1 -1
  3. package/dist/NiceForm-BWb4LTQJ.cjs +1 -0
  4. package/dist/{NiceHtmlEditor-C1OVtLQ6.cjs → NiceHtmlEditor-BzECmDO3.cjs} +1 -1
  5. package/dist/{NiceMention-tgJKS8PH.cjs → NiceMention-CYRqPKGU.cjs} +19 -19
  6. package/dist/NiceModuleLifecyclePanel-CiYbPcHV.cjs +1 -0
  7. package/dist/{NicePagination-D7XxeNFz.cjs → NicePagination-BAxwqeEd.cjs} +1 -1
  8. package/dist/{NicePivotGrid-Cnkr9WkC.cjs → NicePivotGrid-Cxu5PECg.cjs} +1 -1
  9. package/dist/{NiceSavedQueryPanel-U1-yaw-Q.cjs → NiceSavedQueryPanel-BSZhE-_l.cjs} +6 -6
  10. package/dist/{NiceScheduler-Boo-D1S-.cjs → NiceScheduler-BqYiHPvz.cjs} +1 -1
  11. package/dist/{core-lazy-C_qnVGxE.cjs → core-lazy-BQexApr7.cjs} +1 -1
  12. package/dist/data.cjs +1 -1
  13. package/dist/database/NiceDataSourceEditor.mjs +370 -0
  14. package/dist/database/NiceQueryDesigner.mjs +958 -0
  15. package/dist/database/moduleDataSource.mjs +151 -0
  16. package/dist/database/queryDesign.mjs +396 -0
  17. package/dist/database/queryDesignerPanels.mjs +1214 -0
  18. package/dist/database/querySql.mjs +481 -0
  19. package/dist/editors.cjs +1 -1
  20. package/dist/index.cjs +188 -181
  21. package/dist/index.d.ts +674 -0
  22. package/dist/index.mjs +774 -720
  23. package/dist/lazy.cjs +1 -1
  24. package/dist/navigation.cjs +1 -1
  25. package/dist/no-code/NiceNoCodeScriptEditor.mjs +584 -0
  26. package/dist/no-code/noCodeScript.mjs +326 -0
  27. package/dist/no-code-B1jzfUF5.cjs +331 -0
  28. package/dist/no-code.cjs +1 -1
  29. package/dist/no-code.d.ts +177 -0
  30. package/dist/no-code.mjs +26 -16
  31. package/dist/style.css +2 -2
  32. package/package.json +4 -4
  33. package/dist/NiceForm-O3sv-DNX.cjs +0 -1
  34. package/dist/NiceModuleLifecyclePanel-DKlqKPy2.cjs +0 -1
  35. package/dist/NiceSelect-BNPXs6FQ.cjs +0 -1
  36. package/dist/no-code-B3BHeyG-.cjs +0 -331
@@ -1 +1 @@
1
- "use strict";const e=require("react/jsx-runtime"),r=require("@nice2dev/ui-core"),v=require("react"),L=require("./no-code-B3BHeyG-.cjs");function $(g,s,t){const o=[];if(s<=1)return s===1&&o.push(1),o;const x=Math.max(2,g-t),d=Math.min(s-1,g+t);o.push(1),x>2&&o.push("dots");for(let u=x;u<=d;u++)o.push(u);return d<s-1&&o.push("dots"),o.push(s),o}const H=({page:g,defaultPage:s,totalPages:t,onChange:o,showInfo:x=!0,siblingCount:d=2,size:u="md",showFirstLast:N,showJumpInput:_,jumpInputLabel:y,showPageSize:C,pageSizeOptions:m,pageSize:k,onPageSizeChange:I,disabled:c,className:P,"data-testid":R,style:M})=>{const[a,l]=r.useControllableState({value:g,defaultValue:s,fallbackValue:1,onChange:o,componentName:"NicePagination"}),{t:i}=r.useNiceTranslation(),q=$(a,t,d),h=v.useId(),b=v.useRef(null),f=!c&&a>1,j=!c&&a<t;return r.useIntent(["pagePrev","pageNext"],n=>{const p=n.intent==="pageNext";if(p?!j:!f)return!1;l(a+(p?1:-1))},{ref:b}),r.useInputHints(b,[{intent:"pagePrev",label:i("pagination.previous","Previous")},{intent:"pageNext",label:i("pagination.next","Next")}]),e.jsxs("nav",{ref:b,className:`nice-pagination nice-pagination--${u} ${P||""}`,style:M,"data-testid":R,"aria-label":i("pagination.ariaLabel","Pagination"),children:[N&&e.jsx("button",{type:"button",className:"nice-pagination__btn",disabled:c||a<=1,onClick:()=>l(1),"aria-label":i("pagination.first","First"),title:i("pagination.first","First"),children:e.jsx(r.NiceIcon,{name:"skip-back",size:14})}),e.jsxs("button",{type:"button",className:"nice-pagination__btn",disabled:!f,onClick:()=>l(a-1),"aria-label":i("pagination.previous","Previous"),children:[e.jsx(r.NiceIcon,{name:"chevron-left",size:14}),e.jsx(r.NiceControlHint,{intent:"pagePrev"})]}),q.map((n,p)=>n==="dots"?e.jsx("span",{className:"nice-pagination__ellipsis","aria-hidden":"true",children:"…"},`dots-${p}`):e.jsx("button",{type:"button",className:`nice-pagination__btn ${n===a?"nice-pagination__btn--active":""}`,disabled:c,onClick:()=>l(n),"aria-current":n===a?"page":void 0,"aria-label":i("pagination.page","Page {page}").replace("{page}",String(n)),children:n},n)),e.jsxs("button",{type:"button",className:"nice-pagination__btn",disabled:!j,onClick:()=>l(a+1),"aria-label":i("pagination.next","Next"),children:[e.jsx(r.NiceIcon,{name:"chevron-right",size:14}),e.jsx(r.NiceControlHint,{intent:"pageNext"})]}),N&&e.jsx("button",{type:"button",className:"nice-pagination__btn",disabled:c||a>=t,onClick:()=>l(t),"aria-label":i("pagination.last","Last"),title:i("pagination.last","Last"),children:e.jsx(r.NiceIcon,{name:"skip-forward",size:14})}),x&&e.jsxs("span",{className:"nice-pagination__info","aria-live":"polite",children:[a," / ",t]}),_&&e.jsxs("span",{className:"nice-pagination__jump",style:{display:"inline-flex",alignItems:"center",gap:6,marginLeft:8},children:[e.jsx("label",{htmlFor:h,style:{fontSize:"0.85rem",color:"var(--nice-text-secondary)"},children:y??i("pagination.goTo","Go to")}),e.jsx(L.NiceNumberInput,{id:h,size:u==="lg"?"md":"sm",min:1,max:t,step:1,value:a,disabled:c,onChange:n=>{const p=typeof n=="number"?n:Number(n);if(!Number.isNaN(p)){const z=Math.max(1,Math.min(t,Math.floor(p)));l(z)}}})]}),C&&m&&m.length>0&&e.jsx("select",{className:"nice-pagination__size",value:k??m[0],disabled:c,onChange:n=>I?.(Number(n.target.value)),style:{marginLeft:8,padding:"4px 8px",border:"1px solid var(--nice-border-color)",borderRadius:6,background:"var(--nice-bg-primary)",color:"var(--nice-text-primary)",font:"inherit",fontSize:"0.85rem"},"aria-label":i("pagination.rowsPerPage","Rows per page"),children:m.map(n=>e.jsxs("option",{value:n,children:[n," / page"]},n))})]})};exports.NicePagination=H;
1
+ "use strict";const e=require("react/jsx-runtime"),r=require("@nice2dev/ui-core"),v=require("react"),L=require("./no-code-B1jzfUF5.cjs");function $(g,s,t){const o=[];if(s<=1)return s===1&&o.push(1),o;const x=Math.max(2,g-t),d=Math.min(s-1,g+t);o.push(1),x>2&&o.push("dots");for(let u=x;u<=d;u++)o.push(u);return d<s-1&&o.push("dots"),o.push(s),o}const H=({page:g,defaultPage:s,totalPages:t,onChange:o,showInfo:x=!0,siblingCount:d=2,size:u="md",showFirstLast:N,showJumpInput:_,jumpInputLabel:y,showPageSize:C,pageSizeOptions:m,pageSize:k,onPageSizeChange:I,disabled:c,className:P,"data-testid":R,style:M})=>{const[a,l]=r.useControllableState({value:g,defaultValue:s,fallbackValue:1,onChange:o,componentName:"NicePagination"}),{t:i}=r.useNiceTranslation(),q=$(a,t,d),h=v.useId(),b=v.useRef(null),f=!c&&a>1,j=!c&&a<t;return r.useIntent(["pagePrev","pageNext"],n=>{const p=n.intent==="pageNext";if(p?!j:!f)return!1;l(a+(p?1:-1))},{ref:b}),r.useInputHints(b,[{intent:"pagePrev",label:i("pagination.previous","Previous")},{intent:"pageNext",label:i("pagination.next","Next")}]),e.jsxs("nav",{ref:b,className:`nice-pagination nice-pagination--${u} ${P||""}`,style:M,"data-testid":R,"aria-label":i("pagination.ariaLabel","Pagination"),children:[N&&e.jsx("button",{type:"button",className:"nice-pagination__btn",disabled:c||a<=1,onClick:()=>l(1),"aria-label":i("pagination.first","First"),title:i("pagination.first","First"),children:e.jsx(r.NiceIcon,{name:"skip-back",size:14})}),e.jsxs("button",{type:"button",className:"nice-pagination__btn",disabled:!f,onClick:()=>l(a-1),"aria-label":i("pagination.previous","Previous"),children:[e.jsx(r.NiceIcon,{name:"chevron-left",size:14}),e.jsx(r.NiceControlHint,{intent:"pagePrev"})]}),q.map((n,p)=>n==="dots"?e.jsx("span",{className:"nice-pagination__ellipsis","aria-hidden":"true",children:"…"},`dots-${p}`):e.jsx("button",{type:"button",className:`nice-pagination__btn ${n===a?"nice-pagination__btn--active":""}`,disabled:c,onClick:()=>l(n),"aria-current":n===a?"page":void 0,"aria-label":i("pagination.page","Page {page}").replace("{page}",String(n)),children:n},n)),e.jsxs("button",{type:"button",className:"nice-pagination__btn",disabled:!j,onClick:()=>l(a+1),"aria-label":i("pagination.next","Next"),children:[e.jsx(r.NiceIcon,{name:"chevron-right",size:14}),e.jsx(r.NiceControlHint,{intent:"pageNext"})]}),N&&e.jsx("button",{type:"button",className:"nice-pagination__btn",disabled:c||a>=t,onClick:()=>l(t),"aria-label":i("pagination.last","Last"),title:i("pagination.last","Last"),children:e.jsx(r.NiceIcon,{name:"skip-forward",size:14})}),x&&e.jsxs("span",{className:"nice-pagination__info","aria-live":"polite",children:[a," / ",t]}),_&&e.jsxs("span",{className:"nice-pagination__jump",style:{display:"inline-flex",alignItems:"center",gap:6,marginLeft:8},children:[e.jsx("label",{htmlFor:h,style:{fontSize:"0.85rem",color:"var(--nice-text-secondary)"},children:y??i("pagination.goTo","Go to")}),e.jsx(L.NiceNumberInput,{id:h,size:u==="lg"?"md":"sm",min:1,max:t,step:1,value:a,disabled:c,onChange:n=>{const p=typeof n=="number"?n:Number(n);if(!Number.isNaN(p)){const z=Math.max(1,Math.min(t,Math.floor(p)));l(z)}}})]}),C&&m&&m.length>0&&e.jsx("select",{className:"nice-pagination__size",value:k??m[0],disabled:c,onChange:n=>I?.(Number(n.target.value)),style:{marginLeft:8,padding:"4px 8px",border:"1px solid var(--nice-border-color)",borderRadius:6,background:"var(--nice-bg-primary)",color:"var(--nice-text-primary)",font:"inherit",fontSize:"0.85rem"},"aria-label":i("pagination.rowsPerPage","Rows per page"),children:m.map(n=>e.jsxs("option",{value:n,children:[n," / page"]},n))})]})};exports.NicePagination=H;
@@ -1,4 +1,4 @@
1
- "use strict";const s=require("react/jsx-runtime"),L=require("@nice2dev/ui-core"),k=require("react"),Ne=require("react-dom"),fe=require("./devops-cgRBnZVX.cjs"),Ce=require("./NiceSelect-BNPXs6FQ.cjs"),je=[],me=({text:e,label:n,icon:o,items:r=je,variant:f="primary",size:p="md",disabled:d,readOnly:m,loading:l,onItemClick:u,splitButton:a,onClick:v,className:_,style:g,id:c,title:t,"data-testid":i,accessMode:w,displayStyle:U,error:C,errorPlacement:$="bottom"})=>{const{t:b}=L.useNiceTranslation(),E=L.useComponentDisplayStyle("button",U),D=L.useComponentDisplayClass("button",U),x=L.useNiceAccessMode(w,c),N=x==="hidden";x==="disabled"&&(d=!0),l&&(d=!0);const j=!d&&(m||x==="readOnly"),A=L.normalizeVariant(f),H=e||n,[O,X]=k.useState(!1),G=k.useRef(null),I=k.useRef(null),W=k.useRef(null),Y=k.useRef(null);L.useMenuButton(a?W:I,Y,{open:O,onOpenChange:y=>{(!y||!j)&&X(y)}});const[K,h]=k.useState(void 0),[S,T]=k.useState(null),[F,P]=k.useState("");k.useLayoutEffect(()=>{h(void 0)},[p,f]),k.useLayoutEffect(()=>{if(I.current){const y=I.current.offsetWidth;h(B=>B==null||y>B?y:B)}},[H,l]);let R=E;if(A!=="primary"){const y={...E};delete y.background,delete y.color,(A==="outline"||A==="ghost")&&(delete y.border,delete y.borderColor,delete y.borderWidth,delete y.borderStyle,delete y.boxShadow),R=y}const M={...R,...K?{minWidth:K}:{}},z=k.useCallback(()=>{const y=G.current;if(!y)return;const B=y.getBoundingClientRect();T({top:B.bottom,left:B.left,width:B.width}),P(fe.scopeThemeClass(y))},[]);k.useLayoutEffect(()=>{if(O)return z(),window.addEventListener("scroll",z,!0),window.addEventListener("resize",z),()=>{window.removeEventListener("scroll",z,!0),window.removeEventListener("resize",z)}},[O,z]),k.useEffect(()=>{if(!O)return;const y=B=>{const ae=B.target;G.current?.contains(ae)||Y.current?.contains(ae)||X(!1)};return document.addEventListener("mousedown",y),document.addEventListener("touchstart",y),()=>{document.removeEventListener("mousedown",y),document.removeEventListener("touchstart",y)}},[O]);const te=s.jsxs("div",{className:`nice-dropdown-btn ${_||""}`,style:{position:"relative",display:"inline-flex",...g},ref:G,"data-testid":i,"aria-busy":l||void 0,children:[a?s.jsxs(s.Fragment,{children:[s.jsxs("button",{ref:I,type:"button",className:`nice-btn nice-btn--${A} nice-btn--${p} nice-btn--ds-${D} ${l?"nice-btn--loading":""} ${j?"nice-btn--readonly":""}`,style:M,disabled:d,"aria-readonly":j||void 0,onClick:()=>{j||v?.()},children:[l&&s.jsx("svg",{className:"nice-btn__spinner",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"3","aria-hidden":"true",children:s.jsx("circle",{cx:"12",cy:"12",r:"10",strokeDasharray:"31.4 31.4",strokeLinecap:"round"})}),o&&s.jsx("span",{className:"nice-btn__icon",style:l?{visibility:"hidden"}:void 0,children:o}),s.jsx("span",{style:l?{visibility:"hidden"}:void 0,children:H})]}),s.jsx("button",{ref:W,type:"button",className:`nice-btn nice-btn--${A} nice-btn--${p} nice-btn--ds-${D} nice-dropdown-btn__caret ${j?"nice-btn--readonly":""}`,style:R,disabled:d,"aria-readonly":j||void 0,"aria-haspopup":"menu","aria-expanded":O,onClick:()=>{j||X(!O)},"aria-label":b("dropDownButton.toggleDropdown","Toggle dropdown"),children:s.jsx(L.NiceIcon,{name:"chevron-down",size:"xs"})})]}):s.jsxs("button",{ref:I,type:"button",className:`nice-btn nice-btn--${A} nice-btn--${p} nice-btn--ds-${D} ${l?"nice-btn--loading":""} ${j?"nice-btn--readonly":""}`,style:M,disabled:d,"aria-readonly":j||void 0,title:t,"aria-label":!H&&t?t:void 0,"aria-haspopup":"menu","aria-expanded":O,onClick:()=>{j||X(!O)},children:[l&&s.jsx("svg",{className:"nice-btn__spinner",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"3","aria-hidden":"true",children:s.jsx("circle",{cx:"12",cy:"12",r:"10",strokeDasharray:"31.4 31.4",strokeLinecap:"round"})}),o&&s.jsx("span",{className:"nice-btn__icon",style:l?{visibility:"hidden"}:void 0,children:o}),s.jsx("span",{style:l?{visibility:"hidden"}:void 0,children:H}),s.jsx("span",{style:{marginLeft:"auto",paddingLeft:4,display:"inline-flex",...l?{visibility:"hidden"}:{}},children:s.jsx(L.NiceIcon,{name:"chevron-down",size:"xs"})})]}),O&&S&&typeof document<"u"&&Ne.createPortal(s.jsx("ul",{ref:Y,className:`nice-dropdown__list nice-dropdown-btn__menu nice-dropdown-btn__menu--${p} ${F}`,"data-theme":F==="nice-dark"?"dark":F==="nice-light"?"light":void 0,role:"menu",style:{position:"fixed",top:S.top,left:S.left,minWidth:S.width,marginTop:0,zIndex:1e3},children:r.map(y=>s.jsxs("li",{role:"menuitem","aria-disabled":y.disabled||void 0,className:`nice-dropdown__option ${y.disabled?"nice-dropdown__option--disabled":""} ${y.danger?"nice-dropdown__option--danger":""}`,onClick:()=>{y.disabled||(y.onClick?.(),u?.(y),X(!1))},children:[y.icon&&s.jsx("span",{className:"nice-dropdown-btn__item-icon",children:y.icon}),y.text]},y.key))}),document.body)]});if(!C)return te;const ie=s.jsx("div",{className:"nice-field__error",role:"alert",children:C});return $==="right"?s.jsxs("span",{className:`nice-btn-field nice-btn-field--right nice-field--${p}`,children:[te,ie]}):N?null:s.jsxs("span",{className:`nice-btn-field nice-btn-field--bottom nice-field--${p}`,children:[te,ie]})};function pe(e,n,o={}){const{delimiter:r=",",lineEnding:f=`
1
+ "use strict";const s=require("react/jsx-runtime"),L=require("@nice2dev/ui-core"),k=require("react"),Ne=require("react-dom"),fe=require("./devops-cgRBnZVX.cjs"),Ce=require("./no-code-B1jzfUF5.cjs"),je=[],me=({text:e,label:n,icon:o,items:r=je,variant:f="primary",size:p="md",disabled:d,readOnly:m,loading:l,onItemClick:u,splitButton:a,onClick:v,className:_,style:g,id:c,title:t,"data-testid":i,accessMode:w,displayStyle:U,error:C,errorPlacement:$="bottom"})=>{const{t:b}=L.useNiceTranslation(),E=L.useComponentDisplayStyle("button",U),D=L.useComponentDisplayClass("button",U),x=L.useNiceAccessMode(w,c),N=x==="hidden";x==="disabled"&&(d=!0),l&&(d=!0);const j=!d&&(m||x==="readOnly"),A=L.normalizeVariant(f),H=e||n,[O,X]=k.useState(!1),G=k.useRef(null),I=k.useRef(null),W=k.useRef(null),Y=k.useRef(null);L.useMenuButton(a?W:I,Y,{open:O,onOpenChange:y=>{(!y||!j)&&X(y)}});const[K,h]=k.useState(void 0),[S,T]=k.useState(null),[F,P]=k.useState("");k.useLayoutEffect(()=>{h(void 0)},[p,f]),k.useLayoutEffect(()=>{if(I.current){const y=I.current.offsetWidth;h(B=>B==null||y>B?y:B)}},[H,l]);let R=E;if(A!=="primary"){const y={...E};delete y.background,delete y.color,(A==="outline"||A==="ghost")&&(delete y.border,delete y.borderColor,delete y.borderWidth,delete y.borderStyle,delete y.boxShadow),R=y}const M={...R,...K?{minWidth:K}:{}},z=k.useCallback(()=>{const y=G.current;if(!y)return;const B=y.getBoundingClientRect();T({top:B.bottom,left:B.left,width:B.width}),P(fe.scopeThemeClass(y))},[]);k.useLayoutEffect(()=>{if(O)return z(),window.addEventListener("scroll",z,!0),window.addEventListener("resize",z),()=>{window.removeEventListener("scroll",z,!0),window.removeEventListener("resize",z)}},[O,z]),k.useEffect(()=>{if(!O)return;const y=B=>{const ae=B.target;G.current?.contains(ae)||Y.current?.contains(ae)||X(!1)};return document.addEventListener("mousedown",y),document.addEventListener("touchstart",y),()=>{document.removeEventListener("mousedown",y),document.removeEventListener("touchstart",y)}},[O]);const te=s.jsxs("div",{className:`nice-dropdown-btn ${_||""}`,style:{position:"relative",display:"inline-flex",...g},ref:G,"data-testid":i,"aria-busy":l||void 0,children:[a?s.jsxs(s.Fragment,{children:[s.jsxs("button",{ref:I,type:"button",className:`nice-btn nice-btn--${A} nice-btn--${p} nice-btn--ds-${D} ${l?"nice-btn--loading":""} ${j?"nice-btn--readonly":""}`,style:M,disabled:d,"aria-readonly":j||void 0,onClick:()=>{j||v?.()},children:[l&&s.jsx("svg",{className:"nice-btn__spinner",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"3","aria-hidden":"true",children:s.jsx("circle",{cx:"12",cy:"12",r:"10",strokeDasharray:"31.4 31.4",strokeLinecap:"round"})}),o&&s.jsx("span",{className:"nice-btn__icon",style:l?{visibility:"hidden"}:void 0,children:o}),s.jsx("span",{style:l?{visibility:"hidden"}:void 0,children:H})]}),s.jsx("button",{ref:W,type:"button",className:`nice-btn nice-btn--${A} nice-btn--${p} nice-btn--ds-${D} nice-dropdown-btn__caret ${j?"nice-btn--readonly":""}`,style:R,disabled:d,"aria-readonly":j||void 0,"aria-haspopup":"menu","aria-expanded":O,onClick:()=>{j||X(!O)},"aria-label":b("dropDownButton.toggleDropdown","Toggle dropdown"),children:s.jsx(L.NiceIcon,{name:"chevron-down",size:"xs"})})]}):s.jsxs("button",{ref:I,type:"button",className:`nice-btn nice-btn--${A} nice-btn--${p} nice-btn--ds-${D} ${l?"nice-btn--loading":""} ${j?"nice-btn--readonly":""}`,style:M,disabled:d,"aria-readonly":j||void 0,title:t,"aria-label":!H&&t?t:void 0,"aria-haspopup":"menu","aria-expanded":O,onClick:()=>{j||X(!O)},children:[l&&s.jsx("svg",{className:"nice-btn__spinner",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"3","aria-hidden":"true",children:s.jsx("circle",{cx:"12",cy:"12",r:"10",strokeDasharray:"31.4 31.4",strokeLinecap:"round"})}),o&&s.jsx("span",{className:"nice-btn__icon",style:l?{visibility:"hidden"}:void 0,children:o}),s.jsx("span",{style:l?{visibility:"hidden"}:void 0,children:H}),s.jsx("span",{style:{marginLeft:"auto",paddingLeft:4,display:"inline-flex",...l?{visibility:"hidden"}:{}},children:s.jsx(L.NiceIcon,{name:"chevron-down",size:"xs"})})]}),O&&S&&typeof document<"u"&&Ne.createPortal(s.jsx("ul",{ref:Y,className:`nice-dropdown__list nice-dropdown-btn__menu nice-dropdown-btn__menu--${p} ${F}`,"data-theme":F==="nice-dark"?"dark":F==="nice-light"?"light":void 0,role:"menu",style:{position:"fixed",top:S.top,left:S.left,minWidth:S.width,marginTop:0,zIndex:1e3},children:r.map(y=>s.jsxs("li",{role:"menuitem","aria-disabled":y.disabled||void 0,className:`nice-dropdown__option ${y.disabled?"nice-dropdown__option--disabled":""} ${y.danger?"nice-dropdown__option--danger":""}`,onClick:()=>{y.disabled||(y.onClick?.(),u?.(y),X(!1))},children:[y.icon&&s.jsx("span",{className:"nice-dropdown-btn__item-icon",children:y.icon}),y.text]},y.key))}),document.body)]});if(!C)return te;const ie=s.jsx("div",{className:"nice-field__error",role:"alert",children:C});return $==="right"?s.jsxs("span",{className:`nice-btn-field nice-btn-field--right nice-field--${p}`,children:[te,ie]}):N?null:s.jsxs("span",{className:`nice-btn-field nice-btn-field--bottom nice-field--${p}`,children:[te,ie]})};function pe(e,n,o={}){const{delimiter:r=",",lineEnding:f=`
2
2
  `,quoteChar:p='"',alwaysQuote:d=!1,includeHeaders:m=!0,includeRowNumbers:l=!1,locale:u="en-US",dateTimeFormat:a="yyyy-MM-dd HH:mm:ss"}=o,v=n.filter(t=>t.visible!==!1),_=[],g=t=>{if(d||t.includes(r)||t.includes(p)||t.includes(`
3
3
  `)||t.includes("\r")){const w=t.replace(new RegExp(p,"g"),p+p);return`${p}${w}${p}`}return t},c=(t,i,w)=>{if(t==null)return"";if(i.format)return i.format(t,w);switch(i.dataType){case"date":return oe(t,i.dateFormat??a);case"number":return re(t,i.numberFormat,u);case"currency":return se(t,i.currencyCode??"USD",u);case"boolean":return t?"Yes":"No";default:return String(t)}};if(m){const t=[];l&&t.push(g("#"));for(const i of v)t.push(g(i.header));_.push(t.join(r))}return e.forEach((t,i)=>{const w=[];l&&w.push(String(i+1));for(const U of v){const C=t[U.field],$=c(C,U,t);w.push(g($))}_.push(w.join(r))}),_.join(f)}function he(e,n,o={}){const{fileName:r="export",includeTimestamp:f=!1,includeBOM:p=!0,encoding:d="utf-8"}=o,m=pe(e,n,o),l=f?`_${ee()}`:"",u=`${r}${l}.csv`;let a=m;p&&d==="utf-8"&&(a="\uFEFF"+m);const v=new Blob([a],{type:`text/csv;charset=${d}`});Z(v,u)}function Se(){return{sheets:new Map,activeSheet:""}}function Te(e,n){const o={name:n,cells:new Map,columns:[],merges:[]};return e.sheets.set(n,o),e.activeSheet||(e.activeSheet=n),o}function q(e,n,o,r){const f=Q(n,o);e.cells.set(f,r)}function Q(e,n){let o="",r=n;for(;r>=0;)o=String.fromCharCode(65+r%26)+o,r=Math.floor(r/26)-1;return`${o}${e+1}`}function De(e){const n=new TextEncoder,o=Array.from(e.sheets.entries()),r=o.map(([l,u],a)=>{const v=[];let _=0,g=0;u.cells.forEach((t,i)=>{const w=i.match(/([A-Z]+)(\d+)/);if(w){const U=Ue(w[1]),C=parseInt(w[2],10);_=Math.max(_,C),g=Math.max(g,U)}});for(let t=1;t<=_;t++){const i=[];for(let w=0;w<=g;w++){const U=Q(t-1,w),C=u.cells.get(U);if(C){const $=C.type==="s"?' t="inlineStr"':C.type==="b"?' t="b"':"";let b;C.type==="s"?b=`<is><t>${le(String(C.value))}</t></is>`:C.type==="b"?b=`<v>${C.value?1:0}</v>`:b=`<v>${C.value}</v>`,i.push(`<c r="${U}"${$}>${b}</c>`)}}i.length>0&&v.push(`<row r="${t}">${i.join("")}</row>`)}return`<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
4
4
  <worksheet xmlns="http://schemas.openxmlformats.org/spreadsheetml/2006/main">