@redsift/table 11.5.0 → 11.6.0-muiv5-alpha.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (180) hide show
  1. package/_virtual/_commonjsHelpers.js +6 -0
  2. package/_virtual/_commonjsHelpers.js.map +1 -0
  3. package/_virtual/_rollupPluginBabelHelpers.js +93 -0
  4. package/_virtual/_rollupPluginBabelHelpers.js.map +1 -0
  5. package/_virtual/index.js +4 -0
  6. package/_virtual/index.js.map +1 -0
  7. package/_virtual/index2.js +4 -0
  8. package/_virtual/index2.js.map +1 -0
  9. package/_virtual/index3.js +4 -0
  10. package/_virtual/index3.js.map +1 -0
  11. package/_virtual/jsx-runtime.js +4 -0
  12. package/_virtual/jsx-runtime.js.map +1 -0
  13. package/_virtual/react-is.development.js +4 -0
  14. package/_virtual/react-is.development.js.map +1 -0
  15. package/_virtual/react-is.development2.js +4 -0
  16. package/_virtual/react-is.development2.js.map +1 -0
  17. package/_virtual/react-is.production.min.js +4 -0
  18. package/_virtual/react-is.production.min.js.map +1 -0
  19. package/_virtual/react-is.production.min2.js +4 -0
  20. package/_virtual/react-is.production.min2.js.map +1 -0
  21. package/_virtual/react-jsx-runtime.development.js +4 -0
  22. package/_virtual/react-jsx-runtime.development.js.map +1 -0
  23. package/_virtual/react-jsx-runtime.production.min.js +4 -0
  24. package/_virtual/react-jsx-runtime.production.min.js.map +1 -0
  25. package/components/BaseComponents/BaseButton.d.ts +5 -0
  26. package/components/BaseComponents/BaseButton.js +41 -0
  27. package/components/BaseComponents/BaseButton.js.map +1 -0
  28. package/components/BaseComponents/BaseCheckbox.d.ts +5 -0
  29. package/components/BaseComponents/BaseCheckbox.js +24 -0
  30. package/components/BaseComponents/BaseCheckbox.js.map +1 -0
  31. package/components/BaseComponents/BaseIcon.d.ts +7 -0
  32. package/components/BaseComponents/BaseIcon.js +33 -0
  33. package/components/BaseComponents/BaseIcon.js.map +1 -0
  34. package/components/BaseComponents/BasePopper.d.ts +5 -0
  35. package/components/BaseComponents/BasePopper.js +13 -0
  36. package/components/BaseComponents/BasePopper.js.map +1 -0
  37. package/components/BaseComponents/BaseTextField.d.ts +5 -0
  38. package/components/BaseComponents/BaseTextField.js +26 -0
  39. package/components/BaseComponents/BaseTextField.js.map +1 -0
  40. package/components/DataGrid/DataGrid.d.ts +6 -0
  41. package/components/DataGrid/DataGrid.js +340 -0
  42. package/components/DataGrid/DataGrid.js.map +1 -0
  43. package/components/DataGrid/styles.js +74 -0
  44. package/components/DataGrid/styles.js.map +1 -0
  45. package/components/DataGrid/types.d.ts +36 -0
  46. package/components/GridToolbarFilterSemanticField/GridToolbarFilterSemanticField.d.ts +15 -0
  47. package/components/GridToolbarFilterSemanticField/GridToolbarFilterSemanticField.js +183 -0
  48. package/components/GridToolbarFilterSemanticField/GridToolbarFilterSemanticField.js.map +1 -0
  49. package/components/GridToolbarFilterSemanticField/styles.js +20 -0
  50. package/components/GridToolbarFilterSemanticField/styles.js.map +1 -0
  51. package/components/GridToolbarFilterSemanticField/types.d.ts +39 -0
  52. package/components/Pagination/ControlledPagination.d.ts +21 -0
  53. package/components/Pagination/ControlledPagination.js +74 -0
  54. package/components/Pagination/ControlledPagination.js.map +1 -0
  55. package/components/Pagination/ServerSideControlledPagination.d.ts +23 -0
  56. package/components/Pagination/ServerSideControlledPagination.js +102 -0
  57. package/components/Pagination/ServerSideControlledPagination.js.map +1 -0
  58. package/components/StatefulDataGrid/StatefulDataGrid.d.ts +6 -0
  59. package/components/StatefulDataGrid/StatefulDataGrid.js +373 -0
  60. package/components/StatefulDataGrid/StatefulDataGrid.js.map +1 -0
  61. package/components/StatefulDataGrid/types.d.ts +16 -0
  62. package/components/TextCell/TextCell.d.ts +9 -0
  63. package/components/TextCell/TextCell.js +48 -0
  64. package/components/TextCell/TextCell.js.map +1 -0
  65. package/components/TextCell/styles.js +22 -0
  66. package/components/TextCell/styles.js.map +1 -0
  67. package/components/TextCell/types.d.ts +25 -0
  68. package/components/Toolbar/Toolbar.d.ts +20 -0
  69. package/components/Toolbar/Toolbar.js +72 -0
  70. package/components/Toolbar/Toolbar.js.map +1 -0
  71. package/components/Toolbar/styles.js +17 -0
  72. package/components/Toolbar/styles.js.map +1 -0
  73. package/components/Toolbar/types.d.ts +40 -0
  74. package/components/ToolbarWrapper/ToolbarWrapper.d.ts +25 -0
  75. package/components/ToolbarWrapper/ToolbarWrapper.js +60 -0
  76. package/components/ToolbarWrapper/ToolbarWrapper.js.map +1 -0
  77. package/hooks/useControlledDatagridState.js +109 -0
  78. package/hooks/useControlledDatagridState.js.map +1 -0
  79. package/hooks/useFetchState.js +34 -0
  80. package/hooks/useFetchState.js.map +1 -0
  81. package/hooks/useStatefulTable.d.ts +12 -0
  82. package/hooks/useStatefulTable.js +182 -0
  83. package/hooks/useStatefulTable.js.map +1 -0
  84. package/hooks/useTableStates.js +52 -0
  85. package/hooks/useTableStates.js.map +1 -0
  86. package/index.d.ts +40 -629
  87. package/index.js +36 -28267
  88. package/index.js.map +1 -1
  89. package/package.json +6 -6
  90. package/packages/design-system/src/components/theme/context.js +7 -0
  91. package/packages/design-system/src/components/theme/context.js.map +1 -0
  92. package/packages/popovers/src/components/tooltip/Tooltip.js +60 -0
  93. package/packages/popovers/src/components/tooltip/Tooltip.js.map +1 -0
  94. package/packages/popovers/src/components/tooltip/context.js +6 -0
  95. package/packages/popovers/src/components/tooltip/context.js.map +1 -0
  96. package/packages/popovers/src/components/tooltip/types.js +28 -0
  97. package/packages/popovers/src/components/tooltip/types.js.map +1 -0
  98. package/packages/popovers/src/components/tooltip/useTooltip.js +78 -0
  99. package/packages/popovers/src/components/tooltip/useTooltip.js.map +1 -0
  100. package/packages/popovers/src/components/tooltip/useTooltipContext.js +13 -0
  101. package/packages/popovers/src/components/tooltip/useTooltipContext.js.map +1 -0
  102. package/packages/popovers/src/components/tooltip-content/TooltipContent.js +79 -0
  103. package/packages/popovers/src/components/tooltip-content/TooltipContent.js.map +1 -0
  104. package/packages/popovers/src/components/tooltip-content/styles.js +127 -0
  105. package/packages/popovers/src/components/tooltip-content/styles.js.map +1 -0
  106. package/packages/popovers/src/components/tooltip-trigger/TooltipTrigger.js +47 -0
  107. package/packages/popovers/src/components/tooltip-trigger/TooltipTrigger.js.map +1 -0
  108. package/utils/columnTypes/index.d.ts +78 -0
  109. package/utils/columnTypes/index.js +49 -0
  110. package/utils/columnTypes/index.js.map +1 -0
  111. package/utils/columns/detailPanelToggleColDef.d.ts +5 -0
  112. package/utils/columns/detailPanelToggleColDef.js +8 -0
  113. package/utils/columns/detailPanelToggleColDef.js.map +1 -0
  114. package/utils/fields/InputNumberInterval.js +85 -0
  115. package/utils/fields/InputNumberInterval.js.map +1 -0
  116. package/utils/gpt.d.ts +3 -0
  117. package/utils/gpt.js +33 -0
  118. package/utils/gpt.js.map +1 -0
  119. package/utils/localStorage.d.ts +17 -0
  120. package/utils/localStorage.js +59 -0
  121. package/utils/localStorage.js.map +1 -0
  122. package/utils/operators/index.d.ts +68 -0
  123. package/utils/operators/index.js +52 -0
  124. package/utils/operators/index.js.map +1 -0
  125. package/utils/operators/numeric/getGridNumericOperators.d.ts +5 -0
  126. package/utils/operators/numeric/getGridNumericOperators.js +7 -0
  127. package/utils/operators/numeric/getGridNumericOperators.js.map +1 -0
  128. package/utils/operators/numeric/isBetween.d.ts +10 -0
  129. package/utils/operators/numeric/isBetween.js +28 -0
  130. package/utils/operators/numeric/isBetween.js.map +1 -0
  131. package/utils/operators/string/doesNotContain.d.ts +10 -0
  132. package/utils/operators/string/doesNotContain.js +25 -0
  133. package/utils/operators/string/doesNotContain.js.map +1 -0
  134. package/utils/operators/string/doesNotEqual.d.ts +10 -0
  135. package/utils/operators/string/doesNotEqual.js +25 -0
  136. package/utils/operators/string/doesNotEqual.js.map +1 -0
  137. package/utils/operators/string/doesNotHave.d.ts +16 -0
  138. package/utils/operators/string/doesNotHave.js +24 -0
  139. package/utils/operators/string/doesNotHave.js.map +1 -0
  140. package/utils/operators/string/getGridStringOperators.d.ts +5 -0
  141. package/utils/operators/string/getGridStringOperators.js +9 -0
  142. package/utils/operators/string/getGridStringOperators.js.map +1 -0
  143. package/utils/operators/string/has.d.ts +16 -0
  144. package/utils/operators/string/has.js +24 -0
  145. package/utils/operators/string/has.js.map +1 -0
  146. package/utils/operators/string/hasOnly.d.ts +16 -0
  147. package/utils/operators/string/hasOnly.js +24 -0
  148. package/utils/operators/string/hasOnly.js.map +1 -0
  149. package/utils/operators/string/is.d.ts +16 -0
  150. package/utils/operators/string/is.js +26 -0
  151. package/utils/operators/string/is.js.map +1 -0
  152. package/utils/operators/string/isNot.d.ts +16 -0
  153. package/utils/operators/string/isNot.js +26 -0
  154. package/utils/operators/string/isNot.js.map +1 -0
  155. package/utils/operators/string-array/containsAnyOf.d.ts +16 -0
  156. package/utils/operators/string-array/containsAnyOf.js +56 -0
  157. package/utils/operators/string-array/containsAnyOf.js.map +1 -0
  158. package/utils/operators/string-array/doesNotHaveAnyOf.js +26 -0
  159. package/utils/operators/string-array/doesNotHaveAnyOf.js.map +1 -0
  160. package/utils/operators/string-array/endsWithAnyOf.d.ts +10 -0
  161. package/utils/operators/string-array/endsWithAnyOf.js +31 -0
  162. package/utils/operators/string-array/endsWithAnyOf.js.map +1 -0
  163. package/utils/operators/string-array/getGridStringArrayOperators.d.ts +7 -0
  164. package/utils/operators/string-array/getGridStringArrayOperators.js +19 -0
  165. package/utils/operators/string-array/getGridStringArrayOperators.js.map +1 -0
  166. package/utils/operators/string-array/hasAnyOf.d.ts +16 -0
  167. package/utils/operators/string-array/hasAnyOf.js +28 -0
  168. package/utils/operators/string-array/hasAnyOf.js.map +1 -0
  169. package/utils/operators/string-array/isAnyOf.d.ts +16 -0
  170. package/utils/operators/string-array/isAnyOf.js +32 -0
  171. package/utils/operators/string-array/isAnyOf.js.map +1 -0
  172. package/utils/operators/string-array/isNotAnyOf.d.ts +10 -0
  173. package/utils/operators/string-array/isNotAnyOf.js +28 -0
  174. package/utils/operators/string-array/isNotAnyOf.js.map +1 -0
  175. package/utils/operators/string-array/startsWithAnyOf.d.ts +10 -0
  176. package/utils/operators/string-array/startsWithAnyOf.js +31 -0
  177. package/utils/operators/string-array/startsWithAnyOf.js.map +1 -0
  178. package/utils/urlLocalStorageSync.d.ts +73 -0
  179. package/utils/urlLocalStorageSync.js +756 -0
  180. package/utils/urlLocalStorageSync.js.map +1 -0
