@servicetitan/table 25.1.0 → 25.2.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (88) hide show
  1. package/dist/demo/filters/async-select-filter.js +1 -1
  2. package/dist/demo/filters/async-select-filter.js.map +1 -1
  3. package/dist/demo/filters/categories.d.ts.map +1 -1
  4. package/dist/demo/filters/categories.js +24 -0
  5. package/dist/demo/filters/categories.js.map +1 -1
  6. package/dist/demo/filters/multiselect-filter.d.ts.map +1 -1
  7. package/dist/demo/filters/multiselect-filter.js +2 -1
  8. package/dist/demo/filters/multiselect-filter.js.map +1 -1
  9. package/dist/demo/filters/select-filter.d.ts +6 -0
  10. package/dist/demo/filters/select-filter.d.ts.map +1 -0
  11. package/dist/demo/filters/select-filter.js +58 -0
  12. package/dist/demo/filters/select-filter.js.map +1 -0
  13. package/dist/demo/filters/single-select-filter.d.ts.map +1 -1
  14. package/dist/demo/filters/single-select-filter.js +2 -1
  15. package/dist/demo/filters/single-select-filter.js.map +1 -1
  16. package/dist/demo/filters/table.store.d.ts +8 -1
  17. package/dist/demo/filters/table.store.d.ts.map +1 -1
  18. package/dist/demo/filters/table.store.js +35 -1
  19. package/dist/demo/filters/table.store.js.map +1 -1
  20. package/dist/demo/overview/product.d.ts +5 -0
  21. package/dist/demo/overview/product.d.ts.map +1 -1
  22. package/dist/demo/overview/products.d.ts.map +1 -1
  23. package/dist/demo/overview/products.js +12 -0
  24. package/dist/demo/overview/products.js.map +1 -1
  25. package/dist/demo/overview/table.store.d.ts.map +1 -1
  26. package/dist/demo/overview/table.store.js +1 -0
  27. package/dist/demo/overview/table.store.js.map +1 -1
  28. package/dist/filters/async-select/async-select-filter.d.ts +7 -3
  29. package/dist/filters/async-select/async-select-filter.d.ts.map +1 -1
  30. package/dist/filters/async-select/async-select-filter.js +21 -6
  31. package/dist/filters/async-select/async-select-filter.js.map +1 -1
  32. package/dist/filters/column-menu-filters.d.ts +10 -1
  33. package/dist/filters/column-menu-filters.d.ts.map +1 -1
  34. package/dist/filters/column-menu-filters.js +11 -3
  35. package/dist/filters/column-menu-filters.js.map +1 -1
  36. package/dist/filters/index.d.ts +1 -0
  37. package/dist/filters/index.d.ts.map +1 -1
  38. package/dist/filters/index.js +1 -0
  39. package/dist/filters/index.js.map +1 -1
  40. package/dist/filters/multiselect-filter/multiselect-filter.d.ts +4 -3
  41. package/dist/filters/multiselect-filter/multiselect-filter.d.ts.map +1 -1
  42. package/dist/filters/multiselect-filter/multiselect-filter.js +7 -7
  43. package/dist/filters/multiselect-filter/multiselect-filter.js.map +1 -1
  44. package/dist/filters/select-filter/object-search.d.ts +2 -0
  45. package/dist/filters/select-filter/object-search.d.ts.map +1 -0
  46. package/dist/filters/select-filter/object-search.js +19 -0
  47. package/dist/filters/select-filter/object-search.js.map +1 -0
  48. package/dist/filters/select-filter/select-filter.d.ts +32 -0
  49. package/dist/filters/select-filter/select-filter.d.ts.map +1 -0
  50. package/dist/filters/select-filter/select-filter.js +214 -0
  51. package/dist/filters/select-filter/select-filter.js.map +1 -0
  52. package/dist/filters/select-filter/select-filter.stories.d.ts +8 -0
  53. package/dist/filters/select-filter/select-filter.stories.d.ts.map +1 -0
  54. package/dist/filters/select-filter/select-filter.stories.js +8 -0
  55. package/dist/filters/select-filter/select-filter.stories.js.map +1 -0
  56. package/dist/filters/select-filter/value-getter.d.ts +3 -0
  57. package/dist/filters/select-filter/value-getter.d.ts.map +1 -0
  58. package/dist/filters/select-filter/value-getter.js +10 -0
  59. package/dist/filters/select-filter/value-getter.js.map +1 -0
  60. package/dist/filters/single-select/single-select-filter.d.ts +3 -2
  61. package/dist/filters/single-select/single-select-filter.d.ts.map +1 -1
  62. package/dist/filters/single-select/single-select-filter.js +17 -7
  63. package/dist/filters/single-select/single-select-filter.js.map +1 -1
  64. package/dist/index.d.ts +1 -1
  65. package/dist/index.d.ts.map +1 -1
  66. package/dist/index.js +1 -1
  67. package/dist/index.js.map +1 -1
  68. package/package.json +6 -6
  69. package/src/demo/filters/async-select-filter.tsx +1 -1
  70. package/src/demo/filters/categories.tsx +24 -0
  71. package/src/demo/filters/multiselect-filter.tsx +15 -0
  72. package/src/demo/filters/select-filter.tsx +147 -0
  73. package/src/demo/filters/single-select-filter.tsx +2 -1
  74. package/src/demo/filters/table.store.ts +45 -2
  75. package/src/demo/overview/product.ts +6 -0
  76. package/src/demo/overview/products.ts +12 -0
  77. package/src/demo/overview/table.store.ts +1 -0
  78. package/src/filters/async-select/async-select-filter.tsx +26 -15
  79. package/src/filters/column-menu-filters.tsx +44 -21
  80. package/src/filters/index.ts +1 -0
  81. package/src/filters/multiselect-filter/multiselect-filter.tsx +16 -7
  82. package/src/filters/select-filter/__tests__/object-search.test.ts +32 -0
  83. package/src/filters/select-filter/object-search.ts +25 -0
  84. package/src/filters/select-filter/select-filter.stories.tsx +8 -0
  85. package/src/filters/select-filter/select-filter.tsx +320 -0
  86. package/src/filters/select-filter/value-getter.ts +13 -0
  87. package/src/filters/single-select/single-select-filter.tsx +18 -10
  88. package/src/index.ts +1 -0
@@ -16,8 +16,8 @@ export const AsyncSelectDefaultExample = provide({
16
16
  }), [madeInFetcher]);
17
17
  const categoryColumnMenu = useMemo(() => asyncSelectColumnMenuFilter({
18
18
  dataFetcher: categoryFetcher,
19
- placeholder: 'Search for Categories',
20
19
  multiple: true,
20
+ contentMaxHeight: '250px',
21
21
  }), [categoryFetcher]);
22
22
  return (_jsxs(Fragment, { children: [_jsxs(Banner, Object.assign({ title: "Default filter with async select", className: "m-b-2" }, { children: ["Async select filter allows to choose one or several option from the list that will be fetched from BE. The list size is not limited, so you can also use search to find desired option.", _jsx("br", {}), "Use it when there can be greater than 20 possible options"] })), _jsxs(Table, Object.assign({ tableState: tableState, striped: false }, { children: [_jsx(TableColumn, { field: "ProductID", title: "ID", editable: false, width: "100px" }), _jsx(TableColumn, { field: "ProductName", title: "Product Name", width: "240px" }), _jsx(TableColumn, { field: "MadeIn", title: "Made In (async single-select filter)", columnMenu: madeInColumnMenu }), _jsx(TableColumn, { field: "CategoryID", title: "Category (async multi-select filter)", columnMenu: categoryColumnMenu, cell: CategoryCell })] }))] }));
23
23
  }));
