@itwin/grouping-mapping-widget 0.3.0 → 0.3.3

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 (245) hide show
  1. package/lib/cjs/formula/FormulaFunctionProvider.d.ts +18 -0
  2. package/lib/cjs/formula/FormulaFunctionProvider.js +136 -0
  3. package/lib/cjs/formula/FormulaFunctionProvider.js.map +1 -0
  4. package/lib/cjs/formula/FormulaOperatorsProvider.d.ts +34 -0
  5. package/lib/cjs/formula/FormulaOperatorsProvider.js +185 -0
  6. package/lib/cjs/formula/FormulaOperatorsProvider.js.map +1 -0
  7. package/lib/cjs/formula/FormulaSplitter.d.ts +2 -0
  8. package/lib/cjs/formula/FormulaSplitter.js +140 -0
  9. package/lib/cjs/formula/FormulaSplitter.js.map +1 -0
  10. package/lib/cjs/formula/FormulaTokensValidator.d.ts +5 -0
  11. package/lib/cjs/formula/FormulaTokensValidator.js +135 -0
  12. package/lib/cjs/formula/FormulaTokensValidator.js.map +1 -0
  13. package/lib/cjs/formula/FormulaValidator.d.ts +3 -0
  14. package/lib/cjs/formula/FormulaValidator.js +35 -0
  15. package/lib/cjs/formula/FormulaValidator.js.map +1 -0
  16. package/lib/cjs/formula/IResult.d.ts +5 -0
  17. package/lib/cjs/formula/IResult.js +3 -0
  18. package/lib/cjs/formula/IResult.js.map +1 -0
  19. package/lib/cjs/formula/InfixToPostfixConverter.d.ts +18 -0
  20. package/lib/cjs/formula/InfixToPostfixConverter.js +299 -0
  21. package/lib/cjs/formula/InfixToPostfixConverter.js.map +1 -0
  22. package/lib/cjs/formula/InputStream.d.ts +12 -0
  23. package/lib/cjs/formula/InputStream.js +36 -0
  24. package/lib/cjs/formula/InputStream.js.map +1 -0
  25. package/lib/cjs/formula/ParenthesisValidator.d.ts +7 -0
  26. package/lib/cjs/formula/ParenthesisValidator.js +34 -0
  27. package/lib/cjs/formula/ParenthesisValidator.js.map +1 -0
  28. package/lib/cjs/formula/Queue.d.ts +11 -0
  29. package/lib/cjs/formula/Queue.js +42 -0
  30. package/lib/cjs/formula/Queue.js.map +1 -0
  31. package/lib/cjs/formula/Stack.d.ts +14 -0
  32. package/lib/cjs/formula/Stack.js +71 -0
  33. package/lib/cjs/formula/Stack.js.map +1 -0
  34. package/lib/cjs/formula/StringBuilder.d.ts +9 -0
  35. package/lib/cjs/formula/StringBuilder.js +26 -0
  36. package/lib/cjs/formula/StringBuilder.js.map +1 -0
  37. package/lib/cjs/formula/Types.d.ts +8 -0
  38. package/lib/cjs/formula/Types.js +3 -0
  39. package/lib/cjs/formula/Types.js.map +1 -0
  40. package/lib/cjs/formula/Utils.d.ts +7 -0
  41. package/lib/cjs/formula/Utils.js +39 -0
  42. package/lib/cjs/formula/Utils.js.map +1 -0
  43. package/lib/cjs/widget/GroupingMappingWidget.d.ts +4 -0
  44. package/lib/cjs/widget/GroupingMappingWidget.js +6 -23
  45. package/lib/cjs/widget/GroupingMappingWidget.js.map +1 -1
  46. package/lib/cjs/widget/components/CalculatedPropertyAction.d.ts +3 -3
  47. package/lib/cjs/widget/components/CalculatedPropertyAction.js +15 -10
  48. package/lib/cjs/widget/components/CalculatedPropertyAction.js.map +1 -1
  49. package/lib/cjs/widget/components/CalculatedPropertyTable.d.ts +9 -6
  50. package/lib/cjs/widget/components/CalculatedPropertyTable.js +8 -33
  51. package/lib/cjs/widget/components/CalculatedPropertyTable.js.map +1 -1
  52. package/lib/cjs/widget/components/ConfirmMappingsImport.d.ts +3 -3
  53. package/lib/cjs/widget/components/ConfirmMappingsImport.js +6 -3
  54. package/lib/cjs/widget/components/ConfirmMappingsImport.js.map +1 -1
  55. package/lib/cjs/widget/components/ConfirmMappingsImport.scss +4 -2
  56. package/lib/cjs/widget/components/CustomCalculationAction.d.ts +6 -4
  57. package/lib/cjs/widget/components/CustomCalculationAction.js +23 -12
  58. package/lib/cjs/widget/components/CustomCalculationAction.js.map +1 -1
  59. package/lib/cjs/widget/components/CustomCalculationTable.d.ts +9 -6
  60. package/lib/cjs/widget/components/CustomCalculationTable.js +8 -33
  61. package/lib/cjs/widget/components/CustomCalculationTable.js.map +1 -1
  62. package/lib/cjs/widget/components/GroupAction.d.ts +2 -2
  63. package/lib/cjs/widget/components/GroupAction.js +25 -51
  64. package/lib/cjs/widget/components/GroupAction.js.map +1 -1
  65. package/lib/cjs/widget/components/GroupPropertyAction.d.ts +1 -1
  66. package/lib/cjs/widget/components/GroupPropertyAction.js +12 -8
  67. package/lib/cjs/widget/components/GroupPropertyAction.js.map +1 -1
  68. package/lib/cjs/widget/components/GroupPropertyTable.d.ts +9 -6
  69. package/lib/cjs/widget/components/GroupPropertyTable.js +8 -33
  70. package/lib/cjs/widget/components/GroupPropertyTable.js.map +1 -1
  71. package/lib/cjs/widget/components/Grouping.d.ts +3 -3
  72. package/lib/cjs/widget/components/Grouping.js +22 -22
  73. package/lib/cjs/widget/components/Grouping.js.map +1 -1
  74. package/lib/cjs/widget/components/GroupingMapping.d.ts +12 -2
  75. package/lib/cjs/widget/components/GroupingMapping.js +18 -4
  76. package/lib/cjs/widget/components/GroupingMapping.js.map +1 -1
  77. package/lib/cjs/widget/components/Mapping.d.ts +2 -2
  78. package/lib/cjs/widget/components/Mapping.js +14 -14
  79. package/lib/cjs/widget/components/Mapping.js.map +1 -1
  80. package/lib/cjs/widget/components/MappingAction.d.ts +2 -2
  81. package/lib/cjs/widget/components/MappingAction.js +8 -13
  82. package/lib/cjs/widget/components/MappingAction.js.map +1 -1
  83. package/lib/cjs/widget/components/MappingImportWizardModal.js +2 -2
  84. package/lib/cjs/widget/components/MappingImportWizardModal.js.map +1 -1
  85. package/lib/cjs/widget/components/MappingImportWizardModal.scss +6 -2
  86. package/lib/cjs/widget/components/PropertyMenu.d.ts +2 -2
  87. package/lib/cjs/widget/components/PropertyMenu.js +68 -21
  88. package/lib/cjs/widget/components/PropertyMenu.js.map +1 -1
  89. package/lib/cjs/widget/components/SelectIModel.js +4 -8
  90. package/lib/cjs/widget/components/SelectIModel.js.map +1 -1
  91. package/lib/cjs/widget/components/SelectIModel.scss +2 -1
  92. package/lib/cjs/widget/components/SelectMapping.scss +2 -1
  93. package/lib/cjs/widget/components/SelectMappings.d.ts +2 -2
  94. package/lib/cjs/widget/components/SelectMappings.js +10 -11
  95. package/lib/cjs/widget/components/SelectMappings.js.map +1 -1
  96. package/lib/cjs/widget/components/SelectProject.js +12 -16
  97. package/lib/cjs/widget/components/SelectProject.js.map +1 -1
  98. package/lib/cjs/widget/components/SelectProject.scss +3 -8
  99. package/lib/cjs/widget/hooks/useFetchData.d.ts +9 -0
  100. package/lib/cjs/widget/hooks/useFetchData.js +41 -0
  101. package/lib/cjs/widget/hooks/useFetchData.js.map +1 -0
  102. package/lib/cjs/widget/hooks/useFormulaValidation.d.ts +6 -0
  103. package/lib/cjs/widget/hooks/useFormulaValidation.js +29 -0
  104. package/lib/cjs/widget/hooks/useFormulaValidation.js.map +1 -0
  105. package/lib/cjs/widget/utils.d.ts +1 -0
  106. package/lib/cjs/widget/utils.js +9 -0
  107. package/lib/cjs/widget/utils.js.map +1 -1
  108. package/lib/esm/formula/FormulaFunctionProvider.d.ts +18 -0
  109. package/lib/esm/formula/FormulaFunctionProvider.js +130 -0
  110. package/lib/esm/formula/FormulaFunctionProvider.js.map +1 -0
  111. package/lib/esm/formula/FormulaOperatorsProvider.d.ts +34 -0
  112. package/lib/esm/formula/FormulaOperatorsProvider.js +174 -0
  113. package/lib/esm/formula/FormulaOperatorsProvider.js.map +1 -0
  114. package/lib/esm/formula/FormulaSplitter.d.ts +2 -0
  115. package/lib/esm/formula/FormulaSplitter.js +136 -0
  116. package/lib/esm/formula/FormulaSplitter.js.map +1 -0
  117. package/lib/esm/formula/FormulaTokensValidator.d.ts +5 -0
  118. package/lib/esm/formula/FormulaTokensValidator.js +131 -0
  119. package/lib/esm/formula/FormulaTokensValidator.js.map +1 -0
  120. package/lib/esm/formula/FormulaValidator.d.ts +3 -0
  121. package/lib/esm/formula/FormulaValidator.js +31 -0
  122. package/lib/esm/formula/FormulaValidator.js.map +1 -0
  123. package/lib/esm/formula/IResult.d.ts +5 -0
  124. package/lib/esm/formula/IResult.js +2 -0
  125. package/lib/esm/formula/IResult.js.map +1 -0
  126. package/lib/esm/formula/InfixToPostfixConverter.d.ts +18 -0
  127. package/lib/esm/formula/InfixToPostfixConverter.js +295 -0
  128. package/lib/esm/formula/InfixToPostfixConverter.js.map +1 -0
  129. package/lib/esm/formula/InputStream.d.ts +12 -0
  130. package/lib/esm/formula/InputStream.js +32 -0
  131. package/lib/esm/formula/InputStream.js.map +1 -0
  132. package/lib/esm/formula/ParenthesisValidator.d.ts +7 -0
  133. package/lib/esm/formula/ParenthesisValidator.js +30 -0
  134. package/lib/esm/formula/ParenthesisValidator.js.map +1 -0
  135. package/lib/esm/formula/Queue.d.ts +11 -0
  136. package/lib/esm/formula/Queue.js +38 -0
  137. package/lib/esm/formula/Queue.js.map +1 -0
  138. package/lib/esm/formula/Stack.d.ts +14 -0
  139. package/lib/esm/formula/Stack.js +67 -0
  140. package/lib/esm/formula/Stack.js.map +1 -0
  141. package/lib/esm/formula/StringBuilder.d.ts +9 -0
  142. package/lib/esm/formula/StringBuilder.js +22 -0
  143. package/lib/esm/formula/StringBuilder.js.map +1 -0
  144. package/lib/esm/formula/Types.d.ts +8 -0
  145. package/lib/esm/formula/Types.js +2 -0
  146. package/lib/esm/formula/Types.js.map +1 -0
  147. package/lib/esm/formula/Utils.d.ts +7 -0
  148. package/lib/esm/formula/Utils.js +30 -0
  149. package/lib/esm/formula/Utils.js.map +1 -0
  150. package/lib/esm/widget/GroupingMappingWidget.d.ts +4 -0
  151. package/lib/esm/widget/GroupingMappingWidget.js +6 -4
  152. package/lib/esm/widget/GroupingMappingWidget.js.map +1 -1
  153. package/lib/esm/widget/components/CalculatedPropertyAction.d.ts +3 -3
  154. package/lib/esm/widget/components/CalculatedPropertyAction.js +16 -11
  155. package/lib/esm/widget/components/CalculatedPropertyAction.js.map +1 -1
  156. package/lib/esm/widget/components/CalculatedPropertyTable.d.ts +9 -6
  157. package/lib/esm/widget/components/CalculatedPropertyTable.js +9 -34
  158. package/lib/esm/widget/components/CalculatedPropertyTable.js.map +1 -1
  159. package/lib/esm/widget/components/ConfirmMappingsImport.d.ts +3 -3
  160. package/lib/esm/widget/components/ConfirmMappingsImport.js +7 -4
  161. package/lib/esm/widget/components/ConfirmMappingsImport.js.map +1 -1
  162. package/lib/esm/widget/components/ConfirmMappingsImport.scss +4 -2
  163. package/lib/esm/widget/components/CustomCalculationAction.d.ts +6 -4
  164. package/lib/esm/widget/components/CustomCalculationAction.js +24 -13
  165. package/lib/esm/widget/components/CustomCalculationAction.js.map +1 -1
  166. package/lib/esm/widget/components/CustomCalculationTable.d.ts +9 -6
  167. package/lib/esm/widget/components/CustomCalculationTable.js +9 -34
  168. package/lib/esm/widget/components/CustomCalculationTable.js.map +1 -1
  169. package/lib/esm/widget/components/GroupAction.d.ts +2 -2
  170. package/lib/esm/widget/components/GroupAction.js +26 -52
  171. package/lib/esm/widget/components/GroupAction.js.map +1 -1
  172. package/lib/esm/widget/components/GroupPropertyAction.d.ts +1 -1
  173. package/lib/esm/widget/components/GroupPropertyAction.js +13 -9
  174. package/lib/esm/widget/components/GroupPropertyAction.js.map +1 -1
  175. package/lib/esm/widget/components/GroupPropertyTable.d.ts +9 -6
  176. package/lib/esm/widget/components/GroupPropertyTable.js +9 -34
  177. package/lib/esm/widget/components/GroupPropertyTable.js.map +1 -1
  178. package/lib/esm/widget/components/Grouping.d.ts +3 -3
  179. package/lib/esm/widget/components/Grouping.js +23 -23
  180. package/lib/esm/widget/components/Grouping.js.map +1 -1
  181. package/lib/esm/widget/components/GroupingMapping.d.ts +12 -2
  182. package/lib/esm/widget/components/GroupingMapping.js +17 -4
  183. package/lib/esm/widget/components/GroupingMapping.js.map +1 -1
  184. package/lib/esm/widget/components/Mapping.d.ts +2 -2
  185. package/lib/esm/widget/components/Mapping.js +15 -15
  186. package/lib/esm/widget/components/Mapping.js.map +1 -1
  187. package/lib/esm/widget/components/MappingAction.d.ts +2 -2
  188. package/lib/esm/widget/components/MappingAction.js +9 -14
  189. package/lib/esm/widget/components/MappingAction.js.map +1 -1
  190. package/lib/esm/widget/components/MappingImportWizardModal.js +2 -2
  191. package/lib/esm/widget/components/MappingImportWizardModal.js.map +1 -1
  192. package/lib/esm/widget/components/MappingImportWizardModal.scss +6 -2
  193. package/lib/esm/widget/components/PropertyMenu.d.ts +2 -2
  194. package/lib/esm/widget/components/PropertyMenu.js +69 -22
  195. package/lib/esm/widget/components/PropertyMenu.js.map +1 -1
  196. package/lib/esm/widget/components/SelectIModel.js +5 -6
  197. package/lib/esm/widget/components/SelectIModel.js.map +1 -1
  198. package/lib/esm/widget/components/SelectIModel.scss +2 -1
  199. package/lib/esm/widget/components/SelectMapping.scss +2 -1
  200. package/lib/esm/widget/components/SelectMappings.d.ts +2 -2
  201. package/lib/esm/widget/components/SelectMappings.js +11 -12
  202. package/lib/esm/widget/components/SelectMappings.js.map +1 -1
  203. package/lib/esm/widget/components/SelectProject.js +13 -14
  204. package/lib/esm/widget/components/SelectProject.js.map +1 -1
  205. package/lib/esm/widget/components/SelectProject.scss +3 -8
  206. package/lib/esm/widget/hooks/useFetchData.d.ts +9 -0
  207. package/lib/esm/widget/hooks/useFetchData.js +35 -0
  208. package/lib/esm/widget/hooks/useFetchData.js.map +1 -0
  209. package/lib/esm/widget/hooks/useFormulaValidation.d.ts +6 -0
  210. package/lib/esm/widget/hooks/useFormulaValidation.js +25 -0
  211. package/lib/esm/widget/hooks/useFormulaValidation.js.map +1 -0
  212. package/lib/esm/widget/utils.d.ts +1 -0
  213. package/lib/esm/widget/utils.js +7 -1
  214. package/lib/esm/widget/utils.js.map +1 -1
  215. package/package.json +3 -2
  216. package/lib/cjs/api/generated/api.d.ts +0 -3222
  217. package/lib/cjs/api/generated/api.js +0 -5291
  218. package/lib/cjs/api/generated/api.js.map +0 -1
  219. package/lib/cjs/api/generated/configuration.d.ts +0 -56
  220. package/lib/cjs/api/generated/configuration.js +0 -30
  221. package/lib/cjs/api/generated/configuration.js.map +0 -1
  222. package/lib/cjs/api/generated/index.d.ts +0 -14
  223. package/lib/cjs/api/generated/index.js +0 -31
  224. package/lib/cjs/api/generated/index.js.map +0 -1
  225. package/lib/cjs/api/reportingClient.d.ts +0 -34
  226. package/lib/cjs/api/reportingClient.js +0 -177
  227. package/lib/cjs/api/reportingClient.js.map +0 -1
  228. package/lib/cjs/widget/hooks/useFetchAccessToken.d.ts +0 -3
  229. package/lib/cjs/widget/hooks/useFetchAccessToken.js +0 -22
  230. package/lib/cjs/widget/hooks/useFetchAccessToken.js.map +0 -1
  231. package/lib/esm/api/generated/api.d.ts +0 -3222
  232. package/lib/esm/api/generated/api.js +0 -5248
  233. package/lib/esm/api/generated/api.js.map +0 -1
  234. package/lib/esm/api/generated/configuration.d.ts +0 -56
  235. package/lib/esm/api/generated/configuration.js +0 -26
  236. package/lib/esm/api/generated/configuration.js.map +0 -1
  237. package/lib/esm/api/generated/index.d.ts +0 -14
  238. package/lib/esm/api/generated/index.js +0 -19
  239. package/lib/esm/api/generated/index.js.map +0 -1
  240. package/lib/esm/api/reportingClient.d.ts +0 -34
  241. package/lib/esm/api/reportingClient.js +0 -173
  242. package/lib/esm/api/reportingClient.js.map +0 -1
  243. package/lib/esm/widget/hooks/useFetchAccessToken.d.ts +0 -3
  244. package/lib/esm/widget/hooks/useFetchAccessToken.js +0 -20
  245. package/lib/esm/widget/hooks/useFetchAccessToken.js.map +0 -1
