🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
Book a DemoInstallSign in
Socket

@table-library/react-table-library

Package Overview
Dependencies
Maintainers
1
Versions
487
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@table-library/react-table-library - npm Package Compare versions

Comparing version

to
0.0.66

lib/index-6b10b2d7.js

2

lib/common.js

@@ -1,2 +0,2 @@

export{q as ADD_ALL,A as ADD_BY_ID,o as ADD_BY_ID_RECURSIVELY,t as REMOVE_ALL,R as REMOVE_BY_ID,p as REMOVE_BY_ID_RECURSIVELY,S as SET,m as addAll,e as addById,j as addByIds,l as byAll,b as findNodeById,f as fromNodesToList,h as hasLeaves,c as includesAll,i as isLeaf,r as recursiveMergeInsert,d as recursiveReplaceInsert,v as reducer,n as removeAll,g as removeById,k as removeByIds,a as useCommonReducer}from"./useCommonReducer-791c0a64.js";export{S as SortContext,a as TableContext,T as TreeContext}from"./Tree-ed2631c5.js";export{a as ResizeContext,R as ResizeProvider,S as SelectContext,T as ThemeContext}from"./Select-7ade56be.js";import"react";
export{q as ADD_ALL,A as ADD_BY_ID,o as ADD_BY_ID_RECURSIVELY,t as REMOVE_ALL,R as REMOVE_BY_ID,p as REMOVE_BY_ID_RECURSIVELY,S as SET,m as addAll,e as addById,j as addByIds,l as byAll,b as findNodeById,f as fromNodesToList,h as hasLeaves,c as includesAll,i as isLeaf,r as recursiveMergeInsert,d as recursiveReplaceInsert,v as reducer,n as removeAll,g as removeById,k as removeByIds,a as useCommonReducer}from"./useCommonReducer-89d44636.js";export{S as SortContext,a as TableContext,T as TreeContext}from"./Tree-ed2631c5.js";export{a as ResizeContext,R as ResizeProvider,S as SelectContext,T as ThemeContext}from"./Select-7ade56be.js";import"react";
//# sourceMappingURL=common.js.map

@@ -1,2 +0,2 @@