@@ -1 +1 @@
1
- {"version":3,"file":"async-select-filter.js","sourceRoot":"","sources":["../../../src/demo/filters/async-select-filter.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,OAAO,EAAM,QAAQ,EAAE,MAAM,OAAO,CAAC;AAC9C,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACtC,OAAO,EAAE,OAAO,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAEnE,OAAO,EAAE,KAAK,EAAE,WAAW,EAAE,2BAA2B,EAAE,MAAM,OAAO,CAAC;AAExE,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAC5C,OAAO,EAAE,MAAM,EAAE,MAAM,6BAA6B,CAAC;AAErD,MAAM,CAAC,MAAM,yBAAyB,GAAO,OAAO,CAAC;IACjD,UAAU,EAAE,CAAC,UAAU,CAAC;CAC3B,CAAC,CACE,QAAQ,CAAC,GAAG,EAAE;IACV,MAAM,CAAC,EAAE,eAAe,EAAE,aAAa,EAAE,UAAU,EAAE,CAAC,GAAG,eAAe,CAAC,UAAU,CAAC,CAAC;IAErF,MAAM,gBAAgB,GAAG,OAAO,CAC5B,GAAG,EAAE,CACD,2BAA2B,CAAC;QACxB,WAAW,EAAE,aAAa;QAC1B,WAAW,EAAE,qBAAqB;KACrC,CAAC,EACN,CAAC,aAAa,CAAC,CAClB,CAAC;IAEF,MAAM,kBAAkB,GAAG,OAAO,CAC9B,GAAG,EAAE,CACD,2BAA2B,CAAC;QACxB,WAAW,EAAE,eAAe;QAC5B,WAAW,EAAE,uBAAuB;QACpC,QAAQ,EAAE,IAAI;KACjB,CAAC,EACN,CAAC,eAAe,CAAC,CACpB,CAAC;IAEF,OAAO,CACH,MAAC,QAAQ,eACL,MAAC,MAAM,kBAAC,KAAK,EAAC,kCAAkC,EAAC,SAAS,E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AE,EAAE,EAAE,MAAM,OAAO,CAAC;AAC3B,OAAO,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAE7C,MAAM,WAAW,QAAQ;IACrB,UAAU,EAAE,MAAM,CAAC;IACnB,YAAY,EAAE,MAAM,CAAC;CACxB;AAED,eAAO,MAAM,UAAU,EAAE,QAAQ,EAyBhC,CAAC;AAEF,eAAO,MAAM,YAAY,EAAE,EAAE,CAAC,cAAc,CAI3C,CAAC"}
1
+ {"version":3,"file":"categories.d.ts","sourceRoot":"","sources":["../../../src/demo/filters/categories.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AAC3B,OAAO,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAE7C,MAAM,WAAW,QAAQ;IACrB,UAAU,EAAE,MAAM,CAAC;IACnB,YAAY,EAAE,MAAM,CAAC;CACxB;AAED,eAAO,MAAM,UAAU,EAAE,QAAQ,EAiDhC,CAAC;AAEF,eAAO,MAAM,YAAY,EAAE,EAAE,CAAC,cAAc,CAI3C,CAAC"}
@@ -24,6 +24,30 @@ export const categories = [
24
24
  CategoryID: 10,
25
25
  CategoryName: 'Sashimi',
26
26
  },
27
+ {
28
+ CategoryID: 21,
29
+ CategoryName: 'Borsh',
30
+ },
31
+ {
32
+ CategoryID: 22,
33
+ CategoryName: 'Pasta Carbonara',
34
+ },
35
+ {
36
+ CategoryID: 23,
37
+ CategoryName: 'Caesar salad',
38
+ },
39
+ {
40
+ CategoryID: 24,
41
+ CategoryName: 'Ravioli',
42
+ },
43
+ {
44
+ CategoryID: 25,
45
+ CategoryName: 'Pizza',
46
+ },
47
+ {
48
+ CategoryID: 26,
49
+ CategoryName: 'Steak',
50
+ },
27
51
  ];
28
52
  export const CategoryCell = props => {
29
53
  var _a;
@@ -1 +1 @@
1
- {"version":3,"file":"categories.js","sourceRoot":"","sources":["../../../src/demo/filters/categories.tsx"],"names":[],"mappings":";AAQA,MAAM,CAAC,MAAM,UAAU,GAAe;IAClC;QACI,UAAU,EAAE,CAAC;QACb,YAAY,EAAE,KAAK;KACtB;IACD;QACI,UAAU,EAAE,CAAC;QACb,YAAY,EAAE,OAAO;KACxB;IACD;QACI,UAAU,EAAE,CAAC;QACb,YAAY,EAAE,QAAQ;KACzB;IACD;QACI,UAAU,EAAE,CAAC;QACb,YAAY,EAAE,MAAM;KACvB;IACD;QACI,UAAU,EAAE,CAAC;QACb,YAAY,EAAE,MAAM;KACvB;IACD;QACI,UAAU,EAAE,EAAE;QACd,YAAY,EAAE,SAAS;KAC1B;CACJ,CAAC;AAEF,MAAM,CAAC,MAAM,YAAY,GAAuB,KAAK,CAAC,EAAE;;IACpD,MAAM,EAAE,KAAK,EAAE,QAAQ,EAAE,GAAG,KAAK,CAAC;IAElC,OAAO,uBAAK,MAAA,UAAU,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,UAAU,KAAK,QAAQ,CAAC,KAAM,CAAC,CAAC,0CAAE,YAAY,GAAM,CAAC;AAC5F,CAAC,CAAC"}
1
+ {"version":3,"file":"categories.js","sourceRoot":"","sources":["../../../src/demo/filters/categories.tsx"],"names":[],"mappings":";AAQA,MAAM,CAAC,MAAM,UAAU,GAAe;IAClC;QACI,UAAU,EAAE,CAAC;QACb,YAAY,EAAE,KAAK;KACtB;IACD;QACI,UAAU,EAAE,CAAC;QACb,YAAY,EAAE,OAAO;KACxB;IACD;QACI,UAAU,EAAE,CAAC;QACb,YAAY,EAAE,QAAQ;KACzB;IACD;QACI,UAAU,EAAE,CAAC;QACb,YAAY,EAAE,MAAM;KACvB;IACD;QACI,UAAU,EAAE,CAAC;QACb,YAAY,EAAE,MAAM;KACvB;IACD;QACI,UAAU,EAAE,EAAE;QACd,YAAY,EAAE,SAAS;KAC1B;IACD;QACI,UAAU,EAAE,EAAE;QACd,YAAY,EAAE,OAAO;KACxB;IACD;QACI,UAAU,EAAE,EAAE;QACd,YAAY,EAAE,iBAAiB;KAClC;IACD;QACI,UAAU,EAAE,EAAE;QACd,YAAY,EAAE,cAAc;KAC/B;IACD;QACI,UAAU,EAAE,EAAE;QACd,YAAY,EAAE,SAAS;KAC1B;IACD;QACI,UAAU,EAAE,EAAE;QACd,YAAY,EAAE,OAAO;KACxB;IACD;QACI,UAAU,EAAE,EAAE;QACd,YAAY,EAAE,OAAO;KACxB;CACJ,CAAC;AAEF,MAAM,CAAC,MAAM,YAAY,GAAuB,KAAK,CAAC,EAAE;;IACpD,MAAM,EAAE,KAAK,EAAE,QAAQ,EAAE,GAAG,KAAK,CAAC;IAElC,OAAO,uBAAK,MAAA,UAAU,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,UAAU,KAAK,QAAQ,CAAC,KAAM,CAAC,CAAC,0CAAE,YAAY,GAAM,CAAC;AAC5F,CAAC,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"multiselect-filter.d.ts","sourceRoot":"","sources":["../../../src/demo/filters/multiselect-filter.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAW,EAAE,EAAE,MAAM,OAAO,CAAC;AAUpC,eAAO,MAAM,yBAAyB,EAAE,EAqBvC,CAAC"}
1
+ {"version":3,"file":"multiselect-filter.d.ts","sourceRoot":"","sources":["../../../src/demo/filters/multiselect-filter.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAW,EAAE,EAAE,MAAM,OAAO,CAAC;AAUpC,eAAO,MAAM,yBAAyB,EAAE,EAoCvC,CAAC"}
@@ -9,6 +9,7 @@ export const MultiSelectDefaultExample = provide({
9
9
  })(observer(() => {
10
10
  const [{ tableState, madeInOptions }] = useDependencies(TableStore);
11
11
  const madeInColumnMenu = useMemo(() => multiSelectColumnMenuFilter(madeInOptions), [madeInOptions]);
12
- return (_jsxs(Table, Object.assign({ tableState: tableState }, { children: [_jsx(TableColumn, { field: "ProductID", title: "ID", editable: false, width: "100px" }), _jsx(TableColumn, { field: "ProductName", title: "Product Name", width: "240px" }), _jsx(TableColumn, { field: "MadeIn", title: "Made In", columnMenu: madeInColumnMenu })] })));
12
+ const categoryColumnMenu = useMemo(() => multiSelectColumnMenuFilter(new Array(20).fill(0).map((_, index) => index), undefined, { contentMaxHeight: '250px' }), []);
13
+ return (_jsxs(Table, Object.assign({ tableState: tableState }, { children: [_jsx(TableColumn, { field: "ProductID", title: "ID", editable: false, width: "100px" }), _jsx(TableColumn, { field: "ProductName", title: "Product Name", width: "240px" }), _jsx(TableColumn, { field: "MadeIn", title: "Made In", columnMenu: madeInColumnMenu }), _jsx(TableColumn, { field: "CategoryID", title: "CategoryID", columnMenu: categoryColumnMenu })] })));
13
14
  }));
14
15
  //# sourceMappingURL=multiselect-filter.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"multiselect-filter.js","sourceRoot":"","sources":["../../../src/demo/filters/multiselect-filter.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,OAAO,EAAM,MAAM,OAAO,CAAC;AAEpC,OAAO,EAAE,OAAO,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAEnE,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAEtC,OAAO,EAAE,KAAK,EAAE,WAAW,EAAE,2BAA2B,EAAE,MAAM,OAAO,CAAC;AAExE,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAE3C,MAAM,CAAC,MAAM,yBAAyB,GAAO,OAAO,CAAC;IACjD,UAAU,EAAE,CAAC,UAAU,CAAC;CAC3B,CAAC,CACE,QAAQ,CAAC,GAAG,EAAE;IACV,MAAM,CAAC,EAAE,UAAU,EAAE,aAAa,EAAE,CAAC,GAAG,eAAe,CAAC,UAAU,CAAC,CAAC;IAEpE,MAAM,gBAAgB,GAAG,OAAO,CAC5B,GAAG,EAAE,CAAC,2BAA2B,CAAC,aAAa,CAAC,EAChD,CAAC,aAAa,CAAC,CAClB,CAAC;IAEF,OAAO,CACH,MAAC,KAAK,kBAAC,UAAU,EAAE,UAAU,iBACzB,KAAC,WAAW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KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,EAC9C,SAAS,EACT,EAAE,gBAAgB,EAAE,OAAO,EAAE,CAChC,EACL,EAAE,CACL,CAAC;IAEF,OAAO,CACH,MAAC,KAAK,kBAAC,UAAU,EAAE,UAAU,iBACzB,KAAC,WAAW,IAAC,KAAK,EAAC,WAAW,EAAC,KAAK,EAAC,IAAI,EAAC,QAAQ,EAAE,KAAK,EAAE,KAAK,EAAC,OAAO,GAAG,EAE3E,KAAC,WAAW,IAAC,KAAK,EAAC,aAAa,EAAC,KAAK,EAAC,cAAc,EAAC,KAAK,EAAC,OAAO,GAAG,EAEtE,KAAC,WAAW,IAAC,KAAK,EAAC,QAAQ,EAAC,KAAK,EAAC,SAAS,EAAC,UAAU,EAAE,gBAAgB,GAAI,EAC5E,KAAC,WAAW,IACR,KAAK,EAAC,YAAY,EAClB,KAAK,EAAC,YAAY,EAClB,UAAU,EAAE,kBAAkB,GAChC,KACE,CACX,CAAC;AACN,CAAC,CAAC,CACL,CAAC"}
@@ -0,0 +1,6 @@
1
+ import { FC } from 'react';
2
+ import { TableCellProps } from '../..';
3
+ export declare const PackageCell: FC<TableCellProps>;
4
+ export declare const SelectAsyncExample: FC;
5
+ export declare const SelectSyncExample: FC;
6
+ //# sourceMappingURL=select-filter.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"select-filter.d.ts","sourceRoot":"","sources":["../../../src/demo/filters/select-filter.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAW,EAAE,EAAY,MAAM,OAAO,CAAC;AAK9C,OAAO,EAA8C,cAAc,EAAE,MAAM,OAAO,CAAC;AAMnF,eAAO,MAAM,WAAW,EAAE,EAAE,CAAC,cAAc,CAI1C,CAAC;AAEF,eAAO,MAAM,kBAAkB,EAAE,EAsDhC,CAAC;AAEF,eAAO,MAAM,iBAAiB,EAAE,EAyE/B,CAAC"}
@@ -0,0 +1,58 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { useMemo, Fragment } from 'react';
3
+ import { observer } from 'mobx-react';
4
+ import { Banner } from '@servicetitan/design-system';
5
+ import { provide, useDependencies } from '@servicetitan/react-ioc';
6
+ import { Table, TableColumn, selectColumnMenuFilter } from '../..';
7
+ import { TableStore } from './table.store';
8
+ import { categories, CategoryCell } from './categories';
9
+ export const PackageCell = props => {
10
+ var _a;
11
+ const { dataItem } = props;
12
+ return _jsx("td", { children: (_a = dataItem === null || dataItem === void 0 ? void 0 : dataItem.Package) === null || _a === void 0 ? void 0 : _a.PackageName });
13
+ };
14
+ export const SelectAsyncExample = provide({
15
+ singletons: [TableStore],
16
+ })(observer(() => {
17
+ const [{ categoryFetcherClean, madeInFetcherClean, tableState }] = useDependencies(TableStore);
18
+ const madeInColumnMenu = useMemo(() => selectColumnMenuFilter({
19
+ dataFetcher: madeInFetcherClean,
20
+ search: true,
21
+ }), [madeInFetcherClean]);
22
+ const categoryColumnMenu = useMemo(() => selectColumnMenuFilter({
23
+ dataFetcher: categoryFetcherClean,
24
+ multiple: true,
25
+ contentMaxHeight: '250px',
26
+ valueSelector: item => item.CategoryID,
27
+ }), [categoryFetcherClean]);
28
+ return (_jsxs(Fragment, { children: [_jsxs(Banner, Object.assign({ title: "Default filter with async select", className: "m-b-2" }, { children: ["Async select filter allows to choose one or several option from the list that will be fetched from BE. The list size is not limited, so you can also use search to find desired option.", _jsx("br", {}), "Use it when there can be greater than 20 possible options"] })), _jsxs(Table, Object.assign({ tableState: tableState, striped: false }, { children: [_jsx(TableColumn, { field: "ProductID", title: "ID", editable: false, width: "100px" }), _jsx(TableColumn, { field: "ProductName", title: "Product Name", width: "240px" }), _jsx(TableColumn, { field: "MadeIn", title: "Made In (async single-select filter)", columnMenu: madeInColumnMenu }), _jsx(TableColumn, { field: "CategoryID", title: "Category (async multi-select filter)", columnMenu: categoryColumnMenu, cell: CategoryCell })] }))] }));
29
+ }));
30
+ export const SelectSyncExample = provide({
31
+ singletons: [TableStore],
32
+ })(observer(() => {
33
+ const [{ madeInOptions, packageOptions, tableState }] = useDependencies(TableStore);
34
+ const madeInColumnMenu = useMemo(() => selectColumnMenuFilter({
35
+ data: madeInOptions,
36
+ search: {
37
+ placeholder: 'Search for made-ins',
38
+ filter: search => item => item.toLowerCase().includes(search),
39
+ },
40
+ }), [madeInOptions]);
41
+ const categoryColumnMenu = useMemo(() => selectColumnMenuFilter({
42
+ data: categories,
43
+ multiple: true,
44
+ contentMaxHeight: '250px',
45
+ valueSelector: item => item.CategoryID,
46
+ renderItem: item => item.CategoryName,
47
+ search: true,
48
+ }), []);
49
+ const packageColumnMenu = useMemo(() => selectColumnMenuFilter({
50
+ data: packageOptions,
51
+ multiple: false,
52
+ valueSelector: item => item.Id,
53
+ renderItem: item => item.Name,
54
+ rowValueSelector: (item) => item === null || item === void 0 ? void 0 : item.PackageId,
55
+ }), [packageOptions]);
56
+ return (_jsxs(Fragment, { children: [_jsx(Banner, Object.assign({ title: "Default filter with sync select", className: "m-b-2" }, { children: "Select filter allows to choose one or multiple option(s) from the provided list. You can pass simple options (string or number) or complex objects" })), _jsxs(Table, Object.assign({ tableState: tableState, striped: false }, { children: [_jsx(TableColumn, { field: "ProductID", title: "ID", editable: false, width: "100px" }), _jsx(TableColumn, { field: "ProductName", title: "Product Name", width: "240px" }), _jsx(TableColumn, { field: "MadeIn", title: "Made In (sync single-select filter)", columnMenu: madeInColumnMenu }), _jsx(TableColumn, { field: "CategoryID", title: "Category (sync multi-select filter)", columnMenu: categoryColumnMenu, cell: CategoryCell }), _jsx(TableColumn, { field: "Package", title: "Package (sync single-select filter)", columnMenu: packageColumnMenu, cell: PackageCell })] }))] }));
57
+ }));
58
+ //# sourceMappingURL=select-filter.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"select-filter.js","sourceRoot":"","sources":["../../../src/demo/filters/select-filter.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,OAAO,EAAM,QAAQ,EAAE,MAAM,OAAO,CAAC;AAC9C,OAAO,EAAE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EAClB,KAAK,EAAC,qCAAqC,EAC3C,UAAU,EAAE,kBAAkB,EAC9B,IAAI,EAAE,YAAY,GACpB,EACF,KAAC,WAAW,IACR,KAAK,EAAC,SAAS,EACf,KAAK,EAAC,qCAAqC,EAC3C,UAAU,EAAE,iBAAiB,EAC7B,IAAI,EAAE,WAAW,GACnB,KACE,IACD,CACd,CAAC;AACN,CAAC,CAAC,CACL,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"single-select-filter.d.ts","sourceRoot":"","sources":["../../../src/demo/filters/single-select-filter.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAW,EAAE,EAAY,MAAM,OAAO,CAAC;AAY9C,eAAO,MAAM,0BAA0B,EAAE,EAmDxC,CAAC;AAEF,eAAO,MAAM,+BAA+B,EAAE,EAoC7C,CAAC"}
1
+ {"version":3,"file":"single-select-filter.d.ts","sourceRoot":"","sources":["../../../src/demo/filters/single-select-filter.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAW,EAAE,EAAY,MAAM,OAAO,CAAC;AAY9C,eAAO,MAAM,0BAA0B,EAAE,EAoDxC,CAAC;AAEF,eAAO,MAAM,+BAA+B,EAAE,EAoC7C,CAAC"}
@@ -13,8 +13,9 @@ export const SingleSelectDefaultExample = provide({
13
13
  const madeInColumnMenu = useMemo(() => singleSelectColumnMenuFilter({ options: madeInOptions }), [madeInOptions]);
14
14
  const categoryColumnMenu = useMemo(() => singleSelectColumnMenuFilter({
15
15
  options: categories,
16
- renderItem: cat => (_jsxs(BodyText, { children: [_jsx("span", Object.assign({ className: "fw-bold" }, { children: "cat.CategoryName" })), " (#", cat.CategoryID, ")"] })),
16
+ renderItem: cat => (_jsxs(BodyText, { children: [_jsx("span", Object.assign({ className: "fw-bold" }, { children: cat.CategoryName })), " (#", cat.CategoryID, ")"] })),
17
17
  valueSelector: cat => cat.CategoryID,
18
+ contentMaxHeight: '200px',
18
19
  }), []);
19
20
  return (_jsxs(Fragment, { children: [_jsxs(Banner, Object.assign({ title: "Default filter with single select", className: "m-b-2" }, { children: ["Single select filter allows to choose one option from the provided list. You can pass simple options (string or number) or complex objects", _jsx("br", {}), "Use it when options list is fixed and less than 20 items"] })), _jsxs(Table, Object.assign({ tableState: tableState, striped: false }, { children: [_jsx(TableColumn, { field: "ProductID", title: "ID", editable: false, width: "100px" }), _jsx(TableColumn, { field: "ProductName", title: "Product Name", width: "240px" }), _jsx(TableColumn, { field: "MadeIn", title: "Made In (simple single-select filter)", columnMenu: madeInColumnMenu }), _jsx(TableColumn, { field: "CategoryID", title: "Category (simple single-select filter)", columnMenu: categoryColumnMenu, cell: CategoryCell })] }))] }));
20
21
  }));
@@ -1 +1 @@
1
- {"version":3,"file":"single-select-filter.js","sourceRoot":"","sources":["../../../src/demo/filters/single-select-filter.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,OAAO,EAAM,QAAQ,EAAE,MAAM,OAAO,CAAC;AAE9C,OAAO,EAAE,OAAO,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAEnE,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAEtC,OAAO,EAAE,KAAK,EAAE,WAAW,EAAE,4BAA4B,EAAE,MAAM,OAAO,CAAC;AAEzE,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AACxD,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,6BAA6B,CAAC;AAE/D,MAAM,CAAC,MAAM,0BAA0B,GAAO,OAAO,CAAC;IAClD,UAAU,EAAE,CAAC,UAAU,CAAC;CAC3B,CAAC,CACE,QAAQ,CAAC,GAAG,EAAE;IACV,MAAM,CAAC,EAAE,UAAU,EAAE,aAAa,EAAE,CAAC,GAAG,eAAe,CAAC,UAAU,CAAC,CAAC;IAEpE,MAAM,gBAAgB,GAAG,OAAO,CAC5B,GAAG,EAAE,CAAC,4BAA4B,CAAC,EAAE,OAAO,E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C,GAAG,eAAe,CAAC,UAAU,CAAC,CAAC;IAErD,MAAM,uBAAuB,GAAG,OAAO,CAAC,GAAG,EAAE;QACzC,MAAM,OAAO,GAAG,CAAC,GAAW,EAAE,EAAE,CAAC,UAAU,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC;QAEzD,OAAO,4BAA4B,CAAC;YAChC,OAAO,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC;YACf,UAAU,EAAE,IAAI,CAAC,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,kBAAkB,CAAC,CAAC,CAAC,uBAAuB,CAAC;YACzE,cAAc,EAAE,CAAC,MAAc,EAAE,KAAa,EAAE,EAAE,CAC9C,MAAM,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC,KAAK;SACpE,CAAC,CAAC;IACP,CAAC,EAAE,EAAE,CAAC,CAAC;IAEP,OAAO,CACH,MAAC,QAAQ,eACL,MAAC,MAAM,kBAAC,KAAK,EAAC,mCAAmC,EAAC,SAAS,EAAC,OAAO,+JAG/D,cAAM,qEAED,EACT,MAAC,KAAK,kBAAC,UAAU,EAAE,UAAU,EAAE,OAAO,EAAE,KAAK,iBACzC,KAAC,WAAW,IAAC,KAAK,EAAC,WAAW,EAAC,KAAK,EAAC,IAAI,EAAC,QAAQ,EAAE,KAAK,EAAE,KAAK,EAAC,OAAO,GAAG,EAC3E,KAAC,WAAW,IACR,KAAK,EAAC,aAAa,EACnB,KAAK,EAAC,4CAA4C,EAClD,UAAU,EAAE,uBAAuB,GACrC,KACE,IACD,CACd,CAAC;AACN,CAAC,CAAC,CACL,CAAC"}
1
+ {"version":3,"file":"single-select-filter.js","sourceRoot":"","sources":["../../../src/demo/filters/single-select-filter.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,OAAO,EA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C,CAAC,KAAK,CAAC,CAAC,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC,KAAK;SACpE,CAAC,CAAC;IACP,CAAC,EAAE,EAAE,CAAC,CAAC;IAEP,OAAO,CACH,MAAC,QAAQ,eACL,MAAC,MAAM,kBAAC,KAAK,EAAC,mCAAmC,EAAC,SAAS,EAAC,OAAO,+JAG/D,cAAM,qEAED,EACT,MAAC,KAAK,kBAAC,UAAU,EAAE,UAAU,EAAE,OAAO,EAAE,KAAK,iBACzC,KAAC,WAAW,IAAC,KAAK,EAAC,WAAW,EAAC,KAAK,EAAC,IAAI,EAAC,QAAQ,EAAE,KAAK,EAAE,KAAK,EAAC,OAAO,GAAG,EAC3E,KAAC,WAAW,IACR,KAAK,EAAC,aAAa,EACnB,KAAK,EAAC,4CAA4C,EAClD,UAAU,EAAE,uBAAuB,GACrC,KACE,IACD,CACd,CAAC;AACN,CAAC,CAAC,CACL,CAAC"}
@@ -1,9 +1,16 @@
1
- import { TableState, AsyncSelectFilterDataFetcher } from '../..';
1
+ import { TableState, AsyncSelectFilterDataFetcher, SelectFilterDataFetcher } from '../..';
2
+ import { Category } from './categories';
2
3
  export declare class TableStore {
3
4
  tableState: TableState<import("../overview/product").Product, number, never, never>;
4
5
  get madeInOptions(): string[];
6
+ get packageOptions(): {
7
+ Id: number;
8
+ Name: string;
9
+ }[];
5
10
  categoryFetcher: AsyncSelectFilterDataFetcher<number>;
6
11
  madeInFetcher: AsyncSelectFilterDataFetcher<string>;
12
+ categoryFetcherClean: SelectFilterDataFetcher<Category>;
13
+ madeInFetcherClean: SelectFilterDataFetcher<string>;
7
14
  private getDataSource;
8
15
  }
9
16
  //# sourceMappingURL=table.store.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"table.store.d.ts","sourceRoot":"","sources":["../../../src/demo/filters/table.store.ts"],"names":[],"mappings":"AAEA,OAAO,EAAsB,UAAU,EAAE,4BAA4B,EAAE,MAAM,OAAO,CAAC;AAIrF,qBACa,UAAU;IACnB,UAAU,0EAGP;IAEH,IAAI,aAAa,aAEhB;IAED,eAAe,EAAE,4BAA4B,CAAC,MAAM,CAAC,CAUnD;IAEF,aAAa,EAAE,4BAA4B,CAAC,MAAM,CAAC,CAUjD;IAEF,OAAO,CAAC,aAAa;CAGxB"}
1
+ {"version":3,"file":"table.store.d.ts","sourceRoot":"","sources":["../../../src/demo/filters/table.store.ts"],"names":[],"mappings":"AAEA,OAAO,EAEH,UAAU,EACV,4BAA4B,EAC5B,uBAAuB,EAC1B,MAAM,OAAO,CAAC;AAEf,OAAO,EAAc,QAAQ,EAAE,MAAM,cAAc,CAAC;AAEpD,qBACa,UAAU;IACnB,UAAU,0EAGP;IAEH,IAAI,aAAa,aAEhB;IAED,IAAI,cAAc;;;QAcjB;IAED,eAAe,EAAE,4BAA4B,CAAC,MAAM,CAAC,CAUnD;IAEF,aAAa,EAAE,4BAA4B,CAAC,MAAM,CAAC,CAUjD;IAEF,oBAAoB,EAAE,uBAAuB,CAAC,QAAQ,CAAC,CAUrD;IAEF,kBAAkB,EAAE,uBAAuB,CAAC,MAAM,CAAC,CAQjD;IAEF,OAAO,CAAC,aAAa;CAGxB"}
@@ -14,7 +14,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
14
14
  });
15
15
  };
16
16
  import { injectable } from '@servicetitan/react-ioc';
17
- import { InMemoryDataSource, TableState } from '../..';
17
+ import { InMemoryDataSource, TableState, } from '../..';
18
18
  import { products } from '../overview/products';
19
19
  import { categories } from './categories';
20
20
  let TableStore = class TableStore {
@@ -58,10 +58,44 @@ let TableStore = class TableStore {
58
58
  };
59
59
  })
60
60
  });
