@servicetitan/table 16.0.0 → 17.0.0
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/demo/master-detail/detail-table.js +7 -7
- package/dist/demo/master-detail/detail-table.js.map +1 -1
- package/dist/demo/master-detail/detail-table.store.js +4 -4
- package/dist/demo/master-detail/detail-table.store.js.map +1 -1
- package/dist/demo/master-detail/master-table.store.js +3 -3
- package/dist/demo/master-detail/master-table.store.js.map +1 -1
- package/dist/demo/master-detail/table-master-detail.js +5 -5
- package/dist/demo/master-detail/table-master-detail.js.map +1 -1
- package/dist/demo/overview/actions-cell.js +5 -5
- package/dist/demo/overview/actions-cell.js.map +1 -1
- package/dist/demo/overview/table.js +12 -12
- package/dist/demo/overview/table.js.map +1 -1
- package/dist/demo/overview/table.store.js +3 -3
- package/dist/demo/overview/table.store.js.map +1 -1
- package/dist/demo/state-caching/state-caching-table.js +4 -4
- package/dist/demo/state-caching/state-caching-table.js.map +1 -1
- package/dist/demo/state-caching/state-caching-table.store.js +1 -1
- package/dist/demo/state-caching/state-caching-table.store.js.map +1 -1
- package/dist/editable-cell/boolean-editable-cell.js +3 -3
- package/dist/editable-cell/boolean-editable-cell.js.map +1 -1
- package/dist/editable-cell/date-editable-cell.js +3 -3
- package/dist/editable-cell/date-editable-cell.js.map +1 -1
- package/dist/editable-cell/get-action-cell.js +3 -3
- package/dist/editable-cell/get-action-cell.js.map +1 -1
- package/dist/editable-cell/get-editable-cell.js +3 -3
- package/dist/editable-cell/get-editable-cell.js.map +1 -1
- package/dist/editable-cell/get-select-editable-cell.js +3 -3
- package/dist/editable-cell/get-select-editable-cell.js.map +1 -1
- package/dist/editable-cell/numeric-editable-cell.js +3 -3
- package/dist/editable-cell/numeric-editable-cell.js.map +1 -1
- package/dist/editable-cell/text-editable-cell.js +3 -3
- package/dist/editable-cell/text-editable-cell.js.map +1 -1
- package/dist/export/export.js +1 -1
- package/dist/export/export.js.map +1 -1
- package/dist/filters/column-menu-filters.js +3 -3
- package/dist/filters/column-menu-filters.js.map +1 -1
- package/dist/filters/datetime-filter/datetime-filter.js +4 -4
- package/dist/filters/datetime-filter/datetime-filter.js.map +1 -1
- package/dist/filters/datetime-filter/datetime-filter.module.css +1 -1
- package/dist/filters/field-values-filter.js +4 -4
- package/dist/filters/field-values-filter.js.map +1 -1
- package/dist/filters/multiselect-filter.js +7 -7
- package/dist/filters/multiselect-filter.js.map +1 -1
- package/dist/filters/numeric-filter-extended/numeric-filter-extended.js +5 -5
- package/dist/filters/numeric-filter-extended/numeric-filter-extended.js.map +1 -1
- package/dist/filters/range-filter/range-filter.js +8 -8
- package/dist/filters/range-filter/range-filter.js.map +1 -1
- package/dist/filters/range-filter/range-filter.module.css +1 -1
- package/dist/filters/standard-filter-with-multiselect/filter-cell-ext.js +7 -7
- package/dist/filters/standard-filter-with-multiselect/filter-cell-ext.js.map +1 -1
- package/dist/filters/standard-filter-with-multiselect/standard-filter-with-multiselect.js +5 -5
- package/dist/filters/standard-filter-with-multiselect/standard-filter-with-multiselect.js.map +1 -1
- package/dist/filters/standard-filter-with-multiselect/table-column-menu-filter-ext.js +1 -1
- package/dist/filters/standard-filter-with-multiselect/table-column-menu-filter-ext.js.map +1 -1
- package/dist/filters/time-filter/time-filter.js +4 -4
- package/dist/filters/time-filter/time-filter.js.map +1 -1
- package/dist/filters/time-filter/time-filter.module.css +1 -1
- package/dist/select-cell/select-cell.js +4 -4
- package/dist/select-cell/select-cell.js.map +1 -1
- package/dist/select-cell/select-cell.module.css +1 -1
- package/dist/table-state.js +14 -14
- package/dist/table-state.js.map +1 -1
- package/dist/table.js +16 -16
- package/dist/table.js.map +1 -1
- package/package.json +8 -8
- package/src/filters/datetime-filter/datetime-filter.module.css +1 -1
- package/src/filters/range-filter/range-filter.module.css +1 -1
- package/src/filters/time-filter/time-filter.module.css +1 -1
- package/src/select-cell/select-cell.module.css +1 -1
@@ -8,24 +8,24 @@ const mobx_react_1 = require("mobx-react");
|
|
8
8
|
const design_system_1 = require("@servicetitan/design-system");
|
9
9
|
const __1 = require("../..");
|
10
10
|
const detail_table_store_1 = require("./detail-table.store");
|
11
|
-
exports.DetailTable = react_ioc_1.provide({
|
11
|
+
exports.DetailTable = (0, react_ioc_1.provide)({
|
12
12
|
singletons: [detail_table_store_1.DetailTableStore],
|
13
|
-
})(mobx_react_1.observer(({ dataItem }) => {
|
14
|
-
const [store] = react_ioc_1.useDependencies(detail_table_store_1.DetailTableStore);
|
15
|
-
react_1.useEffect(() => {
|
13
|
+
})((0, mobx_react_1.observer)(({ dataItem }) => {
|
14
|
+
const [store] = (0, react_ioc_1.useDependencies)(detail_table_store_1.DetailTableStore);
|
15
|
+
(0, react_1.useEffect)(() => {
|
16
16
|
store.initialize(dataItem);
|
17
17
|
return () => store.dispose();
|
18
18
|
}, [store, dataItem]);
|
19
19
|
if (!store.tableState) {
|
20
20
|
return null;
|
21
21
|
}
|
22
|
-
return (jsx_runtime_1.jsxs(__1.Table, Object.assign({ selectable: true, hideSelectAll: true, tableState: store.tableState, selectionControl: LockFieldIcon }, { children: [jsx_runtime_1.jsx(__1.TableColumn, { field: "Field" }, void 0), jsx_runtime_1.jsx(__1.TableColumn, { field: "OldValue" }, void 0), jsx_runtime_1.jsx(__1.TableColumn, { field: "NewValue" }, void 0)] }), void 0));
|
22
|
+
return ((0, jsx_runtime_1.jsxs)(__1.Table, Object.assign({ selectable: true, hideSelectAll: true, tableState: store.tableState, selectionControl: LockFieldIcon }, { children: [(0, jsx_runtime_1.jsx)(__1.TableColumn, { field: "Field" }, void 0), (0, jsx_runtime_1.jsx)(__1.TableColumn, { field: "OldValue" }, void 0), (0, jsx_runtime_1.jsx)(__1.TableColumn, { field: "NewValue" }, void 0)] }), void 0));
|
23
23
|
}));
|
24
24
|
const LockFieldIcon = props => {
|
25
25
|
const { checked, disabled } = props;
|
26
26
|
if (!disabled) {
|
27
|
-
return jsx_runtime_1.jsx(design_system_1.Checkbox, Object.assign({}, props), void 0);
|
27
|
+
return (0, jsx_runtime_1.jsx)(design_system_1.Checkbox, Object.assign({}, props), void 0);
|
28
28
|
}
|
29
|
-
return (jsx_runtime_1.jsx("div", { children: checked ? (jsx_runtime_1.jsx(design_system_1.Icon, { name: "check", className: "c-blue-300" }, void 0)) : (jsx_runtime_1.jsx(design_system_1.Icon, { name: "remove", className: "c-neutral-70" }, void 0)) }, void 0));
|
29
|
+
return ((0, jsx_runtime_1.jsx)("div", { children: checked ? ((0, jsx_runtime_1.jsx)(design_system_1.Icon, { name: "check", className: "c-blue-300" }, void 0)) : ((0, jsx_runtime_1.jsx)(design_system_1.Icon, { name: "remove", className: "c-neutral-70" }, void 0)) }, void 0));
|
30
30
|
};
|
31
31
|
//# sourceMappingURL=detail-table.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"detail-table.js","sourceRoot":"","sources":["../../../src/demo/master-detail/detail-table.tsx"],"names":[],"mappings":";;;;AAAA,iCAAsC;AAEtC,uDAAmE;AAEnE,2CAAsC;AAEtC,+DAA4E;AAE5E,6BAAgE;AAEhE,6DAAwD;AAE3C,QAAA,WAAW,GAA4B,mBAAO,
|
1
|
+
{"version":3,"file":"detail-table.js","sourceRoot":"","sources":["../../../src/demo/master-detail/detail-table.tsx"],"names":[],"mappings":";;;;AAAA,iCAAsC;AAEtC,uDAAmE;AAEnE,2CAAsC;AAEtC,+DAA4E;AAE5E,6BAAgE;AAEhE,6DAAwD;AAE3C,QAAA,WAAW,GAA4B,IAAA,mBAAO,EAAC;IACxD,UAAU,EAAE,CAAC,qCAAgB,CAAC;CACjC,CAAC,CACE,IAAA,qBAAQ,EAAC,CAAC,EAAE,QAAQ,EAAE,EAAE,EAAE;IACtB,MAAM,CAAC,KAAK,CAAC,GAAG,IAAA,2BAAe,EAAC,qCAAgB,CAAC,CAAC;IAElD,IAAA,iBAAS,EAAC,GAAG,EAAE;QACX,KAAK,CAAC,UAAU,CAAC,QAAQ,CAAC,CAAC;QAC3B,OAAO,GAAG,EAAE,CAAC,KAAK,CAAC,OAAO,EAAE,CAAC;IACjC,CAAC,EAAE,CAAC,KAAK,EAAE,QAAQ,CAAC,CAAC,CAAC;IAEtB,IAAI,CAAC,KAAK,CAAC,UAAU,EAAE;QACnB,OAAO,IAAI,CAAC;KACf;IAED,OAAO,CACH,wBAAC,SAAK,kBACF,UAAU,QACV,aAAa,QACb,UAAU,EAAE,KAAK,CAAC,UAAU,EAC5B,gBAAgB,EAAE,aAAa,iBAE/B,uBAAC,eAAW,IAAC,KAAK,EAAC,OAAO,WAAG,EAE7B,uBAAC,eAAW,IAAC,KAAK,EAAC,UAAU,WAAG,EAEhC,uBAAC,eAAW,IAAC,KAAK,EAAC,UAAU,WAAG,aAC5B,CACX,CAAC;AACN,CAAC,CAAC,CACL,CAAC;AAEF,MAAM,aAAa,GAA6B,KAAK,CAAC,EAAE;IACpD,MAAM,EAAE,OAAO,EAAE,QAAQ,EAAE,GAAG,KAAK,CAAC;IAEpC,IAAI,CAAC,QAAQ,EAAE;QACX,OAAO,uBAAC,wBAAQ,oBAAK,KAAK,UAAI,CAAC;KAClC;IAED,OAAO,CACH,0CACK,OAAO,CAAC,CAAC,CAAC,CACP,uBAAC,oBAAI,IAAC,IAAI,EAAC,OAAO,EAAC,SAAS,EAAC,YAAY,WAAG,CAC/C,CAAC,CAAC,CAAC,CACA,uBAAC,oBAAI,IAAC,IAAI,EAAC,QAAQ,EAAC,SAAS,EAAC,cAAc,WAAG,CAClD,WACC,CACT,CAAC;AACN,CAAC,CAAC"}
|
@@ -47,8 +47,8 @@ let DetailTableStore = class DetailTableStore {
|
|
47
47
|
writable: true,
|
48
48
|
value: void 0
|
49
49
|
});
|
50
|
-
mobx_1.makeObservable(this);
|
51
|
-
this.disposeSelectedObserve = mobx_1.observe(this, 'selected', ({ oldValue, newValue }) => {
|
50
|
+
(0, mobx_1.makeObservable)(this);
|
51
|
+
this.disposeSelectedObserve = (0, mobx_1.observe)(this, 'selected', ({ oldValue, newValue }) => {
|
52
52
|
if (!oldValue && newValue) {
|
53
53
|
this.setLockedRowsSelection(true);
|
54
54
|
}
|
@@ -85,7 +85,7 @@ __decorate([
|
|
85
85
|
__metadata("design:type", __1.TableState)
|
86
86
|
], DetailTableStore.prototype, "tableState", void 0);
|
87
87
|
__decorate([
|
88
|
-
react_ioc_1.inject(master_table_store_1.MasterTableStore),
|
88
|
+
(0, react_ioc_1.inject)(master_table_store_1.MasterTableStore),
|
89
89
|
__metadata("design:type", master_table_store_1.MasterTableStore)
|
90
90
|
], DetailTableStore.prototype, "masterTableStore", void 0);
|
91
91
|
__decorate([
|
@@ -100,7 +100,7 @@ __decorate([
|
|
100
100
|
__metadata("design:returntype", void 0)
|
101
101
|
], DetailTableStore.prototype, "initialize", null);
|
102
102
|
DetailTableStore = __decorate([
|
103
|
-
react_ioc_1.injectable(),
|
103
|
+
(0, react_ioc_1.injectable)(),
|
104
104
|
__metadata("design:paramtypes", [])
|
105
105
|
], DetailTableStore);
|
106
106
|
exports.DetailTableStore = DetailTableStore;
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"detail-table.store.js","sourceRoot":"","sources":["../../../src/demo/master-detail/detail-table.store.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA,uDAA6D;AAE7D,+BAAqF;AAErF,6BAAmC;AAEnC,6DAAwD;AAMxD,IAAa,gBAAgB,GAA7B,MAAa,gBAAgB;IAgBzB;QAfY;;;;;WAAgE;QAE5E;;;WAGG;QAEH;;;;;WAA4C;QAM5C;;;;;WAAuC;QAGnC,qBAAc,
|
1
|
+
{"version":3,"file":"detail-table.store.js","sourceRoot":"","sources":["../../../src/demo/master-detail/detail-table.store.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA,uDAA6D;AAE7D,+BAAqF;AAErF,6BAAmC;AAEnC,6DAAwD;AAMxD,IAAa,gBAAgB,GAA7B,MAAa,gBAAgB;IAgBzB;QAfY;;;;;WAAgE;QAE5E;;;WAGG;QAEH;;;;;WAA4C;QAM5C;;;;;WAAuC;QAGnC,IAAA,qBAAc,EAAC,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,cAAU;oDAAyC;AAO5E;IADC,IAAA,kBAAM,EAAC,qCAAgB,CAAC;8BACE,qCAAgB;0DAAC;AAElC;IAAT,eAAQ;;;gDAER;AAeD;IADC,aAAM;;;;kDAGN;AA7BQ,gBAAgB;IAD5B,IAAA,sBAAU,GAAE;;GACA,gBAAgB,CAsD5B;AAtDY,4CAAgB"}
|
@@ -38,8 +38,8 @@ let MasterTableStore = class MasterTableStore {
|
|
38
38
|
writable: true,
|
39
39
|
value: void 0
|
40
40
|
});
|
41
|
-
mobx_1.makeObservable(this);
|
42
|
-
this.disposeSelectedIdsObserve = mobx_1.observe(this, 'selectedIds', change => {
|
41
|
+
(0, mobx_1.makeObservable)(this);
|
42
|
+
this.disposeSelectedIdsObserve = (0, mobx_1.observe)(this, 'selectedIds', change => {
|
43
43
|
const { oldValue = [], newValue } = change;
|
44
44
|
const before = new Set(oldValue);
|
45
45
|
const after = new Set(newValue);
|
@@ -99,7 +99,7 @@ __decorate([
|
|
99
99
|
__metadata("design:paramtypes", [])
|
100
100
|
], MasterTableStore.prototype, "selectedIds", null);
|
101
101
|
MasterTableStore = __decorate([
|
102
|
-
react_ioc_1.injectable(),
|
102
|
+
(0, react_ioc_1.injectable)(),
|
103
103
|
__metadata("design:paramtypes", [])
|
104
104
|
], MasterTableStore);
|
105
105
|
exports.MasterTableStore = MasterTableStore;
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"master-table.store.js","sourceRoot":"","sources":["../../../src/demo/master-detail/master-table.store.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,uDAAqD;AAErD,+BAAiE;AAEjE,6BAAuD;AAGvD,yCAAsC;AAGtC,uDAAmD;AAGnD,IAAa,gBAAgB,GAA7B,MAAa,gBAAgB;IAczB;QAbA;;;;mBAA0C,IAAI,cAAU,CAAC;gBACrD,UAAU,EAAE,IAAI,sBAAkB,CAAC,mBAAQ,EAAE,GAAG,CAAC,EAAE,CAAC,GAAG,CAAC,SAAS,CAAC;gBAClE,mB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AgB,CAAC;IAC5B,CAAC;IAEO,kBAAkB,CAAC,EAAU,EAAE,KAAc;QACjD,MAAM,MAAM,GAAG,IAAI,CAAC,UAAU,CAAC,mBAAoB,CAAC,EAAE,SAAS,EAAE,EAAE,EAAa,CAAC,CAAC;QAElF,IAAI,CAAC,MAAM,IAAI,CAAC,MAAM,CAAC,UAAU,EAAE;YAC/B,OAAO;SACV;QAED,IAAI,KAAK,EAAE;YACP,MAAM,CAAC,SAAS,CAAC,EAAE,kBAAkB,EAAE,KAAK,EAAE,CAAC,CAAC;SACnD;aAAM,IAAI,CAAC,MAAM,CAAC,sBAAsB,EAAE;YACvC,MAAM,CAAC,WAAW,CAAC,EAAE,kBAAkB,EAAE,KAAK,EAAE,CAAC,CAAC;SACrD;IACL,CAAC;CACJ,CAAA;AA7Ea;IAAT,eAAQ;;;mDAER;AAVQ,gBAAgB;IAD5B,IAAA,sBAAU,GAAE;;GACA,gBAAgB,CAqF5B;AArFY,4CAAgB"}
|
@@ -15,13 +15,13 @@ const ExpandCell = ({ tableState, dataItem }) => {
|
|
15
15
|
value: !dataItem.expanded,
|
16
16
|
});
|
17
17
|
};
|
18
|
-
return (jsx_runtime_1.jsx("td", { children: jsx_runtime_1.jsx(design_system_1.Button, Object.assign({ full: true, text: true, primary: true, onClick: handleExpandChange }, { children: "Show / Hide" }), void 0) }, void 0));
|
18
|
+
return ((0, jsx_runtime_1.jsx)("td", { children: (0, jsx_runtime_1.jsx)(design_system_1.Button, Object.assign({ full: true, text: true, primary: true, onClick: handleExpandChange }, { children: "Show / Hide" }), void 0) }, void 0));
|
19
19
|
};
|
20
|
-
exports.TableMasterDetailExample = react_ioc_1.provide({
|
20
|
+
exports.TableMasterDetailExample = (0, react_ioc_1.provide)({
|
21
21
|
singletons: [master_table_store_1.MasterTableStore],
|
22
22
|
})(() => {
|
23
|
-
const [store] = react_ioc_1.useDependencies(master_table_store_1.MasterTableStore);
|
24
|
-
react_1.useEffect(() => () => store.dispose());
|
25
|
-
return (jsx_runtime_1.jsxs(__1.Table, Object.assign({ tableState: store.tableState, selectable: true, detail: detail_table_1.DetailTable }, { children: [jsx_runtime_1.jsx(__1.TableColumn, { field: "ProductID", title: "ID", width: "100px" }, void 0), jsx_runtime_1.jsx(__1.TableColumn, { field: "ProductName", title: "Product Name" }, void 0), jsx_runtime_1.jsx(__1.TableColumn, { cell: ExpandCell, width: "150px" }, void 0)] }), void 0));
|
23
|
+
const [store] = (0, react_ioc_1.useDependencies)(master_table_store_1.MasterTableStore);
|
24
|
+
(0, react_1.useEffect)(() => () => store.dispose());
|
25
|
+
return ((0, jsx_runtime_1.jsxs)(__1.Table, Object.assign({ tableState: store.tableState, selectable: true, detail: detail_table_1.DetailTable }, { children: [(0, jsx_runtime_1.jsx)(__1.TableColumn, { field: "ProductID", title: "ID", width: "100px" }, void 0), (0, jsx_runtime_1.jsx)(__1.TableColumn, { field: "ProductName", title: "Product Name" }, void 0), (0, jsx_runtime_1.jsx)(__1.TableColumn, { cell: ExpandCell, width: "150px" }, void 0)] }), void 0));
|
26
26
|
});
|
27
27
|
//# sourceMappingURL=table-master-detail.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"table-master-detail.js","sourceRoot":"","sources":["../../../src/demo/master-detail/table-master-detail.tsx"],"names":[],"mappings":";;;;AAAA,iCAAsC;AAEtC,uDAAmE;AAEnE,+DAAqD;AAErD,6BAAmF;AAEnF,6DAAwD;AAExD,iDAA6C;AAE7C,MAAM,UAAU,GAAuB,CAAC,EAAE,UAAU,EAAE,QAAQ,EAAE,EAAE,EAAE;IAChE,MAAM,kBAAkB,GAAG,GAAG,EAAE;QAC5B,UAAW,CAAC,kBAAkB,CAAC;YAC3B,QAAQ;YACR,KAAK,EAAE,CAAC,QAAQ,CAAC,QAAQ;SACF,CAAC,CAAC;IACjC,CAAC,CAAC;IAEF,OAAO,CACH,
|
1
|
+
{"version":3,"file":"table-master-detail.js","sourceRoot":"","sources":["../../../src/demo/master-detail/table-master-detail.tsx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15
|
const __1 = require("../..");
|
16
16
|
const ViewAction = ({ tableState, dataItem }) => {
|
17
17
|
if (!tableState) {
|
18
|
-
return jsx_runtime_1.jsx("td", {}, void 0);
|
18
|
+
return (0, jsx_runtime_1.jsx)("td", {}, void 0);
|
19
19
|
}
|
20
20
|
const edit = () => tableState.edit(dataItem);
|
21
|
-
return (jsx_runtime_1.jsx("td", { children: jsx_runtime_1.jsx(design_system_1.Button, Object.assign({ text: true, primary: true, onClick: edit }, { children: jsx_runtime_1.jsx(design_system_1.Icon, { name: "edit" }, void 0) }), void 0) }, void 0));
|
21
|
+
return ((0, jsx_runtime_1.jsx)("td", { children: (0, jsx_runtime_1.jsx)(design_system_1.Button, Object.assign({ text: true, primary: true, onClick: edit }, { children: (0, jsx_runtime_1.jsx)(design_system_1.Icon, { name: "edit" }, void 0) }), void 0) }, void 0));
|
22
22
|
};
|
23
23
|
const EditAction = ({ tableState, formState, dataItem }) => {
|
24
24
|
if (!tableState) {
|
25
|
-
return jsx_runtime_1.jsx("td", {}, void 0);
|
25
|
+
return (0, jsx_runtime_1.jsx)("td", {}, void 0);
|
26
26
|
}
|
27
27
|
const save = () => __awaiter(void 0, void 0, void 0, function* () {
|
28
28
|
const { hasError } = yield formState.validate();
|
@@ -32,9 +32,9 @@ const EditAction = ({ tableState, formState, dataItem }) => {
|
|
32
32
|
yield tableState.saveEdit(dataItem);
|
33
33
|
});
|
34
34
|
const cancel = () => tableState.cancelEdit(dataItem);
|
35
|
-
return (jsx_runtime_1.jsx("td", { children: jsx_runtime_1.jsxs(design_system_1.Stack, Object.assign({ justifyContent: "space-between" }, { children: [jsx_runtime_1.jsx(design_system_1.Button, Object.assign({ text: true, onClick: cancel }, { children: jsx_runtime_1.jsx(design_system_1.Icon, { name: "do_not_disturb" }, void 0) }), void 0), jsx_runtime_1.jsx(design_system_1.Button, Object.assign({ text: true, primary: true, onClick: save }, { children: jsx_runtime_1.jsx(design_system_1.Icon, { name: "done" }, void 0) }), void 0)] }), void 0) }, void 0));
|
35
|
+
return ((0, jsx_runtime_1.jsx)("td", { children: (0, jsx_runtime_1.jsxs)(design_system_1.Stack, Object.assign({ justifyContent: "space-between" }, { children: [(0, jsx_runtime_1.jsx)(design_system_1.Button, Object.assign({ text: true, onClick: cancel }, { children: (0, jsx_runtime_1.jsx)(design_system_1.Icon, { name: "do_not_disturb" }, void 0) }), void 0), (0, jsx_runtime_1.jsx)(design_system_1.Button, Object.assign({ text: true, primary: true, onClick: save }, { children: (0, jsx_runtime_1.jsx)(design_system_1.Icon, { name: "done" }, void 0) }), void 0)] }), void 0) }, void 0));
|
36
36
|
};
|
37
|
-
exports.ActionsCell = __1.getActionCell({
|
37
|
+
exports.ActionsCell = (0, __1.getActionCell)({
|
38
38
|
view: ViewAction,
|
39
39
|
edit: EditAction,
|
40
40
|
});
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"actions-cell.js","sourceRoot":"","sources":["../../../src/demo/overview/actions-cell.tsx"],"names":[],"mappings":";;;;;;;;;;;;;AAEA,+DAAkE;AAElE,6BAAuE;AAIvE,MAAM,UAAU,GAAgC,CAAC,EAAE,UAAU,EAAE,QAAQ,EAAE,EAAE,EAAE;IACzE,IAAI,CAAC,UAAU,EAAE;QACb,OAAO,
|
1
|
+
{"version":3,"file":"actions-cell.js","sourceRoot":"","sources":["../../../src/demo/overview/actions-cell.tsx"],"names":[],"mappings":";;;;;;;;;;;;;AAEA,+DAAkE;AAElE,6BAAuE;AAIvE,MAAM,UAAU,GAAgC,CAAC,EAAE,UAAU,EAAE,QAAQ,EAAE,EAAE,EAAE;IACzE,IAAI,CAAC,UAAU,EAAE;QACb,OAAO,wCAAM,CAAC;KACjB;IAED,MAAM,IAAI,GAAG,GAAG,EAAE,CAAC,UAAU,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;IAE7C,OAAO,CACH,yCACI,uBAAC,sBAAM,kBAAC,IAAI,QAAC,OAAO,QAAC,OAAO,EAAE,IAAI,gBAC9B,uBAAC,oBAAI,IAAC,IAAI,EAAC,MAAM,WAAG,YACf,WACR,CACR,CAAC;AACN,CAAC,CAAC;AAEF,MAAM,UAAU,GAAiC,CAAC,EAAE,UAAU,EAAE,SAAS,EAAE,QAAQ,EAAE,EAAE,EAAE;IACrF,IAAI,CAAC,UAAU,EAAE;QACb,OAAO,wCAAM,CAAC;KACjB;IAED,MAAM,IAAI,GAAG,GAAS,EAAE;QACpB,MAAM,EAAE,QAAQ,EAAE,GAAG,MAAM,SAAS,CAAC,QAAQ,EAAE,CAAC;QAChD,IAAI,QAAQ,EAAE;YACV,OAAO;SACV;QAED,MAAM,UAAU,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC;IACxC,CAAC,CAAA,CAAC;IAEF,MAAM,MAAM,GAAG,GAAG,EAAE,CAAC,UAAU,CAAC,UAAU,CAAC,QAAQ,CAAC,CAAC;IAErD,OAAO,CACH,yCACI,wBAAC,qBAAK,kBAAC,cAAc,EAAC,eAAe,iBACjC,uBAAC,sBAAM,kBAAC,IAAI,QAAC,OAAO,EAAE,MAAM,gBACxB,uBAAC,oBAAI,IAAC,IAAI,EAAC,gBAAgB,WAAG,YACzB,EAET,uBAAC,sBAAM,kBAAC,IAAI,QAAC,OAAO,QAAC,OAAO,EAAE,IAAI,gBAC9B,uBAAC,oBAAI,IAAC,IAAI,EAAC,MAAM,WAAG,YACf,aACL,WACP,CACR,CAAC;AACN,CAAC,CAAC;AAEW,QAAA,WAAW,GAAG,IAAA,iBAAa,EAAC;IACrC,IAAI,EAAE,UAAU;IAChB,IAAI,EAAE,UAAU;CACnB,CAAC,CAAC"}
|
@@ -12,36 +12,36 @@ const table_store_1 = require("./table.store");
|
|
12
12
|
const actions_cell_1 = require("./actions-cell");
|
13
13
|
const form_1 = require("@servicetitan/form");
|
14
14
|
const product_1 = require("./product");
|
15
|
-
const UserRoleColumnMenuFilter = __1.multiSelectColumnMenuFilter(form_1.getEnumKeys(product_1.UserRole), userRole => (jsx_runtime_1.jsx(design_system_1.Tag, Object.assign({ compact: true, color: product_1.UserRole[userRole] === product_1.UserRole.Owner ? 'success' : 'default' }, { children: userRole }), void 0)));
|
16
|
-
const AvailableForEditableCell = __1.getSelectEditableCell({
|
17
|
-
options: form_1.enumToOptions(product_1.UserRole),
|
15
|
+
const UserRoleColumnMenuFilter = (0, __1.multiSelectColumnMenuFilter)((0, form_1.getEnumKeys)(product_1.UserRole), userRole => ((0, jsx_runtime_1.jsx)(design_system_1.Tag, Object.assign({ compact: true, color: product_1.UserRole[userRole] === product_1.UserRole.Owner ? 'success' : 'default' }, { children: userRole }), void 0)));
|
16
|
+
const AvailableForEditableCell = (0, __1.getSelectEditableCell)({
|
17
|
+
options: (0, form_1.enumToOptions)(product_1.UserRole),
|
18
18
|
viewer: ({ dataItem, field }) => {
|
19
19
|
const value = dataItem[field];
|
20
|
-
return jsx_runtime_1.jsx("td", { children: value && product_1.UserRole[value] }, void 0);
|
20
|
+
return (0, jsx_runtime_1.jsx)("td", { children: value && product_1.UserRole[value] }, void 0);
|
21
21
|
},
|
22
22
|
});
|
23
23
|
const SupplierCell = props => {
|
24
24
|
const { field, dataItem, rowType } = props;
|
25
25
|
if (rowType !== 'data') {
|
26
|
-
return jsx_runtime_1.jsx(__1.TableCell, Object.assign({}, props), void 0);
|
26
|
+
return (0, jsx_runtime_1.jsx)(__1.TableCell, Object.assign({}, props), void 0);
|
27
27
|
}
|
28
|
-
return jsx_runtime_1.jsx("td", { children: product_1.Supplier[dataItem[field]] }, void 0);
|
28
|
+
return (0, jsx_runtime_1.jsx)("td", { children: product_1.Supplier[dataItem[field]] }, void 0);
|
29
29
|
};
|
30
|
-
exports.TableExample = react_ioc_1.provide({
|
30
|
+
exports.TableExample = (0, react_ioc_1.provide)({
|
31
31
|
singletons: [table_store_1.TableStore],
|
32
|
-
})(mobx_react_1.observer((props) => {
|
33
|
-
const [{ tableState, inEdit, editAll, cancelAll, saveAll }] = react_ioc_1.useDependencies(table_store_1.TableStore);
|
34
|
-
const madeInColumnMenu = react_1.useMemo(() => __1.standardFilterWithMultiselect({ tableState }), [tableState]);
|
32
|
+
})((0, mobx_react_1.observer)((props) => {
|
33
|
+
const [{ tableState, inEdit, editAll, cancelAll, saveAll }] = (0, react_ioc_1.useDependencies)(table_store_1.TableStore);
|
34
|
+
const madeInColumnMenu = (0, react_1.useMemo)(() => (0, __1.standardFilterWithMultiselect)({ tableState }), [tableState]);
|
35
35
|
const cellRender = (td, { dataItem, field }) => {
|
36
36
|
if (!td) {
|
37
37
|
return null;
|
38
38
|
}
|
39
|
-
return react_1.cloneElement(td, {
|
39
|
+
return (0, react_1.cloneElement)(td, {
|
40
40
|
onClick: () => {
|
41
41
|
tableState.edit(dataItem, field);
|
42
42
|
},
|
43
43
|
});
|
44
44
|
};
|
45
|
-
return (jsx_runtime_1.jsxs(react_1.Fragment, { children: [jsx_runtime_1.jsxs(design_system_1.Stack, Object.assign({ justifyContent: "space-between", alignContent: "center", className: "m-b-2" }, { children: [jsx_runtime_1.jsx(export_1.Export, { totalCount: tableState.totalCount, exportPdf: tableState.exportPdf, exportExcel: tableState.exportExcel }, void 0), inEdit ? (jsx_runtime_1.jsxs(design_system_1.ButtonGroup, { children: [jsx_runtime_1.jsx(design_system_1.Button, Object.assign({ small: true, onClick: cancelAll, className: "m-r-2" }, { children: "Cancel All" }), void 0), jsx_runtime_1.jsx(design_system_1.Button, Object.assign({ small: true, primary: true, onClick: saveAll }, { children: "Save All" }), void 0)] }, void 0)) : (jsx_runtime_1.jsx(design_system_1.Button, Object.assign({ small: true, primary: true, onClick: editAll }, { children: "Edit All" }), void 0))] }), void 0), jsx_runtime_1.jsxs(__1.Table, Object.assign({ tableState: tableState, striped: false, selectable: true, groupable: true, sortable: true, exportable: true, exportFileName: "Table.Export.Test...File.Name.01.01.2020..~!@#$%^(*_+';", cellRender: cellRender }, { children: [jsx_runtime_1.jsx(__1.TableColumn, { field: "ProductID", title: "ID", editable: false, width: "100px" }, void 0), jsx_runtime_1.jsx(__1.TableColumn, { field: "ProductName", title: "Product Name", cell: __1.TextEditableCell, columnMenu: __1.StandardColumnMenuFilter, width: "240px" }, void 0), jsx_runtime_1.jsx(__1.TableColumn, { field: "Supplier", title: "Supplier", cell: SupplierCell, columnMenu: __1.StandardColumnMenuFilter, width: "150px" }, void 0), jsx_runtime_1.jsx(__1.TableColumn, { field: "MadeIn", title: "Made In", cell: __1.TextEditableCell, columnMenu: madeInColumnMenu, width: "175px" }, void 0), jsx_runtime_1.jsx(__1.TableColumn, { field: "UnitsOnOrder", title: "First Ordered On", cell: __1.DateEditableCell, columnMenu: __1.DateRangeColumnMenuFilter, format: "{0:d}", width: "240px" }, void 0), jsx_runtime_1.jsx(__1.TableColumn, { field: "UnitPrice", title: "Unit Price", cell: __1.NumericEditableCell, columnMenu: __1.CurrencyRangeColumnMenuFilter, format: "{0:c}", width: "125px" }, void 0), jsx_runtime_1.jsx(__1.TableColumn, { field: "Discontinued", title: "Discontinued", cell: __1.BooleanEditableCell, sortable: false, width: "125px" }, void 0), jsx_runtime_1.jsx(__1.TableColumn, { field: "AvailableFor", title: "Available For", cell: AvailableForEditableCell, columnMenu: UserRoleColumnMenuFilter, width: "240px" }, void 0), jsx_runtime_1.jsx(__1.TableColumn, Object.assign({ cell: actions_cell_1.ActionsCell, sortable: false }, (props.fixedWidthColumns ? { width: '125px' } : {})), void 0)] }), void 0)] }, void 0));
|
45
|
+
return ((0, jsx_runtime_1.jsxs)(react_1.Fragment, { children: [(0, jsx_runtime_1.jsxs)(design_system_1.Stack, Object.assign({ justifyContent: "space-between", alignContent: "center", className: "m-b-2" }, { children: [(0, jsx_runtime_1.jsx)(export_1.Export, { totalCount: tableState.totalCount, exportPdf: tableState.exportPdf, exportExcel: tableState.exportExcel }, void 0), inEdit ? ((0, jsx_runtime_1.jsxs)(design_system_1.ButtonGroup, { children: [(0, jsx_runtime_1.jsx)(design_system_1.Button, Object.assign({ small: true, onClick: cancelAll, className: "m-r-2" }, { children: "Cancel All" }), void 0), (0, jsx_runtime_1.jsx)(design_system_1.Button, Object.assign({ small: true, primary: true, onClick: saveAll }, { children: "Save All" }), void 0)] }, void 0)) : ((0, jsx_runtime_1.jsx)(design_system_1.Button, Object.assign({ small: true, primary: true, onClick: editAll }, { children: "Edit All" }), void 0))] }), void 0), (0, jsx_runtime_1.jsxs)(__1.Table, Object.assign({ tableState: tableState, striped: false, selectable: true, groupable: true, sortable: true, exportable: true, exportFileName: "Table.Export.Test...File.Name.01.01.2020..~!@#$%^(*_+';", cellRender: cellRender }, { children: [(0, jsx_runtime_1.jsx)(__1.TableColumn, { field: "ProductID", title: "ID", editable: false, width: "100px" }, void 0), (0, jsx_runtime_1.jsx)(__1.TableColumn, { field: "ProductName", title: "Product Name", cell: __1.TextEditableCell, columnMenu: __1.StandardColumnMenuFilter, width: "240px" }, void 0), (0, jsx_runtime_1.jsx)(__1.TableColumn, { field: "Supplier", title: "Supplier", cell: SupplierCell, columnMenu: __1.StandardColumnMenuFilter, width: "150px" }, void 0), (0, jsx_runtime_1.jsx)(__1.TableColumn, { field: "MadeIn", title: "Made In", cell: __1.TextEditableCell, columnMenu: madeInColumnMenu, width: "175px" }, void 0), (0, jsx_runtime_1.jsx)(__1.TableColumn, { field: "UnitsOnOrder", title: "First Ordered On", cell: __1.DateEditableCell, columnMenu: __1.DateRangeColumnMenuFilter, format: "{0:d}", width: "240px" }, void 0), (0, jsx_runtime_1.jsx)(__1.TableColumn, { field: "UnitPrice", title: "Unit Price", cell: __1.NumericEditableCell, columnMenu: __1.CurrencyRangeColumnMenuFilter, format: "{0:c}", width: "125px" }, void 0), (0, jsx_runtime_1.jsx)(__1.TableColumn, { field: "Discontinued", title: "Discontinued", cell: __1.BooleanEditableCell, sortable: false, width: "125px" }, void 0), (0, jsx_runtime_1.jsx)(__1.TableColumn, { field: "AvailableFor", title: "Available For", cell: AvailableForEditableCell, columnMenu: UserRoleColumnMenuFilter, width: "240px" }, void 0), (0, jsx_runtime_1.jsx)(__1.TableColumn, Object.assign({ cell: actions_cell_1.ActionsCell, sortable: false }, (props.fixedWidthColumns ? { width: '125px' } : {})), void 0)] }), void 0)] }, void 0));
|
46
46
|
}));
|
47
47
|
//# sourceMappingURL=table.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"table.js","sourceRoot":"","sources":["../../../src/demo/overview/table.tsx"],"names":[],"mappings":";;;;AAAA,iCAA0E;AAE1E,uDAAmE;AAEnE,2CAAsC;AAEtC,+DAA8E;AAE9E,6BAee;AACf,yCAAsC;AAEtC,+CAA2C;AAE3C,iDAA6C;AAE7C,6CAAgE;AAChE,uCAAwD;AAExD,MAAM,wBAAwB,GAAG,+BAA2B,
|
1
|
+
{"version":3,"file":"table.js","sourceRoot":"","sources":["../../../src/demo/overview/table.tsx"],"names":[],"mappings":";;;;AAAA,iCAA0E;AAE1E,uDAAmE;AAEnE,2CAAsC;AAEtC,+DAA8E;AAE9E,6BAee;AACf,yCAAsC;AAEtC,+CAA2C;AAE3C,iDAA6C;AAE7C,6CAAgE;AAChE,uCAAwD;AAExD,MAAM,wBAAwB,GAAG,IAAA,+BAA2B,EAAC,IAAA,kBAAW,EAAC,kBAAQ,CAAC,EAAE,QAAQ,CAAC,EAAE,CAAC,CAC5F,uBAAC,mBAAG,kBAAC,OAAO,QAAC,KAAK,EAAE,kBAAQ,CAAC,QAAQ,CAAC,KAAK,kBAAQ,CAAC,KAAK,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,SAAS,gBAC5E,QAAQ,YACP,CACT,CAAC,CAAC;AAEH,MAAM,wBAAwB,GAAG,IAAA,yBAAqB,EAAC;IACnD,OAAO,EAAE,IAAA,oBAAa,EAAC,kBAAQ,CAAC;IAChC,MAAM,EAAE,CAAC,EAAE,QAAQ,EAAE,KAAK,EAAE,EAAE,EAAE;QAC5B,MAAM,KAAK,GAAG,QAAQ,CAAC,KAAM,CAAC,CAAC;QAE/B,OAAO,yCAAK,KAAK,IAAI,kBAAQ,CAAC,KAAK,CAAC,WAAM,CAAC;IAC/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kBAAkB,EACxB,IAAI,EAAE,oBAAgB,EACtB,UAAU,EAAE,6BAAyB,EACrC,MAAM,EAAC,OAAO,EACd,KAAK,EAAC,OAAO,WACf,EAEF,uBAAC,eAAW,IACR,KAAK,EAAC,WAAW,EACjB,KAAK,EAAC,YAAY,EAClB,IAAI,EAAE,uBAAmB,EACzB,UAAU,EAAE,iCAA6B,EACzC,MAAM,EAAC,OAAO,EACd,KAAK,EAAC,OAAO,WACf,EAEF,uBAAC,eAAW,IACR,KAAK,EAAC,cAAc,EACpB,KAAK,EAAC,cAAc,EACpB,IAAI,EAAE,uBAAmB,EACzB,QAAQ,EAAE,KAAK,EACf,KAAK,EAAC,OAAO,WACf,EAEF,uBAAC,eAAW,IACR,KAAK,EAAC,cAAc,EACpB,KAAK,EAAC,eAAe,EACrB,IAAI,EAAE,wBAAwB,EAC9B,UAAU,EAAE,wBAAwB,EACpC,KAAK,EAAC,OAAO,WACf,EAEF,uBAAC,eAAW,kBACR,IAAI,EAAE,0BAAW,EACjB,QAAQ,EAAE,KAAK,IACX,CAAC,KAAK,CAAC,iBAAiB,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,OAAO,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,UACzD,aACE,YACD,CACd,CAAC;AACN,CAAC,CAAC,CACL,CAAC"}
|
@@ -49,7 +49,7 @@ let TableStore = class TableStore {
|
|
49
49
|
writable: true,
|
50
50
|
value: () => this.tableState.cancelEditAll()
|
51
51
|
});
|
52
|
-
mobx_1.makeObservable(this);
|
52
|
+
(0, mobx_1.makeObservable)(this);
|
53
53
|
}
|
54
54
|
get inEdit() {
|
55
55
|
return this.tableState.inEdit.size > 0;
|
@@ -67,7 +67,7 @@ let TableStore = class TableStore {
|
|
67
67
|
return row.Discontinued;
|
68
68
|
}
|
69
69
|
getFormState(row) {
|
70
|
-
return form_1.setFormStateValues(new formstate_1.FormState({
|
70
|
+
return (0, form_1.setFormStateValues)(new formstate_1.FormState({
|
71
71
|
ProductID: new formstate_1.FieldState(0),
|
72
72
|
ProductName: new formstate_1.FieldState('').validators(form_1.FormValidators.required),
|
73
73
|
Supplier: new formstate_1.FieldState(product_1.Supplier.Adam),
|
@@ -88,7 +88,7 @@ __decorate([
|
|
88
88
|
__metadata("design:paramtypes", [])
|
89
89
|
], TableStore.prototype, "inEdit", null);
|
90
90
|
TableStore = __decorate([
|
91
|
-
react_ioc_1.injectable(),
|
91
|
+
(0, react_ioc_1.injectable)(),
|
92
92
|
__metadata("design:paramtypes", [])
|
93
93
|
], TableStore);
|
94
94
|
exports.TableStore = TableStore;
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"table.store.js","sourceRoot":"","sources":["../../../src/demo/overview/table.store.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,uDAAqD;AAErD,+BAAgD;AAEhD,6BAAuD;AAEvD,6CAAwE;AACxE,yCAAkD;AAElD,uCAAwD;AACxD,yCAAsC;AAGtC,IAAa,UAAU,GAAvB,MAAa,UAAU;IASnB;QARA;;;;mBAAa,IAAI,cAAU,CAAC;gBACxB,UAAU,EAAE,IAAI,CAAC,aAAa,EAAE;gBAChC,iBAAiB,EAAE,IAAI,CAAC,iBAAiB;gBACzC,cAAc,EAAE,CAAC;gBACjB,YAAY,EAAE,IAAI,CAAC,YAAY;gBAC/B,QAAQ,EAAE,CAAC;aACd,CAAC;WAAC;QAUH;;;;mBAAU,GAAG,EAAE,CAAC,IAAI,CAAC,UAAU,CAAC,OAAO,EAAE;WAAC;QAC1C;;;;mBAAU,GAAG,EAAE,CAAC,IAAI,CAAC,UAAU,CAAC,WAAW,EAAE;WAAC;QAC9C;;;;mBAAY,GAAG,EAAE,CAAC,IAAI,CAAC,UAAU,CAAC,aAAa,EAAE;WAAC;QAT9C,qBAAc,
|
1
|
+
{"version":3,"file":"table.store.js","sourceRoot":"","sources":["../../../src/demo/overview/table.store.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,uDAAqD;AAErD,+BAAgD;AAEhD,6BA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ACV,SAAS,EAAE,IAAI,sBAAU,CAAC,CAAC,CAAC;YAC5B,WAAW,EAAE,IAAI,sBAAU,CAAC,EAAE,CAAC,CAAC,UAAU,CAAC,qBAAc,CAAC,QAAQ,CAAC;YACnE,QAAQ,EAAE,IAAI,sBAAU,CAAW,kBAAQ,CAAC,IAAI,CAAC;YACjD,UAAU,EAAE,IAAI,sBAAU,CAAC,CAAC,CAAC;YAC7B,MAAM,EAAE,IAAI,sBAAU,CAAC,EAAE,CAAC;YAC1B,eAAe,EAAE,IAAI,sBAAU,CAAC,EAAE,CAAC;YACnC,SAAS,EAAE,IAAI,sBAAU,CAAC,CAAC,CAAC,CAAC,UAAU,CACnC,KAAK,CAAC,EAAE,CAAC,KAAK,IAAI,CAAC,IAAI,wBAAwB,CAClD;YACD,YAAY,EAAE,IAAI,sBAAU,CAAC,CAAC,CAAC;YAC/B,YAAY,EAAE,IAAI,sBAAU,CAAC,IAAI,IAAI,EAAE,CAAC,CAAC,UAAU,CAC/C,KAAK,CAAC,EAAE,CAAC,KAAK,GAAG,IAAI,IAAI,EAAE,IAAI,cAAc,CAChD;YACD,YAAY,EAAE,IAAI,sBAAU,CAAC,KAAK,CAAC;YACnC,YAAY,EAAE,IAAI,sBAAU,CAAuB,SAAS,CAAC;SAChE,CAAC,EACF,GAAG,CACN,CAAC;IACN,CAAC;CACJ,CAAA;AA7Ca;IAAT,eAAQ;;;wCAER;AAfQ,UAAU;IADtB,IAAA,sBAAU,GAAE;;GACA,UAAU,CA0DtB;AA1DY,gCAAU"}
|
@@ -8,10 +8,10 @@ const mobx_react_1 = require("mobx-react");
|
|
8
8
|
const design_system_1 = require("@servicetitan/design-system");
|
9
9
|
const __1 = require("../..");
|
10
10
|
const state_caching_table_store_1 = require("./state-caching-table.store");
|
11
|
-
exports.TableStateCachingExample = react_ioc_1.provide({
|
11
|
+
exports.TableStateCachingExample = (0, react_ioc_1.provide)({
|
12
12
|
singletons: [state_caching_table_store_1.TableStore],
|
13
|
-
})(mobx_react_1.observer(() => {
|
14
|
-
const [{ tableState, showProducts, showBeverages }] = react_ioc_1.useDependencies(state_caching_table_store_1.TableStore);
|
15
|
-
return (jsx_runtime_1.jsxs(react_1.Fragment, { children: [jsx_runtime_1.jsxs(design_system_1.ButtonGroup, Object.assign({ className: "m-b-2" }, { children: [jsx_runtime_1.jsx(design_system_1.Button, Object.assign({ small: true, onClick: showProducts }, { children: "Show Products" }), void 0), jsx_runtime_1.jsx(design_system_1.Button, Object.assign({ small: true, onClick: showBeverages }, { children: "Show Beverages" }), void 0)] }), void 0), jsx_runtime_1.jsxs(__1.Table, Object.assign({ tableState: tableState, striped: true, sortable: true }, { children: [jsx_runtime_1.jsx(__1.TableColumn, { field: "ProductID", title: "ID", width: "100px" }, void 0), jsx_runtime_1.jsx(__1.TableColumn, { field: "ProductName", title: "Product Name" }, void 0), jsx_runtime_1.jsx(__1.TableColumn, { field: "Description", title: "Product Description" }, void 0)] }), void 0)] }, void 0));
|
13
|
+
})((0, mobx_react_1.observer)(() => {
|
14
|
+
const [{ tableState, showProducts, showBeverages }] = (0, react_ioc_1.useDependencies)(state_caching_table_store_1.TableStore);
|
15
|
+
return ((0, jsx_runtime_1.jsxs)(react_1.Fragment, { children: [(0, jsx_runtime_1.jsxs)(design_system_1.ButtonGroup, Object.assign({ className: "m-b-2" }, { children: [(0, jsx_runtime_1.jsx)(design_system_1.Button, Object.assign({ small: true, onClick: showProducts }, { children: "Show Products" }), void 0), (0, jsx_runtime_1.jsx)(design_system_1.Button, Object.assign({ small: true, onClick: showBeverages }, { children: "Show Beverages" }), void 0)] }), void 0), (0, jsx_runtime_1.jsxs)(__1.Table, Object.assign({ tableState: tableState, striped: true, sortable: true }, { children: [(0, jsx_runtime_1.jsx)(__1.TableColumn, { field: "ProductID", title: "ID", width: "100px" }, void 0), (0, jsx_runtime_1.jsx)(__1.TableColumn, { field: "ProductName", title: "Product Name" }, void 0), (0, jsx_runtime_1.jsx)(__1.TableColumn, { field: "Description", title: "Product Description" }, void 0)] }), void 0)] }, void 0));
|
16
16
|
}));
|
17
17
|
//# sourceMappingURL=state-caching-table.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"state-caching-table.js","sourceRoot":"","sources":["../../../src/demo/state-caching/state-caching-table.tsx"],"names":[],"mappings":";;;;AAAA,iCAAqC;AACrC,uDAAmE;AACnE,2CAAsC;AACtC,+DAAkE;AAClE,6BAA2C;AAC3C,2EAAyD;AAE5C,QAAA,wBAAwB,GAAO,mBAAO,
|
1
|
+
{"version":3,"file":"state-caching-table.js","sourceRoot":"","sources":["../../../src/demo/state-caching/state-caching-table.tsx"],"names":[],"mappings":";;;;AAAA,iCAAqC;AACrC,uDAAmE;AACnE,2CAAsC;AACtC,+DAAkE;AAClE,6BAA2C;AAC3C,2EAAyD;AAE5C,QAAA,wBAAwB,GAAO,IAAA,mBAAO,EAAC;IAChD,UAAU,EAAE,CAAC,sCAAU,CAAC;CAC3B,CAAC,CACE,IAAA,qBAAQ,EAAC,GAAG,EAAE;IACV,MAAM,CAAC,EAAE,UAAU,EAAE,YAAY,EAAE,aAAa,EAAE,CAAC,GAAG,IAAA,2BAAe,EAAC,sCAAU,CAAC,CAAC;IAElF,OAAO,CACH,wBAAC,gBAAQ,eACL,wBAAC,2BAAW,kBAAC,SAAS,EAAC,OAAO,iBAC1B,uBAAC,sBAAM,kBAAC,KAAK,QAAC,OAAO,EAAE,YAAY,2CAE1B,EACT,uBAAC,sBAAM,kBAAC,KAAK,QAAC,OAAO,EAAE,aAAa,4CAE3B,aACC,EAEd,wBAAC,SAAK,kBAAC,UAAU,EAAE,UAAU,EAAE,OAAO,QAAC,QAAQ,uBAC3C,uBAAC,eAAW,IAAC,KAAK,EAAC,WAAW,EAAC,KAAK,EAAC,IAAI,EAAC,KAAK,EAAC,OAAO,WAAG,EAE1D,uBAAC,eAAW,IAAC,KAAK,EAAC,aAAa,EAAC,KAAK,EAAC,cAAc,WAAG,EAExD,uBAAC,eAAW,IAAC,KAAK,EAAC,aAAa,EAAC,KAAK,EAAC,qBAAqB,WAAG,aAC3D,YACD,CACd,CAAC;AACN,CAAC,CAAC,CACL,CAAC"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"state-caching-table.store.js","sourceRoot":"","sources":["../../../src/demo/state-caching/state-caching-table.store.ts"],"names":[],"mappings":";;;;;;;;;AAAA,uDAAqD;AACrD,6BAAuD;AAEvD,yCAAsC;AACtC,2CAAwC;AAKxC,IAAa,UAAU,GAAvB,MAAa,UAAU;IAAvB;QACI;;;;;WAA6C;QAC7C;;;;;WAA8C;QAE9C;;;;mBAAa,IAAI,cAAU,CAAkB;gBACzC,UAAU,EAAE,IAAI,CAAC,qBAAqB,EAAE;gBACxC,QAAQ,EAAE,CAAC;aACd,CAAC;WAAC;QAEH;;;;mBAAe,GAAG,EAAE;gBAChB,IAAI,CAAC,mBAAmB,GAAG,IAAI,CAAC,UAAU,CAAC,WAAW,EAAE,CAAC;gBACzD,IAAI,CAAC,UAAU,CAAC,aAAa,CAAC,IAAI,CAAC,qBAAqB,EAAE,EAAE;oBACxD,KAAK,EAAE,IAAI;oBACX,YAAY,EAAE,IAAI,CAAC,kBAAkB;iBACxC,CAAC,CAAC;YACP,CAAC;WAAC;QAEF;;;;mBAAgB,GAAG,EAAE;gBACjB,IAAI,CAAC,kBAAkB,GAAG,IAAI,CAAC,UAAU,CAAC,WAAW,EAAE,CAAC;gBACxD,IAAI,CAAC,UAAU,CAAC,aAAa,CAAC,IAAI,CAAC,sBAAsB,EAAE,EAAE;oBACzD,KAAK,EAAE,IAAI;oBACX,YAAY,EAAE,IAAI,CAAC,mBAAmB;iBACzC,CAAC,CAAC;YACP,CAAC;WAAC;IASN,CAAC;IAPW,qBAAqB;QACzB,OAAO,IAAI,sBAAkB,CAAC,mBAAQ,CAAC,CAAC;IAC5C,CAAC;IAEO,sBAAsB;QAC1B,OAAO,IAAI,sBAAkB,CAAC,qBAAS,CAAC,CAAC;IAC7C,CAAC;CACJ,CAAA;AAhCY,UAAU;IADtB,sBAAU,
|
1
|
+
{"version":3,"file":"state-caching-table.store.js","sourceRoot":"","sources":["../../../src/demo/state-caching/state-caching-table.store.ts"],"names":[],"mappings":";;;;;;;;;AAAA,uDAAqD;AACrD,6BAAuD;AAEvD,yCAAsC;AACtC,2CAAwC;AAKxC,IAAa,UAAU,GAAvB,MAAa,UAAU;IAAvB;QACI;;;;;WAA6C;QAC7C;;;;;WAA8C;QAE9C;;;;mBAAa,IAAI,cAAU,CAAkB;gBACzC,UAAU,EAAE,IAAI,CAAC,qBAAqB,EAAE;gBACxC,QAAQ,EAAE,CAAC;aACd,CAAC;WAAC;QAEH;;;;mBAAe,GAAG,EAAE;gBAChB,IAAI,CAAC,mBAAmB,GAAG,IAAI,CAAC,UAAU,CAAC,WAAW,EAAE,CAAC;gBACzD,IAAI,CAAC,UAAU,CAAC,aAAa,CAAC,IAAI,CAAC,qBAAqB,EAAE,EAAE;oBACxD,KAAK,EAAE,IAAI;oBACX,YAAY,EAAE,IAAI,CAAC,kBAAkB;iBACxC,CAAC,CAAC;YACP,CAAC;WAAC;QAEF;;;;mBAAgB,GAAG,EAAE;gBACjB,IAAI,CAAC,kBAAkB,GAAG,IAAI,CAAC,UAAU,CAAC,WAAW,EAAE,CAAC;gBACxD,IAAI,CAAC,UAAU,CAAC,aAAa,CAAC,IAAI,CAAC,sBAAsB,EAAE,EAAE;oBACzD,KAAK,EAAE,IAAI;oBACX,YAAY,EAAE,IAAI,CAAC,mBAAmB;iBACzC,CAAC,CAAC;YACP,CAAC;WAAC;IASN,CAAC;IAPW,qBAAqB;QACzB,OAAO,IAAI,sBAAkB,CAAC,mBAAQ,CAAC,CAAC;IAC5C,CAAC;IAEO,sBAAsB;QAC1B,OAAO,IAAI,sBAAkB,CAAC,qBAAS,CAAC,CAAC;IAC7C,CAAC;CACJ,CAAA;AAhCY,UAAU;IADtB,IAAA,sBAAU,GAAE;GACA,UAAU,CAgCtB;AAhCY,gCAAU"}
|
@@ -5,13 +5,13 @@ const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
5
|
const mobx_react_1 = require("mobx-react");
|
6
6
|
const design_system_1 = require("@servicetitan/design-system");
|
7
7
|
const get_editable_cell_1 = require("./get-editable-cell");
|
8
|
-
const Editor = mobx_react_1.observer(({ fieldState: { value, onChange }, className }) => {
|
8
|
+
const Editor = (0, mobx_react_1.observer)(({ fieldState: { value, onChange }, className }) => {
|
9
9
|
const handleChange = (_0, checked) => {
|
10
10
|
onChange(checked);
|
11
11
|
};
|
12
|
-
return (jsx_runtime_1.jsx("td", Object.assign({ className: className }, { children: jsx_runtime_1.jsx(design_system_1.Checkbox, { checked: value, onChange: handleChange, style: { marginRight: 0 } }, void 0) }), void 0));
|
12
|
+
return ((0, jsx_runtime_1.jsx)("td", Object.assign({ className: className }, { children: (0, jsx_runtime_1.jsx)(design_system_1.Checkbox, { checked: value, onChange: handleChange, style: { marginRight: 0 } }, void 0) }), void 0));
|
13
13
|
});
|
14
|
-
exports.BooleanEditableCell = get_editable_cell_1.getEditableCell({
|
14
|
+
exports.BooleanEditableCell = (0, get_editable_cell_1.getEditableCell)({
|
15
15
|
editor: Editor,
|
16
16
|
});
|
17
17
|
//# sourceMappingURL=boolean-editable-cell.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"boolean-editable-cell.js","sourceRoot":"","sources":["../../src/editable-cell/boolean-editable-cell.tsx"],"names":[],"mappings":";;;;AACA,2CAAsC;AAEtC,+DAAuD;AAEvD,2DAAmE;AAEnE,MAAM,MAAM,GAAG,qBAAQ,
|
1
|
+
{"version":3,"file":"boolean-editable-cell.js","sourceRoot":"","sources":["../../src/editable-cell/boolean-editable-cell.tsx"],"names":[],"mappings":";;;;AACA,2CAAsC;AAEtC,+DAAuD;AAEvD,2DAAmE;AAEnE,MAAM,MAAM,GAAG,IAAA,qBAAQ,EACnB,CAAC,EAAE,UAAU,EAAE,EAAE,KAAK,EAAE,QAAQ,EAAE,EAAE,SAAS,EAAE,EAAE,EAAE;IAC/C,MAAM,YAAY,GAAG,CAAC,EAAS,EAAE,OAAgB,EAAE,EAAE;QACjD,QAAQ,CAAC,OAAO,CAAC,CAAC;IACtB,CAAC,CAAC;IAEF,OAAO,CACH,6CAAI,SAAS,EAAE,SAAS,gBACpB,uBAAC,wBAAQ,IAAC,OAAO,EAAE,KAAK,EAAE,QAAQ,EAAE,YAAY,EAAE,KAAK,EAAE,EAAE,WAAW,EAAE,CAAC,EAAE,WAAI,YAC9E,CACR,CAAC;AACN,CAAC,CACJ,CAAC;AAEW,QAAA,mBAAmB,GAAG,IAAA,mCAAe,EAAC;IAC/C,MAAM,EAAE,MAAM;CACjB,CAAC,CAAC"}
|
@@ -5,13 +5,13 @@ const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
5
|
const mobx_react_1 = require("mobx-react");
|
6
6
|
const kendo_react_dateinputs_1 = require("@progress/kendo-react-dateinputs");
|
7
7
|
const get_editable_cell_1 = require("./get-editable-cell");
|
8
|
-
const Editor = mobx_react_1.observer(({ fieldState: { value, onChange, hasError, error }, className }) => {
|
8
|
+
const Editor = (0, mobx_react_1.observer)(({ fieldState: { value, onChange, hasError, error }, className }) => {
|
9
9
|
const handleChange = (event) => {
|
10
10
|
onChange(event.value);
|
11
11
|
};
|
12
|
-
return (jsx_runtime_1.jsx("td", Object.assign({ className: className }, { children: jsx_runtime_1.jsx(kendo_react_dateinputs_1.DatePicker, { value: value, onChange: handleChange, valid: !hasError, validationMessage: error }, void 0) }), void 0));
|
12
|
+
return ((0, jsx_runtime_1.jsx)("td", Object.assign({ className: className }, { children: (0, jsx_runtime_1.jsx)(kendo_react_dateinputs_1.DatePicker, { value: value, onChange: handleChange, valid: !hasError, validationMessage: error }, void 0) }), void 0));
|
13
13
|
});
|
14
|
-
exports.DateEditableCell = get_editable_cell_1.getEditableCell({
|
14
|
+
exports.DateEditableCell = (0, get_editable_cell_1.getEditableCell)({
|
15
15
|
editor: Editor,
|
16
16
|
});
|
17
17
|
//# sourceMappingURL=date-editable-cell.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"date-editable-cell.js","sourceRoot":"","sources":["../../src/editable-cell/date-editable-cell.tsx"],"names":[],"mappings":";;;;AACA,2CAAsC;AAEtC,6EAAqF;AAErF,2DAAmE;AAEnE,MAAM,MAAM,GAAG,qBAAQ,
|
1
|
+
{"version":3,"file":"date-editable-cell.js","sourceRoot":"","sources":["../../src/editable-cell/date-editable-cell.tsx"],"names":[],"mappings":";;;;AACA,2CAAsC;AAEtC,6EAAqF;AAErF,2DAAmE;AAEnE,MAAM,MAAM,GAAG,IAAA,qBAAQ,EACnB,CAAC,EAAE,UAAU,EAAE,EAAE,KAAK,EAAE,QAAQ,EAAE,QAAQ,EAAE,KAAK,EAAE,EAAE,SAAS,EAAE,EAAE,EAAE;IAChE,MAAM,YAAY,GAAG,CAAC,KAA4B,EAAE,EAAE;QAClD,QAAQ,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;IAC1B,CAAC,CAAC;IAEF,OAAO,CACH,6CAAI,SAAS,EAAE,SAAS,gBACpB,uBAAC,mCAAU,IACP,KAAK,EAAE,KAAK,EACZ,QAAQ,EAAE,YAAY,EACtB,KAAK,EAAE,CAAC,QAAQ,EAChB,iBAAiB,EAAE,KAAK,WAC1B,YACD,CACR,CAAC;AACN,CAAC,CACJ,CAAC;AAEW,QAAA,gBAAgB,GAAG,IAAA,mCAAe,EAAC;IAC5C,MAAM,EAAE,MAAM;CACjB,CAAC,CAAC"}
|
@@ -8,14 +8,14 @@ function getActionCell({ view: ViewAction, edit: EditAction }) {
|
|
8
8
|
var _a;
|
9
9
|
const { tableState, dataItem, rowType } = props;
|
10
10
|
if (rowType !== 'data') {
|
11
|
-
return jsx_runtime_1.jsx(design_system_1.TableCell, Object.assign({}, props), void 0);
|
11
|
+
return (0, jsx_runtime_1.jsx)(design_system_1.TableCell, Object.assign({}, props), void 0);
|
12
12
|
}
|
13
13
|
const editingForm = ((_a = tableState === null || tableState === void 0 ? void 0 : tableState.dataSource) === null || _a === void 0 ? void 0 : _a.idSelector) &&
|
14
14
|
tableState.inEdit.get(tableState.dataSource.idSelector(dataItem));
|
15
15
|
if (editingForm) {
|
16
|
-
return jsx_runtime_1.jsx(EditAction, Object.assign({}, props, { formState: editingForm.form }), void 0);
|
16
|
+
return (0, jsx_runtime_1.jsx)(EditAction, Object.assign({}, props, { formState: editingForm.form }), void 0);
|
17
17
|
}
|
18
|
-
return jsx_runtime_1.jsx(ViewAction, Object.assign({}, props), void 0);
|
18
|
+
return (0, jsx_runtime_1.jsx)(ViewAction, Object.assign({}, props), void 0);
|
19
19
|
};
|
20
20
|
}
|
21
21
|
exports.getActionCell = getActionCell;
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"get-action-cell.js","sourceRoot":"","sources":["../../src/editable-cell/get-action-cell.tsx"],"names":[],"mappings":";;;;AAEA,+DAAwD;AAcxD,SAAgB,aAAa,CAAI,EAAE,IAAI,EAAE,UAAU,EAAE,IAAI,EAAE,UAAU,EAA0B;IAC3F,OAAO,CAAC,KAAwB,EAAE,EAAE;;QAChC,MAAM,EAAE,UAAU,EAAE,QAAQ,EAAE,OAAO,EAAE,GAAG,KAAK,CAAC;QAEhD,IAAI,OAAO,KAAK,MAAM,EAAE;YACpB,OAAO,
|
1
|
+
{"version":3,"file":"get-action-cell.js","sourceRoot":"","sources":["../../src/editable-cell/get-action-cell.tsx"],"names":[],"mappings":";;;;AAEA,+DAAwD;AAcxD,SAAgB,aAAa,CAAI,EAAE,IAAI,EAAE,UAAU,EAAE,IAAI,EAAE,UAAU,EAA0B;IAC3F,OAAO,CAAC,KAAwB,EAAE,EAAE;;QAChC,MAAM,EAAE,UAAU,EAAE,QAAQ,EAAE,OAAO,EAAE,GAAG,KAAK,CAAC;QAEhD,IAAI,OAAO,KAAK,MAAM,EAAE;YACpB,OAAO,uBAAC,yBAAS,oBAAK,KAAK,UAAI,CAAC;SACnC;QAED,MAAM,WAAW,GACb,CAAA,MAAA,UAAU,aAAV,UAAU,uBAAV,UAAU,CAAE,UAAU,0CAAE,UAAU;YAClC,UAAU,CAAC,MAAM,CAAC,GAAG,CAAC,UAAU,CAAC,UAAU,CAAC,UAAU,CAAC,QAAQ,CAAC,CAAC,CAAC;QAEtE,IAAI,WAAW,EAAE;YACb,OAAO,uBAAC,UAAU,oBAAK,KAAK,IAAE,SAAS,EAAE,WAAW,CAAC,IAAI,YAAI,CAAC;SACjE;QAED,OAAO,uBAAC,UAAU,oBAAK,KAAK,UAAI,CAAC;IACrC,CAAC,CAAC;AACN,CAAC;AAlBD,sCAkBC"}
|
@@ -8,14 +8,14 @@ function getEditableCell({ viewer: Viewer = design_system_1.TableCell, editor: E
|
|
8
8
|
var _a;
|
9
9
|
const { tableState, field, dataItem, rowType } = props;
|
10
10
|
if (rowType !== 'data') {
|
11
|
-
return jsx_runtime_1.jsx(design_system_1.TableCell, Object.assign({}, props), void 0);
|
11
|
+
return (0, jsx_runtime_1.jsx)(design_system_1.TableCell, Object.assign({}, props), void 0);
|
12
12
|
}
|
13
13
|
const editingForm = ((_a = tableState === null || tableState === void 0 ? void 0 : tableState.dataSource) === null || _a === void 0 ? void 0 : _a.idSelector) &&
|
14
14
|
tableState.inEdit.get(tableState.dataSource.idSelector(dataItem));
|
15
15
|
if (field && editingForm && (!editingForm.field || editingForm.field === field)) {
|
16
|
-
return jsx_runtime_1.jsx(Editor, Object.assign({}, props, { fieldState: editingForm.form.$[field] }), void 0);
|
16
|
+
return (0, jsx_runtime_1.jsx)(Editor, Object.assign({}, props, { fieldState: editingForm.form.$[field] }), void 0);
|
17
17
|
}
|
18
|
-
return jsx_runtime_1.jsx(Viewer, Object.assign({}, props), void 0);
|
18
|
+
return (0, jsx_runtime_1.jsx)(Viewer, Object.assign({}, props), void 0);
|
19
19
|
};
|
20
20
|
}
|
21
21
|
exports.getEditableCell = getEditableCell;
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"get-editable-cell.js","sourceRoot":"","sources":["../../src/editable-cell/get-editable-cell.tsx"],"names":[],"mappings":";;;;AAIA,+DAAwD;AAYxD,SAAgB,eAAe,CAAI,EAC/B,MAAM,EAAE,MAAM,GAAG,yBAAS,EAC1B,MAAM,EAAE,MAAM,GACS;IACvB,OAAO,CAAC,KAA0B,EAAE,EAAE;;QAClC,MAAM,EAAE,UAAU,EAAE,KAAK,EAAE,QAAQ,EAAE,OAAO,EAAE,GAAG,KAAK,CAAC;QAEvD,IAAI,OAAO,KAAK,MAAM,EAAE;YACpB,OAAO,
|
1
|
+
{"version":3,"file":"get-editable-cell.js","sourceRoot":"","sources":["../../src/editable-cell/get-editable-cell.tsx"],"names":[],"mappings":";;;;AAIA,+DAAwD;AAYxD,SAAgB,eAAe,CAAI,EAC/B,MAAM,EAAE,MAAM,GAAG,yBAAS,EAC1B,MAAM,EAAE,MAAM,GACS;IACvB,OAAO,CAAC,KAA0B,EAAE,EAAE;;QAClC,MAAM,EAAE,UAAU,EAAE,KAAK,EAAE,QAAQ,EAAE,OAAO,EAAE,GAAG,KAAK,CAAC;QAEvD,IAAI,OAAO,KAAK,MAAM,EAAE;YACpB,OAAO,uBAAC,yBAAS,oBAAK,KAAK,UAAI,CAAC;SACnC;QAED,MAAM,WAAW,GACb,CAAA,MAAA,UAAU,aAAV,UAAU,uBAAV,UAAU,CAAE,UAAU,0CAAE,UAAU;YAClC,UAAU,CAAC,MAAM,CAAC,GAAG,CAAC,UAAU,CAAC,UAAU,CAAC,UAAU,CAAC,QAAQ,CAAC,CAAC,CAAC;QAEtE,IAAI,KAAK,IAAI,WAAW,IAAI,CAAC,CAAC,WAAW,CAAC,KAAK,IAAI,WAAW,CAAC,KAAK,KAAK,KAAK,CAAC,EAAE;YAC7E,OAAO,uBAAC,MAAM,oBAAK,KAAK,IAAE,UAAU,EAAE,WAAW,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,CAAC,YAAI,CAAC;SACvE;QAED,OAAO,uBAAC,MAAM,oBAAK,KAAK,UAAI,CAAC;IACjC,CAAC,CAAC;AACN,CAAC;AArBD,0CAqBC"}
|
@@ -10,14 +10,14 @@ const kendo_react_dropdowns_1 = require("@progress/kendo-react-dropdowns");
|
|
10
10
|
const get_editable_cell_1 = require("./get-editable-cell");
|
11
11
|
const classnames_1 = __importDefault(require("classnames"));
|
12
12
|
function getSelectEditableCell({ options, viewer }) {
|
13
|
-
const Editor = mobx_react_1.observer(({ fieldState: { value, onChange, hasError, error }, className }) => {
|
13
|
+
const Editor = (0, mobx_react_1.observer)(({ fieldState: { value, onChange, hasError, error }, className }) => {
|
14
14
|
const selected = options.find(option => option.value === value);
|
15
15
|
const handleChange = (event) => {
|
16
16
|
onChange(event.target.value.value);
|
17
17
|
};
|
18
|
-
return (jsx_runtime_1.jsx("td", Object.assign({ className: classnames_1.default('of-visible', className) }, { children: jsx_runtime_1.jsx(kendo_react_dropdowns_1.DropDownList, { data: options, value: selected, onChange: handleChange, dataItemKey: "value", textField: "text", valid: !hasError, validationMessage: error, className: "w-100" }, void 0) }), void 0));
|
18
|
+
return ((0, jsx_runtime_1.jsx)("td", Object.assign({ className: (0, classnames_1.default)('of-visible', className) }, { children: (0, jsx_runtime_1.jsx)(kendo_react_dropdowns_1.DropDownList, { data: options, value: selected, onChange: handleChange, dataItemKey: "value", textField: "text", valid: !hasError, validationMessage: error, className: "w-100" }, void 0) }), void 0));
|
19
19
|
});
|
20
|
-
return get_editable_cell_1.getEditableCell({
|
20
|
+
return (0, get_editable_cell_1.getEditableCell)({
|
21
21
|
viewer,
|
22
22
|
editor: Editor,
|
23
23
|
});
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"get-select-editable-cell.js","sourceRoot":"","sources":["../../src/editable-cell/get-select-editable-cell.tsx"],"names":[],"mappings":";;;;;;;AAEA,2CAAsC;AAEtC,2EAAwF;AAGxF,2DAAmE;AAInE,4DAAoC;AAOpC,SAAgB,qBAAqB,CAAI,EAAE,OAAO,EAAE,MAAM,EAAkC;IACxF,MAAM,MAAM,GAAG,qBAAQ,
|
1
|
+
{"version":3,"file":"get-select-editable-cell.js","sourceRoot":"","sources":["../../src/editable-cell/get-select-editable-cell.tsx"],"names":[],"mappings":";;;;;;;AAEA,2CAAsC;AAEtC,2EAAwF;AAGxF,2DAAmE;AAInE,4DAAoC;AAOpC,SAAgB,qBAAqB,CAAI,EAAE,OAAO,EAAE,MAAM,EAAkC;IACxF,MAAM,MAAM,GAAG,IAAA,qBAAQ,EACnB,CAAC,EAAE,UAAU,EAAE,EAAE,KAAK,EAAE,QAAQ,EAAE,QAAQ,EAAE,KAAK,EAAE,EAAE,SAAS,EAAE,EAAE,EAAE;QAChE,MAAM,QAAQ,GAAG,OAAO,CAAC,IAAI,CAAC,MAAM,CAAC,EAAE,CAAC,MAAM,CAAC,KAAK,KAAK,KAAK,CAAC,CAAC;QAEhE,MAAM,YAAY,GAAG,CAAC,KAA8B,EAAE,EAAE;YACpD,QAAQ,CAAC,KAAK,CAAC,MAAM,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;QACvC,CAAC,CAAC;QAEF,OAAO,CACH,6CAAI,SAAS,EAAE,IAAA,oBAAU,EAAC,YAAY,EAAE,SAAS,CAAC,gBAC9C,uBAAC,oCAAY,IACT,IAAI,EAAE,OAAO,EACb,KAAK,EAAE,QAAQ,EACf,QAAQ,EAAE,YAAY,EACtB,WAAW,EAAC,OAAO,EACnB,SAAS,EAAC,MAAM,EAChB,KAAK,EAAE,CAAC,QAAQ,EAChB,iBAAiB,EAAE,KAAK,EACxB,SAAS,EAAC,OAAO,WACnB,YACD,CACR,CAAC;IACN,CAAC,CACJ,CAAC;IAEF,OAAO,IAAA,mCAAe,EAAC;QACnB,MAAM;QACN,MAAM,EAAE,MAAM;KACjB,CAAC,CAAC;AACP,CAAC;AA9BD,sDA8BC"}
|
@@ -5,14 +5,14 @@ const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
5
|
const mobx_react_1 = require("mobx-react");
|
6
6
|
const kendo_react_inputs_1 = require("@progress/kendo-react-inputs");
|
7
7
|
const get_editable_cell_1 = require("./get-editable-cell");
|
8
|
-
const Editor = mobx_react_1.observer(({ fieldState: { value, onChange, hasError, error }, className }) => {
|
8
|
+
const Editor = (0, mobx_react_1.observer)(({ fieldState: { value, onChange, hasError, error }, className }) => {
|
9
9
|
const handleChange = (event) => {
|
10
10
|
// eslint-disable-next-line @typescript-eslint/prefer-nullish-coalescing
|
11
11
|
onChange(event.value || undefined);
|
12
12
|
};
|
13
|
-
return (jsx_runtime_1.jsx("td", Object.assign({ className: className }, { children: jsx_runtime_1.jsx(kendo_react_inputs_1.NumericTextBox, { value: value, onChange: handleChange, valid: !hasError, validationMessage: error }, void 0) }), void 0));
|
13
|
+
return ((0, jsx_runtime_1.jsx)("td", Object.assign({ className: className }, { children: (0, jsx_runtime_1.jsx)(kendo_react_inputs_1.NumericTextBox, { value: value, onChange: handleChange, valid: !hasError, validationMessage: error }, void 0) }), void 0));
|
14
14
|
});
|
15
|
-
exports.NumericEditableCell = get_editable_cell_1.getEditableCell({
|
15
|
+
exports.NumericEditableCell = (0, get_editable_cell_1.getEditableCell)({
|
16
16
|
editor: Editor,
|
17
17
|
});
|
18
18
|
//# sourceMappingURL=numeric-editable-cell.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"numeric-editable-cell.js","sourceRoot":"","sources":["../../src/editable-cell/numeric-editable-cell.tsx"],"names":[],"mappings":";;;;AACA,2CAAsC;AAEtC,qEAAyF;AAEzF,2DAAmE;AAEnE,MAAM,MAAM,GAAG,qBAAQ,
|
1
|
+
{"version":3,"file":"numeric-editable-cell.js","sourceRoot":"","sources":["../../src/editable-cell/numeric-editable-cell.tsx"],"names":[],"mappings":";;;;AACA,2CAAsC;AAEtC,qEAAyF;AAEzF,2DAAmE;AAEnE,MAAM,MAAM,GAAG,IAAA,qBAAQ,EACnB,CAAC,EAAE,UAAU,EAAE,EAAE,KAAK,EAAE,QAAQ,EAAE,QAAQ,EAAE,KAAK,EAAE,EAAE,SAAS,EAAE,EAAE,EAAE;IAChE,MAAM,YAAY,GAAG,CAAC,KAAgC,EAAE,EAAE;QACtD,wEAAwE;QACxE,QAAQ,CAAC,KAAK,CAAC,KAAK,IAAI,SAAS,CAAC,CAAC;IACvC,CAAC,CAAC;IAEF,OAAO,CACH,6CAAI,SAAS,EAAE,SAAS,gBACpB,uBAAC,mCAAc,IACX,KAAK,EAAE,KAAK,EACZ,QAAQ,EAAE,YAAY,EACtB,KAAK,EAAE,CAAC,QAAQ,EAChB,iBAAiB,EAAE,KAAK,WAC1B,YACD,CACR,CAAC;AACN,CAAC,CACJ,CAAC;AAEW,QAAA,mBAAmB,GAAG,IAAA,mCAAe,EAAC;IAC/C,MAAM,EAAE,MAAM;CACjB,CAAC,CAAC"}
|
@@ -7,15 +7,15 @@ const kendo_react_inputs_1 = require("@progress/kendo-react-inputs");
|
|
7
7
|
const get_editable_cell_1 = require("./get-editable-cell");
|
8
8
|
const form_1 = require("@servicetitan/form");
|
9
9
|
function getTextEditableCell({ placeholder, isDisabled, } = {}) {
|
10
|
-
const Editor = mobx_react_1.observer(({ fieldState: { value, onChange, hasError, error }, dataItem, className }) => {
|
10
|
+
const Editor = (0, mobx_react_1.observer)(({ fieldState: { value, onChange, hasError, error }, dataItem, className }) => {
|
11
11
|
const handleChange = (event) => {
|
12
12
|
if (typeof event.target.value === 'string') {
|
13
13
|
onChange(event.target.value);
|
14
14
|
}
|
15
15
|
};
|
16
|
-
return (jsx_runtime_1.jsxs("td", Object.assign({ className: className }, { children: [jsx_runtime_1.jsx(kendo_react_inputs_1.Input, { value: value, onChange: handleChange, valid: !hasError, placeholder: placeholder, disabled: isDisabled === null || isDisabled === void 0 ? void 0 : isDisabled(dataItem) }, void 0), hasError && jsx_runtime_1.jsx(form_1.Label, { label: "", hasError: true, error: error }, void 0)] }), void 0));
|
16
|
+
return ((0, jsx_runtime_1.jsxs)("td", Object.assign({ className: className }, { children: [(0, jsx_runtime_1.jsx)(kendo_react_inputs_1.Input, { value: value, onChange: handleChange, valid: !hasError, placeholder: placeholder, disabled: isDisabled === null || isDisabled === void 0 ? void 0 : isDisabled(dataItem) }, void 0), hasError && (0, jsx_runtime_1.jsx)(form_1.Label, { label: "", hasError: true, error: error }, void 0)] }), void 0));
|
17
17
|
});
|
18
|
-
return get_editable_cell_1.getEditableCell({
|
18
|
+
return (0, get_editable_cell_1.getEditableCell)({
|
19
19
|
editor: Editor,
|
20
20
|
});
|
21
21
|
}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"text-editable-cell.js","sourceRoot":"","sources":["../../src/editable-cell/text-editable-cell.tsx"],"names":[],"mappings":";;;;AAEA,2CAAsC;AAEtC,qEAAuE;AAEvE,2DAAmE;AAEnE,6CAA2C;AAO3C,SAAgB,mBAAmB,CAAI,EACnC,WAAW,EACX,UAAU,MACoB,EAAE;IAChC,MAAM,MAAM,GAAG,qBAAQ,
|
1
|
+
{"version":3,"file":"text-editable-cell.js","sourceRoot":"","sources":["../../src/editable-cell/text-editable-cell.tsx"],"names":[],"mappings":";;;;AAEA,2CAAsC;AAEtC,qEAAuE;AAEvE,2DAAmE;AAEnE,6CAA2C;AAO3C,SAAgB,mBAAmB,CAAI,EACnC,WAAW,EACX,UAAU,MACoB,EAAE;IAChC,MAAM,MAAM,GAAG,IAAA,qBAAQ,EACnB,CAAC,EAAE,UAAU,EAAE,EAAE,KAAK,EAAE,QAAQ,EAAE,QAAQ,EAAE,KAAK,EAAE,EAAE,QAAQ,EAAE,SAAS,EAAE,EAAE,EAAE;QAC1E,MAAM,YAAY,GAAG,CAAC,KAAuB,EAAE,EAAE;YAC7C,IAAI,OAAO,KAAK,CAAC,MAAM,CAAC,KAAK,KAAK,QAAQ,EAAE;gBACxC,QAAQ,CAAC,KAAK,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;aAChC;QACL,CAAC,CAAC;QAEF,OAAO,CACH,8CAAI,SAAS,EAAE,SAAS,iBACpB,uBAAC,0BAAK,IACF,KAAK,EAAE,KAAK,EACZ,QAAQ,EAAE,YAAY,EACtB,KAAK,EAAE,CAAC,QAAQ,EAChB,WAAW,EAAE,WAAW,EACxB,QAAQ,EAAE,UAAU,aAAV,UAAU,uBAAV,UAAU,CAAG,QAAQ,CAAC,WAClC,EACD,QAAQ,IAAI,uBAAC,YAAK,IAAC,KAAK,EAAC,EAAE,EAAC,QAAQ,QAAC,KAAK,EAAE,KAAK,WAAI,aACrD,CACR,CAAC;IACN,CAAC,CACJ,CAAC;IAEF,OAAO,IAAA,mCAAe,EAAC;QACnB,MAAM,EAAE,MAAM;KACjB,CAAC,CAAC;AACP,CAAC;AA9BD,kDA8BC;AAEY,QAAA,gBAAgB,GAAG,mBAAmB,EAAE,CAAC"}
|
package/dist/export/export.js
CHANGED
@@ -24,6 +24,6 @@ const jsx_runtime_1 = require("react/jsx-runtime");
|
|
24
24
|
const design_system_1 = require("@servicetitan/design-system");
|
25
25
|
const accounting_1 = require("accounting");
|
26
26
|
const Styles = __importStar(require("./export.module.css"));
|
27
|
-
const Export = ({ className, totalCount, exportPdf, exportExcel }) => (jsx_runtime_1.jsx("div", Object.assign({ className: className }, { children: jsx_runtime_1.jsx(design_system_1.Dropdown, Object.assign({ trigger: jsx_runtime_1.jsxs(design_system_1.Button, Object.assign({ className: "qa-export-dropdown", iconName: "expand_more", iconPosition: "right" }, { children: [jsx_runtime_1.jsx(design_system_1.Icon, { name: "file_download" }, void 0), jsx_runtime_1.jsxs("span", { children: ["Download", !!totalCount && ` (${accounting_1.formatNumber(totalCount, 0)})`] }, void 0)] }), void 0), icon: null }, { children: jsx_runtime_1.jsxs(design_system_1.Dropdown.Menu, Object.assign({ className: Styles.dropdown }, { children: [exportPdf && (jsx_runtime_1.jsx(design_system_1.Dropdown.Item, { className: "qa-export-pdf", text: ".PDF", onClick: exportPdf }, void 0)), exportExcel && (jsx_runtime_1.jsx(design_system_1.Dropdown.Item, { className: "qa-export-excel", text: ".XLSX", onClick: exportExcel }, void 0))] }), void 0) }), void 0) }), void 0));
|
27
|
+
const Export = ({ className, totalCount, exportPdf, exportExcel }) => ((0, jsx_runtime_1.jsx)("div", Object.assign({ className: className }, { children: (0, jsx_runtime_1.jsx)(design_system_1.Dropdown, Object.assign({ trigger: (0, jsx_runtime_1.jsxs)(design_system_1.Button, Object.assign({ className: "qa-export-dropdown", iconName: "expand_more", iconPosition: "right" }, { children: [(0, jsx_runtime_1.jsx)(design_system_1.Icon, { name: "file_download" }, void 0), (0, jsx_runtime_1.jsxs)("span", { children: ["Download", !!totalCount && ` (${(0, accounting_1.formatNumber)(totalCount, 0)})`] }, void 0)] }), void 0), icon: null }, { children: (0, jsx_runtime_1.jsxs)(design_system_1.Dropdown.Menu, Object.assign({ className: Styles.dropdown }, { children: [exportPdf && ((0, jsx_runtime_1.jsx)(design_system_1.Dropdown.Item, { className: "qa-export-pdf", text: ".PDF", onClick: exportPdf }, void 0)), exportExcel && ((0, jsx_runtime_1.jsx)(design_system_1.Dropdown.Item, { className: "qa-export-excel", text: ".XLSX", onClick: exportExcel }, void 0))] }), void 0) }), void 0) }), void 0));
|
28
28
|
exports.Export = Export;
|
29
29
|
//# sourceMappingURL=export.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"export.js","sourceRoot":"","sources":["../../src/export/export.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AACA,+DAAqE;AACrE,2CAA0C;AAE1C,4DAA8C;AASvC,MAAM,MAAM,GAAoB,CAAC,EAAE,SAAS,EAAE,UAAU,EAAE,SAAS,EAAE,WAAW,EAAE,EAAE,EAAE,CAAC,CAC1F,
|
1
|
+
{"version":3,"file":"export.js","sourceRoot":"","sources":["../../src/export/export.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AACA,+DAAqE;AACrE,2CAA0C;AAE1C,4DAA8C;AASvC,MAAM,MAAM,GAAoB,CAAC,EAAE,SAAS,EAAE,UAAU,EAAE,SAAS,EAAE,WAAW,EAAE,EAAE,EAAE,CAAC,CAC1F,8CAAK,SAAS,EAAE,SAAS,gBACrB,uBAAC,wBAAQ,kBACL,OAAO,EACH,wBAAC,sBAAM,kBAAC,SAAS,EAAC,oBAAoB,EAAC,QAAQ,EAAC,aAAa,EAAC,YAAY,EAAC,OAAO,iBAC9E,uBAAC,oBAAI,IAAC,IAAI,EAAC,eAAe,WAAG,EAC7B,yDAAe,CAAC,CAAC,UAAU,IAAI,KAAK,IAAA,yBAAY,EAAC,UAAU,EAAE,CAAC,CAAC,GAAG,YAAQ,aACrE,EAEb,IAAI,EAAE,IAAI,gBAEV,wBAAC,wBAAQ,CAAC,IAAI,kBAAC,SAAS,EAAE,MAAM,CAAC,QAAQ,iBACpC,SAAS,IAAI,CACV,uBAAC,wBAAQ,CAAC,IAAI,IAAC,SAAS,EAAC,eAAe,EAAC,IAAI,EAAC,MAAM,EAAC,OAAO,EAAE,SAAS,WAAI,CAC9E,EACA,WAAW,IAAI,CACZ,uBAAC,wBAAQ,CAAC,IAAI,IAAC,SAAS,EAAC,iBAAiB,EAAC,IAAI,EAAC,OAAO,EAAC,OAAO,EAAE,WAAW,WAAI,CACnF,aACW,YACT,YACT,CACT,CAAC;AArBW,QAAA,MAAM,UAqBjB"}
|