import{B as e,R as n}from"./index-6fb9ec89.js";export{i as Table}from"./index-6fb9ec89.js";import{t,o as r,H as o,C as s,i as c}from"./Cell-f7961bd7.js";import l,{css as a}from"styled-components";import{createElement as p,cloneElement as u,memo as f,useContext as d,useCallback as g}from"react";import{p as h,d as v}from"./Select-7ade56be.js";import{S as y,T as O}from"./Tree-ed2631c5.js";import w from"classnames";import{u as m,s as b,i as j,a as x,h as T}from"./useCommonReducer-791c0a64.js";import{_ as P}from"./index-f6a4e69e.js";export{i as Select}from"./index-f6a4e69e.js";import"lodash.isequal";import"use-double-click";var k,S=Object.freeze({__proto__:null,useTheme:function(e){return Object.keys(e).reduce((function(n,r){return n[r]=a(k||(k=t(["\n ","\n "])),e[r]),n}),{})}}),D=function(e){var n=e.width,t=e.height,r=e.viewBox,o=e.strokeWidth,i=e.style;return p("svg",{id:"svg-icon-chevron-single-down","data-name":"svg-icon-chevron-single-down","data-testid":"svg-icon-chevron-single-down",xmlns:"http://www.w3.org/2000/svg",width:n||"36rem",height:t||"36rem",viewBox:r||"0 0 36 36",strokeWidth:o||"0rem",style:i||null},p("polygon",{points:"0 15 0 12 18 21 36 12 36 15 18 24 0 15"}))};D.propTypes={height:h.oneOfType([h.string,h.number]),strokeWidth:h.oneOfType([h.string,h.number]),style:h.objectOf(h.string),viewBox:h.string,width:h.oneOfType([h.string,h.number])};var _=function(e){var n=e.width,t=e.height,r=e.viewBox,o=e.strokeWidth,i=e.style;return p("svg",{id:"svg-icon-chevron-single-up","data-name":"svg-icon-chevron-single-up","data-testid":"svg-icon-chevron-single-up",xmlns:"http://www.w3.org/2000/svg",width:n||"36rem",height:t||"36rem",viewBox:r||"0 0 36 36",strokeWidth:o||"0rem",style:i||null},p("polygon",{points:"36 21 36 24 18 15 0 24 0 21 18 12 36 21"}))};_.propTypes={height:h.oneOfType([h.string,h.number]),strokeWidth:h.oneOfType([h.string,h.number]),style:h.objectOf(h.string),viewBox:h.string,width:h.oneOfType([h.string,h.number])};var E=function(e){var n=e.width,t=e.height,r=e.viewBox,o=e.strokeWidth,i=e.style;return p("svg",{id:"svg-icon-chevron-single-up-down","data-name":"svg-icon-chevron-single-up-down","data-testid":"svg-icon-chevron-single-up-down",xmlns:"http://www.w3.org/2000/svg",width:n||"36rem",height:t||"36rem",viewBox:r||"0 0 36 36",strokeWidth:o||"0rem",style:i||null},p("polygon",{points:"36 12 36 15 18 6 0 15 0 12 18 3 36 12"}),p("polygon",{points:"0 24 0 21 18 30 36 21 36 24 18 33 0 24"}))};E.propTypes={height:h.oneOfType([h.string,h.number]),strokeWidth:h.oneOfType([h.string,h.number]),style:h.objectOf(h.string),viewBox:h.string,width:h.oneOfType([h.string,h.number])};var C,B=function(e,n){return null===e?null:void 0===e?n:e},I=l.button(C||(C=t(["\n display: flex;\n align-items: center;\n\n background: none;\n color: inherit;\n border: none;\n padding: 0;\n font: inherit;\n cursor: pointer;\n outline: inherit;\n\n width: 100%;\n height: 100%;\n\n &.narrow {\n width: auto;\n }\n\n &.active {\n font-weight: bold;\n }\n\n span {\n display: flex;\n align-items: center;\n justify-content: center;\n }\n\n &.prefix span {\n margin-right: ",";\n }\n\n &.suffix span {\n margin-left: ",";\n }\n\n div {\n text-align: left;\n overflow: hidden;\n white-space: nowrap;\n text-overflow: ellipsis;\n }\n\n div:after {\n display: block;\n content: attr(title);\n font-weight: bold;\n height: 0;\n overflow: hidden;\n visibility: hidden;\n }\n"])),(function(e){return e.margin}),(function(e){return e.margin})),R={Prefix:"Prefix",Suffix:"Suffix"};function K(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function W(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?K(Object(t),!0).forEach((function(n){v(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):K(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var F=function(e){var n=e.sort,t=e.sortFn,r=e.sortKey,o=e.sortIcon,i=e.children,s=n.state,c=n.fns,l=o.position||R.Suffix,a=o.size||"14px",f=o.margin||"4px",d=B(o.iconDefault,p(E,null)),g=B(o.iconUp,p(_,null)),h=B(o.iconDown,p(D,null)),v=l===R.Prefix,y=l===R.Suffix,O=function(e,n,t,r,o,i){var s={height:"".concat(t),width:"".concat(t)};return e.sortKey===n&&e.reverse?i?u(i,W({},s)):null:e.sortKey!==n||e.reverse?r?u(r,W({},s)):null:o?u(o,W({},s)):null}(s,r,a,d,g,h);return p(I,{className:w({active:s.sortKey===r,prefix:v,suffix:y}),margin:f,onClick:function(){return c.onToggleSort({sortFn:t,sortKey:r})}},v&&O&&p("span",null,O),p("div",{title:i},i),y&&O&&p("span",null,O))};F.propTypes={sort:h.objectOf(h.any),sortKey:h.string,sortFn:h.func,sortIcon:h.shape({position:h.oneOf(Object.values(R)),margin:h.string,size:h.string,iconDefault:h.node,iconUp:h.node,iconDown:h.node}),children:h.oneOfType([h.arrayOf(h.node),h.node,h.func])};var L=f((function(e){var n=e.sortKey,t=e.sortFn,i=e.sortIcon,s=void 0===i?{}:i,c=e.children,l=r(e,["sortKey","sortFn","sortIcon","children"]),a=d(y);return p(o,l,p(F,{sort:a,sortKey:n,sortFn:t,sortIcon:s},c))}));function z(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function N(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?z(Object(t),!0).forEach((function(n){v(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):z(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}L.propTypes={sortKey:h.string,sortFn:h.func,sortIcon:h.shape({position:h.oneOf(Object.values(R)),margin:h.string,size:h.string,iconDefault:h.node,iconUp:h.node,iconDown:h.node}),children:h.oneOfType([h.arrayOf(h.node),h.node,h.func])};var X,Y=function(e,n){switch(n.type){case"TOGGLE_SORT":var t=n.payload.sortKey===e.sortKey&&!e.reverse;return N(N({},n.payload),{},t?{sortFn:function(e){return n.payload.sortFn(e).reverse()},reverse:!0}:{reverse:!1});default:throw new Error}},G={sortKey:"NONE",sortFn:function(e){return e},reverse:!1},U={isServer:!1},H=Object.freeze({__proto__:null,HeaderCellSort:L,useSort:function(e){e.data;var n=e.initialState,t=void 0===n?G:n,r=e.onChange,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=m(Y,t,[],[r]),s=b(i,2),c=s[0],l=s[1],a=g((function(e){return l({type:"TOGGLE_SORT",payload:e})}),[l]),p={onToggleSort:a},u=N(N({},U),o);return{state:c,fns:p,_options:u}},SORT_ICON_POSITIONS:R}),q=function(e){var n=e.width,t=e.height,r=e.viewBox,o=e.strokeWidth,i=e.style;return p("svg",{id:"svg-icon-chevron-single-right","data-name":"svg-icon-chevron-single-right","data-testid":"svg-icon-chevron-single-right",xmlns:"http://www.w3.org/2000/svg",width:n||"36rem",height:t||"36rem",viewBox:r||"0 0 36 36",strokeWidth:o||"0rem",style:i||null},p("polygon",{points:"15 36 12 36 21 18 12 0 15 0 24 18 15 36"}))};function A(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function J(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?A(Object(t),!0).forEach((function(n){v(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):A(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}q.propTypes={height:h.oneOfType([h.string,h.number]),strokeWidth:h.oneOfType([h.string,h.number]),style:h.objectOf(h.string),viewBox:h.string,width:h.oneOfType([h.string,h.number])};var M=l.div(X||(X=t(["\n display: flex;\n align-items: center;\n\n & > div {\n text-align: left;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n }\n"]))),Q=f((function(e){var n=e.item,t=e.treeIcon,o=void 0===t?{}:t,i=e.children,c=r(e,["item","treeIcon","children"]),l=d(O),a=o.size||"14px",f=o.margin||"4px",g=B(o.iconDefault,null),h=B(o.iconRight,p(q,null)),v=B(o.iconDown,p(D,null)),y=function(e,n,t,r,o,i){var s={height:"".concat(t),width:"".concat(t)},c=n.ids.includes(e.id);return!j(e)&&c?i?u(i,J({},s)):null:j(e)||c?r?u(r,J({},s)):null:o?u(o,J({},s)):null}(n,l.state,a,g,h,v);return p(s,c,p(M,null,p(I,{className:"prefix narrow",margin:f,onClick:function(){j(n)||l.fns.onToggleById(n.id)}},y&&p("span",null,y)),p("div",null,i)))}));Q.propTypes={item:h.objectOf(h.any),treeIcon:h.shape({margin:h.string,size:h.string,iconDefault:h.node,iconRight:h.node,iconDown:h.node}),children:h.oneOfType([h.arrayOf(h.node),h.node,h.func])};var V,Z={RowClick:"RowClick",ButtonClick:"ButtonClick"};function $(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function ee(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?$(Object(t),!0).forEach((function(n){v(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):$(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var ne=function(o,i){var s=o.item,l=o.children,u=r(o,["item","children"]),f=i.tree,d=f.state.ids.includes(s.id),g=o.treeYLevel||f._options.treeYLevel,h=o.treeXLevel||f._options.treeXLevel,v=a(V||(V=t(["\n &.row-tree-clickable {\n cursor: pointer;\n }\n\n .td:nth-child(",") > div {\n margin-left: ","px;\n }\n "])),g+1,20*h),y=w("row-tree",{"row-tree-clickable":f._options.treeExpandType===Z.RowClick,"row-tree-expanded":d,"row-tree-leaf":j(s)}),O=[];return d&&T(s)&&(O=O.concat(p(e,null,s.nodes.map((function(e){return p(n,P({key:e.id,item:e},u,{treeYLevel:g,treeXLevel:h+1}),(function(e){return l(e)}))}))))),{theme:v,className:y,onClick:function(e,n){c(n)&&(j(e)||f._options.treeExpandType===Z.RowClick&&f.fns.onToggleById(e.id))},panels:O}},te={ids:[]},re={treeExpandType:Z.RowClick,treeXLevel:0,treeYLevel:0},oe=Object.freeze({__proto__:null,CellTree:Q,TREE_EXPAND_TYPES:Z,useTree:function(e){var n=e.data,t=e.initialState,r=void 0===t?te:t,o=e.onChange,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},s=x(n,r,o),c=b(s,2),l=c[0],a=c[1],p=ee(ee({},re),i);return{state:l,fns:a,_options:p,_getRowProps:ne}}});export{H as Sort,S as Theme,oe as Tree};
import{B as e,R as n}from"./index-6fb9ec89.js";export{i as Table}from"./index-6fb9ec89.js";import{t,o as r,H as o,C as s,i as c}from"./Cell-f7961bd7.js";import l,{css as a}from"styled-components";import{createElement as p,cloneElement as u,memo as f,useContext as d,useCallback as g}from"react";import{p as h,d as v}from"./Select-7ade56be.js";import{S as y,T as O}from"./Tree-ed2631c5.js";import w from"classnames";import{u as b,s as m,i as j,a as x,h as T}from"./useCommonReducer-89d44636.js";import{_ as P}from"./index-6b10b2d7.js";export{i as Select}from"./index-6b10b2d7.js";import"lodash.isequal";import"use-double-click";var k,S=Object.freeze({__proto__:null,useTheme:function(e){return Object.keys(e).reduce((function(n,r){return n[r]=a(k||(k=t(["\n ","\n "])),e[r]),n}),{})}}),D=function(e){var n=e.width,t=e.height,r=e.viewBox,o=e.strokeWidth,i=e.style;return p("svg",{id:"svg-icon-chevron-single-down","data-name":"svg-icon-chevron-single-down","data-testid":"svg-icon-chevron-single-down",xmlns:"http://www.w3.org/2000/svg",width:n||"36rem",height:t||"36rem",viewBox:r||"0 0 36 36",strokeWidth:o||"0rem",style:i||null},p("polygon",{points:"0 15 0 12 18 21 36 12 36 15 18 24 0 15"}))};D.propTypes={height:h.oneOfType([h.string,h.number]),strokeWidth:h.oneOfType([h.string,h.number]),style:h.objectOf(h.string),viewBox:h.string,width:h.oneOfType([h.string,h.number])};var _=function(e){var n=e.width,t=e.height,r=e.viewBox,o=e.strokeWidth,i=e.style;return p("svg",{id:"svg-icon-chevron-single-up","data-name":"svg-icon-chevron-single-up","data-testid":"svg-icon-chevron-single-up",xmlns:"http://www.w3.org/2000/svg",width:n||"36rem",height:t||"36rem",viewBox:r||"0 0 36 36",strokeWidth:o||"0rem",style:i||null},p("polygon",{points:"36 21 36 24 18 15 0 24 0 21 18 12 36 21"}))};_.propTypes={height:h.oneOfType([h.string,h.number]),strokeWidth:h.oneOfType([h.string,h.number]),style:h.objectOf(h.string),viewBox:h.string,width:h.oneOfType([h.string,h.number])};var E=function(e){var n=e.width,t=e.height,r=e.viewBox,o=e.strokeWidth,i=e.style;return p("svg",{id:"svg-icon-chevron-single-up-down","data-name":"svg-icon-chevron-single-up-down","data-testid":"svg-icon-chevron-single-up-down",xmlns:"http://www.w3.org/2000/svg",width:n||"36rem",height:t||"36rem",viewBox:r||"0 0 36 36",strokeWidth:o||"0rem",style:i||null},p("polygon",{points:"36 12 36 15 18 6 0 15 0 12 18 3 36 12"}),p("polygon",{points:"0 24 0 21 18 30 36 21 36 24 18 33 0 24"}))};E.propTypes={height:h.oneOfType([h.string,h.number]),strokeWidth:h.oneOfType([h.string,h.number]),style:h.objectOf(h.string),viewBox:h.string,width:h.oneOfType([h.string,h.number])};var C,B=function(e,n){return null===e?null:void 0===e?n:e},I=l.button(C||(C=t(["\n display: flex;\n align-items: center;\n\n background: none;\n color: inherit;\n border: none;\n padding: 0;\n font: inherit;\n cursor: pointer;\n outline: inherit;\n\n width: 100%;\n height: 100%;\n\n &.narrow {\n width: auto;\n }\n\n &.active {\n font-weight: bold;\n }\n\n span {\n display: flex;\n align-items: center;\n justify-content: center;\n }\n\n &.prefix span {\n margin-right: ",";\n }\n\n &.suffix span {\n margin-left: ",";\n }\n\n div {\n text-align: left;\n overflow: hidden;\n white-space: nowrap;\n text-overflow: ellipsis;\n }\n\n div:after {\n display: block;\n content: attr(title);\n font-weight: bold;\n height: 0;\n overflow: hidden;\n visibility: hidden;\n }\n"])),(function(e){return e.margin}),(function(e){return e.margin})),R={Prefix:"Prefix",Suffix:"Suffix"};function K(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function W(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?K(Object(t),!0).forEach((function(n){v(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):K(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var F=function(e){var n=e.sort,t=e.sortFn,r=e.sortKey,o=e.sortIcon,i=e.children,s=n.state,c=n.fns,l=o.position||R.Suffix,a=o.size||"14px",f=o.margin||"4px",d=B(o.iconDefault,p(E,null)),g=B(o.iconUp,p(_,null)),h=B(o.iconDown,p(D,null)),v=l===R.Prefix,y=l===R.Suffix,O=function(e,n,t,r,o,i){var s={height:"".concat(t),width:"".concat(t)};return e.sortKey===n&&e.reverse?i?u(i,W({},s)):null:e.sortKey!==n||e.reverse?r?u(r,W({},s)):null:o?u(o,W({},s)):null}(s,r,a,d,g,h);return p(I,{className:w({active:s.sortKey===r,prefix:v,suffix:y}),margin:f,onClick:function(){return c.onToggleSort({sortFn:t,sortKey:r})}},v&&O&&p("span",null,O),p("div",{title:i},i),y&&O&&p("span",null,O))};F.propTypes={sort:h.objectOf(h.any),sortKey:h.string,sortFn:h.func,sortIcon:h.shape({position:h.oneOf(Object.values(R)),margin:h.string,size:h.string,iconDefault:h.node,iconUp:h.node,iconDown:h.node}),children:h.oneOfType([h.arrayOf(h.node),h.node,h.func])};var L=f((function(e){var n=e.sortKey,t=e.sortFn,i=e.sortIcon,s=void 0===i?{}:i,c=e.children,l=r(e,["sortKey","sortFn","sortIcon","children"]),a=d(y);return p(o,l,p(F,{sort:a,sortKey:n,sortFn:t,sortIcon:s},c))}));function z(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function N(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?z(Object(t),!0).forEach((function(n){v(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):z(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}L.propTypes={sortKey:h.string,sortFn:h.func,sortIcon:h.shape({position:h.oneOf(Object.values(R)),margin:h.string,size:h.string,iconDefault:h.node,iconUp:h.node,iconDown:h.node}),children:h.oneOfType([h.arrayOf(h.node),h.node,h.func])};var X,Y=function(e,n){switch(n.type){case"TOGGLE_SORT":var t=n.payload.sortKey===e.sortKey&&!e.reverse;return N(N({},n.payload),{},t?{sortFn:function(e){return n.payload.sortFn(e).reverse()},reverse:!0}:{reverse:!1});default:throw new Error}},G={sortKey:"NONE",sortFn:function(e){return e},reverse:!1},U={isServer:!1},H=Object.freeze({__proto__:null,HeaderCellSort:L,useSort:function(e){e.data;var n=e.initialState,t=void 0===n?G:n,r=e.onChange,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=b(Y,t,[],[r]),s=m(i,2),c=s[0],l=s[1],a=g((function(e){return l({type:"TOGGLE_SORT",payload:e})}),[l]),p={onToggleSort:a},u=N(N({},U),o);return{state:c,fns:p,_options:u}},SORT_ICON_POSITIONS:R}),q=function(e){var n=e.width,t=e.height,r=e.viewBox,o=e.strokeWidth,i=e.style;return p("svg",{id:"svg-icon-chevron-single-right","data-name":"svg-icon-chevron-single-right","data-testid":"svg-icon-chevron-single-right",xmlns:"http://www.w3.org/2000/svg",width:n||"36rem",height:t||"36rem",viewBox:r||"0 0 36 36",strokeWidth:o||"0rem",style:i||null},p("polygon",{points:"15 36 12 36 21 18 12 0 15 0 24 18 15 36"}))};function A(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function J(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?A(Object(t),!0).forEach((function(n){v(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):A(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}q.propTypes={height:h.oneOfType([h.string,h.number]),strokeWidth:h.oneOfType([h.string,h.number]),style:h.objectOf(h.string),viewBox:h.string,width:h.oneOfType([h.string,h.number])};var M=l.div(X||(X=t(["\n display: flex;\n align-items: center;\n\n & > div {\n text-align: left;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n }\n"]))),Q=f((function(e){var n=e.item,t=e.treeIcon,o=void 0===t?{}:t,i=e.children,c=r(e,["item","treeIcon","children"]),l=d(O),a=o.size||"14px",f=o.margin||"4px",g=B(o.iconDefault,null),h=B(o.iconRight,p(q,null)),v=B(o.iconDown,p(D,null)),y=function(e,n,t,r,o,i){var s={height:"".concat(t),width:"".concat(t)},c=n.ids.includes(e.id);return!j(e)&&c?i?u(i,J({},s)):null:j(e)||c?r?u(r,J({},s)):null:o?u(o,J({},s)):null}(n,l.state,a,g,h,v);return p(s,c,p(M,null,p(I,{className:"prefix narrow",margin:f,onClick:function(){j(n)||l.fns.onToggleById(n.id)}},y&&p("span",null,y)),p("div",null,i)))}));Q.propTypes={item:h.objectOf(h.any),treeIcon:h.shape({margin:h.string,size:h.string,iconDefault:h.node,iconRight:h.node,iconDown:h.node}),children:h.oneOfType([h.arrayOf(h.node),h.node,h.func])};var V,Z={RowClick:"RowClick",ButtonClick:"ButtonClick"};function $(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function ee(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?$(Object(t),!0).forEach((function(n){v(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):$(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var ne=function(o,i){var s=o.item,l=o.children,u=r(o,["item","children"]),f=i.tree,d=f.state.ids.includes(s.id),g=o.treeYLevel||f._options.treeYLevel,h=o.treeXLevel||f._options.treeXLevel,v=a(V||(V=t(["\n &.row-tree-clickable {\n cursor: pointer;\n }\n\n .td:nth-child(",") > div {\n margin-left: ","px;\n }\n "])),g+1,20*h),y=w("row-tree",{"row-tree-clickable":f._options.treeExpandType===Z.RowClick,"row-tree-expanded":d,"row-tree-leaf":j(s)}),O=[];return d&&T(s)&&(O=O.concat(p(e,null,s.nodes.map((function(e){return p(n,P({key:e.id,item:e},u,{treeYLevel:g,treeXLevel:h+1}),(function(e){return l(e)}))}))))),{theme:v,className:y,onClick:function(e,n){c(n)&&(j(e)||f._options.treeExpandType===Z.RowClick&&f.fns.onToggleById(e.id))},panels:O}},te={ids:[]},re={treeExpandType:Z.RowClick,treeXLevel:0,treeYLevel:0},oe=Object.freeze({__proto__:null,CellTree:Q,TREE_EXPAND_TYPES:Z,useTree:function(e){var n=e.data,t=e.initialState,r=void 0===t?te:t,o=e.onChange,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},s=x(n,r,o),c=m(s,2),l=c[0],a=c[1],p=ee(ee({},re),i);return{state:l,fns:a,_options:p,_getRowProps:ne}}});export{H as Sort,S as Theme,oe as Tree};
//# sourceMappingURL=main.js.map

@@ -1,2 +0,2 @@

export{C as CellSelect,H as HeaderCellSelect,S as SELECT_TYPES,u as useSelect}from"./index-f6a4e69e.js";import"./Select-7ade56be.js";import"react";import"./Cell-f7961bd7.js";import"styled-components";import"classnames";import"./useCommonReducer-791c0a64.js";
export{C as CellSelect,H as HeaderCellSelect,S as SELECT_TYPES,u as useSelect}from"./index-6b10b2d7.js";import"./Select-7ade56be.js";import"react";import"./Cell-f7961bd7.js";import"styled-components";import"classnames";import"./useCommonReducer-89d44636.js";
//# sourceMappingURL=select.js.map
{
"name": "@table-library/react-table-library",
"version": "0.0.65",
"version": "0.0.66",
"description": "react-table-library",

@@ -69,2 +69,3 @@ "main": "lib/main.js",

"react-dom": "16.13.1",
"rollup-plugin-delete": "^2.0.0",
"rollup-plugin-peer-deps-external": "^2.2.4",

@@ -71,0 +72,0 @@ "rollup-plugin-postcss": "^4.0.0",