61
+ Object.defineProperty(this, "categoryFetcherClean", {
62
+ enumerable: true,
63
+ configurable: true,
64
+ writable: true,
65
+ value: (opts) => __awaiter(this, void 0, void 0, function* () {
66
+ var _c;
67
+ yield new Promise(resolve => setTimeout(resolve, 1500));
68
+ const sv = (_c = opts.search) === null || _c === void 0 ? void 0 : _c.trim().toLowerCase();
69
+ return {
70
+ data: categories.filter(cat => sv ? cat.CategoryName.toLowerCase().includes(sv) : true),
71
+ };
72
+ })
73
+ });
74
+ Object.defineProperty(this, "madeInFetcherClean", {
75
+ enumerable: true,
76
+ configurable: true,
77
+ writable: true,
78
+ value: (opts) => __awaiter(this, void 0, void 0, function* () {
79
+ var _d;
80
+ yield new Promise(resolve => setTimeout(resolve, 1500));
81
+ const sv = (_d = opts.search) === null || _d === void 0 ? void 0 : _d.trim().toLowerCase();
82
+ return {
83
+ data: this.madeInOptions.filter(opt => (sv ? opt.toLowerCase().includes(sv) : true)),
84
+ };
85
+ })
86
+ });
61
87
  }
62
88
  get madeInOptions() {
63
89
  return Array.from(new Set(products.map(p => p.MadeIn)));
64
90
  }
