@teppen/react-ui 1.8.9 → 1.8.10

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,3 +1,3 @@
1
1
  "use client";
2
- "use strict";var e=require("react/jsx-runtime"),t=require("react"),r=require("../header/columns-width/context.js");require("../../../node_modules/tslib/tslib.es6.js");var n=require("../header/x-scroll-position/context.js");exports.Frame=function(o){var l=n.useScrollXPosition(),s=l.x,c=l.setScrollX,i=t.useRef(null),u=t.useState({scrollX:0,scrollY:0,barYHeight:0,barXWidth:0}),a=u[0],d=u[1],m=r.useColumnsWidthState();return t.useEffect((function(){var e=function(){if(i.current){c(i.current.scrollLeft);var e=i.current.scrollLeft/i.current.scrollWidth*100,t=i.current.scrollTop/i.current.scrollHeight*100,r=i.current.clientHeight/i.current.scrollHeight*100,n=i.current.clientWidth/i.current.scrollWidth*100;d({scrollX:e>100?100:e,scrollY:t>100?100:t,barYHeight:r>100?100:r,barXWidth:n>100?100:n})}};return e(),i.current&&i.current.addEventListener("scroll",e),function(){i.current&&i.current.removeEventListener("scroll",e)}}),[c,m]),t.useEffect((function(){i.current&&(i.current.scrollLeft=s)}),[s]),e.jsxs("div",{className:"relative",style:{maxHeight:o.maxHeight,maxWidth:o.maxWidth},children:[e.jsx("style",{children:"\n .teppen-no-scrollbar {\n -ms-overflow-style: none;\n scrollbar-width: none;\n }\n .teppen-no-scrollbar::-webkit-scrollbar {\n display: none;\n }\n "}),e.jsx("div",{ref:i,id:o.id,className:"relative w-full h-full border border-gray-200 bg-white rounded-b-md overflow-auto ".concat(o.displayScroll?"":"teppen-no-scrollbar"),style:{maxHeight:o.maxHeight,maxWidth:o.maxWidth},children:o.children}),a.barYHeight<100&&e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"absolute top-0 right-0 h-full w-2 bg-slate-200 opacity-30 pointer-events-none"}),e.jsx("div",{className:"absolute right-0 w-2 bg-slate-500 rounded-full cursor-grab active:cursor-grabbing",style:{top:"".concat(a.scrollY,"%"),height:"".concat(a.barYHeight,"%")},onMouseDown:function(e){var t,r=e.clientY,n=(null===(t=i.current)||void 0===t?void 0:t.scrollTop)||0,o=function(e){if(i.current){var t=(e.clientY-r)/a.barYHeight*100;i.current.scrollTop=n+t}},l=function(){document.removeEventListener("mousemove",o),document.removeEventListener("mouseup",l)};document.addEventListener("mousemove",o),document.addEventListener("mouseup",l)}})]}),a.barXWidth<100&&e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"absolute bottom-0 left-0 w-full h-2 bg-slate-200 opacity-30 pointer-events-none"}),e.jsx("div",{className:"absolute bottom-0 h-2 bg-slate-500 rounded-full cursor-grab active:cursor-grabbing",style:{left:"".concat(a.scrollX,"%"),width:"".concat(a.barXWidth,"%")},onMouseDown:function(e){var t;e.preventDefault(),e.stopPropagation();var r=e.clientX,n=(null===(t=i.current)||void 0===t?void 0:t.scrollLeft)||0,o=function(t){if(i.current){e.preventDefault(),e.stopPropagation();var o=(t.clientX-r)/a.barXWidth*100;i.current.scrollLeft=n+o}},l=function(){document.removeEventListener("mousemove",o),document.removeEventListener("mouseup",l)};document.addEventListener("mousemove",o),document.addEventListener("mouseup",l)}})]})]})};
2
+ "use strict";var e=require("react/jsx-runtime"),r=require("react"),t=require("../header/columns-width/context.js");require("../../../node_modules/tslib/tslib.es6.js");var n=require("../header/x-scroll-position/context.js");exports.Frame=function(o){var l=n.useScrollXPosition(),s=l.x,c=l.setScrollX,i=r.useRef(null),u=r.useState({scrollX:0,scrollY:0,barYHeight:0,barXWidth:0}),a=u[0],d=u[1],v=t.useColumnsWidthState();return r.useEffect((function(){var e=function(){if(i.current){c(i.current.scrollLeft);var e=i.current.scrollLeft/i.current.scrollWidth*100,r=i.current.scrollTop/i.current.scrollHeight*100,t=i.current.clientHeight/i.current.scrollHeight*100,n=i.current.clientWidth/i.current.scrollWidth*100;d({scrollX:e>100?100:e,scrollY:r>100?100:r,barYHeight:t>100?100:t,barXWidth:n>100?100:n})}};return e(),i.current&&i.current.addEventListener("scroll",e),function(){i.current&&i.current.removeEventListener("scroll",e)}}),[c,v]),r.useEffect((function(){i.current&&(i.current.scrollLeft=s)}),[s]),e.jsxs("div",{className:"relative",style:{maxWidth:o.maxWidth},children:[e.jsx("style",{children:"\n .teppen-no-scrollbar {\n -ms-overflow-style: none;\n scrollbar-width: none;\n }\n .teppen-no-scrollbar::-webkit-scrollbar {\n display: none;\n }\n "}),e.jsx("div",{ref:i,id:o.id,className:"relative w-full h-full max-w-full border border-gray-200 bg-white rounded-b-md overflow-auto ".concat(o.displayScroll?"":"teppen-no-scrollbar"),style:{maxHeight:o.maxHeight},children:o.children}),a.barYHeight<100&&e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"absolute top-0 right-0 h-full w-2 bg-slate-200 opacity-30 pointer-events-none"}),e.jsx("div",{className:"absolute right-0 w-2 bg-slate-500 rounded-full cursor-grab active:cursor-grabbing",style:{top:"".concat(a.scrollY,"%"),height:"".concat(a.barYHeight,"%")},onMouseDown:function(e){var r,t=e.clientY,n=(null===(r=i.current)||void 0===r?void 0:r.scrollTop)||0,o=function(e){if(i.current){var r=(e.clientY-t)/a.barYHeight*100;i.current.scrollTop=n+r}},l=function(){document.removeEventListener("mousemove",o),document.removeEventListener("mouseup",l)};document.addEventListener("mousemove",o),document.addEventListener("mouseup",l)}})]}),a.barXWidth<100&&e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"absolute bottom-0 left-0 w-full h-2 bg-slate-200 opacity-30 pointer-events-none"}),e.jsx("div",{className:"absolute bottom-0 h-2 bg-slate-500 rounded-full cursor-grab active:cursor-grabbing",style:{left:"".concat(a.scrollX,"%"),width:"".concat(a.barXWidth,"%")},onMouseDown:function(e){var r;e.preventDefault(),e.stopPropagation();var t=e.clientX,n=(null===(r=i.current)||void 0===r?void 0:r.scrollLeft)||0,o=function(r){if(i.current){e.preventDefault(),e.stopPropagation();var o=(r.clientX-t)/a.barXWidth*100;i.current.scrollLeft=n+o}},l=function(){document.removeEventListener("mousemove",o),document.removeEventListener("mouseup",l)};document.addEventListener("mousemove",o),document.addEventListener("mouseup",l)}})]})]})};
3
3
  //# sourceMappingURL=frame.js.map