@@ -0,0 +1,6 @@
1
+ import type { PropertyMap } from "../../formula/Types";
2
+ export declare function useFormulaValidation(formula: string, properties: PropertyMap, setFormulaErrorMessage: (s: string) => void): {
3
+ isValid: boolean;
4
+ forceValidation: () => boolean;
5
+ };
6
+ //# sourceMappingURL=useFormulaValidation.d.ts.map
@@ -0,0 +1,25 @@
1
+ /*---------------------------------------------------------------------------------------------
2
+ * Copyright (c) Bentley Systems, Incorporated. All rights reserved.
3
+ * See LICENSE.md in the project root for license terms and full copyright notice.
4
+ *--------------------------------------------------------------------------------------------*/
5
+ import { useEffect, useState } from "react";
6
+ import { validateFormula } from "../../formula/FormulaValidator";
7
+ import { debounce } from "../utils";
8
+ function validate(formula, properties, setFormulaErrorMessage, setIsValid) {
9
+ if (!formula) {
10
+ setFormulaErrorMessage("");
11
+ setIsValid(false);
12
+ return false;
13
+ }
14
+ const error = validateFormula(formula, properties);
15
+ setFormulaErrorMessage(error);
16
+ setIsValid(!error);
17
+ return !error;
18
+ }
19
+ const debouncedValidationFunc = debounce(validate, 1000);
20
+ export function useFormulaValidation(formula, properties, setFormulaErrorMessage) {
21
+ const [isValid, setIsValid] = useState(false);
22
+ useEffect(() => debouncedValidationFunc(formula, properties, setFormulaErrorMessage, setIsValid), [formula, properties, setFormulaErrorMessage]);
23
+ return { isValid, forceValidation: () => validate(formula, properties, setFormulaErrorMessage, setIsValid) };
24
+ }
25
+ //# sourceMappingURL=useFormulaValidation.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useFormulaValidation.js","sourceRoot":"","sources":["../../../../src/widget/hooks/useFormulaValidation.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAC5C,OAAO,EAAE,eAAe,EAAE,MAAM,gCAAgC,CAAC;AAEjE,OAAO,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAC;AAEpC,SAAS,QAAQ,CAAC,OAAe,EAAE,UAAuB,EAAE,sBAA2C,EAAE,UAAgC;IACvI,IAAI,CAAC,OAAO,EAAE;QACZ,sBAAsB,CAAC,EAAE,CAAC,CAAC;QAC3B,UAAU,CAAC,KAAK,CAAC,CAAC;QAClB,OAAO,KAAK,CAAC;KACd;IAED,MAAM,KAAK,GAAG,eAAe,CAAC,OAAO,EAAE,UAAU,CAAC,CAAC;IACnD,sBAAsB,CAAC,KAAK,CAAC,CAAC;IAC9B,UAAU,CAAC,CAAC,KAAK,CAAC,CAAC;IACnB,OAAO,CAAC,KAAK,CAAC;AAChB,CAAC;AAED,MAAM,uBAAuB,GAAG,QAAQ,CAAC,QAAQ,EAAE,IAAI,CAAC,CAAC;AAEzD,MAAM,UAAU,oBAAoB,CAAC,OAAe,EAAE,UAAuB,EAAE,sBAA2C;IACxH,MAAM,CAAC,OAAO,EAAE,UAAU,CAAC,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAC;IAC9C,SAAS,CAAC,GAAG,EAAE,CAAC,uBAAuB,CAAC,OAAO,EAAE,UAAU,EAAE,sBAAsB,EAAE,UAAU,CAAC,EAAE,CAAC,OAAO,EAAE,UAAU,EAAE,sBAAsB,CAAC,CAAC,CAAC;IACjJ,OAAO,EAAE,OAAO,EAAE,eAAe,EAAE,GAAG,EAAE,CAAC,QAAQ,CAAC,OAAO,EAAE,UAAU,EAAE,sBAAsB,EAAE,UAAU,CAAC,EAAE,CAAC;AAC/G,CAAC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\nimport { useEffect, useState } from \"react\";\nimport { validateFormula } from \"../../formula/FormulaValidator\";\nimport type { PropertyMap } from \"../../formula/Types\";\nimport { debounce } from \"../utils\";\n\nfunction validate(formula: string, properties: PropertyMap, setFormulaErrorMessage: (s: string) => void, setIsValid: (b: boolean) => void): boolean {\n if (!formula) {\n setFormulaErrorMessage(\"\");\n setIsValid(false);\n return false;\n }\n\n const error = validateFormula(formula, properties);\n setFormulaErrorMessage(error);\n setIsValid(!error);\n return !error;\n}\n\nconst debouncedValidationFunc = debounce(validate, 1000);\n\nexport function useFormulaValidation(formula: string, properties: PropertyMap, setFormulaErrorMessage: (s: string) => void) {\n const [isValid, setIsValid] = useState(false);\n useEffect(() => debouncedValidationFunc(formula, properties, setFormulaErrorMessage, setIsValid), [formula, properties, setFormulaErrorMessage]);\n return { isValid, forceValidation: () => validate(formula, properties, setFormulaErrorMessage, setIsValid) };\n}\n"]}
@@ -1,4 +1,5 @@
1
1
  export declare type CreateTypeFromInterface<Interface> = {
2
2
  [Property in keyof Interface]: Interface[Property];
3
3
  };
