@teppen/react-ui 1.5.16 → 1.5.17
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("../../../node_modules/tslib/tslib.es6.js"),r=require("react/jsx-runtime"),o=require("./hook.js"),i=require("../header/header.js"),t=require("../pagenation/providers.js"),s=require("../pagenation/components.js"),n=require("../filter/provider.js"),l=require("../filter/components.js");require("../sort/icon.js");var a=require("../sort/provider.js"),d=require("../sheet/providers.js"),c=require("../focus/provider.js"),u=require("../checkbox/provider.js"),x=require("../checkbox/components.js"),j=require("../libs/id-generator.js"),h=require("../edit/provider.js"),p=require("../table-property/provider.js"),g=require("../operation/components/keyboard-setting.js"),m=require("../sheet/components.js"),v=require("../paste/provider.js"),b=require("../libs/conditional-formatting.js"),
|
|
2
|
+
"use strict";var e=require("../../../node_modules/tslib/tslib.es6.js"),r=require("react/jsx-runtime"),o=require("./hook.js"),i=require("../header/header.js"),t=require("../pagenation/providers.js"),s=require("../pagenation/components.js"),n=require("../filter/provider.js"),l=require("../filter/components.js");require("../sort/icon.js");var a=require("../sort/provider.js"),d=require("../sheet/providers.js"),c=require("../focus/provider.js"),u=require("../checkbox/provider.js"),x=require("../checkbox/components.js"),j=require("../libs/id-generator.js"),h=require("../edit/provider.js"),p=require("../table-property/provider.js"),g=require("../operation/components/keyboard-setting.js"),m=require("../sheet/components.js"),v=require("../paste/provider.js"),b=require("../libs/conditional-formatting.js"),f=require("../edit/ui/editor.js"),w=require("../filter/hooks/selectedFilteringColumn/provider.js");function q(e){var t=o.useTable(e),n=t.cols,a=t.rowMaps,d=t.pageRowIds,u=w.useFilteringColumnStateContext(),h=v.usePasteActionContext().onPaste,p=c.useFocusActionContext().unfocus;return r.jsxs("div",{className:"w-full",children:[r.jsx("div",{className:"flex justify-end mb-1 mr-3",children:r.jsx(l.TableFilterRemoveButton,{children:r.jsx("p",{className:"text-xs underline text-gray-500 hover:text-gray-700",children:"全てのフィルタリング条件を解除する"})})}),r.jsxs("div",{id:"table-frame",className:"relative h-full max-w-full max-h-[80vh] border border-gray-200 rounded-md overflow-auto",children:[r.jsx(f.Editor,{rowMaps:a,pageRowIds:d}),r.jsxs("table",{className:"table",onPaste:function(e){e.preventDefault();var r=e.clipboardData.getData("Text");h(r.replace(/\t/g,",").trim().replace(/\r\n/g,"\n").split("\n").map((function(e){return e.split(",")})))},children:[r.jsx("thead",{children:r.jsxs("tr",{className:"sticky top-0 border-gray-200 z-20 bg-gray-200 text-gray-600 h-[32px]",onClick:function(e){e.stopPropagation(),p()},children:[e.checkbox&&r.jsx("th",{children:r.jsx(x.AllCheckbox,{rows:e.rows})}),n.map((function(e,o){return r.jsx(i.TableHeaderElement,{id:j.IdGenerator.getTableColId(o),col:e},e.key.toString())}))]})}),r.jsxs("tbody",{children:[!!u&&r.jsx("tr",{onClick:function(e){e.stopPropagation(),p()},children:r.jsx("td",{colSpan:n.length,className:"sticky top-8 left-0 bg-gray-300 w-full shadow-lg rounded-b-2xl z-20 p-0 overflow-hidden",children:r.jsx(l.TableFilterForm,{})})}),0===d.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"})})}),d.map((function(o,i){return r.jsx(m.Row,{existCheckbox:!!e.checkbox,rowIndex:i,dataString:a[o].stringValue,cols:e.cols,onClickRow:e.onClickRow,applyRowFormatting:e.applyRowFormatting,conditionalFormattingString:b.generateFormattingString(a[o].data,n,e.conditionalFormattings)},o)}))]})]})]}),r.jsxs("div",{className:"mt-1",children:[r.jsx(s.DisplayRange,{}),r.jsx("div",{className:"mt-2",children:r.jsx(s.Pagenation,{})})]})]})}module.exports=function(o){var i,s,l;return r.jsx(n.FilterProvider,{children:r.jsx(a.SortProvider,{initialCondition:null===(i=o.initialCondition)||void 0===i?void 0:i.sort,children:r.jsx(t.PagenationProvider,{rowCount:o.rows.length,perPage:null===(l=null===(s=o.initialCondition)||void 0===s?void 0:s.pagenation)||void 0===l?void 0:l.rowCountPerPage,children:r.jsx(u.CheckboxProvider,{checkbox:o.checkbox,children:r.jsx(u.CheckboxStatusProvider,{checkboxCount:o.rows.length,children:r.jsx(d.ColumnsProvider,{cols:o.cols,errorHandler:o.errorHandler,children:r.jsx(c.FocusProvider,{children:r.jsx(h.EditProvider,{children:r.jsx(p.TablePropertyProvider,{children:r.jsxs(v.PasteProvider,{rows:o.rows,cols:o.cols,onUpdateRowFunction:o.onUpdateRow,children:[r.jsx(g.KeyboardSetting,{}),r.jsx(q,e.__assign({},o))]})})})})})})})})})})};
|
|
3
3
|
//# sourceMappingURL=base.js.map
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import{__assign as
|
|
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 t}from"./hook.js";import{TableHeaderElement as i}from"../header/header.js";import{PagenationProvider as n}from"../pagenation/providers.js";import{DisplayRange as l,Pagenation as a}from"../pagenation/components.js";import{FilterProvider as s}from"../filter/provider.js";import{TableFilterRemoveButton as d,TableFilterForm as c}from"../filter/components.js";import"../sort/icon.js";import{SortProvider as m}from"../sort/provider.js";import{ColumnsProvider as p}from"../sheet/providers.js";import{FocusProvider as h,useFocusActionContext as f}from"../focus/provider.js";import{CheckboxProvider as g,CheckboxStatusProvider as u}from"../checkbox/provider.js";import{AllCheckbox as v}from"../checkbox/components.js";import{IdGenerator as b}from"../libs/id-generator.js";import{EditProvider as w}from"../edit/provider.js";import{TablePropertyProvider as x}from"../table-property/provider.js";import{KeyboardSetting as j}from"../operation/components/keyboard-setting.js";import{Row as k}from"../sheet/components.js";import{PasteProvider as y,usePasteActionContext as C}from"../paste/provider.js";import{generateFormattingString as N}from"../libs/conditional-formatting.js";import{Editor as R}from"../edit/ui/editor.js";import{useFilteringColumnStateContext as P}from"../filter/hooks/selectedFilteringColumn/provider.js";function F(t){var i,l,a;return r(s,{children:r(m,{initialCondition:null===(i=t.initialCondition)||void 0===i?void 0:i.sort,children:r(n,{rowCount:t.rows.length,perPage:null===(a=null===(l=t.initialCondition)||void 0===l?void 0:l.pagenation)||void 0===a?void 0:a.rowCountPerPage,children:r(g,{checkbox:t.checkbox,children:r(u,{checkboxCount:t.rows.length,children:r(p,{cols:t.cols,errorHandler:t.errorHandler,children:r(h,{children:r(w,{children:r(x,{children:e(y,{rows:t.rows,cols:t.cols,onUpdateRowFunction:t.onUpdateRow,children:[r(j,{}),r(S,o({},t))]})})})})})})})})})})}function S(o){var n=t(o),s=n.cols,m=n.rowMaps,p=n.pageRowIds,h=P(),g=C().onPaste,u=f().unfocus;return e("div",{className:"w-full",children:[r("div",{className:"flex justify-end mb-1 mr-3",children:r(d,{children:r("p",{className:"text-xs underline text-gray-500 hover:text-gray-700",children:"全てのフィルタリング条件を解除する"})})}),e("div",{id:"table-frame",className:"relative h-full max-w-full max-h-[80vh] border border-gray-200 rounded-md overflow-auto",children:[r(R,{rowMaps:m,pageRowIds:p}),e("table",{className:"table",onPaste:function(o){o.preventDefault();var r=o.clipboardData.getData("Text");g(r.replace(/\t/g,",").trim().replace(/\r\n/g,"\n").split("\n").map((function(o){return o.split(",")})))},children:[r("thead",{children:e("tr",{className:"sticky top-0 border-gray-200 z-20 bg-gray-200 text-gray-600 h-[32px]",onClick:function(o){o.stopPropagation(),u()},children:[o.checkbox&&r("th",{children:r(v,{rows:o.rows})}),s.map((function(o,e){return r(i,{id:b.getTableColId(e),col:o},o.key.toString())}))]})}),e("tbody",{children:[!!h&&r("tr",{onClick:function(o){o.stopPropagation(),u()},children:r("td",{colSpan:s.length,className:"sticky top-8 left-0 bg-gray-300 w-full shadow-lg rounded-b-2xl z-20 p-0 overflow-hidden",children:r(c,{})})}),0===p.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"})})}),p.map((function(e,t){return r(k,{existCheckbox:!!o.checkbox,rowIndex:t,dataString:m[e].stringValue,cols:o.cols,onClickRow:o.onClickRow,applyRowFormatting:o.applyRowFormatting,conditionalFormattingString:N(m[e].data,s,o.conditionalFormattings)},e)}))]})]})]}),e("div",{className:"mt-1",children:[r(l,{}),r("div",{className:"mt-2",children:r(a,{})})]})]})}export{F as default};
|
|
3
3
|
//# sourceMappingURL=base.js.map
|