@@ -1,3 +1,3 @@
1
1
  "use client";
2
- "use strict";var e=require("../../../node_modules/tslib/tslib.es6.js"),r=require("react/jsx-runtime"),i=require("./hook.js"),o=require("../header/header.js"),s=require("../pagenation/providers.js"),t=require("../pagenation/components.js");require("../filter-v2/context.js");var n=require("../filter-v2/provider.js");require("../sort/icon.js");var d=require("../sort/provider.js"),a=require("../sheet/providers.js"),l=require("../checkbox/provider.js"),c=require("../edit/provider.js"),j=require("../table-property/provider.js"),x=require("../operation/components/keyboard-setting.js"),h=require("../sheet/components.js"),u=require("../paste/provider.js"),p=require("../libs/conditional-formatting.js"),v=require("../edit/ui/editor.js"),m=require("../range/provider.js"),g=require("../copy/provider.js"),b=require("../copy/components.js"),q=require("../id/provider.js"),w=require("../header/header-v2.js");require("../header/columns-width/context.js");var P=require("../header/columns-width/provider.js");require("../header/x-scroll-position/context.js");var C=require("../header/x-scroll-position/provider.js"),k=require("../frame/frame.js"),y=require("./component-provider/provider.js"),S=require("../../select-box/provider.js");function R(e){var s=i.useTable(e),n=s.cols,d=s.rowMaps,a=s.pageRowIds,l=q.useTableIdGenerator(),c=y.useGenerateSortButton();return r.jsxs("div",{className:"w-full",children:[r.jsxs("div",{children:[r.jsx(w.TableHeader,{cols:n,checkbox:!!e.checkbox,rows:e.rows,maxWidth:e.maxWidth,generateSortButton:c}),r.jsx(S.SelectBoxProvider,{children:r.jsxs(k.Frame,{id:l.getTableId(),maxHeight:e.maxHeight,maxWidth:e.maxWidth,displayScroll:!1,children:[r.jsxs("table",{className:"table",children:[r.jsx("thead",{children:r.jsxs("tr",{children:[e.checkbox&&r.jsx("th",{}),n.map((function(e){return r.jsx(o.TableHeaderElement,{keyname:e.key.toString()},e.key.toString())}))]})}),r.jsxs("tbody",{children:[0===a.length&&r.jsx("tr",{children:r.jsx("td",{colSpan:n.length,className:"py-5",children:r.jsx("p",{className:"text-center font-bold text-lg",children:"NO DATA"})})}),a.map((function(i,o){return r.jsx(h.Row,{existCheckbox:!!e.checkbox,rowIndex:o,dataString:d[i].stringValue,cols:e.cols,onClickRow:e.onClickRow,applyRowFormatting:e.applyRowFormatting,conditionalFormattingString:p.generateFormattingString(d[i].data,n,e.conditionalFormattings)},i)}))]})]}),r.jsx(m.TestRange,{}),r.jsx(v.Editor,{rowMaps:d,pageRowIds:a})]})})]}),r.jsxs("div",{className:"mt-1",children:[r.jsx(t.DisplayRange,{}),r.jsx("div",{className:"mt-2",children:r.jsx(t.Pagenation,{})})]})]})}module.exports=function(i){var o,t,h,p;return r.jsx(y.ComponentProvider,{children:r.jsx(q.TableIdGeneratorProvider,{id:i.id,children:r.jsx(P.ColumnsWidthProvider,{initialState:i.cols,children:r.jsx(n.FilterProvider,{initialConditions:[],children:r.jsx(d.SortProvider,{initialCondition:null===(o=i.initialCondition)||void 0===o?void 0:o.sort,children:r.jsx(s.PagenationProvider,{rowCount:i.rows.length,perPage:null===(h=null===(t=i.initialCondition)||void 0===t?void 0:t.pagenation)||void 0===h?void 0:h.rowCountPerPage,children:r.jsx(l.CheckboxProvider,{checkbox:i.checkbox,children:r.jsx(l.CheckboxStatusProvider,{checkboxCount:i.rows.length,children:r.jsx(a.ColumnsProvider,{cols:i.cols,errorHandler:i.errorHandler,children:r.jsx(c.EditProvider,{children:r.jsx(j.TablePropertyProvider,{children:r.jsx(m.RangeProvider,{children:r.jsxs(g.CopyProvider,{rows:i.rows,cols:i.cols,children:[r.jsx(b.CopiedMessage,{}),r.jsxs(u.PasteProvider,{rows:i.rows,cols:i.cols,onUpdateRowFunction:i.onUpdateRow,children:[r.jsx(x.KeyboardSetting,{enableDeprecatedCopy:null===(p=i.deprecatedOptions)||void 0===p?void 0:p.enableDeprecatedCopy}),r.jsx(C.ScrollXPositionProvider,{children:r.jsx(R,e.__assign({},i))})]})]})})})})})})})})})})})})})};
2
+ "use strict";var e=require("../../../node_modules/tslib/tslib.es6.js"),r=require("react/jsx-runtime"),i=require("./hook.js"),o=require("../header/header.js"),s=require("../pagenation/providers.js"),t=require("../pagenation/components.js");require("../filter-v2/context.js");var n=require("../filter-v2/provider.js");require("../sort/icon.js");var d=require("../sort/provider.js"),a=require("../sheet/providers.js"),l=require("../checkbox/provider.js"),c=require("../edit/provider.js"),x=require("../table-property/provider.js"),j=require("../operation/components/keyboard-setting.js"),h=require("../sheet/components.js"),u=require("../paste/provider.js"),p=require("../libs/conditional-formatting.js"),v=require("../edit/ui/editor.js"),m=require("../range/provider.js"),g=require("../copy/provider.js"),b=require("../copy/components.js"),q=require("../id/provider.js"),w=require("../header/header-v2.js");require("../header/columns-width/context.js");var P=require("../header/columns-width/provider.js");require("../header/x-scroll-position/context.js");var C=require("../header/x-scroll-position/provider.js"),k=require("../frame/frame.js"),y=require("./component-provider/provider.js"),S=require("../../select-box/provider.js");function f(e){var s=i.useTable(e),n=s.cols,d=s.rowMaps,a=s.pageRowIds,l=q.useTableIdGenerator(),c=y.useGenerateSortButton();return r.jsxs("div",{className:"w-full max-w-full max-h-full",children:[r.jsxs("div",{children:[r.jsx(w.TableHeader,{cols:n,checkbox:!!e.checkbox,rows:e.rows,maxWidth:e.maxWidth,generateSortButton:c}),r.jsx(S.SelectBoxProvider,{children:r.jsxs(k.Frame,{id:l.getTableId(),maxHeight:e.maxHeight,maxWidth:e.maxWidth,displayScroll:!1,children:[r.jsxs("table",{className:"table",children:[r.jsx("thead",{children:r.jsxs("tr",{children:[e.checkbox&&r.jsx("th",{}),n.map((function(e){return r.jsx(o.TableHeaderElement,{keyname:e.key.toString()},e.key.toString())}))]})}),r.jsxs("tbody",{children:[0===a.length&&r.jsx("tr",{children:r.jsx("td",{colSpan:n.length,className:"py-5",children:r.jsx("p",{className:"text-center font-bold text-lg",children:"NO DATA"})})}),a.map((function(i,o){return r.jsx(h.Row,{existCheckbox:!!e.checkbox,rowIndex:o,dataString:d[i].stringValue,cols:e.cols,onClickRow:e.onClickRow,applyRowFormatting:e.applyRowFormatting,conditionalFormattingString:p.generateFormattingString(d[i].data,n,e.conditionalFormattings)},i)}))]})]}),r.jsx(m.TestRange,{}),r.jsx(v.Editor,{rowMaps:d,pageRowIds:a})]})})]}),r.jsxs("div",{className:"mt-1",children:[r.jsx(t.DisplayRange,{}),r.jsx("div",{className:"mt-2",children:r.jsx(t.Pagenation,{})})]})]})}module.exports=function(i){var o,t,h,p;return r.jsx(y.ComponentProvider,{children:r.jsx(q.TableIdGeneratorProvider,{id:i.id,children:r.jsx(P.ColumnsWidthProvider,{initialState:i.cols,children:r.jsx(n.FilterProvider,{initialConditions:[],children:r.jsx(d.SortProvider,{initialCondition:null===(o=i.initialCondition)||void 0===o?void 0:o.sort,children:r.jsx(s.PagenationProvider,{rowCount:i.rows.length,perPage:null===(h=null===(t=i.initialCondition)||void 0===t?void 0:t.pagenation)||void 0===h?void 0:h.rowCountPerPage,children:r.jsx(l.CheckboxProvider,{checkbox:i.checkbox,children:r.jsx(l.CheckboxStatusProvider,{checkboxCount:i.rows.length,children:r.jsx(a.ColumnsProvider,{cols:i.cols,errorHandler:i.errorHandler,children:r.jsx(c.EditProvider,{children:r.jsx(x.TablePropertyProvider,{children:r.jsx(m.RangeProvider,{children:r.jsxs(g.CopyProvider,{rows:i.rows,cols:i.cols,children:[r.jsx(b.CopiedMessage,{}),r.jsxs(u.PasteProvider,{rows:i.rows,cols:i.cols,onUpdateRowFunction:i.onUpdateRow,children:[r.jsx(j.KeyboardSetting,{enableDeprecatedCopy:null===(p=i.deprecatedOptions)||void 0===p?void 0:p.enableDeprecatedCopy}),r.jsx(C.ScrollXPositionProvider,{children:r.jsx(f,e.__assign({},i))})]})]})})})})})})})})})})})})})};
3
3
  //# sourceMappingURL=base.js.map