4
+ export declare function debounce<F extends (...args: any[]) => void>(f: F, delay: number): (...args: any[]) => void;
4
5
  //# sourceMappingURL=utils.d.ts.map
@@ -1,2 +1,8 @@
1
- export {};
1
+ export function debounce(f, delay) {
2
+ let timer;
3
+ return (...args) => {
4
+ timer && window.clearTimeout(timer);
5
+ timer = window.setTimeout(f, delay, ...args);
6
+ };
7
+ }
2
8
  //# sourceMappingURL=utils.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"utils.js","sourceRoot":"","sources":["../../../src/widget/utils.ts"],"names":[],"mappings":"","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\nexport type CreateTypeFromInterface<Interface> = {\n [Property in keyof Interface]: Interface[Property];\n};\n"]}
1
+ {"version":3,"file":"utils.js","sourceRoot":"","sources":["../../../src/widget/utils.ts"],"names":[],"mappings":"AAQA,MAAM,UAAU,QAAQ,CAAqC,CAAI,EAAE,KAAa;IAC9E,IAAI,KAAyB,CAAC;IAC9B,OAAO,CAAC,GAAG,IAAW,EAAE,EAAE;QACxB,KAAK,IAAI,MAAM,CAAC,YAAY,CAAC,KAAK,CAAC,CAAC;QACpC,KAAK,GAAG,MAAM,CAAC,UAAU,CAAC,CAAC,EAAE,KAAK,EAAE,GAAG,IAAI,CAAC,CAAC;IAC/C,CAAC,CAAC;AACJ,CAAC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\nexport type CreateTypeFromInterface<Interface> = {\n [Property in keyof Interface]: Interface[Property];\n};\n\nexport function debounce<F extends (...args: any[]) => void>(f: F, delay: number) {\n let timer: number | undefined;\n return (...args: any[]) => {\n timer && window.clearTimeout(timer);\n timer = window.setTimeout(f, delay, ...args);\n };\n}\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@itwin/grouping-mapping-widget",
3
- "version": "0.3.0",
3
+ "version": "0.3.3",
4
4
  "description": "An iTwin.js 3D Viewer Widget that interfaces with the iTwin Reporting Platform.",
5
5
  "keywords": [
6
6
  "Bentley",
@@ -37,8 +37,9 @@
37
37
  },
38
38
  "dependencies": {
39
39
  "@itwin/imodel-browser-react": "^0.12.1",
40
+ "@itwin/insights-client": "0.1.1",
40
41
  "@itwin/itwinui-icons-react": "^1.7.0",
41
- "@itwin/itwinui-react": "^1.33.0",
42
+ "@itwin/itwinui-react": "^1.35.0",
42
43
  "classnames": "^2.3.1",
43
44
  "cross-fetch": "^3.1.4",
44
45
  "immer": "^9.0.7",