91
+ get packageOptions() {
92
+ const map = products.reduce((out, product) => (Object.assign(Object.assign({}, out), (product.Package
93
+ ? { [product.Package.PackageId]: product.Package.PackageName }
94
+ : {}))), {});
95
+ return Object.keys(map)
96
+ .map(Number)
97
+ .map(id => ({ Id: id, Name: map[id] }));
98
+ }
65
99
  getDataSource() {
66
100
  return new InMemoryDataSource(products, row => row.ProductID);
67
101
  }
@@ -1 +1 @@
1
- {"version":3,"file":"table.store.js","sourceRoot":"","sources":["../../../src/demo/filters/table.store.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AAErD,OAAO,EAAE,kBAAkB,EAAE,UAAU,EAAgC,MAAM,OAAO,CAAC;AACrF,OAAO,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAChD,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAG1C,IAAa,UAAU,GAAvB,MAAa,UAAU;IAAvB;QACI;;;;mBAAa,IAAI,UAAU,CAAC;gBACxB,UAAU,EAAE,IAAI,CAAC,aAAa,EAAE;gBAChC,QAAQ,E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C,EAAE,EAAE,EAAE,EAAE,EAAE,IAAI,EAAE,GAAG,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC;IAChD,CAAC;IAgDO,aAAa;QACjB,OAAO,IAAI,kBAAkB,CAAC,QAAQ,EAAE,GAAG,CAAC,EAAE,CAAC,GAAG,CAAC,SAAS,CAAC,CAAC;IAClE,CAAC;CACJ,CAAA;AA3EY,UAAU;IADtB,UAAU,EAAE;GACA,UAAU,CA2EtB;SA3EY,UAAU"}
@@ -11,6 +11,10 @@ export declare enum Supplier {
11
11
  Charlie = 3,
12
12
  Benjamin = 4
13
13
  }
14
+ export interface ProductPackage {
15
+ PackageId: number;
16
+ PackageName: string;
17
+ }
14
18
  export interface Product {
15
19
  ProductID: number;
16
20
  ProductName: string;
@@ -23,5 +27,6 @@ export interface Product {
23
27
  UnitsOnOrder: Date;
24
28
  Discontinued: boolean;
25
29
  AvailableFor?: UserRole;
30
+ Package?: ProductPackage;
26
31
  }
27
32
  //# sourceMappingURL=product.d.ts.map
@@ -1 +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"}
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,cAAc;IAC3B,SAAS,EAAE,MAAM,CAAC;IAClB,WAAW,EAAE,MAAM,CAAC;CACvB;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;IACxB,OAAO,CAAC,EAAE,cAAc,CAAC;CAC5B"}
@@ -1 +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"}
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,EAwI7B,CAAC"}
@@ -12,6 +12,10 @@ export const products = [
12
12
  UnitsOnOrder: new Date('1/11/2023'),
13
13
  Discontinued: false,
14
14
  AvailableFor: UserRole.Admin,
15
+ Package: {
16
+ PackageId: 1,
17
+ PackageName: 'Standard package',
18
+ },
15
19
  },
16
20
  {
17
21
  ProductID: 2,
@@ -24,6 +28,10 @@ export const products = [
24
28
  UnitsInStock: 17,
25
29
  UnitsOnOrder: new Date('2/11/2023'),
26
30
  Discontinued: false,
31
+ Package: {
32
+ PackageId: 1,
33
+ PackageName: 'Standard package',
34
+ },
27
35
  },
28
36
  {
29
37
  ProductID: 3,
@@ -62,6 +70,10 @@ export const products = [
62
70
  UnitsOnOrder: new Date('5/11/2023'),
63
71
  Discontinued: true,
64
72
  AvailableFor: UserRole.GeneralOffice,
73
+ Package: {
74
+ PackageId: 2,
75
+ PackageName: 'Extended package',
76
+ },
65
77
  },
66
78
  {
67
79
  ProductID: 6,
@@ -1 +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;Q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AAW,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"}
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;CAuBvB"}
@@ -76,6 +76,7 @@ let TableStore = class TableStore {
76
76
  UnitsOnOrder: new FieldState(new Date()).validators(value => value > new Date() && 'Invalid date'),
77
77
  Discontinued: new FieldState(false),
78
78
  AvailableFor: new FieldState(undefined),
79
+ Package: new FieldState(undefined),
79
80
  }), row);
80
81
  }
81
82
  };
@@ -1 +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,EAA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ustomColumnMenuFilterSingleOpts } from '../column-menu-filters';
3
4
  export declare type AsyncSelectFilterDataFetcher<TV extends IdType = IdType, TO extends AsyncSelectItem<TV> = AsyncSelectItem<TV>> = (opts: {
4
5
  search?: string;
5
6
  }) => Promise<{
@@ -9,11 +10,14 @@ export interface AsyncSelectItem<TV extends IdType = IdType> {
9
10
  value: TV;
10
11
  text: string;
11
12
  }
12
- export interface AsyncSelectFilterOptions<TID extends IdType, TO extends AsyncSelectItem<TID>> {
13
+ export interface AsyncSelectFilterOptions<TID extends IdType, TO extends AsyncSelectItem<TID>> extends CustomColumnMenuFilterSingleOpts {
13
14
  dataFetcher: AsyncSelectFilterDataFetcher<TID, TO>;
14
- placeholder: string;
15
+ placeholder?: string;
15
16
  multiple?: boolean;
16
17
  renderItem?: (item: TO) => ReactNode;
17
18
  }
18
- export declare function asyncSelectColumnMenuFilter<TID extends IdType, TO extends AsyncSelectItem<TID>>(options: AsyncSelectFilterOptions<TID, TO>): (props: import("@servicetitan/design-system").TableColumnMenuProps) => JSX.Element;
19
+ /**
20
+ * @deprecated use selectColumnMenuFilter instead
21
+ */
22
+ export declare function asyncSelectColumnMenuFilter<TID extends IdType, TO extends AsyncSelectItem<TID>>({ dataFetcher, placeholder, multiple, renderItem, ...opts }: AsyncSelectFilterOptions<TID, TO>): (props: import("@servicetitan/design-system").TableColumnMenuProps) => JSX.Element;
19
23
  //# sourceMappingURL=async-select-filter.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"async-select-filter.d.ts","sourceRoot":"","sources":["../../../src/filters/async-select/async-select-filter.tsx"],"names":[],"mappings":"AAAA,OAAO,EAA6B,SAAS,EAA+B,MAAM,OAAO,CAAC;AAU1F,OAAO,EAAE,MAAM,EAAE,MAAM,0BAA0B,CAAC;AAMlD,oBAAY,4BAA4B,CACpC,EAAE,SAAS,MAAM,GAAG,MAAM,EAC1B,EAAE,SAAS,eAAe,CAAC,EAAE,CAAC,GAAG,eAAe,CAAC,EAAE,CAAC,IACp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AE3D,MAAM,WAAW,eAAe,CAAC,EAAE,SAAS,MAAM,GAAG,MAAM;IACvD,KAAK,EAAE,EAAE,CAAC;IACV,IAAI,EAAE,MAAM,CAAC;CAChB;AAwJD,MAAM,WAAW,wBAAwB,CAAC,GAAG,SAAS,MAAM,EAAE,EAAE,SAAS,eAAe,CAAC,GAAG,CAAC,CACzF,SAAQ,gCAAgC;IACxC,WAAW,EAAE,4BAA4B,CAAC,GAAG,EAAE,EAAE,CAAC,CAAC;IACnD,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,UAAU,CAAC,EAAE,CAAC,IAAI,EAAE,EAAE,KAAK,SAAS,CAAC;CACxC;AAMD;;GAEG;AACH,wBAAgB,2BAA2B,CAAC,GAAG,SAAS,MAAM,EAAE,EAAE,SAAS,eAAe,CAAC,GAAG,CAAC,EAAE,EAC7F,WAAW,EACX,WAAW,EACX,QAAQ,EACR,UAAU,EACV,GAAG,IAAI,EACV,EAAE,wBAAwB,CAAC,GAAG,EAAE,EAAE,CAAC,sFA2DnC"}
@@ -16,10 +16,21 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
16
16
  step((generator = generator.apply(thisArg, _arguments || [])).next());
17
17
  });
