d2coreui 23.0.13 → 23.0.15

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 (435) hide show
  1. package/components/clipboard/clipboardUtils.ts +53 -0
  2. package/components/codemirror/SyntaxHighlighter.tsx +58 -0
  3. package/components/collapse/expandable.tsx +48 -0
  4. package/components/color/colorPicker.tsx +121 -0
  5. package/components/color/colorSwatch.d.ts +18 -13
  6. package/components/color/colorSwatch.jsx +87 -0
  7. package/components/color/colorUtils.ts +60 -0
  8. package/components/date/dateRangeInput.tsx +468 -0
  9. package/components/date/dateRangeInputAdvancedPanel.tsx +238 -0
  10. package/components/date/dateRangeInputConfirm.tsx +200 -0
  11. package/components/date/dateTimeInput.tsx +633 -0
  12. package/components/date/durationInput.tsx +375 -0
  13. package/components/form/NiceFormItem.tsx +32 -0
  14. package/components/grid/cell/beanAccessor.ts +17 -0
  15. package/components/grid/cell/cellEditorUtils.ts +12 -0
  16. package/components/grid/cell/customEnumCellEditor.tsx +130 -0
  17. package/components/grid/cell/dataGridCellEditorComponent.tsx +61 -0
  18. package/components/grid/cell/dateCellEditor.tsx +83 -0
  19. package/components/grid/cell/durationCellEditor.tsx +105 -0
  20. package/components/grid/cell/hexaOctetStringCellEditor.tsx +101 -0
  21. package/components/grid/cell/hexaValueCellEditor.tsx +92 -0
  22. package/components/grid/cell/numberCellEditor.tsx +115 -0
  23. package/components/grid/cell/rangeSelector.d.ts +9 -78
  24. package/components/grid/cell/rangeSelector.js +674 -527
  25. package/components/grid/cell/simpleStatusTextCellEditor.tsx +168 -0
  26. package/components/grid/cell/statusTextCellEditor.tsx +198 -0
  27. package/components/grid/cell/tableDefaultRowStyleRules.ts +51 -0
  28. package/components/grid/cell/textCellEditor.tsx +94 -0
  29. package/components/grid/cell/withAgGridHooks.tsx +15 -0
  30. package/components/grid/columnUtils.ts +29 -0
  31. package/components/grid/config/columnTransfer.tsx +258 -0
  32. package/components/grid/config/dataGridEditor.tsx +328 -0
  33. package/components/grid/config/rowHeightCalculator.tsx +29 -0
  34. package/components/grid/config/rowStylePicker.tsx +196 -0
  35. package/components/grid/dataGrid.tsx +2183 -0
  36. package/components/grid/detail/detailHeaderPanel.tsx +59 -0
  37. package/components/grid/export/contextMenu.tsx +154 -0
  38. package/components/grid/export/progressPopup.tsx +106 -0
  39. package/components/grid/export/worker/clipboardExport.ts +10 -0
  40. package/components/grid/export/worker/csvExport.ts +10 -0
  41. package/components/grid/export/worker/pdfExport.ts +98 -0
  42. package/components/grid/export/worker/txtExport.ts +21 -0
  43. package/components/grid/extendedDataGrid.tsx +974 -0
  44. package/components/grid/filter/customColumnFilter.tsx +14 -0
  45. package/components/grid/filter/dataGridColumnFilter.tsx +70 -0
  46. package/components/grid/filter/dateColumnFilter.tsx +34 -0
  47. package/components/grid/filter/textColumnFilter.tsx +37 -0
  48. package/components/grid/filter/wildcardQuickFilterEngine.ts +50 -0
  49. package/components/grid/header/simpleHeader.tsx +270 -0
  50. package/components/grid/panel/dataGridPagination.tsx +123 -0
  51. package/components/grid/panel/loadingOverlay.tsx +14 -0
  52. package/components/grid/panel/noRecordsOverlay.tsx +16 -0
  53. package/components/grid/panel/tablePagination.tsx +77 -0
  54. package/components/icons/ant-design-double-right-outline.svg +5 -5
  55. package/components/icons/ant-design_close-outline.svg +5 -5
  56. package/components/icons/dropdownArrow.tsx +67 -0
  57. package/components/icons/undoIcon.tsx +16 -0
  58. package/components/input/autoCompleteInput.tsx +174 -0
  59. package/components/input/draftUtils.tsx +62 -0
  60. package/components/input/draftail.d.ts +186 -1
  61. package/components/input/draftail.js +1 -2
  62. package/components/input/hexaFormattedInput.tsx +64 -0
  63. package/components/input/mask/helpers.ts +154 -0
  64. package/components/input/mask/inputMaskCore.ts +452 -0
  65. package/components/input/mask/pattern.ts +122 -0
  66. package/components/input/maskedInput.tsx +275 -0
  67. package/components/input/passwordInput.tsx +62 -0
  68. package/components/input/simpleAutoComplete.tsx +60 -0
  69. package/components/input/textarea/extractSpansOfClasses.tsx +125 -0
  70. package/components/input/textarea/getRanges.ts +82 -0
  71. package/components/input/textarea/getType.ts +23 -0
  72. package/components/input/textarea/highlighedContents.tsx +20 -0
  73. package/components/input/textarea/highlightedTextarea.css +61 -0
  74. package/components/input/textarea/mentionsWithHighlighting.tsx +95 -0
  75. package/components/keyboard/keyboardUtils.ts +42 -0
  76. package/components/modal/draggableModalProvider.tsx +37 -0
  77. package/components/modal/impl/clamp.ts +4 -0
  78. package/components/modal/impl/draggableModal.tsx +36 -0
  79. package/components/modal/impl/draggableModalContext.ts +14 -0
  80. package/components/modal/impl/draggableModalInner.tsx +114 -0
  81. package/components/modal/impl/draggableModalReducer.ts +285 -0
  82. package/components/modal/impl/getWindowSize.ts +6 -0
  83. package/components/modal/impl/index.ts +5 -0
  84. package/components/modal/impl/resizeHandle.tsx +12 -0
  85. package/components/modal/impl/useDrag.ts +57 -0
  86. package/components/modal/impl/usePrevious.ts +11 -0
  87. package/components/modal/impl/useResize.ts +79 -0
  88. package/components/modal/modalDialog.tsx +172 -0
  89. package/components/picker/enumValuePicker.tsx +48 -0
  90. package/components/platformSpecific.ts +39 -0
  91. package/components/scrollTo/dom-scroll-into-view.d.ts +1 -0
  92. package/components/scrollTo/onlyText.ts +36 -0
  93. package/components/scrollTo/scrollTo.tsx +324 -0
  94. package/components/style/withCss.tsx +14 -0
  95. package/components/style/withInputNumberCss.tsx +18 -0
  96. package/components/svg.d.ts +1 -0
  97. package/components/table/dragSortingTable.tsx +123 -0
  98. package/components/text/impl/innerSize.ts +15 -0
  99. package/components/text/impl/series.ts +37 -0
  100. package/components/text/impl/shallowEqual.ts +19 -0
  101. package/components/text/impl/uniqueId.ts +5 -0
  102. package/components/text/impl/whilst.ts +25 -0
  103. package/components/text/textFit.tsx +229 -0
  104. package/i18n/components.cs.json +101 -101
  105. package/i18n/components.sk.json +101 -101
  106. package/i18n/components.uk.json +101 -101
  107. package/i18n/componentsLocaleHolder.js +24 -29
  108. package/i18n/componentsLocaleLoader.d.ts +9 -0
  109. package/lib/esm/components/codemirror/SyntaxHighlighter.js.map +1 -0
  110. package/lib/esm/components/color/colorSwatch.d.ts +13 -0
  111. package/lib/esm/components/color/colorSwatch.js.map +1 -0
  112. package/{components → lib/esm/components}/grid/cell/cellEditorUtils.js.map +1 -1
  113. package/lib/esm/components/grid/cell/rangeSelector.d.ts +78 -0
  114. package/lib/esm/components/grid/cell/rangeSelector.js +527 -0
  115. package/lib/esm/components/grid/columnUtils.js.map +1 -0
  116. package/{components → lib/esm/components}/grid/export/contextMenu.js +4 -4
  117. package/lib/esm/components/grid/export/progressPopup.js.map +1 -0
  118. package/{components → lib/esm/components}/grid/export/worker/clipboardExport.js.map +1 -1
  119. package/{components → lib/esm/components}/grid/export/worker/csvExport.js.map +1 -1
  120. package/{components → lib/esm/components}/grid/export/worker/txtExport.js.map +1 -1
  121. package/lib/esm/components/icons/undoIcon.js.map +1 -0
  122. package/lib/esm/components/input/draftUtils.js.map +1 -0
  123. package/lib/esm/components/input/draftail.d.ts +1 -0
  124. package/lib/esm/components/input/draftail.js +2 -0
  125. package/{components → lib/esm/components}/input/draftail.js.map +1 -1
  126. package/lib/esm/components/input/mask/inputMaskCore.js.map +1 -0
  127. package/lib/esm/components/input/mask/pattern.js.map +1 -0
  128. package/lib/esm/components/input/passwordInput.js.map +1 -0
  129. package/lib/esm/components/input/textarea/extractSpansOfClasses.js.map +1 -0
  130. package/lib/esm/components/input/textarea/getRanges.js.map +1 -0
  131. package/{components → lib/esm/components}/input/textarea/getType.js.map +1 -1
  132. package/{components → lib/esm/components}/input/textarea/highlighedContents.js.map +1 -1
  133. package/lib/esm/components/input/textarea/mentionsWithHighlighting.js.map +1 -0
  134. package/{components → lib/esm/components}/keyboard/keyboardUtils.js.map +1 -1
  135. package/lib/esm/components/platformSpecific.js.map +1 -0
  136. package/{components → lib/esm/components}/text/impl/innerSize.js.map +1 -1
  137. package/lib/esm/components/text/impl/series.js.map +1 -0
  138. package/{components → lib/esm/components}/text/impl/shallowEqual.js.map +1 -1
  139. package/{components → lib/esm/components}/text/impl/uniqueId.js.map +1 -1
  140. package/lib/esm/components/text/impl/whilst.js.map +1 -0
  141. package/lib/esm/i18n/components.cs.json +101 -0
  142. package/lib/esm/i18n/components.sk.json +101 -0
  143. package/lib/esm/i18n/components.uk.json +101 -0
  144. package/lib/esm/i18n/componentsLocaleHolder.js +29 -0
  145. package/lib/esm/i18n/componentsLocaleHolder.js.map +1 -0
  146. package/lib/esm/package.json +70 -0
  147. package/lib/esm/tsconfig.build.json +24 -0
  148. package/lib/esm/tsconfig.json +11 -0
  149. package/package.json +3 -3
  150. package/style/ag-grid/_ag-theme-antd-vars.scss +194 -194
  151. package/style/ag-grid/ag-theme-antd.scss +87 -87
  152. package/style/ag-grid/aggrid-adaptations.css +42 -42
  153. package/style/ag-grid/aggrid.scss +11 -11
  154. package/style/flexLayout/flexLayout.scss +130 -130
  155. package/style/flexLayout/flexLayoutBase.scss +623 -623
  156. package/style/flexLayout/new/_base.scss +616 -616
  157. package/style/flexLayout/new/flexLayoutBase.scss +621 -621
  158. package/style/flexLayout/new/light.scss +107 -107
  159. package/style/flexLayout/old/_base.scss +551 -551
  160. package/style/flexLayout/old/light.scss +16 -16
  161. package/style/form/niceFormItem.css +38 -38
  162. package/style/loading.css +31 -31
  163. package/style/splitPane/splitPane.css +48 -48
  164. package/tsconfig.build.json +24 -24
  165. package/tsconfig.json +11 -11
  166. package/components/codemirror/SyntaxHighlighter.js.map +0 -1
  167. package/components/color/colorSwatch.js.map +0 -1
  168. package/components/grid/columnUtils.js.map +0 -1
  169. package/components/grid/export/progressPopup.js.map +0 -1
  170. package/components/icons/undoIcon.js.map +0 -1
  171. package/components/input/draftUtils.js.map +0 -1
  172. package/components/input/mask/inputMaskCore.js.map +0 -1
  173. package/components/input/mask/pattern.js.map +0 -1
  174. package/components/input/passwordInput.js.map +0 -1
  175. package/components/input/textarea/extractSpansOfClasses.js.map +0 -1
  176. package/components/input/textarea/getRanges.js.map +0 -1
  177. package/components/input/textarea/mentionsWithHighlighting.js.map +0 -1
  178. package/components/platformSpecific.js.map +0 -1
  179. package/components/text/impl/series.js.map +0 -1
  180. package/components/text/impl/whilst.js.map +0 -1
  181. package/i18n/componentsLocaleHolder.js.map +0 -1
  182. /package/{components → lib/esm/components}/clipboard/clipboardUtils.d.ts +0 -0
  183. /package/{components → lib/esm/components}/clipboard/clipboardUtils.js +0 -0
  184. /package/{components → lib/esm/components}/clipboard/clipboardUtils.js.map +0 -0
  185. /package/{components → lib/esm/components}/codemirror/SyntaxHighlighter.d.ts +0 -0
  186. /package/{components → lib/esm/components}/codemirror/SyntaxHighlighter.js +0 -0
  187. /package/{components → lib/esm/components}/collapse/expandable.d.ts +0 -0
  188. /package/{components → lib/esm/components}/collapse/expandable.js +0 -0
  189. /package/{components → lib/esm/components}/collapse/expandable.js.map +0 -0
  190. /package/{components → lib/esm/components}/color/colorPicker.d.ts +0 -0
  191. /package/{components → lib/esm/components}/color/colorPicker.js +0 -0
  192. /package/{components → lib/esm/components}/color/colorPicker.js.map +0 -0
  193. /package/{components → lib/esm/components}/color/colorSwatch.js +0 -0
  194. /package/{components → lib/esm/components}/color/colorUtils.d.ts +0 -0
  195. /package/{components → lib/esm/components}/color/colorUtils.js +0 -0
  196. /package/{components → lib/esm/components}/color/colorUtils.js.map +0 -0
  197. /package/{components → lib/esm/components}/date/dateRangeInput.d.ts +0 -0
  198. /package/{components → lib/esm/components}/date/dateRangeInput.js +0 -0
  199. /package/{components → lib/esm/components}/date/dateRangeInput.js.map +0 -0
  200. /package/{components → lib/esm/components}/date/dateRangeInputAdvancedPanel.d.ts +0 -0
  201. /package/{components → lib/esm/components}/date/dateRangeInputAdvancedPanel.js +0 -0
  202. /package/{components → lib/esm/components}/date/dateRangeInputAdvancedPanel.js.map +0 -0
  203. /package/{components → lib/esm/components}/date/dateRangeInputConfirm.d.ts +0 -0
  204. /package/{components → lib/esm/components}/date/dateRangeInputConfirm.js +0 -0
  205. /package/{components → lib/esm/components}/date/dateRangeInputConfirm.js.map +0 -0
  206. /package/{components → lib/esm/components}/date/dateTimeInput.d.ts +0 -0
  207. /package/{components → lib/esm/components}/date/dateTimeInput.js +0 -0
  208. /package/{components → lib/esm/components}/date/dateTimeInput.js.map +0 -0
  209. /package/{components → lib/esm/components}/date/durationInput.d.ts +0 -0
  210. /package/{components → lib/esm/components}/date/durationInput.js +0 -0
  211. /package/{components → lib/esm/components}/date/durationInput.js.map +0 -0
  212. /package/{components → lib/esm/components}/form/NiceFormItem.d.ts +0 -0
  213. /package/{components → lib/esm/components}/form/NiceFormItem.js +0 -0
  214. /package/{components → lib/esm/components}/form/NiceFormItem.js.map +0 -0
  215. /package/{components → lib/esm/components}/grid/cell/beanAccessor.d.ts +0 -0
  216. /package/{components → lib/esm/components}/grid/cell/beanAccessor.js +0 -0
  217. /package/{components → lib/esm/components}/grid/cell/beanAccessor.js.map +0 -0
  218. /package/{components → lib/esm/components}/grid/cell/cellEditorUtils.d.ts +0 -0
  219. /package/{components → lib/esm/components}/grid/cell/cellEditorUtils.js +0 -0
  220. /package/{components → lib/esm/components}/grid/cell/customEnumCellEditor.d.ts +0 -0
  221. /package/{components → lib/esm/components}/grid/cell/customEnumCellEditor.js +0 -0
  222. /package/{components → lib/esm/components}/grid/cell/customEnumCellEditor.js.map +0 -0
  223. /package/{components → lib/esm/components}/grid/cell/dataGridCellEditorComponent.d.ts +0 -0
  224. /package/{components → lib/esm/components}/grid/cell/dataGridCellEditorComponent.js +0 -0
  225. /package/{components → lib/esm/components}/grid/cell/dataGridCellEditorComponent.js.map +0 -0
  226. /package/{components → lib/esm/components}/grid/cell/dateCellEditor.d.ts +0 -0
  227. /package/{components → lib/esm/components}/grid/cell/dateCellEditor.js +0 -0
  228. /package/{components → lib/esm/components}/grid/cell/dateCellEditor.js.map +0 -0
  229. /package/{components → lib/esm/components}/grid/cell/durationCellEditor.d.ts +0 -0
  230. /package/{components → lib/esm/components}/grid/cell/durationCellEditor.js +0 -0
  231. /package/{components → lib/esm/components}/grid/cell/durationCellEditor.js.map +0 -0
  232. /package/{components → lib/esm/components}/grid/cell/hexaOctetStringCellEditor.d.ts +0 -0
  233. /package/{components → lib/esm/components}/grid/cell/hexaOctetStringCellEditor.js +0 -0
  234. /package/{components → lib/esm/components}/grid/cell/hexaOctetStringCellEditor.js.map +0 -0
  235. /package/{components → lib/esm/components}/grid/cell/hexaValueCellEditor.d.ts +0 -0
  236. /package/{components → lib/esm/components}/grid/cell/hexaValueCellEditor.js +0 -0
  237. /package/{components → lib/esm/components}/grid/cell/hexaValueCellEditor.js.map +0 -0
  238. /package/{components → lib/esm/components}/grid/cell/numberCellEditor.d.ts +0 -0
  239. /package/{components → lib/esm/components}/grid/cell/numberCellEditor.js +0 -0
  240. /package/{components → lib/esm/components}/grid/cell/numberCellEditor.js.map +0 -0
  241. /package/{components → lib/esm/components}/grid/cell/rangeSelector.js.map +0 -0
  242. /package/{components → lib/esm/components}/grid/cell/simpleStatusTextCellEditor.d.ts +0 -0
  243. /package/{components → lib/esm/components}/grid/cell/simpleStatusTextCellEditor.js +0 -0
  244. /package/{components → lib/esm/components}/grid/cell/simpleStatusTextCellEditor.js.map +0 -0
  245. /package/{components → lib/esm/components}/grid/cell/statusTextCellEditor.d.ts +0 -0
  246. /package/{components → lib/esm/components}/grid/cell/statusTextCellEditor.js +0 -0
  247. /package/{components → lib/esm/components}/grid/cell/statusTextCellEditor.js.map +0 -0
  248. /package/{components → lib/esm/components}/grid/cell/tableDefaultRowStyleRules.d.ts +0 -0
  249. /package/{components → lib/esm/components}/grid/cell/tableDefaultRowStyleRules.js +0 -0
  250. /package/{components → lib/esm/components}/grid/cell/tableDefaultRowStyleRules.js.map +0 -0
  251. /package/{components → lib/esm/components}/grid/cell/textCellEditor.d.ts +0 -0
  252. /package/{components → lib/esm/components}/grid/cell/textCellEditor.js +0 -0
  253. /package/{components → lib/esm/components}/grid/cell/textCellEditor.js.map +0 -0
  254. /package/{components → lib/esm/components}/grid/cell/withAgGridHooks.d.ts +0 -0
  255. /package/{components → lib/esm/components}/grid/cell/withAgGridHooks.js +0 -0
  256. /package/{components → lib/esm/components}/grid/cell/withAgGridHooks.js.map +0 -0
  257. /package/{components → lib/esm/components}/grid/columnUtils.d.ts +0 -0
  258. /package/{components → lib/esm/components}/grid/columnUtils.js +0 -0
  259. /package/{components → lib/esm/components}/grid/config/columnTransfer.d.ts +0 -0
  260. /package/{components → lib/esm/components}/grid/config/columnTransfer.js +0 -0
  261. /package/{components → lib/esm/components}/grid/config/columnTransfer.js.map +0 -0
  262. /package/{components → lib/esm/components}/grid/config/dataGridEditor.d.ts +0 -0
  263. /package/{components → lib/esm/components}/grid/config/dataGridEditor.js +0 -0
  264. /package/{components → lib/esm/components}/grid/config/dataGridEditor.js.map +0 -0
  265. /package/{components → lib/esm/components}/grid/config/rowHeightCalculator.d.ts +0 -0
  266. /package/{components → lib/esm/components}/grid/config/rowHeightCalculator.js +0 -0
  267. /package/{components → lib/esm/components}/grid/config/rowHeightCalculator.js.map +0 -0
  268. /package/{components → lib/esm/components}/grid/config/rowStylePicker.d.ts +0 -0
  269. /package/{components → lib/esm/components}/grid/config/rowStylePicker.js +0 -0
  270. /package/{components → lib/esm/components}/grid/config/rowStylePicker.js.map +0 -0
  271. /package/{components → lib/esm/components}/grid/dataGrid.d.ts +0 -0
  272. /package/{components → lib/esm/components}/grid/dataGrid.js +0 -0
  273. /package/{components → lib/esm/components}/grid/dataGrid.js.map +0 -0
  274. /package/{components → lib/esm/components}/grid/detail/detailHeaderPanel.d.ts +0 -0
  275. /package/{components → lib/esm/components}/grid/detail/detailHeaderPanel.js +0 -0
  276. /package/{components → lib/esm/components}/grid/detail/detailHeaderPanel.js.map +0 -0
  277. /package/{components → lib/esm/components}/grid/export/contextMenu.d.ts +0 -0
  278. /package/{components → lib/esm/components}/grid/export/contextMenu.js.map +0 -0
  279. /package/{components → lib/esm/components}/grid/export/progressPopup.d.ts +0 -0
  280. /package/{components → lib/esm/components}/grid/export/progressPopup.js +0 -0
  281. /package/{components → lib/esm/components}/grid/export/worker/clipboardExport.d.ts +0 -0
  282. /package/{components → lib/esm/components}/grid/export/worker/clipboardExport.js +0 -0
  283. /package/{components → lib/esm/components}/grid/export/worker/csvExport.d.ts +0 -0
  284. /package/{components → lib/esm/components}/grid/export/worker/csvExport.js +0 -0
  285. /package/{components → lib/esm/components}/grid/export/worker/pdfExport.d.ts +0 -0
  286. /package/{components → lib/esm/components}/grid/export/worker/pdfExport.js +0 -0
  287. /package/{components → lib/esm/components}/grid/export/worker/pdfExport.js.map +0 -0
  288. /package/{components → lib/esm/components}/grid/export/worker/txtExport.d.ts +0 -0
  289. /package/{components → lib/esm/components}/grid/export/worker/txtExport.js +0 -0
  290. /package/{components → lib/esm/components}/grid/extendedDataGrid.d.ts +0 -0
  291. /package/{components → lib/esm/components}/grid/extendedDataGrid.js +0 -0
  292. /package/{components → lib/esm/components}/grid/extendedDataGrid.js.map +0 -0
  293. /package/{components → lib/esm/components}/grid/filter/customColumnFilter.d.ts +0 -0
  294. /package/{components → lib/esm/components}/grid/filter/customColumnFilter.js +0 -0
  295. /package/{components → lib/esm/components}/grid/filter/customColumnFilter.js.map +0 -0
  296. /package/{components → lib/esm/components}/grid/filter/dataGridColumnFilter.d.ts +0 -0
  297. /package/{components → lib/esm/components}/grid/filter/dataGridColumnFilter.js +0 -0
  298. /package/{components → lib/esm/components}/grid/filter/dataGridColumnFilter.js.map +0 -0
  299. /package/{components → lib/esm/components}/grid/filter/dateColumnFilter.d.ts +0 -0
  300. /package/{components → lib/esm/components}/grid/filter/dateColumnFilter.js +0 -0
  301. /package/{components → lib/esm/components}/grid/filter/dateColumnFilter.js.map +0 -0
  302. /package/{components → lib/esm/components}/grid/filter/textColumnFilter.d.ts +0 -0
  303. /package/{components → lib/esm/components}/grid/filter/textColumnFilter.js +0 -0
  304. /package/{components → lib/esm/components}/grid/filter/textColumnFilter.js.map +0 -0
  305. /package/{components → lib/esm/components}/grid/filter/wildcardQuickFilterEngine.d.ts +0 -0
  306. /package/{components → lib/esm/components}/grid/filter/wildcardQuickFilterEngine.js +0 -0
  307. /package/{components → lib/esm/components}/grid/filter/wildcardQuickFilterEngine.js.map +0 -0
  308. /package/{components → lib/esm/components}/grid/header/simpleHeader.d.ts +0 -0
  309. /package/{components → lib/esm/components}/grid/header/simpleHeader.js +0 -0
  310. /package/{components → lib/esm/components}/grid/header/simpleHeader.js.map +0 -0
  311. /package/{components → lib/esm/components}/grid/panel/dataGridPagination.d.ts +0 -0
  312. /package/{components → lib/esm/components}/grid/panel/dataGridPagination.js +0 -0
  313. /package/{components → lib/esm/components}/grid/panel/dataGridPagination.js.map +0 -0
  314. /package/{components → lib/esm/components}/grid/panel/loadingOverlay.d.ts +0 -0
  315. /package/{components → lib/esm/components}/grid/panel/loadingOverlay.js +0 -0
  316. /package/{components → lib/esm/components}/grid/panel/loadingOverlay.js.map +0 -0
  317. /package/{components → lib/esm/components}/grid/panel/noRecordsOverlay.d.ts +0 -0
  318. /package/{components → lib/esm/components}/grid/panel/noRecordsOverlay.js +0 -0
  319. /package/{components → lib/esm/components}/grid/panel/noRecordsOverlay.js.map +0 -0
  320. /package/{components → lib/esm/components}/grid/panel/tablePagination.d.ts +0 -0
  321. /package/{components → lib/esm/components}/grid/panel/tablePagination.js +0 -0
  322. /package/{components → lib/esm/components}/grid/panel/tablePagination.js.map +0 -0
  323. /package/{components → lib/esm/components}/icons/dropdownArrow.d.ts +0 -0
  324. /package/{components → lib/esm/components}/icons/dropdownArrow.js +0 -0
  325. /package/{components → lib/esm/components}/icons/dropdownArrow.js.map +0 -0
  326. /package/{components → lib/esm/components}/icons/undoIcon.d.ts +0 -0
  327. /package/{components → lib/esm/components}/icons/undoIcon.js +0 -0
  328. /package/{components → lib/esm/components}/input/autoCompleteInput.d.ts +0 -0
  329. /package/{components → lib/esm/components}/input/autoCompleteInput.js +0 -0
  330. /package/{components → lib/esm/components}/input/autoCompleteInput.js.map +0 -0
  331. /package/{components → lib/esm/components}/input/draftUtils.d.ts +0 -0
  332. /package/{components → lib/esm/components}/input/draftUtils.js +0 -0
  333. /package/{components → lib/esm/components}/input/hexaFormattedInput.d.ts +0 -0
  334. /package/{components → lib/esm/components}/input/hexaFormattedInput.js +0 -0
  335. /package/{components → lib/esm/components}/input/hexaFormattedInput.js.map +0 -0
  336. /package/{components → lib/esm/components}/input/mask/helpers.d.ts +0 -0
  337. /package/{components → lib/esm/components}/input/mask/helpers.js +0 -0
  338. /package/{components → lib/esm/components}/input/mask/helpers.js.map +0 -0
  339. /package/{components → lib/esm/components}/input/mask/inputMaskCore.d.ts +0 -0
  340. /package/{components → lib/esm/components}/input/mask/inputMaskCore.js +0 -0
  341. /package/{components → lib/esm/components}/input/mask/pattern.d.ts +0 -0
  342. /package/{components → lib/esm/components}/input/mask/pattern.js +0 -0
  343. /package/{components → lib/esm/components}/input/maskedInput.d.ts +0 -0
  344. /package/{components → lib/esm/components}/input/maskedInput.js +0 -0
  345. /package/{components → lib/esm/components}/input/maskedInput.js.map +0 -0
  346. /package/{components → lib/esm/components}/input/passwordInput.d.ts +0 -0
  347. /package/{components → lib/esm/components}/input/passwordInput.js +0 -0
  348. /package/{components → lib/esm/components}/input/simpleAutoComplete.d.ts +0 -0
  349. /package/{components → lib/esm/components}/input/simpleAutoComplete.js +0 -0
  350. /package/{components → lib/esm/components}/input/simpleAutoComplete.js.map +0 -0
  351. /package/{components → lib/esm/components}/input/textarea/extractSpansOfClasses.d.ts +0 -0
  352. /package/{components → lib/esm/components}/input/textarea/extractSpansOfClasses.js +0 -0
  353. /package/{components → lib/esm/components}/input/textarea/getRanges.d.ts +0 -0
  354. /package/{components → lib/esm/components}/input/textarea/getRanges.js +0 -0
  355. /package/{components → lib/esm/components}/input/textarea/getType.d.ts +0 -0
  356. /package/{components → lib/esm/components}/input/textarea/getType.js +0 -0
  357. /package/{components → lib/esm/components}/input/textarea/highlighedContents.d.ts +0 -0
  358. /package/{components → lib/esm/components}/input/textarea/highlighedContents.js +0 -0
  359. /package/{components → lib/esm/components}/input/textarea/mentionsWithHighlighting.d.ts +0 -0
  360. /package/{components → lib/esm/components}/input/textarea/mentionsWithHighlighting.js +0 -0
  361. /package/{components → lib/esm/components}/keyboard/keyboardUtils.d.ts +0 -0
  362. /package/{components → lib/esm/components}/keyboard/keyboardUtils.js +0 -0
  363. /package/{components → lib/esm/components}/modal/draggableModalProvider.d.ts +0 -0
  364. /package/{components → lib/esm/components}/modal/draggableModalProvider.js +0 -0
  365. /package/{components → lib/esm/components}/modal/draggableModalProvider.js.map +0 -0
  366. /package/{components → lib/esm/components}/modal/impl/clamp.d.ts +0 -0
  367. /package/{components → lib/esm/components}/modal/impl/clamp.js +0 -0
  368. /package/{components → lib/esm/components}/modal/impl/clamp.js.map +0 -0
  369. /package/{components → lib/esm/components}/modal/impl/draggableModal.d.ts +0 -0
  370. /package/{components → lib/esm/components}/modal/impl/draggableModal.js +0 -0
  371. /package/{components → lib/esm/components}/modal/impl/draggableModal.js.map +0 -0
  372. /package/{components → lib/esm/components}/modal/impl/draggableModalContext.d.ts +0 -0
  373. /package/{components → lib/esm/components}/modal/impl/draggableModalContext.js +0 -0
  374. /package/{components → lib/esm/components}/modal/impl/draggableModalContext.js.map +0 -0
  375. /package/{components → lib/esm/components}/modal/impl/draggableModalInner.d.ts +0 -0
  376. /package/{components → lib/esm/components}/modal/impl/draggableModalInner.js +0 -0
  377. /package/{components → lib/esm/components}/modal/impl/draggableModalInner.js.map +0 -0
  378. /package/{components → lib/esm/components}/modal/impl/draggableModalReducer.d.ts +0 -0
  379. /package/{components → lib/esm/components}/modal/impl/draggableModalReducer.js +0 -0
  380. /package/{components → lib/esm/components}/modal/impl/draggableModalReducer.js.map +0 -0
  381. /package/{components → lib/esm/components}/modal/impl/getWindowSize.d.ts +0 -0
  382. /package/{components → lib/esm/components}/modal/impl/getWindowSize.js +0 -0
  383. /package/{components → lib/esm/components}/modal/impl/getWindowSize.js.map +0 -0
  384. /package/{components → lib/esm/components}/modal/impl/index.d.ts +0 -0
  385. /package/{components → lib/esm/components}/modal/impl/index.js +0 -0
  386. /package/{components → lib/esm/components}/modal/impl/index.js.map +0 -0
  387. /package/{components → lib/esm/components}/modal/impl/resizeHandle.d.ts +0 -0
  388. /package/{components → lib/esm/components}/modal/impl/resizeHandle.js +0 -0
  389. /package/{components → lib/esm/components}/modal/impl/resizeHandle.js.map +0 -0
  390. /package/{components → lib/esm/components}/modal/impl/useDrag.d.ts +0 -0
  391. /package/{components → lib/esm/components}/modal/impl/useDrag.js +0 -0
  392. /package/{components → lib/esm/components}/modal/impl/useDrag.js.map +0 -0
  393. /package/{components → lib/esm/components}/modal/impl/usePrevious.d.ts +0 -0
  394. /package/{components → lib/esm/components}/modal/impl/usePrevious.js +0 -0
  395. /package/{components → lib/esm/components}/modal/impl/usePrevious.js.map +0 -0
  396. /package/{components → lib/esm/components}/modal/impl/useResize.d.ts +0 -0
  397. /package/{components → lib/esm/components}/modal/impl/useResize.js +0 -0
  398. /package/{components → lib/esm/components}/modal/impl/useResize.js.map +0 -0
  399. /package/{components → lib/esm/components}/modal/modalDialog.d.ts +0 -0
  400. /package/{components → lib/esm/components}/modal/modalDialog.js +0 -0
  401. /package/{components → lib/esm/components}/modal/modalDialog.js.map +0 -0
  402. /package/{components → lib/esm/components}/picker/enumValuePicker.d.ts +0 -0
  403. /package/{components → lib/esm/components}/picker/enumValuePicker.js +0 -0
  404. /package/{components → lib/esm/components}/picker/enumValuePicker.js.map +0 -0
  405. /package/{components → lib/esm/components}/platformSpecific.d.ts +0 -0
  406. /package/{components → lib/esm/components}/platformSpecific.js +0 -0
  407. /package/{components → lib/esm/components}/scrollTo/onlyText.d.ts +0 -0
  408. /package/{components → lib/esm/components}/scrollTo/onlyText.js +0 -0
  409. /package/{components → lib/esm/components}/scrollTo/onlyText.js.map +0 -0
  410. /package/{components → lib/esm/components}/scrollTo/scrollTo.d.ts +0 -0
  411. /package/{components → lib/esm/components}/scrollTo/scrollTo.js +0 -0
  412. /package/{components → lib/esm/components}/scrollTo/scrollTo.js.map +0 -0
  413. /package/{components → lib/esm/components}/style/withCss.d.ts +0 -0
  414. /package/{components → lib/esm/components}/style/withCss.js +0 -0
  415. /package/{components → lib/esm/components}/style/withCss.js.map +0 -0
  416. /package/{components → lib/esm/components}/style/withInputNumberCss.d.ts +0 -0
  417. /package/{components → lib/esm/components}/style/withInputNumberCss.js +0 -0
  418. /package/{components → lib/esm/components}/style/withInputNumberCss.js.map +0 -0
  419. /package/{components → lib/esm/components}/table/dragSortingTable.d.ts +0 -0
  420. /package/{components → lib/esm/components}/table/dragSortingTable.js +0 -0
  421. /package/{components → lib/esm/components}/table/dragSortingTable.js.map +0 -0
  422. /package/{components → lib/esm/components}/text/impl/innerSize.d.ts +0 -0
  423. /package/{components → lib/esm/components}/text/impl/innerSize.js +0 -0
  424. /package/{components → lib/esm/components}/text/impl/series.d.ts +0 -0
  425. /package/{components → lib/esm/components}/text/impl/series.js +0 -0
  426. /package/{components → lib/esm/components}/text/impl/shallowEqual.d.ts +0 -0
  427. /package/{components → lib/esm/components}/text/impl/shallowEqual.js +0 -0
  428. /package/{components → lib/esm/components}/text/impl/uniqueId.d.ts +0 -0
  429. /package/{components → lib/esm/components}/text/impl/uniqueId.js +0 -0
  430. /package/{components → lib/esm/components}/text/impl/whilst.d.ts +0 -0
  431. /package/{components → lib/esm/components}/text/impl/whilst.js +0 -0
  432. /package/{components → lib/esm/components}/text/textFit.d.ts +0 -0
  433. /package/{components → lib/esm/components}/text/textFit.js +0 -0
  434. /package/{components → lib/esm/components}/text/textFit.js.map +0 -0
  435. /package/{i18n → lib/esm/i18n}/componentsLocaleHolder.d.ts +0 -0
