From 3e673f2bc3ba796abe568a0d32a0b67a4c1da647 Mon Sep 17 00:00:00 2001
From: Geovanni Perez <1775792+geoperez@users.noreply.github.com>
Date: Tue, 10 Sep 2019 20:10:28 -0500
Subject: [PATCH] New Tubular Common 2.0 (#421)
* Update to Common 2.0
* Update doc
* Fixed
* Patching types usage
---
README.md | 1 -
docs/index.html | 2 +-
docs/{pages.4364571c.js => pages.27cf2e95.js} | 168 +++++++++---------
package-lock.json | 37 ++--
package.json | 6 +-
sample/src/CustomHttpClient.ts | 4 +-
sample/src/CustomLayoutDataGrid.tsx | 4 +-
sample/src/RemoteGridList.tsx | 7 +-
sample/src/localDataGrid.tsx | 3 +-
sample/src/remoteDataGrid.tsx | 30 ++--
src/DataGrid/DataGrid.tsx | 4 +-
src/DataGrid/GridHeader.tsx | 3 +-
src/DataGridInterfaces/IDataGridApi.ts | 3 +-
src/DataGridInterfaces/IDataGridConfig.ts | 2 +-
src/DataGridInterfaces/IDataGridState.ts | 3 +-
src/DataGridInterfaces/IDataGridStorage.ts | 10 --
src/DataGridInterfaces/IFilterWrapper.ts | 8 -
src/DataGridInterfaces/index.ts | 3 -
src/Filtering/DialogInput.tsx | 12 +-
src/Filtering/DialogModal.tsx | 35 +---
src/Filtering/OperatorsDropdown.tsx | 4 +-
src/Hooks/useDataGrid.ts | 30 ++--
src/Storage/LocalStorage.tsx | 40 -----
src/Storage/NullStorage.tsx | 28 ---
src/Storage/index.ts | 7 -
src/Toolbar/GridToolbarFunctions.ts | 64 +------
src/index.ts | 2 -
src/utils/ITubularHttpClient.ts | 7 -
src/utils/ShallowHttpClient.ts | 18 --
src/utils/TubularHttpClient.ts | 73 --------
src/utils/debounce.ts | 24 ---
src/utils/index.ts | 15 +-
src/utils/renders.tsx | 31 +---
srcdocs/components/BasicFeatures.tsx | 16 +-
srcdocs/components/CustomizableGrid.tsx | 2 +-
srcdocs/utils/codeSnipetExamples.ts | 18 +-
test/DataGrid.spec.tsx | 2 +-
37 files changed, 182 insertions(+), 544 deletions(-)
rename docs/{pages.4364571c.js => pages.27cf2e95.js} (95%)
delete mode 100644 src/DataGridInterfaces/IDataGridStorage.ts
delete mode 100644 src/DataGridInterfaces/IFilterWrapper.ts
delete mode 100644 src/DataGridInterfaces/index.ts
delete mode 100644 src/Storage/LocalStorage.tsx
delete mode 100644 src/Storage/NullStorage.tsx
delete mode 100644 src/Storage/index.ts
delete mode 100644 src/utils/ITubularHttpClient.ts
delete mode 100644 src/utils/ShallowHttpClient.ts
delete mode 100644 src/utils/TubularHttpClient.ts
delete mode 100644 src/utils/debounce.ts
diff --git a/README.md b/README.md
index 52b0035d..371f4a7e 100644
--- a/README.md
+++ b/README.md
@@ -42,7 +42,6 @@ Table of contents
## Dependencies
-* [date-fns](https://date-fns.org/)
* [Material UI](https://material-ui.com/)
* [React](https://reactjs.org/)
* [Tubular Common](https://github.com/unosquare/tubular-common)
diff --git a/docs/index.html b/docs/index.html
index a8147873..5f2a7f87 100644
--- a/docs/index.html
+++ b/docs/index.html
@@ -1 +1 @@
-
Tubular React | Unosquare Open Source
\ No newline at end of file
+Tubular React | Unosquare Open Source
\ No newline at end of file
diff --git a/docs/pages.4364571c.js b/docs/pages.27cf2e95.js
similarity index 95%
rename from docs/pages.4364571c.js
rename to docs/pages.27cf2e95.js
index 36c80927..96a8a25c 100644
--- a/docs/pages.4364571c.js
+++ b/docs/pages.27cf2e95.js
@@ -732,39 +732,17 @@ var e=arguments[3];Object.defineProperty(exports,"__esModule",{value:!0}),export
"use strict";var e=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var r=e(require("react")),t=e(require("./utils/createSvgIcon")),l=(0,t.default)(r.default.createElement("path",{d:"M9.4 16.6L4.8 12l4.6-4.6L8 6l-6 6 6 6 1.4-1.4zm5.2 0l4.6-4.6-4.6-4.6L16 6l6 6-6 6-1.4-1.4z"}),"Code");exports.default=l;
},{"@babel/runtime/helpers/interopRequireDefault":"u5tj","react":"1n8/","./utils/createSvgIcon":"Atth"}],"W7b0":[function(require,module,exports) {
-},{}],"91CL":[function(require,module,exports) {
-"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var e=t(require("react"));function t(e){return e&&e.__esModule?e:{default:e}}var r=e.default.createContext(),u=r;exports.default=u;
-},{"react":"1n8/"}],"zbjU":[function(require,module,exports) {
-"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=exports.styles=void 0;var e=i(require("@babel/runtime/helpers/esm/extends")),r=i(require("@babel/runtime/helpers/esm/objectWithoutProperties")),t=i(require("react")),a=i(require("prop-types")),s=i(require("clsx")),l=i(require("../styles/withStyles")),d=i(require("./TableContext"));function i(e){return e&&e.__esModule?e:{default:e}}var o={root:{display:"table",width:"100%",borderCollapse:"collapse",borderSpacing:0},stickyHeader:{borderCollapse:"separate"}};exports.styles=o;var u=t.default.forwardRef(function(a,l){var i=a.classes,o=a.className,u=a.component,n=void 0===u?"table":u,c=a.padding,p=void 0===c?"default":c,f=a.size,m=void 0===f?"medium":f,b=a.stickyHeader,v=void 0!==b&&b,y=(0,r.default)(a,["classes","className","component","padding","size","stickyHeader"]),x=t.default.useMemo(function(){return{padding:p,size:m,stickyHeader:v}},[p,m,v]);return t.default.createElement(d.default.Provider,{value:x},t.default.createElement(n,(0,e.default)({ref:l,className:(0,s.default)(i.root,o,v&&i.stickyHeader)},y)))}),n=(0,l.default)(o,{name:"MuiTable"})(u);exports.default=n;
-},{"@babel/runtime/helpers/esm/extends":"NLFh","@babel/runtime/helpers/esm/objectWithoutProperties":"kDQp","react":"1n8/","prop-types":"1NUe","clsx":"WLGK","../styles/withStyles":"awmK","./TableContext":"91CL"}],"Amxx":[function(require,module,exports) {
-"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),Object.defineProperty(exports,"default",{enumerable:!0,get:function(){return e.default}});var e=t(require("./Table"));function t(e){return e&&e.__esModule?e:{default:e}}
-},{"./Table":"zbjU"}],"b5B3":[function(require,module,exports) {
-"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=exports.styles=void 0;var e=u(require("@babel/runtime/helpers/esm/extends")),t=u(require("@babel/runtime/helpers/esm/objectWithoutProperties")),r=u(require("react")),a=u(require("prop-types")),l=u(require("clsx")),s=u(require("../styles/withStyles")),o=u(require("../Table/Tablelvl2Context"));function u(e){return e&&e.__esModule?e:{default:e}}var i={root:{display:"table-footer-group"}};exports.styles=i;var d={variant:"footer"},f=r.default.forwardRef(function(a,s){var u=a.classes,i=a.className,f=a.component,n=void 0===f?"tfoot":f,c=(0,t.default)(a,["classes","className","component"]);return r.default.createElement(o.default.Provider,{value:d},r.default.createElement(n,(0,e.default)({className:(0,l.default)(u.root,i),ref:s},c)))}),n=(0,s.default)(i,{name:"MuiTableFooter"})(f);exports.default=n;
-},{"@babel/runtime/helpers/esm/extends":"NLFh","@babel/runtime/helpers/esm/objectWithoutProperties":"kDQp","react":"1n8/","prop-types":"1NUe","clsx":"WLGK","../styles/withStyles":"awmK","../Table/Tablelvl2Context":"91CL"}],"ZLWC":[function(require,module,exports) {
-"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),Object.defineProperty(exports,"default",{enumerable:!0,get:function(){return e.default}});var e=t(require("./TableFooter"));function t(e){return e&&e.__esModule?e:{default:e}}
-},{"./TableFooter":"b5B3"}],"sGe6":[function(require,module,exports) {
-"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=exports.styles=void 0;var e=o(require("@babel/runtime/helpers/esm/extends")),t=o(require("@babel/runtime/helpers/esm/objectWithoutProperties")),r=o(require("react")),a=o(require("prop-types")),l=o(require("clsx")),s=o(require("../styles/withStyles")),u=o(require("../Table/Tablelvl2Context"));function o(e){return e&&e.__esModule?e:{default:e}}var d={root:{display:"table-header-group"}};exports.styles=d;var i={variant:"head"},n=r.default.forwardRef(function(a,s){var o=a.classes,d=a.className,n=a.component,f=void 0===n?"thead":n,c=(0,t.default)(a,["classes","className","component"]);return r.default.createElement(u.default.Provider,{value:i},r.default.createElement(f,(0,e.default)({className:(0,l.default)(o.root,d),ref:s},c)))}),f=(0,s.default)(d,{name:"MuiTableHead"})(n);exports.default=f;
-},{"@babel/runtime/helpers/esm/extends":"NLFh","@babel/runtime/helpers/esm/objectWithoutProperties":"kDQp","react":"1n8/","prop-types":"1NUe","clsx":"WLGK","../styles/withStyles":"awmK","../Table/Tablelvl2Context":"91CL"}],"BYgd":[function(require,module,exports) {
-"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),Object.defineProperty(exports,"default",{enumerable:!0,get:function(){return e.default}});var e=t(require("./TableHead"));function t(e){return e&&e.__esModule?e:{default:e}}
-},{"./TableHead":"sGe6"}],"HZfJ":[function(require,module,exports) {
-"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=exports.styles=void 0;var e=u(require("@babel/runtime/helpers/esm/extends")),t=u(require("@babel/runtime/helpers/esm/objectWithoutProperties")),r=u(require("react")),a=u(require("prop-types")),l=u(require("clsx")),s=u(require("../styles/withStyles")),o=u(require("../Table/Tablelvl2Context"));function u(e){return e&&e.__esModule?e:{default:e}}var d={root:{display:"table-row-group"}};exports.styles=d;var i={variant:"body"},n=r.default.forwardRef(function(a,s){var u=a.classes,d=a.className,n=a.component,f=void 0===n?"tbody":n,c=(0,t.default)(a,["classes","className","component"]);return r.default.createElement(o.default.Provider,{value:i},r.default.createElement(f,(0,e.default)({className:(0,l.default)(u.root,d),ref:s},c)))}),f=(0,s.default)(d,{name:"MuiTableBody"})(n);exports.default=f;
-},{"@babel/runtime/helpers/esm/extends":"NLFh","@babel/runtime/helpers/esm/objectWithoutProperties":"kDQp","react":"1n8/","prop-types":"1NUe","clsx":"WLGK","../styles/withStyles":"awmK","../Table/Tablelvl2Context":"91CL"}],"0cmi":[function(require,module,exports) {
-"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),Object.defineProperty(exports,"default",{enumerable:!0,get:function(){return e.default}});var e=t(require("./TableBody"));function t(e){return e&&e.__esModule?e:{default:e}}
-},{"./TableBody":"HZfJ"}],"Im4G":[function(require,module,exports) {
-"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=exports.styles=void 0;var e=s(require("@babel/runtime/helpers/esm/objectWithoutProperties")),t=s(require("@babel/runtime/helpers/esm/extends")),a=s(require("react")),i=s(require("prop-types")),r=s(require("clsx")),d=s(require("../styles/withStyles")),l=require("../utils/helpers"),n=require("../styles/colorManipulator"),o=s(require("../Table/TableContext")),p=s(require("../Table/Tablelvl2Context"));function s(e){return e&&e.__esModule?e:{default:e}}var g=function(e){return{root:(0,t.default)({},e.typography.body2,{display:"table-cell",verticalAlign:"inherit",borderBottom:"1px solid\n ".concat("light"===e.palette.type?(0,n.lighten)((0,n.fade)(e.palette.divider,1),.88):(0,n.darken)((0,n.fade)(e.palette.divider,1),.68)),textAlign:"left",padding:"14px 40px 14px 16px","&:last-child":{paddingRight:16}}),head:{color:e.palette.text.secondary,fontSize:e.typography.pxToRem(12),lineHeight:e.typography.pxToRem(21),fontWeight:e.typography.fontWeightMedium},body:{color:e.palette.text.primary,fontWeight:e.typography.fontWeightRegular},footer:{color:e.palette.text.secondary,lineHeight:e.typography.pxToRem(21),fontSize:e.typography.pxToRem(12)},sizeSmall:{padding:"6px 24px 6px 16px","&:last-child":{paddingRight:16},"&$paddingCheckbox":{width:24,padding:"0px 12px 0 16px","&:last-child":{paddingLeft:12,paddingRight:16},"& > *":{padding:0}}},paddingCheckbox:{width:48,padding:"0 0 0 4px","&:last-child":{paddingLeft:0,paddingRight:4}},paddingNone:{padding:0,"&:last-child":{padding:0}},alignLeft:{textAlign:"left"},alignCenter:{textAlign:"center"},alignRight:{textAlign:"right",flexDirection:"row-reverse"},alignJustify:{textAlign:"justify"},stickyHeader:{position:"sticky",top:0,left:0,zIndex:1,backgroundColor:e.palette.background.default}}};exports.styles=g;var c=a.default.forwardRef(function(i,d){var n,s=i.align,g=void 0===s?"inherit":s,c=i.classes,u=i.className,f=i.component,h=i.padding,x=i.scope,y=i.size,m=i.sortDirection,b=i.variant,v=(0,e.default)(i,["align","classes","className","component","padding","scope","size","sortDirection","variant"]),z=a.default.useContext(o.default),R=a.default.useContext(p.default);n=f||(R&&"head"===R.variant?"th":"td");var q=x;!q&&R&&"head"===R.variant&&(q="col");var k=h||(z&&z.padding?z.padding:"default"),C=y||(z&&z.size?z.size:"medium"),T=b||R&&R.variant,A=null;return m&&(A="asc"===m?"ascending":"descending"),a.default.createElement(n,(0,t.default)({ref:d,className:(0,r.default)(c.root,u,"inherit"!==g&&c["align".concat((0,l.capitalize)(g))],"default"!==k&&c["padding".concat((0,l.capitalize)(k))],"medium"!==C&&c["size".concat((0,l.capitalize)(C))],{head:[c.head,z&&z.stickyHeader&&c.stickyHeader],body:c.body,footer:c.footer}[T]),"aria-sort":A,scope:q},v))}),u=(0,d.default)(g,{name:"MuiTableCell"})(c);exports.default=u;
-},{"@babel/runtime/helpers/esm/objectWithoutProperties":"kDQp","@babel/runtime/helpers/esm/extends":"NLFh","react":"1n8/","prop-types":"1NUe","clsx":"WLGK","../styles/withStyles":"awmK","../utils/helpers":"OP6V","../styles/colorManipulator":"7agu","../Table/TableContext":"91CL","../Table/Tablelvl2Context":"91CL"}],"lprt":[function(require,module,exports) {
-"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),Object.defineProperty(exports,"default",{enumerable:!0,get:function(){return e.default}});var e=t(require("./TableCell"));function t(e){return e&&e.__esModule?e:{default:e}}
-},{"./TableCell":"Im4G"}],"wXEN":[function(require,module,exports) {
-"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=exports.styles=void 0;var e=u(require("@babel/runtime/helpers/esm/extends")),t=u(require("@babel/runtime/helpers/esm/objectWithoutProperties")),r=u(require("react")),o=u(require("prop-types")),l=u(require("clsx")),a=u(require("../styles/withStyles")),s=u(require("../Table/Tablelvl2Context"));function u(e){return e&&e.__esModule?e:{default:e}}var d=function(e){return{root:{color:"inherit",display:"table-row",verticalAlign:"middle",outline:0,"&$selected":{backgroundColor:"light"===e.palette.type?"rgba(0, 0, 0, 0.04)":"rgba(255, 255, 255, 0.08)"},"&$hover:hover":{backgroundColor:"light"===e.palette.type?"rgba(0, 0, 0, 0.07)":"rgba(255, 255, 255, 0.14)"}},selected:{},hover:{},head:{},footer:{}}};exports.styles=d;var i=r.default.forwardRef(function(o,a){var u=o.classes,d=o.className,i=o.component,n=void 0===i?"tr":i,c=o.hover,f=void 0!==c&&c,p=o.selected,v=void 0!==p&&p,b=(0,t.default)(o,["classes","className","component","hover","selected"]),h=r.default.useContext(s.default);return r.default.createElement(n,(0,e.default)({ref:a,className:(0,l.default)(u.root,d,h&&{head:u.head,footer:u.footer}[h.variant],f&&u.hover,v&&u.selected)},b))}),n=(0,a.default)(d,{name:"MuiTableRow"})(i);exports.default=n;
-},{"@babel/runtime/helpers/esm/extends":"NLFh","@babel/runtime/helpers/esm/objectWithoutProperties":"kDQp","react":"1n8/","prop-types":"1NUe","clsx":"WLGK","../styles/withStyles":"awmK","../Table/Tablelvl2Context":"91CL"}],"kIQr":[function(require,module,exports) {
-"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),Object.defineProperty(exports,"default",{enumerable:!0,get:function(){return e.default}});var e=t(require("./TableRow"));function t(e){return e&&e.__esModule?e:{default:e}}
-},{"./TableRow":"wXEN"}],"pk/C":[function(require,module,exports) {
-"use strict";Object.defineProperty(exports,"__esModule",{value:!0});
-},{}],"ou/W":[function(require,module,exports) {
-"use strict";var e=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var r=e(require("react")),t=e(require("./utils/createSvgIcon")),l=(0,t.default)(r.default.createElement("path",{d:"M19 3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.11 0 2-.9 2-2V5c0-1.1-.89-2-2-2zm-9 14l-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z"}),"CheckBox");exports.default=l;
-},{"@babel/runtime/helpers/interopRequireDefault":"u5tj","react":"1n8/","./utils/createSvgIcon":"Atth"}],"lqdk":[function(require,module,exports) {
-"use strict";var e=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var r=e(require("react")),t=e(require("./utils/createSvgIcon")),u=(0,t.default)(r.default.createElement("path",{d:"M19 5v14H5V5h14m0-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2z"}),"CheckBoxOutlineBlank");exports.default=u;
-},{"@babel/runtime/helpers/interopRequireDefault":"u5tj","react":"1n8/","./utils/createSvgIcon":"Atth"}],"WNaj":[function(require,module,exports) {
+},{}],"3Pef":[function(require,module,exports) {
+"use strict";var t,e,o,n;Object.defineProperty(exports,"__esModule",{value:!0}),function(t){t.STRING="string",t.NUMERIC="numeric",t.BOOLEAN="boolean",t.DATE="date",t.DATE_TIME="datetime",t.DATE_TIME_UTC="datetimeutc"}(t=exports.ColumnDataType||(exports.ColumnDataType={})),function(t){t.NONE="None",t.ASCENDING="Ascending",t.DESCENDING="Descending"}(e=exports.ColumnSortDirection||(exports.ColumnSortDirection={})),function(t){t.NONE="None",t.AUTO="Auto",t.EQUALS="Equals",t.NOT_EQUALS="NotEquals",t.CONTAINS="Contains",t.STARTS_WITH="StartsWith",t.ENDS_WITH="EndsWith",t.GTE="Gte",t.GT="Gt",t.LTE="Lte",t.LT="Lt",t.MULTIPLE="Multiple",t.BETWEEN="Between",t.NOT_CONTAINS="NotContains",t.NOT_STARTS_WITH="NotStartsWith",t.NOT_ENDS_WITH="NotEndsWith"}(o=exports.CompareOperators||(exports.CompareOperators={})),function(t){t.NONE="None",t.SUM="Sum",t.AVERAGE="Average",t.COUNT="Count",t.DISTINCT_COUNT="DistinctCount",t.MAX="Max",t.MIN="Min"}(n=exports.AggregateFunctions||(exports.AggregateFunctions={}));
+},{}],"BwQH":[function(require,module,exports) {
+"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("./Column");function t(e){return{Argument:[],HasFilter:!1,Name:e,Operator:"None",Text:null}}var r=[{Value:e.CompareOperators.NONE,Title:"None"},{Value:e.CompareOperators.EQUALS,Title:"Equals"},{Value:e.CompareOperators.BETWEEN,Title:"Between"},{Value:e.CompareOperators.GTE,Title:">="},{Value:e.CompareOperators.GT,Title:">"},{Value:e.CompareOperators.LTE,Title:"<="},{Value:e.CompareOperators.LT,Title:"<"}],o=[{Value:e.CompareOperators.NONE,Title:"None"},{Value:e.CompareOperators.EQUALS,Title:"Equals"},{Value:e.CompareOperators.NOT_EQUALS,Title:"Not Equals"},{Value:e.CompareOperators.CONTAINS,Title:"Contains"},{Value:e.CompareOperators.NOT_CONTAINS,Title:"Not Contains"},{Value:e.CompareOperators.STARTS_WITH,Title:"Starts With"},{Value:e.CompareOperators.NOT_STARTS_WITH,Title:"Not Starts With"},{Value:e.CompareOperators.ENDS_WITH,Title:"Ends With"},{Value:e.CompareOperators.NOT_ENDS_WITH,Title:"Not Ends With"}],a=[{Value:e.CompareOperators.NONE,Title:"None"},{Value:e.CompareOperators.EQUALS,Title:"Equals"},{Value:e.CompareOperators.NOT_EQUALS,Title:"Not Equals"}],i=function(){function i(r,o){this.hasFilter=this.Filter&&(this.Filter.Text||this.Filter.Argument)&&this.Filter.Operator!==e.CompareOperators.NONE,this.Aggregate=o&&o.Aggregate||e.AggregateFunctions.NONE,this.DataType=o&&o.DataType||e.ColumnDataType.STRING,this.IsKey=o&&o.IsKey||!1,this.Label=o&&o.Label||(r||"").replace(/([a-z])([A-Z])/g,"$1 $2"),this.Name=r,this.Searchable=o&&o.Searchable||!1,this.SortDirection=o&&o.Sortable&&o.SortDirection||e.ColumnSortDirection.NONE,this.SortOrder=o&&this.SortDirection!==e.ColumnSortDirection.NONE&&o.SortOrder||-1,this.Sortable=o&&o.Sortable||!1,this.Visible=!o||"boolean"!=typeof o.Visible||o.Visible,this.Filter=o&&o.Filterable?t(r):{},this.Filterable=o&&o.Filterable||!1,this.Filter.HasFilter=this.hasFilter}return i.sortColumnArray=function(t,r,o){var a=r.find(function(e){return e.Name===t});if(a)return a.SortDirection=a.SortDirection===e.ColumnSortDirection.NONE?e.ColumnSortDirection.ASCENDING:a.SortDirection===e.ColumnSortDirection.ASCENDING?e.ColumnSortDirection.DESCENDING:e.ColumnSortDirection.NONE,a.SortOrder=a.SortDirection===e.ColumnSortDirection.NONE?-1:Number.MAX_VALUE,o||r.filter(function(e){return e.Name!==t}).forEach(function(t){t.SortOrder=-1,t.SortDirection=e.ColumnSortDirection.NONE}),r.filter(function(e){return e.SortOrder>0}).sort(function(e,t){return e.SortOrder===t.SortOrder?0:e.SortOrder>t.SortOrder?1:-1}).forEach(function(e,t){e.SortOrder=t+1}),r},i.clearFilterPatch=function(){return{Argument:[""],HasFilter:!1,Operator:e.CompareOperators.NONE,Text:""}},i.prototype.getOperators=function(){switch(this.DataType){case e.ColumnDataType.STRING:return o;case e.ColumnDataType.NUMERIC:case e.ColumnDataType.DATE:case e.ColumnDataType.DATE_TIME:case e.ColumnDataType.DATE_TIME_UTC:return r;case e.ColumnDataType.BOOLEAN:return a;default:return[]}},i.prototype.createFilterPatch=function(){var t=this.Filter.Text,r=this.Filter.Argument[0];return this.DataType===e.ColumnDataType.NUMERIC?(t=parseFloat(t),r=parseFloat(r)):this.DataType===e.ColumnDataType.BOOLEAN&&(t="true"===t,r=""),{Argument:[r],HasFilter:!0,Operator:this.Filter.Operator||e.CompareOperators.AUTO,Text:t}},i}();exports.default=i;
+},{"./Column":"3Pef"}],"SI9w":[function(require,module,exports) {
+"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("./Column");exports.AggregateFunctions=e.AggregateFunctions,exports.ColumnDataType=e.ColumnDataType,exports.ColumnSortDirection=e.ColumnSortDirection,exports.CompareOperators=e.CompareOperators;var o=require("./ColumnModel");exports.ColumnModel=o.default;
+},{"./Column":"3Pef","./ColumnModel":"BwQH"}],"fsIe":[function(require,module,exports) {
+"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=(new Date).getTimezoneOffset(),t=function(){function t(o,i,r,s){void 0===s&&(s=""),this.Columns=o,this.Search={Operator:"Auto",Text:s},this.Skip=-1===i?0:r*i,this.Take=i,this.Counter=t.counter++,this.TimezoneOffset=e}return t.counter=0,t}();exports.default=t;
+},{}],"/G0P":[function(require,module,exports) {
+"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=function(){return function(e){void 0===e&&(e=0),this.CurrentPage=0,this.TotalPages=1,this.Counter=isNaN(e)?0:e}}();exports.default=e;
+},{}],"WNaj":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=t;var e=r(require("../toDate/index.js"));function r(e){return e&&e.__esModule?e:{default:e}}function t(r){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");var t=(0,e.default)(r);return!isNaN(t)}
},{"../toDate/index.js":"KYJg"}],"2ACz":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=e;var o={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}};function e(e,t,n){var s;return n=n||{},s="string"==typeof o[e]?o[e]:1===t?o[e].one:o[e].other.replace("{{count}}",t),n.addSuffix?n.comparison>0?"in "+s:s+" ago":s}
@@ -822,31 +800,59 @@ var e=arguments[3];Object.defineProperty(exports,"__esModule",{value:!0}),export
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=p;var e=u(require("../isValid/index.js")),r=u(require("../locale/en-US/index.js")),t=u(require("../subMilliseconds/index.js")),n=u(require("../toDate/index.js")),a=u(require("../_lib/format/formatters/index.js")),i=u(require("../_lib/format/longFormatters/index.js")),o=u(require("../_lib/getTimezoneOffsetInMilliseconds/index.js")),l=require("../_lib/protectedTokens/index.js"),s=u(require("../_lib/toInteger/index.js"));function u(e){return e&&e.__esModule?e:{default:e}}var f=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,d=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,c=/^'(.*?)'?$/,w=/''/g,m=/[a-zA-Z]/;function p(u,c,w){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var p=String(c),h=w||{},k=h.locale||r.default,v=k.options&&k.options.firstWeekContainsDate,b=null==v?1:(0,s.default)(v),j=null==h.firstWeekContainsDate?b:(0,s.default)(h.firstWeekContainsDate);if(!(j>=1&&j<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var q=k.options&&k.options.weekStartsOn,x=null==q?0:(0,s.default)(q),y=null==h.weekStartsOn?x:(0,s.default)(h.weekStartsOn);if(!(y>=0&&y<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");if(!k.localize)throw new RangeError("locale must contain localize property");if(!k.formatLong)throw new RangeError("locale must contain formatLong property");var D=(0,n.default)(u);if(!(0,e.default)(D))throw new RangeError("Invalid time value");var _=(0,o.default)(D),E=(0,t.default)(D,_),O={firstWeekContainsDate:j,weekStartsOn:y,locale:k,_originalDate:D};return p.match(d).map(function(e){var r=e[0];return"p"===r||"P"===r?(0,i.default[r])(e,k.formatLong,O):e}).join("").match(f).map(function(e){if("''"===e)return"'";var r=e[0];if("'"===r)return g(e);var t=a.default[r];if(t)return!h.useAdditionalWeekYearTokens&&(0,l.isProtectedWeekYearToken)(e)&&(0,l.throwProtectedError)(e),!h.useAdditionalDayOfYearTokens&&(0,l.isProtectedDayOfYearToken)(e)&&(0,l.throwProtectedError)(e),t(E,e,k.localize,O);if(r.match(m))throw new RangeError("Format string contains an unescaped latin alphabet character `"+r+"`");return e}).join("")}function g(e){return e.match(c)[1].replace(w,"'")}
},{"../isValid/index.js":"WNaj","../locale/en-US/index.js":"lcWw","../subMilliseconds/index.js":"A4qf","../toDate/index.js":"KYJg","../_lib/format/formatters/index.js":"0S8V","../_lib/format/longFormatters/index.js":"W9kG","../_lib/getTimezoneOffsetInMilliseconds/index.js":"aFbL","../_lib/protectedTokens/index.js":"VJX+","../_lib/toInteger/index.js":"VYL5"}],"y4KC":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=r;var e=t(require("../toDate/index.js"));function t(e){return e&&e.__esModule?e:{default:e}}function r(t){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");return(0,e.default)(t).getFullYear()}
-},{"../toDate/index.js":"KYJg"}],"3Pef":[function(require,module,exports) {
-"use strict";var t,e,o,n;Object.defineProperty(exports,"__esModule",{value:!0}),function(t){t.STRING="string",t.NUMERIC="numeric",t.BOOLEAN="boolean",t.DATE="date",t.DATE_TIME="datetime",t.DATE_TIME_UTC="datetimeutc"}(t=exports.ColumnDataType||(exports.ColumnDataType={})),function(t){t.NONE="None",t.ASCENDING="Ascending",t.DESCENDING="Descending"}(e=exports.ColumnSortDirection||(exports.ColumnSortDirection={})),function(t){t.NONE="None",t.AUTO="Auto",t.EQUALS="Equals",t.NOT_EQUALS="NotEquals",t.CONTAINS="Contains",t.STARTS_WITH="StartsWith",t.ENDS_WITH="EndsWith",t.GTE="Gte",t.GT="Gt",t.LTE="Lte",t.LT="Lt",t.MULTIPLE="Multiple",t.BETWEEN="Between",t.NOT_CONTAINS="NotContains",t.NOT_STARTS_WITH="NotStartsWith",t.NOT_ENDS_WITH="NotEndsWith"}(o=exports.CompareOperators||(exports.CompareOperators={})),function(t){t.NONE="None",t.SUM="Sum",t.AVERAGE="Average",t.COUNT="Count",t.DISTINCT_COUNT="DistinctCount",t.MAX="Max",t.MIN="Min"}(n=exports.AggregateFunctions||(exports.AggregateFunctions={}));
-},{}],"BwQH":[function(require,module,exports) {
-"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("./Column");function r(e){return{Argument:[],HasFilter:!1,Name:e,Operator:"None",Text:null}}var t=[{Value:e.CompareOperators.NONE,Title:"None"},{Value:e.CompareOperators.EQUALS,Title:"Equals"},{Value:e.CompareOperators.BETWEEN,Title:"Between"},{Value:e.CompareOperators.GTE,Title:">="},{Value:e.CompareOperators.GT,Title:">"},{Value:e.CompareOperators.LTE,Title:"<="},{Value:e.CompareOperators.LT,Title:"<"}],o=[{Value:e.CompareOperators.NONE,Title:"None"},{Value:e.CompareOperators.EQUALS,Title:"Equals"},{Value:e.CompareOperators.NOT_EQUALS,Title:"Not Equals"},{Value:e.CompareOperators.CONTAINS,Title:"Contains"},{Value:e.CompareOperators.NOT_CONTAINS,Title:"Not Contains"},{Value:e.CompareOperators.STARTS_WITH,Title:"Starts With"},{Value:e.CompareOperators.NOT_STARTS_WITH,Title:"Not Starts With"},{Value:e.CompareOperators.ENDS_WITH,Title:"Ends With"},{Value:e.CompareOperators.NOT_ENDS_WITH,Title:"Not Ends With"}],a=[{Value:e.CompareOperators.NONE,Title:"None"},{Value:e.CompareOperators.EQUALS,Title:"Equals"},{Value:e.CompareOperators.NOT_EQUALS,Title:"Not Equals"}],i=function(){function i(t,o){this.hasFilter=this.Filter&&(this.Filter.Text||this.Filter.Argument)&&this.Filter.Operator!==e.CompareOperators.NONE,this.Aggregate=o&&o.Aggregate||e.AggregateFunctions.NONE,this.DataType=o&&o.DataType||e.ColumnDataType.STRING,this.IsKey=o&&o.IsKey||!1,this.Label=o&&o.Label||(t||"").replace(/([a-z])([A-Z])/g,"$1 $2"),this.Name=t,this.Searchable=o&&o.Searchable||!1,this.SortDirection=o&&o.Sortable&&o.SortDirection||e.ColumnSortDirection.NONE,this.SortOrder=o&&this.SortDirection!==e.ColumnSortDirection.NONE&&o.SortOrder||-1,this.Sortable=o&&o.Sortable||!1,this.Visible=!o||"boolean"!=typeof o.Visible||o.Visible,this.Filter=o&&o.Filterable?r(t):{},this.Filterable=o&&o.Filterable||!1,this.Filter.HasFilter=this.hasFilter}return i.sortColumnArray=function(r,t,o){var a=t.find(function(e){return e.Name===r});if(a)return a.SortDirection=a.SortDirection===e.ColumnSortDirection.NONE?e.ColumnSortDirection.ASCENDING:a.SortDirection===e.ColumnSortDirection.ASCENDING?e.ColumnSortDirection.DESCENDING:e.ColumnSortDirection.NONE,a.SortOrder=a.SortDirection===e.ColumnSortDirection.NONE?-1:Number.MAX_VALUE,o||t.filter(function(e){return e.Name!==r}).forEach(function(r){r.SortOrder=-1,r.SortDirection=e.ColumnSortDirection.NONE}),t.filter(function(e){return e.SortOrder>0}).sort(function(e,r){return e.SortOrder===r.SortOrder?0:e.SortOrder>r.SortOrder?1:-1}).forEach(function(e,r){e.SortOrder=r+1}),t},i.getOperators=function(r){switch(r.DataType){case e.ColumnDataType.STRING:return o;case e.ColumnDataType.NUMERIC:case e.ColumnDataType.DATE:case e.ColumnDataType.DATE_TIME:case e.ColumnDataType.DATE_TIME_UTC:return t;case e.ColumnDataType.BOOLEAN:return a;default:return[]}},i}();exports.default=i;
-},{"./Column":"3Pef"}],"SI9w":[function(require,module,exports) {
-"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("./Column");exports.AggregateFunctions=e.AggregateFunctions,exports.ColumnDataType=e.ColumnDataType,exports.ColumnSortDirection=e.ColumnSortDirection,exports.CompareOperators=e.CompareOperators;var o=require("./ColumnModel");exports.ColumnModel=o.default;
-},{"./Column":"3Pef","./ColumnModel":"BwQH"}],"fsIe":[function(require,module,exports) {
-"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=(new Date).getTimezoneOffset(),t=function(){function t(o,i,r,s){void 0===s&&(s=""),this.Columns=o,this.Search={Operator:"Auto",Text:s},this.Skip=-1===i?0:r*i,this.Take=i,this.Counter=t.counter++,this.TimezoneOffset=e}return t.counter=0,t}();exports.default=t;
-},{}],"/G0P":[function(require,module,exports) {
-"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=function(){return function(e){void 0===e&&(e=0),this.CurrentPage=0,this.TotalPages=1,this.Counter=isNaN(e)?0:e}}();exports.default=e;
-},{}],"mPFt":[function(require,module,exports) {
-"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=36e5,t=6e4,r={dateTimeDelimeter:/[T ]/,plainTime:/:/,timeZoneDelimeter:/[Z ]/i,YY:/^(\d{2})$/,YYY:[/^([+-]\d{2})$/,/^([+-]\d{3})$/,/^([+-]\d{4})$/],YYYY:/^(\d{4})/,YYYYY:[/^([+-]\d{4})/,/^([+-]\d{5})/,/^([+-]\d{6})/],MM:/^-(\d{2})$/,DDD:/^-?(\d{3})$/,MMDD:/^-?(\d{2})-?(\d{2})$/,Www:/^-?W(\d{2})$/,WwwD:/^-?W(\d{2})-?(\d{1})$/,HH:/^(\d{2}([.,]\d*)?)$/,HHMM:/^(\d{2}):?(\d{2}([.,]\d*)?)$/,HHMMSS:/^(\d{2}):?(\d{2}):?(\d{2}([.,]\d*)?)$/,timezone:/([Z+-].*)$/,timezoneZ:/^(Z)$/,timezoneHH:/^([+-])(\d{2})$/,timezoneHHMM:/^([+-])(\d{2}):?(\d{2})$/};function n(e){if(null===e)return new Date(NaN);if(e instanceof Date||"object"==typeof e&&"[object Date]"===Object.prototype.toString.call(e))return new Date(e.getTime());if("number"==typeof e||"[object Number]"===Object.prototype.toString.call(e))return new Date(e);if("string"!=typeof e&&"[object String]"!==Object.prototype.toString.call(e))return new Date(NaN);var t=i(e),r=u(t.date,2),n=r.year,c=l(r.restDateString,n);if(c){var s=c.getTime(),D=0,d=void 0;if(t.time&&(D=o(t.time),isNaN(D)))return new Date(NaN);if(t.timezone){if(d=f(t.timezone),isNaN(d))return new Date(NaN)}else d=a(new Date(s+D)),d=a(new Date(s+D+d));return new Date(s+D+d)}return new Date(NaN)}function a(e){var r=new Date(e.getTime()),n=r.getTimezoneOffset();r.setSeconds(0,0);var a=r.getTime()%t;return n*t+a}function i(e){var t,n={},a=e.split(r.dateTimeDelimeter);if(r.plainTime.test(a[0])?(n.date=null,t=a[0]):(n.date=a[0],t=a[1],r.timeZoneDelimeter.test(n.date)&&(n.date=e.split(r.timeZoneDelimeter)[0],t=e.substr(n.date.length,e.length))),t){var i=r.timezone.exec(t);i?(n.time=t.replace(i[1],""),n.timezone=i[1]):n.time=t}return n}function u(e,t){var n,a=r.YYY[t],i=r.YYYYY[t];if(n=r.YYYY.exec(e)||i.exec(e)){var u=n[1];return{restDateString:e.slice(u.length),year:parseInt(u,10)}}if(n=r.YY.exec(e)||a.exec(e)){var l=n[1];return{restDateString:e.slice(l.length),year:100*parseInt(l,10)}}return{year:null}}function l(e,t){if(null===t)return null;var n,a,i,u;if(0===e.length)return(a=new Date(0)).setUTCFullYear(t),a;if(n=r.MM.exec(e))return a=new Date(0),p(t,i=parseInt(n[1],10)-1)?(a.setUTCFullYear(t,i),a):new Date(NaN);if(n=r.DDD.exec(e)){a=new Date(0);var l=parseInt(n[1],10);return m(t,l)?(a.setUTCFullYear(t,0,l),a):new Date(NaN)}if(n=r.MMDD.exec(e)){a=new Date(0),i=parseInt(n[1],10)-1;var o=parseInt(n[2],10);return p(t,i,o)?(a.setUTCFullYear(t,i,o),a):new Date(NaN)}if(n=r.Www.exec(e))return N(u=parseInt(n[1],10)-1)?c(t,u):new Date(NaN);if(n=r.WwwD.exec(e)){u=parseInt(n[1],10)-1;var f=parseInt(n[2],10)-1;return N(u,f)?c(t,u,f):new Date(NaN)}return null}function o(n){var a,i,u;if(a=r.HH.exec(n))return Y(i=parseFloat(a[1].replace(",",".")))?i%24*e:NaN;if(a=r.HHMM.exec(n))return Y(i=parseInt(a[1],10),u=parseFloat(a[2].replace(",",".")))?i%24*e+u*t:NaN;if(a=r.HHMMSS.exec(n)){i=parseInt(a[1],10),u=parseInt(a[2],10);var l=parseFloat(a[3].replace(",","."));return Y(i,u,l)?i%24*e+u*t+1e3*l:NaN}return null}function f(n){var a,i,u;if(a=r.timezoneZ.exec(n))return 0;if(a=r.timezoneHH.exec(n))return i=(u=parseInt(a[2],10))*e,"+"===a[1]?-i:i;if(a=r.timezoneHHMM.exec(n)){u=parseInt(a[2],10);var l=parseInt(a[3],10);return w(l)?(i=u*e+l*t,"+"===a[1]?-i:i):NaN}return 0}function c(e,t,r){t=t||0,r=r||0;var n=new Date(0);n.setUTCFullYear(e,0,4);var a=7*t+r+1-(n.getUTCDay()||7);return n.setUTCDate(n.getUTCDate()+a),n}exports.default=n;var s=[31,28,31,30,31,30,31,31,30,31,30,31],D=[31,29,31,30,31,30,31,31,30,31,30,31];function d(e){return e%400==0||e%4==0&&e%100!=0}function p(e,t,r){if(t<0||t>11)return!1;if(null!=r){if(r<1)return!1;var n=d(e);if(n&&r>D[t])return!1;if(!n&&r>s[t])return!1}return!0}function m(e,t){if(t<1)return!1;var r=d(e);return!(r&&t>366)&&!(!r&&t>365)}function N(e,t){return!(e<0||e>52)&&(null==t||!(t<0||t>6))}function Y(e,t,r){return(null==e||!(e<0||e>=25))&&((null==t||!(t<0||t>=60))&&(null==r||!(r<0||r>=60)))}function w(e){return!(e<0||e>59)}
-},{}],"iBp1":[function(require,module,exports) {
-"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("./date-utils"),r=require("./Models"),t=require("./Models/GridResponse"),a=function(r,t){return e.default(r).getTime()===e.default(t).getTime()},n=function(r,t){return e.default(r).getTime()>e.default(t).getTime()},o=function(r,t){return e.default(r).getTime()-1&&(n.TotalPages=Math.ceil(n.FilteredRecordCount/e.Take),n.TotalPages>0&&(n.CurrentPage=e.Skip/e.Take+1)),n.AggregationPayload=this.getAggregatePayload(e,o),n.Payload=o.slice(e.Skip,e.Skip+e.Take).map(function(r){return a.parsePayload(r,e.Columns)}),n},e.applyFreeTextSearch=function(e,t){if(e.Search&&e.Search.Operator.toLowerCase()===r.CompareOperators.AUTO.toLowerCase()){var a=e.Columns.filter(function(e){return e.Searchable});if(a.length>0){var n=e.Search.Text.toLowerCase();return""===n?t:t.filter(function(e){return a.some(function(r){return void 0!==e[r.Name]&&e[r.Name].toLowerCase().indexOf(n)>-1})})}return t}},e.applyFiltering=function(e,t){return e.Columns.filter(function(e){return e.hasFilter}).forEach(function(e){var i="datetime"===e.DataType||"date"===e.DataType||"datetimeutc"===e.DataType,u=function(r,t){return r.filter(function(r){return void 0!==r[e.Name]&&null!==r[e.Name]&&t(r[e.Name])})};switch(e.Filter.Operator){case r.CompareOperators.EQUALS:t=i?t.filter(function(r){return a(r[e.Name],e.Filter.Text)}):"string"===e.DataType?u(t,function(r){return r.toLowerCase()===e.Filter.Text.toLowerCase()}):t.filter(function(r){return r[e.Name]===e.Filter.Text});break;case r.CompareOperators.NOT_EQUALS:t="string"===e.DataType?u(t,function(r){return r.toLowerCase()!==e.Filter.Text.toLowerCase()}):t.filter(function(r){return r[e.Name]!==e.Filter.Text});break;case r.CompareOperators.CONTAINS:t=u(t,function(r){return r.toLowerCase().indexOf(e.Filter.Text.toLowerCase())>=0}),t=u(t,function(r){return r.toLowerCase().indexOf(e.Filter.Text.toLowerCase())>=0});break;case r.CompareOperators.NOT_CONTAINS:t=u(t,function(r){return r.toLowerCase().indexOf(e.Filter.Text.toLowerCase())<0});break;case r.CompareOperators.STARTS_WITH:t=u(t,function(r){return r.toLowerCase().startsWith(e.Filter.Text.toLowerCase())});break;case r.CompareOperators.NOT_STARTS_WITH:t=u(t,function(r){return!r.toLowerCase().startsWith(e.Filter.Text.toLowerCase())});break;case r.CompareOperators.ENDS_WITH:t=u(t,function(r){return r.toLowerCase().endsWith(e.Filter.Text.toLowerCase())});case r.CompareOperators.NOT_ENDS_WITH:t=u(t,function(r){return!r.toLowerCase().endsWith(e.Filter.Text.toLowerCase())});break;case r.CompareOperators.GT:t=i?t.filter(function(r){return n(r[e.Name],e.Filter.Text)}):t.filter(function(r){return r[e.Name]>e.Filter.Text});break;case r.CompareOperators.GTE:t=i?t.filter(function(r){return a(r[e.Name],e.Filter.Text)||n(r[e.Name],e.Filter.Text)}):t.filter(function(r){return r[e.Name]>=e.Filter.Text});break;case r.CompareOperators.LT:t=i?t.filter(function(r){return o(r[e.Name],e.Filter.Text)}):t.filter(function(r){return r[e.Name]=e.Filter.Text&&r[e.Name]<=e.Filter.Argument[0]});break;default:throw new Error("Unsupported Compare Operator")}}),t},e.applySorting=function(e,t){var a=e.Columns.filter(function(e){return e.SortOrder>0}),n=[{Name:e.Columns[0].Name,Asc:!0}];return a.length>0&&(a.sort(function(e,r){return e.SortOrder>r.SortOrder?1:r.SortOrder>e.SortOrder?-1:0}),n=a.map(function(e){return{Name:e.Name,Asc:e.SortDirection===r.ColumnSortDirection.ASCENDING}})),t.sort(function(e,r){for(var t=0,a=0,o=n;ar[i.Name]){t=1*u;break}}return t}),t},e.getAggregatePayload=function(e,t){return e.Columns.filter(function(e){return e.Aggregate&&e.Aggregate.toLowerCase()!==r.AggregateFunctions.NONE.toLowerCase()}).reduce(function(e,a){switch(a.Aggregate.toLowerCase()){case r.AggregateFunctions.SUM.toLowerCase():e[a.Name]=0===t.length?0:t.reduce(function(e,r){return void 0===r[a.Name]?e:e+r[a.Name]},0);break;case r.AggregateFunctions.AVERAGE.toLowerCase():e[a.Name]=0===t.length?0:t.reduce(function(e,r){return void 0===r[a.Name]?e:e+r[a.Name]},0)/t.length;break;case r.AggregateFunctions.MAX.toLowerCase():e[a.Name]=0===t.length?0:t.reduce(function(e,r){return r[a.Name]>e?r[a.Name]:e},t[0][a.Name]);break;case r.AggregateFunctions.MIN.toLowerCase():e[a.Name]=0===t.length?0:t.reduce(function(e,r){return r[a.Name]0?l.default(t,r):""},exports.renderCellContent=function(e,r){switch(e.DataType){case s.ColumnDataType.NUMERIC:return r[e.Name]||0;case s.ColumnDataType.DATE:return exports.renderDateTimeCell(r[e.Name]);case s.ColumnDataType.DATE_TIME:case s.ColumnDataType.DATE_TIME_UTC:return exports.renderDateTimeCell(r[e.Name],"M/d/yyyy h:mm a");case s.ColumnDataType.BOOLEAN:return!0===r[e.Name]?o.createElement(a.default,null):o.createElement(n.default,null);default:return r[e.Name]}},exports.renderCellAlign=function(e){switch(e.DataType){case s.ColumnDataType.NUMERIC:return"right";case s.ColumnDataType.BOOLEAN:return"center";default:return"inherit"}},exports.renderCells=function(e,r){return e.filter(function(e){return e.Visible}).map(function(e){return o.createElement(t.default,{key:e.Name,padding:""===e.Label?"none":"default",align:exports.renderCellAlign(e)},exports.renderCellContent(e,r))})};
-},{"@material-ui/core/TableCell":"lprt","@material-ui/icons/CheckBox":"ou/W","@material-ui/icons/CheckBoxOutlineBlank":"lqdk","date-fns/format":"OZJZ","date-fns/getYear":"y4KC","date-fns/parseISO":"LCTl","react":"1n8/","tubular-common":"QwmZ"}],"UeD7":[function(require,module,exports) {
-"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=function(){function e(e,t){this.request=e,this.handler=t}return e.prototype.fetch=function(e){return this.handler(this.request,e)},e}();exports.default=e;
-},{}],"xhdv":[function(require,module,exports) {
-"use strict";var e=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))(function(o,a){function u(e){try{i(r.next(e))}catch(t){a(t)}}function s(e){try{i(r.throw(e))}catch(t){a(t)}}function i(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(u,s)}i((r=r.apply(e,t||[])).next())})},t=this&&this.__generator||function(e,t){var n,r,o,a,u={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return a={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function s(a){return function(s){return function(a){if(n)throw new TypeError("Generator is already executing.");for(;u;)try{if(n=1,r&&(o=2&a[0]?r.return:a[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,a[1])).done)return o;switch(r=0,o&&(a=[2&a[0],o.value]),a[0]){case 0:case 1:o=a;break;case 4:return u.label++,{value:a[1],done:!1};case 5:u.label++,r=a[1],a=[0];continue;case 7:a=u.ops.pop(),u.trys.pop();continue;default:if(!(o=(o=u.trys).length>0&&o[o.length-1])&&(6===a[0]||2===a[0])){u=0;continue}if(3===a[0]&&(!o||a[1]>o[0]&&a[1]=200&&e.status<300?[4,e.text()]:[3,3];case 2:return[2,(o=t.sent())?JSON.parse(o):{}];case 3:throw new Error("Invalid request")}})})},r}();exports.default=r;
-},{}],"ocGl":[function(require,module,exports) {
-"use strict";var e=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},r=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var r={};if(null!=e)for(var t in e)Object.hasOwnProperty.call(e,t)&&(r[t]=e[t]);return r.default=e,r};Object.defineProperty(exports,"__esModule",{value:!0});var t=e(require("./ITubularHttpClient"));exports.ITubularHttpClient=t.default;var l=require("./renders");exports.renderCellContent=l.renderCellContent,exports.renderCells=l.renderCells,exports.renderDateTimeCell=l.renderDateTimeCell;var n=r(require("./ShallowHttpClient"));exports.ShallowHttpClient=n.default,exports.FetchHandler=n.FetchHandler;var u=e(require("./TubularHttpClient"));exports.TubularHttpClient=u.default;
-},{"./ITubularHttpClient":"pk/C","./renders":"y1lj","./ShallowHttpClient":"UeD7","./TubularHttpClient":"xhdv"}],"kl1Q":[function(require,module,exports) {
+},{"../toDate/index.js":"KYJg"}],"8X+p":[function(require,module,exports) {
+"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("date-fns/format"),t=require("date-fns/getYear"),r=require("date-fns/parseISO"),n=require(".");exports.parsePayload=function(e,t){return t.reduce(function(t,r,n){return t[r.Name]=e[n]||e[r.Name],t},{})},exports.formatDate=function(n,a){if(void 0===a&&(a="M/d/yyyy"),!n)return"";var u=r.default(n);return t.default(u)>0?e.default(u,a):""},exports.getColumnAlign=function(e){switch(e.DataType){case n.ColumnDataType.NUMERIC:return"right";case n.ColumnDataType.BOOLEAN:return"center";default:return"inherit"}};var a=function(e,t){switch(e){case n.ColumnDataType.DATE:return exports.formatDate(t,"M/d/yyyy");case n.ColumnDataType.DATE_TIME:case n.ColumnDataType.DATE_TIME_UTC:return exports.formatDate(t,"M/d/yyyy h:mm a");case n.ColumnDataType.BOOLEAN:return!0===t?"Yes":"No";default:return(t||"").toString()}},u=function(e){return e instanceof Object?Object.keys(e).map(function(t){return e[t]}):e},o=function(e,t,r){return u(e).reduce(function(e,u,o){if(t[o].Visible){var i=a(r?n.ColumnDataType.STRING:t[o].DataType,u).replace(/"/g,'""');return i.search(/("|,|\n)/g)>=0&&(i='"'+i+'"'),(void 0!==e?e:"")+(o>0&&void 0!==e?",":"")+i}},"")+"\n"};exports.getCsv=function(e,t){return e.reduce(function(e,r){return e+o(r,t,!1)},o(t.map(function(e){return e.Label}),t,!0))},exports.getHtml=function(e,t){return''+t.filter(function(e){return e.Visible}).reduce(function(e,t){return e+""+(t.Label||t.Name)+" "},"")+" "+e.reduce(function(e,r){return e+""+u(r).reduce(function(e,r,n){return t[n].Visible?e+""+a(t[n].DataType,r)+" ":e},"")+" "},"")+"
"};
+},{"date-fns/format":"OZJZ","date-fns/getYear":"y4KC","date-fns/parseISO":"LCTl",".":"QwmZ"}],"iBp1":[function(require,module,exports) {
+"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("date-fns/parseISO"),r=require("./Models"),t=require("./Models/GridResponse"),a=require("./utils"),n=function(r,t){return e.default(r).getTime()===e.default(t).getTime()},o=function(r,t){return e.default(r).getTime()>e.default(t).getTime()},i=function(r,t){return e.default(r).getTime()-1&&(n.TotalPages=Math.ceil(n.FilteredRecordCount/e.Take),n.TotalPages>0&&(n.CurrentPage=e.Skip/e.Take+1)),n.AggregationPayload=this.getAggregatePayload(e,o),n.Payload=o.slice(e.Skip,e.Skip+e.Take).map(function(r){return a.parsePayload(r,e.Columns)}),n},e.applyFreeTextSearch=function(e,t){if(e.Search&&e.Search.Operator.toLowerCase()===r.CompareOperators.AUTO.toLowerCase()){var a=e.Columns.filter(function(e){return e.Searchable});if(a.length>0){var n=e.Search.Text.toLowerCase();return""===n?t:t.filter(function(e){return a.some(function(r){return void 0!==e[r.Name]&&e[r.Name].toLowerCase().indexOf(n)>-1})})}return t}},e.applyFiltering=function(e,t){return e.Columns.filter(function(e){return e.hasFilter}).forEach(function(e){var a="datetime"===e.DataType||"date"===e.DataType||"datetimeutc"===e.DataType,u=function(r,t){return r.filter(function(r){return void 0!==r[e.Name]&&null!==r[e.Name]&&t(r[e.Name])})};switch(e.Filter.Operator){case r.CompareOperators.EQUALS:t=a?t.filter(function(r){return n(r[e.Name],e.Filter.Text)}):"string"===e.DataType?u(t,function(r){return r.toLowerCase()===e.Filter.Text.toLowerCase()}):t.filter(function(r){return r[e.Name]===e.Filter.Text});break;case r.CompareOperators.NOT_EQUALS:t="string"===e.DataType?u(t,function(r){return r.toLowerCase()!==e.Filter.Text.toLowerCase()}):t.filter(function(r){return r[e.Name]!==e.Filter.Text});break;case r.CompareOperators.CONTAINS:t=u(t,function(r){return r.toLowerCase().indexOf(e.Filter.Text.toLowerCase())>=0}),t=u(t,function(r){return r.toLowerCase().indexOf(e.Filter.Text.toLowerCase())>=0});break;case r.CompareOperators.NOT_CONTAINS:t=u(t,function(r){return r.toLowerCase().indexOf(e.Filter.Text.toLowerCase())<0});break;case r.CompareOperators.STARTS_WITH:t=u(t,function(r){return r.toLowerCase().startsWith(e.Filter.Text.toLowerCase())});break;case r.CompareOperators.NOT_STARTS_WITH:t=u(t,function(r){return!r.toLowerCase().startsWith(e.Filter.Text.toLowerCase())});break;case r.CompareOperators.ENDS_WITH:t=u(t,function(r){return r.toLowerCase().endsWith(e.Filter.Text.toLowerCase())});case r.CompareOperators.NOT_ENDS_WITH:t=u(t,function(r){return!r.toLowerCase().endsWith(e.Filter.Text.toLowerCase())});break;case r.CompareOperators.GT:t=a?t.filter(function(r){return o(r[e.Name],e.Filter.Text)}):t.filter(function(r){return r[e.Name]>e.Filter.Text});break;case r.CompareOperators.GTE:t=a?t.filter(function(r){return n(r[e.Name],e.Filter.Text)||o(r[e.Name],e.Filter.Text)}):t.filter(function(r){return r[e.Name]>=e.Filter.Text});break;case r.CompareOperators.LT:t=a?t.filter(function(r){return i(r[e.Name],e.Filter.Text)}):t.filter(function(r){return r[e.Name]=e.Filter.Text&&r[e.Name]<=e.Filter.Argument[0]});break;default:throw new Error("Unsupported Compare Operator")}}),t},e.applySorting=function(e,t){var a=e.Columns.filter(function(e){return e.SortOrder>0}),n=[{Name:e.Columns[0].Name,Asc:!0}];return a.length>0&&(a.sort(function(e,r){return e.SortOrder>r.SortOrder?1:r.SortOrder>e.SortOrder?-1:0}),n=a.map(function(e){return{Name:e.Name,Asc:e.SortDirection===r.ColumnSortDirection.ASCENDING}})),t.sort(function(e,r){for(var t=0,a=0,o=n;ar[i.Name]){t=1*u;break}}return t}),t},e.getAggregatePayload=function(e,t){return e.Columns.filter(function(e){return e.Aggregate&&e.Aggregate.toLowerCase()!==r.AggregateFunctions.NONE.toLowerCase()}).reduce(function(e,a){switch(a.Aggregate.toLowerCase()){case r.AggregateFunctions.SUM.toLowerCase():e[a.Name]=0===t.length?0:t.reduce(function(e,r){return void 0===r[a.Name]?e:e+r[a.Name]},0);break;case r.AggregateFunctions.AVERAGE.toLowerCase():e[a.Name]=0===t.length?0:t.reduce(function(e,r){return void 0===r[a.Name]?e:e+r[a.Name]},0)/t.length;break;case r.AggregateFunctions.MAX.toLowerCase():e[a.Name]=0===t.length?0:t.reduce(function(e,r){return r[a.Name]>e?r[a.Name]:e},t[0][a.Name]);break;case r.AggregateFunctions.MIN.toLowerCase():e[a.Name]=0===t.length?0:t.reduce(function(e,r){return r[a.Name]0&&o[o.length-1])&&(6===u[0]||2===u[0])){a=0;continue}if(3===u[0]&&(!o||u[1]>o[0]&&u[1]=200&&e.status<300?[4,e.text()]:[3,3];case 2:return[2,(o=t.sent())?JSON.parse(o):{}];case 3:throw new Error("Invalid request")}})})},r}();exports.TubularHttpClient=r;
+},{}],"HK/n":[function(require,module,exports) {
+"use strict";function e(e){for(var r in e)exports.hasOwnProperty(r)||(exports[r]=e[r])}Object.defineProperty(exports,"__esModule",{value:!0}),e(require("./ShallowHttpClient")),e(require("./TubularHttpClient"));
+},{"./ShallowHttpClient":"ZPjJ","./TubularHttpClient":"QggU"}],"PEG0":[function(require,module,exports) {
+"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var t=function(){function t(){}return t.prototype.setTextSearch=function(t){},t.prototype.setPage=function(t){},t.prototype.setColumns=function(t){},t.prototype.getTextSearch=function(){return null},t.prototype.getPage=function(){return null},t.prototype.getColumns=function(){return null},t}();exports.NullStorage=t;
+},{}],"BDwM":[function(require,module,exports) {
+"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var t=function(){function t(t){if(this.name=t,!window||!window.localStorage)throw new Error("The localStorage is not present.")}return t.prototype.setGridName=function(t){this.name=t},t.prototype.setTextSearch=function(t){window.localStorage.setItem(this.name+"_textSearch",t)},t.prototype.setPage=function(t){window.localStorage.setItem(this.name+"_page",t.toString())},t.prototype.setColumns=function(t){window.localStorage.setItem(this.name+"_columns",JSON.stringify(t))},t.prototype.getTextSearch=function(){return window.localStorage.getItem(this.name+"_textSearch")},t.prototype.getPage=function(){return parseInt(window.localStorage.getItem(this.name+"_page"),10)},t.prototype.getColumns=function(){return JSON.parse(window.localStorage.getItem(this.name+"_columns"))},t}();exports.LocalStorage=t;
+},{}],"9ncT":[function(require,module,exports) {
+"use strict";function e(e){for(var r in e)exports.hasOwnProperty(r)||(exports[r]=e[r])}Object.defineProperty(exports,"__esModule",{value:!0}),e(require("./NullStorage")),e(require("./LocalStorage"));
+},{"./NullStorage":"PEG0","./LocalStorage":"BDwM"}],"QwmZ":[function(require,module,exports) {
+"use strict";function e(e){for(var r in e)exports.hasOwnProperty(r)||(exports[r]=e[r])}Object.defineProperty(exports,"__esModule",{value:!0});var r=require("./Models");exports.AggregateFunctions=r.AggregateFunctions,exports.ColumnDataType=r.ColumnDataType,exports.ColumnModel=r.ColumnModel,exports.ColumnSortDirection=r.ColumnSortDirection,exports.CompareOperators=r.CompareOperators;var o=require("./Models/GridRequest");exports.GridRequest=o.default;var t=require("./Models/GridResponse");exports.GridResponse=t.default;var s=require("./Transformer");e(require("./utils")),e(require("./Http")),e(require("./Storage")),exports.default=s.default;
+},{"./Models":"SI9w","./Models/GridRequest":"fsIe","./Models/GridResponse":"/G0P","./Transformer":"iBp1","./utils":"8X+p","./Http":"HK/n","./Storage":"9ncT"}],"91CL":[function(require,module,exports) {
+"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var e=t(require("react"));function t(e){return e&&e.__esModule?e:{default:e}}var r=e.default.createContext(),u=r;exports.default=u;
+},{"react":"1n8/"}],"zbjU":[function(require,module,exports) {
+"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=exports.styles=void 0;var e=i(require("@babel/runtime/helpers/esm/extends")),r=i(require("@babel/runtime/helpers/esm/objectWithoutProperties")),t=i(require("react")),a=i(require("prop-types")),s=i(require("clsx")),l=i(require("../styles/withStyles")),d=i(require("./TableContext"));function i(e){return e&&e.__esModule?e:{default:e}}var o={root:{display:"table",width:"100%",borderCollapse:"collapse",borderSpacing:0},stickyHeader:{borderCollapse:"separate"}};exports.styles=o;var u=t.default.forwardRef(function(a,l){var i=a.classes,o=a.className,u=a.component,n=void 0===u?"table":u,c=a.padding,p=void 0===c?"default":c,f=a.size,m=void 0===f?"medium":f,b=a.stickyHeader,v=void 0!==b&&b,y=(0,r.default)(a,["classes","className","component","padding","size","stickyHeader"]),x=t.default.useMemo(function(){return{padding:p,size:m,stickyHeader:v}},[p,m,v]);return t.default.createElement(d.default.Provider,{value:x},t.default.createElement(n,(0,e.default)({ref:l,className:(0,s.default)(i.root,o,v&&i.stickyHeader)},y)))}),n=(0,l.default)(o,{name:"MuiTable"})(u);exports.default=n;
+},{"@babel/runtime/helpers/esm/extends":"NLFh","@babel/runtime/helpers/esm/objectWithoutProperties":"kDQp","react":"1n8/","prop-types":"1NUe","clsx":"WLGK","../styles/withStyles":"awmK","./TableContext":"91CL"}],"Amxx":[function(require,module,exports) {
+"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),Object.defineProperty(exports,"default",{enumerable:!0,get:function(){return e.default}});var e=t(require("./Table"));function t(e){return e&&e.__esModule?e:{default:e}}
+},{"./Table":"zbjU"}],"b5B3":[function(require,module,exports) {
+"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=exports.styles=void 0;var e=u(require("@babel/runtime/helpers/esm/extends")),t=u(require("@babel/runtime/helpers/esm/objectWithoutProperties")),r=u(require("react")),a=u(require("prop-types")),l=u(require("clsx")),s=u(require("../styles/withStyles")),o=u(require("../Table/Tablelvl2Context"));function u(e){return e&&e.__esModule?e:{default:e}}var i={root:{display:"table-footer-group"}};exports.styles=i;var d={variant:"footer"},f=r.default.forwardRef(function(a,s){var u=a.classes,i=a.className,f=a.component,n=void 0===f?"tfoot":f,c=(0,t.default)(a,["classes","className","component"]);return r.default.createElement(o.default.Provider,{value:d},r.default.createElement(n,(0,e.default)({className:(0,l.default)(u.root,i),ref:s},c)))}),n=(0,s.default)(i,{name:"MuiTableFooter"})(f);exports.default=n;
+},{"@babel/runtime/helpers/esm/extends":"NLFh","@babel/runtime/helpers/esm/objectWithoutProperties":"kDQp","react":"1n8/","prop-types":"1NUe","clsx":"WLGK","../styles/withStyles":"awmK","../Table/Tablelvl2Context":"91CL"}],"ZLWC":[function(require,module,exports) {
+"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),Object.defineProperty(exports,"default",{enumerable:!0,get:function(){return e.default}});var e=t(require("./TableFooter"));function t(e){return e&&e.__esModule?e:{default:e}}
+},{"./TableFooter":"b5B3"}],"sGe6":[function(require,module,exports) {
+"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=exports.styles=void 0;var e=o(require("@babel/runtime/helpers/esm/extends")),t=o(require("@babel/runtime/helpers/esm/objectWithoutProperties")),r=o(require("react")),a=o(require("prop-types")),l=o(require("clsx")),s=o(require("../styles/withStyles")),u=o(require("../Table/Tablelvl2Context"));function o(e){return e&&e.__esModule?e:{default:e}}var d={root:{display:"table-header-group"}};exports.styles=d;var i={variant:"head"},n=r.default.forwardRef(function(a,s){var o=a.classes,d=a.className,n=a.component,f=void 0===n?"thead":n,c=(0,t.default)(a,["classes","className","component"]);return r.default.createElement(u.default.Provider,{value:i},r.default.createElement(f,(0,e.default)({className:(0,l.default)(o.root,d),ref:s},c)))}),f=(0,s.default)(d,{name:"MuiTableHead"})(n);exports.default=f;
+},{"@babel/runtime/helpers/esm/extends":"NLFh","@babel/runtime/helpers/esm/objectWithoutProperties":"kDQp","react":"1n8/","prop-types":"1NUe","clsx":"WLGK","../styles/withStyles":"awmK","../Table/Tablelvl2Context":"91CL"}],"BYgd":[function(require,module,exports) {
+"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),Object.defineProperty(exports,"default",{enumerable:!0,get:function(){return e.default}});var e=t(require("./TableHead"));function t(e){return e&&e.__esModule?e:{default:e}}
+},{"./TableHead":"sGe6"}],"HZfJ":[function(require,module,exports) {
+"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=exports.styles=void 0;var e=u(require("@babel/runtime/helpers/esm/extends")),t=u(require("@babel/runtime/helpers/esm/objectWithoutProperties")),r=u(require("react")),a=u(require("prop-types")),l=u(require("clsx")),s=u(require("../styles/withStyles")),o=u(require("../Table/Tablelvl2Context"));function u(e){return e&&e.__esModule?e:{default:e}}var d={root:{display:"table-row-group"}};exports.styles=d;var i={variant:"body"},n=r.default.forwardRef(function(a,s){var u=a.classes,d=a.className,n=a.component,f=void 0===n?"tbody":n,c=(0,t.default)(a,["classes","className","component"]);return r.default.createElement(o.default.Provider,{value:i},r.default.createElement(f,(0,e.default)({className:(0,l.default)(u.root,d),ref:s},c)))}),f=(0,s.default)(d,{name:"MuiTableBody"})(n);exports.default=f;
+},{"@babel/runtime/helpers/esm/extends":"NLFh","@babel/runtime/helpers/esm/objectWithoutProperties":"kDQp","react":"1n8/","prop-types":"1NUe","clsx":"WLGK","../styles/withStyles":"awmK","../Table/Tablelvl2Context":"91CL"}],"0cmi":[function(require,module,exports) {
+"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),Object.defineProperty(exports,"default",{enumerable:!0,get:function(){return e.default}});var e=t(require("./TableBody"));function t(e){return e&&e.__esModule?e:{default:e}}
+},{"./TableBody":"HZfJ"}],"Im4G":[function(require,module,exports) {
+"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=exports.styles=void 0;var e=s(require("@babel/runtime/helpers/esm/objectWithoutProperties")),t=s(require("@babel/runtime/helpers/esm/extends")),a=s(require("react")),i=s(require("prop-types")),r=s(require("clsx")),d=s(require("../styles/withStyles")),l=require("../utils/helpers"),n=require("../styles/colorManipulator"),o=s(require("../Table/TableContext")),p=s(require("../Table/Tablelvl2Context"));function s(e){return e&&e.__esModule?e:{default:e}}var g=function(e){return{root:(0,t.default)({},e.typography.body2,{display:"table-cell",verticalAlign:"inherit",borderBottom:"1px solid\n ".concat("light"===e.palette.type?(0,n.lighten)((0,n.fade)(e.palette.divider,1),.88):(0,n.darken)((0,n.fade)(e.palette.divider,1),.68)),textAlign:"left",padding:"14px 40px 14px 16px","&:last-child":{paddingRight:16}}),head:{color:e.palette.text.secondary,fontSize:e.typography.pxToRem(12),lineHeight:e.typography.pxToRem(21),fontWeight:e.typography.fontWeightMedium},body:{color:e.palette.text.primary,fontWeight:e.typography.fontWeightRegular},footer:{color:e.palette.text.secondary,lineHeight:e.typography.pxToRem(21),fontSize:e.typography.pxToRem(12)},sizeSmall:{padding:"6px 24px 6px 16px","&:last-child":{paddingRight:16},"&$paddingCheckbox":{width:24,padding:"0px 12px 0 16px","&:last-child":{paddingLeft:12,paddingRight:16},"& > *":{padding:0}}},paddingCheckbox:{width:48,padding:"0 0 0 4px","&:last-child":{paddingLeft:0,paddingRight:4}},paddingNone:{padding:0,"&:last-child":{padding:0}},alignLeft:{textAlign:"left"},alignCenter:{textAlign:"center"},alignRight:{textAlign:"right",flexDirection:"row-reverse"},alignJustify:{textAlign:"justify"},stickyHeader:{position:"sticky",top:0,left:0,zIndex:1,backgroundColor:e.palette.background.default}}};exports.styles=g;var c=a.default.forwardRef(function(i,d){var n,s=i.align,g=void 0===s?"inherit":s,c=i.classes,u=i.className,f=i.component,h=i.padding,x=i.scope,y=i.size,m=i.sortDirection,b=i.variant,v=(0,e.default)(i,["align","classes","className","component","padding","scope","size","sortDirection","variant"]),z=a.default.useContext(o.default),R=a.default.useContext(p.default);n=f||(R&&"head"===R.variant?"th":"td");var q=x;!q&&R&&"head"===R.variant&&(q="col");var k=h||(z&&z.padding?z.padding:"default"),C=y||(z&&z.size?z.size:"medium"),T=b||R&&R.variant,A=null;return m&&(A="asc"===m?"ascending":"descending"),a.default.createElement(n,(0,t.default)({ref:d,className:(0,r.default)(c.root,u,"inherit"!==g&&c["align".concat((0,l.capitalize)(g))],"default"!==k&&c["padding".concat((0,l.capitalize)(k))],"medium"!==C&&c["size".concat((0,l.capitalize)(C))],{head:[c.head,z&&z.stickyHeader&&c.stickyHeader],body:c.body,footer:c.footer}[T]),"aria-sort":A,scope:q},v))}),u=(0,d.default)(g,{name:"MuiTableCell"})(c);exports.default=u;
+},{"@babel/runtime/helpers/esm/objectWithoutProperties":"kDQp","@babel/runtime/helpers/esm/extends":"NLFh","react":"1n8/","prop-types":"1NUe","clsx":"WLGK","../styles/withStyles":"awmK","../utils/helpers":"OP6V","../styles/colorManipulator":"7agu","../Table/TableContext":"91CL","../Table/Tablelvl2Context":"91CL"}],"lprt":[function(require,module,exports) {
+"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),Object.defineProperty(exports,"default",{enumerable:!0,get:function(){return e.default}});var e=t(require("./TableCell"));function t(e){return e&&e.__esModule?e:{default:e}}
+},{"./TableCell":"Im4G"}],"wXEN":[function(require,module,exports) {
+"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=exports.styles=void 0;var e=u(require("@babel/runtime/helpers/esm/extends")),t=u(require("@babel/runtime/helpers/esm/objectWithoutProperties")),r=u(require("react")),o=u(require("prop-types")),l=u(require("clsx")),a=u(require("../styles/withStyles")),s=u(require("../Table/Tablelvl2Context"));function u(e){return e&&e.__esModule?e:{default:e}}var d=function(e){return{root:{color:"inherit",display:"table-row",verticalAlign:"middle",outline:0,"&$selected":{backgroundColor:"light"===e.palette.type?"rgba(0, 0, 0, 0.04)":"rgba(255, 255, 255, 0.08)"},"&$hover:hover":{backgroundColor:"light"===e.palette.type?"rgba(0, 0, 0, 0.07)":"rgba(255, 255, 255, 0.14)"}},selected:{},hover:{},head:{},footer:{}}};exports.styles=d;var i=r.default.forwardRef(function(o,a){var u=o.classes,d=o.className,i=o.component,n=void 0===i?"tr":i,c=o.hover,f=void 0!==c&&c,p=o.selected,v=void 0!==p&&p,b=(0,t.default)(o,["classes","className","component","hover","selected"]),h=r.default.useContext(s.default);return r.default.createElement(n,(0,e.default)({ref:a,className:(0,l.default)(u.root,d,h&&{head:u.head,footer:u.footer}[h.variant],f&&u.hover,v&&u.selected)},b))}),n=(0,a.default)(d,{name:"MuiTableRow"})(i);exports.default=n;
+},{"@babel/runtime/helpers/esm/extends":"NLFh","@babel/runtime/helpers/esm/objectWithoutProperties":"kDQp","react":"1n8/","prop-types":"1NUe","clsx":"WLGK","../styles/withStyles":"awmK","../Table/Tablelvl2Context":"91CL"}],"kIQr":[function(require,module,exports) {
+"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),Object.defineProperty(exports,"default",{enumerable:!0,get:function(){return e.default}});var e=t(require("./TableRow"));function t(e){return e&&e.__esModule?e:{default:e}}
+},{"./TableRow":"wXEN"}],"ou/W":[function(require,module,exports) {
+"use strict";var e=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var r=e(require("react")),t=e(require("./utils/createSvgIcon")),l=(0,t.default)(r.default.createElement("path",{d:"M19 3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.11 0 2-.9 2-2V5c0-1.1-.89-2-2-2zm-9 14l-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z"}),"CheckBox");exports.default=l;
+},{"@babel/runtime/helpers/interopRequireDefault":"u5tj","react":"1n8/","./utils/createSvgIcon":"Atth"}],"lqdk":[function(require,module,exports) {
+"use strict";var e=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var r=e(require("react")),t=e(require("./utils/createSvgIcon")),u=(0,t.default)(r.default.createElement("path",{d:"M19 5v14H5V5h14m0-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2z"}),"CheckBoxOutlineBlank");exports.default=u;
+},{"@babel/runtime/helpers/interopRequireDefault":"u5tj","react":"1n8/","./utils/createSvgIcon":"Atth"}],"y1lj":[function(require,module,exports) {
+"use strict";var e=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},t=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t};Object.defineProperty(exports,"__esModule",{value:!0});var r=e(require("@material-ui/core/TableCell")),a=e(require("@material-ui/icons/CheckBox")),n=e(require("@material-ui/icons/CheckBoxOutlineBlank")),u=t(require("react")),l=require("tubular-common");exports.renderCellContent=function(e,t){switch(e.DataType){case l.ColumnDataType.NUMERIC:return t[e.Name]||0;case l.ColumnDataType.DATE:return l.formatDate(t[e.Name]);case l.ColumnDataType.DATE_TIME:case l.ColumnDataType.DATE_TIME_UTC:return l.formatDate(t[e.Name],"M/d/yyyy h:mm a");case l.ColumnDataType.BOOLEAN:return!0===t[e.Name]?u.createElement(a.default,null):u.createElement(n.default,null);default:return t[e.Name]}},exports.renderCells=function(e,t){return e.filter(function(e){return e.Visible}).map(function(e){return u.createElement(r.default,{key:e.Name,padding:""===e.Label?"none":"default",align:l.getColumnAlign(e)},exports.renderCellContent(e,t))})};
+},{"@material-ui/core/TableCell":"lprt","@material-ui/icons/CheckBox":"ou/W","@material-ui/icons/CheckBoxOutlineBlank":"lqdk","react":"1n8/","tubular-common":"QwmZ"}],"ocGl":[function(require,module,exports) {
+"use strict";function e(e){for(var r in e)exports.hasOwnProperty(r)||(exports[r]=e[r])}Object.defineProperty(exports,"__esModule",{value:!0}),e(require("./renders"));
+},{"./renders":"y1lj"}],"kl1Q":[function(require,module,exports) {
"use strict";var e=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},t=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t};Object.defineProperty(exports,"__esModule",{value:!0});var r=e(require("@material-ui/core/TableBody")),n=e(require("@material-ui/core/TableCell")),a=e(require("@material-ui/core/TableRow")),l=e(require("@material-ui/core/Typography")),u=e(require("@material-ui/icons/Warning")),i=t(require("react")),o=require("../utils"),c=function(e){return{row:{cursor:e?"pointer":"auto"},title:{paddingLeft:"15px"}}};exports.GridBody=function(e){var t=e.grid,d=e.bodyRenderer,s=e.onRowClick,f=function(e){return function(t){s&&s(e)}},m=c(Boolean(s));d||(d=function(e,t,r){return i.createElement(a.default,{hover:!0,key:t,onClick:f(e),style:m.row},o.renderCells(r,e))});var p=i.createElement(a.default,null,i.createElement(n.default,{colSpan:t.state.columns.filter(function(e){return e.Visible}).length},i.createElement(l.default,{style:m.title,variant:"body2",gutterBottom:!0},i.createElement(u.default,null)," No records found")));return i.createElement(r.default,null,0!==t.state.filteredRecordCount||t.state.isLoading?t.state.data.map(function(e,r){return d(e,r,t.state.columns,f(e))}):p)};
},{"@material-ui/core/TableBody":"0cmi","@material-ui/core/TableCell":"lprt","@material-ui/core/TableRow":"kIQr","@material-ui/core/Typography":"/pi2","@material-ui/icons/Warning":"07Mr","react":"1n8/","../utils":"ocGl"}],"99Ss":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=exports.styles=void 0;var e=o(require("@babel/runtime/helpers/esm/extends")),r=o(require("@babel/runtime/helpers/esm/objectWithoutProperties")),t=o(require("react")),s=o(require("prop-types")),a=o(require("clsx")),l=o(require("../Paper")),u=o(require("../styles/withStyles"));function o(e){return e&&e.__esModule?e:{default:e}}var i={root:{overflow:"hidden"}};exports.styles=i;var d=t.default.forwardRef(function(s,u){var o=s.classes,i=s.className,d=s.raised,f=void 0!==d&&d,n=(0,r.default)(s,["classes","className","raised"]);return t.default.createElement(l.default,(0,e.default)({className:(0,a.default)(o.root,i),elevation:f?8:1,ref:u},n))}),f=(0,u.default)(i,{name:"MuiCard"})(d);exports.default=f;
@@ -865,12 +871,12 @@ var e=arguments[3];Object.defineProperty(exports,"__esModule",{value:!0}),export
},{"@babel/runtime/helpers/esm/objectWithoutProperties":"kDQp","@babel/runtime/helpers/esm/extends":"NLFh","react":"1n8/","prop-types":"1NUe","clsx":"WLGK","../styles/withStyles":"awmK","../ListItem":"vro7"}],"dYSc":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),Object.defineProperty(exports,"default",{enumerable:!0,get:function(){return e.default}});var e=t(require("./MenuItem"));function t(e){return e&&e.__esModule?e:{default:e}}
},{"./MenuItem":"t1nz"}],"RXQY":[function(require,module,exports) {
-"use strict";var e=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},t=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var a in e)Object.hasOwnProperty.call(e,a)&&(t[a]=e[a]);return t.default=e,t};Object.defineProperty(exports,"__esModule",{value:!0});var a=e(require("@material-ui/core/MenuItem")),r=e(require("@material-ui/core/TextField")),u=e(require("date-fns/format")),l=e(require("date-fns/parseISO")),n=t(require("react")),i=require("tubular-common"),o={marginLeft:"10%",marginTop:"5%",width:"80%"},m=[{Value:"true",Title:"True"},{Value:"false",Title:"False"}],p={boolean:"text",date:"date",datetime:"datetime-local",datetimeutc:"datetime-local",numeric:"number",string:"text"},s=function(e,t,a,r){switch(e){case i.ColumnDataType.DATE:return a?u.default(l.default(a),"yyyy-MM-DD"):(r(u.default(new Date,"YYYY-MM-DD")),"");case i.ColumnDataType.DATE_TIME:case i.ColumnDataType.DATE_TIME_UTC:return a?u.default(l.default(a),"yyyy-MM-DD[T]HH:mm"):(r(u.default(new Date,"yyyy-MM-DD[T]HH:mm")),"");case i.ColumnDataType.BOOLEAN:return t===i.CompareOperators.NONE?"":"boolean"==typeof a?!0===a?"true":"false":a;default:return t===i.CompareOperators.NONE?"":a||""}};exports.DialogInput=function(e){var t=e.column,u=e.handleTextFieldChange,l=e.isPrimary,d=s(t.DataType,t.Filter.Operator,l?t.Filter.Text:t.Filter.Argument[0],u)||"",f=!!l&&t.Filter.Operator===i.CompareOperators.NONE,y=l?t.Filter.Operator!==i.CompareOperators.BETWEEN?"Value":"First Value":"Second Value";return n.createElement(r.default,{select:t.DataType===i.ColumnDataType.BOOLEAN,style:o,id:t.Name,disabled:f,value:d,label:y,type:p[t.DataType],onChange:function(e){return u(e.target.value)}},t.DataType===i.ColumnDataType.BOOLEAN&&m.map(function(e){return n.createElement(a.default,{key:e.Value,value:e.Value},e.Title)}))};
-},{"@material-ui/core/MenuItem":"dYSc","@material-ui/core/TextField":"75JZ","date-fns/format":"OZJZ","date-fns/parseISO":"LCTl","react":"1n8/","tubular-common":"QwmZ"}],"ZdTh":[function(require,module,exports) {
-"use strict";var e=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var r={};if(null!=e)for(var t in e)Object.hasOwnProperty.call(e,t)&&(r[t]=e[t]);return r.default=e,r},r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(exports,"__esModule",{value:!0});var t=e(require("react")),a=r(require("@material-ui/core/MenuItem")),u=r(require("@material-ui/core/TextField")),n=require("tubular-common"),l={marginLeft:"10%",width:"80%"},i=function(e){return e&&""!==e?e:"None"};exports.OperatorsDropdown=function(e){var r=e.activeColumn,o=e.handleFilterChange;return t.createElement(u.default,{style:l,select:!0,value:i(r.Filter.Operator),onChange:function(e){var r=e.target;return o({Operator:r.value})},label:"Operator"},n.ColumnModel.getOperators(r).map(function(e){return t.createElement(a.default,{key:e.Value,value:e.Value},e.Title)}))};
-},{"react":"1n8/","@material-ui/core/MenuItem":"dYSc","@material-ui/core/TextField":"75JZ","tubular-common":"QwmZ"}],"O2b9":[function(require,module,exports) {
-"use strict";var e=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},r=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var r={};if(null!=e)for(var t in e)Object.hasOwnProperty.call(e,t)&&(r[t]=e[t]);return r.default=e,r};Object.defineProperty(exports,"__esModule",{value:!0});var t=e(require("@material-ui/core/Button")),a=e(require("@material-ui/core/Card")),n=e(require("@material-ui/core/CardActions")),o=e(require("@material-ui/core/CardContent")),l=e(require("@material-ui/core/Popover")),i=r(require("react")),u=require("./DialogInput"),c=require("./OperatorsDropdown"),m=require("tubular-common"),p=function(e){var r=e.Filter.Text,t=e.Filter.Argument[0];return e.DataType===m.ColumnDataType.NUMERIC?(r=parseFloat(r),t=parseFloat(t)):e.DataType===m.ColumnDataType.BOOLEAN&&(r="true"===r,t=""),{Argument:[t],HasFilter:!0,Operator:e.Filter.Operator||m.CompareOperators.AUTO,Text:r}},s={Argument:[""],HasFilter:!1,Operator:m.CompareOperators.NONE,Text:""};exports.DialogModal=function(e){var r=e.anchorFilter,d=e.activeColumn,f=e.setAnchorFilter,C=e.setFilter,O=e.handleFilterChange;return i.createElement(l.default,{open:Boolean(r),onClose:function(){return f(null)},anchorEl:r,anchorOrigin:{horizontal:"center",vertical:"bottom"},transformOrigin:{horizontal:"center",vertical:"top"}},i.createElement(a.default,null,i.createElement(o.default,null,i.createElement(c.OperatorsDropdown,{activeColumn:d,handleFilterChange:O}),i.createElement(u.DialogInput,{column:d,isPrimary:!0,handleTextFieldChange:function(e){return O({Text:e})}}),d.Filter.Operator===m.CompareOperators.BETWEEN&&i.createElement(u.DialogInput,{column:d,isPrimary:!1,handleTextFieldChange:function(e){return O({Argument:[e]})}})),i.createElement(n.default,null,i.createElement(t.default,{size:"medium",color:"secondary",onClick:function(){return C(s)}},"Clear"),i.createElement(t.default,{size:"medium",color:"primary",onClick:function(){return C(p(d))},disabled:d.Filter.Operator===m.CompareOperators.NONE},"Apply"))))};
-},{"@material-ui/core/Button":"uzLy","@material-ui/core/Card":"Ws94","@material-ui/core/CardActions":"7xv+","@material-ui/core/CardContent":"FW+e","@material-ui/core/Popover":"HEXW","react":"1n8/","./DialogInput":"RXQY","./OperatorsDropdown":"ZdTh","tubular-common":"QwmZ"}],"x58U":[function(require,module,exports) {
+"use strict";var e=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},t=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var a in e)Object.hasOwnProperty.call(e,a)&&(t[a]=e[a]);return t.default=e,t};Object.defineProperty(exports,"__esModule",{value:!0});var a=e(require("@material-ui/core/MenuItem")),r=e(require("@material-ui/core/TextField")),l=t(require("react")),u=require("tubular-common"),n={marginLeft:"10%",marginTop:"5%",width:"80%"},o=[{Value:"true",Title:"True"},{Value:"false",Title:"False"}],i={boolean:"text",date:"date",datetime:"datetime-local",datetimeutc:"datetime-local",numeric:"number",string:"text"},m=function(e,t,a,r){switch(e){case u.ColumnDataType.DATE:return a?u.formatDate(a,"yyyy-MM-DD"):(r(u.formatDate((new Date).toISOString(),"YYYY-MM-DD")),"");case u.ColumnDataType.DATE_TIME:case u.ColumnDataType.DATE_TIME_UTC:return a?u.formatDate(a,"yyyy-MM-DD[T]HH:mm"):(r(u.formatDate((new Date).toISOString(),"yyyy-MM-DD[T]HH:mm")),"");case u.ColumnDataType.BOOLEAN:return t===u.CompareOperators.NONE?"":"boolean"==typeof a?!0===a?"true":"false":a;default:return t===u.CompareOperators.NONE?"":a||""}};exports.DialogInput=function(e){var t=e.column,p=e.handleTextFieldChange,s=e.isPrimary,y=m(t.DataType,t.Filter.Operator,s?t.Filter.Text:t.Filter.Argument[0],p)||"",D=!!s&&t.Filter.Operator===u.CompareOperators.NONE,c=s?t.Filter.Operator!==u.CompareOperators.BETWEEN?"Value":"First Value":"Second Value";return l.createElement(r.default,{select:t.DataType===u.ColumnDataType.BOOLEAN,style:n,id:t.Name,disabled:D,value:y,label:c,type:i[t.DataType],onChange:function(e){return p(e.target.value)}},t.DataType===u.ColumnDataType.BOOLEAN&&o.map(function(e){return l.createElement(a.default,{key:e.Value,value:e.Value},e.Title)}))};
+},{"@material-ui/core/MenuItem":"dYSc","@material-ui/core/TextField":"75JZ","react":"1n8/","tubular-common":"QwmZ"}],"ZdTh":[function(require,module,exports) {
+"use strict";var e=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var r={};if(null!=e)for(var t in e)Object.hasOwnProperty.call(e,t)&&(r[t]=e[t]);return r.default=e,r},r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(exports,"__esModule",{value:!0});var t=e(require("react")),a=r(require("@material-ui/core/MenuItem")),u=r(require("@material-ui/core/TextField")),n={marginLeft:"10%",width:"80%"},l=function(e){return e&&""!==e?e:"None"};exports.OperatorsDropdown=function(e){var r=e.activeColumn,i=e.handleFilterChange;return t.createElement(u.default,{style:n,select:!0,value:l(r.Filter.Operator),onChange:function(e){var r=e.target;return i({Operator:r.value})},label:"Operator"},r.getOperators().map(function(e){return t.createElement(a.default,{key:e.Value,value:e.Value},e.Title)}))};
+},{"react":"1n8/","@material-ui/core/MenuItem":"dYSc","@material-ui/core/TextField":"75JZ"}],"O2b9":[function(require,module,exports) {
+"use strict";var e=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},r=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var r={};if(null!=e)for(var t in e)Object.hasOwnProperty.call(e,t)&&(r[t]=e[t]);return r.default=e,r};Object.defineProperty(exports,"__esModule",{value:!0});var t=e(require("@material-ui/core/Button")),a=e(require("@material-ui/core/Card")),n=e(require("@material-ui/core/CardActions")),l=e(require("@material-ui/core/CardContent")),o=e(require("@material-ui/core/Popover")),i=r(require("react")),u=require("tubular-common"),c=require("./DialogInput"),m=require("./OperatorsDropdown");exports.DialogModal=function(e){var r=e.anchorFilter,d=e.activeColumn,s=e.setAnchorFilter,p=e.setFilter,f=e.handleFilterChange;return i.createElement(o.default,{open:Boolean(r),onClose:function(){return s(null)},anchorEl:r,anchorOrigin:{horizontal:"center",vertical:"bottom"},transformOrigin:{horizontal:"center",vertical:"top"}},i.createElement(a.default,null,i.createElement(l.default,null,i.createElement(m.OperatorsDropdown,{activeColumn:d,handleFilterChange:f}),i.createElement(c.DialogInput,{column:d,isPrimary:!0,handleTextFieldChange:function(e){return f({Text:e})}}),d.Filter.Operator===u.CompareOperators.BETWEEN&&i.createElement(c.DialogInput,{column:d,isPrimary:!1,handleTextFieldChange:function(e){return f({Argument:[e]})}})),i.createElement(n.default,null,i.createElement(t.default,{size:"medium",color:"secondary",onClick:function(){return p(u.ColumnModel.clearFilterPatch())}},"Clear"),i.createElement(t.default,{size:"medium",color:"primary",onClick:function(){return p(d.createFilterPatch())},disabled:d.Filter.Operator===u.CompareOperators.NONE},"Apply"))))};
+},{"@material-ui/core/Button":"uzLy","@material-ui/core/Card":"Ws94","@material-ui/core/CardActions":"7xv+","@material-ui/core/CardContent":"FW+e","@material-ui/core/Popover":"HEXW","react":"1n8/","tubular-common":"QwmZ","./DialogInput":"RXQY","./OperatorsDropdown":"ZdTh"}],"x58U":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var e=t(require("react")),r=t(require("./createSvgIcon"));function t(e){return e&&e.__esModule?e:{default:e}}var a=(0,r.default)(e.default.createElement("path",{d:"M20 12l-1.41-1.41L13 16.17V4h-2v12.17l-5.58-5.59L4 12l8 8 8-8z"}),"ArrowDownward");exports.default=a;
},{"react":"1n8/","./createSvgIcon":"70z7"}],"9Xsw":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=exports.styles=void 0;var e=l(require("@babel/runtime/helpers/esm/extends")),t=l(require("@babel/runtime/helpers/esm/objectWithoutProperties")),r=l(require("react")),i=l(require("prop-types")),o=l(require("clsx")),a=l(require("../internal/svg-icons/ArrowDownward")),n=l(require("../styles/withStyles")),s=l(require("../ButtonBase")),c=require("../utils/helpers");function l(e){return e&&e.__esModule?e:{default:e}}var u=function(e){return{root:{cursor:"pointer",display:"inline-flex",justifyContent:"flex-start",flexDirection:"inherit",alignItems:"center","&:focus":{color:e.palette.text.primary},"&:hover":{color:e.palette.text.primary,"& $icon":{opacity:1,color:e.palette.text.secondary}},"&$active":{color:e.palette.text.primary,"&& $icon":{opacity:1,color:e.palette.text.primary}}},active:{},icon:{height:18,marginRight:4,marginLeft:4,opacity:0,transition:e.transitions.create(["opacity","transform"],{duration:e.transitions.duration.shorter}),userSelect:"none",width:18},iconDirectionDesc:{transform:"rotate(0deg)"},iconDirectionAsc:{transform:"rotate(180deg)"}}};exports.styles=u;var d=r.default.forwardRef(function(i,n){var l=i.active,u=void 0!==l&&l,d=i.children,p=i.classes,f=i.className,m=i.direction,v=void 0===m?"desc":m,y=i.hideSortIcon,h=void 0!==y&&y,x=i.IconComponent,b=void 0===x?a.default:x,q=(0,t.default)(i,["active","children","classes","className","direction","hideSortIcon","IconComponent"]);return r.default.createElement(s.default,(0,e.default)({className:(0,o.default)(p.root,f,u&&p.active),component:"span",disableRipple:!0,ref:n},q),d,h&&!u?null:r.default.createElement(b,{className:(0,o.default)(p.icon,p["iconDirection".concat((0,c.capitalize)(v))])}))}),p=(0,n.default)(u,{name:"MuiTableSortLabel"})(d);exports.default=p;
@@ -892,15 +898,9 @@ var e=arguments[3];Object.defineProperty(exports,"__esModule",{value:!0}),export
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=exports.styles=void 0;var e=i(require("@babel/runtime/helpers/esm/extends")),t=i(require("@babel/runtime/helpers/esm/objectWithoutProperties")),r=i(require("react")),l=i(require("prop-types")),s=i(require("clsx")),a=i(require("warning")),o=i(require("../styles/withStyles"));function i(e){return e&&e.__esModule?e:{default:e}}var u={root:{display:"flex",flexWrap:"wrap",overflowY:"auto",listStyle:"none",padding:0,WebkitOverflowScrolling:"touch"}};exports.styles=u;var n=r.default.forwardRef(function(l,a){var o=l.cellHeight,i=void 0===o?180:o,u=l.children,n=l.classes,d=l.className,c=l.cols,p=void 0===c?2:c,f=l.component,m=void 0===f?"ul":f,h=l.spacing,v=void 0===h?4:h,y=l.style,g=(0,t.default)(l,["cellHeight","children","classes","className","cols","component","spacing","style"]);return r.default.createElement(m,(0,e.default)({className:(0,s.default)(n.root,d),ref:a,style:(0,e.default)({margin:-v/2},y)},g),r.default.Children.map(u,function(t){if(!r.default.isValidElement(t))return null;var l=t.props.cols||1,s=t.props.rows||1;return r.default.cloneElement(t,{style:(0,e.default)({width:"".concat(100/p*l,"%"),height:"auto"===i?"auto":i*s+v,padding:v/2},t.props.style)})}))}),d=(0,o.default)(u,{name:"MuiGridList"})(n);exports.default=d;
},{"@babel/runtime/helpers/esm/extends":"NLFh","@babel/runtime/helpers/esm/objectWithoutProperties":"kDQp","react":"1n8/","prop-types":"1NUe","clsx":"WLGK","warning":"XOCG","../styles/withStyles":"awmK"}],"I/dL":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),Object.defineProperty(exports,"default",{enumerable:!0,get:function(){return e.default}});var e=t(require("./GridList"));function t(e){return e&&e.__esModule?e:{default:e}}
-},{"./GridList":"cUwp"}],"p1Bd":[function(require,module,exports) {
-"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var t=function(){function t(t){if(this.name=t,!window||!window.localStorage)throw new Error("The localStorage is not present.")}return t.prototype.setGridName=function(t){this.name=t},t.prototype.setTextSearch=function(t){window.localStorage.setItem(this.name+"_textSearch",t)},t.prototype.setPage=function(t){window.localStorage.setItem(this.name+"_page",t.toString())},t.prototype.setColumns=function(t){window.localStorage.setItem(this.name+"_columns",JSON.stringify(t))},t.prototype.getTextSearch=function(){return window.localStorage.getItem(this.name+"_textSearch")},t.prototype.getPage=function(){return parseInt(window.localStorage.getItem(this.name+"_page"),10)},t.prototype.getColumns=function(){return JSON.parse(window.localStorage.getItem(this.name+"_columns"))},t}();exports.LocalStorage=t;
-},{}],"cYgi":[function(require,module,exports) {
-"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var t=function(){function t(){}return t.prototype.setTextSearch=function(t){},t.prototype.setPage=function(t){},t.prototype.setColumns=function(t){},t.prototype.getTextSearch=function(){return null},t.prototype.getPage=function(){return null},t.prototype.getColumns=function(){return null},t}();exports.NullStorage=t;
-},{}],"DIVM":[function(require,module,exports) {
-"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("./LocalStorage");exports.LocalStorage=e.LocalStorage;var r=require("./NullStorage");exports.NullStorage=r.NullStorage;
-},{"./LocalStorage":"p1Bd","./NullStorage":"cYgi"}],"+Gex":[function(require,module,exports) {
-"use strict";var e=this&&this.__assign||function(){return(e=Object.assign||function(e){for(var t,r=1,n=arguments.length;r0&&a[a.length-1])&&(6===o[0]||2===o[0])){u=0;continue}if(3===o[0]&&(!a||o[1]>a[0]&&o[1]n?n:t.CurrentPage,N.setPage(t.CurrentPage-1),N.setColumns(m),N.setTextSearch(M),J({aggregate:t.AggregationPayload,data:t.Payload,filteredRecordCount:t.FilteredRecordCount||0,totalRecordCount:t.TotalRecordCount||0}),v(!1),w(!0),D(null),L(t.CurrentPage-1),[3,4];case 3:return a=r.sent(),o.onError&&o.onError(a),v(!1),D(a),[3,4];case 4:return[2]}})})},setActiveColumn:x,setFilter:function(t){var r=n(m),a=r.find(function(e){return e.Name===_.Name});a&&(a.Filter=e(e({},_.Filter),t),b(n(r)))},sortColumn:function(e){var t=i.ColumnModel.sortColumnArray(e,n(m),R);b(t)},updateItemPerPage:function(e){k!==e&&q(e)},updateSearchText:function(e){M!==e&&G(e)}},W=[m,A,M,k,c];h&&(W=W.concat(h)),u.useEffect(function(){return document.addEventListener("keydown",K),document.addEventListener("keyup",Q),function(){document.removeEventListener("keydown",K),document.removeEventListener("keyup",Q)}},[R]),u.useEffect(function(){U.processRequest()},W);C||function(){N.getPage()&&L(N.getPage());var e=N.getColumns();if(e){var t=n(m);e.forEach(function(e){var r=t.find(function(t){return t.Name===e.Name});r&&(r.Visible=e.Visible,null!==r.Filter&&null!==r.Filter.Text||null!=e.Filter&&null!=e.Filter.Text&&e.Filter.Operator!==i.CompareOperators.NONE&&(r.Filter=e.Filter))}),b(t)}w(!0)}();var X=e(e({},B),{activeColumn:_,columns:m,error:z,initialized:C,isLoading:g,itemsPerPage:k,multiSort:R,page:A,searchText:M,storage:N});return{api:U,state:X}};exports.default=h;
-},{"react":"1n8/","tubular-common":"QwmZ","../Storage":"DIVM","../Storage/NullStorage":"cYgi","../utils/TubularHttpClient":"xhdv"}],"AdTK":[function(require,module,exports) {
+},{"./GridList":"cUwp"}],"+Gex":[function(require,module,exports) {
+"use strict";var e=this&&this.__assign||function(){return(e=Object.assign||function(e){for(var t,r=1,n=arguments.length;r0&&a[a.length-1])&&(6===o[0]||2===o[0])){u=0;continue}if(3===o[0]&&(!a||o[1]>a[0]&&o[1]n?n:t.CurrentPage,k.setPage(t.CurrentPage-1),k.setColumns(g),k.setTextSearch(L),B({aggregate:t.AggregationPayload,data:t.Payload,filteredRecordCount:t.FilteredRecordCount||0,totalRecordCount:t.TotalRecordCount||0}),p(!1),C(!0),V(null),q(t.CurrentPage-1),[3,4];case 3:return a=r.sent(),s.onError&&s.onError(a),p(!1),V(a),[3,4];case 4:return[2]}})})},setActiveColumn:S,setFilter:function(t){var r=n(g),a=r.find(function(e){return e.Name===w.Name});a&&(a.Filter=e(e({},w.Filter),t),y(n(r)))},sortColumn:function(e){var t=u.ColumnModel.sortColumnArray(e,n(g),F);y(t)},updateItemPerPage:function(e){_!==e&&E(e)},updateSearchText:function(e){L!==e&&j(e)}},Q=[g,O,L,_,c];f&&(Q=Q.concat(f)),o.useEffect(function(){return document.addEventListener("keydown",D),document.addEventListener("keyup",J),function(){document.removeEventListener("keydown",D),document.removeEventListener("keyup",J)}},[F]),o.useEffect(function(){K.processRequest()},Q);b||function(){k.getPage()&&q(k.getPage());var e=k.getColumns();if(e){var t=n(g);e.forEach(function(e){var r=t.find(function(t){return t.Name===e.Name});r&&(r.Visible=e.Visible,null!==r.Filter&&null!==r.Filter.Text||null!=e.Filter&&null!=e.Filter.Text&&e.Filter.Operator!==u.CompareOperators.NONE&&(r.Filter=e.Filter))}),y(t)}C(!0)}();var U=e(e({},I),{activeColumn:w,columns:g,error:M,initialized:b,isLoading:h,itemsPerPage:_,multiSort:F,page:O,searchText:L,storage:k});return{api:K,state:U}};exports.default=s;
+},{"react":"1n8/","tubular-common":"QwmZ"}],"AdTK":[function(require,module,exports) {
"use strict";var e=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var r=e(require("@babel/runtime/helpers/extends")),t=require("@material-ui/styles"),u=e(require("./defaultTheme"));function a(e){var a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return(0,t.makeStyles)(e,(0,r.default)({defaultTheme:u.default},a))}var l=a;exports.default=l;
},{"@babel/runtime/helpers/interopRequireDefault":"u5tj","@babel/runtime/helpers/extends":"+B1J","@material-ui/styles":"66th","./defaultTheme":"DSA6"}],"+3JV":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var e=t(require("react")),r=t(require("./createSvgIcon"));function t(e){return e&&e.__esModule?e:{default:e}}var a=(0,r.default)(e.default.createElement("path",{d:"M15.41 16.09l-4.58-4.59 4.58-4.59L14 5.5l-6 6 6 6z"}),"KeyboardArrowLeft");exports.default=a;
@@ -941,8 +941,8 @@ var e=arguments[3];Object.defineProperty(exports,"__esModule",{value:!0}),export
},{"@babel/runtime/helpers/interopRequireDefault":"u5tj","react":"1n8/","./utils/createSvgIcon":"Atth"}],"iSoA":[function(require,module,exports) {
"use strict";var e=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var r=e(require("react")),t=e(require("./utils/createSvgIcon")),u=(0,t.default)(r.default.createElement("path",{d:"M19 8H5c-1.66 0-3 1.34-3 3v6h4v4h12v-4h4v-6c0-1.66-1.34-3-3-3zm-3 11H8v-5h8v5zm3-7c-.55 0-1-.45-1-1s.45-1 1-1 1 .45 1 1-.45 1-1 1zm-1-9H6v4h12V3z"}),"Print");exports.default=u;
},{"@babel/runtime/helpers/interopRequireDefault":"u5tj","react":"1n8/","./utils/createSvgIcon":"Atth"}],"VsIG":[function(require,module,exports) {
-"use strict";var e=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(exports,"__esModule",{value:!0});var t=e(require("date-fns/format")),r=e(require("date-fns/getYear")),n=e(require("date-fns/parseISO")),u=require("tubular-common");function a(e,u){if(!e)return"";var a=n.default(e);return r.default(a)>0?t.default(a,u):""}var o=function(e,t){switch(e){case u.ColumnDataType.DATE:return a(t,"M/d/yyyy");case u.ColumnDataType.DATE_TIME:case u.ColumnDataType.DATE_TIME_UTC:return a(t,"M/d/yyyy h:mm a");case u.ColumnDataType.BOOLEAN:return!0===t?"Yes":"No";default:return(t||"").toString()}},i=function(e){return e instanceof Object?Object.keys(e).map(function(t){return e[t]}):e},c=function(e,t,r){return i(e).reduce(function(e,n,a){if(t[a].Visible){var i=o(r?u.ColumnDataType.STRING:t[a].DataType,n).replace(/"/g,'""');return i.search(/("|,|\n)/g)>=0&&(i='"'+i+'"'),(void 0!==e?e:"")+(a>0&&void 0!==e?",":"")+i}},"")+"\n"};function d(e,t,r){var n=' '+t.filter(function(e){return e.Visible}).reduce(function(e,t){return e+""+(t.Label||t.Name)+" "},"")+" "+e.reduce(function(e,r){return e+""+i(r).reduce(function(e,r,n){return t[n].Visible?e+""+o(t[n].DataType,r)+" ":e},"")+" "},"")+"
",u=window.open("about:blank","Print","location=0,height=500,width=800");u.document.write(' '),u.document.title=r,u.document.write(''),u.document.write(""+r+" "),u.document.write(n),u.document.write(""),u.document.close()}function s(e,t){var r=e.reduce(function(e,r){return e+c(r,t,!1)},c(t.map(function(e){return e.Label}),t,!0)),n=URL.createObjectURL(new Blob(["\ufeff"+r],{type:"text/csv;charset=utf-8;"})),u=document.createElement("a");u.setAttribute("href",n),u.setAttribute("id","download"),u.setAttribute("download","data.csv"),document.body.appendChild(u),u.click(),URL.revokeObjectURL(n)}exports.exportGrid=function(e,t,r,n){"csv"===e?s(t,r):d(t,r,n)};
-},{"date-fns/format":"OZJZ","date-fns/getYear":"y4KC","date-fns/parseISO":"LCTl","tubular-common":"QwmZ"}],"JJaB":[function(require,module,exports) {
+"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var t=require("tubular-common");function e(e,o,n){var r=t.getHtml(e,o),c=window.open("about:blank","Print","location=0,height=500,width=800");c.document.write(' '),c.document.title=n,c.document.write(''),c.document.write(""+n+" "),c.document.write(r),c.document.write(""),c.document.close()}function o(e,o){var n=t.getCsv(e,o),r=URL.createObjectURL(new Blob(["\ufeff"+n],{type:"text/csv;charset=utf-8;"})),c=document.createElement("a");c.setAttribute("href",r),c.setAttribute("id","download"),c.setAttribute("download","data.csv"),document.body.appendChild(c),c.click(),URL.revokeObjectURL(r)}exports.exportGrid=function(t,n,r,c){"csv"===t?o(n,r):e(n,r,c)};
+},{"tubular-common":"QwmZ"}],"JJaB":[function(require,module,exports) {
"use strict";var e=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},t=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t};Object.defineProperty(exports,"__esModule",{value:!0});var r=e(require("@material-ui/core/IconButton")),n=e(require("@material-ui/core/Menu")),l=e(require("@material-ui/core/MenuItem")),u=e(require("@material-ui/core/Tooltip")),i=e(require("@material-ui/icons/CloudDownload")),o=e(require("@material-ui/icons/Print")),a=t(require("react")),c=require("./GridToolbarFunctions");exports.ExportButton=function(e){var t=e.type,d=e.gridName,f=e.toolTip,m=e.exportTo,s=e.filteredRecordCount,p=a.useState(null),E=p[0],_=p[1],q=function(){return _(null)},C=function(e,r){c.exportGrid(t,e,r,d),q()};return a.createElement(a.Fragment,null,a.createElement(r.default,{disabled:0===s,onClick:function(e){return _(e?e.currentTarget:null)}},"print"===t?a.createElement(u.default,{title:f||"Print"},a.createElement(o.default,null)):a.createElement(u.default,{title:f||"Download"},a.createElement(i.default,null))),a.createElement(n.default,{anchorEl:E,open:Boolean(E),onClose:q},a.createElement(l.default,{onClick:function(){return m(!1,C)}},"Current rows"),a.createElement(l.default,{onClick:function(){return m(!0,C)}},"All rows")))};
},{"@material-ui/core/IconButton":"e+0N","@material-ui/core/Menu":"AKYS","@material-ui/core/MenuItem":"dYSc","@material-ui/core/Tooltip":"FW+n","@material-ui/icons/CloudDownload":"NujB","@material-ui/icons/Print":"iSoA","react":"1n8/","./GridToolbarFunctions":"VsIG"}],"k4Pd":[function(require,module,exports) {
"use strict";var e=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},t=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t};Object.defineProperty(exports,"__esModule",{value:!0});var r=e(require("@material-ui/core/Toolbar")),o=t(require("react")),a=require("uno-react"),i=require("../Filtering/SearchTextInput"),u=require("./ExportButton"),n={mobileSpacer:{flexShrink:"1"},spacer:{flex:"1 1 45%"}},c=800,s=400;exports.GridToolbar=function(e){var t=e.toolbarOptions,p=e.gridName,l=e.grid,d=a.useResolutionSwitch(c,s)[0];return o.createElement(r.default,{"data-testid":"grid-toolbar"},o.createElement("div",{style:d?n.mobileSpacer:n.spacer}),t.customItems&&t.customItems,t.exportButton&&o.createElement(u.ExportButton,{type:"csv",gridName:p,exportTo:l.api.exportTo,filteredRecordCount:l.state.filteredRecordCount,"data-testid":"export-button-csv"}),t.printButton&&o.createElement(u.ExportButton,{type:"print",gridName:p,exportTo:l.api.exportTo,filteredRecordCount:l.state.filteredRecordCount,"data-testid":"export-button-print"}),t.searchText&&o.createElement(i.SearchTextInput,{searchText:l.state.searchText,updateSearchText:l.api.updateSearchText,"data-testid":"search-text-input"}))};
@@ -952,21 +952,19 @@ var e=arguments[3];Object.defineProperty(exports,"__esModule",{value:!0}),export
"use strict";var e=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},r=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var r={};if(null!=e)for(var a in e)Object.hasOwnProperty.call(e,a)&&(r[a]=e[a]);return r.default=e,r};Object.defineProperty(exports,"__esModule",{value:!0});var a=e(require("@material-ui/core/GridList")),t=e(require("@material-ui/core/Paper")),o=e(require("@material-ui/core/Table")),i=e(require("@material-ui/core/TableHead")),n=e(require("@material-ui/core/TableRow")),l=e(require("@material-ui/styles/makeStyles")),s=r(require("react")),u=require("uno-material-ui"),d=require("uno-react"),c=e(require("../Hooks/useDataGrid")),m=require("../Pagination"),g=require("../Toolbar/GridToolbar"),P=require("../Toolbar/ToolbarOptions"),p=require("./"),f=l.default({linearProgress:{marginTop:"-10px"},root:{overflowX:"auto",width:"100%"}}),b=800,E=400;exports.DataGrid=function(e){var r=e.bodyRenderer,l=e.columns,q=e.deps,v=e.footerRenderer,O=e.dataSource,w=e.toolbarOptions,T=void 0===w?e.toolbarOptions||new P.ToolbarOptions:w,_=e.gridName,h=e.onError,G=e.onRowClick,R=e.storage,k=f({}),y={gridName:_,itemsPerPage:T.itemsPerPage,onError:h,storage:R},L=c.default(l,y,O,q);if(d.useResolutionSwitch(b,E)[0])return T.SetMobileMode(),s.createElement(t.default,{className:k.root},s.createElement(g.GridToolbar,{toolbarOptions:T,grid:L,gridName:_}),s.createElement(u.FixedLinearProgress,{isLoading:L.state.isLoading}),s.createElement(a.default,{cellHeight:"auto",cols:1},L.state.data.map(function(e,r){return s.createElement(p.DataGridCard,{columns:L.state.columns,item:e,onClickCallback:G,key:r})})),s.createElement(m.Paginator,{advancePagination:T.advancePagination,rowsPerPageOptions:T.rowsPerPageOptions,grid:L}));var N=function(e){return s.createElement(o.default,{"data-testid":e+"-paginator"},s.createElement(i.default,null,s.createElement(n.default,null,s.createElement(m.Paginator,{advancePagination:T.advancePagination,rowsPerPageOptions:T.rowsPerPageOptions,grid:L}))))};return s.createElement(t.default,{className:k.root},s.createElement(g.GridToolbar,{gridName:_,toolbarOptions:T,grid:L}),T.topPager&&N("top"),s.createElement("div",{className:k.linearProgress,"data-testid":"linear-progress"},s.createElement(u.FixedLinearProgress,{isLoading:L.state.isLoading})),s.createElement(p.DataGridTable,{grid:L,bodyRenderer:r,footerRenderer:v,onRowClick:G}),T.bottomPager&&N("bottom"))};
},{"@material-ui/core/GridList":"I/dL","@material-ui/core/Paper":"76mt","@material-ui/core/Table":"Amxx","@material-ui/core/TableHead":"BYgd","@material-ui/core/TableRow":"kIQr","@material-ui/styles/makeStyles":"o/Hu","react":"1n8/","uno-material-ui":"Zs25","uno-react":"3aGf","../Hooks/useDataGrid":"+Gex","../Pagination":"2iV4","../Toolbar/GridToolbar":"k4Pd","../Toolbar/ToolbarOptions":"Htt5","./":"9sjF"}],"9sjF":[function(require,module,exports) {
"use strict";function r(r){for(var e in r)exports.hasOwnProperty(e)||(exports[e]=r[e])}Object.defineProperty(exports,"__esModule",{value:!0}),r(require("./DataGridTable")),r(require("./DataGridCard")),r(require("./DataGrid"));
-},{"./DataGridTable":"i5mQ","./DataGridCard":"Hs7E","./DataGrid":"19vP"}],"lH1s":[function(require,module,exports) {
-"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("./IDataGridStorage");exports.IDataGridStorage=e.IDataGridStorage;
-},{"./IDataGridStorage":"pk/C"}],"TVfP":[function(require,module,exports) {
+},{"./DataGridTable":"i5mQ","./DataGridCard":"Hs7E","./DataGrid":"19vP"}],"TVfP":[function(require,module,exports) {
"use strict";function e(e){for(var r in e)exports.hasOwnProperty(r)||(exports[r]=e[r])}Object.defineProperty(exports,"__esModule",{value:!0}),e(require("./SearchTextInput"));
},{"./SearchTextInput":"UDWI"}],"J8AF":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var r=require("./GridToolbar");exports.GridToolbar=r.GridToolbar;var o=require("./ToolbarOptions");exports.ToolbarOptions=o.ToolbarOptions;
},{"./GridToolbar":"k4Pd","./ToolbarOptions":"Htt5"}],"7GdH":[function(require,module,exports) {
"use strict";var e=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(exports,"__esModule",{value:!0});var r=e(require("./useDataGrid"));exports.useDataGrid=r.default;var t=e(require("./useGridRefresh"));exports.useGridRefresh=t.default;
},{"./useDataGrid":"+Gex","./useGridRefresh":"6tB+"}],"+fUd":[function(require,module,exports) {
-"use strict";function e(e){for(var r in e)exports.hasOwnProperty(r)||(exports[r]=e[r])}Object.defineProperty(exports,"__esModule",{value:!0}),e(require("./DataGrid")),e(require("./utils")),e(require("./Storage")),e(require("./DataGridInterfaces")),e(require("./Pagination")),e(require("./Filtering")),e(require("./Toolbar")),e(require("./Hooks"));
-},{"./DataGrid":"9sjF","./utils":"ocGl","./Storage":"DIVM","./DataGridInterfaces":"lH1s","./Pagination":"2iV4","./Filtering":"TVfP","./Toolbar":"J8AF","./Hooks":"7GdH"}],"jRiX":[function(require,module,exports) {
+"use strict";function e(e){for(var r in e)exports.hasOwnProperty(r)||(exports[r]=e[r])}Object.defineProperty(exports,"__esModule",{value:!0}),e(require("./DataGrid")),e(require("./utils")),e(require("./Pagination")),e(require("./Filtering")),e(require("./Toolbar")),e(require("./Hooks"));
+},{"./DataGrid":"9sjF","./utils":"ocGl","./Pagination":"2iV4","./Filtering":"TVfP","./Toolbar":"J8AF","./Hooks":"7GdH"}],"jRiX":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("tubular-common"),o=[new e.ColumnModel("OrderID",{DataType:e.ColumnDataType.NUMERIC,IsKey:!0,Label:"Id"}),new e.ColumnModel("CustomerName"),new e.ColumnModel("ShippedDate",{DataType:e.ColumnDataType.DATE_TIME}),new e.ColumnModel("ShipperCity"),new e.ColumnModel("Amount",{DataType:e.ColumnDataType.NUMERIC}),new e.ColumnModel("IsShipped",{DataType:e.ColumnDataType.BOOLEAN})];exports.default=o;
},{"tubular-common":"QwmZ"}],"0yRV":[function(require,module,exports) {
-"use strict";var e=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var r={};if(null!=e)for(var t in e)Object.hasOwnProperty.call(e,t)&&(r[t]=e[t]);return r.default=e,r},r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(exports,"__esModule",{value:!0});var t=e(require("react")),o=require("../../src"),u=require("../../src/Storage"),i=r(require("../utils/columns"));exports.default=function(e){var r=e.toolbarOptions,a=e.storage,n=void 0===a?new u.LocalStorage:a,s=e.gridColumns,l=void 0===s?i.default:s,d=e.deps,c=void 0===d?[]:d,f=e.onRowClick,p=void 0===f?function(){return null}:f;return t.createElement(o.DataGrid,{columns:l,dataSource:"https://tubular.azurewebsites.net/api/orders/paged",gridName:"Tubular Grid",toolbarOptions:r,storage:n,deps:c,onRowClick:p})};
-},{"react":"1n8/","../../src":"+fUd","../../src/Storage":"DIVM","../utils/columns":"jRiX"}],"JVGr":[function(require,module,exports) {
+"use strict";var e=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var r={};if(null!=e)for(var t in e)Object.hasOwnProperty.call(e,t)&&(r[t]=e[t]);return r.default=e,r},r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(exports,"__esModule",{value:!0});var t=e(require("react")),o=require("tubular-common"),u=require("../../src"),i=r(require("../utils/columns"));exports.default=function(e){var r=e.toolbarOptions,a=e.storage,n=void 0===a?new o.LocalStorage:a,l=e.gridColumns,s=void 0===l?i.default:l,d=e.deps,c=void 0===d?[]:d,f=e.onRowClick,p=void 0===f?function(){return null}:f;return t.createElement(u.DataGrid,{columns:s,dataSource:"https://tubular.azurewebsites.net/api/orders/paged",gridName:"Tubular Grid",toolbarOptions:r,storage:n,deps:c,onRowClick:p})};
+},{"react":"1n8/","tubular-common":"QwmZ","../../src":"+fUd","../utils/columns":"jRiX"}],"JVGr":[function(require,module,exports) {
"use strict";var e=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},t=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t};Object.defineProperty(exports,"__esModule",{value:!0});var r=e(require("@material-ui/core/Collapse")),i=e(require("@material-ui/core/IconButton")),a=e(require("@material-ui/core/Paper")),o=e(require("@material-ui/core/Tooltip")),l=e(require("@material-ui/core/Typography")),n=e(require("@material-ui/icons/Code")),u=e(require("@material-ui/styles/makeStyles"));require("highlight.js/styles/an-old-hope.css");var c=t(require("react")),d=e(require("react-highlight")),s=require("uno-react"),p=e(require("./CustomizableGrid")),m=u.default({activeIcon:{background:"#165FFB",color:"#fff",height:"40px",marginLeft:"auto",padding:"0px",width:"40px"},code:{fontSize:15},description:{marginBottom:"20px"},icon:{color:"#000",height:"40px",marginLeft:"auto",padding:"0px",width:"40px"},row:{display:"flex",flexDirection:"row",paddingTop:"80px"}});exports.default=function(e){var t=e.data,u=m({});return c.createElement("div",{id:t.id},c.createElement("div",{className:u.row},c.createElement(l.default,{variant:"h5"},s.humanize(t.id)),c.createElement(o.default,{title:t.open?"Hide Code":"View Code"},c.createElement(i.default,{className:t.open?u.activeIcon:u.icon,onClick:t.toggle},c.createElement(n.default,null)))),c.createElement(l.default,{variant:"h6",className:u.description},t.description),c.createElement(r.default,{in:t.open,timeout:"auto"},c.createElement(a.default,null,c.createElement(d.default,{language:"javascript",className:u.code},t.code))),c.createElement(p.default,{toolbarOptions:t.options,gridColumns:t.columns,deps:[t.refresh],onRowClick:t.onRowClick}))};
},{"@material-ui/core/Collapse":"2uPh","@material-ui/core/IconButton":"e+0N","@material-ui/core/Paper":"76mt","@material-ui/core/Tooltip":"FW+n","@material-ui/core/Typography":"/pi2","@material-ui/icons/Code":"vRtn","@material-ui/styles/makeStyles":"o/Hu","highlight.js/styles/an-old-hope.css":"W7b0","react":"1n8/","react-highlight":"Xqwm","uno-react":"3aGf","./CustomizableGrid":"0yRV"}],"NKXr":[function(require,module,exports) {
"use strict";var e=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var r=e(require("react")),t=e(require("./utils/createSvgIcon")),u=(0,t.default)(r.default.createElement("path",{d:"M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z"}),"Add");exports.default=u;
@@ -1055,7 +1053,7 @@ var r,e;module.exports=require("./factoryWithThrowingShims")();
},{"@material-ui/core/Paper":"76mt","@material-ui/core/Table":"Amxx","@material-ui/core/TableBody":"0cmi","@material-ui/core/TableCell":"lprt","@material-ui/core/TableHead":"BYgd","@material-ui/core/TableRow":"kIQr","@material-ui/Styles/makeStyles":"6Oq4","react":"1n8/"}],"xpDp":[function(require,module,exports) {
"use strict";var e=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},a=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var a={};if(null!=e)for(var t in e)Object.hasOwnProperty.call(e,t)&&(a[t]=e[t]);return a.default=e,a};Object.defineProperty(exports,"__esModule",{value:!0});var t=e(require("@material-ui/core/Button")),r=e(require("@material-ui/core/Divider")),l=e(require("@material-ui/core/Grid")),n=e(require("@material-ui/core/Paper")),o=e(require("@material-ui/core/Typography")),c=e(require("@material-ui/Styles/makeStyles")),d=a(require("react")),i=e(require("react-highlight")),s=e(require("../../components/ColumnModelTable")),m=e(require("../../components/DataGridProps")),u=e(require("../../components/DataGridProviderProps")),p=e(require("../../components/DataGridTableProps")),f=e(require("../../components/ToolBarOptionsProps")),h=c.default({codeTag:{background:"#F8F8FF",padding:"6px"},container:{margin:"0",padding:30,width:"100%"},paper:{padding:10}}),E='... \nconst MyComponent = () => {\n return (\n \n \n
\n );\n};\n\n\n/*\n Use the component withRemoteDataSource to wrap your component\n and columns definition among the data obtained from the URL.\n\n withRemoteDataSource will set an initial context for your grid.\n*/\nexport default withRemoteDataSource(BasicFeatures, columns, "https://tubular.azurewebsites.net/api/orders/paged");\n',b='... \nconst MyComponent = () => {\n return (\n \n \n
\n );\n};\n\n\nexport default withRemoteDataSource(BasicFeatures, columns, localData)',g="https://github.com/unosquare/tubular-react/blob/master/sample/src/data/localData.ts";exports.default=function(){var e=h({});return d.createElement(l.default,{container:!0,className:e.container},d.createElement(l.default,{item:!0,xs:12},d.createElement(n.default,{className:e.paper,style:{overflowX:"auto"}},d.createElement(o.default,{variant:"h4",paragraph:!0}," Column Model "),d.createElement(r.default,null),d.createElement(s.default,null))),d.createElement(l.default,{item:!0,xs:12},d.createElement(n.default,{className:e.paper},d.createElement(o.default,{variant:"h4",paragraph:!0},"DataGrid props"),d.createElement(r.default,null),d.createElement("br",null),d.createElement(o.default,{variant:"subtitle1"},"It's important to use ",d.createElement("code",{className:e.codeTag},"withRemoteDataSource")," or",d.createElement("code",{className:e.codeTag},"withLocalDataSource")," according to the case to fill the ",d.createElement("code",{className:e.codeTag}," ")," component with the data.",d.createElement("br",null),"These are all the available props (and their default values) for the",d.createElement("code",{className:e.codeTag}," ")," component."),d.createElement(m.default,null),d.createElement("br",null),d.createElement(o.default,{variant:"subtitle1"},d.createElement("i",null,"If you don't define some of the optional props described above, these will not be shown. In the case of "),d.createElement("code",{className:e.codeTag},"bodyRenderer"),",",d.createElement("i",null,"the grid will display its default body; if the",d.createElement("code",{className:e.codeTag},"footerRenderer"),"is not defined, the footer will not be displayed.")))),d.createElement(l.default,{item:!0,xs:12},d.createElement(n.default,{className:e.paper},d.createElement(o.default,{variant:"h4",paragraph:!0},"DataGridProvider props"),d.createElement(r.default,null),d.createElement("br",null),d.createElement(o.default,{variant:"subtitle1"},"Use this component with ",d.createElement("code",{className:e.codeTag}," ")," to use a custom layout in your grid. It's important to use ",d.createElement("code",{className:e.codeTag},"withRemoteDataSource")," or ",d.createElement("code",{className:e.codeTag},"withLocalDataSource"),"according to the case to fill the ",d.createElement("code",{className:e.codeTag}," "),"component with the data.",d.createElement("br",null),"These are all the available props (and their default values) for the",d.createElement("code",{className:e.codeTag}," ")," component."),d.createElement(u.default,null),d.createElement("br",null),d.createElement(o.default,{variant:"subtitle1"},d.createElement("i",null,"If you don't define some of the optional props described above, these will not be shown.")))),d.createElement(l.default,{item:!0,xs:12},d.createElement(n.default,{className:e.paper},d.createElement(o.default,{variant:"h4",paragraph:!0},"DataGridTable props"),d.createElement(r.default,null),d.createElement("br",null),d.createElement(o.default,{variant:"subtitle1"},"These are all the available props (and their default values) for the",d.createElement("code",{className:e.codeTag}," ")," component."),d.createElement(p.default,null),d.createElement("br",null),d.createElement(o.default,{variant:"subtitle1"},d.createElement("i",null,"If you don't define some of the optional props described above, these will not be shown. In the case of "),d.createElement("code",{className:e.codeTag},"bodyRenderer"),",",d.createElement("i",null,"the grid will display its default body; if the",d.createElement("code",{className:e.codeTag},"footerRenderer"),"is not defined, the footer will not be displayed.")))),d.createElement(l.default,{item:!0,xs:12},d.createElement(n.default,{className:e.paper},d.createElement(o.default,{variant:"h4",paragraph:!0},"Data Source"),d.createElement(r.default,null),d.createElement("br",null),d.createElement(o.default,{variant:"subtitle1"},d.createElement("code",{className:e.codeTag}," ")," requires a wrapper component to retrieve data. Depends on if we use a local data source or a remote data source, these wrappers are:",d.createElement("code",{className:e.codeTag},"withRemoteDataSource"),"component or the",d.createElement("code",{className:e.codeTag},"withLocalDataSource"),"component, which deals with data retrieval on the",d.createElement("code",{className:e.codeTag},"DataGrid")," component.",d.createElement("br",null),d.createElement("br",null),d.createElement(o.default,{variant:"h5",gutterBottom:!0},d.createElement("code",{className:e.codeTag},"withRemoteDataSource")),d.createElement("code",{className:e.codeTag},"withRemoteDataSource"),"needs our ",d.createElement("code",{className:e.codeTag},"DataGrid"),"component, a ",d.createElement("code",{className:e.codeTag},"ColumnModel"),"array and a ",d.createElement("code",{className:e.codeTag},"URL")," which represent a service.",d.createElement("br",null),d.createElement(i.default,{language:"javascript",className:"an-old-hope"},E),d.createElement("br",null),d.createElement(o.default,{variant:"h5",gutterBottom:!0},d.createElement("code",{className:e.codeTag},"LocalDataSource")),d.createElement("code",{className:e.codeTag},"withLocalDataSource"),"needs our ",d.createElement("code",{className:e.codeTag},"DataGrid"),"component, a ",d.createElement("code",{className:e.codeTag},"ColumnModel"),"array and an ",d.createElement("code",{className:e.codeTag},"Array"),"of objects.",d.createElement("br",null),d.createElement(i.default,{language:"javascript",className:"an-old-hope"},b),"See this",d.createElement(t.default,{color:"primary",href:g,target:"_blank"},"example"),"of how to define the array of objects."))),d.createElement(l.default,{item:!0,xs:12},d.createElement(n.default,{className:e.paper},d.createElement(o.default,{variant:"h4",paragraph:!0},"Toolbar options"),d.createElement(r.default,null),d.createElement("br",null),d.createElement(o.default,{variant:"subtitle1"},"If you need to personalize the grid adding, removing or modifying features, ",d.createElement("code",{className:e.codeTag},"ToolBarOptions Class"),"provides several options."),d.createElement(f.default,null),d.createElement("br",null),d.createElement(o.default,{variant:"subtitle1"},d.createElement("i",null,"If you don't define some of the optional props described above, these will set with the default values.")))))};
},{"@material-ui/core/Button":"uzLy","@material-ui/core/Divider":"pRXd","@material-ui/core/Grid":"5xZh","@material-ui/core/Paper":"76mt","@material-ui/core/Typography":"/pi2","@material-ui/Styles/makeStyles":"6Oq4","react":"1n8/","react-highlight":"Xqwm","../../components/ColumnModelTable":"AkVR","../../components/DataGridProps":"WKKG","../../components/DataGridProviderProps":"3CKT","../../components/DataGridTableProps":"ejjh","../../components/ToolBarOptionsProps":"AtZZ"}],"Gxw2":[function(require,module,exports) {
-"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.quickStart="import React from 'react';\nimport ReactDOM from 'react-dom';\n\nimport DataGrid, { withRemoteDataSource } from 'tubular-react';\nimport { ColumnModel } from 'tubular-common';\nimport { IconButton, Tooltip } from '@material-ui/core';\n\nconst columns = [\n new ColumnModel('OrderID'),\n new ColumnModel('CustomerName'),\n new ColumnModel('ShipperCity')\n];\n\nconst SampleGrid = withRemoteDataSource(\n () => {\n return (\n \n );\n },\n columns,\n 'https://tubular.azurewebsites.net/api/orders/paged'\n);\n\nReactDOM.render( , document.getElementById('root'));",exports.buttonFeatures="import * as React from 'react';\nimport IconButton from '@material-ui/core/IconButton';\nimport Brightness7Rounded from '@material-ui/icons/Brightness7Rounded';\nimport Mood from '@material-ui/icons/Mood';\n\nimport { DataGridProvider, DataGridTable, ToolbarOptions, withRemoteDataSource, renderDateTimeCell } from 'tubular-react';\n\nimport { AggregateFunctions, ColumnDataType, ColumnModel, ColumnSortDirection } from 'tubular-common';\n\n// First of all, you must define your columns model.\nconst columns = [\n new ColumnModel('OrderID',\n {\n DataType: ColumnDataType.NUMERIC,\n Filterable: true,\n IsKey: true,\n Label: 'ID',\n SortDirection: ColumnSortDirection.ASCENDING,\n SortOrder: 1,\n Sortable: true\n }\n ),\n new ColumnModel('CustomerName',\n {\n Aggregate: AggregateFunctions.COUNT,\n Filterable: true,\n Searchable: true,\n Sortable: true\n }\n ),\n new ColumnModel('ShippedDate',\n {\n DataType: ColumnDataType.DATE_TIME,\n Filterable: true,\n Sortable: true\n }\n ),\n new ColumnModel('ShipperCity'),\n new ColumnModel('Amount',\n {\n DataType: ColumnDataType.NUMERIC,\n Sortable: true\n }\n ),\n new ColumnModel('IsShipped',\n {\n DataType: ColumnDataType.BOOLEAN,\n Filterable: true,\n Sortable: true\n }\n )\n];\nconst MyComponent = () => {\n (\n \n {row.OrderID} \n {row.CustomerName} \n \n {renderDateTimeCell(row.ShippedDate, 'MMMM Do yyyy, h:mm:ss a')}\n \n {row.ShipperCity} \n \n {row.Amount || 0}\n \n \n {row.IsShipped ? : }\n \n \n )}\n footerRenderer={(aggregates: any) => (\n \n Total: \n {aggregates && aggregates.CustomerName} \n \n \n \n \n )}\n gridName='SampleButtons'\n >\n \n alert('I can help you to add features to your datagrid.')}>\n \n \n alert('Happy codes, have a nice day')}>\n \n \n \n \n};\n\n/*\n Use the component withRemoteDataSource to wrap your component\n and columns definition among the data obtained from the URL.\n\n withRemoteDataSource will set an initial context for your grid.\n*/\nexport default withRemoteDataSource(MyComponent, columns, 'http://tubular.azurewebsites.net/api/orders/paged');",exports.simpleFeatures="import React from 'react';\nimport { Snackbar, TableCell, TableRow } from '@material-ui/core';\nimport CheckBox from '@material-ui/icons/CheckBox';\nimport CheckBoxOutlineBlank from '@material-ui/icons/CheckBoxOutlineBlank';\nimport { DataGridProvider, DataGridTable, ToolbarOptions, withRemoteDataSource, renderDateTimeCell } from 'tubular-react';\n\nimport {\n AggregateFunctions,\n ColumnDataType,\n ColumnModel,\n ColumnSortDirection\n} from 'tubular-common';\n\nconst columns = [\n new ColumnModel('OrderID', {\n DataType: ColumnDataType.NUMERIC,\n Filterable: true,\n IsKey: true,\n Label: 'ID',\n SortDirection: ColumnSortDirection.ASCENDING,\n SortOrder: 1,\n Sortable: true\n }),\n new ColumnModel('CustomerName', {\n Aggregate: AggregateFunctions.COUNT,\n Filterable: true,\n Searchable: true,\n Sortable: true\n }),\n new ColumnModel('ShippedDate', {\n DataType: ColumnDataType.DATE_TIME,\n Filterable: true,\n Sortable: true\n }),\n new ColumnModel('ShipperCity'),\n new ColumnModel('Amount', {\n DataType: ColumnDataType.NUMERIC,\n Sortable: true\n }),\n new ColumnModel('IsShipped', {\n DataType: ColumnDataType.BOOLEAN,\n Filterable: true,\n Sortable: true\n })\n];\n\nclass SampleFeatures extends React.Component {\n state = {\n errorMessage: null\n };\n\n componentWillReceiveProps(nextProps: any) {\n this.setState({ errorMessage: nextProps.error });\n }\n\n render() {\n const { errorMessage } = this.state;\n\n return (\n \n {errorMessage && (\n
{errorMessage}}\n />\n )}\n \n \n \n \n {row.OrderID}\n \n \n {row.CustomerName}\n \n \n {renderDateTimeCell(row.ShippedDate, 'MMMM Do yyyy, h:mm:ss a')}\n \n \n {row.ShipperCity}\n \n \n {row.Amount || 0}\n \n \n {row.IsShipped ? \n : }\n \n \n }\n footerRenderer={\n (aggregates: any) =>\n \n Total: \n {aggregates && aggregates.CustomerName} \n \n \n \n \n }\n />\n \n );\n }\n}\n\nexport default withRemoteDataSource(\n SampleFeatures,\n columns,\n 'https://tubular.azurewebsites.net/api/orders/paged'\n);",exports.gridList="import React from 'react';\nimport ReactDOM from 'react-dom';\nimport { Card, CardActions, CardContent } from '@material-ui/core';\nimport { GridList, GridListTile, Typography } from '@material-ui/core';\nimport Button from '@material-ui/core/Button';\nimport {\n Table,\n TableBody,\n TableCell,\n TableFooter,\n TableRow\n} from '@material-ui/core';\nimport LinearProgress from '@material-ui/core/LinearProgress';\nimport Paper from '@material-ui/core/Paper';\nimport format from 'date-fns/format';\nimport parseISO from 'date-fns/parseISO';\nimport import {\n DataSourceContext,\n DataGridProvider,\n ToolbarOptions,\n Paginator,\n SearchTextInput,\n withRemoteDataSource,\n renderDateTimeCell,\n} from 'tubular-react';\nimport {\n AggregateFunctions,\n ColumnDataType,\n ColumnModel,\n ColumnSortDirection\n} from 'tubular-common';\n\nconst columns = [\n new ColumnModel('OrderID', {\n DataType: ColumnDataType.NUMERIC,\n Filterable: true,\n IsKey: true,\n Label: 'ID',\n SortDirection: ColumnSortDirection.ASCENDING,\n SortOrder: 1,\n Sortable: true\n }),\n new ColumnModel('CustomerName', {\n Aggregate: AggregateFunctions.COUNT,\n Filterable: true,\n Searchable: true,\n Sortable: true\n }),\n new ColumnModel('ShippedDate', {\n DataType: ColumnDataType.DATE_TIME,\n Filterable: true,\n Sortable: true\n }),\n new ColumnModel('ShipperCity'),\n new ColumnModel('Amount', {\n DataType: ColumnDataType.NUMERIC,\n Sortable: true\n }),\n new ColumnModel('IsShipped', {\n DataType: ColumnDataType.BOOLEAN,\n Filterable: true,\n Sortable: true\n })\n];\n\nconst styles: any = {\n progress: {\n height: '20px'\n },\n search: {\n margin: '15px 10px 10px 10px',\n textAlign: 'right'\n }\n};\n\nclass SampleGridList extends React.Component {\n state = { errorMessage: null };\n\n\n static getDerivedStateFromProps(\n props: IDataGridProps,\n state: IDataGridState\n ) {\n if (props.error !== state.errorMessage) {\n return { errorMessage: props.error };\n }\n return null;\n }\n\n render() {\n return (\n \n {({ state }) => (\n \n \n \n \n
\n \n {state.isLoading && }\n
\n \n \n \n \n \n {state.data.map((item) => (\n \n \n \n \n {item.OrderID} - {item.CustomerName}\n \n \n {item.ShipperCity}\n \n \n {renderDateTimeCell(item.ShippedDate, 'MMM d yyyy')}\n \n \n \n \n Learn More\n \n \n \n \n ))}\n \n \n \n \n \n \n \n \n \n
\n \n \n )}\n \n );\n }\n}\n\nexport default withRemoteDataSource(\n SampleGridList,\n columns,\n 'https://tubular.azurewebsites.net/api/orders/paged'\n);";
+"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.quickStart="import React from 'react';\nimport ReactDOM from 'react-dom';\n\nimport DataGrid, { withRemoteDataSource } from 'tubular-react';\nimport { ColumnModel } from 'tubular-common';\nimport { IconButton, Tooltip } from '@material-ui/core';\n\nconst columns = [\n new ColumnModel('OrderID'),\n new ColumnModel('CustomerName'),\n new ColumnModel('ShipperCity')\n];\n\nconst SampleGrid = withRemoteDataSource(\n () => {\n return (\n \n );\n },\n columns,\n 'https://tubular.azurewebsites.net/api/orders/paged'\n);\n\nReactDOM.render( , document.getElementById('root'));",exports.buttonFeatures="import * as React from 'react';\nimport IconButton from '@material-ui/core/IconButton';\nimport Brightness7Rounded from '@material-ui/icons/Brightness7Rounded';\nimport Mood from '@material-ui/icons/Mood';\n\nimport { DataGridProvider, DataGridTable, ToolbarOptions, withRemoteDataSource } from 'tubular-react';\n\nimport { AggregateFunctions, ColumnDataType, ColumnModel, ColumnSortDirection, formatDate } from 'tubular-common';\n\n// First of all, you must define your columns model.\nconst columns = [\n new ColumnModel('OrderID',\n {\n DataType: ColumnDataType.NUMERIC,\n Filterable: true,\n IsKey: true,\n Label: 'ID',\n SortDirection: ColumnSortDirection.ASCENDING,\n SortOrder: 1,\n Sortable: true\n }\n ),\n new ColumnModel('CustomerName',\n {\n Aggregate: AggregateFunctions.COUNT,\n Filterable: true,\n Searchable: true,\n Sortable: true\n }\n ),\n new ColumnModel('ShippedDate',\n {\n DataType: ColumnDataType.DATE_TIME,\n Filterable: true,\n Sortable: true\n }\n ),\n new ColumnModel('ShipperCity'),\n new ColumnModel('Amount',\n {\n DataType: ColumnDataType.NUMERIC,\n Sortable: true\n }\n ),\n new ColumnModel('IsShipped',\n {\n DataType: ColumnDataType.BOOLEAN,\n Filterable: true,\n Sortable: true\n }\n )\n];\nconst MyComponent = () => {\n (\n \n {row.OrderID} \n {row.CustomerName} \n \n {formatDate(row.ShippedDate, 'MMMM Do yyyy, h:mm:ss a')}\n \n {row.ShipperCity} \n \n {row.Amount || 0}\n \n \n {row.IsShipped ? : }\n \n \n )}\n footerRenderer={(aggregates: any) => (\n \n Total: \n {aggregates && aggregates.CustomerName} \n \n \n \n \n )}\n gridName='SampleButtons'\n >\n \n alert('I can help you to add features to your datagrid.')}>\n \n \n alert('Happy codes, have a nice day')}>\n \n \n \n \n};\n\n/*\n Use the component withRemoteDataSource to wrap your component\n and columns definition among the data obtained from the URL.\n\n withRemoteDataSource will set an initial context for your grid.\n*/\nexport default withRemoteDataSource(MyComponent, columns, 'http://tubular.azurewebsites.net/api/orders/paged');",exports.simpleFeatures="import React from 'react';\nimport { Snackbar, TableCell, TableRow } from '@material-ui/core';\nimport CheckBox from '@material-ui/icons/CheckBox';\nimport CheckBoxOutlineBlank from '@material-ui/icons/CheckBoxOutlineBlank';\nimport { DataGridProvider, DataGridTable, ToolbarOptions, withRemoteDataSource, formatDate } from 'tubular-react';\n\nimport {\n AggregateFunctions,\n ColumnDataType,\n ColumnModel,\n ColumnSortDirection\n} from 'tubular-common';\n\nconst columns = [\n new ColumnModel('OrderID', {\n DataType: ColumnDataType.NUMERIC,\n Filterable: true,\n IsKey: true,\n Label: 'ID',\n SortDirection: ColumnSortDirection.ASCENDING,\n SortOrder: 1,\n Sortable: true\n }),\n new ColumnModel('CustomerName', {\n Aggregate: AggregateFunctions.COUNT,\n Filterable: true,\n Searchable: true,\n Sortable: true\n }),\n new ColumnModel('ShippedDate', {\n DataType: ColumnDataType.DATE_TIME,\n Filterable: true,\n Sortable: true\n }),\n new ColumnModel('ShipperCity'),\n new ColumnModel('Amount', {\n DataType: ColumnDataType.NUMERIC,\n Sortable: true\n }),\n new ColumnModel('IsShipped', {\n DataType: ColumnDataType.BOOLEAN,\n Filterable: true,\n Sortable: true\n })\n];\n\nclass SampleFeatures extends React.Component {\n state = {\n errorMessage: null\n };\n\n componentWillReceiveProps(nextProps: any) {\n this.setState({ errorMessage: nextProps.error });\n }\n\n render() {\n const { errorMessage } = this.state;\n\n return (\n \n {errorMessage && (\n
{errorMessage}}\n />\n )}\n \n \n \n \n {row.OrderID}\n \n \n {row.CustomerName}\n \n \n {formatDate(row.ShippedDate, 'MMMM Do yyyy, h:mm:ss a')}\n \n \n {row.ShipperCity}\n \n \n {row.Amount || 0}\n \n \n {row.IsShipped ? \n : }\n \n \n }\n footerRenderer={\n (aggregates: any) =>\n \n Total: \n {aggregates && aggregates.CustomerName} \n \n \n \n \n }\n />\n \n );\n }\n}\n\nexport default withRemoteDataSource(\n SampleFeatures,\n columns,\n 'https://tubular.azurewebsites.net/api/orders/paged'\n);",exports.gridList="import React from 'react';\nimport ReactDOM from 'react-dom';\nimport { Card, CardActions, CardContent } from '@material-ui/core';\nimport { GridList, GridListTile, Typography } from '@material-ui/core';\nimport Button from '@material-ui/core/Button';\nimport {\n Table,\n TableBody,\n TableCell,\n TableFooter,\n TableRow\n} from '@material-ui/core';\nimport LinearProgress from '@material-ui/core/LinearProgress';\nimport Paper from '@material-ui/core/Paper';\nimport import {\n DataSourceContext,\n DataGridProvider,\n ToolbarOptions,\n Paginator,\n SearchTextInput,\n withRemoteDataSource,\n} from 'tubular-react';\nimport {\n AggregateFunctions,\n ColumnDataType,\n ColumnModel,\n ColumnSortDirection,\n formatDate\n} from 'tubular-common';\n\nconst columns = [\n new ColumnModel('OrderID', {\n DataType: ColumnDataType.NUMERIC,\n Filterable: true,\n IsKey: true,\n Label: 'ID',\n SortDirection: ColumnSortDirection.ASCENDING,\n SortOrder: 1,\n Sortable: true\n }),\n new ColumnModel('CustomerName', {\n Aggregate: AggregateFunctions.COUNT,\n Filterable: true,\n Searchable: true,\n Sortable: true\n }),\n new ColumnModel('ShippedDate', {\n DataType: ColumnDataType.DATE_TIME,\n Filterable: true,\n Sortable: true\n }),\n new ColumnModel('ShipperCity'),\n new ColumnModel('Amount', {\n DataType: ColumnDataType.NUMERIC,\n Sortable: true\n }),\n new ColumnModel('IsShipped', {\n DataType: ColumnDataType.BOOLEAN,\n Filterable: true,\n Sortable: true\n })\n];\n\nconst styles: any = {\n progress: {\n height: '20px'\n },\n search: {\n margin: '15px 10px 10px 10px',\n textAlign: 'right'\n }\n};\n\nclass SampleGridList extends React.Component {\n state = { errorMessage: null };\n\n\n static getDerivedStateFromProps(\n props: IDataGridProps,\n state: IDataGridState\n ) {\n if (props.error !== state.errorMessage) {\n return { errorMessage: props.error };\n }\n return null;\n }\n\n render() {\n return (\n \n {({ state }) => (\n \n \n \n \n
\n \n {state.isLoading && }\n
\n \n \n \n \n \n {state.data.map((item) => (\n \n \n \n \n {item.OrderID} - {item.CustomerName}\n \n \n {item.ShipperCity}\n \n \n {formatDate(item.ShippedDate, 'MMM d yyyy')}\n \n \n \n \n Learn More\n \n \n \n \n ))}\n \n \n \n \n \n \n \n \n \n
\n \n \n )}\n \n );\n }\n}\n\nexport default withRemoteDataSource(\n SampleGridList,\n columns,\n 'https://tubular.azurewebsites.net/api/orders/paged'\n);";
},{}],"9PWw":[function(require,module,exports) {
"use strict";var e=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},a=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var a={};if(null!=e)for(var t in e)Object.hasOwnProperty.call(e,t)&&(a[t]=e[t]);return a.default=e,a};Object.defineProperty(exports,"__esModule",{value:!0});var t=e(require("@material-ui/core/Divider")),r=e(require("@material-ui/core/Grid")),l=e(require("@material-ui/core/Paper")),n=e(require("@material-ui/core/Table")),u=e(require("@material-ui/core/TableBody")),i=e(require("@material-ui/core/TableCell")),o=e(require("@material-ui/core/TableHead")),c=e(require("@material-ui/core/TableRow")),s=e(require("@material-ui/core/Typography")),m=e(require("@material-ui/styles/makeStyles")),d=a(require("react")),p=e(require("react-highlight")),f=require("../../utils/codeSnipetExamples"),h=m.default({code:{fontSize:15},codeTag:{background:"#F8F8FF",padding:"6px"},container:{margin:"0",padding:30,width:"100%"},content:{marginTop:10},image:{marginLeft:"25%",maxWidth:300},link:{color:"#165ffb",textDecoration:"none"},paper:{minHeight:"300px",padding:30},paperSmall:{minHeight:"115px",padding:30}}),b=0;function g(e,a,t,r,l){return{id:b+=1,name:e,type:a,language:t,description:r,url:l}}var E=[g("Tubular for AngularJS (formerly Tubular)","Library","AngularJs","Tubular provides a set of directives and services using AngularJS as framework.","https://github.com/unosquare/tubular"),g("Tubular for Angular6 (formerly Tubular2)","Library","Angular6","New Tubular2 with Angular6 (Angular2) and Angular Material 2.","https://github.com/unosquare/tubular2"),g("Tubular Common","Library","Javascript/Typescript","Tubular Common provides TypeScript and Javascript models and data transformer to use any Tubular DataGrid component with an array of Javascript objects.","https://github.com/unosquare/tubular-common"),g("Tubular Dotnet","Backend library","C#/.NET Core","Tubular provides .NET Framework and .NET Core Library to create REST service to use with Tubular Angular Components easily with any WebApi library (ASP.NET Web API for example).","https://github.com/unosquare/tubular-dotnet"),g("Tubular Nodejs","Backend Library","\tJavascript","Tubular Node.js provides an easy way to integrate Tubular Angular Components easily with any Node.js WebApi library.","https://github.com/unosquare/tubular-nodejs"),g("Tubular Boilerplate C#","Boilerplate\t","C#","Tubular Directives Boilerplate (includes AngularJS and Bootstrap).","https://github.com/unosquare/tubular-boilerplate-csharp"),g("Tubular Boilerplate","Boilerplate","Javascript/AngularJS","Tubular Directives Boilerplate (includes AngularJS and Bootstrap).","https://github.com/unosquare/tubular-boilerplate"),g("Tubular ASP.NET Core 2.0 Boilerplate","Boilerplate","C#/.NET Core","Tubular Directives Boilerplate (includes AngularJS and Bootstrap).","https://github.com/unosquare/tubular-aspnet-core-boilerplate")];exports.default=function(){var e=h({});return d.createElement(r.default,{container:!0,className:e.container},d.createElement(l.default,{className:e.paper},d.createElement("img",{src:"https://unosquare.github.io/tubular-react/static/tubularRed.png"}),d.createElement(t.default,null),d.createElement(s.default,{paragraph:!0,variant:"subtitle1",className:e.content},"Tubular React is a set of ReactJS components designed to rapidly build modern web applications. The centerpiece of Tubular is its fully templated grid with lots of features such as server-side pagination, searching text, multi-column sorting, and Filterable, built-in export to CSV or been printed. Another very styled and useful component is the grid list that renders a set of cards with the general information allowing good data visualization and quickly searching, besides it has almost the same grid functionalities."),d.createElement("br",null),d.createElement(s.default,{variant:"h4"},"Features"),d.createElement(t.default,null),d.createElement(s.default,{paragraph:!0,variant:"subtitle1",className:e.content},d.createElement(s.default,{variant:"h5"},"The main component is a ",d.createElement("em",null,"grid")," with multiple options:"),d.createElement("ul",null,d.createElement("li",null,"Define a custom layout for columns and cells using render methods."),d.createElement("li",null,"Use a remote or local datasource. Remote datasource use a specific Request and Response format."),d.createElement("li",null,"Sort and filter multiple columns."),d.createElement("li",null,"Free-text search of string columns."),d.createElement("li",null,"Page data. Remote data is paged in the server side."),d.createElement("li",null,"Export data to a CSV file."),d.createElement("li",null,"Print data.")),d.createElement("br",null),"The ",d.createElement("em",null,"grid")," component offers all you can look for an easy grid table and more.",d.createElement("br",null),d.createElement("br",null),d.createElement(s.default,{variant:"h5"},d.createElement("em",null,"Grid list")," component allows you to perform some of the same options as:"),d.createElement("ul",null,d.createElement("li",null,"Define a custom layout for columns and cells."),d.createElement("li",null,"Use a remote or local datasource."),d.createElement("li",null,"Free-text search of string columns."),d.createElement("li",null,"Page data. Remote data is paged in the server side.")),d.createElement("br",null),"The ",d.createElement("em",null,"grid list")," component represents another option to show your data.",d.createElement("br",null),d.createElement("em",null,"Grid list")," provide a styled and fancy view over your data, which helps you to quickly find information.",d.createElement("br",null)),d.createElement(s.default,{variant:"h4"},"Installation"),d.createElement(t.default,null),d.createElement(s.default,{variant:"subtitle1",paragraph:!0},"Tubular-React is available as a",d.createElement("a",{href:"https://www.npmjs.com/package/tubular-react",target:"_blank",className:e.link},"npm package")),d.createElement(s.default,{variant:"h5",paragraph:!0},"Dependencies"),d.createElement(s.default,{variant:"body1",paragraph:!0},d.createElement("ul",null,d.createElement("li",null,d.createElement("a",{href:"https://date-fns.org/",className:e.link},"date-fns - Version: 1.29.0")),d.createElement("li",null,d.createElement("a",{href:"https://material-ui.com/",className:e.link},"Material-UI - Version: 3.1.0")),d.createElement("li",null,d.createElement("a",{href:"https://reactjs.org/",className:e.link},"React - Version: 16.5.1")),d.createElement("li",null,d.createElement("a",{href:"https://github.com/unosquare/tubular-common",className:e.link},"Tubular Common - Version: 1.2.1")))),d.createElement(s.default,{variant:"h5",paragraph:!0},"npm"),d.createElement(s.default,{variant:"body1",paragraph:!0},"To install and save in your ",d.createElement("code",{className:e.codeTag},"package.json")," dependencies, run:"),d.createElement(p.default,{language:"javascript",className:e.code},"npm install tubular-react --save"),d.createElement("br",null),d.createElement(s.default,{variant:"h4"},"Usage"),d.createElement(t.default,null),d.createElement(s.default,{variant:"subtitle1",paragraph:!0},"Tubular React is an extension of Material-UI which offers until now a couple of useful components:",d.createElement("br",null),d.createElement("code",{className:e.codeTag}," ")," and",d.createElement("code",{className:e.codeTag}," "),".",d.createElement("br",null),"These components supply an organized and nice way to represent your data, you can populate them from a server-side data source or a local data source as an array."),d.createElement(s.default,{variant:"h5",paragraph:!0},"Quick Start"),d.createElement(s.default,{variant:"body1",paragraph:!0},"Here is a quick example with all basic features to get you started:"),d.createElement(p.default,{language:"javascript",className:e.code},f.basicFeatures),d.createElement(s.default,{variant:"h5",paragraph:!0},"Extend Grid Functionalities"),d.createElement(s.default,{variant:"subtitle1",paragraph:!0},"You can add functionalities to the `DataGrid`, including extra buttons that can perform an action according to your requirements. You just need to include the IconButton Component from @material-ui and define the icon or button that you need between `DataGrid` tags and specify the action to perform.",d.createElement("br",null),d.createElement(p.default,{language:"javascript",className:e.code},"\nconst MyComponent = () => {\n\n \n \n alert('Happy codes, have a nice day')}\n />\n \n \n};\n ")),d.createElement("br",null),d.createElement(s.default,{variant:"h4"},"Related projects"),d.createElement(t.default,null),d.createElement(n.default,{className:e.table},d.createElement(o.default,null,d.createElement(c.default,null,d.createElement(i.default,null,"Name"),d.createElement(i.default,null,"Type"),d.createElement(i.default,null,"Language/Tech"),d.createElement(i.default,null,"Description"))),d.createElement(u.default,null,E.map(function(a){return d.createElement(c.default,{key:a.id},d.createElement(i.default,null,d.createElement("a",{href:a.url,className:e.link},a.name)),d.createElement(i.default,null,a.type),d.createElement(i.default,null,a.language),d.createElement(i.default,null,a.description))})))))};
},{"@material-ui/core/Divider":"pRXd","@material-ui/core/Grid":"5xZh","@material-ui/core/Paper":"76mt","@material-ui/core/Table":"Amxx","@material-ui/core/TableBody":"0cmi","@material-ui/core/TableCell":"lprt","@material-ui/core/TableHead":"BYgd","@material-ui/core/TableRow":"kIQr","@material-ui/core/Typography":"/pi2","@material-ui/styles/makeStyles":"o/Hu","react":"1n8/","react-highlight":"Xqwm","../../utils/codeSnipetExamples":"Gxw2"}],"F+9w":[function(require,module,exports) {
@@ -1385,8 +1383,8 @@ var r,e;module.exports=require("./factoryWithThrowingShims")();
},{"./colors":"6Yr/","./styles":"UUDD","./AppBar":"vztC","./Avatar":"NALm","./Backdrop":"4iPm","./Badge":"zSFR","./BottomNavigation":"Roco","./BottomNavigationAction":"F2hw","./Box":"VQeO","./Breadcrumbs":"vn4F","./Button":"uzLy","./ButtonBase":"VX66","./ButtonGroup":"TCPp","./Card":"Ws94","./CardActionArea":"Z0ud","./CardActions":"7xv+","./CardContent":"FW+e","./CardHeader":"PugE","./CardMedia":"3Zbt","./Checkbox":"HVXn","./Chip":"zfmF","./CircularProgress":"mb4G","./ClickAwayListener":"YjtO","./Collapse":"2uPh","./Container":"jygZ","./CssBaseline":"cmOJ","./Dialog":"zNDQ","./DialogActions":"dDut","./DialogContent":"lTXJ","./DialogContentText":"4Gmh","./DialogTitle":"Dg7a","./Divider":"pRXd","./Drawer":"2vyf","./ExpansionPanel":"VT0G","./ExpansionPanelActions":"qFdA","./ExpansionPanelDetails":"gInR","./ExpansionPanelSummary":"MGbU","./Fab":"ULTl","./Fade":"yr6S","./FilledInput":"wWb1","./FormControl":"59eF","./FormControlLabel":"SR7c","./FormGroup":"QPPT","./FormHelperText":"2iw6","./FormLabel":"khD4","./Grid":"5xZh","./GridList":"I/dL","./GridListTile":"3P//","./GridListTileBar":"B5WC","./Grow":"vuXQ","./Hidden":"Sxgj","./Icon":"YGXd","./IconButton":"e+0N","./Input":"CaNl","./InputAdornment":"lydx","./InputBase":"UXeJ","./InputLabel":"9pS8","./LinearProgress":"knAy","./Link":"C9Eg","./List":"HMJ1","./ListItem":"vro7","./ListItemAvatar":"rot7","./ListItemIcon":"lJBu","./ListItemSecondaryAction":"CiZX","./ListItemText":"5FcK","./ListSubheader":"wSFK","./Menu":"AKYS","./MenuItem":"dYSc","./MenuList":"LIS1","./MobileStepper":"1HvI","./Modal":"IBPk","./NativeSelect":"S2/Q","./NoSsr":"qvOT","./OutlinedInput":"Z2x8","./Paper":"76mt","./Popover":"HEXW","./Popper":"PkJy","./Portal":"ZN8Z","./Radio":"BG1+","./RadioGroup":"k/1R","./RootRef":"IJ01","./Select":"NCwz","./Slide":"lCN9","./Slider":"v42q","./Snackbar":"gpsY","./SnackbarContent":"ECNl","./Step":"bhLS","./StepButton":"s0nP","./StepConnector":"wGYe","./StepContent":"JA1V","./StepIcon":"gJfS","./StepLabel":"81tn","./Stepper":"i3xK","./SvgIcon":"R8TJ","./SwipeableDrawer":"zU4M","./Switch":"GFmN","./Tab":"DtdH","./Table":"Amxx","./TableBody":"0cmi","./TableCell":"lprt","./TableFooter":"ZLWC","./TableHead":"BYgd","./TablePagination":"YhGx","./TableRow":"kIQr","./TableSortLabel":"Ptm9","./Tabs":"3PzI","./TextField":"75JZ","./TextareaAutosize":"37bw","./Toolbar":"/OGx","./Tooltip":"FW+n","./Typography":"/pi2","./useMediaQuery":"EWA0","./useScrollTrigger":"nQl/","./withMobileDialog":"/+xO","./withWidth":"tyfK","./Zoom":"DTuf"}],"GAz6":[function(require,module,exports) {
"use strict";var e=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var r=e(require("react")),t=e(require("./utils/createSvgIcon")),a=(0,t.default)(r.default.createElement("path",{d:"M3 17.25V21h3.75L17.81 9.94l-3.75-3.75L3 17.25zM20.71 7.04c.39-.39.39-1.02 0-1.41l-2.34-2.34a.9959.9959 0 00-1.41 0l-1.83 1.83 3.75 3.75 1.83-1.83z"}),"Create");exports.default=a;
},{"@babel/runtime/helpers/interopRequireDefault":"u5tj","react":"1n8/","./utils/createSvgIcon":"Atth"}],"fiKH":[function(require,module,exports) {
-"use strict";var e=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var r={};if(null!=e)for(var t in e)Object.hasOwnProperty.call(e,t)&&(r[t]=e[t]);return r.default=e,r},r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(exports,"__esModule",{value:!0});var t=e(require("react")),a=require("../../src"),u=require("../../src/Storage"),i=r(require("../utils/columns"));exports.default=function(){return t.createElement("div",{className:"root"},t.createElement(a.DataGrid,{columns:i.default,dataSource:"https://tubular.azurewebsites.net/api/orders/paged",gridName:"LocalDataGrid",storage:new u.LocalStorage}))};
-},{"react":"1n8/","../../src":"+fUd","../../src/Storage":"DIVM","../utils/columns":"jRiX"}],"qM49":[function(require,module,exports) {
+"use strict";var e=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var r={};if(null!=e)for(var t in e)Object.hasOwnProperty.call(e,t)&&(r[t]=e[t]);return r.default=e,r},r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(exports,"__esModule",{value:!0});var t=e(require("react")),a=require("../../src"),u=require("tubular-common"),i=r(require("../utils/columns"));exports.default=function(){return t.createElement(a.DataGrid,{columns:i.default,dataSource:"https://tubular.azurewebsites.net/api/orders/paged",gridName:"LocalDataGrid",storage:new u.LocalStorage})};
+},{"react":"1n8/","../../src":"+fUd","tubular-common":"QwmZ","../utils/columns":"jRiX"}],"qM49":[function(require,module,exports) {
"use strict";var e=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},t=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t};Object.defineProperty(exports,"__esModule",{value:!0});var r=e(require("@material-ui/core/SvgIcon")),a=t(require("react"));exports.default=function(e){return a.createElement(r.default,e,a.createElement("path",{d:"M12 .3a12 12 0 0 0-3.8 23.4c.6.1.8-.3.8-.6v-2c-3.3.7-4-1.6-4-1.6-.6-1.4-1.4-1.8-1.4-1.8-1-.7.1-.7.1-.7 1.2 0 1.9 1.2 1.9 1.2 1 1.8 2.8 1.3 3.5 1 0-.8.4-1.3.7-1.6-2.7-.3-5.5-1.3-5.5-6 0-1.2.5-2.3 1.3-3.1-.2-.4-.6-1.6 0-3.2 0 0 1-.3 3.4 1.2a11.5 11.5 0 0 1 6 0c2.3-1.5 3.3-1.2 3.3-1.2.6 1.6.2 2.8 0 3.2.9.8 1.3 1.9 1.3 3.2 0 4.6-2.8 5.6-5.5 5.9.5.4.9 1 .9 2.2v3.3c0 .3.1.7.8.6A12 12 0 0 0 12 .3"}))};
},{"@material-ui/core/SvgIcon":"R8TJ","react":"1n8/"}],"Qnuc":[function(require,module,exports) {
"use strict";var e=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var r=e(require("react")),t=e(require("./utils/createSvgIcon")),l=(0,t.default)(r.default.createElement("path",{d:"M20 8.69V5c0-.55-.45-1-1-1h-3.69l-2.6-2.6a.9959.9959 0 00-1.41 0L8.69 4H5c-.55 0-1 .45-1 1v3.69l-2.6 2.6c-.39.39-.39 1.02 0 1.41L4 15.3V19c0 .55.45 1 1 1h3.69l2.6 2.6c.39.39 1.02.39 1.41 0l2.6-2.6H19c.55 0 1-.45 1-1v-3.69l2.6-2.6c.39-.39.39-1.02 0-1.41L20 8.69zM12 18c-3.31 0-6-2.69-6-6s2.69-6 6-6 6 2.69 6 6-2.69 6-6 6zm0-10c-2.21 0-4 1.79-4 4s1.79 4 4 4 4-1.79 4-4-1.79-4-4-4z"}),"Brightness7Rounded");exports.default=l;
diff --git a/package-lock.json b/package-lock.json
index fdfb708a..a8f044e6 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -1,6 +1,6 @@
{
"name": "tubular-react",
- "version": "1.3.1",
+ "version": "2.0.0",
"lockfileVersion": 1,
"requires": true,
"dependencies": {
@@ -3532,7 +3532,7 @@
"dependencies": {
"readable-stream": {
"version": "2.3.6",
- "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz",
+ "resolved": "http://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz",
"integrity": "sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw==",
"dev": true,
"requires": {
@@ -4397,7 +4397,7 @@
"dependencies": {
"readable-stream": {
"version": "2.3.6",
- "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz",
+ "resolved": "http://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz",
"integrity": "sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw==",
"dev": true,
"requires": {
@@ -8416,7 +8416,7 @@
},
"readable-stream": {
"version": "2.3.6",
- "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz",
+ "resolved": "http://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz",
"integrity": "sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw==",
"dev": true,
"requires": {
@@ -8614,7 +8614,7 @@
},
"merge-source-map": {
"version": "1.1.0",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/merge-source-map/-/merge-source-map-1.1.0.tgz",
"integrity": "sha512-Qkcp7P2ygktpMPh2mCQZaf3jhN6D3Z/qVZHSdWvQ+2Ef5HgRAPBO57A77+ENm0CPx2+1Ce/MYKi3ymqdfuqibw==",
"dev": true,
"requires": {
@@ -9054,7 +9054,7 @@
"dependencies": {
"json5": {
"version": "1.0.1",
- "resolved": "https://registry.npmjs.org/json5/-/json5-1.0.1.tgz",
+ "resolved": "http://registry.npmjs.org/json5/-/json5-1.0.1.tgz",
"integrity": "sha512-aKS4WQjPenRxiQsC93MNfjx+nbF4PAdYzmd/1JIj8HYzqfbu86beTuNgXDzPknWk0n0uARlyewZo4s++ES36Ow==",
"dev": true,
"requires": {
@@ -10178,7 +10178,7 @@
"dependencies": {
"readable-stream": {
"version": "2.3.6",
- "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz",
+ "resolved": "http://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz",
"integrity": "sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw==",
"dev": true,
"requires": {
@@ -10988,7 +10988,7 @@
},
"readable-stream": {
"version": "2.3.6",
- "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz",
+ "resolved": "http://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz",
"integrity": "sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw==",
"dev": true,
"requires": {
@@ -11034,7 +11034,7 @@
"dependencies": {
"readable-stream": {
"version": "2.3.6",
- "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz",
+ "resolved": "http://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz",
"integrity": "sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw==",
"dev": true,
"requires": {
@@ -11064,7 +11064,7 @@
"dependencies": {
"readable-stream": {
"version": "2.3.6",
- "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz",
+ "resolved": "http://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz",
"integrity": "sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw==",
"dev": true,
"requires": {
@@ -11295,7 +11295,7 @@
"dependencies": {
"readable-stream": {
"version": "2.3.6",
- "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz",
+ "resolved": "http://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz",
"integrity": "sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw==",
"dev": true,
"requires": {
@@ -11543,9 +11543,12 @@
"dev": true
},
"tubular-common": {
- "version": "1.4.2",
- "resolved": "https://registry.npmjs.org/tubular-common/-/tubular-common-1.4.2.tgz",
- "integrity": "sha512-bIrYiUiMKHLadRHYZ2q2ENJctYvlGnMVukI5CrxiAne2nqcK/Jzl1XF/ciZWgjZ3YptwexB8H/LwEuqsFwY2ug=="
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/tubular-common/-/tubular-common-2.0.0.tgz",
+ "integrity": "sha512-sQmcMBl/4DJ2rstD2+fl63Gndi8wDxqYASU2IYxDzZ1PF5BDRbnLL40bTw2rNkG+/6VXVUHDYj5WElRjqhhXag==",
+ "requires": {
+ "date-fns": "^2.1.0"
+ }
},
"tunnel-agent": {
"version": "0.6.0",
@@ -11578,9 +11581,9 @@
"dev": true
},
"typescript": {
- "version": "3.6.2",
- "resolved": "https://registry.npmjs.org/typescript/-/typescript-3.6.2.tgz",
- "integrity": "sha512-lmQ4L+J6mnu3xweP8+rOrUwzmN+MRAj7TgtJtDaXE5PMyX2kCrklhg3rvOsOIfNeAWMQWO2F1GPc1kMD2vLAfw==",
+ "version": "3.6.3",
+ "resolved": "https://registry.npmjs.org/typescript/-/typescript-3.6.3.tgz",
+ "integrity": "sha512-N7bceJL1CtRQ2RiG0AQME13ksR7DiuQh/QehubYcghzv20tnh+MQnQIuJddTmsbqYj+dztchykemz0zFzlvdQw==",
"dev": true
},
"uglify-js": {
diff --git a/package.json b/package.json
index 0f45c01e..057075b7 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "tubular-react",
- "version": "1.3.1",
+ "version": "2.0.0",
"description": "Unosquare Tubular React",
"main": "dist/index.js",
"scripts": {
@@ -69,7 +69,7 @@
"@material-ui/icons": "^4.4.1",
"@material-ui/styles": "^4.4.1",
"date-fns": "^2.1.0",
- "tubular-common": "^1.4.2",
+ "tubular-common": "^2.0.0",
"uno-material-ui": "^1.5.0"
},
"devDependencies": {
@@ -95,7 +95,7 @@
"ts-jest": "^24.0.2",
"tslint": "^5.20.0",
"tslint-react": "^4.0.0",
- "typescript": "^3.6.2"
+ "typescript": "^3.6.3"
},
"parcelCleanPaths": [
"docs/*.*",
diff --git a/sample/src/CustomHttpClient.ts b/sample/src/CustomHttpClient.ts
index 91e5d223..424e50f4 100644
--- a/sample/src/CustomHttpClient.ts
+++ b/sample/src/CustomHttpClient.ts
@@ -1,6 +1,4 @@
-import { GridRequest } from 'tubular-common';
-import ITubularHttpClient from '../../src/utils/ITubularHttpClient';
-import TubularHttpClient from '../../src/utils/TubularHttpClient';
+import { GridRequest, ITubularHttpClient, TubularHttpClient } from 'tubular-common';
export default class CustomHttpClient implements ITubularHttpClient {
public request: string | Request;
diff --git a/sample/src/CustomLayoutDataGrid.tsx b/sample/src/CustomLayoutDataGrid.tsx
index c248417a..9993f916 100644
--- a/sample/src/CustomLayoutDataGrid.tsx
+++ b/sample/src/CustomLayoutDataGrid.tsx
@@ -10,7 +10,7 @@ import * as React from 'react';
import { DataGridTable } from '../../src/DataGrid';
import useDataGrid from '../../src/Hooks/useDataGrid';
import { Paginator } from '../../src/Pagination';
-import { renderDateTimeCell } from '../../src/utils';
+import { formatDate } from 'tubular-common';
import columns from './data/columns';
import localData from './data/localData';
@@ -24,7 +24,7 @@ const CustomLayoutDataGrid: React.FunctionComponent = () => {
{row.OrderID}
{row.CustomerName}
- {renderDateTimeCell(row.ShippedDate, 'M/d/yyyy h:mm a')}
+ {formatDate(row.ShippedDate, 'M/d/yyyy h:mm a')}
{row.ShipperCity}
diff --git a/sample/src/RemoteGridList.tsx b/sample/src/RemoteGridList.tsx
index ff94a88b..22048503 100644
--- a/sample/src/RemoteGridList.tsx
+++ b/sample/src/RemoteGridList.tsx
@@ -12,13 +12,12 @@ import TableCell from '@material-ui/core/TableCell';
import TableFooter from '@material-ui/core/TableFooter';
import TableRow from '@material-ui/core/TableRow';
import Typography from '@material-ui/core/Typography';
-import format from 'date-fns/format';
-import parseISO from 'date-fns/parseISO';
import * as React from 'react';
-import { LocalStorage, Paginator, SearchTextInput } from '../../src';
+import { Paginator, SearchTextInput } from '../../src';
import useDataGrid from '../../src/Hooks/useDataGrid';
import CustomHttpClient from './CustomHttpClient';
import columns from './data/columns';
+import { formatDate, LocalStorage } from 'tubular-common';
const styles: any = {
progress: {
@@ -66,7 +65,7 @@ const RemoteGridList: React.FunctionComponent = () => {
{row.ShipperCity}
- {format(parseISO(row.ShippedDate), 'M/d/yyyy h:mm a')}
+ {formatDate(row.ShippedDate, 'M/d/yyyy h:mm a')}
diff --git a/sample/src/localDataGrid.tsx b/sample/src/localDataGrid.tsx
index 020054d2..b8377ce5 100644
--- a/sample/src/localDataGrid.tsx
+++ b/sample/src/localDataGrid.tsx
@@ -2,7 +2,8 @@ import * as React from 'react';
import Button from '@material-ui/core/Button';
import Snackbar from '@material-ui/core/Snackbar';
-import { DataGrid, LocalStorage } from '../../src';
+import { LocalStorage} from 'tubular-common';
+import { DataGrid } from '../../src';
import { ToolbarOptions } from '../../src/Toolbar/ToolbarOptions';
import columns from './data/columns';
import localData from './data/localData';
diff --git a/sample/src/remoteDataGrid.tsx b/sample/src/remoteDataGrid.tsx
index a46424cb..48b604fa 100644
--- a/sample/src/remoteDataGrid.tsx
+++ b/sample/src/remoteDataGrid.tsx
@@ -3,11 +3,9 @@ import TableCell from '@material-ui/core/TableCell';
import TableRow from '@material-ui/core/TableRow';
import CheckBox from '@material-ui/icons/CheckBox';
import CheckBoxOutlineBlank from '@material-ui/icons/CheckBoxOutlineBlank';
-import format from 'date-fns/format';
-import parseISO from 'date-fns/parseISO';
import * as React from 'react';
-import { ColumnModel } from 'tubular-common';
-import { DataGrid, LocalStorage, ToolbarOptions } from '../../src';
+import { ColumnModel, formatDate, LocalStorage } from 'tubular-common';
+import { DataGrid, ToolbarOptions } from '../../src';
import useGridRefresh from '../../src/Hooks/useGridRefresh';
import columns from './data/columns';
@@ -24,7 +22,7 @@ const RemoteDataGrid: React.FunctionComponent = () => {
{row.OrderID}
{row.CustomerName}
- {format(parseISO(row.ShippedDate), 'M/d/yyyy h:mm a')}
+ {formatDate(row.ShippedDate, 'M/d/yyyy h:mm a')}
{row.ShipperCity}
@@ -53,17 +51,17 @@ const RemoteDataGrid: React.FunctionComponent = () => {
});
return (
-
+
);
};
diff --git a/src/DataGrid/DataGrid.tsx b/src/DataGrid/DataGrid.tsx
index ebd18127..0bcf7af2 100644
--- a/src/DataGrid/DataGrid.tsx
+++ b/src/DataGrid/DataGrid.tsx
@@ -5,16 +5,14 @@ import TableHead from '@material-ui/core/TableHead';
import TableRow from '@material-ui/core/TableRow';
import makeStyles from '@material-ui/styles/makeStyles';
import * as React from 'react';
-import { ColumnModel } from 'tubular-common';
+import { ColumnModel, IDataGridStorage, ITubularHttpClient } from 'tubular-common';
import { FixedLinearProgress } from 'uno-material-ui';
import { useResolutionSwitch } from 'uno-react';
-import { IDataGridStorage } from '../DataGridInterfaces';
import { IDataGridConfig } from '../DataGridInterfaces/IDataGridConfig';
import useDataGrid from '../Hooks/useDataGrid';
import { Paginator } from '../Pagination';
import { GridToolbar } from '../Toolbar/GridToolbar';
import { ToolbarOptions } from '../Toolbar/ToolbarOptions';
-import ITubularHttpClient from '../utils/ITubularHttpClient';
import { DataGridCard, DataGridTable } from './';
const useStyles = makeStyles({
diff --git a/src/DataGrid/GridHeader.tsx b/src/DataGrid/GridHeader.tsx
index 47eba113..bce43fe3 100644
--- a/src/DataGrid/GridHeader.tsx
+++ b/src/DataGrid/GridHeader.tsx
@@ -1,8 +1,7 @@
import TableRow from '@material-ui/core/TableRow';
import * as React from 'react';
-import { ColumnModel } from 'tubular-common';
+import { ColumnModel, IFilterWrapper } from 'tubular-common';
import { IDataGrid } from '../DataGridInterfaces/IDataGrid';
-import { IFilterWrapper } from '../DataGridInterfaces/IFilterWrapper';
import { DialogModal } from '../Filtering/DialogModal';
import { GridHeaderCell } from './GridHeaderCell';
diff --git a/src/DataGridInterfaces/IDataGridApi.ts b/src/DataGridInterfaces/IDataGridApi.ts
index ebeb0011..f3a58b0d 100644
--- a/src/DataGridInterfaces/IDataGridApi.ts
+++ b/src/DataGridInterfaces/IDataGridApi.ts
@@ -1,5 +1,4 @@
-import { ColumnModel, GridResponse } from 'tubular-common';
-import { IFilterWrapper } from './IFilterWrapper';
+import { ColumnModel, IFilterWrapper } from 'tubular-common';
export interface IDataGridApi {
exportTo: (allRows: boolean, exportFunc: (payload: any[], columns: ColumnModel[]) => void) => void;
diff --git a/src/DataGridInterfaces/IDataGridConfig.ts b/src/DataGridInterfaces/IDataGridConfig.ts
index 2297b3d5..35c3963a 100644
--- a/src/DataGridInterfaces/IDataGridConfig.ts
+++ b/src/DataGridInterfaces/IDataGridConfig.ts
@@ -1,4 +1,4 @@
-import { IDataGridStorage } from './IDataGridStorage';
+import { IDataGridStorage } from 'tubular-common';
export interface IDataGridConfig {
itemsPerPage: number;
diff --git a/src/DataGridInterfaces/IDataGridState.ts b/src/DataGridInterfaces/IDataGridState.ts
index c272c044..3d82e1b0 100644
--- a/src/DataGridInterfaces/IDataGridState.ts
+++ b/src/DataGridInterfaces/IDataGridState.ts
@@ -1,5 +1,4 @@
-import { ColumnModel } from 'tubular-common';
-import { IDataGridStorage } from './IDataGridStorage';
+import { ColumnModel, IDataGridStorage } from 'tubular-common';
export interface IDataGridState {
activeColumn: ColumnModel;
diff --git a/src/DataGridInterfaces/IDataGridStorage.ts b/src/DataGridInterfaces/IDataGridStorage.ts
deleted file mode 100644
index 1521728b..00000000
--- a/src/DataGridInterfaces/IDataGridStorage.ts
+++ /dev/null
@@ -1,10 +0,0 @@
-import { ColumnModel } from 'tubular-common';
-
-export interface IDataGridStorage {
- setTextSearch: (textSearch: string) => void;
- setPage: (page: number) => void;
- setColumns: (columns: ColumnModel[]) => void;
- getTextSearch: () => string;
- getPage: () => number;
- getColumns: () => ColumnModel[];
-}
diff --git a/src/DataGridInterfaces/IFilterWrapper.ts b/src/DataGridInterfaces/IFilterWrapper.ts
deleted file mode 100644
index 91fc8084..00000000
--- a/src/DataGridInterfaces/IFilterWrapper.ts
+++ /dev/null
@@ -1,8 +0,0 @@
-import { CompareOperators } from 'tubular-common';
-
-export interface IFilterWrapper {
- Argument: string[];
- HasFilter: boolean;
- Operator: CompareOperators;
- Text: string;
-}
diff --git a/src/DataGridInterfaces/index.ts b/src/DataGridInterfaces/index.ts
deleted file mode 100644
index 1f577c3d..00000000
--- a/src/DataGridInterfaces/index.ts
+++ /dev/null
@@ -1,3 +0,0 @@
-import { IDataGridStorage } from './IDataGridStorage';
-
-export { IDataGridStorage };
diff --git a/src/Filtering/DialogInput.tsx b/src/Filtering/DialogInput.tsx
index fd4b028e..592e794c 100644
--- a/src/Filtering/DialogInput.tsx
+++ b/src/Filtering/DialogInput.tsx
@@ -1,9 +1,7 @@
import MenuItem from '@material-ui/core/MenuItem';
import TextField from '@material-ui/core/TextField';
-import format from 'date-fns/format';
-import parseISO from 'date-fns/parseISO';
import * as React from 'react';
-import { ColumnDataType, ColumnModel, CompareOperators } from 'tubular-common';
+import { ColumnDataType, ColumnModel, CompareOperators, formatDate } from 'tubular-common';
const dropdown = {
marginLeft: '10%',
@@ -40,16 +38,16 @@ const getValue = (
switch (dataType) {
case ColumnDataType.DATE:
if (value) {
- return format(parseISO(value), 'yyyy-MM-DD');
+ return formatDate(value, 'yyyy-MM-DD');
}
- handleTextFieldChange(format(new Date(), 'YYYY-MM-DD'));
+ handleTextFieldChange(formatDate(new Date().toISOString(), 'YYYY-MM-DD'));
return '';
case ColumnDataType.DATE_TIME:
case ColumnDataType.DATE_TIME_UTC:
if (value) {
- return format(parseISO(value), 'yyyy-MM-DD[T]HH:mm');
+ return formatDate(value, 'yyyy-MM-DD[T]HH:mm');
}
- handleTextFieldChange(format(new Date(), 'yyyy-MM-DD[T]HH:mm'));
+ handleTextFieldChange(formatDate(new Date().toISOString(), 'yyyy-MM-DD[T]HH:mm'));
return '';
case ColumnDataType.BOOLEAN:
return operator === CompareOperators.NONE
diff --git a/src/Filtering/DialogModal.tsx b/src/Filtering/DialogModal.tsx
index ad1042f6..0e6ecd6a 100644
--- a/src/Filtering/DialogModal.tsx
+++ b/src/Filtering/DialogModal.tsx
@@ -5,39 +5,10 @@ import CardActions from '@material-ui/core/CardActions';
import CardContent from '@material-ui/core/CardContent';
import Popover from '@material-ui/core/Popover';
import * as React from 'react';
+import { ColumnModel, CompareOperators, IFilterWrapper } from 'tubular-common';
import { DialogInput } from './DialogInput';
import { OperatorsDropdown } from './OperatorsDropdown';
-import { ColumnDataType, ColumnModel, CompareOperators } from 'tubular-common';
-import { IFilterWrapper } from '../DataGridInterfaces/IFilterWrapper';
-
-const createFilterPatch = (column: ColumnModel): IFilterWrapper => {
- let filterText = column.Filter.Text;
- let filterArgument = column.Filter.Argument[0];
-
- if (column.DataType === ColumnDataType.NUMERIC) {
- filterText = parseFloat(filterText);
- filterArgument = parseFloat(filterArgument);
- } else if (column.DataType === ColumnDataType.BOOLEAN) {
- filterText = filterText === 'true';
- filterArgument = '';
- }
-
- return {
- Argument: [filterArgument],
- HasFilter: true,
- Operator: column.Filter.Operator || CompareOperators.AUTO,
- Text: filterText,
- };
-};
-
-const clearFilterPatch: IFilterWrapper = {
- Argument: [''],
- HasFilter: false,
- Operator: CompareOperators.NONE,
- Text: '',
-};
-
interface IDialogModalProps {
anchorFilter: HTMLElement;
activeColumn: ColumnModel;
@@ -48,10 +19,10 @@ interface IDialogModalProps {
export const DialogModal: React.FunctionComponent =
({ anchorFilter, activeColumn, setAnchorFilter, setFilter, handleFilterChange }) => {
- const clearFilter = () => setFilter(clearFilterPatch);
+ const clearFilter = () => setFilter(ColumnModel.clearFilterPatch());
const handleInput = (e: any) => handleFilterChange({ Text: e });
const handleBetweenInput = (e: any) => handleFilterChange({ Argument: [e] });
- const submit = () => setFilter(createFilterPatch(activeColumn));
+ const submit = () => setFilter(activeColumn.createFilterPatch());
const onClose = () => setAnchorFilter(null);
return (
diff --git a/src/Filtering/OperatorsDropdown.tsx b/src/Filtering/OperatorsDropdown.tsx
index 9ba38bc8..3f36fa77 100644
--- a/src/Filtering/OperatorsDropdown.tsx
+++ b/src/Filtering/OperatorsDropdown.tsx
@@ -22,8 +22,8 @@ export const OperatorsDropdown: React.FunctionComponent = ({ activeColumn,
onChange={onChange}
label='Operator'
>
- {ColumnModel
- .getOperators(activeColumn)
+ {activeColumn
+ .getOperators()
.map((row: any) => (
{row.Title}
diff --git a/src/Hooks/useDataGrid.ts b/src/Hooks/useDataGrid.ts
index 4c5ed470..9e50694b 100644
--- a/src/Hooks/useDataGrid.ts
+++ b/src/Hooks/useDataGrid.ts
@@ -1,32 +1,28 @@
import * as React from 'react';
-import Transformer, { ColumnModel, CompareOperators, GridRequest, GridResponse } from 'tubular-common';
+import Transformer, {
+ ColumnModel, CompareOperators,
+ GridRequest, GridResponse, IDataGridStorage,
+ IFilterWrapper, ITubularHttpClient, LocalStorage,
+ NullStorage, parsePayload, TubularHttpClient,
+} from 'tubular-common';
import { IDataGrid } from '../DataGridInterfaces/IDataGrid';
import { IDataGridApi } from '../DataGridInterfaces/IDataGridApi';
import { IDataGridConfig } from '../DataGridInterfaces/IDataGridConfig';
-import { IDataGridStorage } from '../DataGridInterfaces/IDataGridStorage';
-import { IFilterWrapper } from '../DataGridInterfaces/IFilterWrapper';
-import { LocalStorage } from '../Storage';
-import { NullStorage } from '../Storage/NullStorage';
-import ITubularHttpClient from '../utils/ITubularHttpClient';
-import TubularHttpClient from '../utils/TubularHttpClient';
const getRemoteDataSource = (request: string | Request | ITubularHttpClient) =>
async (gridRequest: GridRequest): Promise => {
const httpCast = request as ITubularHttpClient;
- let httpClient: ITubularHttpClient;
-
- if (httpCast.request) {
- httpClient = httpCast;
- } else {
- httpClient = new TubularHttpClient(request);
- }
+ const httpClient: ITubularHttpClient = httpCast.request
+ ? httpCast
+ : new TubularHttpClient(request);
const data = await httpClient.fetch(gridRequest);
if (!TubularHttpClient.isValidResponse(data)) {
throw new Error('Server response is a invalid Tubular object');
}
- data.Payload = data.Payload.map((row: any) => TubularHttpClient.parsePayload(row, gridRequest.Columns));
+ data.Payload = data.Payload
+ .map((row: any) => parsePayload(row, gridRequest.Columns));
return data;
};
@@ -110,9 +106,9 @@ const useDataGrid =
...getActiveColumn,
Filter: {
...getActiveColumn.Filter,
- ...value,
+ ...value as any,
},
- });
+ } as ColumnModel);
},
processRequest: async () => {
setIsLoading(true);
diff --git a/src/Storage/LocalStorage.tsx b/src/Storage/LocalStorage.tsx
deleted file mode 100644
index 66c16ae2..00000000
--- a/src/Storage/LocalStorage.tsx
+++ /dev/null
@@ -1,40 +0,0 @@
-import { ColumnModel } from 'tubular-common';
-import { IDataGridStorage } from '../DataGridInterfaces';
-
-export class LocalStorage implements IDataGridStorage {
-
- public constructor(private name?: string) {
-
- if (!window || !window.localStorage) {
- throw new Error('The localStorage is not present.');
- }
- }
-
- public setGridName(name: string) {
- this.name = name;
- }
-
- public setTextSearch(textSearch: string): void {
- window.localStorage.setItem(`${this.name}_textSearch`, textSearch);
- }
-
- public setPage(page: number): void {
- window.localStorage.setItem(`${this.name}_page`, page.toString());
- }
-
- public setColumns(columns: ColumnModel[]): void {
- window.localStorage.setItem(`${this.name}_columns`, JSON.stringify(columns));
- }
-
- public getTextSearch(): string {
- return window.localStorage.getItem(`${this.name}_textSearch`);
- }
-
- public getPage(): number {
- return parseInt(window.localStorage.getItem(`${this.name}_page`), 10);
- }
-
- public getColumns(): ColumnModel[] {
- return JSON.parse(window.localStorage.getItem(`${this.name}_columns`));
- }
-}
diff --git a/src/Storage/NullStorage.tsx b/src/Storage/NullStorage.tsx
deleted file mode 100644
index feb57c72..00000000
--- a/src/Storage/NullStorage.tsx
+++ /dev/null
@@ -1,28 +0,0 @@
-import { ColumnModel } from 'tubular-common';
-import { IDataGridStorage } from '../DataGridInterfaces';
-
-export class NullStorage implements IDataGridStorage {
- public setTextSearch(textSearch: string): void {
- // do nothing
- }
-
- public setPage(page: number): void {
- // do nothing
- }
-
- public setColumns(columns: ColumnModel[]): void {
- // do nothing
- }
-
- public getTextSearch(): string {
- return null;
- }
-
- public getPage(): number {
- return null;
- }
-
- public getColumns(): ColumnModel[] {
- return null;
- }
-}
diff --git a/src/Storage/index.ts b/src/Storage/index.ts
deleted file mode 100644
index f96048db..00000000
--- a/src/Storage/index.ts
+++ /dev/null
@@ -1,7 +0,0 @@
-import { LocalStorage } from './LocalStorage';
-import { NullStorage } from './NullStorage';
-
-export {
- LocalStorage,
- NullStorage,
-};
diff --git a/src/Toolbar/GridToolbarFunctions.ts b/src/Toolbar/GridToolbarFunctions.ts
index ff18cd73..2e400217 100644
--- a/src/Toolbar/GridToolbarFunctions.ts
+++ b/src/Toolbar/GridToolbarFunctions.ts
@@ -1,63 +1,7 @@
-import format from 'date-fns/format';
-import getYear from 'date-fns/getYear';
-import parseISO from 'date-fns/parseISO';
-import { ColumnDataType } from 'tubular-common';
-
-function parseDateTime(cell: any, stringFormat: string) {
- if (!cell) {
- return '';
- }
-
- const dateParsed = parseISO(cell);
- return getYear(dateParsed) > 0 ? format(dateParsed, stringFormat) : '';
-}
-const cellValue = (cellDataType: string, cell: any) => {
- switch (cellDataType) {
- case ColumnDataType.DATE:
- return parseDateTime(cell, 'M/d/yyyy');
- case ColumnDataType.DATE_TIME:
- case ColumnDataType.DATE_TIME_UTC:
- return parseDateTime(cell, 'M/d/yyyy h:mm a');
- case ColumnDataType.BOOLEAN:
- return (cell === true ? 'Yes' : 'No');
- default:
- return (cell || '').toString();
- }
-};
-
-const objToArray = (row: any) => row instanceof Object
- ? Object.keys(row).map((key: any) => row[key])
- : row;
-
-const processRow = (row: any, columns: any[], ignoreType: boolean) => {
- const finalVal = objToArray(row)
- .reduce((prev: any, value: any, i: any) => {
- if (!columns[i].Visible) { return; }
-
- let result = cellValue(ignoreType ? ColumnDataType.STRING : columns[i].DataType, value)
- .replace(/"/g, '""');
-
- if (result.search(/("|,|\n)/g) >= 0) {
- result = `"${result}"`;
- }
-
- return `${prev !== undefined ? prev : ''}${i > 0 && prev !== undefined ? ',' : ''}${result}`;
- }, '');
-
- return `${finalVal}\n`;
-};
+import { getCsv, getHtml } from 'tubular-common';
function printDoc(gridResult: any, columns: any, gridName: string) {
- const tableHtml = `${
- columns
- .filter((c: any) => c.Visible)
- .reduce((prev: any, el: any) => `${prev}${el.Label || el.Name} `, '')
- } ${
- gridResult.reduce((prevRow: string, row: any) =>
- `${prevRow}${objToArray(row).reduce((prev: string, cell: any, index: number) =>
- !columns[index].Visible ? prev : `${prev}${cellValue(columns[index].DataType, cell)} `,
- '')} `
- , '')}
`;
+ const tableHtml = getHtml(gridResult, columns);
const documentToPrint = window.open('about:blank', 'Print', 'location=0,height=500,width=800');
documentToPrint.document
@@ -71,9 +15,7 @@ function printDoc(gridResult: any, columns: any, gridName: string) {
}
function exportFile(gridResult: any, columns: any) {
- const csvFile = gridResult.reduce(
- (prev: string, row: any) => prev + processRow(row, columns, false),
- processRow(columns.map((x: any) => x.Label), columns, true));
+ const csvFile = getCsv(gridResult, columns);
const fileURL = URL.createObjectURL(new Blob([`\uFEFF${csvFile}`], {
type: 'text/csv;charset=utf-8;',
diff --git a/src/index.ts b/src/index.ts
index d2123de9..dcfb3bb7 100644
--- a/src/index.ts
+++ b/src/index.ts
@@ -1,7 +1,5 @@
export * from './DataGrid';
export * from './utils';
-export * from './Storage';
-export * from './DataGridInterfaces';
export * from './Pagination';
export * from './Filtering';
export * from './Toolbar';
diff --git a/src/utils/ITubularHttpClient.ts b/src/utils/ITubularHttpClient.ts
deleted file mode 100644
index 1d3080b3..00000000
--- a/src/utils/ITubularHttpClient.ts
+++ /dev/null
@@ -1,7 +0,0 @@
-import { GridRequest } from 'tubular-common';
-
-export default interface ITubularHttpClient {
- request: string | Request;
-
- fetch(gridRequest: GridRequest): Promise;
-}
diff --git a/src/utils/ShallowHttpClient.ts b/src/utils/ShallowHttpClient.ts
deleted file mode 100644
index 8965d7cd..00000000
--- a/src/utils/ShallowHttpClient.ts
+++ /dev/null
@@ -1,18 +0,0 @@
-import { GridRequest } from 'tubular-common';
-import ITubularHttpClient from './ITubularHttpClient';
-
-export type FetchHandler = (request: string, gridRequest: GridRequest) => Promise;
-
-export default class ShallowHttpClient implements ITubularHttpClient {
- public request: string;
- public handler: FetchHandler;
-
- public constructor(url: string, handler: FetchHandler) {
- this.request = url;
- this.handler = handler;
- }
-
- public fetch(gridRequest: GridRequest): Promise {
- return this.handler(this.request, gridRequest);
- }
-}
diff --git a/src/utils/TubularHttpClient.ts b/src/utils/TubularHttpClient.ts
deleted file mode 100644
index 2307ccc4..00000000
--- a/src/utils/TubularHttpClient.ts
+++ /dev/null
@@ -1,73 +0,0 @@
-import { GridRequest } from 'tubular-common';
-import ITubularHttpClient from './ITubularHttpClient';
-
-const expectedStructureKeys = JSON.stringify([
- 'AggregationPayload',
- 'Counter',
- 'CurrentPage',
- 'FilteredRecordCount',
- 'Payload',
- 'TotalPages',
- 'TotalRecordCount']);
-
-export default class TubularHttpClient implements ITubularHttpClient {
- public static resolveRequest(request: string | Request | ITubularHttpClient): string | Request {
- const httpCast = request as ITubularHttpClient;
-
- if (httpCast.request) {
- return httpCast.request;
- }
-
- return request as Request || request as string;
- }
-
- public static getRequest(objRequest: string | Request, gridRequest: GridRequest) {
- if (typeof objRequest === 'string') {
- return new Request(objRequest,
- {
- body: JSON.stringify(gridRequest),
- headers: new Headers({ 'Content-Type': 'application/json;charset=utf-8' }),
- method: 'POST',
- });
- }
-
- (objRequest as Request).headers.append('Content-Type', 'application/json;charset=utf-8');
-
- return new Request(objRequest.url,
- {
- body: JSON.stringify(gridRequest),
- headers: (objRequest as Request).headers,
- method: (objRequest as Request).method,
- });
- }
-
- public static isValidResponse(data: any) {
- return data && expectedStructureKeys === JSON.stringify(Object.keys(data).sort());
- }
-
- public static parsePayload(row: any, c: any[]) {
- return c.reduce((obj: any, column: any, key: any) => {
- obj[column.Name] = row[key] || row[column.Name];
-
- return obj;
- }, {});
- }
-
- public request: string | Request;
-
- public constructor(request: string | Request | ITubularHttpClient) {
- this.request = TubularHttpClient.resolveRequest(request);
- }
-
- public async fetch(gridRequest: GridRequest): Promise {
- const response = await fetch(TubularHttpClient.getRequest(this.request, gridRequest));
-
- if (response.status >= 200 && response.status < 300) {
- const responseBody: string = await response.text();
-
- return responseBody ? JSON.parse(responseBody) : {};
- }
-
- throw new Error('Invalid request');
- }
-}
diff --git a/src/utils/debounce.ts b/src/utils/debounce.ts
deleted file mode 100644
index 92c1bd2d..00000000
--- a/src/utils/debounce.ts
+++ /dev/null
@@ -1,24 +0,0 @@
-// based on https://github.com/chodorowicz/ts-debounce/blob/master/src/index.ts
-export type Procedure = (...args: any[]) => void;
-
-export function debounce(
- func: F,
- waitMilliseconds = 500,
-): F {
- let timeoutId: any;
-
- return function(this: any, ...args: any[]) {
- const context = this;
-
- const doLater = () => {
- timeoutId = undefined;
- func.apply(context, args);
- };
-
- if (timeoutId !== undefined) {
- clearTimeout(timeoutId);
- }
-
- timeoutId = setTimeout(doLater, waitMilliseconds);
- } as any;
-}
diff --git a/src/utils/index.ts b/src/utils/index.ts
index 24fe3155..4a730bf4 100644
--- a/src/utils/index.ts
+++ b/src/utils/index.ts
@@ -1,14 +1 @@
-import ITubularHttpClient from './ITubularHttpClient';
-import { renderCellContent, renderCells, renderDateTimeCell } from './renders';
-import ShallowHttpClient, { FetchHandler } from './ShallowHttpClient';
-import TubularHttpClient from './TubularHttpClient';
-
-export {
- FetchHandler,
- ShallowHttpClient,
- ITubularHttpClient,
- TubularHttpClient,
- renderCellContent,
- renderCells,
- renderDateTimeCell,
-};
+export * from './renders';
diff --git a/src/utils/renders.tsx b/src/utils/renders.tsx
index 1adf048f..93cd1592 100644
--- a/src/utils/renders.tsx
+++ b/src/utils/renders.tsx
@@ -1,30 +1,18 @@
import TableCell from '@material-ui/core/TableCell';
import CheckBox from '@material-ui/icons/CheckBox';
import CheckBoxOutlineBlank from '@material-ui/icons/CheckBoxOutlineBlank';
-import format from 'date-fns/format';
-import getYear from 'date-fns/getYear';
-import parseISO from 'date-fns/parseISO';
import * as React from 'react';
-import { ColumnDataType, ColumnModel } from 'tubular-common';
-
-export const renderDateTimeCell: any = (value: any, formatString: string = 'M/d/yyyy') => {
- if (!value) {
- return '';
- }
-
- const parsedValue = parseISO(value);
- return getYear(parsedValue) > 0 ? format(parsedValue, formatString) : '';
-};
+import { ColumnDataType, ColumnModel, formatDate, getColumnAlign } from 'tubular-common';
export const renderCellContent: any = (column: ColumnModel, row: any) => {
switch (column.DataType) {
case ColumnDataType.NUMERIC:
return row[column.Name] || 0;
case ColumnDataType.DATE:
- return renderDateTimeCell(row[column.Name]);
+ return formatDate(row[column.Name]);
case ColumnDataType.DATE_TIME:
case ColumnDataType.DATE_TIME_UTC:
- return renderDateTimeCell(row[column.Name], 'M/d/yyyy h:mm a');
+ return formatDate(row[column.Name], 'M/d/yyyy h:mm a');
case ColumnDataType.BOOLEAN:
return row[column.Name] === true ? : ;
default:
@@ -32,17 +20,6 @@ export const renderCellContent: any = (column: ColumnModel, row: any) => {
}
};
-export const renderCellAlign: string = (column: ColumnModel) => {
- switch (column.DataType) {
- case ColumnDataType.NUMERIC:
- return 'right';
- case ColumnDataType.BOOLEAN:
- return 'center';
- default:
- return 'inherit';
- }
-};
-
export const renderCells: any = (columns: ColumnModel[], row: any) =>
columns
.filter((col: ColumnModel) => col.Visible)
@@ -51,7 +28,7 @@ export const renderCells: any = (columns: ColumnModel[], row: any) =>
{renderCellContent(column, row)}
diff --git a/srcdocs/components/BasicFeatures.tsx b/srcdocs/components/BasicFeatures.tsx
index 17d01e67..8b4ac44f 100644
--- a/srcdocs/components/BasicFeatures.tsx
+++ b/srcdocs/components/BasicFeatures.tsx
@@ -1,15 +1,13 @@
import * as React from 'react';
import { DataGrid } from '../../src';
-import { LocalStorage } from '../../src/Storage';
+import { LocalStorage } from 'tubular-common';
import columns from '../utils/columns';
export default () => (
-
-
-
+
);
diff --git a/srcdocs/components/CustomizableGrid.tsx b/srcdocs/components/CustomizableGrid.tsx
index cc84771e..4d19ebec 100644
--- a/srcdocs/components/CustomizableGrid.tsx
+++ b/srcdocs/components/CustomizableGrid.tsx
@@ -1,6 +1,6 @@
import * as React from 'react';
+import { LocalStorage } from 'tubular-common';
import { DataGrid } from '../../src';
-import { LocalStorage } from '../../src/Storage';
import columns from '../utils/columns';
export default ({
diff --git a/srcdocs/utils/codeSnipetExamples.ts b/srcdocs/utils/codeSnipetExamples.ts
index 887143a6..9994f124 100644
--- a/srcdocs/utils/codeSnipetExamples.ts
+++ b/srcdocs/utils/codeSnipetExamples.ts
@@ -28,9 +28,9 @@ import IconButton from '@material-ui/core/IconButton';
import Brightness7Rounded from '@material-ui/icons/Brightness7Rounded';
import Mood from '@material-ui/icons/Mood';
-import { DataGridProvider, DataGridTable, ToolbarOptions, withRemoteDataSource, renderDateTimeCell } from 'tubular-react';
+import { DataGridProvider, DataGridTable, ToolbarOptions, withRemoteDataSource } from 'tubular-react';
-import { AggregateFunctions, ColumnDataType, ColumnModel, ColumnSortDirection } from 'tubular-common';
+import { AggregateFunctions, ColumnDataType, ColumnModel, ColumnSortDirection, formatDate } from 'tubular-common';
// First of all, you must define your columns model.
const columns = [
@@ -82,7 +82,7 @@ const MyComponent = () => {
{row.OrderID}
{row.CustomerName}
- {renderDateTimeCell(row.ShippedDate, 'MMMM Do yyyy, h:mm:ss a')}
+ {formatDate(row.ShippedDate, 'MMMM Do yyyy, h:mm:ss a')}
{row.ShipperCity}
@@ -127,7 +127,7 @@ export const simpleFeatures = `import React from 'react';
import { Snackbar, TableCell, TableRow } from '@material-ui/core';
import CheckBox from '@material-ui/icons/CheckBox';
import CheckBoxOutlineBlank from '@material-ui/icons/CheckBoxOutlineBlank';
-import { DataGridProvider, DataGridTable, ToolbarOptions, withRemoteDataSource, renderDateTimeCell } from 'tubular-react';
+import { DataGridProvider, DataGridTable, ToolbarOptions, withRemoteDataSource, formatDate } from 'tubular-react';
import {
AggregateFunctions,
@@ -204,7 +204,7 @@ class SampleFeatures extends React.Component {
{row.CustomerName}
- {renderDateTimeCell(row.ShippedDate, 'MMMM Do yyyy, h:mm:ss a')}
+ {formatDate(row.ShippedDate, 'MMMM Do yyyy, h:mm:ss a')}
{row.ShipperCity}
@@ -254,8 +254,6 @@ import {
} from '@material-ui/core';
import LinearProgress from '@material-ui/core/LinearProgress';
import Paper from '@material-ui/core/Paper';
-import format from 'date-fns/format';
-import parseISO from 'date-fns/parseISO';
import import {
DataSourceContext,
DataGridProvider,
@@ -263,13 +261,13 @@ import import {
Paginator,
SearchTextInput,
withRemoteDataSource,
- renderDateTimeCell,
} from 'tubular-react';
import {
AggregateFunctions,
ColumnDataType,
ColumnModel,
- ColumnSortDirection
+ ColumnSortDirection,
+ formatDate
} from 'tubular-common';
const columns = [
@@ -361,7 +359,7 @@ class SampleGridList extends React.Component {
{item.ShipperCity}
- {renderDateTimeCell(item.ShippedDate, 'MMM d yyyy')}
+ {formatDate(item.ShippedDate, 'MMM d yyyy')}
diff --git a/test/DataGrid.spec.tsx b/test/DataGrid.spec.tsx
index bb5a47e6..c03815c1 100644
--- a/test/DataGrid.spec.tsx
+++ b/test/DataGrid.spec.tsx
@@ -1,7 +1,7 @@
import { cleanup, Matcher, MatcherOptions, render } from '@testing-library/react';
import * as React from 'react';
+import { LocalStorage } from 'tubular-common';
import { DataGrid } from '../src/DataGrid';
-import { LocalStorage } from '../src/Storage/LocalStorage';
import { ToolbarOptions } from '../src/Toolbar/ToolbarOptions';
import { validColumnsSample } from './utils/columns';
import { localData } from './utils/localData';