@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,48 +0,0 @@
|
|
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
|
@@ -1 +0,0 @@
|
|
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"}
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/demo/state-caching/index.ts"],"names":[],"mappings":"AAAA,cAAc,uBAAuB,CAAC"}
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/demo/state-caching/index.ts"],"names":[],"mappings":"AAAA,cAAc,uBAAuB,CAAC"}
|
@@ -1 +0,0 @@
|
|
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"}
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"product.js","sourceRoot":"","sources":["../../../src/demo/state-caching/product.ts"],"names":[],"mappings":""}
|
@@ -1 +0,0 @@
|
|
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"}
|
@@ -1,53 +0,0 @@
|
|
1
|
-
export const products = [
|
2
|
-
{
|
3
|
-
ProductID: 1,
|
4
|
-
ProductName: 'Chai',
|
5
|
-
Description: '10 boxes x 20 bags',
|
6
|
-
},
|
7
|
-
{
|
8
|
-
ProductID: 2,
|
9
|
-
ProductName: 'Chang',
|
10
|
-
Description: '24 - 12 oz bottles',
|
11
|
-
},
|
12
|
-
{
|
13
|
-
ProductID: 3,
|
14
|
-
ProductName: 'Aniseed Syrup',
|
15
|
-
Description: '12 - 550 ml bottles',
|
16
|
-
},
|
17
|
-
{
|
18
|
-
ProductID: 4,
|
19
|
-
ProductName: "Chef Anton's Cajun Seasoning",
|
20
|
-
Description: '48 - 6 oz jars',
|
21
|
-
},
|
22
|
-
{
|
23
|
-
ProductID: 5,
|
24
|
-
ProductName: "Chef Anton's Gumbo Mix",
|
25
|
-
Description: '36 boxes',
|
26
|
-
},
|
27
|
-
{
|
28
|
-
ProductID: 6,
|
29
|
-
ProductName: "Grandma's Boysenberry Spread",
|
30
|
-
Description: '12 - 8 oz jars',
|
31
|
-
},
|
32
|
-
{
|
33
|
-
ProductID: 7,
|
34
|
-
ProductName: "Uncle Bob's Organic Dried Pears",
|
35
|
-
Description: '12 - 1 lb pkgs.',
|
36
|
-
},
|
37
|
-
{
|
38
|
-
ProductID: 8,
|
39
|
-
ProductName: 'Northwoods Cranberry Sauce',
|
40
|
-
Description: '12 - 12 oz jars',
|
41
|
-
},
|
42
|
-
{
|
43
|
-
ProductID: 9,
|
44
|
-
ProductName: 'Mishi Kobe Niku',
|
45
|
-
Description: '18 - 500 g pkgs.',
|
46
|
-
},
|
47
|
-
{
|
48
|
-
ProductID: 10,
|
49
|
-
ProductName: 'Ikura',
|
50
|
-
Description: '12 - 200 ml jars',
|
51
|
-
},
|
52
|
-
];
|
53
|
-
//# sourceMappingURL=products.js.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"products.js","sourceRoot":"","sources":["../../../src/demo/state-caching/products.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,QAAQ,GAAc;IAC/B;QACI,SAAS,EAAE,CAAC;QACZ,WAAW,EAAE,MAAM;QACnB,WAAW,EAAE,oBAAoB;KACpC;IACD;QACI,SAAS,EAAE,CAAC;QACZ,WAAW,EAAE,OAAO;QACpB,WAAW,EAAE,oBAAoB;KACpC;IACD;QACI,SAAS,EAAE,CAAC;QACZ,WAAW,EAAE,eAAe;QAC5B,WAAW,EAAE,qBAAqB;KACrC;IACD;QACI,SAAS,EAAE,CAAC;QACZ,WAAW,EAAE,8BAA8B;QAC3C,WAAW,EAAE,gBAAgB;KAChC;IACD;QACI,SAAS,EAAE,CAAC;QACZ,WAAW,EAAE,wBAAwB;QACrC,WAAW,EAAE,UAAU;KAC1B;IACD;QACI,SAAS,EAAE,CAAC;QACZ,WAAW,EAAE,8BAA8B;QAC3C,WAAW,EAAE,gBAAgB;KAChC;IACD;QACI,SAAS,EAAE,CAAC;QACZ,WAAW,EAAE,iCAAiC;QAC9C,WAAW,EAAE,iBAAiB;KACjC;IACD;QACI,SAAS,EAAE,CAAC;QACZ,WAAW,EAAE,4BAA4B;QACzC,WAAW,EAAE,iBAAiB;KACjC;IACD;QACI,SAAS,EAAE,CAAC;QACZ,WAAW,EAAE,iBAAiB;QAC9B,WAAW,EAAE,kBAAkB;KAClC;IACD;QACI,SAAS,EAAE,EAAE;QACb,WAAW,EAAE,OAAO;QACpB,WAAW,EAAE,kBAAkB;KAClC;CACJ,CAAC"}
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"state-caching-table.d.ts","sourceRoot":"","sources":["../../../src/demo/state-caching/state-caching-table.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAY,EAAE,EAAE,MAAM,OAAO,CAAC;AAOrC,eAAO,MAAM,wBAAwB,EAAE,EA2BtC,CAAC"}
|
@@ -1,14 +0,0 @@
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
2
|
-
import { Fragment } from 'react';
|
3
|
-
import { provide, useDependencies } from '@servicetitan/react-ioc';
|
4
|
-
import { observer } from 'mobx-react';
|
5
|
-
import { ButtonGroup, Button } from '@servicetitan/design-system';
|
6
|
-
import { Table, TableColumn } from '../..';
|
7
|
-
import { TableStore } from './state-caching-table.store';
|
8
|
-
export const TableStateCachingExample = provide({
|
9
|
-
singletons: [TableStore],
|
10
|
-
})(observer(() => {
|
11
|
-
const [{ tableState, showProducts, showBeverages }] = useDependencies(TableStore);
|
12
|
-
return (_jsxs(Fragment, { children: [_jsxs(ButtonGroup, Object.assign({ className: "m-b-2" }, { children: [_jsx(Button, Object.assign({ small: true, onClick: showProducts }, { children: "Show Products" })), _jsx(Button, Object.assign({ small: true, onClick: showBeverages }, { children: "Show Beverages" }))] })), _jsxs(Table, Object.assign({ tableState: tableState, striped: true, sortable: true }, { children: [_jsx(TableColumn, { field: "ProductID", title: "ID", width: "100px" }), _jsx(TableColumn, { field: "ProductName", title: "Product Name" }), _jsx(TableColumn, { field: "Description", title: "Product Description" })] }))] }));
|
13
|
-
}));
|
14
|
-
//# sourceMappingURL=state-caching-table.js.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"state-caching-table.js","sourceRoot":"","sources":["../../../src/demo/state-caching/state-caching-table.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,QAAQ,EAAM,MAAM,OAAO,CAAC;AACrC,OAAO,EAAE,OAAO,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AACnE,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACtC,OAAO,EAAE,WAAW,EAAE,MAAM,EAAE,MAAM,6BAA6B,CAAC;AAClE,OAAO,EAAE,KAAK,EAAE,WAAW,EAAE,MAAM,OAAO,CAAC;AAC3C,OAAO,EAAE,UAAU,EAAE,MAAM,6BAA6B,CAAC;AAEzD,MAAM,CAAC,MAAM,wBAAwB,GAAO,OAAO,CAAC;IAChD,UAAU,EAAE,CAAC,UAAU,CAAC;CAC3B,CAAC,CACE,QAAQ,CAAC,GAAG,EAAE;IACV,MAAM,CAAC,EAAE,UAAU,EAAE,YAAY,EAAE,aAAa,EAAE,CAAC,GAAG,eAAe,CAAC,UAAU,CAAC,CAAC;IAElF,OAAO,CACH,MAAC,QAAQ,eACL,MAAC,WAAW,kBAAC,SAAS,EAAC,OAAO,iBAC1B,KAAC,MAAM,kBAAC,KAAK,QAAC,OAAO,EAAE,YAAY,mCAE1B,EACT,KAAC,MAAM,kBAAC,KAAK,QAAC,OAAO,EAAE,aAAa,oCAE3B,KACC,EAEd,MAAC,KAAK,kBAAC,UAAU,EAAE,UAAU,EAAE,OAAO,QAAC,QAAQ,uBAC3C,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,KAAK,EAAC,aAAa,EAAC,KAAK,EAAC,qBAAqB,GAAG,KAC3D,IACD,CACd,CAAC;AACN,CAAC,CAAC,CACL,CAAC"}
|
@@ -1,13 +0,0 @@
|
|
1
|
-
import { TableState } from '../..';
|
2
|
-
import { Product } from './product';
|
3
|
-
import { TableStateModel } from '../../table-state';
|
4
|
-
export declare class TableStore {
|
5
|
-
productsTableState?: TableStateModel<number>;
|
6
|
-
beveragesTableState?: TableStateModel<number>;
|
7
|
-
tableState: TableState<Product, number, never, never>;
|
8
|
-
showProducts: () => void;
|
9
|
-
showBeverages: () => void;
|
10
|
-
private getProductsDataSource;
|
11
|
-
private getBeveragesDataSource;
|
12
|
-
}
|
13
|
-
//# sourceMappingURL=state-caching-table.store.d.ts.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"state-caching-table.store.d.ts","sourceRoot":"","sources":["../../../src/demo/state-caching/state-caching-table.store.ts"],"names":[],"mappings":"AACA,OAAO,EAAsB,UAAU,EAAE,MAAM,OAAO,CAAC;AAIvD,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAEpD,qBACa,UAAU;IACnB,kBAAkB,CAAC,EAAE,eAAe,CAAC,MAAM,CAAC,CAAC;IAC7C,mBAAmB,CAAC,EAAE,eAAe,CAAC,MAAM,CAAC,CAAC;IAE9C,UAAU,4CAGP;IAEH,YAAY,aAMV;IAEF,aAAa,aAMX;IAEF,OAAO,CAAC,qBAAqB;IAI7B,OAAO,CAAC,sBAAsB;CAGjC"}
|
@@ -1,70 +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
|
-
import { injectable } from '@servicetitan/react-ioc';
|
8
|
-
import { InMemoryDataSource, TableState } from '../..';
|
9
|
-
import { products } from './products';
|
10
|
-
import { beverages } from './beverages';
|
11
|
-
let TableStore = class TableStore {
|
12
|
-
constructor() {
|
13
|
-
Object.defineProperty(this, "productsTableState", {
|
14
|
-
enumerable: true,
|
15
|
-
configurable: true,
|
16
|
-
writable: true,
|
17
|
-
value: void 0
|
18
|
-
});
|
19
|
-
Object.defineProperty(this, "beveragesTableState", {
|
20
|
-
enumerable: true,
|
21
|
-
configurable: true,
|
22
|
-
writable: true,
|
23
|
-
value: void 0
|
24
|
-
});
|
25
|
-
Object.defineProperty(this, "tableState", {
|
26
|
-
enumerable: true,
|
27
|
-
configurable: true,
|
28
|
-
writable: true,
|
29
|
-
value: new TableState({
|
30
|
-
dataSource: this.getProductsDataSource(),
|
31
|
-
pageSize: 5,
|
32
|
-
})
|
33
|
-
});
|
34
|
-
Object.defineProperty(this, "showProducts", {
|
35
|
-
enumerable: true,
|
36
|
-
configurable: true,
|
37
|
-
writable: true,
|
38
|
-
value: () => {
|
39
|
-
this.beveragesTableState = this.tableState.exportState();
|
40
|
-
this.tableState.setDataSource(this.getProductsDataSource(), {
|
41
|
-
reset: true,
|
42
|
-
initialState: this.productsTableState,
|
43
|
-
});
|
44
|
-
}
|
45
|
-
});
|
46
|
-
Object.defineProperty(this, "showBeverages", {
|
47
|
-
enumerable: true,
|
48
|
-
configurable: true,
|
49
|
-
writable: true,
|
50
|
-
value: () => {
|
51
|
-
this.productsTableState = this.tableState.exportState();
|
52
|
-
this.tableState.setDataSource(this.getBeveragesDataSource(), {
|
53
|
-
reset: true,
|
54
|
-
initialState: this.beveragesTableState,
|
55
|
-
});
|
56
|
-
}
|
57
|
-
});
|
58
|
-
}
|
59
|
-
getProductsDataSource() {
|
60
|
-
return new InMemoryDataSource(products);
|
61
|
-
}
|
62
|
-
getBeveragesDataSource() {
|
63
|
-
return new InMemoryDataSource(beverages);
|
64
|
-
}
|
65
|
-
};
|
66
|
-
TableStore = __decorate([
|
67
|
-
injectable()
|
68
|
-
], TableStore);
|
69
|
-
export { TableStore };
|
70
|
-
//# sourceMappingURL=state-caching-table.store.js.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"state-caching-table.store.js","sourceRoot":"","sources":["../../../src/demo/state-caching/state-caching-table.store.ts"],"names":[],"mappings":";;;;;;AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AACrD,OAAO,EAAE,kBAAkB,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AAEvD,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACtC,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAKxC,IAAa,UAAU,GAAvB,MAAa,UAAU;IAAvB;QACI;;;;;WAA6C;QAC7C;;;;;WAA8C;QAE9C;;;;mBAAa,IAAI,UAAU,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,kBAAkB,CAAC,QAAQ,CAAC,CAAC;IAC5C,CAAC;IAEO,sBAAsB;QAC1B,OAAO,IAAI,kBAAkB,CAAC,SAAS,CAAC,CAAC;IAC7C,CAAC;CACJ,CAAA;AAhCY,UAAU;IADtB,UAAU,EAAE;GACA,UAAU,CAgCtB;SAhCY,UAAU"}
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"boolean-editable-cell.d.ts","sourceRoot":"","sources":["../../src/editable-cell/boolean-editable-cell.tsx"],"names":[],"mappings":";AAqBA,eAAO,MAAM,mBAAmB,6EAE9B,CAAC"}
|
@@ -1,14 +0,0 @@
|
|
1
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
2
|
-
import { observer } from 'mobx-react';
|
3
|
-
import { Checkbox } from '@servicetitan/design-system';
|
4
|
-
import { getEditableCell } from './get-editable-cell';
|
5
|
-
const Editor = observer(({ fieldState: { value, onChange }, className }) => {
|
6
|
-
const handleChange = (_0, checked) => {
|
7
|
-
onChange(checked);
|
8
|
-
};
|
9
|
-
return (_jsx("td", Object.assign({ className: className }, { children: _jsx(Checkbox, { checked: value, onChange: handleChange, style: { marginRight: 0 } }) })));
|
10
|
-
});
|
11
|
-
export const BooleanEditableCell = getEditableCell({
|
12
|
-
editor: Editor,
|
13
|
-
});
|
14
|
-
//# sourceMappingURL=boolean-editable-cell.js.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"boolean-editable-cell.js","sourceRoot":"","sources":["../../src/editable-cell/boolean-editable-cell.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAEtC,OAAO,EAAE,QAAQ,EAAE,MAAM,6BAA6B,CAAC;AAEvD,OAAO,EAAE,eAAe,EAAe,MAAM,qBAAqB,CAAC;AAEnE,MAAM,MAAM,GAAG,QAAQ,CACnB,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,2BAAI,SAAS,EAAE,SAAS,gBACpB,KAAC,QAAQ,IAAC,OAAO,EAAE,KAAK,EAAE,QAAQ,EAAE,YAAY,EAAE,KAAK,EAAE,EAAE,WAAW,EAAE,CAAC,EAAE,GAAI,IAC9E,CACR,CAAC;AACN,CAAC,CACJ,CAAC;AAEF,MAAM,CAAC,MAAM,mBAAmB,GAAG,eAAe,CAAC;IAC/C,MAAM,EAAE,MAAM;CACjB,CAAC,CAAC"}
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"date-editable-cell.d.ts","sourceRoot":"","sources":["../../src/editable-cell/date-editable-cell.tsx"],"names":[],"mappings":";AA0BA,eAAO,MAAM,gBAAgB,6EAE3B,CAAC"}
|
@@ -1,14 +0,0 @@
|
|
1
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
2
|
-
import { observer } from 'mobx-react';
|
3
|
-
import { DatePicker } from '@progress/kendo-react-dateinputs';
|
4
|
-
import { getEditableCell } from './get-editable-cell';
|
5
|
-
const Editor = observer(({ fieldState: { value, onChange, hasError, error }, className }) => {
|
6
|
-
const handleChange = (event) => {
|
7
|
-
onChange(event.value);
|
8
|
-
};
|
9
|
-
return (_jsx("td", Object.assign({ className: className }, { children: _jsx(DatePicker, { value: value, onChange: handleChange, valid: !hasError, validationMessage: error }) })));
|
10
|
-
});
|
11
|
-
export const DateEditableCell = getEditableCell({
|
12
|
-
editor: Editor,
|
13
|
-
});
|
14
|
-
//# sourceMappingURL=date-editable-cell.js.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"date-editable-cell.js","sourceRoot":"","sources":["../../src/editable-cell/date-editable-cell.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAEtC,OAAO,EAAE,UAAU,EAAyB,MAAM,kCAAkC,CAAC;AAErF,OAAO,EAAE,eAAe,EAAe,MAAM,qBAAqB,CAAC;AAEnE,MAAM,MAAM,GAAG,QAAQ,CACnB,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,2BAAI,SAAS,EAAE,SAAS,gBACpB,KAAC,UAAU,IACP,KAAK,EAAE,KAAK,EACZ,QAAQ,EAAE,YAAY,EACtB,KAAK,EAAE,CAAC,QAAQ,EAChB,iBAAiB,EAAE,KAAK,GAC1B,IACD,CACR,CAAC;AACN,CAAC,CACJ,CAAC;AAEF,MAAM,CAAC,MAAM,gBAAgB,GAAG,eAAe,CAAC;IAC5C,MAAM,EAAE,MAAM;CACjB,CAAC,CAAC"}
|
@@ -1,13 +0,0 @@
|
|
1
|
-
import { ComponentType } from 'react';
|
2
|
-
import { TableCellProps } from '../table';
|
3
|
-
import { PossibleFormState } from '../table-state';
|
4
|
-
export interface EditActionProps<T> extends TableCellProps<T> {
|
5
|
-
formState: PossibleFormState<T>;
|
6
|
-
}
|
7
|
-
interface GetActionCellParams<T> {
|
8
|
-
view: ComponentType<TableCellProps<T>>;
|
9
|
-
edit: ComponentType<EditActionProps<T>>;
|
10
|
-
}
|
11
|
-
export declare function getActionCell<T>({ view: ViewAction, edit: EditAction }: GetActionCellParams<T>): (props: TableCellProps<T>) => JSX.Element;
|
12
|
-
export {};
|
13
|
-
//# sourceMappingURL=get-action-cell.d.ts.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"get-action-cell.d.ts","sourceRoot":"","sources":["../../src/editable-cell/get-action-cell.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAGtC,OAAO,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAE1C,OAAO,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AAEnD,MAAM,WAAW,eAAe,CAAC,CAAC,CAAE,SAAQ,cAAc,CAAC,CAAC,CAAC;IACzD,SAAS,EAAE,iBAAiB,CAAC,CAAC,CAAC,CAAC;CACnC;AAED,UAAU,mBAAmB,CAAC,CAAC;IAC3B,IAAI,EAAE,aAAa,CAAC,cAAc,CAAC,CAAC,CAAC,CAAC,CAAC;IACvC,IAAI,EAAE,aAAa,CAAC,eAAe,CAAC,CAAC,CAAC,CAAC,CAAC;CAC3C;AAED,wBAAgB,aAAa,CAAC,CAAC,EAAE,EAAE,IAAI,EAAE,UAAU,EAAE,IAAI,EAAE,UAAU,EAAE,EAAE,mBAAmB,CAAC,CAAC,CAAC,WAC5E,eAAe,CAAC,CAAC,iBAiBnC"}
|
@@ -1,18 +0,0 @@
|
|
1
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
2
|
-
import { TableCell } from '@servicetitan/design-system';
|
3
|
-
export function getActionCell({ view: ViewAction, edit: EditAction }) {
|
4
|
-
return (props) => {
|
5
|
-
var _a;
|
6
|
-
const { tableState, dataItem, rowType } = props;
|
7
|
-
if (rowType !== 'data') {
|
8
|
-
return _jsx(TableCell, Object.assign({}, props));
|
9
|
-
}
|
10
|
-
const editingForm = ((_a = tableState === null || tableState === void 0 ? void 0 : tableState.dataSource) === null || _a === void 0 ? void 0 : _a.idSelector) &&
|
11
|
-
tableState.inEdit.get(tableState.dataSource.idSelector(dataItem));
|
12
|
-
if (editingForm) {
|
13
|
-
return _jsx(EditAction, Object.assign({}, props, { formState: editingForm.form }));
|
14
|
-
}
|
15
|
-
return _jsx(ViewAction, Object.assign({}, props));
|
16
|
-
};
|
17
|
-
}
|
18
|
-
//# sourceMappingURL=get-action-cell.js.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"get-action-cell.js","sourceRoot":"","sources":["../../src/editable-cell/get-action-cell.tsx"],"names":[],"mappings":";AAEA,OAAO,EAAE,SAAS,EAAE,MAAM,6BAA6B,CAAC;AAcxD,MAAM,UAAU,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,KAAC,SAAS,oBAAK,KAAK,EAAI,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,KAAC,UAAU,oBAAK,KAAK,IAAE,SAAS,EAAE,WAAW,CAAC,IAAI,IAAI,CAAC;SACjE;QAED,OAAO,KAAC,UAAU,oBAAK,KAAK,EAAI,CAAC;IACrC,CAAC,CAAC;AACN,CAAC"}
|
@@ -1,13 +0,0 @@
|
|
1
|
-
import { ComponentType } from 'react';
|
2
|
-
import { FieldState } from 'formstate';
|
3
|
-
import { TableCellProps } from '../table';
|
4
|
-
export interface EditorProps<T> extends TableCellProps<any> {
|
5
|
-
fieldState: FieldState<T>;
|
6
|
-
}
|
7
|
-
interface GetEditableCellParams<T> {
|
8
|
-
viewer?: ComponentType<TableCellProps<any>>;
|
9
|
-
editor: ComponentType<EditorProps<T>>;
|
10
|
-
}
|
11
|
-
export declare function getEditableCell<T>({ viewer: Viewer, editor: Editor, }: GetEditableCellParams<T>): (props: TableCellProps<any>) => JSX.Element;
|
12
|
-
export {};
|
13
|
-
//# sourceMappingURL=get-editable-cell.d.ts.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"get-editable-cell.d.ts","sourceRoot":"","sources":["../../src/editable-cell/get-editable-cell.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAEtC,OAAO,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AAGvC,OAAO,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAE1C,MAAM,WAAW,WAAW,CAAC,CAAC,CAAE,SAAQ,cAAc,CAAC,GAAG,CAAC;IACvD,UAAU,EAAE,UAAU,CAAC,CAAC,CAAC,CAAC;CAC7B;AAED,UAAU,qBAAqB,CAAC,CAAC;IAC7B,MAAM,CAAC,EAAE,aAAa,CAAC,cAAc,CAAC,GAAG,CAAC,CAAC,CAAC;IAC5C,MAAM,EAAE,aAAa,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,CAAC;CACzC;AAED,wBAAgB,eAAe,CAAC,CAAC,EAAE,EAC/B,MAAM,EAAE,MAAkB,EAC1B,MAAM,EAAE,MAAM,GACjB,EAAE,qBAAqB,CAAC,CAAC,CAAC,WACR,eAAe,GAAG,CAAC,iBAiBrC"}
|
@@ -1,18 +0,0 @@
|
|
1
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
2
|
-
import { TableCell } from '@servicetitan/design-system';
|
3
|
-
export function getEditableCell({ viewer: Viewer = TableCell, editor: Editor, }) {
|
4
|
-
return (props) => {
|
5
|
-
var _a;
|
6
|
-
const { tableState, field, dataItem, rowType } = props;
|
7
|
-
if (rowType !== 'data') {
|
8
|
-
return _jsx(TableCell, Object.assign({}, props));
|
9
|
-
}
|
10
|
-
const editingForm = ((_a = tableState === null || tableState === void 0 ? void 0 : tableState.dataSource) === null || _a === void 0 ? void 0 : _a.idSelector) &&
|
11
|
-
tableState.inEdit.get(tableState.dataSource.idSelector(dataItem));
|
12
|
-
if (field && editingForm && (!editingForm.field || editingForm.field === field)) {
|
13
|
-
return _jsx(Editor, Object.assign({}, props, { fieldState: editingForm.form.$[field] }));
|
14
|
-
}
|
15
|
-
return _jsx(Viewer, Object.assign({}, props));
|
16
|
-
};
|
17
|
-
}
|
18
|
-
//# sourceMappingURL=get-editable-cell.js.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"get-editable-cell.js","sourceRoot":"","sources":["../../src/editable-cell/get-editable-cell.tsx"],"names":[],"mappings":";AAIA,OAAO,EAAE,SAAS,EAAE,MAAM,6BAA6B,CAAC;AAYxD,MAAM,UAAU,eAAe,CAAI,EAC/B,MAAM,EAAE,MAAM,GAAG,SAAS,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,KAAC,SAAS,oBAAK,KAAK,EAAI,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,KAAC,MAAM,oBAAK,KAAK,IAAE,UAAU,EAAE,WAAW,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,CAAC,IAAI,CAAC;SACvE;QAED,OAAO,KAAC,MAAM,oBAAK,KAAK,EAAI,CAAC;IACjC,CAAC,CAAC;AACN,CAAC"}
|
@@ -1,10 +0,0 @@
|
|
1
|
-
import { ComponentType } from 'react';
|
2
|
-
import { TableCellProps } from '../table';
|
3
|
-
import { Option } from '@servicetitan/form';
|
4
|
-
interface GetSelectEditableCellParams<T> {
|
5
|
-
options: Option<T>[];
|
6
|
-
viewer?: ComponentType<TableCellProps<any>>;
|
7
|
-
}
|
8
|
-
export declare function getSelectEditableCell<T>({ options, viewer }: GetSelectEditableCellParams<T>): (props: TableCellProps<any, any, never, never>) => JSX.Element;
|
9
|
-
export {};
|
10
|
-
//# sourceMappingURL=get-select-editable-cell.d.ts.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"get-select-editable-cell.d.ts","sourceRoot":"","sources":["../../src/editable-cell/get-select-editable-cell.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAM,MAAM,OAAO,CAAC;AAM1C,OAAO,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAG1C,OAAO,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAC;AAI5C,UAAU,2BAA2B,CAAC,CAAC;IACnC,OAAO,EAAE,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC;IACrB,MAAM,CAAC,EAAE,aAAa,CAAC,cAAc,CAAC,GAAG,CAAC,CAAC,CAAC;CAC/C;AAED,wBAAgB,qBAAqB,CAAC,CAAC,EAAE,EAAE,OAAO,EAAE,MAAM,EAAE,EAAE,2BAA2B,CAAC,CAAC,CAAC,kEA8B3F"}
|
@@ -1,19 +0,0 @@
|
|
1
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
2
|
-
import { observer } from 'mobx-react';
|
3
|
-
import { DropDownList } from '@progress/kendo-react-dropdowns';
|
4
|
-
import { getEditableCell } from './get-editable-cell';
|
5
|
-
import classNames from 'classnames';
|
6
|
-
export function getSelectEditableCell({ options, viewer }) {
|
7
|
-
const Editor = observer(({ fieldState: { value, onChange, hasError, error }, className }) => {
|
8
|
-
const selected = options.find(option => option.value === value);
|
9
|
-
const handleChange = (event) => {
|
10
|
-
onChange(event.target.value.value);
|
11
|
-
};
|
12
|
-
return (_jsx("td", Object.assign({ className: classNames('of-visible', className) }, { children: _jsx(DropDownList, { data: options, value: selected, onChange: handleChange, dataItemKey: "value", textField: "text", valid: !hasError, validationMessage: error, className: "w-100" }) })));
|
13
|
-
});
|
14
|
-
return getEditableCell({
|
15
|
-
viewer,
|
16
|
-
editor: Editor,
|
17
|
-
});
|
18
|
-
}
|
19
|
-
//# sourceMappingURL=get-select-editable-cell.js.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"get-select-editable-cell.js","sourceRoot":"","sources":["../../src/editable-cell/get-select-editable-cell.tsx"],"names":[],"mappings":";AAEA,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAEtC,OAAO,EAAE,YAAY,EAA2B,MAAM,iCAAiC,CAAC;AAGxF,OAAO,EAAE,eAAe,EAAe,MAAM,qBAAqB,CAAC;AAInE,OAAO,UAAU,MAAM,YAAY,CAAC;AAOpC,MAAM,UAAU,qBAAqB,CAAI,EAAE,OAAO,EAAE,MAAM,EAAkC;IACxF,MAAM,MAAM,GAAG,QAAQ,CACnB,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,2BAAI,SAAS,EAAE,UAAU,CAAC,YAAY,EAAE,SAAS,CAAC,gBAC9C,KAAC,YAAY,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,GACnB,IACD,CACR,CAAC;IACN,CAAC,CACJ,CAAC;IAEF,OAAO,eAAe,CAAC;QACnB,MAAM;QACN,MAAM,EAAE,MAAM;KACjB,CAAC,CAAC;AACP,CAAC"}
|
@@ -1,8 +0,0 @@
|
|
1
|
-
export * from './get-action-cell';
|
2
|
-
export * from './get-editable-cell';
|
3
|
-
export * from './text-editable-cell';
|
4
|
-
export * from './numeric-editable-cell';
|
5
|
-
export * from './boolean-editable-cell';
|
6
|
-
export * from './date-editable-cell';
|
7
|
-
export * from './get-select-editable-cell';
|
8
|
-
//# sourceMappingURL=index.d.ts.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/editable-cell/index.ts"],"names":[],"mappings":"AAAA,cAAc,mBAAmB,CAAC;AAClC,cAAc,qBAAqB,CAAC;AACpC,cAAc,sBAAsB,CAAC;AACrC,cAAc,yBAAyB,CAAC;AACxC,cAAc,yBAAyB,CAAC;AACxC,cAAc,sBAAsB,CAAC;AACrC,cAAc,4BAA4B,CAAC"}
|
@@ -1,8 +0,0 @@
|
|
1
|
-
export * from './get-action-cell';
|
2
|
-
export * from './get-editable-cell';
|
3
|
-
export * from './text-editable-cell';
|
4
|
-
export * from './numeric-editable-cell';
|
5
|
-
export * from './boolean-editable-cell';
|
6
|
-
export * from './date-editable-cell';
|
7
|
-
export * from './get-select-editable-cell';
|
8
|
-
//# sourceMappingURL=index.js.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/editable-cell/index.ts"],"names":[],"mappings":"AAAA,cAAc,mBAAmB,CAAC;AAClC,cAAc,qBAAqB,CAAC;AACpC,cAAc,sBAAsB,CAAC;AACrC,cAAc,yBAAyB,CAAC;AACxC,cAAc,yBAAyB,CAAC;AACxC,cAAc,sBAAsB,CAAC;AACrC,cAAc,4BAA4B,CAAC"}
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"numeric-editable-cell.d.ts","sourceRoot":"","sources":["../../src/editable-cell/numeric-editable-cell.tsx"],"names":[],"mappings":";AA2BA,eAAO,MAAM,mBAAmB,6EAE9B,CAAC"}
|
@@ -1,15 +0,0 @@
|
|
1
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
2
|
-
import { observer } from 'mobx-react';
|
3
|
-
import { NumericTextBox } from '@progress/kendo-react-inputs';
|
4
|
-
import { getEditableCell } from './get-editable-cell';
|
5
|
-
const Editor = observer(({ fieldState: { value, onChange, hasError, error }, className }) => {
|
6
|
-
const handleChange = (event) => {
|
7
|
-
// eslint-disable-next-line @typescript-eslint/prefer-nullish-coalescing
|
8
|
-
onChange(event.value || undefined);
|
9
|
-
};
|
10
|
-
return (_jsx("td", Object.assign({ className: className }, { children: _jsx(NumericTextBox, { value: value, onChange: handleChange, valid: !hasError, validationMessage: error }) })));
|
11
|
-
});
|
12
|
-
export const NumericEditableCell = getEditableCell({
|
13
|
-
editor: Editor,
|
14
|
-
});
|
15
|
-
//# sourceMappingURL=numeric-editable-cell.js.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"numeric-editable-cell.js","sourceRoot":"","sources":["../../src/editable-cell/numeric-editable-cell.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAEtC,OAAO,EAAE,cAAc,EAA6B,MAAM,8BAA8B,CAAC;AAEzF,OAAO,EAAE,eAAe,EAAe,MAAM,qBAAqB,CAAC;AAEnE,MAAM,MAAM,GAAG,QAAQ,CACnB,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,2BAAI,SAAS,EAAE,SAAS,gBACpB,KAAC,cAAc,IACX,KAAK,EAAE,KAAK,EACZ,QAAQ,EAAE,YAAY,EACtB,KAAK,EAAE,CAAC,QAAQ,EAChB,iBAAiB,EAAE,KAAK,GAC1B,IACD,CACR,CAAC;AACN,CAAC,CACJ,CAAC;AAEF,MAAM,CAAC,MAAM,mBAAmB,GAAG,eAAe,CAAC;IAC/C,MAAM,EAAE,MAAM;CACjB,CAAC,CAAC"}
|
@@ -1,9 +0,0 @@
|
|
1
|
-
/// <reference types="react" />
|
2
|
-
interface GetTextEditableCellParams<T> {
|
3
|
-
placeholder?: string;
|
4
|
-
isDisabled?(dataItem: T): boolean;
|
5
|
-
}
|
6
|
-
export declare function getTextEditableCell<T>({ placeholder, isDisabled, }?: GetTextEditableCellParams<T>): (props: import("..").TableCellProps<any, any, never, never>) => JSX.Element;
|
7
|
-
export declare const TextEditableCell: (props: import("..").TableCellProps<any, any, never, never>) => JSX.Element;
|
8
|
-
export {};
|
9
|
-
//# sourceMappingURL=text-editable-cell.d.ts.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"text-editable-cell.d.ts","sourceRoot":"","sources":["../../src/editable-cell/text-editable-cell.tsx"],"names":[],"mappings":";AAUA,UAAU,yBAAyB,CAAC,CAAC;IACjC,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,UAAU,CAAC,CAAC,QAAQ,EAAE,CAAC,GAAG,OAAO,CAAC;CACrC;AAED,wBAAgB,mBAAmB,CAAC,CAAC,EAAE,EACnC,WAAW,EACX,UAAU,GACb,GAAE,yBAAyB,CAAC,CAAC,CAAM,+EA2BnC;AAED,eAAO,MAAM,gBAAgB,6EAAwB,CAAC"}
|
@@ -1,20 +0,0 @@
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
2
|
-
import { observer } from 'mobx-react';
|
3
|
-
import { Input } from '@progress/kendo-react-inputs';
|
4
|
-
import { getEditableCell } from './get-editable-cell';
|
5
|
-
import { Label } from '@servicetitan/form';
|
6
|
-
export function getTextEditableCell({ placeholder, isDisabled, } = {}) {
|
7
|
-
const Editor = observer(({ fieldState: { value, onChange, hasError, error }, dataItem, className }) => {
|
8
|
-
const handleChange = (event) => {
|
9
|
-
if (typeof event.target.value === 'string') {
|
10
|
-
onChange(event.target.value);
|
11
|
-
}
|
12
|
-
};
|
13
|
-
return (_jsxs("td", Object.assign({ className: className }, { children: [_jsx(Input, { value: value, onChange: handleChange, valid: !hasError, placeholder: placeholder, disabled: isDisabled === null || isDisabled === void 0 ? void 0 : isDisabled(dataItem) }), hasError && _jsx(Label, { label: "", hasError: true, error: error })] })));
|
14
|
-
});
|
15
|
-
return getEditableCell({
|
16
|
-
editor: Editor,
|
17
|
-
});
|
18
|
-
}
|
19
|
-
export const TextEditableCell = getTextEditableCell();
|
20
|
-
//# sourceMappingURL=text-editable-cell.js.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"text-editable-cell.js","sourceRoot":"","sources":["../../src/editable-cell/text-editable-cell.tsx"],"names":[],"mappings":";AAEA,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAEtC,OAAO,EAAE,KAAK,EAAoB,MAAM,8BAA8B,CAAC;AAEvE,OAAO,EAAE,eAAe,EAAe,MAAM,qBAAqB,CAAC;AAEnE,OAAO,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAC;AAO3C,MAAM,UAAU,mBAAmB,CAAI,EACnC,WAAW,EACX,UAAU,MACoB,EAAE;IAChC,MAAM,MAAM,GAAG,QAAQ,CACnB,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,4BAAI,SAAS,EAAE,SAAS,iBACpB,KAAC,KAAK,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,GAClC,EACD,QAAQ,IAAI,KAAC,KAAK,IAAC,KAAK,EAAC,EAAE,EAAC,QAAQ,QAAC,KAAK,EAAE,KAAK,GAAI,KACrD,CACR,CAAC;IACN,CAAC,CACJ,CAAC;IAEF,OAAO,eAAe,CAAC;QACnB,MAAM,EAAE,MAAM;KACjB,CAAC,CAAC;AACP,CAAC;AAED,MAAM,CAAC,MAAM,gBAAgB,GAAG,mBAAmB,EAAE,CAAC"}
|
package/dist/export/export.d.ts
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"export.d.ts","sourceRoot":"","sources":["../../src/export/export.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AAM3B,UAAU,WAAW;IACjB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,SAAS,CAAC,EAAE,MAAM,IAAI,CAAC;IACvB,WAAW,CAAC,EAAE,MAAM,IAAI,CAAC;CAC5B;AAED,eAAO,MAAM,MAAM,EAAE,EAAE,CAAC,WAAW,CAqBlC,CAAC"}
|
package/dist/export/export.js
DELETED
@@ -1,6 +0,0 @@
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
2
|
-
import { Button, Dropdown, Icon } from '@servicetitan/design-system';
|
3
|
-
import { formatNumber } from 'accounting';
|
4
|
-
import * as Styles from './export.module.css';
|
5
|
-
export const Export = ({ className, totalCount, exportPdf, exportExcel }) => (_jsx("div", Object.assign({ className: className }, { children: _jsx(Dropdown, Object.assign({ trigger: _jsxs(Button, Object.assign({ className: "qa-export-dropdown", iconName: "expand_more", iconPosition: "right" }, { children: [_jsx(Icon, { name: "file_download" }), _jsxs("span", { children: ["Download", !!totalCount && ` (${formatNumber(totalCount, 0)})`] })] })), icon: null }, { children: _jsxs(Dropdown.Menu, Object.assign({ className: Styles.dropdown }, { children: [exportPdf && (_jsx(Dropdown.Item, { className: "qa-export-pdf", text: ".PDF", onClick: exportPdf })), exportExcel && (_jsx(Dropdown.Item, { className: "qa-export-excel", text: ".XLSX", onClick: exportExcel }))] })) })) })));
|
6
|
-
//# sourceMappingURL=export.js.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"export.js","sourceRoot":"","sources":["../../src/export/export.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAE,MAAM,6BAA6B,CAAC;AACrE,OAAO,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAE1C,OAAO,KAAK,MAAM,MAAM,qBAAqB,CAAC;AAS9C,MAAM,CAAC,MAAM,MAAM,GAAoB,CAAC,EAAE,SAAS,EAAE,UAAU,EAAE,SAAS,EAAE,WAAW,EAAE,EAAE,EAAE,CAAC,CAC1F,4BAAK,SAAS,EAAE,SAAS,gBACrB,KAAC,QAAQ,kBACL,OAAO,EACH,MAAC,MAAM,kBAAC,SAAS,EAAC,oBAAoB,EAAC,QAAQ,EAAC,aAAa,EAAC,YAAY,EAAC,OAAO,iBAC9E,KAAC,IAAI,IAAC,IAAI,EAAC,eAAe,GAAG,EAC7B,uCAAe,CAAC,CAAC,UAAU,IAAI,KAAK,YAAY,CAAC,UAAU,EAAE,CAAC,CAAC,GAAG,IAAQ,KACrE,EAEb,IAAI,EAAE,IAAI,gBAEV,MAAC,QAAQ,CAAC,IAAI,kBAAC,SAAS,EAAE,MAAM,CAAC,QAAQ,iBACpC,SAAS,IAAI,CACV,KAAC,QAAQ,CAAC,IAAI,IAAC,SAAS,EAAC,eAAe,EAAC,IAAI,EAAC,MAAM,EAAC,OAAO,EAAE,SAAS,GAAI,CAC9E,EACA,WAAW,IAAI,CACZ,KAAC,QAAQ,CAAC,IAAI,IAAC,SAAS,EAAC,iBAAiB,EAAC,IAAI,EAAC,OAAO,EAAC,OAAO,EAAE,WAAW,GAAI,CACnF,KACW,IACT,IACT,CACT,CAAC"}
|
package/dist/export/index.d.ts
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/export/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAC"}
|
package/dist/export/index.js
DELETED