18
18
  };
19
+ var __rest = (this && this.__rest) || function (s, e) {
20
+ var t = {};
21
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
22
+ t[p] = s[p];
23
+ if (s != null && typeof Object.getOwnPropertySymbols === "function")
24
+ for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
25
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
26
+ t[p[i]] = s[p[i]];
27
+ }
28
+ return t;
29
+ };
19
30
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
20
31
  import { Component, Fragment } from 'react';
21
32
  import { Checkbox, Radio, Input, Spinner, BodyText, } from '@servicetitan/design-system';
22
- import { renderCustomColumnMenuFilter } from '../column-menu-filters';
33
+ import { renderCustomColumnMenuFilter, } from '../column-menu-filters';
23
34
  import { makeObservable, observable, runInAction } from 'mobx';
24
35
  import { observer } from 'mobx-react';
25
36
  let SelectorAsync = class SelectorAsync extends Component {
@@ -136,10 +147,14 @@ const SelectorItemMultiple = ({ option, renderer, checked, onChange }) => {
136
147
  var _a;
137
148
  return (_jsx(Checkbox, { label: (_a = renderer === null || renderer === void 0 ? void 0 : renderer(option)) !== null && _a !== void 0 ? _a : option.text, checked: checked, onChange: (_, checked, event) => onChange(option, checked, event), className: "m-b-1" }));
138
149
  };
139
- export function asyncSelectColumnMenuFilter(options) {
150
+ /**
151
+ * @deprecated use selectColumnMenuFilter instead
152
+ */
153
+ export function asyncSelectColumnMenuFilter(_a) {
154
+ var { dataFetcher, placeholder, multiple, renderItem } = _a, opts = __rest(_a, ["dataFetcher", "placeholder", "multiple", "renderItem"]);
140
155
  const contains = (value, options) => options === null || options === void 0 ? void 0 : options.some(opt => opt.value === value);
141
156
  const equals = (value, option) => (option === null || option === void 0 ? void 0 : option.value) === value;
142
- const FilterCell = options.multiple
157
+ const FilterCell = multiple
143
158
  ? ({ value, onChange }) => {
144
159
  const handleChange = (option, checked, event) => {
145
160
  const val = checked
@@ -151,7 +166,7 @@ export function asyncSelectColumnMenuFilter(options) {
151
166
  syntheticEvent: event,
152
167
  });
153
168
  };
154
- return (_jsx(SelectorAsync, { selected: value !== null && value !== void 0 ? value : [], itemComponent: SelectorItemMultiple, onChange: handleChange, placeholder: options.placeholder, renderer: options.renderItem, dataFetcher: options.dataFetcher }));
169
+ return (_jsx(SelectorAsync, { selected: value !== null && value !== void 0 ? value : [], itemComponent: SelectorItemMultiple, onChange: handleChange, placeholder: placeholder, renderer: renderItem, dataFetcher: dataFetcher }));
155
170
  }
156
171
  : ({ value, onChange }) => {
157
172
  const handleChange = (option, checked, event) => {
@@ -161,8 +176,8 @@ export function asyncSelectColumnMenuFilter(options) {
161
176
  syntheticEvent: event,
162
177
  });
163
178
  };
164
- return (_jsx(SelectorAsync, { selected: value ? [value] : [], onChange: handleChange, itemComponent: SelectorItemSingle, placeholder: options.placeholder, renderer: options.renderItem, dataFetcher: options.dataFetcher }));
179
+ return (_jsx(SelectorAsync, { selected: value ? [value] : [], onChange: handleChange, itemComponent: SelectorItemSingle, placeholder: placeholder, renderer: renderItem, dataFetcher: dataFetcher }));
165
180
  };
166
- return renderCustomColumnMenuFilter(FilterCell);
181
+ return renderCustomColumnMenuFilter(FilterCell, opts);
167
182
  }
