@servicetitan/table 21.7.2 → 22.1.0
Sign up to get free protection for your applications and to get access to all the features.
- package/CHANGELOG.md +566 -0
- package/package.json +10 -10
- package/src/select-cell/select-cell.tsx +44 -16
- package/dist/demo/index.d.ts +0 -4
- package/dist/demo/index.d.ts.map +0 -1
- package/dist/demo/index.js +0 -4
- package/dist/demo/index.js.map +0 -1
- package/dist/demo/master-detail/detail-table.d.ts +0 -4
- package/dist/demo/master-detail/detail-table.d.ts.map +0 -1
- package/dist/demo/master-detail/detail-table.js +0 -28
- package/dist/demo/master-detail/detail-table.js.map +0 -1
- package/dist/demo/master-detail/detail-table.store.d.ts +0 -14
- package/dist/demo/master-detail/detail-table.store.d.ts.map +0 -1
- package/dist/demo/master-detail/detail-table.store.js +0 -104
- package/dist/demo/master-detail/detail-table.store.js.map +0 -1
- package/dist/demo/master-detail/index.d.ts +0 -2
- package/dist/demo/master-detail/index.d.ts.map +0 -1
- package/dist/demo/master-detail/index.js +0 -2
- package/dist/demo/master-detail/index.js.map +0 -1
- package/dist/demo/master-detail/master-table.store.d.ts +0 -14
- package/dist/demo/master-detail/master-table.store.d.ts.map +0 -1
- package/dist/demo/master-detail/master-table.store.js +0 -103
- package/dist/demo/master-detail/master-table.store.js.map +0 -1
- package/dist/demo/master-detail/product-detail.d.ts +0 -8
- package/dist/demo/master-detail/product-detail.d.ts.map +0 -1
- package/dist/demo/master-detail/product-detail.js +0 -2
- package/dist/demo/master-detail/product-detail.js.map +0 -1
- package/dist/demo/master-detail/product-details.d.ts +0 -3
- package/dist/demo/master-detail/product-details.d.ts.map +0 -1
- package/dist/demo/master-detail/product-details.js +0 -55
- package/dist/demo/master-detail/product-details.js.map +0 -1
- package/dist/demo/master-detail/product.d.ts +0 -26
- package/dist/demo/master-detail/product.d.ts.map +0 -1
- package/dist/demo/master-detail/product.js +0 -16
- package/dist/demo/master-detail/product.js.map +0 -1
- package/dist/demo/master-detail/products.d.ts +0 -3
- package/dist/demo/master-detail/products.d.ts.map +0 -1
- package/dist/demo/master-detail/products.js +0 -117
- package/dist/demo/master-detail/products.js.map +0 -1
- package/dist/demo/master-detail/table-master-detail.d.ts +0 -3
- package/dist/demo/master-detail/table-master-detail.d.ts.map +0 -1
- package/dist/demo/master-detail/table-master-detail.js +0 -24
- package/dist/demo/master-detail/table-master-detail.js.map +0 -1
- package/dist/demo/overview/actions-cell.d.ts +0 -5
- package/dist/demo/overview/actions-cell.d.ts.map +0 -1
- package/dist/demo/overview/actions-cell.js +0 -38
- package/dist/demo/overview/actions-cell.js.map +0 -1
- package/dist/demo/overview/index.d.ts +0 -2
- package/dist/demo/overview/index.d.ts.map +0 -1
- package/dist/demo/overview/index.js +0 -2
- package/dist/demo/overview/index.js.map +0 -1
- package/dist/demo/overview/product.d.ts +0 -27
- package/dist/demo/overview/product.d.ts.map +0 -1
- package/dist/demo/overview/product.js +0 -16
- package/dist/demo/overview/product.js.map +0 -1
- package/dist/demo/overview/products.d.ts +0 -3
- package/dist/demo/overview/products.d.ts.map +0 -1
- package/dist/demo/overview/products.js +0 -127
- package/dist/demo/overview/products.js.map +0 -1
- package/dist/demo/overview/table.d.ts +0 -6
- package/dist/demo/overview/table.d.ts.map +0 -1
- package/dist/demo/overview/table.js +0 -44
- package/dist/demo/overview/table.js.map +0 -1
- package/dist/demo/overview/table.store.d.ts +0 -15
- package/dist/demo/overview/table.store.d.ts.map +0 -1
- package/dist/demo/overview/table.store.js +0 -92
- package/dist/demo/overview/table.store.js.map +0 -1
- package/dist/demo/state-caching/beverages.d.ts +0 -3
- package/dist/demo/state-caching/beverages.d.ts.map +0 -1
- package/dist/demo/state-caching/beverages.js +0 -48
- package/dist/demo/state-caching/beverages.js.map +0 -1
- package/dist/demo/state-caching/index.d.ts +0 -2
- package/dist/demo/state-caching/index.d.ts.map +0 -1
- package/dist/demo/state-caching/index.js +0 -2
- package/dist/demo/state-caching/index.js.map +0 -1
- package/dist/demo/state-caching/product.d.ts +0 -6
- package/dist/demo/state-caching/product.d.ts.map +0 -1
- package/dist/demo/state-caching/product.js +0 -2
- package/dist/demo/state-caching/product.js.map +0 -1
- package/dist/demo/state-caching/products.d.ts +0 -3
- package/dist/demo/state-caching/products.d.ts.map +0 -1
- package/dist/demo/state-caching/products.js +0 -53
- package/dist/demo/state-caching/products.js.map +0 -1
- package/dist/demo/state-caching/state-caching-table.d.ts +0 -3
- package/dist/demo/state-caching/state-caching-table.d.ts.map +0 -1
- package/dist/demo/state-caching/state-caching-table.js +0 -14
- package/dist/demo/state-caching/state-caching-table.js.map +0 -1
- package/dist/demo/state-caching/state-caching-table.store.d.ts +0 -13
- package/dist/demo/state-caching/state-caching-table.store.d.ts.map +0 -1
- package/dist/demo/state-caching/state-caching-table.store.js +0 -70
- package/dist/demo/state-caching/state-caching-table.store.js.map +0 -1
- package/dist/editable-cell/boolean-editable-cell.d.ts +0 -3
- package/dist/editable-cell/boolean-editable-cell.d.ts.map +0 -1
- package/dist/editable-cell/boolean-editable-cell.js +0 -14
- package/dist/editable-cell/boolean-editable-cell.js.map +0 -1
- package/dist/editable-cell/date-editable-cell.d.ts +0 -3
- package/dist/editable-cell/date-editable-cell.d.ts.map +0 -1
- package/dist/editable-cell/date-editable-cell.js +0 -14
- package/dist/editable-cell/date-editable-cell.js.map +0 -1
- package/dist/editable-cell/get-action-cell.d.ts +0 -13
- package/dist/editable-cell/get-action-cell.d.ts.map +0 -1
- package/dist/editable-cell/get-action-cell.js +0 -18
- package/dist/editable-cell/get-action-cell.js.map +0 -1
- package/dist/editable-cell/get-editable-cell.d.ts +0 -13
- package/dist/editable-cell/get-editable-cell.d.ts.map +0 -1
- package/dist/editable-cell/get-editable-cell.js +0 -18
- package/dist/editable-cell/get-editable-cell.js.map +0 -1
- package/dist/editable-cell/get-select-editable-cell.d.ts +0 -10
- package/dist/editable-cell/get-select-editable-cell.d.ts.map +0 -1
- package/dist/editable-cell/get-select-editable-cell.js +0 -19
- package/dist/editable-cell/get-select-editable-cell.js.map +0 -1
- package/dist/editable-cell/index.d.ts +0 -8
- package/dist/editable-cell/index.d.ts.map +0 -1
- package/dist/editable-cell/index.js +0 -8
- package/dist/editable-cell/index.js.map +0 -1
- package/dist/editable-cell/numeric-editable-cell.d.ts +0 -3
- package/dist/editable-cell/numeric-editable-cell.d.ts.map +0 -1
- package/dist/editable-cell/numeric-editable-cell.js +0 -15
- package/dist/editable-cell/numeric-editable-cell.js.map +0 -1
- package/dist/editable-cell/text-editable-cell.d.ts +0 -9
- package/dist/editable-cell/text-editable-cell.d.ts.map +0 -1
- package/dist/editable-cell/text-editable-cell.js +0 -20
- package/dist/editable-cell/text-editable-cell.js.map +0 -1
- package/dist/export/export.d.ts +0 -10
- package/dist/export/export.d.ts.map +0 -1
- package/dist/export/export.js +0 -6
- package/dist/export/export.js.map +0 -1
- package/dist/export/index.d.ts +0 -2
- package/dist/export/index.d.ts.map +0 -1
- package/dist/export/index.js +0 -2
- package/dist/export/index.js.map +0 -1
- package/dist/filters/column-menu-filters.d.ts +0 -5
- package/dist/filters/column-menu-filters.d.ts.map +0 -1
- package/dist/filters/column-menu-filters.js +0 -9
- package/dist/filters/column-menu-filters.js.map +0 -1
- package/dist/filters/datetime-filter/datetime-filter.d.ts +0 -3
- package/dist/filters/datetime-filter/datetime-filter.d.ts.map +0 -1
- package/dist/filters/datetime-filter/datetime-filter.js +0 -71
- package/dist/filters/datetime-filter/datetime-filter.js.map +0 -1
- package/dist/filters/field-values-filter.d.ts +0 -6
- package/dist/filters/field-values-filter.d.ts.map +0 -1
- package/dist/filters/field-values-filter.js +0 -155
- package/dist/filters/field-values-filter.js.map +0 -1
- package/dist/filters/index.d.ts +0 -9
- package/dist/filters/index.d.ts.map +0 -1
- package/dist/filters/index.js +0 -9
- package/dist/filters/index.js.map +0 -1
- package/dist/filters/multiselect-filter.d.ts +0 -5
- package/dist/filters/multiselect-filter.d.ts.map +0 -1
- package/dist/filters/multiselect-filter.js +0 -107
- package/dist/filters/multiselect-filter.js.map +0 -1
- package/dist/filters/numeric-filter-extended/numeric-extended-operators.d.ts +0 -6
- package/dist/filters/numeric-filter-extended/numeric-extended-operators.d.ts.map +0 -1
- package/dist/filters/numeric-filter-extended/numeric-extended-operators.js +0 -6
- package/dist/filters/numeric-filter-extended/numeric-extended-operators.js.map +0 -1
- package/dist/filters/numeric-filter-extended/numeric-filter-extended.d.ts +0 -3
- package/dist/filters/numeric-filter-extended/numeric-filter-extended.d.ts.map +0 -1
- package/dist/filters/numeric-filter-extended/numeric-filter-extended.js +0 -27
- package/dist/filters/numeric-filter-extended/numeric-filter-extended.js.map +0 -1
- package/dist/filters/range-filter/range-filter.d.ts +0 -6
- package/dist/filters/range-filter/range-filter.d.ts.map +0 -1
- package/dist/filters/range-filter/range-filter.js +0 -117
- package/dist/filters/range-filter/range-filter.js.map +0 -1
- package/dist/filters/standard-filter-with-multiselect/filter-cell-ext.d.ts +0 -21
- package/dist/filters/standard-filter-with-multiselect/filter-cell-ext.d.ts.map +0 -1
- package/dist/filters/standard-filter-with-multiselect/filter-cell-ext.js +0 -82
- package/dist/filters/standard-filter-with-multiselect/filter-cell-ext.js.map +0 -1
- package/dist/filters/standard-filter-with-multiselect/multiselect-operators.d.ts +0 -6
- package/dist/filters/standard-filter-with-multiselect/multiselect-operators.d.ts.map +0 -1
- package/dist/filters/standard-filter-with-multiselect/multiselect-operators.js +0 -6
- package/dist/filters/standard-filter-with-multiselect/multiselect-operators.js.map +0 -1
- package/dist/filters/standard-filter-with-multiselect/standard-filter-with-multiselect.d.ts +0 -26
- package/dist/filters/standard-filter-with-multiselect/standard-filter-with-multiselect.d.ts.map +0 -1
- package/dist/filters/standard-filter-with-multiselect/standard-filter-with-multiselect.js +0 -69
- package/dist/filters/standard-filter-with-multiselect/standard-filter-with-multiselect.js.map +0 -1
- package/dist/filters/standard-filter-with-multiselect/table-column-menu-filter-ext.d.ts +0 -6
- package/dist/filters/standard-filter-with-multiselect/table-column-menu-filter-ext.d.ts.map +0 -1
- package/dist/filters/standard-filter-with-multiselect/table-column-menu-filter-ext.js +0 -30
- package/dist/filters/standard-filter-with-multiselect/table-column-menu-filter-ext.js.map +0 -1
- package/dist/filters/time-filter/time-filter.d.ts +0 -3
- package/dist/filters/time-filter/time-filter.d.ts.map +0 -1
- package/dist/filters/time-filter/time-filter.js +0 -71
- package/dist/filters/time-filter/time-filter.js.map +0 -1
- package/dist/index.d.ts +0 -10
- package/dist/index.d.ts.map +0 -1
- package/dist/index.js +0 -9
- package/dist/index.js.map +0 -1
- package/dist/select-cell/index.d.ts +0 -2
- package/dist/select-cell/index.d.ts.map +0 -1
- package/dist/select-cell/index.js +0 -2
- package/dist/select-cell/index.js.map +0 -1
- package/dist/select-cell/select-cell.d.ts +0 -25
- package/dist/select-cell/select-cell.d.ts.map +0 -1
- package/dist/select-cell/select-cell.js +0 -35
- package/dist/select-cell/select-cell.js.map +0 -1
- package/dist/table-state.d.ts +0 -161
- package/dist/table-state.d.ts.map +0 -1
- package/dist/table-state.js +0 -1106
- package/dist/table-state.js.map +0 -1
- package/dist/table.d.ts +0 -40
- package/dist/table.d.ts.map +0 -1
- package/dist/table.js +0 -231
- package/dist/table.js.map +0 -1
@@ -1,10 +1,11 @@
|
|
1
|
-
import { ComponentType, SyntheticEvent, FC } from 'react';
|
1
|
+
import { ComponentType, SyntheticEvent, FC, useCallback } from 'react';
|
2
2
|
import {
|
3
3
|
TableCellProps,
|
4
4
|
TableHeaderCellProps,
|
5
5
|
Checkbox,
|
6
6
|
CheckboxProps,
|
7
7
|
} from '@servicetitan/design-system';
|
8
|
+
import classNames from 'classnames';
|
8
9
|
import * as Styles from './select-cell.module.css';
|
9
10
|
|
10
11
|
export type SelectionControlType = ComponentType<CheckboxProps<never>>;
|
@@ -32,33 +33,60 @@ export const SelectCell: FC<SelectCellProps> = ({
|
|
32
33
|
control: Control = Checkbox,
|
33
34
|
...props
|
34
35
|
}: SelectCellProps) => {
|
35
|
-
const onChange = (
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
36
|
+
const onChange = useCallback(
|
37
|
+
(_0: never, _1: boolean, event: SyntheticEvent<HTMLInputElement>) => {
|
38
|
+
if (!selectionChange) {
|
39
|
+
return;
|
40
|
+
}
|
41
|
+
selectionChange({ syntheticEvent: event });
|
42
|
+
},
|
43
|
+
[selectionChange]
|
44
|
+
);
|
41
45
|
|
42
46
|
return <Control className={Styles.checkbox} onChange={onChange} {...props} />;
|
43
47
|
};
|
44
48
|
|
45
|
-
export const SelectColumnCell: FC<SelectColumnCellProps> = (
|
46
|
-
|
49
|
+
export const SelectColumnCell: FC<SelectColumnCellProps> = ({
|
50
|
+
style,
|
51
|
+
rowType,
|
52
|
+
dataItem,
|
53
|
+
control,
|
54
|
+
isRowSelectable,
|
55
|
+
selectionChange,
|
56
|
+
className,
|
57
|
+
}: SelectColumnCellProps) => {
|
58
|
+
const onSelectionChange = useCallback(
|
59
|
+
(event: SyntheticEvent<HTMLTableCellElement>) => {
|
60
|
+
if (isRowSelectable && selectionChange) {
|
61
|
+
selectionChange({ syntheticEvent: event });
|
62
|
+
}
|
63
|
+
},
|
64
|
+
[selectionChange, isRowSelectable]
|
65
|
+
);
|
66
|
+
|
67
|
+
if (rowType === 'groupHeader') {
|
47
68
|
return null;
|
48
69
|
}
|
49
70
|
|
50
|
-
if (
|
71
|
+
if (rowType === 'groupFooter') {
|
51
72
|
return <td />;
|
52
73
|
}
|
53
74
|
|
54
75
|
return (
|
55
|
-
<td
|
76
|
+
<td
|
77
|
+
style={style}
|
78
|
+
className={classNames(
|
79
|
+
isRowSelectable && selectionChange && 'cursor-pointer',
|
80
|
+
className
|
81
|
+
)}
|
82
|
+
onClick={onSelectionChange}
|
83
|
+
>
|
56
84
|
<SelectCell
|
57
|
-
checked={
|
58
|
-
disabled={!
|
59
|
-
selectionChange={
|
60
|
-
indeterminate={
|
61
|
-
control={
|
85
|
+
checked={dataItem.selected}
|
86
|
+
disabled={!isRowSelectable}
|
87
|
+
selectionChange={selectionChange}
|
88
|
+
indeterminate={dataItem.indeterminate}
|
89
|
+
control={control}
|
62
90
|
/>
|
63
91
|
</td>
|
64
92
|
);
|
package/dist/demo/index.d.ts
DELETED
package/dist/demo/index.d.ts.map
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/demo/index.ts"],"names":[],"mappings":"AAAA,cAAc,YAAY,CAAC;AAC3B,cAAc,iBAAiB,CAAC;AAChC,cAAc,iBAAiB,CAAC"}
|
package/dist/demo/index.js
DELETED
package/dist/demo/index.js.map
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/demo/index.ts"],"names":[],"mappings":"AAAA,cAAc,YAAY,CAAC;AAC3B,cAAc,iBAAiB,CAAC;AAChC,cAAc,iBAAiB,CAAC"}
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"detail-table.d.ts","sourceRoot":"","sources":["../../../src/demo/master-detail/detail-table.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAa,EAAE,EAAE,MAAM,OAAO,CAAC;AAQtC,OAAO,EAAsB,mBAAmB,EAAE,MAAM,OAAO,CAAC;AAIhE,eAAO,MAAM,WAAW,EAAE,EAAE,CAAC,mBAAmB,CA8B/C,CAAC"}
|
@@ -1,28 +0,0 @@
|
|
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 { observer } from 'mobx-react';
|
5
|
-
import { Icon, Checkbox } from '@servicetitan/design-system';
|
6
|
-
import { Table, TableColumn } from '../..';
|
7
|
-
import { DetailTableStore } from './detail-table.store';
|
8
|
-
export const DetailTable = provide({
|
9
|
-
singletons: [DetailTableStore],
|
10
|
-
})(observer(({ dataItem }) => {
|
11
|
-
const [store] = useDependencies(DetailTableStore);
|
12
|
-
useEffect(() => {
|
13
|
-
store.initialize(dataItem);
|
14
|
-
return () => store.dispose();
|
15
|
-
}, [store, dataItem]);
|
16
|
-
if (!store.tableState) {
|
17
|
-
return null;
|
18
|
-
}
|
19
|
-
return (_jsxs(Table, Object.assign({ selectable: true, hideSelectAll: true, tableState: store.tableState, selectionControl: LockFieldIcon }, { children: [_jsx(TableColumn, { field: "Field" }), _jsx(TableColumn, { field: "OldValue" }), _jsx(TableColumn, { field: "NewValue" })] })));
|
20
|
-
}));
|
21
|
-
const LockFieldIcon = props => {
|
22
|
-
const { checked, disabled } = props;
|
23
|
-
if (!disabled) {
|
24
|
-
return _jsx(Checkbox, Object.assign({}, props));
|
25
|
-
}
|
26
|
-
return (_jsx("div", { children: checked ? (_jsx(Icon, { name: "check", className: "c-blue-300" })) : (_jsx(Icon, { name: "remove", className: "c-neutral-70" })) }));
|
27
|
-
};
|
28
|
-
//# sourceMappingURL=detail-table.js.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"detail-table.js","sourceRoot":"","sources":["../../../src/demo/master-detail/detail-table.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,SAAS,EAAM,MAAM,OAAO,CAAC;AAEtC,OAAO,EAAE,OAAO,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAEnE,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAEtC,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAiB,MAAM,6BAA6B,CAAC;AAE5E,OAAO,EAAE,KAAK,EAAE,WAAW,EAAuB,MAAM,OAAO,CAAC;AAEhE,OAAO,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AAExD,MAAM,CAAC,MAAM,WAAW,GAA4B,OAAO,CAAC;IACxD,UAAU,EAAE,CAAC,gBAAgB,CAAC;CACjC,CAAC,CACE,QAAQ,CAAC,CAAC,EAAE,QAAQ,EAAE,EAAE,EAAE;IACtB,MAAM,CAAC,KAAK,CAAC,GAAG,eAAe,CAAC,gBAAgB,CAAC,CAAC;IAElD,SAAS,CAAC,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,MAAC,KAAK,kBACF,UAAU,QACV,aAAa,QACb,UAAU,EAAE,KAAK,CAAC,UAAU,EAC5B,gBAAgB,EAAE,aAAa,iBAE/B,KAAC,WAAW,IAAC,KAAK,EAAC,OAAO,GAAG,EAE7B,KAAC,WAAW,IAAC,KAAK,EAAC,UAAU,GAAG,EAEhC,KAAC,WAAW,IAAC,KAAK,EAAC,UAAU,GAAG,KAC5B,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,KAAC,QAAQ,oBAAK,KAAK,EAAI,CAAC;KAClC;IAED,OAAO,CACH,wBACK,OAAO,CAAC,CAAC,CAAC,CACP,KAAC,IAAI,IAAC,IAAI,EAAC,OAAO,EAAC,SAAS,EAAC,YAAY,GAAG,CAC/C,CAAC,CAAC,CAAC,CACA,KAAC,IAAI,IAAC,IAAI,EAAC,QAAQ,EAAC,SAAS,EAAC,cAAc,GAAG,CAClD,GACC,CACT,CAAC;AACN,CAAC,CAAC"}
|
@@ -1,14 +0,0 @@
|
|
1
|
-
import { TableState } from '../..';
|
2
|
-
import { Product } from './product';
|
3
|
-
import { ProductDetail } from './product-detail';
|
4
|
-
export declare class DetailTableStore {
|
5
|
-
tableState?: TableState<ProductDetail, string, Product, number>;
|
6
|
-
private masterTableStore;
|
7
|
-
get selected(): number;
|
8
|
-
private disposeSelectedObserve;
|
9
|
-
constructor();
|
10
|
-
initialize(row: Product): void;
|
11
|
-
dispose(): void;
|
12
|
-
private setLockedRowsSelection;
|
13
|
-
}
|
14
|
-
//# sourceMappingURL=detail-table.store.d.ts.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"detail-table.store.d.ts","sourceRoot":"","sources":["../../../src/demo/master-detail/detail-table.store.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AAInC,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAEjD,qBACa,gBAAgB;IACb,UAAU,CAAC,EAAE,UAAU,CAAC,aAAa,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,CAAC,CAAC;IAO5E,OAAO,CAAC,gBAAgB,CAAoB;IAE5C,IAAc,QAAQ,WAErB;IAED,OAAO,CAAC,sBAAsB,CAAS;;IAavC,UAAU,CAAC,GAAG,EAAE,OAAO;IASvB,OAAO;YAIO,sBAAsB;CAmBvC"}
|
@@ -1,104 +0,0 @@
|
|
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
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
11
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
12
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
13
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
14
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
15
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
16
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
17
|
-
});
|
18
|
-
};
|
19
|
-
import { injectable, inject } from '@servicetitan/react-ioc';
|
20
|
-
import { observable, action, observe, computed, makeObservable } from 'mobx';
|
21
|
-
import { TableState } from '../..';
|
22
|
-
import { MasterTableStore } from './master-table.store';
|
23
|
-
let DetailTableStore = class DetailTableStore {
|
24
|
-
constructor() {
|
25
|
-
Object.defineProperty(this, "tableState", {
|
26
|
-
enumerable: true,
|
27
|
-
configurable: true,
|
28
|
-
writable: true,
|
29
|
-
value: void 0
|
30
|
-
});
|
31
|
-
/*
|
32
|
-
* Please use constructor injection instead.
|
33
|
-
* Injecting without constructor only to make it work in Codesandbox.
|
34
|
-
*/
|
35
|
-
Object.defineProperty(this, "masterTableStore", {
|
36
|
-
enumerable: true,
|
37
|
-
configurable: true,
|
38
|
-
writable: true,
|
39
|
-
value: void 0
|
40
|
-
});
|
41
|
-
Object.defineProperty(this, "disposeSelectedObserve", {
|
42
|
-
enumerable: true,
|
43
|
-
configurable: true,
|
44
|
-
writable: true,
|
45
|
-
value: void 0
|
46
|
-
});
|
47
|
-
makeObservable(this);
|
48
|
-
this.disposeSelectedObserve = observe(this, 'selected', ({ oldValue, newValue }) => {
|
49
|
-
if (!oldValue && newValue) {
|
50
|
-
this.setLockedRowsSelection(true);
|
51
|
-
}
|
52
|
-
});
|
53
|
-
}
|
54
|
-
get selected() {
|
55
|
-
var _a, _b;
|
56
|
-
return (_b = (_a = this.tableState) === null || _a === void 0 ? void 0 : _a.selectedIds.size) !== null && _b !== void 0 ? _b : 0;
|
57
|
-
}
|
58
|
-
initialize(row) {
|
59
|
-
this.tableState = this.masterTableStore.tableState.getDetailTableState(row);
|
60
|
-
}
|
61
|
-
dispose() {
|
62
|
-
this.disposeSelectedObserve();
|
63
|
-
}
|
64
|
-
setLockedRowsSelection(value) {
|
65
|
-
return __awaiter(this, void 0, void 0, function* () {
|
66
|
-
if (!this.tableState) {
|
67
|
-
return;
|
68
|
-
}
|
69
|
-
if (!this.tableState.dataSource) {
|
70
|
-
return;
|
71
|
-
}
|
72
|
-
const filteredData = (yield this.tableState.dataSource.getData({
|
73
|
-
filter: this.tableState.filter,
|
74
|
-
})).data;
|
75
|
-
const lockedData = filteredData.filter(row => this.tableState.isRowUnselectable(row));
|
76
|
-
this.tableState.setRowsSelection(lockedData, value, { ignoreUnselectable: false });
|
77
|
-
});
|
78
|
-
}
|
79
|
-
};
|
80
|
-
__decorate([
|
81
|
-
observable,
|
82
|
-
__metadata("design:type", TableState)
|
83
|
-
], DetailTableStore.prototype, "tableState", void 0);
|
84
|
-
__decorate([
|
85
|
-
inject(MasterTableStore),
|
86
|
-
__metadata("design:type", MasterTableStore)
|
87
|
-
], DetailTableStore.prototype, "masterTableStore", void 0);
|
88
|
-
__decorate([
|
89
|
-
computed,
|
90
|
-
__metadata("design:type", Object),
|
91
|
-
__metadata("design:paramtypes", [])
|
92
|
-
], DetailTableStore.prototype, "selected", null);
|
93
|
-
__decorate([
|
94
|
-
action,
|
95
|
-
__metadata("design:type", Function),
|
96
|
-
__metadata("design:paramtypes", [Object]),
|
97
|
-
__metadata("design:returntype", void 0)
|
98
|
-
], DetailTableStore.prototype, "initialize", null);
|
99
|
-
DetailTableStore = __decorate([
|
100
|
-
injectable(),
|
101
|
-
__metadata("design:paramtypes", [])
|
102
|
-
], DetailTableStore);
|
103
|
-
export { DetailTableStore };
|
104
|
-
//# sourceMappingURL=detail-table.store.js.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"detail-table.store.js","sourceRoot":"","sources":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YAAY,GAAG,CACjB,MAAM,IAAI,CAAC,UAAU,CAAC,UAAU,CAAC,OAAO,CAAC;gBACrC,MAAM,EAAE,IAAI,CAAC,UAAU,CAAC,MAAM;aACjC,CAAC,CACL,CAAC,IAAuB,CAAC;YAE1B,MAAM,UAAU,GAAG,YAAY,CAAC,MAAM,CAAC,GAAG,CAAC,EAAE,CAAC,IAAI,CAAC,UAAW,CAAC,iBAAiB,CAAC,GAAG,CAAC,CAAC,CAAC;YAEvF,IAAI,CAAC,UAAU,CAAC,gBAAgB,CAAC,UAAU,EAAE,KAAK,EAAE,EAAE,kBAAkB,EAAE,KAAK,EAAE,CAAC,CAAC;QACvF,CAAC;KAAA;CACJ,CAAA;AA1De;IAAX,UAAU;8BAAc,UAAU;oDAAyC;AAO5E;IADC,MAAM,CAAC,gBAAgB,CAAC;8BACE,gBAAgB;0DAAC;AAElC;IAAT,QAAQ;;;gDAER;AAeD;IADC,MAAM;;;;kDAQN;AAlCQ,gBAAgB;IAD5B,UAAU,EAAE;;GACA,gBAAgB,CA2D5B;SA3DY,gBAAgB"}
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/demo/master-detail/index.ts"],"names":[],"mappings":"AAAA,cAAc,uBAAuB,CAAC"}
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/demo/master-detail/index.ts"],"names":[],"mappings":"AAAA,cAAc,uBAAuB,CAAC"}
|
@@ -1,14 +0,0 @@
|
|
1
|
-
import { TableState } from '../..';
|
2
|
-
import { Product } from './product';
|
3
|
-
import { ProductDetail } from './product-detail';
|
4
|
-
export declare class MasterTableStore {
|
5
|
-
tableState: TableState<Product, number>;
|
6
|
-
details: Map<number, TableState<ProductDetail, string, Product, number>>;
|
7
|
-
get selectedIds(): number[];
|
8
|
-
private disposeSelectedIdsObserve;
|
9
|
-
constructor();
|
10
|
-
dispose(): void;
|
11
|
-
private getDetailTableState;
|
12
|
-
private setDetailSelection;
|
13
|
-
}
|
14
|
-
//# sourceMappingURL=master-table.store.d.ts.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"master-table.store.d.ts","sourceRoot":"","sources":["../../../src/demo/master-detail/master-table.store.ts"],"names":[],"mappings":"AAIA,OAAO,EAAsB,UAAU,EAAE,MAAM,OAAO,CAAC;AAEvD,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAGpC,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAGjD,qBACa,gBAAgB;IACzB,UAAU,EAAE,UAAU,CAAC,OAAO,EAAE,MAAM,CAAC,CAGpC;IAEH,OAAO,kEAAyE;IAEhF,IAAc,WAAW,aAExB;IAED,OAAO,CAAC,yBAAyB,CAAS;;IA4B1C,OAAO;IAIP,OAAO,CAAC,mBAAmB;IA4B3B,OAAO,CAAC,kBAAkB;CAa7B"}
|
@@ -1,103 +0,0 @@
|
|
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, observe, makeObservable } from 'mobx';
|
12
|
-
import { InMemoryDataSource, TableState } from '../..';
|
13
|
-
import { products } from './products';
|
14
|
-
import { productDetails } from './product-details';
|
15
|
-
let MasterTableStore = class MasterTableStore {
|
16
|
-
constructor() {
|
17
|
-
Object.defineProperty(this, "tableState", {
|
18
|
-
enumerable: true,
|
19
|
-
configurable: true,
|
20
|
-
writable: true,
|
21
|
-
value: new TableState({
|
22
|
-
dataSource: new InMemoryDataSource(products, row => row.ProductID),
|
23
|
-
getDetailTableState: row => this.getDetailTableState(row),
|
24
|
-
})
|
25
|
-
});
|
26
|
-
Object.defineProperty(this, "details", {
|
27
|
-
enumerable: true,
|
28
|
-
configurable: true,
|
29
|
-
writable: true,
|
30
|
-
value: new Map()
|
31
|
-
});
|
32
|
-
Object.defineProperty(this, "disposeSelectedIdsObserve", {
|
33
|
-
enumerable: true,
|
34
|
-
configurable: true,
|
35
|
-
writable: true,
|
36
|
-
value: void 0
|
37
|
-
});
|
38
|
-
makeObservable(this);
|
39
|
-
this.disposeSelectedIdsObserve = observe(this, 'selectedIds', change => {
|
40
|
-
const { oldValue = [], newValue } = change;
|
41
|
-
const before = new Set(oldValue);
|
42
|
-
const after = new Set(newValue);
|
43
|
-
for (const id of oldValue) {
|
44
|
-
if (!after.has(id)) {
|
45
|
-
this.setDetailSelection(id, false);
|
46
|
-
}
|
47
|
-
}
|
48
|
-
for (const id of newValue) {
|
49
|
-
if (!before.has(id)) {
|
50
|
-
this.setDetailSelection(id, true);
|
51
|
-
}
|
52
|
-
}
|
53
|
-
});
|
54
|
-
}
|
55
|
-
get selectedIds() {
|
56
|
-
return Array.from(this.tableState.selectedIds);
|
57
|
-
}
|
58
|
-
dispose() {
|
59
|
-
this.disposeSelectedIdsObserve();
|
60
|
-
}
|
61
|
-
getDetailTableState(row) {
|
62
|
-
const id = this.tableState.dataSource.idSelector(row);
|
63
|
-
if (this.details.has(id)) {
|
64
|
-
return this.details.get(id);
|
65
|
-
}
|
66
|
-
const detailTableState = new TableState({
|
67
|
-
dataSource: new InMemoryDataSource(productDetails.filter(x => x.ProductID === id), row => row.Field),
|
68
|
-
isRowUnselectable: row => !!row.IsLocked,
|
69
|
-
parent: {
|
70
|
-
row,
|
71
|
-
tableState: this.tableState,
|
72
|
-
},
|
73
|
-
});
|
74
|
-
if (this.tableState.selectedIds.has(id)) {
|
75
|
-
detailTableState.selectAll();
|
76
|
-
}
|
77
|
-
this.details.set(id, detailTableState);
|
78
|
-
return detailTableState;
|
79
|
-
}
|
80
|
-
setDetailSelection(id, value) {
|
81
|
-
const detail = this.tableState.getDetailTableState({ ProductID: id });
|
82
|
-
if (!detail || !detail.totalCount) {
|
83
|
-
return;
|
84
|
-
}
|
85
|
-
if (value) {
|
86
|
-
detail.selectAll({ ignoreUnselectable: false });
|
87
|
-
}
|
88
|
-
else if (!detail.isSomePageRowsSelected) {
|
89
|
-
detail.deselectAll({ ignoreUnselectable: false });
|
90
|
-
}
|
91
|
-
}
|
92
|
-
};
|
93
|
-
__decorate([
|
94
|
-
computed,
|
95
|
-
__metadata("design:type", Object),
|
96
|
-
__metadata("design:paramtypes", [])
|
97
|
-
], MasterTableStore.prototype, "selectedIds", null);
|
98
|
-
MasterTableStore = __decorate([
|
99
|
-
injectable(),
|
100
|
-
__metadata("design:paramtypes", [])
|
101
|
-
], MasterTableStore);
|
102
|
-
export { MasterTableStore };
|
103
|
-
//# sourceMappingURL=master-table.store.js.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"master-table.store.js","sourceRoot":"","sources":["../../../src/demo/master-detail/master-table.store.ts"],"names":[],"mappings":";;;;;;;;;AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AAErD,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAU,cAAc,EAAE,MAAM,MAAM,CAAC;AAEjE,OAAO,EAAE,kBAAkB,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AAGvD,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAGtC,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAGnD,IAAa,gBAAgB,GAA7B,MAAa,gBAAgB;I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C,WAAW,CAAC,EAAE,kBAAkB,EAAE,KAAK,EAAE,CAAC,CAAC;SACrD;IACL,CAAC;CACJ,CAAA;AA7Ea;IAAT,QAAQ;;;mDAER;AAVQ,gBAAgB;IAD5B,UAAU,EAAE;;GACA,gBAAgB,CAqF5B;SArFY,gBAAgB"}
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"product-detail.d.ts","sourceRoot":"","sources":["../../../src/demo/master-detail/product-detail.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,aAAa;IAC1B,SAAS,EAAE,MAAM,CAAC;IAClB,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,EAAE,MAAM,CAAC;CACpB"}
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"product-detail.js","sourceRoot":"","sources":["../../../src/demo/master-detail/product-detail.ts"],"names":[],"mappings":""}
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"product-details.d.ts","sourceRoot":"","sources":["../../../src/demo/master-detail/product-details.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAEjD,eAAO,MAAM,cAAc,EAAE,aAAa,EAqDzC,CAAC"}
|
@@ -1,55 +0,0 @@
|
|
1
|
-
export const productDetails = [
|
2
|
-
{
|
3
|
-
ProductID: 1,
|
4
|
-
Field: 'QuantityPerUnit',
|
5
|
-
OldValue: '12 boxes x 24 bags',
|
6
|
-
NewValue: '10 boxes x 20 bags',
|
7
|
-
},
|
8
|
-
{
|
9
|
-
ProductID: 1,
|
10
|
-
Field: 'UnitPrice',
|
11
|
-
OldValue: '25.0',
|
12
|
-
NewValue: '18.0',
|
13
|
-
},
|
14
|
-
{
|
15
|
-
ProductID: 2,
|
16
|
-
Field: 'Supplier',
|
17
|
-
IsLocked: true,
|
18
|
-
OldValue: 'Adam',
|
19
|
-
NewValue: 'Dan',
|
20
|
-
},
|
21
|
-
{
|
22
|
-
ProductID: 2,
|
23
|
-
Field: 'UnitPrice',
|
24
|
-
OldValue: '18.5',
|
25
|
-
NewValue: '19.0',
|
26
|
-
},
|
27
|
-
{
|
28
|
-
ProductID: 2,
|
29
|
-
Field: 'UnitsInStock',
|
30
|
-
OldValue: '5',
|
31
|
-
NewValue: '17',
|
32
|
-
},
|
33
|
-
{
|
34
|
-
ProductID: 2,
|
35
|
-
Field: 'Discontinued',
|
36
|
-
IsLocked: true,
|
37
|
-
OldValue: 'true',
|
38
|
-
NewValue: 'false',
|
39
|
-
},
|
40
|
-
{
|
41
|
-
ProductID: 3,
|
42
|
-
Field: 'Discontinued',
|
43
|
-
IsLocked: true,
|
44
|
-
OldValue: 'false',
|
45
|
-
NewValue: 'true',
|
46
|
-
},
|
47
|
-
{
|
48
|
-
ProductID: 3,
|
49
|
-
Field: 'UnitsInStock',
|
50
|
-
IsLocked: true,
|
51
|
-
OldValue: '7',
|
52
|
-
NewValue: '5',
|
53
|
-
},
|
54
|
-
];
|
55
|
-
//# sourceMappingURL=product-details.js.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"product-details.js","sourceRoot":"","sources":["../../../src/demo/master-detail/product-details.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,cAAc,GAAoB;IAC3C;QACI,SAAS,EAAE,CAAC;QACZ,KAAK,EAAE,iBAAiB;QACxB,QAAQ,EAAE,oBAAoB;QAC9B,QAAQ,EAAE,oBAAoB;KACjC;IACD;QACI,SAAS,EAAE,CAAC;QACZ,KAAK,EAAE,WAAW;QAClB,QAAQ,EAAE,MAAM;QAChB,QAAQ,EAAE,MAAM;KACnB;IACD;QACI,SAAS,EAAE,CAAC;QACZ,KAAK,EAAE,UAAU;QACjB,QAAQ,EAAE,IAAI;QACd,QAAQ,EAAE,MAAM;QAChB,QAAQ,EAAE,KAAK;KAClB;IACD;QACI,SAAS,EAAE,CAAC;QACZ,KAAK,EAAE,WAAW;QAClB,QAAQ,EAAE,MAAM;QAChB,QAAQ,EAAE,MAAM;KACnB;IACD;QACI,SAAS,EAAE,CAAC;QACZ,KAAK,EAAE,cAAc;QACrB,QAAQ,EAAE,GAAG;QACb,QAAQ,EAAE,IAAI;KACjB;IACD;QACI,SAAS,EAAE,CAAC;QACZ,KAAK,EAAE,cAAc;QACrB,QAAQ,EAAE,IAAI;QACd,QAAQ,EAAE,MAAM;QAChB,QAAQ,EAAE,OAAO;KACpB;IACD;QACI,SAAS,EAAE,CAAC;QACZ,KAAK,EAAE,cAAc;QACrB,QAAQ,EAAE,IAAI;QACd,QAAQ,EAAE,OAAO;QACjB,QAAQ,EAAE,MAAM;KACnB;IACD;QACI,SAAS,EAAE,CAAC;QACZ,KAAK,EAAE,cAAc;QACrB,QAAQ,EAAE,IAAI;QACd,QAAQ,EAAE,GAAG;QACb,QAAQ,EAAE,GAAG;KAChB;CACJ,CAAC"}
|
@@ -1,26 +0,0 @@
|
|
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
|
-
QuantityPerUnit: string;
|
20
|
-
UnitPrice: number;
|
21
|
-
UnitsInStock: number;
|
22
|
-
UnitsOnOrder: Date;
|
23
|
-
Discontinued: boolean;
|
24
|
-
AvailableFor?: UserRole;
|
25
|
-
}
|
26
|
-
//# sourceMappingURL=product.d.ts.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"product.d.ts","sourceRoot":"","sources":["../../../src/demo/master-detail/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,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"}
|
@@ -1,16 +0,0 @@
|
|
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
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"product.js","sourceRoot":"","sources":["../../../src/demo/master-detail/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"}
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"products.d.ts","sourceRoot":"","sources":["../../../src/demo/master-detail/products.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAsB,MAAM,WAAW,CAAC;AAExD,eAAO,MAAM,QAAQ,EAAE,OAAO,EAkH7B,CAAC"}
|