@@ -0,0 +1,83 @@
1
+ import React from 'react';
2
+ import {Key} from "ts-key-enum";
3
+ import KeyboardUtils from "d2coreui/components/keyboard/keyboardUtils";
4
+ import DateTimeInput from "d2coreui/components/date/dateTimeInput";
5
+ import {Dayjs} from "dayjs";
6
+ import {DateTimeUtils} from "d2core/utils/dateTimeUtils";
7
+ import ReactDOM from "react-dom";
8
+ import {unixTimeToMoment} from "d2core/types/unixTimeUtils";
9
+ import {CustomCellEditorProps} from "ag-grid-react";
10
+ import {DataGridCellEditorComponent, withAgGridHooks} from "./dataGridCellEditorComponent";
11
+
12
+ interface DateCellEditorProperties extends CustomCellEditorProps {
13
+ mask: string
14
+ }
15
+
16
+ interface DateCellEditorState {
17
+ value: Dayjs | null
18
+ }
19
+
20
+ class DateCellEditor extends DataGridCellEditorComponent<DateCellEditorProperties, DateCellEditorState> {
21
+ private inputComponent: DateTimeInput | null = null;
22
+
23
+ constructor(props: Readonly<DateCellEditorProperties>) {
24
+ super(props);
25
+ this.state = this.getInitialState(props);
26
+ }
27
+
28
+ getInitialState(props: Readonly<DateCellEditorProperties>): DateCellEditorState {
29
+ let value: Dayjs | null;
30
+
31
+ if (props.eventKey === Key.Backspace || props.eventKey === Key.Delete) {
32
+ // if backspace or delete pressed, we clear the cell
33
+ value = null;
34
+ props.onValueChange(null);
35
+ } else {
36
+ // otherwise we start with the current value
37
+ value = props.value ? unixTimeToMoment(props.value) : null;
38
+ }
39
+ return {
40
+ value: value,
41
+ } as DateCellEditorState;
42
+ }
43
+
44
+ focus() {
45
+ this.inputComponent?.focus();
46
+ }
47
+
48
+ getValue() {
49
+ return this.state.value ? DateTimeUtils.toUnixTime(this.state.value) : null;
50
+ }
51
+
52
+ isCancelBeforeStart(): boolean {
53
+ return !!this.props.eventKey && this.props.eventKey.length === 1 && '1234567890'.indexOf(this.props.eventKey) < 0;
54
+ }
55
+
56
+ render() {
57
+ return (
58
+ <DateTimeInput
59
+ ref={(component) => {
60
+ this.inputComponent = component;
61
+ }}
62
+ size="small"
63
+ mask={this.props.mask}
64
+ value={this.state.value}
65
+ getPopupContainer={(_trigger) => {
66
+ // very nasty trick how to keep select's popup within focusable area of ag-grid cell editor popup (prevent closing cell editor when we click in select's dropdown area)
67
+ return (ReactDOM.findDOMNode(this)?.parentNode ?? document.body) as HTMLElement;
68
+ }}
69
+ onChange={(value) => {
70
+ if (KeyboardUtils.isKeyPressed(Key.Alt)) {
71
+ // ignore navigational keystrokes ALT+cursor arrow
72
+ return;
73
+ }
74
+ this.setState({value: value});
75
+ this.props.onValueChange(value ? DateTimeUtils.toUnixTime(value) : null)
76
+ }}
77
+ style={{width: '100%', minWidth: 220}}
78
+ />
79
+ );
80
+ }
81
+ }
82
+
83
+ export default withAgGridHooks(DateCellEditor)
@@ -0,0 +1,105 @@
1
+ import React from 'react';
2
+ import {Key} from "ts-key-enum";
3
+ import KeyboardUtils from "d2coreui/components/keyboard/keyboardUtils";
4
+ import {CellEditorUtils} from "./cellEditorUtils";
5
+ import DurationInput from "d2coreui/components/date/durationInput";
6
+ import dayjs from "dayjs";
7
+ import {Duration} from "d2core/dayjs/duration";
8
+ import {CustomCellEditorProps} from "ag-grid-react";
9
+ import {DataGridCellEditorComponent, withAgGridHooks} from "./dataGridCellEditorComponent";
10
+
11
+ interface DurationCellEditorProperties extends CustomCellEditorProps {
12
+ mask?: string
13
+ }
14
+
15
+ interface DurationCellEditorState {
16
+ value: number | null
17
+ }
18
+
19
+ class DurationCellEditor extends DataGridCellEditorComponent<DurationCellEditorProperties, DurationCellEditorState> {
20
+ private inputComponent: DurationInput | null = null;
21
+
22
+ constructor(props: Readonly<DurationCellEditorProperties>) {
23
+ super(props);
24
+ this.state = this.getInitialState(props);
25
+ }
26
+
27
+ getInitialState(props: Readonly<DurationCellEditorProperties>): DurationCellEditorState {
28
+ let value: number | null;
29
+
30
+ if (props.eventKey === Key.Backspace || props.eventKey === Key.Delete) {
31
+ // if backspace or delete pressed, we clear the cell
32
+ value = null;
33
+ props.onValueChange(null);
34
+ } else if (props.eventKey && props.eventKey.length === 1) {
35
+ // if a letter was pressed, we start with the letter
36
+ const parsedValue = Number.parseInt(props.eventKey);
37
+ value = isNaN(parsedValue) ? props.value : parsedValue;
38
+ props.onValueChange(value);
39
+ } else {
40
+ // otherwise we start with the current value
41
+ value = props.initialValue;
42
+ }
43
+ return {value: value} as DurationCellEditorState;
44
+ }
45
+
46
+ focus() {
47
+ this.inputComponent?.focus();
48
+ }
49
+
50
+ select() {
51
+ this.inputComponent?.input?.select();
52
+ }
53
+
54
+ placeCursorToEnd() {
55
+ // when we started editing, we want the carot at the end, not the start.
56
+ // this comes into play in two scenarios: a) when user hits F2 and b)
57
+ // when user hits a printable character, then on IE (and only IE) the carot
58
+ // was placed after the first character, thus 'apply' would end up as 'pplea'
59
+ const length = this.inputComponent?.input?.value ? this.inputComponent?.input.value.length : 0;
60
+ if (length > 0) {
61
+ this.inputComponent?.input?.setSelectionRange(length, length);
62
+ }
63
+ }
64
+
65
+ isCancelBeforeStart(): boolean {
66
+ return !!this.props.eventKey && this.props.eventKey.length === 1 && '1234567890'.indexOf(this.props.eventKey) < 0;
67
+ }
68
+
69
+ render() {
70
+ return (
71
+ <DurationInput
72
+ ref={(component) => {
73
+ this.inputComponent = component as DurationInput | null;
74
+ }}
75
+ size="small"
76
+ mask={this.props.mask ?? ""}
77
+ value={this.state.value !== undefined && this.state.value !== null ? dayjs.duration(this.state.value * 1000) : null}
78
+ onChange={(time: Duration | null) => {
79
+ if (KeyboardUtils.isKeyPressed(Key.Alt)) {
80
+ // ignore navigational keystrokes ALT+cursor arrow
81
+ return;
82
+ }
83
+ if (time) {
84
+ const value = time.asMilliseconds() / 1000;
85
+ this.setState({value: value});
86
+ this.props.onValueChange(value);
87
+ } else if (time === undefined) {
88
+ this.setState({value: null});
89
+ this.props.onValueChange(null);
90
+ }
91
+ }}
92
+ onKeyDown={(e) => {
93
+ if (CellEditorUtils.shouldIgnoreKeyEvent(e)) {
94
+ e.preventDefault();
95
+ e.nativeEvent.stopImmediatePropagation();
96
+ e.nativeEvent.preventDefault();
97
+ }
98
+ }}
99
+ style={{width: '100%'}}
100
+ />
101
+ );
102
+ }
103
+ }
104
+
105
+ export default withAgGridHooks(DurationCellEditor)
@@ -0,0 +1,101 @@
1
+ import React from 'react';
2
+ import {Key} from "ts-key-enum";
3
+ import KeyboardUtils from "d2coreui/components/keyboard/keyboardUtils";
4
+ import MaskInput from 'react-maskinput';
5
+ import {CustomCellEditorProps} from 'ag-grid-react';
6
+ import {DataGridCellEditorComponent, withAgGridHooks} from "./dataGridCellEditorComponent";
7
+
8
+ interface HexaOctetStringCellEditorProps extends CustomCellEditorProps {
9
+ hexaStringMaxLength: number
10
+ }
11
+
12
+ interface HexaOctetStringCellEditorState {
13
+ value: string | null
14
+ }
15
+
16
+ class HexaOctetStringCellEditor extends DataGridCellEditorComponent<HexaOctetStringCellEditorProps, HexaOctetStringCellEditorState> {
17
+ private inputComponent: HTMLInputElement | null = null;
18
+
19
+ constructor(props: Readonly<HexaOctetStringCellEditorProps>) {
20
+ super(props);
21
+ this.state = this.getInitialState(props);
22
+ }
23
+
24
+ getInitialState(props: Readonly<HexaOctetStringCellEditorProps>): HexaOctetStringCellEditorState {
25
+ let value: number | null;
26
+ if (props.eventKey === Key.Backspace || props.eventKey === Key.Delete) {
27
+ // if backspace or delete pressed, we clear the cell
28
+ value = null;
29
+ props.onValueChange(null);
30
+ } else if (props.eventKey && props.eventKey.length === 1) {
31
+ // if a letter was pressed, we start with the letter
32
+ const parsedValue = Number.parseInt(props.eventKey);
33
+ value = isNaN(parsedValue) ? props.value : parsedValue;
34
+ props.onValueChange(value);
35
+ } else {
36
+ // otherwise we start with the current value
37
+ value = props.initialValue;
38
+ }
39
+ return {value: value} as HexaOctetStringCellEditorState;
40
+ }
41
+
42
+ focus() {
43
+ this.inputComponent?.focus();
44
+ }
45
+
46
+ select() {
47
+ this.inputComponent?.select();
48
+ }
49
+
50
+ placeCursorToEnd() {
51
+ // when we started editing, we want the carot at the end, not the start.
52
+ // this comes into play in two scenarios: a) when user hits F2 and b)
53
+ // when user hits a printable character, then on IE (and only IE) the carot
54
+ // was placed after the first character, thus 'apply' would end up as 'pplea'
55
+ const length = this.inputComponent?.value ? this.inputComponent?.value.length : 0;
56
+ if (length > 0) {
57
+ this.inputComponent?.setSelectionRange(length, length);
58
+ }
59
+ }
60
+
61
+ isCancelBeforeStart(): boolean {
62
+ return !!this.props.eventKey && this.props.eventKey.length === 1 && '1234567890'.indexOf(this.props.eventKey) < 0;
63
+ }
64
+
65
+ render() {
66
+ let mask = "";
67
+ for (let i = 0; i < this.props.hexaStringMaxLength; i++) {
68
+ mask += "** ";
69
+ }
70
+
71
+ return (
72
+ <MaskInput
73
+ getReference={component => {
74
+ this.inputComponent = component;
75
+ component.className = "ant-input ant-input-sm";
76
+ }}
77
+ value={this.state.value !== undefined && this.state.value !== null ? this.state.value.toUpperCase() : ""}
78
+ onValueChange={event => {
79
+ const value = event.value;
80
+ if (KeyboardUtils.isKeyPressed(Key.Alt)) {
81
+ // ignore navigational keystrokes ALT+cursor arrow
82
+ return;
83
+ }
84
+
85
+ if (/^[0-9A-Fa-f ]+$/.test(value)) {
86
+ this.setState({value: value.toUpperCase()});
87
+ this.props.onValueChange(value.toUpperCase());
88
+ } else if (value === "") {
89
+ this.setState({value: ""});
90
+ this.props.onValueChange("");
91
+ }
92
+ }}
93
+ mask={mask.trim()}
94
+ maskChar=" "
95
+ showMask={false}
96
+ />
97
+ );
98
+ }
99
+ }
100
+
101
+ export default withAgGridHooks(HexaOctetStringCellEditor)
@@ -0,0 +1,92 @@
1
+ import React from 'react';
2
+ import {Key} from "ts-key-enum";
3
+ import KeyboardUtils from "d2coreui/components/keyboard/keyboardUtils";
4
+ import HexaFormattedInput from "d2coreui/components/input/hexaFormattedInput";
5
+ import {CustomCellEditorProps} from "ag-grid-react";
6
+ import {DataGridCellEditorComponent, withAgGridHooks} from "./dataGridCellEditorComponent";
7
+
8
+ interface HexaValueCellEditorProps extends CustomCellEditorProps {
9
+ maxLength: number
10
+ }
11
+
12
+ interface HexaValueCellEditorState {
13
+ value: string | null
14
+ }
15
+
16
+ class HexaValueCellEditor extends DataGridCellEditorComponent<HexaValueCellEditorProps, HexaValueCellEditorState> {
17
+ private inputComponent: HexaFormattedInput | null = null;
18
+
19
+ constructor(props: Readonly<HexaValueCellEditorProps>) {
20
+ super(props);
21
+ this.state = this.getInitialState(props);
22
+ }
23
+
24
+ getInitialState(props: Readonly<HexaValueCellEditorProps>): HexaValueCellEditorState {
25
+ let value: number | null;
26
+ if (props.eventKey === Key.Backspace || props.eventKey === Key.Delete) {
27
+ // if backspace or delete pressed, we clear the cell
28
+ value = null;
29
+ props.onValueChange(null);
30
+ } else if (props.eventKey && props.eventKey.length === 1) {
31
+ // if a letter was pressed, we start with the letter
32
+ const parsedValue = Number.parseInt(props.eventKey);
33
+ value = isNaN(parsedValue) ? props.value : parsedValue;
34
+ props.onValueChange(value);
35
+ } else {
36
+ // otherwise we start with the current value
37
+ value = props.value;
38
+ }
39
+ return {value: value} as HexaValueCellEditorState;
40
+ }
41
+
42
+ focus() {
43
+ this.inputComponent?.focus();
44
+ }
45
+
46
+ select() {
47
+ this.inputComponent?.input?.select();
48
+ }
49
+
50
+ placeCursorToEnd() {
51
+ // when we started editing, we want the carot at the end, not the start.
52
+ // this comes into play in two scenarios: a) when user hits F2 and b)
53
+ // when user hits a printable character, then on IE (and only IE) the carot
54
+ // was placed after the first character, thus 'apply' would end up as 'pplea'
55
+ const length = this.inputComponent?.input?.value ? this.inputComponent?.input.value.length : 0;
56
+ if (length > 0) {
57
+ this.inputComponent?.input?.setSelectionRange(length, length);
58
+ }
59
+ }
60
+
61
+ isCancelBeforeStart(): boolean {
62
+ return !!this.props.eventKey && this.props.eventKey.length === 1 && '1234567890'.indexOf(this.props.eventKey) < 0;
63
+ }
64
+
65
+ render() {
66
+ return (
67
+ <HexaFormattedInput
68
+ ref={(component) => {
69
+ this.inputComponent = component;
70
+ }}
71
+ value={this.state.value ?? ""}
72
+ maxLength={this.props.maxLength}
73
+ onChange={value => {
74
+ if (KeyboardUtils.isKeyPressed(Key.Alt)) {
75
+ // ignore navigational keystrokes ALT+cursor arrow
76
+ return;
77
+ }
78
+ if (value) {
79
+ this.setState({value: value});
80
+ this.props.onValueChange(value);
81
+ } else {
82
+ this.setState({value: null});
83
+ this.props.onValueChange(null);
84
+ }
85
+ }}
86
+ size={"small"}
87
+ />
88
+ )
89
+ }
90
+ }
91
+
92
+ export default withAgGridHooks(HexaValueCellEditor)
@@ -0,0 +1,115 @@
1
+ import React from 'react';
2
+ import {InputNumber} from "antd";
3
+ import {Key} from "ts-key-enum";
4
+ import KeyboardUtils from "d2coreui/components/keyboard/keyboardUtils";
5
+ import {CellEditorUtils} from "./cellEditorUtils";
6
+ import {DataGridCellEditorComponent, withAgGridHooks} from "./dataGridCellEditorComponent";
7
+ import {CustomCellEditorProps} from "ag-grid-react";
8
+
9
+ interface NumberCellEditorProperties extends CustomCellEditorProps {
10
+ decimalSeparator?: string
11
+ precision?: number
12
+ min?: number
13
+ max?: number
14
+ }
15
+
16
+ interface NumericCellEditorState {
17
+ value: number | null
18
+ }
19
+
20
+ class NumberCellEditor extends DataGridCellEditorComponent<NumberCellEditorProperties, NumericCellEditorState> {
21
+ private inputComponent: HTMLInputElement | null = null;
22
+
23
+ constructor(props: Readonly<NumberCellEditorProperties>) {
24
+ super(props);
25
+ this.state = this.getInitialState(props);
26
+ }
27
+
28
+ getInitialState(props: Readonly<NumberCellEditorProperties>): NumericCellEditorState {
29
+ let value: number | null;
30
+
31
+ if (props.eventKey === Key.Backspace || props.eventKey === Key.Delete) {
32
+ // if backspace or delete pressed, we clear the cell
33
+ value = null;
34
+ props.onValueChange(null);
35
+ } else if (props.eventKey && props.eventKey.length === 1) {
36
+ // if a letter was pressed, we start with the letter
37
+ const parsedValue = Number.parseInt(props.eventKey);
38
+ value = isNaN(parsedValue) ? props.value : parsedValue;
39
+ props.onValueChange(value);
40
+ } else {
41
+ // otherwise we start with the current value
42
+ value = props.value;
43
+ }
44
+ return {
45
+ value: value,
46
+ } as NumericCellEditorState;
47
+ }
48
+
49
+ focus() {
50
+ this.inputComponent?.focus();
51
+ }
52
+
53
+ select() {
54
+ this.inputComponent?.select();
55
+ }
56
+
57
+ placeCursorToEnd() {
58
+ // when we started editing, we want the carot at the end, not the start.
59
+ // this comes into play in two scenarios: a) when user hits F2 and b)
60
+ // when user hits a printable character, then on IE (and only IE) the carot
61
+ // was placed after the first character, thus 'apply' would end up as 'pplea'
62
+ const length = this.inputComponent?.value ? this.inputComponent?.value.length : 0;
63
+ if (length > 0) {
64
+ this.inputComponent?.setSelectionRange(length, length);
65
+ }
66
+ }
67
+
68
+
69
+ isCancelBeforeStart(): boolean {
70
+ return !!this.props.eventKey && this.props.eventKey.length === 1 && '1234567890'.indexOf(this.props.eventKey) < 0;
71
+ }
72
+
73
+
74
+ render() {
75
+ return (
76
+ <InputNumber
77
+ ref={(component) => {
78
+ this.inputComponent = component;
79
+ }}
80
+ size="small"
81
+ autoFocus
82
+ decimalSeparator={this.props.decimalSeparator}
83
+ precision={this.props.precision}
84
+ min={this.props.min}
85
+ max={this.props.max}
86
+ placeholder={this.state.value === null ? "NULL" : ""}
87
+ value={this.state.value !== null ? this.state.value : undefined}
88
+ onChange={value => {
89
+ if (KeyboardUtils.isKeyPressed(Key.Alt)) {
90
+ // ignore navigational keystrokes ALT+cursor arrow
91
+ return;
92
+ }
93
+ if (typeof value === "number") {
94
+ this.setState({value: value});
95
+ this.props.onValueChange(value);
96
+ } else if (value === null || value === "") {
97
+ this.setState({value: null});
98
+ this.props.onValueChange(null);
99
+ }
100
+ }}
101
+ onKeyDown={(e) => {
102
+ if (CellEditorUtils.shouldIgnoreKeyEvent(e)) {
103
+ // this.props.onKeyDown(e.nativeEvent);
104
+ e.preventDefault();
105
+ e.nativeEvent.stopImmediatePropagation();
106
+ e.nativeEvent.preventDefault();
107
+ }
108
+ }}
109
+ style={{width: '100%'}}
110
+ />
111
+ );
112
+ }
113
+ }
114
+
115
+ export default withAgGridHooks(NumberCellEditor)
@@ -1,78 +1,9 @@
1
- export class RangeSelector extends BeanStub<"destroyed"> {
2
- constructor();
3
- beanName: string;
4
- wireBeans(beans: any): void;
5
- rowModel: any;
6
- dragService: any;
7
- columnModel: any;
8
- visibleColsService: any;
9
- cellNavigationService: any;
10
- pinnedRowModel: any;
11
- rowPositionUtils: any;
12
- cellPositionUtils: any;
13
- ctrlsService: any;
14
- valueService: any;
15
- mouseEventService: any;
16
- gridApi: any;
17
- eGridDiv: any;
18
- focusService: any;
19
- postConstruct(): void;
20
- cellRanges: any[] | undefined;
21
- bodyScrollListener: (() => void) | undefined;
22
- dragging: boolean | undefined;
23
- autoScrollService: AutoScrollService | undefined;
24
- cellPositionEquals(cellA: any, cellB: any): boolean;
25
- onColumnVisibleChange(): void;
26
- refreshLastRangeStart(): void;
27
- isContiguousRange(cellRange: any): boolean;
28
- getRangeStartRow(cellRange: any): any;
29
- getRangeEndRow(cellRange: any): any;
30
- setRangeToCell(cell: any, appendRange?: boolean): void;
31
- newestRangeStartCell: any;
32
- extendLatestRangeToCell(cellPosition: any): void;
33
- updateRangeEnd(cellRange: any, cellPosition: any, silent: any): void;
34
- refreshRangeStart(cellRange: any): void;
35
- getRangeEdgeColumns(cellRange: any): {
36
- left: any;
37
- right: any;
38
- };
39
- extendLatestRangeInDirection(key: any): any;
40
- setCellRange(params: any): void;
41
- setCellRanges(cellRanges: any): void;
42
- createCellRangeFromCellRangeParams(params: any): {
43
- startRow: {
44
- rowIndex: any;
45
- rowPinned: any;
46
- } | undefined;
47
- endRow: {
48
- rowIndex: any;
49
- rowPinned: any;
50
- } | undefined;
51
- columns: any;
52
- startColumn: any;
53
- } | undefined;
54
- addCellRange(params: any): void;
55
- getCellRanges(): any[] | undefined;
56
- isEmpty(): boolean;
57
- isMoreThanOneCell(): boolean;
58
- removeAllCellRanges(silent: any): void;
59
- onBodyScroll(): void;
60
- isCellInAnyRange(cell: any): boolean;
61
- isCellInSpecificRange(cell: any, range: any): any;
62
- isLastCellOfRange(cellRange: any, cell: any): boolean;
63
- isBottomRightCell(cellRange: any, cell: any): boolean;
64
- getCellRangeCount(cell: any): number;
65
- isRowInRange(rowIndex: any, floating: any, cellRange: any): any;
66
- getDraggingRange(): any;
67
- onDragStart(mouseEvent: any): void;
68
- draggingCell: any;
69
- lastMouseEvent: any;
70
- draggingRange: any;
71
- onDragging(mouseEvent: any): void;
72
- focusCell(cellPosition: any): void;
73
- onDragStop(): void;
74
- dispatchChangedEvent(started: any, finished: any, id: any): void;
75
- calculateColumnsBetween(columnFrom: any, columnTo: any): any[] | undefined;
76
- }
77
- import { BeanStub } from "ag-grid-community";
78
- import { AutoScrollService } from "ag-grid-community";
1
+ import {BeanStub, GridApi, NamedBean} from "ag-grid-community";
2
+
3
+ declare namespace rangeSelector {
4
+ class RangeSelector extends BeanStub implements NamedBean {
5
+
6
+ }
7
+ }
8
+
9
+ export = rangeSelector