168
183
  //# sourceMappingURL=async-select-filter.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"async-select-filter.js","sourceRoot":"","sources":["../../../src/filters/async-select/async-select-filter.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;AAAA,OAAO,EAAE,SAAS,EAA6B,QAAQ,EAAqB,MAAM,OAAO,CAAC;AAE1F,OAAO,EACH,QAAQ,EAER,KAAK,EACL,KAAK,EACL,OAAO,EACP,QAAQ,GACX,MAAM,6BAA6B,CAAC;AAGrC,OAAO,EAAE,4BAA4B,EAAE,MAAM,wBAAwB,CAAC;AACtE,OAAO,EAAE,cAAc,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,MAAM,CAAC;AAC/D,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAiCtC,IAAM,aAAa,GAAnB,MAAM,aAAmE,SAAQ,SAEhF;IAMG,YAAY,KAA6B;QACrC,KAAK,CAAC,KAAK,CAAC,CAAC;QANL;;;;mBAAuC,EAAE;WAAC;QAC1C;;;;mBAAS,EAAE;WAAC;QACZ;;;;mBAAQ,KAAK;WAAC;QACd;;;;mBAAU,KAAK;WAAC;QAW5B;;;;mBAAgB,CAAC,KAAsC,EAAE,EAAE;gBACvD,IAAI,KAAK,CAAC,GAAG,KAAK,OAAO,EAAE;oBACvB,KAAK,CAAC,eAAe,EAAE,CAAC;iBAC3B;YACL,CAAC;WAAC;QAE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,OAAO,CACH,KAAC,aAAa,IACV,QAAQ,EAAE,KAAK,aAAL,KAAK,cAAL,KAAK,GAAI,EAAE,EACrB,aAAa,EAAE,oBAAoB,EACnC,QAAQ,EAAE,YAAY,EACtB,WAAW,EAAE,OAAO,CAAC,WAAW,EAChC,QAAQ,EAAE,OAAO,CAAC,UAAU,EAC5B,WAAW,EAAE,OAAO,CAAC,WAAW,GAClC,CACL,CAAC;QACN,CAAC;QACH,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,QAAQ,EAAiC,EAAE,EAAE;YACnD,MAAM,YAAY,GAAG,CACjB,MAAU,EACV,OAAgB,EAChB,KAAuC,EACzC,EAAE;gBACA,QAAQ,CAAC;oBACL,KAAK,EAAE,MAAM;oBACb,QAAQ,EAAE,MAAM,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE;oBAC9B,cAAc,EAAE,KAAK;iBACxB,CAAC,CAAC;YACP,CAAC,CAAC;YAEF,OAAO,CACH,KAAC,aAAa,IACV,QAAQ,EAAE,KAAK,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,EAAE,EAC9B,QAAQ,EAAE,YAAY,EACtB,aAAa,EAAE,kBAAkB,EACjC,WAAW,EAAE,OAAO,CAAC,WAAW,EAChC,QAAQ,EAAE,OAAO,CAAC,UAAU,EAC5B,WAAW,EAAE,OAAO,CAAC,WAAW,GAClC,CACL,CAAC;QACN,CAAC,CAAC;IAER,OAAO,4BAA4B,CAAC,UAAU,CAAC,CAAC;AACpD,CAAC"}