@@ -1,3 +1,3 @@
1
1
  "use client";
2
- import{jsxs as e,jsx as t,Fragment as r}from"react/jsx-runtime";import{useRef as n,useState as o,useEffect as l}from"react";import{useColumnsWidthState as c}from"../header/columns-width/context.js";import"../../../node_modules/tslib/tslib.es6.js";import{useScrollXPosition as i}from"../header/x-scroll-position/context.js";function s(s){var a=i(),u=a.x,d=a.setScrollX,m=n(null),v=o({scrollX:0,scrollY:0,barYHeight:0,barXWidth:0}),h=v[0],b=v[1],f=c();return l((function(){var e=function(){if(m.current){d(m.current.scrollLeft);var e=m.current.scrollLeft/m.current.scrollWidth*100,t=m.current.scrollTop/m.current.scrollHeight*100,r=m.current.clientHeight/m.current.scrollHeight*100,n=m.current.clientWidth/m.current.scrollWidth*100;b({scrollX:e>100?100:e,scrollY:t>100?100:t,barYHeight:r>100?100:r,barXWidth:n>100?100:n})}};return e(),m.current&&m.current.addEventListener("scroll",e),function(){m.current&&m.current.removeEventListener("scroll",e)}}),[d,f]),l((function(){m.current&&(m.current.scrollLeft=u)}),[u]),e("div",{className:"relative",style:{maxHeight:s.maxHeight,maxWidth:s.maxWidth},children:[t("style",{children:"\n .teppen-no-scrollbar {\n -ms-overflow-style: none;\n scrollbar-width: none;\n }\n .teppen-no-scrollbar::-webkit-scrollbar {\n display: none;\n }\n "}),t("div",{ref:m,id:s.id,className:"relative w-full h-full border border-gray-200 bg-white rounded-b-md overflow-auto ".concat(s.displayScroll?"":"teppen-no-scrollbar"),style:{maxHeight:s.maxHeight,maxWidth:s.maxWidth},children:s.children}),h.barYHeight<100&&e(r,{children:[t("div",{className:"absolute top-0 right-0 h-full w-2 bg-slate-200 opacity-30 pointer-events-none"}),t("div",{className:"absolute right-0 w-2 bg-slate-500 rounded-full cursor-grab active:cursor-grabbing",style:{top:"".concat(h.scrollY,"%"),height:"".concat(h.barYHeight,"%")},onMouseDown:function(e){var t,r=e.clientY,n=(null===(t=m.current)||void 0===t?void 0:t.scrollTop)||0,o=function(e){if(m.current){var t=(e.clientY-r)/h.barYHeight*100;m.current.scrollTop=n+t}},l=function(){document.removeEventListener("mousemove",o),document.removeEventListener("mouseup",l)};document.addEventListener("mousemove",o),document.addEventListener("mouseup",l)}})]}),h.barXWidth<100&&e(r,{children:[t("div",{className:"absolute bottom-0 left-0 w-full h-2 bg-slate-200 opacity-30 pointer-events-none"}),t("div",{className:"absolute bottom-0 h-2 bg-slate-500 rounded-full cursor-grab active:cursor-grabbing",style:{left:"".concat(h.scrollX,"%"),width:"".concat(h.barXWidth,"%")},onMouseDown:function(e){var t;e.preventDefault(),e.stopPropagation();var r=e.clientX,n=(null===(t=m.current)||void 0===t?void 0:t.scrollLeft)||0,o=function(t){if(m.current){e.preventDefault(),e.stopPropagation();var o=(t.clientX-r)/h.barXWidth*100;m.current.scrollLeft=n+o}},l=function(){document.removeEventListener("mousemove",o),document.removeEventListener("mouseup",l)};document.addEventListener("mousemove",o),document.addEventListener("mouseup",l)}})]})]})}export{s as Frame};
2
+ import{jsxs as e,jsx as r,Fragment as t}from"react/jsx-runtime";import{useRef as n,useState as o,useEffect as l}from"react";import{useColumnsWidthState as c}from"../header/columns-width/context.js";import"../../../node_modules/tslib/tslib.es6.js";import{useScrollXPosition as i}from"../header/x-scroll-position/context.js";function s(s){var u=i(),a=u.x,d=u.setScrollX,m=n(null),v=o({scrollX:0,scrollY:0,barYHeight:0,barXWidth:0}),h=v[0],b=v[1],f=c();return l((function(){var e=function(){if(m.current){d(m.current.scrollLeft);var e=m.current.scrollLeft/m.current.scrollWidth*100,r=m.current.scrollTop/m.current.scrollHeight*100,t=m.current.clientHeight/m.current.scrollHeight*100,n=m.current.clientWidth/m.current.scrollWidth*100;b({scrollX:e>100?100:e,scrollY:r>100?100:r,barYHeight:t>100?100:t,barXWidth:n>100?100:n})}};return e(),m.current&&m.current.addEventListener("scroll",e),function(){m.current&&m.current.removeEventListener("scroll",e)}}),[d,f]),l((function(){m.current&&(m.current.scrollLeft=a)}),[a]),e("div",{className:"relative",style:{maxWidth:s.maxWidth},children:[r("style",{children:"\n .teppen-no-scrollbar {\n -ms-overflow-style: none;\n scrollbar-width: none;\n }\n .teppen-no-scrollbar::-webkit-scrollbar {\n display: none;\n }\n "}),r("div",{ref:m,id:s.id,className:"relative w-full h-full max-w-full border border-gray-200 bg-white rounded-b-md overflow-auto ".concat(s.displayScroll?"":"teppen-no-scrollbar"),style:{maxHeight:s.maxHeight},children:s.children}),h.barYHeight<100&&e(t,{children:[r("div",{className:"absolute top-0 right-0 h-full w-2 bg-slate-200 opacity-30 pointer-events-none"}),r("div",{className:"absolute right-0 w-2 bg-slate-500 rounded-full cursor-grab active:cursor-grabbing",style:{top:"".concat(h.scrollY,"%"),height:"".concat(h.barYHeight,"%")},onMouseDown:function(e){var r,t=e.clientY,n=(null===(r=m.current)||void 0===r?void 0:r.scrollTop)||0,o=function(e){if(m.current){var r=(e.clientY-t)/h.barYHeight*100;m.current.scrollTop=n+r}},l=function(){document.removeEventListener("mousemove",o),document.removeEventListener("mouseup",l)};document.addEventListener("mousemove",o),document.addEventListener("mouseup",l)}})]}),h.barXWidth<100&&e(t,{children:[r("div",{className:"absolute bottom-0 left-0 w-full h-2 bg-slate-200 opacity-30 pointer-events-none"}),r("div",{className:"absolute bottom-0 h-2 bg-slate-500 rounded-full cursor-grab active:cursor-grabbing",style:{left:"".concat(h.scrollX,"%"),width:"".concat(h.barXWidth,"%")},onMouseDown:function(e){var r;e.preventDefault(),e.stopPropagation();var t=e.clientX,n=(null===(r=m.current)||void 0===r?void 0:r.scrollLeft)||0,o=function(r){if(m.current){e.preventDefault(),e.stopPropagation();var o=(r.clientX-t)/h.barXWidth*100;m.current.scrollLeft=n+o}},l=function(){document.removeEventListener("mousemove",o),document.removeEventListener("mouseup",l)};document.addEventListener("mousemove",o),document.addEventListener("mouseup",l)}})]})]})}export{s as Frame};
3
3
  //# sourceMappingURL=frame.js.map
