@servicetitan/table 22.1.0 → 22.1.3
Sign up to get free protection for your applications and to get access to all the features.
- package/CHANGELOG.md +24 -0
- package/dist/demo/index.d.ts +4 -0
- package/dist/demo/index.d.ts.map +1 -0
- package/dist/demo/index.js +4 -0
- package/dist/demo/index.js.map +1 -0
- package/dist/demo/master-detail/detail-table.d.ts +4 -0
- package/dist/demo/master-detail/detail-table.d.ts.map +1 -0
- package/dist/demo/master-detail/detail-table.js +28 -0
- package/dist/demo/master-detail/detail-table.js.map +1 -0
- package/dist/demo/master-detail/detail-table.store.d.ts +14 -0
- package/dist/demo/master-detail/detail-table.store.d.ts.map +1 -0
- package/dist/demo/master-detail/detail-table.store.js +104 -0
- package/dist/demo/master-detail/detail-table.store.js.map +1 -0
- package/dist/demo/master-detail/index.d.ts +2 -0
- package/dist/demo/master-detail/index.d.ts.map +1 -0
- package/dist/demo/master-detail/index.js +2 -0
- package/dist/demo/master-detail/index.js.map +1 -0
- package/dist/demo/master-detail/master-table.store.d.ts +14 -0
- package/dist/demo/master-detail/master-table.store.d.ts.map +1 -0
- package/dist/demo/master-detail/master-table.store.js +103 -0
- package/dist/demo/master-detail/master-table.store.js.map +1 -0
- package/dist/demo/master-detail/product-detail.d.ts +8 -0
- package/dist/demo/master-detail/product-detail.d.ts.map +1 -0
- package/dist/demo/master-detail/product-detail.js +2 -0
- package/dist/demo/master-detail/product-detail.js.map +1 -0
- package/dist/demo/master-detail/product-details.d.ts +3 -0
- package/dist/demo/master-detail/product-details.d.ts.map +1 -0
- package/dist/demo/master-detail/product-details.js +55 -0
- package/dist/demo/master-detail/product-details.js.map +1 -0
- package/dist/demo/master-detail/product.d.ts +26 -0
- package/dist/demo/master-detail/product.d.ts.map +1 -0
- package/dist/demo/master-detail/product.js +16 -0
- package/dist/demo/master-detail/product.js.map +1 -0
- package/dist/demo/master-detail/products.d.ts +3 -0
- package/dist/demo/master-detail/products.d.ts.map +1 -0
- package/dist/demo/master-detail/products.js +117 -0
- package/dist/demo/master-detail/products.js.map +1 -0
- package/dist/demo/master-detail/table-master-detail.d.ts +3 -0
- package/dist/demo/master-detail/table-master-detail.d.ts.map +1 -0
- package/dist/demo/master-detail/table-master-detail.js +24 -0
- package/dist/demo/master-detail/table-master-detail.js.map +1 -0
- package/dist/demo/overview/actions-cell.d.ts +5 -0
- package/dist/demo/overview/actions-cell.d.ts.map +1 -0
- package/dist/demo/overview/actions-cell.js +38 -0
- package/dist/demo/overview/actions-cell.js.map +1 -0
- package/dist/demo/overview/index.d.ts +2 -0
- package/dist/demo/overview/index.d.ts.map +1 -0
- package/dist/demo/overview/index.js +2 -0
- package/dist/demo/overview/index.js.map +1 -0
- package/dist/demo/overview/product.d.ts +27 -0
- package/dist/demo/overview/product.d.ts.map +1 -0
- package/dist/demo/overview/product.js +16 -0
- package/dist/demo/overview/product.js.map +1 -0
- package/dist/demo/overview/products.d.ts +3 -0
- package/dist/demo/overview/products.d.ts.map +1 -0
- package/dist/demo/overview/products.js +127 -0
- package/dist/demo/overview/products.js.map +1 -0
- package/dist/demo/overview/table.d.ts +6 -0
- package/dist/demo/overview/table.d.ts.map +1 -0
- package/dist/demo/overview/table.js +44 -0
- package/dist/demo/overview/table.js.map +1 -0
- package/dist/demo/overview/table.store.d.ts +15 -0
- package/dist/demo/overview/table.store.d.ts.map +1 -0
- package/dist/demo/overview/table.store.js +92 -0
- package/dist/demo/overview/table.store.js.map +1 -0
- package/dist/demo/state-caching/beverages.d.ts +3 -0
- package/dist/demo/state-caching/beverages.d.ts.map +1 -0
- package/dist/demo/state-caching/beverages.js +48 -0
- package/dist/demo/state-caching/beverages.js.map +1 -0
- package/dist/demo/state-caching/index.d.ts +2 -0
- package/dist/demo/state-caching/index.d.ts.map +1 -0
- package/dist/demo/state-caching/index.js +2 -0
- package/dist/demo/state-caching/index.js.map +1 -0
- package/dist/demo/state-caching/product.d.ts +6 -0
- package/dist/demo/state-caching/product.d.ts.map +1 -0
- package/dist/demo/state-caching/product.js +2 -0
- package/dist/demo/state-caching/product.js.map +1 -0
- package/dist/demo/state-caching/products.d.ts +3 -0
- package/dist/demo/state-caching/products.d.ts.map +1 -0
- package/dist/demo/state-caching/products.js +53 -0
- package/dist/demo/state-caching/products.js.map +1 -0
- package/dist/demo/state-caching/state-caching-table.d.ts +3 -0
- package/dist/demo/state-caching/state-caching-table.d.ts.map +1 -0
- package/dist/demo/state-caching/state-caching-table.js +14 -0
- package/dist/demo/state-caching/state-caching-table.js.map +1 -0
- package/dist/demo/state-caching/state-caching-table.store.d.ts +13 -0
- package/dist/demo/state-caching/state-caching-table.store.d.ts.map +1 -0
- package/dist/demo/state-caching/state-caching-table.store.js +70 -0
- package/dist/demo/state-caching/state-caching-table.store.js.map +1 -0
- package/dist/editable-cell/boolean-editable-cell.d.ts +3 -0
- package/dist/editable-cell/boolean-editable-cell.d.ts.map +1 -0
- package/dist/editable-cell/boolean-editable-cell.js +14 -0
- package/dist/editable-cell/boolean-editable-cell.js.map +1 -0
- package/dist/editable-cell/date-editable-cell.d.ts +3 -0
- package/dist/editable-cell/date-editable-cell.d.ts.map +1 -0
- package/dist/editable-cell/date-editable-cell.js +14 -0
- package/dist/editable-cell/date-editable-cell.js.map +1 -0
- package/dist/editable-cell/get-action-cell.d.ts +13 -0
- package/dist/editable-cell/get-action-cell.d.ts.map +1 -0
- package/dist/editable-cell/get-action-cell.js +18 -0
- package/dist/editable-cell/get-action-cell.js.map +1 -0
- package/dist/editable-cell/get-editable-cell.d.ts +13 -0
- package/dist/editable-cell/get-editable-cell.d.ts.map +1 -0
- package/dist/editable-cell/get-editable-cell.js +18 -0
- package/dist/editable-cell/get-editable-cell.js.map +1 -0
- package/dist/editable-cell/get-select-editable-cell.d.ts +10 -0
- package/dist/editable-cell/get-select-editable-cell.d.ts.map +1 -0
- package/dist/editable-cell/get-select-editable-cell.js +19 -0
- package/dist/editable-cell/get-select-editable-cell.js.map +1 -0
- package/dist/editable-cell/index.d.ts +8 -0
- package/dist/editable-cell/index.d.ts.map +1 -0
- package/dist/editable-cell/index.js +8 -0
- package/dist/editable-cell/index.js.map +1 -0
- package/dist/editable-cell/numeric-editable-cell.d.ts +3 -0
- package/dist/editable-cell/numeric-editable-cell.d.ts.map +1 -0
- package/dist/editable-cell/numeric-editable-cell.js +15 -0
- package/dist/editable-cell/numeric-editable-cell.js.map +1 -0
- package/dist/editable-cell/text-editable-cell.d.ts +9 -0
- package/dist/editable-cell/text-editable-cell.d.ts.map +1 -0
- package/dist/editable-cell/text-editable-cell.js +20 -0
- package/dist/editable-cell/text-editable-cell.js.map +1 -0
- package/dist/export/export.d.ts +10 -0
- package/dist/export/export.d.ts.map +1 -0
- package/dist/export/export.js +6 -0
- package/dist/export/export.js.map +1 -0
- package/dist/export/index.d.ts +2 -0
- package/dist/export/index.d.ts.map +1 -0
- package/dist/export/index.js +2 -0
- package/dist/export/index.js.map +1 -0
- package/dist/filters/column-menu-filters.d.ts +5 -0
- package/dist/filters/column-menu-filters.d.ts.map +1 -0
- package/dist/filters/column-menu-filters.js +9 -0
- package/dist/filters/column-menu-filters.js.map +1 -0
- package/dist/filters/datetime-filter/datetime-filter.d.ts +3 -0
- package/dist/filters/datetime-filter/datetime-filter.d.ts.map +1 -0
- package/dist/filters/datetime-filter/datetime-filter.js +71 -0
- package/dist/filters/datetime-filter/datetime-filter.js.map +1 -0
- package/dist/filters/field-values-filter.d.ts +6 -0
- package/dist/filters/field-values-filter.d.ts.map +1 -0
- package/dist/filters/field-values-filter.js +155 -0
- package/dist/filters/field-values-filter.js.map +1 -0
- package/dist/filters/index.d.ts +9 -0
- package/dist/filters/index.d.ts.map +1 -0
- package/dist/filters/index.js +9 -0
- package/dist/filters/index.js.map +1 -0
- package/dist/filters/multiselect-filter.d.ts +5 -0
- package/dist/filters/multiselect-filter.d.ts.map +1 -0
- package/dist/filters/multiselect-filter.js +107 -0
- package/dist/filters/multiselect-filter.js.map +1 -0
- package/dist/filters/numeric-filter-extended/numeric-extended-operators.d.ts +6 -0
- package/dist/filters/numeric-filter-extended/numeric-extended-operators.d.ts.map +1 -0
- package/dist/filters/numeric-filter-extended/numeric-extended-operators.js +6 -0
- package/dist/filters/numeric-filter-extended/numeric-extended-operators.js.map +1 -0
- package/dist/filters/numeric-filter-extended/numeric-filter-extended.d.ts +3 -0
- package/dist/filters/numeric-filter-extended/numeric-filter-extended.d.ts.map +1 -0
- package/dist/filters/numeric-filter-extended/numeric-filter-extended.js +27 -0
- package/dist/filters/numeric-filter-extended/numeric-filter-extended.js.map +1 -0
- package/dist/filters/range-filter/range-filter.d.ts +6 -0
- package/dist/filters/range-filter/range-filter.d.ts.map +1 -0
- package/dist/filters/range-filter/range-filter.js +117 -0
- package/dist/filters/range-filter/range-filter.js.map +1 -0
- package/dist/filters/standard-filter-with-multiselect/filter-cell-ext.d.ts +21 -0
- package/dist/filters/standard-filter-with-multiselect/filter-cell-ext.d.ts.map +1 -0
- package/dist/filters/standard-filter-with-multiselect/filter-cell-ext.js +82 -0
- package/dist/filters/standard-filter-with-multiselect/filter-cell-ext.js.map +1 -0
- package/dist/filters/standard-filter-with-multiselect/multiselect-operators.d.ts +6 -0
- package/dist/filters/standard-filter-with-multiselect/multiselect-operators.d.ts.map +1 -0
- package/dist/filters/standard-filter-with-multiselect/multiselect-operators.js +6 -0
- package/dist/filters/standard-filter-with-multiselect/multiselect-operators.js.map +1 -0
- package/dist/filters/standard-filter-with-multiselect/standard-filter-with-multiselect.d.ts +26 -0
- package/dist/filters/standard-filter-with-multiselect/standard-filter-with-multiselect.d.ts.map +1 -0
- package/dist/filters/standard-filter-with-multiselect/standard-filter-with-multiselect.js +69 -0
- package/dist/filters/standard-filter-with-multiselect/standard-filter-with-multiselect.js.map +1 -0
- package/dist/filters/standard-filter-with-multiselect/table-column-menu-filter-ext.d.ts +6 -0
- package/dist/filters/standard-filter-with-multiselect/table-column-menu-filter-ext.d.ts.map +1 -0
- package/dist/filters/standard-filter-with-multiselect/table-column-menu-filter-ext.js +30 -0
- package/dist/filters/standard-filter-with-multiselect/table-column-menu-filter-ext.js.map +1 -0
- package/dist/filters/time-filter/time-filter.d.ts +3 -0
- package/dist/filters/time-filter/time-filter.d.ts.map +1 -0
- package/dist/filters/time-filter/time-filter.js +71 -0
- package/dist/filters/time-filter/time-filter.js.map +1 -0
- package/dist/index.d.ts +10 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +9 -0
- package/dist/index.js.map +1 -0
- package/dist/select-cell/index.d.ts +2 -0
- package/dist/select-cell/index.d.ts.map +1 -0
- package/dist/select-cell/index.js +2 -0
- package/dist/select-cell/index.js.map +1 -0
- package/dist/select-cell/select-cell.d.ts +25 -0
- package/dist/select-cell/select-cell.d.ts.map +1 -0
- package/dist/select-cell/select-cell.js +35 -0
- package/dist/select-cell/select-cell.js.map +1 -0
- package/dist/table-state.d.ts +161 -0
- package/dist/table-state.d.ts.map +1 -0
- package/dist/table-state.js +1106 -0
- package/dist/table-state.js.map +1 -0
- package/dist/table.d.ts +40 -0
- package/dist/table.d.ts.map +1 -0
- package/dist/table.js +231 -0
- package/dist/table.js.map +1 -0
- package/package.json +6 -6
- package/src/select-cell/select-cell.tsx +16 -44
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"table-master-detail.d.ts","sourceRoot":"","sources":["../../../src/demo/master-detail/table-master-detail.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAa,EAAE,EAAE,MAAM,OAAO,CAAC;AA6BtC,eAAO,MAAM,wBAAwB,EAAE,EAgBrC,CAAC"}
|
@@ -0,0 +1,24 @@
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
2
|
+
import { useEffect } from 'react';
|
3
|
+
import { provide, useDependencies } from '@servicetitan/react-ioc';
|
4
|
+
import { Button } from '@servicetitan/design-system';
|
5
|
+
import { Table, TableColumn } from '../..';
|
6
|
+
import { MasterTableStore } from './master-table.store';
|
7
|
+
import { DetailTable } from './detail-table';
|
8
|
+
const ExpandCell = ({ tableState, dataItem }) => {
|
9
|
+
const handleExpandChange = () => {
|
10
|
+
tableState.handleExpandChange({
|
11
|
+
dataItem,
|
12
|
+
value: !dataItem.expanded,
|
13
|
+
});
|
14
|
+
};
|
15
|
+
return (_jsx("td", { children: _jsx(Button, Object.assign({ full: true, text: true, primary: true, onClick: handleExpandChange }, { children: "Show / Hide" })) }));
|
16
|
+
};
|
17
|
+
export const TableMasterDetailExample = provide({
|
18
|
+
singletons: [MasterTableStore],
|
19
|
+
})(() => {
|
20
|
+
const [store] = useDependencies(MasterTableStore);
|
21
|
+
useEffect(() => () => store.dispose());
|
22
|
+
return (_jsxs(Table, Object.assign({ tableState: store.tableState, selectable: true, detail: DetailTable }, { children: [_jsx(TableColumn, { field: "ProductID", title: "ID", width: "100px" }), _jsx(TableColumn, { field: "ProductName", title: "Product Name" }), _jsx(TableColumn, { cell: ExpandCell, width: "150px" })] })));
|
23
|
+
});
|
24
|
+
//# sourceMappingURL=table-master-detail.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"table-master-detail.js","sourceRoot":"","sources":["../../../src/demo/master-detail/table-master-detail.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,SAAS,EAAM,MAAM,OAAO,CAAC;AAEtC,OAAO,EAAE,OAAO,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAEnE,OAAO,EAAE,MAAM,EAAE,MAAM,6BAA6B,CAAC;AAErD,OAAO,EAAE,KAAK,EAAE,WAAW,EAA0C,MAAM,OAAO,CAAC;AAEnF,OAAO,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AAExD,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;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,uBACI,KAAC,MAAM,kBAAC,IAAI,QAAC,IAAI,QAAC,OAAO,QAAC,OAAO,EAAE,kBAAkB,iCAE5C,GACR,CACR,CAAC;AACN,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,wBAAwB,GAAO,OAAO,CAAC;IAChD,UAAU,EAAE,CAAC,gBAAgB,CAAC;CACjC,CAAC,CAAC,GAAG,EAAE;IACJ,MAAM,CAAC,KAAK,CAAC,GAAG,eAAe,CAAC,gBAAgB,CAAC,CAAC;IAElD,SAAS,CAAC,GAAG,EAAE,CAAC,GAAG,EAAE,CAAC,KAAK,CAAC,OAAO,EAAE,CAAC,CAAC;IAEvC,OAAO,CACH,MAAC,KAAK,kBAAC,UAAU,EAAE,KAAK,CAAC,UAAU,EAAE,UAAU,QAAC,MAAM,EAAE,WAAW,iBAC/D,KAAC,WAAW,IAAC,KAAK,EAAC,WAAW,EAAC,KAAK,EAAC,IAAI,EAAC,KAAK,EAAC,OAAO,GAAG,EAE1D,KAAC,WAAW,IAAC,KAAK,EAAC,aAAa,EAAC,KAAK,EAAC,cAAc,GAAG,EAExD,KAAC,WAAW,IAAC,IAAI,EAAE,UAAU,EAAE,KAAK,EAAC,OAAO,GAAG,KAC3C,CACX,CAAC;AACN,CAAC,CAAC,CAAC"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"actions-cell.d.ts","sourceRoot":"","sources":["../../../src/demo/overview/actions-cell.tsx"],"names":[],"mappings":";AAIA,OAAO,EAAE,cAAc,EAAkC,MAAM,OAAO,CAAC;AAEvE,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAiDpC,eAAO,MAAM,WAAW,oEAGtB,CAAC"}
|
@@ -0,0 +1,38 @@
|
|
1
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
2
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
3
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
4
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
5
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
6
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
7
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
8
|
+
});
|
9
|
+
};
|
10
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
11
|
+
import { Button, Icon, Stack } from '@servicetitan/design-system';
|
12
|
+
import { getActionCell } from '../..';
|
13
|
+
const ViewAction = ({ tableState, dataItem }) => {
|
14
|
+
if (!tableState) {
|
15
|
+
return _jsx("td", {});
|
16
|
+
}
|
17
|
+
const edit = () => tableState.edit(dataItem);
|
18
|
+
return (_jsx("td", { children: _jsx(Button, Object.assign({ text: true, primary: true, onClick: edit }, { children: _jsx(Icon, { name: "edit" }) })) }));
|
19
|
+
};
|
20
|
+
const EditAction = ({ tableState, formState, dataItem }) => {
|
21
|
+
if (!tableState) {
|
22
|
+
return _jsx("td", {});
|
23
|
+
}
|
24
|
+
const save = () => __awaiter(void 0, void 0, void 0, function* () {
|
25
|
+
const { hasError } = yield formState.validate();
|
26
|
+
if (hasError) {
|
27
|
+
return;
|
28
|
+
}
|
29
|
+
yield tableState.saveEdit(dataItem);
|
30
|
+
});
|
31
|
+
const cancel = () => tableState.cancelEdit(dataItem);
|
32
|
+
return (_jsx("td", { children: _jsxs(Stack, Object.assign({ justifyContent: "space-between" }, { children: [_jsx(Button, Object.assign({ text: true, onClick: cancel }, { children: _jsx(Icon, { name: "do_not_disturb" }) })), _jsx(Button, Object.assign({ text: true, primary: true, onClick: save }, { children: _jsx(Icon, { name: "done" }) }))] })) }));
|
33
|
+
};
|
34
|
+
export const ActionsCell = getActionCell({
|
35
|
+
view: ViewAction,
|
36
|
+
edit: EditAction,
|
37
|
+
});
|
38
|
+
//# sourceMappingURL=actions-cell.js.map
|
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AAC,IAAI,EAAC,gBAAgB,GAAG,IACzB,EAET,KAAC,MAAM,kBAAC,IAAI,QAAC,OAAO,QAAC,OAAO,EAAE,IAAI,gBAC9B,KAAC,IAAI,IAAC,IAAI,EAAC,MAAM,GAAG,IACf,KACL,GACP,CACR,CAAC;AACN,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,WAAW,GAAG,aAAa,CAAC;IACrC,IAAI,EAAE,UAAU;IAChB,IAAI,EAAE,UAAU;CACnB,CAAC,CAAC"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/demo/overview/index.ts"],"names":[],"mappings":"AAAA,cAAc,SAAS,CAAC"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/demo/overview/index.ts"],"names":[],"mappings":"AAAA,cAAc,SAAS,CAAC"}
|
@@ -0,0 +1,27 @@
|
|
1
|
+
export declare enum UserRole {
|
2
|
+
Unspecified = 0,
|
3
|
+
Technician = 1,
|
4
|
+
GeneralOffice = 2,
|
5
|
+
Admin = 3,
|
6
|
+
Owner = 4
|
7
|
+
}
|
8
|
+
export declare enum Supplier {
|
9
|
+
Dan = 1,
|
10
|
+
Adam = 2,
|
11
|
+
Charlie = 3,
|
12
|
+
Benjamin = 4
|
13
|
+
}
|
14
|
+
export interface Product {
|
15
|
+
ProductID: number;
|
16
|
+
ProductName: string;
|
17
|
+
Supplier: Supplier;
|
18
|
+
CategoryID: number;
|
19
|
+
MadeIn: string;
|
20
|
+
QuantityPerUnit: string;
|
21
|
+
UnitPrice: number;
|
22
|
+
UnitsInStock: number;
|
23
|
+
UnitsOnOrder: Date;
|
24
|
+
Discontinued: boolean;
|
25
|
+
AvailableFor?: UserRole;
|
26
|
+
}
|
27
|
+
//# sourceMappingURL=product.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"product.d.ts","sourceRoot":"","sources":["../../../src/demo/overview/product.ts"],"names":[],"mappings":"AAAA,oBAAY,QAAQ;IAChB,WAAW,IAAA;IACX,UAAU,IAAA;IACV,aAAa,IAAA;IACb,KAAK,IAAA;IACL,KAAK,IAAA;CACR;AAED,oBAAY,QAAQ;IAChB,GAAG,IAAI;IACP,IAAI,IAAA;IACJ,OAAO,IAAA;IACP,QAAQ,IAAA;CACX;AAED,MAAM,WAAW,OAAO;IACpB,SAAS,EAAE,MAAM,CAAC;IAClB,WAAW,EAAE,MAAM,CAAC;IACpB,QAAQ,EAAE,QAAQ,CAAC;IACnB,UAAU,EAAE,MAAM,CAAC;IACnB,MAAM,EAAE,MAAM,CAAC;IACf,eAAe,EAAE,MAAM,CAAC;IACxB,SAAS,EAAE,MAAM,CAAC;IAClB,YAAY,EAAE,MAAM,CAAC;IACrB,YAAY,EAAE,IAAI,CAAC;IACnB,YAAY,EAAE,OAAO,CAAC;IACtB,YAAY,CAAC,EAAE,QAAQ,CAAC;CAC3B"}
|
@@ -0,0 +1,16 @@
|
|
1
|
+
export var UserRole;
|
2
|
+
(function (UserRole) {
|
3
|
+
UserRole[UserRole["Unspecified"] = 0] = "Unspecified";
|
4
|
+
UserRole[UserRole["Technician"] = 1] = "Technician";
|
5
|
+
UserRole[UserRole["GeneralOffice"] = 2] = "GeneralOffice";
|
6
|
+
UserRole[UserRole["Admin"] = 3] = "Admin";
|
7
|
+
UserRole[UserRole["Owner"] = 4] = "Owner";
|
8
|
+
})(UserRole || (UserRole = {}));
|
9
|
+
export var Supplier;
|
10
|
+
(function (Supplier) {
|
11
|
+
Supplier[Supplier["Dan"] = 1] = "Dan";
|
12
|
+
Supplier[Supplier["Adam"] = 2] = "Adam";
|
13
|
+
Supplier[Supplier["Charlie"] = 3] = "Charlie";
|
14
|
+
Supplier[Supplier["Benjamin"] = 4] = "Benjamin";
|
15
|
+
})(Supplier || (Supplier = {}));
|
16
|
+
//# sourceMappingURL=product.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"product.js","sourceRoot":"","sources":["../../../src/demo/overview/product.ts"],"names":[],"mappings":"AAAA,MAAM,CAAN,IAAY,QAMX;AAND,WAAY,QAAQ;IAChB,qDAAW,CAAA;IACX,mDAAU,CAAA;IACV,yDAAa,CAAA;IACb,yCAAK,CAAA;IACL,yCAAK,CAAA;AACT,CAAC,EANW,QAAQ,KAAR,QAAQ,QAMnB;AAED,MAAM,CAAN,IAAY,QAKX;AALD,WAAY,QAAQ;IAChB,qCAAO,CAAA;IACP,uCAAI,CAAA;IACJ,6CAAO,CAAA;IACP,+CAAQ,CAAA;AACZ,CAAC,EALW,QAAQ,KAAR,QAAQ,QAKnB"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"products.d.ts","sourceRoot":"","sources":["../../../src/demo/overview/products.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAsB,MAAM,WAAW,CAAC;AAExD,eAAO,MAAM,QAAQ,EAAE,OAAO,EA4H7B,CAAC"}
|
@@ -0,0 +1,127 @@
|
|
1
|
+
import { UserRole, Supplier } from './product';
|
2
|
+
export const products = [
|
3
|
+
{
|
4
|
+
ProductID: 1,
|
5
|
+
ProductName: 'Chai',
|
6
|
+
Supplier: Supplier.Dan,
|
7
|
+
CategoryID: 1,
|
8
|
+
MadeIn: 'China',
|
9
|
+
QuantityPerUnit: '10 boxes x 20 bags',
|
10
|
+
UnitPrice: 18.0,
|
11
|
+
UnitsInStock: 39,
|
12
|
+
UnitsOnOrder: new Date('1/11/2019'),
|
13
|
+
Discontinued: false,
|
14
|
+
AvailableFor: UserRole.Admin,
|
15
|
+
},
|
16
|
+
{
|
17
|
+
ProductID: 2,
|
18
|
+
ProductName: 'Chang',
|
19
|
+
Supplier: Supplier.Dan,
|
20
|
+
CategoryID: 1,
|
21
|
+
MadeIn: 'Thailand',
|
22
|
+
QuantityPerUnit: '24 - 12 oz bottles',
|
23
|
+
UnitPrice: 19.0,
|
24
|
+
UnitsInStock: 17,
|
25
|
+
UnitsOnOrder: new Date('2/11/2019'),
|
26
|
+
Discontinued: false,
|
27
|
+
},
|
28
|
+
{
|
29
|
+
ProductID: 3,
|
30
|
+
ProductName: 'Aniseed Syrup',
|
31
|
+
Supplier: Supplier.Dan,
|
32
|
+
CategoryID: 2,
|
33
|
+
MadeIn: 'France',
|
34
|
+
QuantityPerUnit: '12 - 550 ml bottles',
|
35
|
+
UnitPrice: 10.0,
|
36
|
+
UnitsInStock: 13,
|
37
|
+
UnitsOnOrder: new Date('3/11/2019'),
|
38
|
+
Discontinued: false,
|
39
|
+
AvailableFor: UserRole.Owner,
|
40
|
+
},
|
41
|
+
{
|
42
|
+
ProductID: 4,
|
43
|
+
ProductName: "Chef Anton's Cajun Seasoning",
|
44
|
+
Supplier: Supplier.Adam,
|
45
|
+
CategoryID: 2,
|
46
|
+
MadeIn: 'USA',
|
47
|
+
QuantityPerUnit: '48 - 6 oz jars',
|
48
|
+
UnitPrice: 22.0,
|
49
|
+
UnitsInStock: 53,
|
50
|
+
UnitsOnOrder: new Date('4/11/2019'),
|
51
|
+
Discontinued: false,
|
52
|
+
},
|
53
|
+
{
|
54
|
+
ProductID: 5,
|
55
|
+
ProductName: "Chef Anton's Gumbo Mix",
|
56
|
+
Supplier: Supplier.Adam,
|
57
|
+
CategoryID: 2,
|
58
|
+
MadeIn: 'USA',
|
59
|
+
QuantityPerUnit: '36 boxes',
|
60
|
+
UnitPrice: 21.35,
|
61
|
+
UnitsInStock: 0,
|
62
|
+
UnitsOnOrder: new Date('5/11/2019'),
|
63
|
+
Discontinued: true,
|
64
|
+
AvailableFor: UserRole.GeneralOffice,
|
65
|
+
},
|
66
|
+
{
|
67
|
+
ProductID: 6,
|
68
|
+
ProductName: "Grandma's Boysenberry Spread",
|
69
|
+
Supplier: Supplier.Charlie,
|
70
|
+
CategoryID: 2,
|
71
|
+
MadeIn: 'Norway',
|
72
|
+
QuantityPerUnit: '12 - 8 oz jars',
|
73
|
+
UnitPrice: 25.0,
|
74
|
+
UnitsInStock: 120,
|
75
|
+
UnitsOnOrder: new Date('6/11/2019'),
|
76
|
+
Discontinued: false,
|
77
|
+
},
|
78
|
+
{
|
79
|
+
ProductID: 7,
|
80
|
+
ProductName: "Uncle Bob's Organic Dried Pears",
|
81
|
+
Supplier: Supplier.Charlie,
|
82
|
+
CategoryID: 7,
|
83
|
+
MadeIn: 'USA',
|
84
|
+
QuantityPerUnit: '12 - 1 lb pkgs.',
|
85
|
+
UnitPrice: 30.0,
|
86
|
+
UnitsInStock: 15,
|
87
|
+
UnitsOnOrder: new Date('7/11/2019'),
|
88
|
+
Discontinued: false,
|
89
|
+
},
|
90
|
+
{
|
91
|
+
ProductID: 8,
|
92
|
+
ProductName: 'Northwoods Cranberry Sauce',
|
93
|
+
Supplier: Supplier.Charlie,
|
94
|
+
CategoryID: 2,
|
95
|
+
MadeIn: 'Norway',
|
96
|
+
QuantityPerUnit: '12 - 12 oz jars',
|
97
|
+
UnitPrice: 40.0,
|
98
|
+
UnitsInStock: 6,
|
99
|
+
UnitsOnOrder: new Date('8/11/2019'),
|
100
|
+
Discontinued: false,
|
101
|
+
},
|
102
|
+
{
|
103
|
+
ProductID: 9,
|
104
|
+
ProductName: 'Mishi Kobe Niku',
|
105
|
+
Supplier: Supplier.Benjamin,
|
106
|
+
CategoryID: 6,
|
107
|
+
MadeIn: 'Japan',
|
108
|
+
QuantityPerUnit: '18 - 500 g pkgs.',
|
109
|
+
UnitPrice: 97.0,
|
110
|
+
UnitsInStock: 29,
|
111
|
+
UnitsOnOrder: new Date('9/11/2019'),
|
112
|
+
Discontinued: true,
|
113
|
+
},
|
114
|
+
{
|
115
|
+
ProductID: 10,
|
116
|
+
ProductName: 'Ikura',
|
117
|
+
Supplier: Supplier.Benjamin,
|
118
|
+
CategoryID: 8,
|
119
|
+
MadeIn: 'Japan',
|
120
|
+
QuantityPerUnit: '12 - 200 ml jars',
|
121
|
+
UnitPrice: 31.0,
|
122
|
+
UnitsInStock: 31,
|
123
|
+
UnitsOnOrder: new Date('10/11/2019'),
|
124
|
+
Discontinued: false,
|
125
|
+
},
|
126
|
+
];
|
127
|
+
//# sourceMappingURL=products.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"products.js","sourceRoot":"","sources":["../../../src/demo/overview/products.ts"],"names":[],"mappings":"AAAA,OAAO,EAAW,QAAQ,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAC;AAExD,MAAM,CAAC,MAAM,QAAQ,GAAc;IAC/B;QACI,SAAS,EAAE,CAAC;QACZ,WAAW,EAAE,MAAM;QACnB,QAAQ,EAAE,QAAQ,CAAC,GAAG;QACtB,UAAU,EAAE,CAAC;QACb,MAAM,EAAE,OAAO;QACf,eAAe,EAAE,oBAAoB;QACrC,SAAS,EAAE,IAAI;QACf,YAAY,EAAE,EAAE;QAChB,YAAY,EAAE,IAAI,IAAI,CAAC,WAAW,CAAC;QACnC,YAAY,EAAE,KAAK;QACnB,YAAY,EAAE,QAAQ,CAAC,KAAK;KAC/B;IACD;QACI,SAAS,EAAE,CAAC;QACZ,WAAW,EAAE,OAAO;QACpB,QAAQ,EAAE,QAAQ,CAAC,GAAG;QACtB,UAAU,EAAE,CAAC;QACb,MAAM,EAAE,UAAU;QAClB,eAAe,EAAE,oBAAoB;QACrC,SAAS,EAAE,IAAI;QACf,YAAY,EAAE,EAAE;QAChB,YAAY,EAAE,IAAI,IAAI,CAAC,WAAW,CAAC;QACnC,YAAY,EAAE,KAAK;KACtB;IACD;QACI,SAAS,EAAE,CAAC;QACZ,WAAW,EAAE,eAAe;QAC5B,QAAQ,EAAE,QAAQ,CAAC,GAAG;QACtB,UAAU,EAAE,CAAC;QACb,MAAM,EAAE,QAAQ;QAChB,eAAe,EAAE,qBAAqB;QACtC,SAAS,EAAE,IAAI;QACf,YAAY,EAAE,EAAE;QAChB,YAAY,EAAE,IAAI,IAAI,CAAC,WAAW,CAAC;QACnC,YAAY,EAAE,KAAK;QACnB,YAAY,EAAE,QAAQ,CAAC,KAAK;KAC/B;IAC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Z,WAAW,EAAE,4BAA4B;QACzC,QAAQ,EAAE,QAAQ,CAAC,OAAO;QAC1B,UAAU,EAAE,CAAC;QACb,MAAM,EAAE,QAAQ;QAChB,eAAe,EAAE,iBAAiB;QAClC,SAAS,EAAE,IAAI;QACf,YAAY,EAAE,CAAC;QACf,YAAY,EAAE,IAAI,IAAI,CAAC,WAAW,CAAC;QACnC,YAAY,EAAE,KAAK;KACtB;IACD;QACI,SAAS,EAAE,CAAC;QACZ,WAAW,EAAE,iBAAiB;QAC9B,QAAQ,EAAE,QAAQ,CAAC,QAAQ;QAC3B,UAAU,EAAE,CAAC;QACb,MAAM,EAAE,OAAO;QACf,eAAe,EAAE,kBAAkB;QACnC,SAAS,EAAE,IAAI;QACf,YAAY,EAAE,EAAE;QAChB,YAAY,EAAE,IAAI,IAAI,CAAC,WAAW,CAAC;QACnC,YAAY,EAAE,IAAI;KACrB;IACD;QACI,SAAS,EAAE,EAAE;QACb,WAAW,EAAE,OAAO;QACpB,QAAQ,EAAE,QAAQ,CAAC,QAAQ;QAC3B,UAAU,EAAE,CAAC;QACb,MAAM,EAAE,OAAO;QACf,eAAe,EAAE,kBAAkB;QACnC,SAAS,EAAE,IAAI;QACf,YAAY,EAAE,EAAE;QAChB,YAAY,EAAE,IAAI,IAAI,CAAC,YAAY,CAAC;QACpC,YAAY,EAAE,KAAK;KACtB;CACJ,CAAC"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"table.d.ts","sourceRoot":"","sources":["../../../src/demo/overview/table.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAmC,EAAE,EAAgB,MAAM,OAAO,CAAC;AA0D1E,MAAM,WAAW,iBAAiB;IAC9B,iBAAiB,CAAC,EAAE,OAAO,CAAC;CAC/B;AAED,eAAO,MAAM,YAAY,EAAE,EAAE,CAAC,iBAAiB,CA+H9C,CAAC"}
|
@@ -0,0 +1,44 @@
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
2
|
+
import { useMemo, cloneElement, Fragment } from 'react';
|
3
|
+
import { provide, useDependencies } from '@servicetitan/react-ioc';
|
4
|
+
import { observer } from 'mobx-react';
|
5
|
+
import { Stack, ButtonGroup, Button, Tag } from '@servicetitan/design-system';
|
6
|
+
import { Table, TableColumn, TableCell, TextEditableCell, NumericEditableCell, BooleanEditableCell, DateEditableCell, getSelectEditableCell, CurrencyRangeColumnMenuFilter, DateRangeColumnMenuFilter, StandardColumnMenuFilter, standardFilterWithMultiselect, multiSelectColumnMenuFilter, } from '../..';
|
7
|
+
import { Export } from '../../export';
|
8
|
+
import { TableStore } from './table.store';
|
9
|
+
import { ActionsCell } from './actions-cell';
|
10
|
+
import { enumToOptions, getEnumKeys } from '@servicetitan/form';
|
11
|
+
import { UserRole, Supplier } from './product';
|
12
|
+
const UserRoleColumnMenuFilter = multiSelectColumnMenuFilter(getEnumKeys(UserRole), userRole => (_jsx(Tag, Object.assign({ compact: true, color: UserRole[userRole] === UserRole.Owner ? 'success' : 'default' }, { children: userRole }))));
|
13
|
+
const AvailableForEditableCell = getSelectEditableCell({
|
14
|
+
options: enumToOptions(UserRole),
|
15
|
+
viewer: ({ dataItem, field }) => {
|
16
|
+
const value = dataItem[field];
|
17
|
+
return _jsx("td", { children: value && UserRole[value] });
|
18
|
+
},
|
19
|
+
});
|
20
|
+
const SupplierCell = props => {
|
21
|
+
const { field, dataItem, rowType } = props;
|
22
|
+
if (rowType !== 'data') {
|
23
|
+
return _jsx(TableCell, Object.assign({}, props));
|
24
|
+
}
|
25
|
+
return _jsx("td", { children: Supplier[dataItem[field]] });
|
26
|
+
};
|
27
|
+
export const TableExample = provide({
|
28
|
+
singletons: [TableStore],
|
29
|
+
})(observer((props) => {
|
30
|
+
const [{ tableState, inEdit, editAll, cancelAll, saveAll }] = useDependencies(TableStore);
|
31
|
+
const madeInColumnMenu = useMemo(() => standardFilterWithMultiselect({ tableState }), [tableState]);
|
32
|
+
const cellRender = (td, { dataItem, field }) => {
|
33
|
+
if (!td) {
|
34
|
+
return null;
|
35
|
+
}
|
36
|
+
return cloneElement(td, {
|
37
|
+
onClick: () => {
|
38
|
+
tableState.edit(dataItem, field);
|
39
|
+
},
|
40
|
+
});
|
41
|
+
};
|
42
|
+
return (_jsxs(Fragment, { children: [_jsxs(Stack, Object.assign({ justifyContent: "space-between", alignContent: "center", className: "m-b-2" }, { children: [_jsx(Export, { totalCount: tableState.totalCount, exportPdf: tableState.exportPdf, exportExcel: tableState.exportExcel }), inEdit ? (_jsxs(ButtonGroup, { children: [_jsx(Button, Object.assign({ small: true, onClick: cancelAll, className: "m-r-2" }, { children: "Cancel All" })), _jsx(Button, Object.assign({ small: true, primary: true, onClick: saveAll }, { children: "Save All" }))] })) : (_jsx(Button, Object.assign({ small: true, primary: true, onClick: editAll }, { children: "Edit All" })))] })), _jsxs(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(TableColumn, { field: "ProductID", title: "ID", editable: false, width: "100px" }), _jsx(TableColumn, { field: "ProductName", title: "Product Name", cell: TextEditableCell, columnMenu: StandardColumnMenuFilter, width: "240px" }), _jsx(TableColumn, { field: "Supplier", title: "Supplier", cell: SupplierCell, columnMenu: StandardColumnMenuFilter, width: "150px" }), _jsx(TableColumn, { field: "MadeIn", title: "Made In", cell: TextEditableCell, columnMenu: madeInColumnMenu, width: "175px" }), _jsx(TableColumn, { field: "UnitsOnOrder", title: "First Ordered On", cell: DateEditableCell, columnMenu: DateRangeColumnMenuFilter, format: "{0:d}", width: "240px" }), _jsx(TableColumn, { field: "UnitPrice", title: "Unit Price", cell: NumericEditableCell, columnMenu: CurrencyRangeColumnMenuFilter, format: "{0:c}", width: "125px" }), _jsx(TableColumn, { field: "Discontinued", title: "Discontinued", cell: BooleanEditableCell, sortable: false, width: "125px" }), _jsx(TableColumn, { field: "AvailableFor", title: "Available For", cell: AvailableForEditableCell, columnMenu: UserRoleColumnMenuFilter, width: "240px" }), _jsx(TableColumn, Object.assign({ cell: ActionsCell, sortable: false }, (props.fixedWidthColumns ? { width: '125px' } : {})))] }))] }));
|
43
|
+
}));
|
44
|
+
//# sourceMappingURL=table.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"table.js","sourceRoot":"","sources":["../../../src/demo/overview/table.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,OAAO,EAAE,YAAY,EAAE,QAAQ,EAAoB,MAAM,OAAO,CAAC;AAE1E,OAAO,EAAE,OAAO,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAEnE,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAEtC,OAAO,EAAE,KAAK,EAAE,WAAW,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,6BAA6B,CAAC;AAE9E,OAAO,EACH,KAAK,EACL,WAAW,EACX,SAAS,EAET,gBAAgB,EAChB,mBAAmB,EACnB,mBAAmB,EACnB,gBAAgB,EAChB,qBAAqB,EACrB,6BAA6B,EAC7B,yBAAyB,EACzB,wBAAwB,EACxB,6BAA6B,EAC7B,2BAA2B,GAC9B,MAAM,OAAO,CAAC;AACf,OAAO,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AAEtC,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAE3C,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAE7C,OAAO,EAAE,aAAa,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAChE,OAAO,EAAW,QAAQ,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAC;AAExD,MAAM,wBAAwB,GAAG,2BAA2B,CAAC,WAAW,CAAC,QAAQ,CAAC,EAAE,QAAQ,CAAC,EAAE,CAAC,CAC5F,KAAC,GAAG,kBAAC,OAAO,QAAC,KAAK,EAAE,QAAQ,CAAC,QAAQ,CAAC,KAAK,QAAQ,CAAC,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C,UAAU,EAChB,KAAK,EAAC,UAAU,EAChB,IAAI,EAAE,YAAY,EAClB,UAAU,EAAE,wBAAwB,EACpC,KAAK,EAAC,OAAO,GACf,EAEF,KAAC,WAAW,IACR,KAAK,EAAC,QAAQ,EACd,KAAK,EAAC,SAAS,EACf,IAAI,EAAE,gBAAgB,EACtB,UAAU,EAAE,gBAAgB,EAC5B,KAAK,EAAC,OAAO,GACf,EAEF,KAAC,WAAW,IACR,KAAK,EAAC,cAAc,EACpB,KAAK,EAAC,kBAAkB,EACxB,IAAI,EAAE,gBAAgB,EACtB,UAAU,EAAE,yBAAyB,EACrC,MAAM,EAAC,OAAO,EACd,KAAK,EAAC,OAAO,GACf,EAEF,KAAC,WAAW,IACR,KAAK,EAAC,WAAW,EACjB,KAAK,EAAC,YAAY,EAClB,IAAI,EAAE,mBAAmB,EACzB,UAAU,EAAE,6BAA6B,EACzC,MAAM,EAAC,OAAO,EACd,KAAK,EAAC,OAAO,GACf,EAEF,KAAC,WAAW,IACR,KAAK,EAAC,cAAc,EACpB,KAAK,EAAC,cAAc,EACpB,IAAI,EAAE,mBAAmB,EACzB,QAAQ,EAAE,KAAK,EACf,KAAK,EAAC,OAAO,GACf,EAEF,KAAC,WAAW,IACR,KAAK,EAAC,cAAc,EACpB,KAAK,EAAC,eAAe,EACrB,IAAI,EAAE,wBAAwB,EAC9B,UAAU,EAAE,wBAAwB,EACpC,KAAK,EAAC,OAAO,GACf,EAEF,KAAC,WAAW,kBACR,IAAI,EAAE,WAAW,EACjB,QAAQ,EAAE,KAAK,IACX,CAAC,KAAK,CAAC,iBAAiB,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,OAAO,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,EACzD,KACE,IACD,CACd,CAAC;AACN,CAAC,CAAC,CACL,CAAC"}
|
@@ -0,0 +1,15 @@
|
|
1
|
+
import { TableState } from '../..';
|
2
|
+
import { Product } from './product';
|
3
|
+
export declare class TableStore {
|
4
|
+
tableState: TableState<Product, number, never, never>;
|
5
|
+
constructor();
|
6
|
+
get inEdit(): boolean;
|
7
|
+
editAll: () => Promise<void>;
|
8
|
+
saveAll: () => Promise<void>;
|
9
|
+
cancelAll: () => void;
|
10
|
+
private getDataSource;
|
11
|
+
private idSelector;
|
12
|
+
private isRowUnselectable;
|
13
|
+
private getFormState;
|
14
|
+
}
|
15
|
+
//# sourceMappingURL=table.store.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"table.store.d.ts","sourceRoot":"","sources":["../../../src/demo/overview/table.store.ts"],"names":[],"mappings":"AAIA,OAAO,EAAsB,UAAU,EAAE,MAAM,OAAO,CAAC;AAKvD,OAAO,EAAE,OAAO,EAAsB,MAAM,WAAW,CAAC;AAGxD,qBACa,UAAU;IACnB,UAAU,4CAMP;;IAMH,IAAc,MAAM,YAEnB;IAED,OAAO,sBAAmC;IAC1C,OAAO,sBAAuC;IAC9C,SAAS,aAAyC;IAElD,OAAO,CAAC,aAAa;IAOrB,OAAO,CAAC,UAAU;IAIlB,OAAO,CAAC,iBAAiB;IAIzB,OAAO,CAAC,YAAY;CAsBvB"}
|
@@ -0,0 +1,92 @@
|
|
1
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
2
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
3
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
4
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
5
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
6
|
+
};
|
7
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
8
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
9
|
+
};
|
10
|
+
import { injectable } from '@servicetitan/react-ioc';
|
11
|
+
import { computed, makeObservable } from 'mobx';
|
12
|
+
import { InMemoryDataSource, TableState } from '../..';
|
13
|
+
import { setFormStateValues, FormValidators } from '@servicetitan/form';
|
14
|
+
import { FormState, FieldState } from 'formstate';
|
15
|
+
import { UserRole, Supplier } from './product';
|
16
|
+
import { products } from './products';
|
17
|
+
let TableStore = class TableStore {
|
18
|
+
constructor() {
|
19
|
+
Object.defineProperty(this, "tableState", {
|
20
|
+
enumerable: true,
|
21
|
+
configurable: true,
|
22
|
+
writable: true,
|
23
|
+
value: new TableState({
|
24
|
+
dataSource: this.getDataSource(),
|
25
|
+
isRowUnselectable: this.isRowUnselectable,
|
26
|
+
selectionLimit: 3,
|
27
|
+
getFormState: this.getFormState,
|
28
|
+
pageSize: 5,
|
29
|
+
})
|
30
|
+
});
|
31
|
+
Object.defineProperty(this, "editAll", {
|
32
|
+
enumerable: true,
|
33
|
+
configurable: true,
|
34
|
+
writable: true,
|
35
|
+
value: () => this.tableState.editAll()
|
36
|
+
});
|
37
|
+
Object.defineProperty(this, "saveAll", {
|
38
|
+
enumerable: true,
|
39
|
+
configurable: true,
|
40
|
+
writable: true,
|
41
|
+
value: () => this.tableState.saveEditAll()
|
42
|
+
});
|
43
|
+
Object.defineProperty(this, "cancelAll", {
|
44
|
+
enumerable: true,
|
45
|
+
configurable: true,
|
46
|
+
writable: true,
|
47
|
+
value: () => this.tableState.cancelEditAll()
|
48
|
+
});
|
49
|
+
makeObservable(this);
|
50
|
+
}
|
51
|
+
get inEdit() {
|
52
|
+
return this.tableState.inEdit.size > 0;
|
53
|
+
}
|
54
|
+
getDataSource() {
|
55
|
+
return new InMemoryDataSource(products, this.idSelector, {
|
56
|
+
Supplier: (value) => Supplier[value],
|
57
|
+
AvailableFor: (value) => value && UserRole[value],
|
58
|
+
});
|
59
|
+
}
|
60
|
+
idSelector(row) {
|
61
|
+
return row.ProductID;
|
62
|
+
}
|
63
|
+
isRowUnselectable(row) {
|
64
|
+
return row.Discontinued;
|
65
|
+
}
|
66
|
+
getFormState(row) {
|
67
|
+
return setFormStateValues(new FormState({
|
68
|
+
ProductID: new FieldState(0),
|
69
|
+
ProductName: new FieldState('').validators(FormValidators.required),
|
70
|
+
Supplier: new FieldState(Supplier.Adam),
|
71
|
+
CategoryID: new FieldState(0),
|
72
|
+
MadeIn: new FieldState(''),
|
73
|
+
QuantityPerUnit: new FieldState(''),
|
74
|
+
UnitPrice: new FieldState(0).validators(value => value <= 0 && 'Price must be positive'),
|
75
|
+
UnitsInStock: new FieldState(0),
|
76
|
+
UnitsOnOrder: new FieldState(new Date()).validators(value => value > new Date() && 'Invalid date'),
|
77
|
+
Discontinued: new FieldState(false),
|
78
|
+
AvailableFor: new FieldState(undefined),
|
79
|
+
}), row);
|
80
|
+
}
|
81
|
+
};
|
82
|
+
__decorate([
|
83
|
+
computed,
|
84
|
+
__metadata("design:type", Object),
|
85
|
+
__metadata("design:paramtypes", [])
|
86
|
+
], TableStore.prototype, "inEdit", null);
|
87
|
+
TableStore = __decorate([
|
88
|
+
injectable(),
|
89
|
+
__metadata("design:paramtypes", [])
|
90
|
+
], TableStore);
|
91
|
+
export { TableStore };
|
92
|
+
//# sourceMappingURL=table.store.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"table.store.js","sourceRoot":"","sources":["../../../src/demo/overview/table.store.ts"],"names":[],"mappings":";;;;;;;;;AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AAErD,OAAO,EAAE,QAAQ,EAAE,cAAc,EAAE,MAAM,MAAM,CAAC;AAEhD,OAAO,EAAE,kBAAkB,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AAEvD,OAAO,EAAE,kBAAkB,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AACxE,OAAO,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AAElD,OAAO,EAAW,QAAQ,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAC;AACxD,OAA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AC;YAC5B,WAAW,EAAE,IAAI,UAAU,CAAC,EAAE,CAAC,CAAC,UAAU,CAAC,cAAc,CAAC,QAAQ,CAAC;YACnE,QAAQ,EAAE,IAAI,UAAU,CAAW,QAAQ,CAAC,IAAI,CAAC;YACjD,UAAU,EAAE,IAAI,UAAU,CAAC,CAAC,CAAC;YAC7B,MAAM,EAAE,IAAI,UAAU,CAAC,EAAE,CAAC;YAC1B,eAAe,EAAE,IAAI,UAAU,CAAC,EAAE,CAAC;YACnC,SAAS,EAAE,IAAI,UAAU,CAAC,CAAC,CAAC,CAAC,UAAU,CACnC,KAAK,CAAC,EAAE,CAAC,KAAK,IAAI,CAAC,IAAI,wBAAwB,CAClD;YACD,YAAY,EAAE,IAAI,UAAU,CAAC,CAAC,CAAC;YAC/B,YAAY,EAAE,IAAI,UAAU,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,UAAU,CAAC,KAAK,CAAC;YACnC,YAAY,EAAE,IAAI,UAAU,CAAuB,SAAS,CAAC;SAChE,CAAC,EACF,GAAG,CACN,CAAC;IACN,CAAC;CACJ,CAAA;AA7Ca;IAAT,QAAQ;;;wCAER;AAfQ,UAAU;IADtB,UAAU,EAAE;;GACA,UAAU,CA0DtB;SA1DY,UAAU"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"beverages.d.ts","sourceRoot":"","sources":["../../../src/demo/state-caching/beverages.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAEpC,eAAO,MAAM,SAAS,EAAE,OAAO,EA8C9B,CAAC"}
|
@@ -0,0 +1,48 @@
|
|
1
|
+
export const beverages = [
|
2
|
+
{
|
3
|
+
ProductID: 1,
|
4
|
+
ProductName: 'Tea',
|
5
|
+
Description: 'Tea is an aromatic beverage...',
|
6
|
+
},
|
7
|
+
{
|
8
|
+
ProductID: 2,
|
9
|
+
ProductName: 'Coffee',
|
10
|
+
Description: 'Coffee is a brewed drink prepared from roasted coffee beans...',
|
11
|
+
},
|
12
|
+
{
|
13
|
+
ProductID: 3,
|
14
|
+
ProductName: 'Liquor',
|
15
|
+
Description: 'Liquor is an alcoholic drink...',
|
16
|
+
},
|
17
|
+
{
|
18
|
+
ProductID: 4,
|
19
|
+
ProductName: 'Beer',
|
20
|
+
Description: 'Beer is one of the oldest and most widely consumed drinks in the world...',
|
21
|
+
},
|
22
|
+
{
|
23
|
+
ProductID: 5,
|
24
|
+
ProductName: 'Milk',
|
25
|
+
Description: 'Milk is a nutrient-rich, white liquid food produced by...',
|
26
|
+
},
|
27
|
+
{
|
28
|
+
ProductID: 6,
|
29
|
+
ProductName: 'Juice',
|
30
|
+
Description: 'Juice is a drink made from the extraction...',
|
31
|
+
},
|
32
|
+
{
|
33
|
+
ProductID: 7,
|
34
|
+
ProductName: 'Hot chocolate',
|
35
|
+
Description: 'Hot chocolate, also known as drinking chocolate, cocoa, and as chocolate...',
|
36
|
+
},
|
37
|
+
{
|
38
|
+
ProductID: 8,
|
39
|
+
ProductName: 'Wine',
|
40
|
+
Description: 'Wine is an alcoholic drink typically made from fermented grapes...',
|
41
|
+
},
|
42
|
+
{
|
43
|
+
ProductID: 9,
|
44
|
+
ProductName: 'Kombucha',
|
45
|
+
Description: 'Kombucha is a fermented, slightly alcoholic, lightly effervescent...',
|
46
|
+
},
|
47
|
+
];
|
48
|
+
//# sourceMappingURL=beverages.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"beverages.js","sourceRoot":"","sources":["../../../src/demo/state-caching/beverages.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,SAAS,GAAc;IAChC;QACI,SAAS,EAAE,CAAC;QACZ,WAAW,EAAE,KAAK;QAClB,WAAW,EAAE,gCAAgC;KAChD;IACD;QACI,SAAS,EAAE,CAAC;QACZ,WAAW,EAAE,QAAQ;QACrB,WAAW,EAAE,gEAAgE;KAChF;IACD;QACI,SAAS,EAAE,CAAC;QACZ,WAAW,EAAE,QAAQ;QACrB,WAAW,EAAE,iCAAiC;KACjD;IACD;QACI,SAAS,EAAE,CAAC;QACZ,WAAW,EAAE,MAAM;QACnB,WAAW,EAAE,2EAA2E;KAC3F;IACD;QACI,SAAS,EAAE,CAAC;QACZ,WAAW,EAAE,MAAM;QACnB,WAAW,EAAE,2DAA2D;KAC3E;IACD;QACI,SAAS,EAAE,CAAC;QACZ,WAAW,EAAE,OAAO;QACpB,WAAW,EAAE,8CAA8C;KAC9D;IACD;QACI,SAAS,EAAE,CAAC;QACZ,WAAW,EAAE,eAAe;QAC5B,WAAW,EAAE,6EAA6E;KAC7F;IACD;QACI,SAAS,EAAE,CAAC;QACZ,WAAW,EAAE,MAAM;QACnB,WAAW,EAAE,oEAAoE;KACpF;IACD;QACI,SAAS,EAAE,CAAC;QACZ,WAAW,EAAE,UAAU;QACvB,WAAW,EAAE,sEAAsE;KACtF;CACJ,CAAC"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/demo/state-caching/index.ts"],"names":[],"mappings":"AAAA,cAAc,uBAAuB,CAAC"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/demo/state-caching/index.ts"],"names":[],"mappings":"AAAA,cAAc,uBAAuB,CAAC"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"product.d.ts","sourceRoot":"","sources":["../../../src/demo/state-caching/product.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,OAAO;IACpB,SAAS,EAAE,MAAM,CAAC;IAClB,WAAW,EAAE,MAAM,CAAC;IACpB,WAAW,EAAE,MAAM,CAAC;CACvB"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"product.js","sourceRoot":"","sources":["../../../src/demo/state-caching/product.ts"],"names":[],"mappings":""}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"products.d.ts","sourceRoot":"","sources":["../../../src/demo/state-caching/products.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAEpC,eAAO,MAAM,QAAQ,EAAE,OAAO,EAmD7B,CAAC"}
|