@@ -0,0 +1,78 @@
1
+ import * as _mui_x_data_grid_components_panel_filterPanel_GridFilterInputMultipleSingleSelect from '@mui/x-data-grid/components/panel/filterPanel/GridFilterInputMultipleSingleSelect';
2
+ import * as _mui_x_data_grid_components_panel_filterPanel_GridFilterInputMultipleValue from '@mui/x-data-grid/components/panel/filterPanel/GridFilterInputMultipleValue';
3
+ import * as _mui_x_data_grid_components_panel_filterPanel_GridFilterInputSingleSelect from '@mui/x-data-grid/components/panel/filterPanel/GridFilterInputSingleSelect';
4
+ import * as _mui_x_data_grid_pro from '@mui/x-data-grid-pro';
5
+ import { GridNativeColTypes, GridColumnTypesRecord } from '@mui/x-data-grid-pro';
6
+
7
+ declare const getRsStringColumnType: () => {
8
+ extendType: GridNativeColTypes;
9
+ filterOperators: _mui_x_data_grid_pro.GridFilterOperator<any, string | number | null, any>[];
10
+ };
11
+ declare const getRsNumberColumnType: () => {
12
+ extendType: GridNativeColTypes;
13
+ filterOperators: _mui_x_data_grid_pro.GridFilterOperator<any, string | number | null, any>[];
14
+ };
15
+ declare const getRsSingleSelectColumnType: () => {
16
+ extendType: GridNativeColTypes;
17
+ filterOperators: ({
18
+ InputComponent: typeof _mui_x_data_grid_components_panel_filterPanel_GridFilterInputSingleSelect.GridFilterInputSingleSelect;
19
+ label: string;
20
+ value: string;
21
+ getApplyFilterFn: (filterItem: _mui_x_data_grid_pro.GridFilterItem) => ((params: _mui_x_data_grid_pro.GridCellParams<any, any, any>) => boolean) | null;
22
+ } | {
23
+ label: string;
24
+ value: string;
25
+ getApplyFilterFn: (filterItem: _mui_x_data_grid_pro.GridFilterItem) => ((params: _mui_x_data_grid_pro.GridCellParams<any, any, any>) => boolean) | null;
26
+ InputComponent: typeof _mui_x_data_grid_components_panel_filterPanel_GridFilterInputMultipleValue.GridFilterInputMultipleValue;
27
+ } | {
28
+ InputComponent: typeof _mui_x_data_grid_components_panel_filterPanel_GridFilterInputMultipleSingleSelect.GridFilterInputMultipleSingleSelect;
29
+ label: string;
30
+ value: string;
31
+ getApplyFilterFn: (filterItem: _mui_x_data_grid_pro.GridFilterItem) => ((params: _mui_x_data_grid_pro.GridCellParams<any, any, any>) => boolean) | null;
32
+ })[];
33
+ };
34
+ declare const getRsSingleSelectWithShortOperatorListColumnType: () => {
35
+ extendType: GridNativeColTypes;
36
+ filterOperators: ({
37
+ InputComponent: typeof _mui_x_data_grid_components_panel_filterPanel_GridFilterInputSingleSelect.GridFilterInputSingleSelect;
38
+ label: string;
39
+ value: string;
40
+ getApplyFilterFn: (filterItem: _mui_x_data_grid_pro.GridFilterItem) => ((params: _mui_x_data_grid_pro.GridCellParams<any, any, any>) => boolean) | null;
41
+ } | {
42
+ InputComponent: typeof _mui_x_data_grid_components_panel_filterPanel_GridFilterInputMultipleSingleSelect.GridFilterInputMultipleSingleSelect;
43
+ label: string;
44
+ value: string;
45
+ getApplyFilterFn: (filterItem: _mui_x_data_grid_pro.GridFilterItem) => ((params: _mui_x_data_grid_pro.GridCellParams<any, any, any>) => boolean) | null;
46
+ })[];
47
+ };
48
+ declare const getRsMultipleSelectColumnType: () => {
49
+ extendType: GridNativeColTypes;
50
+ filterOperators: ({
51
+ InputComponent: typeof _mui_x_data_grid_components_panel_filterPanel_GridFilterInputSingleSelect.GridFilterInputSingleSelect;
52
+ label: string;
53
+ value: string;
54
+ getApplyFilterFn: (filterItem: _mui_x_data_grid_pro.GridFilterItem) => ((params: _mui_x_data_grid_pro.GridCellParams<any, any, any>) => boolean) | null;
55
+ } | {
56
+ InputComponent: typeof _mui_x_data_grid_components_panel_filterPanel_GridFilterInputMultipleSingleSelect.GridFilterInputMultipleSingleSelect;
57
+ label: string;
58
+ value: string;
59
+ getApplyFilterFn: (filterItem: _mui_x_data_grid_pro.GridFilterItem) => ((params: _mui_x_data_grid_pro.GridCellParams<any, any, any>) => boolean) | null;
60
+ })[];
61
+ };
62
+ declare const getRsMultipleSelectWithShortOperatorListColumnType: () => {
63
+ extendType: GridNativeColTypes;
64
+ filterOperators: ({
65
+ InputComponent: typeof _mui_x_data_grid_components_panel_filterPanel_GridFilterInputSingleSelect.GridFilterInputSingleSelect;
66
+ label: string;
67
+ value: string;
68
+ getApplyFilterFn: (filterItem: _mui_x_data_grid_pro.GridFilterItem) => ((params: _mui_x_data_grid_pro.GridCellParams<any, any, any>) => boolean) | null;
69
+ } | {
70
+ InputComponent: typeof _mui_x_data_grid_components_panel_filterPanel_GridFilterInputMultipleSingleSelect.GridFilterInputMultipleSingleSelect;
71
+ label: string;
72
+ value: string;
73
+ getApplyFilterFn: (filterItem: _mui_x_data_grid_pro.GridFilterItem) => ((params: _mui_x_data_grid_pro.GridCellParams<any, any, any>) => boolean) | null;
74
+ })[];
75
+ };
76
+ declare const customColumnTypes: GridColumnTypesRecord;
77
+
78
+ export { customColumnTypes, getRsMultipleSelectColumnType, getRsMultipleSelectWithShortOperatorListColumnType, getRsNumberColumnType, getRsSingleSelectColumnType, getRsSingleSelectWithShortOperatorListColumnType, getRsStringColumnType };
@@ -0,0 +1,49 @@
1
+ import { operatorList } from '../operators/index.js';
2
+
3
+ const getRsStringColumnType = () => {
4
+ return {
5
+ extendType: 'string',
6
+ filterOperators: operatorList.rsString
7
+ };
8
+ };
9
+ const getRsNumberColumnType = () => {
10
+ return {
11
+ extendType: 'number',
12
+ filterOperators: operatorList.rsNumber
13
+ };
14
+ };
15
+ const getRsSingleSelectColumnType = () => {
16
+ return {
17
+ extendType: 'singleSelect',
18
+ filterOperators: operatorList.rsSingleSelect
19
+ };
20
+ };
21
+ const getRsSingleSelectWithShortOperatorListColumnType = () => {
22
+ return {
23
+ extendType: 'singleSelect',
24
+ filterOperators: operatorList.rsSingleSelectWithShortOperatorList
25
+ };
26
+ };
27
+ const getRsMultipleSelectColumnType = () => {
28
+ return {
29
+ extendType: 'singleSelect',
30
+ filterOperators: operatorList.rsMultipleSelect
31
+ };
32
+ };
33
+ const getRsMultipleSelectWithShortOperatorListColumnType = () => {
34
+ return {
35
+ extendType: 'singleSelect',
36
+ filterOperators: operatorList.rsMultipleSelectWithShortOperatorList
37
+ };
38
+ };
39
+ const customColumnTypes = {
40
+ rsString: getRsStringColumnType(),
41
+ rsNumber: getRsNumberColumnType(),
42
+ rsSingleSelect: getRsSingleSelectColumnType(),
43
+ rsSingleSelectWithShortOperatorList: getRsSingleSelectWithShortOperatorListColumnType(),
44
+ rsMultipleSelect: getRsMultipleSelectColumnType(),
45
+ rsMultipleSelectWithShortOperatorList: getRsMultipleSelectWithShortOperatorListColumnType()
46
+ };
47
+
48
+ export { customColumnTypes, getRsMultipleSelectColumnType, getRsMultipleSelectWithShortOperatorListColumnType, getRsNumberColumnType, getRsSingleSelectColumnType, getRsSingleSelectWithShortOperatorListColumnType, getRsStringColumnType };
49
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sources":["../../../src/utils/columnTypes/index.ts"],"sourcesContent":["import { GridColumnTypesRecord, GridNativeColTypes } from '@mui/x-data-grid-pro';\nimport { operatorList } from '../operators';\n\nexport const getRsStringColumnType = () => {\n return {\n extendType: 'string' as GridNativeColTypes,\n filterOperators: operatorList.rsString,\n };\n};\n\nexport const getRsNumberColumnType = () => {\n return {\n extendType: 'number' as GridNativeColTypes,\n filterOperators: operatorList.rsNumber,\n };\n};\n\nexport const getRsSingleSelectColumnType = () => {\n return {\n extendType: 'singleSelect' as GridNativeColTypes,\n filterOperators: operatorList.rsSingleSelect,\n };\n};\n\nexport const getRsSingleSelectWithShortOperatorListColumnType = () => {\n return {\n extendType: 'singleSelect' as GridNativeColTypes,\n filterOperators: operatorList.rsSingleSelectWithShortOperatorList,\n };\n};\n\nexport const getRsMultipleSelectColumnType = () => {\n return {\n extendType: 'singleSelect' as GridNativeColTypes,\n filterOperators: operatorList.rsMultipleSelect,\n };\n};\n\nexport const getRsMultipleSelectWithShortOperatorListColumnType = () => {\n return {\n extendType: 'singleSelect' as GridNativeColTypes,\n filterOperators: operatorList.rsMultipleSelectWithShortOperatorList,\n };\n};\n\nexport const customColumnTypes: GridColumnTypesRecord = {\n rsString: getRsStringColumnType(),\n rsNumber: getRsNumberColumnType(),\n rsSingleSelect: getRsSingleSelectColumnType(),\n rsSingleSelectWithShortOperatorList: getRsSingleSelectWithShortOperatorListColumnType(),\n rsMultipleSelect: getRsMultipleSelectColumnType(),\n rsMultipleSelectWithShortOperatorList: getRsMultipleSelectWithShortOperatorListColumnType(),\n};\n"],"names":["getRsStringColumnType","extendType","filterOperators","operatorList","rsString","getRsNumberColumnType","rsNumber","getRsSingleSelectColumnType","rsSingleSelect","getRsSingleSelectWithShortOperatorListColumnType","rsSingleSelectWithShortOperatorList","getRsMultipleSelectColumnType","rsMultipleSelect","getRsMultipleSelectWithShortOperatorListColumnType","rsMultipleSelectWithShortOperatorList","customColumnTypes"],"mappings":";;AAGaA,MAAAA,qBAAqB,GAAGA,MAAM;EACzC,OAAO;AACLC,IAAAA,UAAU,EAAE,QAA8B;IAC1CC,eAAe,EAAEC,YAAY,CAACC,QAAAA;GAC/B,CAAA;AACH,EAAC;AAEYC,MAAAA,qBAAqB,GAAGA,MAAM;EACzC,OAAO;AACLJ,IAAAA,UAAU,EAAE,QAA8B;IAC1CC,eAAe,EAAEC,YAAY,CAACG,QAAAA;GAC/B,CAAA;AACH,EAAC;AAEYC,MAAAA,2BAA2B,GAAGA,MAAM;EAC/C,OAAO;AACLN,IAAAA,UAAU,EAAE,cAAoC;IAChDC,eAAe,EAAEC,YAAY,CAACK,cAAAA;GAC/B,CAAA;AACH,EAAC;AAEYC,MAAAA,gDAAgD,GAAGA,MAAM;EACpE,OAAO;AACLR,IAAAA,UAAU,EAAE,cAAoC;IAChDC,eAAe,EAAEC,YAAY,CAACO,mCAAAA;GAC/B,CAAA;AACH,EAAC;AAEYC,MAAAA,6BAA6B,GAAGA,MAAM;EACjD,OAAO;AACLV,IAAAA,UAAU,EAAE,cAAoC;IAChDC,eAAe,EAAEC,YAAY,CAACS,gBAAAA;GAC/B,CAAA;AACH,EAAC;AAEYC,MAAAA,kDAAkD,GAAGA,MAAM;EACtE,OAAO;AACLZ,IAAAA,UAAU,EAAE,cAAoC;IAChDC,eAAe,EAAEC,YAAY,CAACW,qCAAAA;GAC/B,CAAA;AACH,EAAC;AAEM,MAAMC,iBAAwC,GAAG;EACtDX,QAAQ,EAAEJ,qBAAqB,EAAE;EACjCM,QAAQ,EAAED,qBAAqB,EAAE;EACjCG,cAAc,EAAED,2BAA2B,EAAE;EAC7CG,mCAAmC,EAAED,gDAAgD,EAAE;EACvFG,gBAAgB,EAAED,6BAA6B,EAAE;EACjDG,qCAAqC,EAAED,kDAAkD,EAAC;AAC5F;;;;"}
@@ -0,0 +1,5 @@
1
+ import * as _mui_x_data_grid_pro from '@mui/x-data-grid-pro';
2
+
3
+ declare const DETAIL_PANEL_TOGGLE_COL_DEF: _mui_x_data_grid_pro.GridColDef<any, any, any>;
4
+
5
+ export { DETAIL_PANEL_TOGGLE_COL_DEF };
@@ -0,0 +1,8 @@
1
+ import { GRID_DETAIL_PANEL_TOGGLE_COL_DEF } from '@mui/x-data-grid-pro';
2
+
3
+ // Don't use a spread operator there or it will break the build due to MUI internal components
4
+ const DETAIL_PANEL_TOGGLE_COL_DEF = GRID_DETAIL_PANEL_TOGGLE_COL_DEF;
5
+ DETAIL_PANEL_TOGGLE_COL_DEF.type = 'actions';
6
+
7
+ export { DETAIL_PANEL_TOGGLE_COL_DEF };
8
+ //# sourceMappingURL=detailPanelToggleColDef.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"detailPanelToggleColDef.js","sources":["../../../src/utils/columns/detailPanelToggleColDef.ts"],"sourcesContent":["import { GRID_DETAIL_PANEL_TOGGLE_COL_DEF } from '@mui/x-data-grid-pro';\n\n// Don't use a spread operator there or it will break the build due to MUI internal components\nconst DETAIL_PANEL_TOGGLE_COL_DEF = GRID_DETAIL_PANEL_TOGGLE_COL_DEF;\nDETAIL_PANEL_TOGGLE_COL_DEF.type = 'actions';\n\nexport { DETAIL_PANEL_TOGGLE_COL_DEF };\n"],"names":["DETAIL_PANEL_TOGGLE_COL_DEF","GRID_DETAIL_PANEL_TOGGLE_COL_DEF","type"],"mappings":";;AAEA;AACMA,MAAAA,2BAA2B,GAAGC,iCAAgC;AACpED,2BAA2B,CAACE,IAAI,GAAG,SAAS;;;;"}
@@ -0,0 +1,85 @@
1
+ import { objectSpread2 as _objectSpread2 } from '../../_virtual/_rollupPluginBabelHelpers.js';
2
+ import * as React from 'react';
3
+ import { Icon } from '@redsift/design-system';
4
+ import { mdiSync } from '@redsift/icons';
5
+ import Box from '../../node_modules/@mui/material/Box/Box.js';
6
+ import TextField from '../../node_modules/@mui/material/TextField/TextField.js';
7
+
8
+ const SUBMIT_FILTER_STROKE_TIME = 500;
9
+ const InputNumberInterval = props => {
10
+ var _item$value;
11
+ const {
12
+ item,
13
+ applyValue,
14
+ focusElementRef = null
15
+ } = props;
16
+ const filterTimeout = React.useRef();
17
+ const [filterValueState, setFilterValueState] = React.useState((_item$value = item.value) !== null && _item$value !== void 0 ? _item$value : '');
18
+ const [applying, setIsApplying] = React.useState(false);
19
+ React.useEffect(() => {
20
+ return () => {
21
+ clearTimeout(filterTimeout.current);
22
+ };
23
+ }, []);
24
+ React.useEffect(() => {
25
+ var _item$value2;
26
+ const itemValue = (_item$value2 = item.value) !== null && _item$value2 !== void 0 ? _item$value2 : [undefined, undefined];
27
+ setFilterValueState(itemValue);
28
+ }, [item.value]);
29
+ const updateFilterValue = (lowerBound, upperBound) => {
30
+ clearTimeout(filterTimeout.current);
31
+ setFilterValueState([lowerBound, upperBound]);
32
+ setIsApplying(true);
33
+ filterTimeout.current = setTimeout(() => {
34
+ setIsApplying(false);
35
+ applyValue(_objectSpread2(_objectSpread2({}, item), {}, {
36
+ value: [lowerBound, upperBound]
37
+ }));
38
+ }, SUBMIT_FILTER_STROKE_TIME);
39
+ };
40
+ const handleUpperFilterChange = event => {
41
+ const newUpperBound = event.target.value;
42
+ updateFilterValue(filterValueState[0], newUpperBound);
43
+ };
44
+ const handleLowerFilterChange = event => {
45
+ const newLowerBound = event.target.value;
46
+ updateFilterValue(newLowerBound, filterValueState[1]);
47
+ };
48
+ return /*#__PURE__*/React.createElement(Box, {
49
+ sx: {
50
+ display: 'inline-flex',
51
+ flexDirection: 'row',
52
+ alignItems: 'end',
53
+ height: 48,
54
+ pl: '20px'
55
+ }
56
+ }, /*#__PURE__*/React.createElement(TextField, {
57
+ name: "lower-bound-input",
58
+ placeholder: "From",
59
+ label: "From",
60
+ variant: "standard",
61
+ value: Number(filterValueState[0]),
62
+ onChange: handleLowerFilterChange,
63
+ type: "number",
64
+ inputRef: focusElementRef,
65
+ sx: {
66
+ mr: 2
67
+ }
68
+ }), /*#__PURE__*/React.createElement(TextField, {
69
+ name: "upper-bound-input",
70
+ placeholder: "To",
71
+ label: "To",
72
+ variant: "standard",
73
+ value: Number(filterValueState[1]),
74
+ onChange: handleUpperFilterChange,
75
+ type: "number",
76
+ InputProps: applying ? {
77
+ endAdornment: /*#__PURE__*/React.createElement(Icon, {
78
+ icon: mdiSync
79
+ })
80
+ } : {}
81
+ }));
82
+ };
83
+
84
+ export { InputNumberInterval };
85
+ //# sourceMappingURL=InputNumberInterval.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"InputNumberInterval.js","sources":["../../../src/utils/fields/InputNumberInterval.tsx"],"sourcesContent":["import * as React from 'react';\nimport Box from '@mui/material/Box';\nimport TextField, { TextFieldProps } from '@mui/material/TextField';\nimport { Icon } from '@redsift/design-system';\nimport { mdiSync } from '@redsift/icons';\n\nconst SUBMIT_FILTER_STROKE_TIME = 500;\n\nexport const InputNumberInterval = (props: any) => {\n const { item, applyValue, focusElementRef = null } = props;\n\n const filterTimeout = React.useRef<any>();\n const [filterValueState, setFilterValueState] = React.useState<\n [string, string]\n >(item.value ?? '');\n const [applying, setIsApplying] = React.useState(false);\n\n React.useEffect(() => {\n return () => {\n clearTimeout(filterTimeout.current);\n };\n }, []);\n\n React.useEffect(() => {\n const itemValue = item.value ?? [undefined, undefined];\n setFilterValueState(itemValue);\n }, [item.value]);\n\n const updateFilterValue = (lowerBound: string, upperBound: string) => {\n clearTimeout(filterTimeout.current);\n setFilterValueState([lowerBound, upperBound]);\n\n setIsApplying(true);\n filterTimeout.current = setTimeout(() => {\n setIsApplying(false);\n applyValue({ ...item, value: [lowerBound, upperBound] });\n }, SUBMIT_FILTER_STROKE_TIME);\n };\n\n const handleUpperFilterChange: TextFieldProps['onChange'] = (event) => {\n const newUpperBound = event.target.value;\n updateFilterValue(filterValueState[0], newUpperBound);\n };\n const handleLowerFilterChange: TextFieldProps['onChange'] = (event) => {\n const newLowerBound = event.target.value;\n updateFilterValue(newLowerBound, filterValueState[1]);\n };\n\n return (\n <Box\n sx={{\n display: 'inline-flex',\n flexDirection: 'row',\n alignItems: 'end',\n height: 48,\n pl: '20px',\n }}\n >\n <TextField\n name=\"lower-bound-input\"\n placeholder=\"From\"\n label=\"From\"\n variant=\"standard\"\n value={Number(filterValueState[0])}\n onChange={handleLowerFilterChange}\n type=\"number\"\n inputRef={focusElementRef}\n sx={{ mr: 2 }}\n />\n <TextField\n name=\"upper-bound-input\"\n placeholder=\"To\"\n label=\"To\"\n variant=\"standard\"\n value={Number(filterValueState[1])}\n onChange={handleUpperFilterChange}\n type=\"number\"\n InputProps={applying ? { endAdornment: <Icon icon={mdiSync} /> } : {}}\n />\n </Box>\n );\n};\n"],"names":["SUBMIT_FILTER_STROKE_TIME","InputNumberInterval","props","_item$value","item","applyValue","focusElementRef","filterTimeout","React","useRef","filterValueState","setFilterValueState","useState","value","applying","setIsApplying","useEffect","clearTimeout","current","_item$value2","itemValue","undefined","updateFilterValue","lowerBound","upperBound","setTimeout","_objectSpread","handleUpperFilterChange","event","newUpperBound","target","handleLowerFilterChange","newLowerBound","createElement","Box","sx","display","flexDirection","alignItems","height","pl","TextField","name","placeholder","label","variant","Number","onChange","type","inputRef","mr","InputProps","endAdornment","Icon","icon","mdiSync"],"mappings":"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"}
package/utils/gpt.d.ts ADDED
@@ -0,0 +1,3 @@
1
+ declare function getCompletion(text: string, role: string, openai_api_key: string | undefined, model?: string): Promise<string>;
2
+
3
+ export { getCompletion };
package/utils/gpt.js ADDED
@@ -0,0 +1,33 @@
1
+ const API_URL = 'https://api.openai.com/v1/chat/completions';
2
+ async function getCompletion(text, role, openai_api_key) {
3
+ let model = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 'gpt-3.5-turbo-0613';
4
+ try {
5
+ const messages = [{
6
+ role: 'system',
7
+ content: role
8
+ }, {
9
+ role: 'user',
10
+ content: text
11
+ }];
12
+ const url = API_URL;
13
+ const response = await fetch(url, {
14
+ method: 'POST',
15
+ headers: {
16
+ 'Content-Type': 'application/json',
17
+ Authorization: `Bearer ${openai_api_key}`
18
+ },
19
+ body: JSON.stringify({
20
+ messages: messages,
21
+ temperature: 0,
22
+ model: model
23
+ })
24
+ });
25
+ const data = await response.json();
26
+ return data.choices[0].message.content;
27
+ } catch (error) {
28
+ return '';
29
+ }
30
+ }
31
+
32
+ export { getCompletion };
33
+ //# sourceMappingURL=gpt.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"gpt.js","sources":["../../src/utils/gpt.ts"],"sourcesContent":["const API_URL = 'https://api.openai.com/v1/chat/completions';\n\ninterface Message {\n role: string;\n content: string;\n}\n\nexport async function getCompletion(\n text: string,\n role: string,\n openai_api_key: string | undefined,\n model: string = 'gpt-3.5-turbo-0613',\n): Promise<string> {\n try {\n const messages: Message[] = [\n { role: 'system', content: role },\n { role: 'user', content: text },\n ];\n\n const url = API_URL;\n const response = await fetch(url, {\n method: 'POST',\n headers: {\n 'Content-Type': 'application/json',\n Authorization: `Bearer ${openai_api_key}`,\n },\n body: JSON.stringify({\n messages: messages,\n temperature: 0,\n model: model,\n }),\n });\n\n const data = await response.json();\n\n return data.choices[0].message.content;\n } catch (error) {\n return '';\n }\n}\n"],"names":["API_URL","getCompletion","text","role","openai_api_key","model","arguments","length","undefined","messages","content","url","response","fetch","method","headers","Authorization","body","JSON","stringify","temperature","data","json","choices","message","error"],"mappings":"AAAA,MAAMA,OAAO,GAAG,4CAA4C,CAAA;AAOrD,eAAeC,aAAaA,CACjCC,IAAY,EACZC,IAAY,EACZC,cAAkC,EAEjB;AAAA,EAAA,IADjBC,KAAa,GAAAC,SAAA,CAAAC,MAAA,GAAA,CAAA,IAAAD,SAAA,CAAA,CAAA,CAAA,KAAAE,SAAA,GAAAF,SAAA,CAAA,CAAA,CAAA,GAAG,oBAAoB,CAAA;EAEpC,IAAI;IACF,MAAMG,QAAmB,GAAG,CAC1B;AAAEN,MAAAA,IAAI,EAAE,QAAQ;AAAEO,MAAAA,OAAO,EAAEP,IAAAA;AAAK,KAAC,EACjC;AAAEA,MAAAA,IAAI,EAAE,MAAM;AAAEO,MAAAA,OAAO,EAAER,IAAAA;AAAK,KAAC,CAChC,CAAA;IAED,MAAMS,GAAG,GAAGX,OAAO,CAAA;AACnB,IAAA,MAAMY,QAAQ,GAAG,MAAMC,KAAK,CAACF,GAAG,EAAE;AAChCG,MAAAA,MAAM,EAAE,MAAM;AACdC,MAAAA,OAAO,EAAE;AACP,QAAA,cAAc,EAAE,kBAAkB;QAClCC,aAAa,EAAG,UAASZ,cAAe,CAAA,CAAA;OACzC;AACDa,MAAAA,IAAI,EAAEC,IAAI,CAACC,SAAS,CAAC;AACnBV,QAAAA,QAAQ,EAAEA,QAAQ;AAClBW,QAAAA,WAAW,EAAE,CAAC;AACdf,QAAAA,KAAK,EAAEA,KAAAA;OACR,CAAA;AACH,KAAC,CAAC,CAAA;AAEF,IAAA,MAAMgB,IAAI,GAAG,MAAMT,QAAQ,CAACU,IAAI,EAAE,CAAA;IAElC,OAAOD,IAAI,CAACE,OAAO,CAAC,CAAC,CAAC,CAACC,OAAO,CAACd,OAAO,CAAA;GACvC,CAAC,OAAOe,KAAK,EAAE;AACd,IAAA,OAAO,EAAE,CAAA;AACX,GAAA;AACF;;;;"}
@@ -0,0 +1,17 @@
1
+ declare const PAGINATION_MODEL_KEY = "paginationModel";
2
+ declare const FILTER_MODEL_KEY = "filterModel";
3
+ declare const SORT_MODEL_KEY = "sortModel";
4
+ declare const VISIBILITY_MODEL_KEY = "visibilityModel";
5
+ declare const PINNED_COLUMNS = "pinnedColumns";
6
+ declare const DIMENSION_MODEL_KEY = "dimension";
7
+ declare const FILTER_SEARCH_KEY = "searchModel";
8
+ declare const CATEGORIES: readonly ["paginationModel", "filterModel", "sortModel", "visibilityModel", "dimension", "searchModel", "pinnedColumns"];
9
+ type Category = (typeof CATEGORIES)[number];
10
+ declare const buildStorageKey: ({ id, version, category }: {
11
+ id: string;
12
+ version: number;
13
+ category: Category;
14
+ }) => `${string}:${number}:paginationModel` | `${string}:${number}:filterModel` | `${string}:${number}:sortModel` | `${string}:${number}:visibilityModel` | `${string}:${number}:pinnedColumns` | `${string}:${number}:dimension` | `${string}:${number}:searchModel`;
15
+ declare const clearPreviousVersionStorage: (id: string, previousLocalStorageVersions: number[]) => void;
16
+
17
+ export { CATEGORIES, Category, DIMENSION_MODEL_KEY, FILTER_MODEL_KEY, FILTER_SEARCH_KEY, PAGINATION_MODEL_KEY, PINNED_COLUMNS, SORT_MODEL_KEY, VISIBILITY_MODEL_KEY, buildStorageKey, clearPreviousVersionStorage };
@@ -0,0 +1,59 @@
1
+ const PAGINATION_MODEL_KEY = 'paginationModel';
2
+ const FILTER_MODEL_KEY = 'filterModel';
3
+ const SORT_MODEL_KEY = 'sortModel';
4
+ const VISIBILITY_MODEL_KEY = 'visibilityModel';
5
+ const PINNED_COLUMNS = 'pinnedColumns';
6
+ const DIMENSION_MODEL_KEY = 'dimension';
7
+ const FILTER_SEARCH_KEY = 'searchModel';
8
+ const CATEGORIES = [PAGINATION_MODEL_KEY, FILTER_MODEL_KEY, SORT_MODEL_KEY, VISIBILITY_MODEL_KEY, DIMENSION_MODEL_KEY, FILTER_SEARCH_KEY, PINNED_COLUMNS];
9
+ const buildStorageKey = _ref => {
10
+ let {
11
+ id,
12
+ version,
13
+ category
14
+ } = _ref;
15
+ return `${id}:${version}:${category}`;
16
+ };
17
+ const clearPreviousVersionStorage = (id, previousLocalStorageVersions) => {
18
+ for (const version of previousLocalStorageVersions) {
19
+ const keysToDelete = [buildStorageKey({
20
+ id,
21
+ version,
22
+ category: PAGINATION_MODEL_KEY
23
+ }), buildStorageKey({
24
+ id,
25
+ version,
26
+ category: SORT_MODEL_KEY
27
+ }), buildStorageKey({
28
+ id,
29
+ version,
30
+ category: FILTER_MODEL_KEY
31
+ }), buildStorageKey({
32
+ id,
33
+ version,
34
+ category: VISIBILITY_MODEL_KEY
35
+ }), buildStorageKey({
36
+ id,
37
+ version,
38
+ category: PINNED_COLUMNS
39
+ }), buildStorageKey({
40
+ id,
41
+ version,
42
+ category: FILTER_SEARCH_KEY
43
+ }), buildStorageKey({
44
+ id,
45
+ version,
46
+ category: DIMENSION_MODEL_KEY
47
+ })];
48
+ for (const keyToDelete of keysToDelete) {
49
+ try {
50
+ window.localStorage.removeItem(keyToDelete);
51
+ } catch (e) {
52
+ // Ignore
53
+ }
54
+ }
55
+ }
56
+ };
57
+
58
+ export { CATEGORIES, DIMENSION_MODEL_KEY, FILTER_MODEL_KEY, FILTER_SEARCH_KEY, PAGINATION_MODEL_KEY, PINNED_COLUMNS, SORT_MODEL_KEY, VISIBILITY_MODEL_KEY, buildStorageKey, clearPreviousVersionStorage };
59
+ //# sourceMappingURL=localStorage.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"localStorage.js","sources":["../../src/utils/localStorage.ts"],"sourcesContent":["export const PAGINATION_MODEL_KEY = 'paginationModel';\nexport const FILTER_MODEL_KEY = 'filterModel';\nexport const SORT_MODEL_KEY = 'sortModel';\nexport const VISIBILITY_MODEL_KEY = 'visibilityModel';\nexport const PINNED_COLUMNS = 'pinnedColumns';\nexport const DIMENSION_MODEL_KEY = 'dimension';\nexport const FILTER_SEARCH_KEY = 'searchModel';\nexport const CATEGORIES = [\n PAGINATION_MODEL_KEY,\n FILTER_MODEL_KEY,\n SORT_MODEL_KEY,\n VISIBILITY_MODEL_KEY,\n DIMENSION_MODEL_KEY,\n FILTER_SEARCH_KEY,\n PINNED_COLUMNS,\n] as const;\n\nexport type Category = (typeof CATEGORIES)[number];\n\nexport const buildStorageKey = ({ id, version, category }: { id: string; version: number; category: Category }) => {\n return `${id}:${version}:${category}` as const;\n};\n\nexport const clearPreviousVersionStorage = (id: string, previousLocalStorageVersions: number[]): void => {\n for (const version of previousLocalStorageVersions) {\n const keysToDelete = [\n buildStorageKey({\n id,\n version,\n category: PAGINATION_MODEL_KEY,\n }),\n buildStorageKey({ id, version, category: SORT_MODEL_KEY }),\n buildStorageKey({\n id,\n version,\n category: FILTER_MODEL_KEY,\n }),\n buildStorageKey({\n id,\n version,\n category: VISIBILITY_MODEL_KEY,\n }),\n buildStorageKey({\n id,\n version,\n category: PINNED_COLUMNS,\n }),\n buildStorageKey({\n id,\n version,\n category: FILTER_SEARCH_KEY,\n }),\n buildStorageKey({\n id,\n version,\n category: DIMENSION_MODEL_KEY,\n }),\n ];\n\n for (const keyToDelete of keysToDelete) {\n try {\n window.localStorage.removeItem(keyToDelete);\n } catch (e) {\n // Ignore\n }\n }\n }\n};\n"],"names":["PAGINATION_MODEL_KEY","FILTER_MODEL_KEY","SORT_MODEL_KEY","VISIBILITY_MODEL_KEY","PINNED_COLUMNS","DIMENSION_MODEL_KEY","FILTER_SEARCH_KEY","CATEGORIES","buildStorageKey","_ref","id","version","category","clearPreviousVersionStorage","previousLocalStorageVersions","keysToDelete","keyToDelete","window","localStorage","removeItem","e"],"mappings":"AAAO,MAAMA,oBAAoB,GAAG,kBAAiB;AAC9C,MAAMC,gBAAgB,GAAG,cAAa;AACtC,MAAMC,cAAc,GAAG,YAAW;AAClC,MAAMC,oBAAoB,GAAG,kBAAiB;AAC9C,MAAMC,cAAc,GAAG,gBAAe;AACtC,MAAMC,mBAAmB,GAAG,YAAW;AACvC,MAAMC,iBAAiB,GAAG,cAAa;MACjCC,UAAU,GAAG,CACxBP,oBAAoB,EACpBC,gBAAgB,EAChBC,cAAc,EACdC,oBAAoB,EACpBE,mBAAmB,EACnBC,iBAAiB,EACjBF,cAAc,EACN;AAIGI,MAAAA,eAAe,GAAGC,IAAA,IAAoF;EAAA,IAAnF;IAAEC,EAAE;IAAEC,OAAO;AAAEC,IAAAA,QAAAA;AAA8D,GAAC,GAAAH,IAAA,CAAA;AAC5G,EAAA,OAAQ,GAAEC,EAAG,CAAA,CAAA,EAAGC,OAAQ,CAAA,CAAA,EAAGC,QAAS,CAAC,CAAA,CAAA;AACvC,EAAC;MAEYC,2BAA2B,GAAGA,CAACH,EAAU,EAAEI,4BAAsC,KAAW;AACvG,EAAA,KAAK,MAAMH,OAAO,IAAIG,4BAA4B,EAAE;AAClD,IAAA,MAAMC,YAAY,GAAG,CACnBP,eAAe,CAAC;MACdE,EAAE;MACFC,OAAO;AACPC,MAAAA,QAAQ,EAAEZ,oBAAAA;KACX,CAAC,EACFQ,eAAe,CAAC;MAAEE,EAAE;MAAEC,OAAO;AAAEC,MAAAA,QAAQ,EAAEV,cAAAA;KAAgB,CAAC,EAC1DM,eAAe,CAAC;MACdE,EAAE;MACFC,OAAO;AACPC,MAAAA,QAAQ,EAAEX,gBAAAA;KACX,CAAC,EACFO,eAAe,CAAC;MACdE,EAAE;MACFC,OAAO;AACPC,MAAAA,QAAQ,EAAET,oBAAAA;KACX,CAAC,EACFK,eAAe,CAAC;MACdE,EAAE;MACFC,OAAO;AACPC,MAAAA,QAAQ,EAAER,cAAAA;KACX,CAAC,EACFI,eAAe,CAAC;MACdE,EAAE;MACFC,OAAO;AACPC,MAAAA,QAAQ,EAAEN,iBAAAA;KACX,CAAC,EACFE,eAAe,CAAC;MACdE,EAAE;MACFC,OAAO;AACPC,MAAAA,QAAQ,EAAEP,mBAAAA;AACZ,KAAC,CAAC,CACH,CAAA;AAED,IAAA,KAAK,MAAMW,WAAW,IAAID,YAAY,EAAE;MACtC,IAAI;AACFE,QAAAA,MAAM,CAACC,YAAY,CAACC,UAAU,CAACH,WAAW,CAAC,CAAA;OAC5C,CAAC,OAAOI,CAAC,EAAE;AACV;AAAA,OAAA;AAEJ,KAAA;AACF,GAAA;AACF;;;;"}
@@ -0,0 +1,68 @@
1
+ import * as _mui_x_data_grid_components_panel_filterPanel_GridFilterInputMultipleSingleSelect from '@mui/x-data-grid/components/panel/filterPanel/GridFilterInputMultipleSingleSelect';
2
+ import * as _mui_x_data_grid_components_panel_filterPanel_GridFilterInputMultipleValue from '@mui/x-data-grid/components/panel/filterPanel/GridFilterInputMultipleValue';
3
+ import * as _mui_x_data_grid_components_panel_filterPanel_GridFilterInputSingleSelect from '@mui/x-data-grid/components/panel/filterPanel/GridFilterInputSingleSelect';
4
+ import * as _mui_x_data_grid_pro from '@mui/x-data-grid-pro';
5
+ export { getGridBooleanOperators, getGridDateOperators, getGridSingleSelectOperators } from '@mui/x-data-grid-pro';
6
+
7
+ declare const operatorList: {
8
+ string: _mui_x_data_grid_pro.GridFilterOperator<any, string | number | null, any>[];
9
+ number: _mui_x_data_grid_pro.GridFilterOperator<any, string | number | null, any>[];
10
+ boolean: _mui_x_data_grid_pro.GridFilterOperator<any, boolean | null, any>[];
11
+ date: _mui_x_data_grid_pro.GridFilterOperator<any, string | Date, any>[];
12
+ dateTime: _mui_x_data_grid_pro.GridFilterOperator<any, string | Date, any>[];
13
+ singleSelect: _mui_x_data_grid_pro.GridFilterOperator<any, any, any>[];
14
+ rsString: _mui_x_data_grid_pro.GridFilterOperator<any, string | number | null, any>[];
15
+ rsNumber: _mui_x_data_grid_pro.GridFilterOperator<any, string | number | null, any>[];
16
+ rsSingleSelect: ({
17
+ InputComponent: typeof _mui_x_data_grid_components_panel_filterPanel_GridFilterInputSingleSelect.GridFilterInputSingleSelect;
18
+ label: string;
19
+ value: string;
20
+ getApplyFilterFn: (filterItem: _mui_x_data_grid_pro.GridFilterItem) => ((params: _mui_x_data_grid_pro.GridCellParams<any, any, any>) => boolean) | null;
21
+ } | {
22
+ label: string;
23
+ value: string;
24
+ getApplyFilterFn: (filterItem: _mui_x_data_grid_pro.GridFilterItem) => ((params: _mui_x_data_grid_pro.GridCellParams<any, any, any>) => boolean) | null;
25
+ InputComponent: typeof _mui_x_data_grid_components_panel_filterPanel_GridFilterInputMultipleValue.GridFilterInputMultipleValue;
26
+ } | {
27
+ InputComponent: typeof _mui_x_data_grid_components_panel_filterPanel_GridFilterInputMultipleSingleSelect.GridFilterInputMultipleSingleSelect;
28
+ label: string;
29
+ value: string;
30
+ getApplyFilterFn: (filterItem: _mui_x_data_grid_pro.GridFilterItem) => ((params: _mui_x_data_grid_pro.GridCellParams<any, any, any>) => boolean) | null;
31
+ })[];
32
+ rsSingleSelectWithShortOperatorList: ({
33
+ InputComponent: typeof _mui_x_data_grid_components_panel_filterPanel_GridFilterInputSingleSelect.GridFilterInputSingleSelect;
34
+ label: string;
35
+ value: string;
36
+ getApplyFilterFn: (filterItem: _mui_x_data_grid_pro.GridFilterItem) => ((params: _mui_x_data_grid_pro.GridCellParams<any, any, any>) => boolean) | null;
37
+ } | {
38
+ InputComponent: typeof _mui_x_data_grid_components_panel_filterPanel_GridFilterInputMultipleSingleSelect.GridFilterInputMultipleSingleSelect;
39
+ label: string;
40
+ value: string;
41
+ getApplyFilterFn: (filterItem: _mui_x_data_grid_pro.GridFilterItem) => ((params: _mui_x_data_grid_pro.GridCellParams<any, any, any>) => boolean) | null;
42
+ })[];
43
+ rsMultipleSelect: ({
44
+ InputComponent: typeof _mui_x_data_grid_components_panel_filterPanel_GridFilterInputSingleSelect.GridFilterInputSingleSelect;
45
+ label: string;
46
+ value: string;
47
+ getApplyFilterFn: (filterItem: _mui_x_data_grid_pro.GridFilterItem) => ((params: _mui_x_data_grid_pro.GridCellParams<any, any, any>) => boolean) | null;
48
+ } | {
49
+ InputComponent: typeof _mui_x_data_grid_components_panel_filterPanel_GridFilterInputMultipleSingleSelect.GridFilterInputMultipleSingleSelect;
50
+ label: string;
51
+ value: string;
52
+ getApplyFilterFn: (filterItem: _mui_x_data_grid_pro.GridFilterItem) => ((params: _mui_x_data_grid_pro.GridCellParams<any, any, any>) => boolean) | null;
53
+ })[];
54
+ rsMultipleSelectWithShortOperatorList: ({
55
+ InputComponent: typeof _mui_x_data_grid_components_panel_filterPanel_GridFilterInputSingleSelect.GridFilterInputSingleSelect;
56
+ label: string;
57
+ value: string;
58
+ getApplyFilterFn: (filterItem: _mui_x_data_grid_pro.GridFilterItem) => ((params: _mui_x_data_grid_pro.GridCellParams<any, any, any>) => boolean) | null;
59
+ } | {
60
+ InputComponent: typeof _mui_x_data_grid_components_panel_filterPanel_GridFilterInputMultipleSingleSelect.GridFilterInputMultipleSingleSelect;
61
+ label: string;
62
+ value: string;
63
+ getApplyFilterFn: (filterItem: _mui_x_data_grid_pro.GridFilterItem) => ((params: _mui_x_data_grid_pro.GridCellParams<any, any, any>) => boolean) | null;
64
+ })[];
65
+ rsStringArray: _mui_x_data_grid_pro.GridFilterOperator<any, string | number | null, any>[];
66
+ };
67
+
68
+ export { operatorList };
@@ -0,0 +1,52 @@
1
+ import { getGridStringOperators, getGridNumericOperators, getGridBooleanOperators, getGridDateOperators, getGridSingleSelectOperators } from '@mui/x-data-grid-pro';
2
+ export { getGridBooleanOperators, getGridDateOperators, getGridSingleSelectOperators } from '@mui/x-data-grid-pro';
3
+ import { DOES_NOT_HAVE_ANY_OF_WITH_SELECT } from './string-array/doesNotHaveAnyOf.js';
4
+ import { getGridStringOperators as getGridStringOperators$1 } from './string/getGridStringOperators.js';
5
+ export { getGridStringOperators } from './string/getGridStringOperators.js';
6
+ import { getGridNumericOperators as getGridNumericOperators$1 } from './numeric/getGridNumericOperators.js';
7
+ export { getGridNumericOperators } from './numeric/getGridNumericOperators.js';
8
+ import { CONTAINS_ANY_OF } from './string-array/containsAnyOf.js';
9
+ export { CONTAINS_ANY_OF, CONTAINS_ANY_OF_I } from './string-array/containsAnyOf.js';
10
+ import { ENDS_WITH_ANY_OF } from './string-array/endsWithAnyOf.js';
11
+ export { ENDS_WITH_ANY_OF } from './string-array/endsWithAnyOf.js';
12
+ import { IS_ANY_OF_WITH_SELECT } from './string-array/isAnyOf.js';
13
+ export { IS_ANY_OF, IS_ANY_OF_WITH_SELECT } from './string-array/isAnyOf.js';
14
+ import { IS_NOT_WITH_SELECT } from './string/isNot.js';
15
+ export { IS_NOT, IS_NOT_WITH_SELECT } from './string/isNot.js';
16
+ import { IS_WITH_SELECT } from './string/is.js';
17
+ export { IS, IS_WITH_SELECT } from './string/is.js';
18
+ import { STARTS_WITH_ANY_OF } from './string-array/startsWithAnyOf.js';
19
+ export { STARTS_WITH_ANY_OF } from './string-array/startsWithAnyOf.js';
20
+ import { HAS_WITH_SELECT } from './string/has.js';
21
+ export { HAS, HAS_WITH_SELECT } from './string/has.js';
22
+ import { HAS_ANY_OF_WITH_SELECT } from './string-array/hasAnyOf.js';
23
+ export { HAS_ANY_OF, HAS_ANY_OF_WITH_SELECT } from './string-array/hasAnyOf.js';
24
+ import { HAS_ONLY_WITH_SELECT } from './string/hasOnly.js';
25
+ export { HAS_ONLY, HAS_ONLY_WITH_SELECT } from './string/hasOnly.js';
26
+ import { DOES_NOT_HAVE_WITH_SELECT } from './string/doesNotHave.js';
27
+ export { DOES_NOT_HAVE, DOES_NOT_HAVE_WITH_SELECT } from './string/doesNotHave.js';
28
+ import { getGridStringArrayOperators } from './string-array/getGridStringArrayOperators.js';
29
+ export { getGridStringArrayOperators, getGridStringArrayOperatorsWithSelect, getGridStringArrayOperatorsWithSelectOnStringArrayColumns } from './string-array/getGridStringArrayOperators.js';
30
+
31
+ // istanbul ignore file
32
+ const operatorList = {
33
+ // Default types
34
+ string: getGridStringOperators(),
35
+ number: getGridNumericOperators(),
36
+ boolean: getGridBooleanOperators(),
37
+ date: getGridDateOperators(),
38
+ dateTime: getGridDateOperators(true),
39
+ singleSelect: getGridSingleSelectOperators(),
40
+ // Extended types
41
+ rsString: getGridStringOperators$1(),
42
+ rsNumber: getGridNumericOperators$1(),
43
+ rsSingleSelect: [CONTAINS_ANY_OF, ENDS_WITH_ANY_OF, IS_ANY_OF_WITH_SELECT, IS_NOT_WITH_SELECT, IS_WITH_SELECT, STARTS_WITH_ANY_OF],
44
+ rsSingleSelectWithShortOperatorList: [IS_WITH_SELECT, IS_NOT_WITH_SELECT, IS_ANY_OF_WITH_SELECT],
45
+ rsMultipleSelect: [HAS_WITH_SELECT, HAS_ANY_OF_WITH_SELECT, HAS_ONLY_WITH_SELECT, DOES_NOT_HAVE_WITH_SELECT, DOES_NOT_HAVE_ANY_OF_WITH_SELECT],
46
+ rsMultipleSelectWithShortOperatorList: [HAS_WITH_SELECT, DOES_NOT_HAVE_WITH_SELECT, HAS_ANY_OF_WITH_SELECT],
47
+ // Custom types
48
+ rsStringArray: getGridStringArrayOperators()
49
+ };
50
+
51
+ export { operatorList };
52
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sources":["../../../src/utils/operators/index.ts"],"sourcesContent":["// istanbul ignore file\n\nimport {\n getGridBooleanOperators,\n getGridDateOperators,\n getGridSingleSelectOperators,\n getGridStringOperators as nativeGetGridStringOperators,\n getGridNumericOperators as nativeGetGridNumericOperators,\n} from '@mui/x-data-grid-pro';\nimport { getGridNumericOperators } from './numeric';\nimport {\n DOES_NOT_HAVE_WITH_SELECT,\n getGridStringOperators,\n HAS_ONLY_WITH_SELECT,\n HAS_WITH_SELECT,\n IS_NOT_WITH_SELECT,\n IS_WITH_SELECT,\n} from './string';\nimport {\n CONTAINS_ANY_OF,\n ENDS_WITH_ANY_OF,\n getGridStringArrayOperators,\n HAS_ANY_OF_WITH_SELECT,\n IS_ANY_OF_WITH_SELECT,\n STARTS_WITH_ANY_OF,\n} from './string-array';\nimport { DOES_NOT_HAVE_ANY_OF_WITH_SELECT } from './string-array/doesNotHaveAnyOf';\n\nexport { getGridBooleanOperators, getGridDateOperators, getGridSingleSelectOperators } from '@mui/x-data-grid-pro';\nexport * from './numeric';\nexport * from './string';\nexport * from './string-array';\n\nexport const operatorList = {\n // Default types\n string: nativeGetGridStringOperators(),\n number: nativeGetGridNumericOperators(),\n boolean: getGridBooleanOperators(),\n date: getGridDateOperators(),\n dateTime: getGridDateOperators(true),\n singleSelect: getGridSingleSelectOperators(),\n\n // Extended types\n rsString: getGridStringOperators(),\n rsNumber: getGridNumericOperators(),\n rsSingleSelect: [\n CONTAINS_ANY_OF,\n ENDS_WITH_ANY_OF,\n IS_ANY_OF_WITH_SELECT,\n IS_NOT_WITH_SELECT,\n IS_WITH_SELECT,\n STARTS_WITH_ANY_OF,\n ],\n rsSingleSelectWithShortOperatorList: [IS_WITH_SELECT, IS_NOT_WITH_SELECT, IS_ANY_OF_WITH_SELECT],\n rsMultipleSelect: [\n HAS_WITH_SELECT,\n HAS_ANY_OF_WITH_SELECT,\n HAS_ONLY_WITH_SELECT,\n DOES_NOT_HAVE_WITH_SELECT,\n DOES_NOT_HAVE_ANY_OF_WITH_SELECT,\n ],\n rsMultipleSelectWithShortOperatorList: [HAS_WITH_SELECT, DOES_NOT_HAVE_WITH_SELECT, HAS_ANY_OF_WITH_SELECT],\n\n // Custom types\n rsStringArray: getGridStringArrayOperators(),\n};\n"],"names":["operatorList","string","nativeGetGridStringOperators","number","nativeGetGridNumericOperators","boolean","getGridBooleanOperators","date","getGridDateOperators","dateTime","singleSelect","getGridSingleSelectOperators","rsString","getGridStringOperators","rsNumber","getGridNumericOperators","rsSingleSelect","CONTAINS_ANY_OF","ENDS_WITH_ANY_OF","IS_ANY_OF_WITH_SELECT","IS_NOT_WITH_SELECT","IS_WITH_SELECT","STARTS_WITH_ANY_OF","rsSingleSelectWithShortOperatorList","rsMultipleSelect","HAS_WITH_SELECT","HAS_ANY_OF_WITH_SELECT","HAS_ONLY_WITH_SELECT","DOES_NOT_HAVE_WITH_SELECT","DOES_NOT_HAVE_ANY_OF_WITH_SELECT","rsMultipleSelectWithShortOperatorList","rsStringArray","getGridStringArrayOperators"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAiCO,MAAMA,YAAY,GAAG;AAC1B;EACAC,MAAM,EAAEC,sBAA4B,EAAE;EACtCC,MAAM,EAAEC,uBAA6B,EAAE;EACvCC,OAAO,EAAEC,uBAAuB,EAAE;EAClCC,IAAI,EAAEC,oBAAoB,EAAE;AAC5BC,EAAAA,QAAQ,EAAED,oBAAoB,CAAC,IAAI,CAAC;EACpCE,YAAY,EAAEC,4BAA4B,EAAE;AAE5C;EACAC,QAAQ,EAAEC,wBAAsB,EAAE;EAClCC,QAAQ,EAAEC,yBAAuB,EAAE;AACnCC,EAAAA,cAAc,EAAE,CACdC,eAAe,EACfC,gBAAgB,EAChBC,qBAAqB,EACrBC,kBAAkB,EAClBC,cAAc,EACdC,kBAAkB,CACnB;AACDC,EAAAA,mCAAmC,EAAE,CAACF,cAAc,EAAED,kBAAkB,EAAED,qBAAqB,CAAC;EAChGK,gBAAgB,EAAE,CAChBC,eAAe,EACfC,sBAAsB,EACtBC,oBAAoB,EACpBC,yBAAyB,EACzBC,gCAAgC,CACjC;AACDC,EAAAA,qCAAqC,EAAE,CAACL,eAAe,EAAEG,yBAAyB,EAAEF,sBAAsB,CAAC;AAE3G;EACAK,aAAa,EAAEC,2BAA2B,EAAC;AAC7C;;;;"}
@@ -0,0 +1,5 @@
1
+ import { GridFilterOperator } from '@mui/x-data-grid-pro';
2
+
3
+ declare const getGridNumericOperators: () => GridFilterOperator<any, number | string | null, any>[];
4
+
5
+ export { getGridNumericOperators };
@@ -0,0 +1,7 @@
1
+ import { getGridNumericOperators as getGridNumericOperators$1 } from '@mui/x-data-grid-pro';
2
+ import { IS_BETWEEN } from './isBetween.js';
3
+
4
+ const getGridNumericOperators = () => [...getGridNumericOperators$1(), IS_BETWEEN];
5
+
6
+ export { getGridNumericOperators };
7
+ //# sourceMappingURL=getGridNumericOperators.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"getGridNumericOperators.js","sources":["../../../../src/utils/operators/numeric/getGridNumericOperators.ts"],"sourcesContent":["import {\n getGridNumericOperators as forwardOperators,\n GridFilterOperator,\n} from '@mui/x-data-grid-pro';\nimport { IS_BETWEEN } from './isBetween';\n\nexport const getGridNumericOperators: () => GridFilterOperator<\n any,\n number | string | null,\n any\n>[] = () => [...forwardOperators(), IS_BETWEEN];\n"],"names":["getGridNumericOperators","forwardOperators","IS_BETWEEN"],"mappings":";;;AAMaA,MAAAA,uBAIV,GAAGA,MAAM,CAAC,GAAGC,yBAAgB,EAAE,EAAEC,UAAU;;;;"}
@@ -0,0 +1,10 @@
1
+ import { GridFilterItem, GridCellParams } from '@mui/x-data-grid-pro';
2
+
3
+ declare const IS_BETWEEN: {
4
+ label: string;
5
+ value: string;
6
+ getApplyFilterFn: (filterItem: GridFilterItem) => ((params: GridCellParams) => boolean) | null;
7
+ InputComponent: (props: any) => JSX.Element;
8
+ };
9
+
10
+ export { IS_BETWEEN };
@@ -0,0 +1,28 @@
1
+ import { InputNumberInterval } from '../../fields/InputNumberInterval.js';
2
+
3
+ const isBetweenOperator = {
4
+ label: 'is between',
5
+ value: 'isBetween',
6
+ getApplyFilterFn: filterItem => {
7
+ if (!filterItem.columnField || !filterItem.value || !filterItem.operatorValue) {
8
+ return null;
9
+ }
10
+ if (!Array.isArray(filterItem.value) || filterItem.value.length !== 2) {
11
+ return null;
12
+ }
13
+ if (filterItem.value[0] == null || filterItem.value[1] == null) {
14
+ return null;
15
+ }
16
+ if (typeof filterItem.value[0] !== 'number' || typeof filterItem.value[1] !== 'number') {
17
+ return null;
18
+ }
19
+ return params => {
20
+ return params.value !== null && filterItem.value[0] <= params.value && params.value <= filterItem.value[1];
21
+ };
22
+ },
23
+ InputComponent: InputNumberInterval
24
+ };
25
+ const IS_BETWEEN = isBetweenOperator;
26
+
27
+ export { IS_BETWEEN };
28
+ //# sourceMappingURL=isBetween.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"isBetween.js","sources":["../../../../src/utils/operators/numeric/isBetween.tsx"],"sourcesContent":["import { GridCellParams, GridFilterItem } from '@mui/x-data-grid-pro';\nimport { InputNumberInterval } from '../../fields/InputNumberInterval';\n\nconst isBetweenOperator = {\n label: 'is between',\n value: 'isBetween',\n getApplyFilterFn: (filterItem: GridFilterItem) => {\n if (\n !filterItem.columnField ||\n !filterItem.value ||\n !filterItem.operatorValue\n ) {\n return null;\n }\n\n if (!Array.isArray(filterItem.value) || filterItem.value.length !== 2) {\n return null;\n }\n\n if (filterItem.value[0] == null || filterItem.value[1] == null) {\n return null;\n }\n\n if (\n typeof filterItem.value[0] !== 'number' ||\n typeof filterItem.value[1] !== 'number'\n ) {\n return null;\n }\n\n return (params: GridCellParams): boolean => {\n return (\n params.value !== null &&\n filterItem.value[0] <= params.value &&\n params.value <= filterItem.value[1]\n );\n };\n },\n InputComponent: InputNumberInterval,\n};\n\nexport const IS_BETWEEN = isBetweenOperator;\n"],"names":["isBetweenOperator","label","value","getApplyFilterFn","filterItem","columnField","operatorValue","Array","isArray","length","params","InputComponent","InputNumberInterval","IS_BETWEEN"],"mappings":";;AAGA,MAAMA,iBAAiB,GAAG;AACxBC,EAAAA,KAAK,EAAE,YAAY;AACnBC,EAAAA,KAAK,EAAE,WAAW;EAClBC,gBAAgB,EAAGC,UAA0B,IAAK;AAChD,IAAA,IACE,CAACA,UAAU,CAACC,WAAW,IACvB,CAACD,UAAU,CAACF,KAAK,IACjB,CAACE,UAAU,CAACE,aAAa,EACzB;AACA,MAAA,OAAO,IAAI,CAAA;AACb,KAAA;AAEA,IAAA,IAAI,CAACC,KAAK,CAACC,OAAO,CAACJ,UAAU,CAACF,KAAK,CAAC,IAAIE,UAAU,CAACF,KAAK,CAACO,MAAM,KAAK,CAAC,EAAE;AACrE,MAAA,OAAO,IAAI,CAAA;AACb,KAAA;AAEA,IAAA,IAAIL,UAAU,CAACF,KAAK,CAAC,CAAC,CAAC,IAAI,IAAI,IAAIE,UAAU,CAACF,KAAK,CAAC,CAAC,CAAC,IAAI,IAAI,EAAE;AAC9D,MAAA,OAAO,IAAI,CAAA;AACb,KAAA;AAEA,IAAA,IACE,OAAOE,UAAU,CAACF,KAAK,CAAC,CAAC,CAAC,KAAK,QAAQ,IACvC,OAAOE,UAAU,CAACF,KAAK,CAAC,CAAC,CAAC,KAAK,QAAQ,EACvC;AACA,MAAA,OAAO,IAAI,CAAA;AACb,KAAA;AAEA,IAAA,OAAQQ,MAAsB,IAAc;MAC1C,OACEA,MAAM,CAACR,KAAK,KAAK,IAAI,IACrBE,UAAU,CAACF,KAAK,CAAC,CAAC,CAAC,IAAIQ,MAAM,CAACR,KAAK,IACnCQ,MAAM,CAACR,KAAK,IAAIE,UAAU,CAACF,KAAK,CAAC,CAAC,CAAC,CAAA;KAEtC,CAAA;GACF;AACDS,EAAAA,cAAc,EAAEC,mBAAAA;AAClB,CAAC,CAAA;AAEM,MAAMC,UAAU,GAAGb;;;;"}
@@ -0,0 +1,10 @@
1
+ import { GridFilterItem, GridCellParams, GridFilterInputValue } from '@mui/x-data-grid-pro';
2
+
3
+ declare const DOES_NOT_CONTAIN: {
4
+ label: string;
5
+ value: string;
6
+ getApplyFilterFn: (filterItem: GridFilterItem) => ((params: GridCellParams) => boolean) | null;
7
+ InputComponent: typeof GridFilterInputValue;
8
+ };
9
+
10
+ export { DOES_NOT_CONTAIN };