@@ -1,3 +1,3 @@
1
1
  "use client";
2
- import{__assign as o}from"../../../node_modules/tslib/tslib.es6.js";import{jsx as r,jsxs as e}from"react/jsx-runtime";import{useTable as i}from"./hook.js";import{TableHeaderElement as t}from"../header/header.js";import{PagenationProvider as n}from"../pagenation/providers.js";import{DisplayRange as d,Pagenation as l}from"../pagenation/components.js";import"../filter-v2/context.js";import{FilterProvider as s}from"../filter-v2/provider.js";import"../sort/icon.js";import{SortProvider as c}from"../sort/provider.js";import{ColumnsProvider as m}from"../sheet/providers.js";import{CheckboxProvider as a,CheckboxStatusProvider as p}from"../checkbox/provider.js";import{EditProvider as h}from"../edit/provider.js";import{TablePropertyProvider as f}from"../table-property/provider.js";import{KeyboardSetting as v}from"../operation/components/keyboard-setting.js";import{Row as j}from"../sheet/components.js";import{PasteProvider as g}from"../paste/provider.js";import{generateFormattingString as x}from"../libs/conditional-formatting.js";import{Editor as u}from"../edit/ui/editor.js";import{RangeProvider as w,TestRange as b}from"../range/provider.js";import{CopyProvider as k}from"../copy/provider.js";import{CopiedMessage as y}from"../copy/components.js";import{TableIdGeneratorProvider as C,useTableIdGenerator as R}from"../id/provider.js";import{TableHeader as S}from"../header/header-v2.js";import"../header/columns-width/context.js";import{ColumnsWidthProvider as N}from"../header/columns-width/provider.js";import"../header/x-scroll-position/context.js";import{ScrollXPositionProvider as F}from"../header/x-scroll-position/provider.js";import{Frame as H}from"../frame/frame.js";import{ComponentProvider as I,useGenerateSortButton as W}from"./component-provider/provider.js";import{SelectBoxProvider as D}from"../../select-box/provider.js";function P(i){var t,d,l,j;return r(I,{children:r(C,{id:i.id,children:r(N,{initialState:i.cols,children:r(s,{initialConditions:[],children:r(c,{initialCondition:null===(t=i.initialCondition)||void 0===t?void 0:t.sort,children:r(n,{rowCount:i.rows.length,perPage:null===(l=null===(d=i.initialCondition)||void 0===d?void 0:d.pagenation)||void 0===l?void 0:l.rowCountPerPage,children:r(a,{checkbox:i.checkbox,children:r(p,{checkboxCount:i.rows.length,children:r(m,{cols:i.cols,errorHandler:i.errorHandler,children:r(h,{children:r(f,{children:r(w,{children:e(k,{rows:i.rows,cols:i.cols,children:[r(y,{}),e(g,{rows:i.rows,cols:i.cols,onUpdateRowFunction:i.onUpdateRow,children:[r(v,{enableDeprecatedCopy:null===(j=i.deprecatedOptions)||void 0===j?void 0:j.enableDeprecatedCopy}),r(F,{children:r(A,o({},i))})]})]})})})})})})})})})})})})})}function A(o){var n=i(o),s=n.cols,c=n.rowMaps,m=n.pageRowIds,a=R(),p=W();return e("div",{className:"w-full",children:[e("div",{children:[r(S,{cols:s,checkbox:!!o.checkbox,rows:o.rows,maxWidth:o.maxWidth,generateSortButton:p}),r(D,{children:e(H,{id:a.getTableId(),maxHeight:o.maxHeight,maxWidth:o.maxWidth,displayScroll:!1,children:[e("table",{className:"table",children:[r("thead",{children:e("tr",{children:[o.checkbox&&r("th",{}),s.map((function(o){return r(t,{keyname:o.key.toString()},o.key.toString())}))]})}),e("tbody",{children:[0===m.length&&r("tr",{children:r("td",{colSpan:s.length,className:"py-5",children:r("p",{className:"text-center font-bold text-lg",children:"NO DATA"})})}),m.map((function(e,i){return r(j,{existCheckbox:!!o.checkbox,rowIndex:i,dataString:c[e].stringValue,cols:o.cols,onClickRow:o.onClickRow,applyRowFormatting:o.applyRowFormatting,conditionalFormattingString:x(c[e].data,s,o.conditionalFormattings)},e)}))]})]}),r(b,{}),r(u,{rowMaps:c,pageRowIds:m})]})})]}),e("div",{className:"mt-1",children:[r(d,{}),r("div",{className:"mt-2",children:r(l,{})})]})]})}export{P as default};
2
+ import{__assign as o}from"../../../node_modules/tslib/tslib.es6.js";import{jsx as r,jsxs as e}from"react/jsx-runtime";import{useTable as i}from"./hook.js";import{TableHeaderElement as t}from"../header/header.js";import{PagenationProvider as n}from"../pagenation/providers.js";import{DisplayRange as d,Pagenation as l}from"../pagenation/components.js";import"../filter-v2/context.js";import{FilterProvider as s}from"../filter-v2/provider.js";import"../sort/icon.js";import{SortProvider as c}from"../sort/provider.js";import{ColumnsProvider as m}from"../sheet/providers.js";import{CheckboxProvider as a,CheckboxStatusProvider as p}from"../checkbox/provider.js";import{EditProvider as h}from"../edit/provider.js";import{TablePropertyProvider as f}from"../table-property/provider.js";import{KeyboardSetting as v}from"../operation/components/keyboard-setting.js";import{Row as j}from"../sheet/components.js";import{PasteProvider as x}from"../paste/provider.js";import{generateFormattingString as g}from"../libs/conditional-formatting.js";import{Editor as u}from"../edit/ui/editor.js";import{RangeProvider as w,TestRange as b}from"../range/provider.js";import{CopyProvider as k}from"../copy/provider.js";import{CopiedMessage as y}from"../copy/components.js";import{TableIdGeneratorProvider as C,useTableIdGenerator as R}from"../id/provider.js";import{TableHeader as S}from"../header/header-v2.js";import"../header/columns-width/context.js";import{ColumnsWidthProvider as N}from"../header/columns-width/provider.js";import"../header/x-scroll-position/context.js";import{ScrollXPositionProvider as F}from"../header/x-scroll-position/provider.js";import{Frame as H}from"../frame/frame.js";import{ComponentProvider as I,useGenerateSortButton as W}from"./component-provider/provider.js";import{SelectBoxProvider as D}from"../../select-box/provider.js";function P(i){var t,d,l,j;return r(I,{children:r(C,{id:i.id,children:r(N,{initialState:i.cols,children:r(s,{initialConditions:[],children:r(c,{initialCondition:null===(t=i.initialCondition)||void 0===t?void 0:t.sort,children:r(n,{rowCount:i.rows.length,perPage:null===(l=null===(d=i.initialCondition)||void 0===d?void 0:d.pagenation)||void 0===l?void 0:l.rowCountPerPage,children:r(a,{checkbox:i.checkbox,children:r(p,{checkboxCount:i.rows.length,children:r(m,{cols:i.cols,errorHandler:i.errorHandler,children:r(h,{children:r(f,{children:r(w,{children:e(k,{rows:i.rows,cols:i.cols,children:[r(y,{}),e(x,{rows:i.rows,cols:i.cols,onUpdateRowFunction:i.onUpdateRow,children:[r(v,{enableDeprecatedCopy:null===(j=i.deprecatedOptions)||void 0===j?void 0:j.enableDeprecatedCopy}),r(F,{children:r(A,o({},i))})]})]})})})})})})})})})})})})})}function A(o){var n=i(o),s=n.cols,c=n.rowMaps,m=n.pageRowIds,a=R(),p=W();return e("div",{className:"w-full max-w-full max-h-full",children:[e("div",{children:[r(S,{cols:s,checkbox:!!o.checkbox,rows:o.rows,maxWidth:o.maxWidth,generateSortButton:p}),r(D,{children:e(H,{id:a.getTableId(),maxHeight:o.maxHeight,maxWidth:o.maxWidth,displayScroll:!1,children:[e("table",{className:"table",children:[r("thead",{children:e("tr",{children:[o.checkbox&&r("th",{}),s.map((function(o){return r(t,{keyname:o.key.toString()},o.key.toString())}))]})}),e("tbody",{children:[0===m.length&&r("tr",{children:r("td",{colSpan:s.length,className:"py-5",children:r("p",{className:"text-center font-bold text-lg",children:"NO DATA"})})}),m.map((function(e,i){return r(j,{existCheckbox:!!o.checkbox,rowIndex:i,dataString:c[e].stringValue,cols:o.cols,onClickRow:o.onClickRow,applyRowFormatting:o.applyRowFormatting,conditionalFormattingString:g(c[e].data,s,o.conditionalFormattings)},e)}))]})]}),r(b,{}),r(u,{rowMaps:c,pageRowIds:m})]})})]}),e("div",{className:"mt-1",children:[r(d,{}),r("div",{className:"mt-2",children:r(l,{})})]})]})}export{P as default};
3
3
  //# sourceMappingURL=base.js.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@teppen/react-ui",
3
- "version": "1.8.9",
3
+ "version": "1.8.10",
4
4
  "description": "React UI Component",
5
5
  "main": "dist/cjs/src/index.js",
6
6
  "module": "dist/esm/src/index.js",