1
+ {"version":3,"file":"async-select-filter.js","sourceRoot":"","sources":["../../../src/filters/async-select/async-select-filter.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,OAAO,EAAE,SAAS,EAA6B,QAAQ,EAAqB,MAAM,OAAO,CAAC;AAE1F,OAAO,EACH,QAAQ,EAER,KAAK,EACL,KAAK,EACL,OAAO,EACP,QAAQ,GACX,MAAM,6BAA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OAAO,CACH,KAAC,aAAa,IACV,QAAQ,EAAE,KAAK,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,EAAE,EAC9B,QAAQ,EAAE,YAAY,EACtB,aAAa,EAAE,kBAAkB,EACjC,WAAW,EAAE,WAAW,EACxB,QAAQ,EAAE,UAAU,EACpB,WAAW,EAAE,WAAW,GAC1B,CACL,CAAC;QACN,CAAC,CAAC;IAER,OAAO,4BAA4B,CAAC,UAAU,EAAE,IAAI,CAAC,CAAC;AAC1D,CAAC"}
@@ -1,5 +1,14 @@
1
1
  import { ComponentType } from 'react';
2
2
  import { TableColumnMenuProps, TableFilterCellProps } from '@servicetitan/design-system';
3
3
  export declare const StandardColumnMenuFilter: (props: TableColumnMenuProps) => JSX.Element;
4
- export declare function renderCustomColumnMenuFilter(FilterCell: ComponentType<TableFilterCellProps>, double?: boolean): (props: TableColumnMenuProps) => JSX.Element;
4
+ export interface CustomColumnMenuFilterSingleOpts {
5
+ contentMaxHeight?: string;
6
+ contentClassName?: string;
7
+ }
8
+ export interface CustomColumnMenuFilterDoubleOpts {
9
+ double?: boolean;
10
+ doubleContentClassName?: string;
11
+ }
12
+ export declare type CustomColumnMenuFilterOpts = CustomColumnMenuFilterSingleOpts & CustomColumnMenuFilterDoubleOpts;
13
+ export declare function renderCustomColumnMenuFilter(FilterCell: ComponentType<TableFilterCellProps>, doubleOrOptions?: boolean | CustomColumnMenuFilterOpts): (props: TableColumnMenuProps) => JSX.Element;
5
14
  //# sourceMappingURL=column-menu-filters.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"column-menu-filters.d.ts","sourceRoot":"","sources":["../../src/filters/column-menu-filters.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAM,MAAM,OAAO,CAAC;AAC1C,OAAO,EAEH,oBAAoB,EACpB,oBAAoB,EACvB,MAAM,6BAA6B,CAAC;AAIrC,eAAO,MAAM,wBAAwB,UAAW,oBAAoB,gBAEnE,CAAC;AAEF,wBAAgB,4BAA4B,CACxC,UAAU,EAAE,aAAa,CAAC,oBAAoB,CAAC,EAC/C,MAAM,CAAC,EAAE,OAAO,WA0BD,oBAAoB,iBAGtC"}
1
+ {"version":3,"file":"column-menu-filters.d.ts","sourceRoot":"","sources":["../../src/filters/column-menu-filters.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAqB,MAAM,OAAO,CAAC;AACzD,OAAO,EAEH,oBAAoB,EACpB,oBAAoB,EACvB,MAAM,6BAA6B,CAAC;AAIrC,eAAO,MAAM,wBAAwB,UAAW,oBAAoB,gBAEnE,CAAC;AAEF,MAAM,WAAW,gCAAgC;IAC7C,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,gBAAgB,CAAC,EAAE,MAAM,CAAC;CAC7B;AACD,MAAM,WAAW,gCAAgC;IAC7C,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,sBAAsB,CAAC,EAAE,MAAM,CAAC;CACnC;AAED,oBAAY,0BAA0B,GAAG,gCAAgC,GACrE,gCAAgC,CAAC;AAErC,wBAAgB,4BAA4B,CACxC,UAAU,EAAE,aAAa,CAAC,oBAAoB,CAAC,EAC/C,eAAe,CAAC,EAAE,OAAO,GAAG,0BAA0B,WAqCvC,oBAAoB,iBAGtC"}
@@ -2,8 +2,16 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { TableColumnMenuFilter, } from '@servicetitan/design-system';
3
3
  import { DropDownList } from '@progress/kendo-react-dropdowns';
4
4
  export const StandardColumnMenuFilter = (props) => (_jsx(TableColumnMenuFilter, Object.assign({}, props, { expanded: true })));
5
- export function renderCustomColumnMenuFilter(FilterCell, double) {
6
- const filterUI = ({ firstFilterProps, secondFilterProps, logicData, logicValue, onLogicChange, }) => (_jsxs("div", { children: [_jsx(FilterCell, Object.assign({}, firstFilterProps)), double && (_jsxs("div", { children: [_jsx(DropDownList, { data: logicData, value: logicValue, onChange: onLogicChange, className: "k-filter-and m-b-1", textField: "text" }), _jsx(FilterCell, Object.assign({}, secondFilterProps))] }))] }));
7
- return (props) => (_jsx(TableColumnMenuFilter, Object.assign({}, props, { filterUI: filterUI, expanded: true })));
5
+ export function renderCustomColumnMenuFilter(FilterCell, doubleOrOptions) {
6
+ const opts = typeof doubleOrOptions === 'boolean' ? { double: doubleOrOptions } : doubleOrOptions !== null && doubleOrOptions !== void 0 ? doubleOrOptions : {};
7
+ const FilterUI = ({ firstFilterProps, secondFilterProps, logicData, logicValue, onLogicChange, }) => {
8
+ const contentStyles = {};
9
+ if (opts.contentMaxHeight) {
10
+ contentStyles.maxHeight = opts.contentMaxHeight;
11
+ contentStyles.overflowY = 'auto';
12
+ }
13
+ return (_jsxs("div", Object.assign({ className: opts.contentClassName, style: contentStyles }, { children: [_jsx(FilterCell, Object.assign({}, firstFilterProps)), !!opts.double && (_jsxs("div", Object.assign({ className: opts.doubleContentClassName }, { children: [_jsx(DropDownList, { data: logicData, value: logicValue, onChange: onLogicChange, className: "k-filter-and m-b-1", textField: "text" }), _jsx(FilterCell, Object.assign({}, secondFilterProps))] })))] })));
14
+ };
15
+ return (props) => (_jsx(TableColumnMenuFilter, Object.assign({}, props, { filterUI: FilterUI, expanded: true })));
8
16
  }
9
17
  //# sourceMappingURL=column-menu-filters.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"column-menu-filters.js","sourceRoot":"","sources":["../../src/filters/column-menu-filters.tsx"],"names":[],"mappings":";AACA,OAAO,EACH,qBAAqB,GAGxB,MAAM,6BAA6B,CAAC;AAErC,OAAO,EAAE,YAAY,EAAE,MAAM,iCAAiC,CAAC;AAE/D,MAAM,CAAC,MAAM,wBAAwB,GAAG,CAAC,KAA2B,EAAE,EAAE,CAAC,CACrE,KAAC,qBAAqB,oBAAK,KAAK,IAAE,QAAQ,UAAG,CAChD,CAAC;AAEF,MAAM,UAAU,4BAA4B,CACxC,UAA+C,EAC/C,MAAgB;IAEhB,MAAM,QAAQ,GAAqC,CAAC,EAChD,gBAAgB,EAChB,iBAAiB,EACjB,SAAS,EACT,UAAU,EACV,aAAa,GAChB,EAAE,EAAE,CAAC,CACF,0BACI,KAAC,UAAU,oBAAK,gBAAgB,EAAI,EACnC,MAAM,IAAI,CACP,0BACI,KAAC,YAAY,IACT,IAAI,EAAE,SAAS,EACf,KAAK,EAAE,UAAU,EACjB,QAAQ,EAAE,aAAa,EACvB,SAAS,EAAC,oBAAoB,EAC9B,SAAS,EAAC,MAAM,GAClB,EACF,KAAC,UAAU,oBAAK,iBAAiB,EAAI,IACnC,CACT,IACC,CACT,CAAC;IAEF,OAAO,CAAC,KAA2B,EAAE,EAAE,CAAC,CACpC,KAAC,qBAAqB,oBAAK,KAAK,IAAE,QAAQ,EAAE,QAAQ,EAAE,QAAQ,UAAG,CACpE,CAAC;AACN,CAAC"}
1
+ {"version":3,"file":"column-menu-filters.js","sourceRoot":"","sources":["../../src/filters/column-menu-filters.tsx"],"names":[],"mappings":";AACA,OAAO,EACH,qBAAqB,GAGxB,MAAM,6BAA6B,CAAC;AAErC,OAAO,EAAE,YAAY,EAAE,MAAM,iCAAiC,CAAC;AAE/D,MAAM,CAAC,MAAM,wBAAwB,GAAG,CAAC,KAA2B,EAAE,EAAE,CAAC,CACrE,KAAC,qBAAqB,oBAAK,KAAK,IAAE,QAAQ,UAAG,CAChD,CAAC;AAcF,MAAM,UAAU,4BAA4B,CACxC,UAA+C,EAC/C,eAAsD;IAEtD,MAAM,IAAI,GACN,OAAO,eAAe,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,MAAM,EAAE,eAAe,EAAE,CAAC,CAAC,CAAC,eAAe,aAAf,eAAe,cAAf,eAAe,GAAI,EAAE,CAAC;IAC/F,MAAM,QAAQ,GAAqC,CAAC,EAChD,gBAAgB,EAChB,iBAAiB,EACjB,SAAS,EACT,UAAU,EACV,aAAa,GAChB,EAAE,EAAE;QACD,MAAM,aAAa,GAAkB,EAAE,CAAC;QAExC,IAAI,IAAI,CAAC,gBAAgB,EAAE;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