d2coreui 23.0.15 → 23.0.16

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 (403) hide show
  1. package/components/color/colorSwatch.d.ts +13 -18
  2. package/components/grid/cell/rangeSelector.d.ts +78 -9
  3. package/components/grid/cell/rangeSelector.js +527 -674
  4. package/{lib/esm/components → components}/grid/export/contextMenu.js +4 -4
  5. package/components/input/draftail.d.ts +1 -186
  6. package/components/input/draftail.js +2 -1
  7. package/i18n/components.cs.json +101 -101
  8. package/i18n/components.sk.json +101 -101
  9. package/i18n/components.uk.json +101 -101
  10. package/i18n/componentsLocaleHolder.js +29 -24
  11. package/package.json +1 -1
  12. package/tsconfig.build.json +24 -24
  13. package/tsconfig.json +11 -11
  14. package/components/clipboard/clipboardUtils.ts +0 -53
  15. package/components/codemirror/SyntaxHighlighter.tsx +0 -58
  16. package/components/collapse/expandable.tsx +0 -48
  17. package/components/color/colorPicker.tsx +0 -121
  18. package/components/color/colorSwatch.jsx +0 -87
  19. package/components/color/colorUtils.ts +0 -60
  20. package/components/date/dateRangeInput.tsx +0 -468
  21. package/components/date/dateRangeInputAdvancedPanel.tsx +0 -238
  22. package/components/date/dateRangeInputConfirm.tsx +0 -200
  23. package/components/date/dateTimeInput.tsx +0 -633
  24. package/components/date/durationInput.tsx +0 -375
  25. package/components/form/NiceFormItem.tsx +0 -32
  26. package/components/grid/cell/beanAccessor.ts +0 -17
  27. package/components/grid/cell/cellEditorUtils.ts +0 -12
  28. package/components/grid/cell/customEnumCellEditor.tsx +0 -130
  29. package/components/grid/cell/dataGridCellEditorComponent.tsx +0 -61
  30. package/components/grid/cell/dateCellEditor.tsx +0 -83
  31. package/components/grid/cell/durationCellEditor.tsx +0 -105
  32. package/components/grid/cell/hexaOctetStringCellEditor.tsx +0 -101
  33. package/components/grid/cell/hexaValueCellEditor.tsx +0 -92
  34. package/components/grid/cell/numberCellEditor.tsx +0 -115
  35. package/components/grid/cell/simpleStatusTextCellEditor.tsx +0 -168
  36. package/components/grid/cell/statusTextCellEditor.tsx +0 -198
  37. package/components/grid/cell/tableDefaultRowStyleRules.ts +0 -51
  38. package/components/grid/cell/textCellEditor.tsx +0 -94
  39. package/components/grid/cell/withAgGridHooks.tsx +0 -15
  40. package/components/grid/columnUtils.ts +0 -29
  41. package/components/grid/config/columnTransfer.tsx +0 -258
  42. package/components/grid/config/dataGridEditor.tsx +0 -328
  43. package/components/grid/config/rowHeightCalculator.tsx +0 -29
  44. package/components/grid/config/rowStylePicker.tsx +0 -196
  45. package/components/grid/dataGrid.tsx +0 -2183
  46. package/components/grid/detail/detailHeaderPanel.tsx +0 -59
  47. package/components/grid/export/contextMenu.tsx +0 -154
  48. package/components/grid/export/progressPopup.tsx +0 -106
  49. package/components/grid/export/worker/clipboardExport.ts +0 -10
  50. package/components/grid/export/worker/csvExport.ts +0 -10
  51. package/components/grid/export/worker/pdfExport.ts +0 -98
  52. package/components/grid/export/worker/txtExport.ts +0 -21
  53. package/components/grid/extendedDataGrid.tsx +0 -974
  54. package/components/grid/filter/customColumnFilter.tsx +0 -14
  55. package/components/grid/filter/dataGridColumnFilter.tsx +0 -70
  56. package/components/grid/filter/dateColumnFilter.tsx +0 -34
  57. package/components/grid/filter/textColumnFilter.tsx +0 -37
  58. package/components/grid/filter/wildcardQuickFilterEngine.ts +0 -50
  59. package/components/grid/header/simpleHeader.tsx +0 -270
  60. package/components/grid/panel/dataGridPagination.tsx +0 -123
  61. package/components/grid/panel/loadingOverlay.tsx +0 -14
  62. package/components/grid/panel/noRecordsOverlay.tsx +0 -16
  63. package/components/grid/panel/tablePagination.tsx +0 -77
  64. package/components/icons/dropdownArrow.tsx +0 -67
  65. package/components/icons/undoIcon.tsx +0 -16
  66. package/components/input/autoCompleteInput.tsx +0 -174
  67. package/components/input/draftUtils.tsx +0 -62
  68. package/components/input/hexaFormattedInput.tsx +0 -64
  69. package/components/input/mask/helpers.ts +0 -154
  70. package/components/input/mask/inputMaskCore.ts +0 -452
  71. package/components/input/mask/pattern.ts +0 -122
  72. package/components/input/maskedInput.tsx +0 -275
  73. package/components/input/passwordInput.tsx +0 -62
  74. package/components/input/simpleAutoComplete.tsx +0 -60
  75. package/components/input/textarea/extractSpansOfClasses.tsx +0 -125
  76. package/components/input/textarea/getRanges.ts +0 -82
  77. package/components/input/textarea/getType.ts +0 -23
  78. package/components/input/textarea/highlighedContents.tsx +0 -20
  79. package/components/input/textarea/highlightedTextarea.css +0 -61
  80. package/components/input/textarea/mentionsWithHighlighting.tsx +0 -95
  81. package/components/keyboard/keyboardUtils.ts +0 -42
  82. package/components/modal/draggableModalProvider.tsx +0 -37
  83. package/components/modal/impl/clamp.ts +0 -4
  84. package/components/modal/impl/draggableModal.tsx +0 -36
  85. package/components/modal/impl/draggableModalContext.ts +0 -14
  86. package/components/modal/impl/draggableModalInner.tsx +0 -114
  87. package/components/modal/impl/draggableModalReducer.ts +0 -285
  88. package/components/modal/impl/getWindowSize.ts +0 -6
  89. package/components/modal/impl/index.ts +0 -5
  90. package/components/modal/impl/resizeHandle.tsx +0 -12
  91. package/components/modal/impl/useDrag.ts +0 -57
  92. package/components/modal/impl/usePrevious.ts +0 -11
  93. package/components/modal/impl/useResize.ts +0 -79
  94. package/components/modal/modalDialog.tsx +0 -172
  95. package/components/picker/enumValuePicker.tsx +0 -48
  96. package/components/platformSpecific.ts +0 -39
  97. package/components/scrollTo/dom-scroll-into-view.d.ts +0 -1
  98. package/components/scrollTo/onlyText.ts +0 -36
  99. package/components/scrollTo/scrollTo.tsx +0 -324
  100. package/components/style/withCss.tsx +0 -14
  101. package/components/style/withInputNumberCss.tsx +0 -18
  102. package/components/svg.d.ts +0 -1
  103. package/components/table/dragSortingTable.tsx +0 -123
  104. package/components/text/impl/innerSize.ts +0 -15
  105. package/components/text/impl/series.ts +0 -37
  106. package/components/text/impl/shallowEqual.ts +0 -19
  107. package/components/text/impl/uniqueId.ts +0 -5
  108. package/components/text/impl/whilst.ts +0 -25
  109. package/components/text/textFit.tsx +0 -229
  110. package/i18n/componentsLocaleLoader.d.ts +0 -9
  111. package/lib/esm/components/color/colorSwatch.d.ts +0 -13
  112. package/lib/esm/components/grid/cell/rangeSelector.d.ts +0 -78
  113. package/lib/esm/components/grid/cell/rangeSelector.js +0 -527
  114. package/lib/esm/components/input/draftail.d.ts +0 -1
  115. package/lib/esm/components/input/draftail.js +0 -2
  116. package/lib/esm/i18n/components.cs.json +0 -101
  117. package/lib/esm/i18n/components.sk.json +0 -101
  118. package/lib/esm/i18n/components.uk.json +0 -101
  119. package/lib/esm/i18n/componentsLocaleHolder.js +0 -29
  120. package/lib/esm/package.json +0 -70
  121. package/lib/esm/tsconfig.build.json +0 -24
  122. package/lib/esm/tsconfig.json +0 -11
  123. /package/{lib/esm/components → components}/clipboard/clipboardUtils.d.ts +0 -0
  124. /package/{lib/esm/components → components}/clipboard/clipboardUtils.js +0 -0
  125. /package/{lib/esm/components → components}/clipboard/clipboardUtils.js.map +0 -0
  126. /package/{lib/esm/components → components}/codemirror/SyntaxHighlighter.d.ts +0 -0
  127. /package/{lib/esm/components → components}/codemirror/SyntaxHighlighter.js +0 -0
  128. /package/{lib/esm/components → components}/codemirror/SyntaxHighlighter.js.map +0 -0
  129. /package/{lib/esm/components → components}/collapse/expandable.d.ts +0 -0
  130. /package/{lib/esm/components → components}/collapse/expandable.js +0 -0
  131. /package/{lib/esm/components → components}/collapse/expandable.js.map +0 -0
  132. /package/{lib/esm/components → components}/color/colorPicker.d.ts +0 -0
  133. /package/{lib/esm/components → components}/color/colorPicker.js +0 -0
  134. /package/{lib/esm/components → components}/color/colorPicker.js.map +0 -0
  135. /package/{lib/esm/components → components}/color/colorSwatch.js +0 -0
  136. /package/{lib/esm/components → components}/color/colorSwatch.js.map +0 -0
  137. /package/{lib/esm/components → components}/color/colorUtils.d.ts +0 -0
  138. /package/{lib/esm/components → components}/color/colorUtils.js +0 -0
  139. /package/{lib/esm/components → components}/color/colorUtils.js.map +0 -0
  140. /package/{lib/esm/components → components}/date/dateRangeInput.d.ts +0 -0
  141. /package/{lib/esm/components → components}/date/dateRangeInput.js +0 -0
  142. /package/{lib/esm/components → components}/date/dateRangeInput.js.map +0 -0
  143. /package/{lib/esm/components → components}/date/dateRangeInputAdvancedPanel.d.ts +0 -0
  144. /package/{lib/esm/components → components}/date/dateRangeInputAdvancedPanel.js +0 -0
  145. /package/{lib/esm/components → components}/date/dateRangeInputAdvancedPanel.js.map +0 -0
  146. /package/{lib/esm/components → components}/date/dateRangeInputConfirm.d.ts +0 -0
  147. /package/{lib/esm/components → components}/date/dateRangeInputConfirm.js +0 -0
  148. /package/{lib/esm/components → components}/date/dateRangeInputConfirm.js.map +0 -0
  149. /package/{lib/esm/components → components}/date/dateTimeInput.d.ts +0 -0
  150. /package/{lib/esm/components → components}/date/dateTimeInput.js +0 -0
  151. /package/{lib/esm/components → components}/date/dateTimeInput.js.map +0 -0
  152. /package/{lib/esm/components → components}/date/durationInput.d.ts +0 -0
  153. /package/{lib/esm/components → components}/date/durationInput.js +0 -0
  154. /package/{lib/esm/components → components}/date/durationInput.js.map +0 -0
  155. /package/{lib/esm/components → components}/form/NiceFormItem.d.ts +0 -0
  156. /package/{lib/esm/components → components}/form/NiceFormItem.js +0 -0
  157. /package/{lib/esm/components → components}/form/NiceFormItem.js.map +0 -0
  158. /package/{lib/esm/components → components}/grid/cell/beanAccessor.d.ts +0 -0
  159. /package/{lib/esm/components → components}/grid/cell/beanAccessor.js +0 -0
  160. /package/{lib/esm/components → components}/grid/cell/beanAccessor.js.map +0 -0
  161. /package/{lib/esm/components → components}/grid/cell/cellEditorUtils.d.ts +0 -0
  162. /package/{lib/esm/components → components}/grid/cell/cellEditorUtils.js +0 -0
  163. /package/{lib/esm/components → components}/grid/cell/cellEditorUtils.js.map +0 -0
  164. /package/{lib/esm/components → components}/grid/cell/customEnumCellEditor.d.ts +0 -0
  165. /package/{lib/esm/components → components}/grid/cell/customEnumCellEditor.js +0 -0
  166. /package/{lib/esm/components → components}/grid/cell/customEnumCellEditor.js.map +0 -0
  167. /package/{lib/esm/components → components}/grid/cell/dataGridCellEditorComponent.d.ts +0 -0
  168. /package/{lib/esm/components → components}/grid/cell/dataGridCellEditorComponent.js +0 -0
  169. /package/{lib/esm/components → components}/grid/cell/dataGridCellEditorComponent.js.map +0 -0
  170. /package/{lib/esm/components → components}/grid/cell/dateCellEditor.d.ts +0 -0
  171. /package/{lib/esm/components → components}/grid/cell/dateCellEditor.js +0 -0
  172. /package/{lib/esm/components → components}/grid/cell/dateCellEditor.js.map +0 -0
  173. /package/{lib/esm/components → components}/grid/cell/durationCellEditor.d.ts +0 -0
  174. /package/{lib/esm/components → components}/grid/cell/durationCellEditor.js +0 -0
  175. /package/{lib/esm/components → components}/grid/cell/durationCellEditor.js.map +0 -0
  176. /package/{lib/esm/components → components}/grid/cell/hexaOctetStringCellEditor.d.ts +0 -0
  177. /package/{lib/esm/components → components}/grid/cell/hexaOctetStringCellEditor.js +0 -0
  178. /package/{lib/esm/components → components}/grid/cell/hexaOctetStringCellEditor.js.map +0 -0
  179. /package/{lib/esm/components → components}/grid/cell/hexaValueCellEditor.d.ts +0 -0
  180. /package/{lib/esm/components → components}/grid/cell/hexaValueCellEditor.js +0 -0
  181. /package/{lib/esm/components → components}/grid/cell/hexaValueCellEditor.js.map +0 -0
  182. /package/{lib/esm/components → components}/grid/cell/numberCellEditor.d.ts +0 -0
  183. /package/{lib/esm/components → components}/grid/cell/numberCellEditor.js +0 -0
  184. /package/{lib/esm/components → components}/grid/cell/numberCellEditor.js.map +0 -0
  185. /package/{lib/esm/components → components}/grid/cell/rangeSelector.js.map +0 -0
  186. /package/{lib/esm/components → components}/grid/cell/simpleStatusTextCellEditor.d.ts +0 -0
  187. /package/{lib/esm/components → components}/grid/cell/simpleStatusTextCellEditor.js +0 -0
  188. /package/{lib/esm/components → components}/grid/cell/simpleStatusTextCellEditor.js.map +0 -0
  189. /package/{lib/esm/components → components}/grid/cell/statusTextCellEditor.d.ts +0 -0
  190. /package/{lib/esm/components → components}/grid/cell/statusTextCellEditor.js +0 -0
  191. /package/{lib/esm/components → components}/grid/cell/statusTextCellEditor.js.map +0 -0
  192. /package/{lib/esm/components → components}/grid/cell/tableDefaultRowStyleRules.d.ts +0 -0
  193. /package/{lib/esm/components → components}/grid/cell/tableDefaultRowStyleRules.js +0 -0
  194. /package/{lib/esm/components → components}/grid/cell/tableDefaultRowStyleRules.js.map +0 -0
  195. /package/{lib/esm/components → components}/grid/cell/textCellEditor.d.ts +0 -0
  196. /package/{lib/esm/components → components}/grid/cell/textCellEditor.js +0 -0
  197. /package/{lib/esm/components → components}/grid/cell/textCellEditor.js.map +0 -0
  198. /package/{lib/esm/components → components}/grid/cell/withAgGridHooks.d.ts +0 -0
  199. /package/{lib/esm/components → components}/grid/cell/withAgGridHooks.js +0 -0
  200. /package/{lib/esm/components → components}/grid/cell/withAgGridHooks.js.map +0 -0
  201. /package/{lib/esm/components → components}/grid/columnUtils.d.ts +0 -0
  202. /package/{lib/esm/components → components}/grid/columnUtils.js +0 -0
  203. /package/{lib/esm/components → components}/grid/columnUtils.js.map +0 -0
  204. /package/{lib/esm/components → components}/grid/config/columnTransfer.d.ts +0 -0
  205. /package/{lib/esm/components → components}/grid/config/columnTransfer.js +0 -0
  206. /package/{lib/esm/components → components}/grid/config/columnTransfer.js.map +0 -0
  207. /package/{lib/esm/components → components}/grid/config/dataGridEditor.d.ts +0 -0
  208. /package/{lib/esm/components → components}/grid/config/dataGridEditor.js +0 -0
  209. /package/{lib/esm/components → components}/grid/config/dataGridEditor.js.map +0 -0
  210. /package/{lib/esm/components → components}/grid/config/rowHeightCalculator.d.ts +0 -0
  211. /package/{lib/esm/components → components}/grid/config/rowHeightCalculator.js +0 -0
  212. /package/{lib/esm/components → components}/grid/config/rowHeightCalculator.js.map +0 -0
  213. /package/{lib/esm/components → components}/grid/config/rowStylePicker.d.ts +0 -0
  214. /package/{lib/esm/components → components}/grid/config/rowStylePicker.js +0 -0
  215. /package/{lib/esm/components → components}/grid/config/rowStylePicker.js.map +0 -0
  216. /package/{lib/esm/components → components}/grid/dataGrid.d.ts +0 -0
  217. /package/{lib/esm/components → components}/grid/dataGrid.js +0 -0
  218. /package/{lib/esm/components → components}/grid/dataGrid.js.map +0 -0
  219. /package/{lib/esm/components → components}/grid/detail/detailHeaderPanel.d.ts +0 -0
  220. /package/{lib/esm/components → components}/grid/detail/detailHeaderPanel.js +0 -0
  221. /package/{lib/esm/components → components}/grid/detail/detailHeaderPanel.js.map +0 -0
  222. /package/{lib/esm/components → components}/grid/export/contextMenu.d.ts +0 -0
  223. /package/{lib/esm/components → components}/grid/export/contextMenu.js.map +0 -0
  224. /package/{lib/esm/components → components}/grid/export/progressPopup.d.ts +0 -0
  225. /package/{lib/esm/components → components}/grid/export/progressPopup.js +0 -0
  226. /package/{lib/esm/components → components}/grid/export/progressPopup.js.map +0 -0
  227. /package/{lib/esm/components → components}/grid/export/worker/clipboardExport.d.ts +0 -0
  228. /package/{lib/esm/components → components}/grid/export/worker/clipboardExport.js +0 -0
  229. /package/{lib/esm/components → components}/grid/export/worker/clipboardExport.js.map +0 -0
  230. /package/{lib/esm/components → components}/grid/export/worker/csvExport.d.ts +0 -0
  231. /package/{lib/esm/components → components}/grid/export/worker/csvExport.js +0 -0
  232. /package/{lib/esm/components → components}/grid/export/worker/csvExport.js.map +0 -0
  233. /package/{lib/esm/components → components}/grid/export/worker/pdfExport.d.ts +0 -0
  234. /package/{lib/esm/components → components}/grid/export/worker/pdfExport.js +0 -0
  235. /package/{lib/esm/components → components}/grid/export/worker/pdfExport.js.map +0 -0
  236. /package/{lib/esm/components → components}/grid/export/worker/txtExport.d.ts +0 -0
  237. /package/{lib/esm/components → components}/grid/export/worker/txtExport.js +0 -0
  238. /package/{lib/esm/components → components}/grid/export/worker/txtExport.js.map +0 -0
  239. /package/{lib/esm/components → components}/grid/extendedDataGrid.d.ts +0 -0
  240. /package/{lib/esm/components → components}/grid/extendedDataGrid.js +0 -0
  241. /package/{lib/esm/components → components}/grid/extendedDataGrid.js.map +0 -0
  242. /package/{lib/esm/components → components}/grid/filter/customColumnFilter.d.ts +0 -0
  243. /package/{lib/esm/components → components}/grid/filter/customColumnFilter.js +0 -0
  244. /package/{lib/esm/components → components}/grid/filter/customColumnFilter.js.map +0 -0
  245. /package/{lib/esm/components → components}/grid/filter/dataGridColumnFilter.d.ts +0 -0
  246. /package/{lib/esm/components → components}/grid/filter/dataGridColumnFilter.js +0 -0
  247. /package/{lib/esm/components → components}/grid/filter/dataGridColumnFilter.js.map +0 -0
  248. /package/{lib/esm/components → components}/grid/filter/dateColumnFilter.d.ts +0 -0
  249. /package/{lib/esm/components → components}/grid/filter/dateColumnFilter.js +0 -0
  250. /package/{lib/esm/components → components}/grid/filter/dateColumnFilter.js.map +0 -0
  251. /package/{lib/esm/components → components}/grid/filter/textColumnFilter.d.ts +0 -0
  252. /package/{lib/esm/components → components}/grid/filter/textColumnFilter.js +0 -0
  253. /package/{lib/esm/components → components}/grid/filter/textColumnFilter.js.map +0 -0
  254. /package/{lib/esm/components → components}/grid/filter/wildcardQuickFilterEngine.d.ts +0 -0
  255. /package/{lib/esm/components → components}/grid/filter/wildcardQuickFilterEngine.js +0 -0
  256. /package/{lib/esm/components → components}/grid/filter/wildcardQuickFilterEngine.js.map +0 -0
  257. /package/{lib/esm/components → components}/grid/header/simpleHeader.d.ts +0 -0
  258. /package/{lib/esm/components → components}/grid/header/simpleHeader.js +0 -0
  259. /package/{lib/esm/components → components}/grid/header/simpleHeader.js.map +0 -0
  260. /package/{lib/esm/components → components}/grid/panel/dataGridPagination.d.ts +0 -0
  261. /package/{lib/esm/components → components}/grid/panel/dataGridPagination.js +0 -0
  262. /package/{lib/esm/components → components}/grid/panel/dataGridPagination.js.map +0 -0
  263. /package/{lib/esm/components → components}/grid/panel/loadingOverlay.d.ts +0 -0
  264. /package/{lib/esm/components → components}/grid/panel/loadingOverlay.js +0 -0
  265. /package/{lib/esm/components → components}/grid/panel/loadingOverlay.js.map +0 -0
  266. /package/{lib/esm/components → components}/grid/panel/noRecordsOverlay.d.ts +0 -0
  267. /package/{lib/esm/components → components}/grid/panel/noRecordsOverlay.js +0 -0
  268. /package/{lib/esm/components → components}/grid/panel/noRecordsOverlay.js.map +0 -0
  269. /package/{lib/esm/components → components}/grid/panel/tablePagination.d.ts +0 -0
  270. /package/{lib/esm/components → components}/grid/panel/tablePagination.js +0 -0
  271. /package/{lib/esm/components → components}/grid/panel/tablePagination.js.map +0 -0
  272. /package/{lib/esm/components → components}/icons/dropdownArrow.d.ts +0 -0
  273. /package/{lib/esm/components → components}/icons/dropdownArrow.js +0 -0
  274. /package/{lib/esm/components → components}/icons/dropdownArrow.js.map +0 -0
  275. /package/{lib/esm/components → components}/icons/undoIcon.d.ts +0 -0
  276. /package/{lib/esm/components → components}/icons/undoIcon.js +0 -0
  277. /package/{lib/esm/components → components}/icons/undoIcon.js.map +0 -0
  278. /package/{lib/esm/components → components}/input/autoCompleteInput.d.ts +0 -0
  279. /package/{lib/esm/components → components}/input/autoCompleteInput.js +0 -0
  280. /package/{lib/esm/components → components}/input/autoCompleteInput.js.map +0 -0
  281. /package/{lib/esm/components → components}/input/draftUtils.d.ts +0 -0
  282. /package/{lib/esm/components → components}/input/draftUtils.js +0 -0
  283. /package/{lib/esm/components → components}/input/draftUtils.js.map +0 -0
  284. /package/{lib/esm/components → components}/input/draftail.js.map +0 -0
  285. /package/{lib/esm/components → components}/input/hexaFormattedInput.d.ts +0 -0
  286. /package/{lib/esm/components → components}/input/hexaFormattedInput.js +0 -0
  287. /package/{lib/esm/components → components}/input/hexaFormattedInput.js.map +0 -0
  288. /package/{lib/esm/components → components}/input/mask/helpers.d.ts +0 -0
  289. /package/{lib/esm/components → components}/input/mask/helpers.js +0 -0
  290. /package/{lib/esm/components → components}/input/mask/helpers.js.map +0 -0
  291. /package/{lib/esm/components → components}/input/mask/inputMaskCore.d.ts +0 -0
  292. /package/{lib/esm/components → components}/input/mask/inputMaskCore.js +0 -0
  293. /package/{lib/esm/components → components}/input/mask/inputMaskCore.js.map +0 -0
  294. /package/{lib/esm/components → components}/input/mask/pattern.d.ts +0 -0
  295. /package/{lib/esm/components → components}/input/mask/pattern.js +0 -0
  296. /package/{lib/esm/components → components}/input/mask/pattern.js.map +0 -0
  297. /package/{lib/esm/components → components}/input/maskedInput.d.ts +0 -0
  298. /package/{lib/esm/components → components}/input/maskedInput.js +0 -0
  299. /package/{lib/esm/components → components}/input/maskedInput.js.map +0 -0
  300. /package/{lib/esm/components → components}/input/passwordInput.d.ts +0 -0
  301. /package/{lib/esm/components → components}/input/passwordInput.js +0 -0
  302. /package/{lib/esm/components → components}/input/passwordInput.js.map +0 -0
  303. /package/{lib/esm/components → components}/input/simpleAutoComplete.d.ts +0 -0
  304. /package/{lib/esm/components → components}/input/simpleAutoComplete.js +0 -0
  305. /package/{lib/esm/components → components}/input/simpleAutoComplete.js.map +0 -0
  306. /package/{lib/esm/components → components}/input/textarea/extractSpansOfClasses.d.ts +0 -0
  307. /package/{lib/esm/components → components}/input/textarea/extractSpansOfClasses.js +0 -0
  308. /package/{lib/esm/components → components}/input/textarea/extractSpansOfClasses.js.map +0 -0
  309. /package/{lib/esm/components → components}/input/textarea/getRanges.d.ts +0 -0
  310. /package/{lib/esm/components → components}/input/textarea/getRanges.js +0 -0
  311. /package/{lib/esm/components → components}/input/textarea/getRanges.js.map +0 -0
  312. /package/{lib/esm/components → components}/input/textarea/getType.d.ts +0 -0
  313. /package/{lib/esm/components → components}/input/textarea/getType.js +0 -0
  314. /package/{lib/esm/components → components}/input/textarea/getType.js.map +0 -0
  315. /package/{lib/esm/components → components}/input/textarea/highlighedContents.d.ts +0 -0
  316. /package/{lib/esm/components → components}/input/textarea/highlighedContents.js +0 -0
  317. /package/{lib/esm/components → components}/input/textarea/highlighedContents.js.map +0 -0
  318. /package/{lib/esm/components → components}/input/textarea/mentionsWithHighlighting.d.ts +0 -0
  319. /package/{lib/esm/components → components}/input/textarea/mentionsWithHighlighting.js +0 -0
  320. /package/{lib/esm/components → components}/input/textarea/mentionsWithHighlighting.js.map +0 -0
  321. /package/{lib/esm/components → components}/keyboard/keyboardUtils.d.ts +0 -0
  322. /package/{lib/esm/components → components}/keyboard/keyboardUtils.js +0 -0
  323. /package/{lib/esm/components → components}/keyboard/keyboardUtils.js.map +0 -0
  324. /package/{lib/esm/components → components}/modal/draggableModalProvider.d.ts +0 -0
  325. /package/{lib/esm/components → components}/modal/draggableModalProvider.js +0 -0
  326. /package/{lib/esm/components → components}/modal/draggableModalProvider.js.map +0 -0
  327. /package/{lib/esm/components → components}/modal/impl/clamp.d.ts +0 -0
  328. /package/{lib/esm/components → components}/modal/impl/clamp.js +0 -0
  329. /package/{lib/esm/components → components}/modal/impl/clamp.js.map +0 -0
  330. /package/{lib/esm/components → components}/modal/impl/draggableModal.d.ts +0 -0
  331. /package/{lib/esm/components → components}/modal/impl/draggableModal.js +0 -0
  332. /package/{lib/esm/components → components}/modal/impl/draggableModal.js.map +0 -0
  333. /package/{lib/esm/components → components}/modal/impl/draggableModalContext.d.ts +0 -0
  334. /package/{lib/esm/components → components}/modal/impl/draggableModalContext.js +0 -0
  335. /package/{lib/esm/components → components}/modal/impl/draggableModalContext.js.map +0 -0
  336. /package/{lib/esm/components → components}/modal/impl/draggableModalInner.d.ts +0 -0
  337. /package/{lib/esm/components → components}/modal/impl/draggableModalInner.js +0 -0
  338. /package/{lib/esm/components → components}/modal/impl/draggableModalInner.js.map +0 -0
  339. /package/{lib/esm/components → components}/modal/impl/draggableModalReducer.d.ts +0 -0
  340. /package/{lib/esm/components → components}/modal/impl/draggableModalReducer.js +0 -0
  341. /package/{lib/esm/components → components}/modal/impl/draggableModalReducer.js.map +0 -0
  342. /package/{lib/esm/components → components}/modal/impl/getWindowSize.d.ts +0 -0
  343. /package/{lib/esm/components → components}/modal/impl/getWindowSize.js +0 -0
  344. /package/{lib/esm/components → components}/modal/impl/getWindowSize.js.map +0 -0
  345. /package/{lib/esm/components → components}/modal/impl/index.d.ts +0 -0
  346. /package/{lib/esm/components → components}/modal/impl/index.js +0 -0
  347. /package/{lib/esm/components → components}/modal/impl/index.js.map +0 -0
  348. /package/{lib/esm/components → components}/modal/impl/resizeHandle.d.ts +0 -0
  349. /package/{lib/esm/components → components}/modal/impl/resizeHandle.js +0 -0
  350. /package/{lib/esm/components → components}/modal/impl/resizeHandle.js.map +0 -0
  351. /package/{lib/esm/components → components}/modal/impl/useDrag.d.ts +0 -0
  352. /package/{lib/esm/components → components}/modal/impl/useDrag.js +0 -0
  353. /package/{lib/esm/components → components}/modal/impl/useDrag.js.map +0 -0
  354. /package/{lib/esm/components → components}/modal/impl/usePrevious.d.ts +0 -0
  355. /package/{lib/esm/components → components}/modal/impl/usePrevious.js +0 -0
  356. /package/{lib/esm/components → components}/modal/impl/usePrevious.js.map +0 -0
  357. /package/{lib/esm/components → components}/modal/impl/useResize.d.ts +0 -0
  358. /package/{lib/esm/components → components}/modal/impl/useResize.js +0 -0
  359. /package/{lib/esm/components → components}/modal/impl/useResize.js.map +0 -0
  360. /package/{lib/esm/components → components}/modal/modalDialog.d.ts +0 -0
  361. /package/{lib/esm/components → components}/modal/modalDialog.js +0 -0
  362. /package/{lib/esm/components → components}/modal/modalDialog.js.map +0 -0
  363. /package/{lib/esm/components → components}/picker/enumValuePicker.d.ts +0 -0
  364. /package/{lib/esm/components → components}/picker/enumValuePicker.js +0 -0
  365. /package/{lib/esm/components → components}/picker/enumValuePicker.js.map +0 -0
  366. /package/{lib/esm/components → components}/platformSpecific.d.ts +0 -0
  367. /package/{lib/esm/components → components}/platformSpecific.js +0 -0
  368. /package/{lib/esm/components → components}/platformSpecific.js.map +0 -0
  369. /package/{lib/esm/components → components}/scrollTo/onlyText.d.ts +0 -0
  370. /package/{lib/esm/components → components}/scrollTo/onlyText.js +0 -0
  371. /package/{lib/esm/components → components}/scrollTo/onlyText.js.map +0 -0
  372. /package/{lib/esm/components → components}/scrollTo/scrollTo.d.ts +0 -0
  373. /package/{lib/esm/components → components}/scrollTo/scrollTo.js +0 -0
  374. /package/{lib/esm/components → components}/scrollTo/scrollTo.js.map +0 -0
  375. /package/{lib/esm/components → components}/style/withCss.d.ts +0 -0
  376. /package/{lib/esm/components → components}/style/withCss.js +0 -0
  377. /package/{lib/esm/components → components}/style/withCss.js.map +0 -0
  378. /package/{lib/esm/components → components}/style/withInputNumberCss.d.ts +0 -0
  379. /package/{lib/esm/components → components}/style/withInputNumberCss.js +0 -0
  380. /package/{lib/esm/components → components}/style/withInputNumberCss.js.map +0 -0
  381. /package/{lib/esm/components → components}/table/dragSortingTable.d.ts +0 -0
  382. /package/{lib/esm/components → components}/table/dragSortingTable.js +0 -0
  383. /package/{lib/esm/components → components}/table/dragSortingTable.js.map +0 -0
  384. /package/{lib/esm/components → components}/text/impl/innerSize.d.ts +0 -0
  385. /package/{lib/esm/components → components}/text/impl/innerSize.js +0 -0
  386. /package/{lib/esm/components → components}/text/impl/innerSize.js.map +0 -0
  387. /package/{lib/esm/components → components}/text/impl/series.d.ts +0 -0
  388. /package/{lib/esm/components → components}/text/impl/series.js +0 -0
  389. /package/{lib/esm/components → components}/text/impl/series.js.map +0 -0
  390. /package/{lib/esm/components → components}/text/impl/shallowEqual.d.ts +0 -0
  391. /package/{lib/esm/components → components}/text/impl/shallowEqual.js +0 -0
  392. /package/{lib/esm/components → components}/text/impl/shallowEqual.js.map +0 -0
  393. /package/{lib/esm/components → components}/text/impl/uniqueId.d.ts +0 -0
  394. /package/{lib/esm/components → components}/text/impl/uniqueId.js +0 -0
  395. /package/{lib/esm/components → components}/text/impl/uniqueId.js.map +0 -0
  396. /package/{lib/esm/components → components}/text/impl/whilst.d.ts +0 -0
  397. /package/{lib/esm/components → components}/text/impl/whilst.js +0 -0
  398. /package/{lib/esm/components → components}/text/impl/whilst.js.map +0 -0
  399. /package/{lib/esm/components → components}/text/textFit.d.ts +0 -0
  400. /package/{lib/esm/components → components}/text/textFit.js +0 -0
  401. /package/{lib/esm/components → components}/text/textFit.js.map +0 -0
  402. /package/{lib/esm/i18n → i18n}/componentsLocaleHolder.d.ts +0 -0
  403. /package/{lib/esm/i18n → i18n}/componentsLocaleHolder.js.map +0 -0
@@ -1,83 +0,0 @@
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)
@@ -1,105 +0,0 @@
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)
@@ -1,101 +0,0 @@
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)
@@ -1,92 +0,0 @@
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)
@@ -1,115 +0,0 @@
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,168 +0,0 @@
1
- import React from 'react';
2
- import {Select} from "antd";
3
- import {LocaleHolder} from "d2core/i18n/localeHolder";
4
- import ReactDOM from 'react-dom';
5
- import {Key} from "ts-key-enum";
6
- import debounce from "lodash/debounce";
7
- import {RefSelectProps} from "antd/es/select";
8
- import {CustomCellEditorProps} from "ag-grid-react";
9
- import {DataGridCellEditorComponent, withAgGridHooks} from "./dataGridCellEditorComponent";
10
-
11
- interface SimpleStatusTextCellEditorProperties extends CustomCellEditorProps {
12
- decimalSeparator?: string
13
- precision?: number
14
- statusTexts: { text: string, value: number }[];
15
- }
16
-
17
- interface SimpleStatusTextCellEditorState {
18
- value: number | null
19
- opened: boolean
20
- }
21
-
22
- class SimpleStatusTextCellEditor extends DataGridCellEditorComponent<SimpleStatusTextCellEditorProperties, SimpleStatusTextCellEditorState> {
23
- private selectComponent: RefSelectProps | null = null;
24
- private wrappingComponent: HTMLDivElement | null = null;
25
-
26
- constructor(props: Readonly<SimpleStatusTextCellEditorProperties>) {
27
- super(props);
28
- this.state = this.getInitialState(props);
29
- this.updateValueFromPreselection = debounce(this.updateValueFromPreselection.bind(this), 200, {maxWait: 200});
30
- }
31
-
32
- getInitialState(props: Readonly<SimpleStatusTextCellEditorProperties>): SimpleStatusTextCellEditorState {
33
- let value: number | null;
34
- if (props.eventKey === Key.Backspace || props.eventKey === Key.Delete) {
35
- // if backspace or delete pressed, we clear the cell
36
- value = null;
37
- props.onValueChange(null);
38
- } else if (props.eventKey && props.eventKey.length === 1) {
39
- // if a letter was pressed, we start with the letter
40
- const parsedValue = Number.parseInt(props.eventKey);
41
- value = isNaN(parsedValue) ? props.value : parsedValue;
42
- props.onValueChange(value);
43
- } else {
44
- // otherwise we start with the current value
45
- value = props.initialValue;
46
- }
47
- return {
48
- value: value,
49
- cancelEdit: false,
50
- opened: true,
51
- } as SimpleStatusTextCellEditorState;
52
- }
53
-
54
- focus() {
55
- this.selectComponent?.focus();
56
- }
57
-
58
- select() {
59
- }
60
-
61
- placeCursorToEnd() {
62
- }
63
-
64
- render() {
65
- return (
66
- <div style={{width: "100%", minWidth: 150}}>
67
- <Select<number>
68
- ref={(component) => {
69
- this.selectComponent = component;
70
- }}
71
- size={"small"}
72
- virtual={false}
73
- className={"select-with-one-item"}
74
- showSearch
75
- popupMatchSelectWidth={false}
76
- style={{width: "100%", overflow: "auto", padding: 0, margin: 0}}
77
- dropdownStyle={{maxHeight: 400, overflow: 'auto'}}
78
- allowClear
79
- showAction={['focus', 'click']}
80
- filterOption={(inputValue, option) => {
81
- const inputToSearch = inputValue.toLocaleLowerCase(LocaleHolder.formattingLocale);
82
- const value = option?.value;
83
- return (value !== undefined && value !== null && typeof value === "number" && LocaleHolder.formatNumber(value).indexOf(inputToSearch) >= 0) || ((option?.title?.toLocaleLowerCase(LocaleHolder.formattingLocale).indexOf(inputToSearch) ?? -1) >= 0);
84
- }}
85
- value={this.state.value !== null ? this.state.value : undefined}
86
- onChange={(value) => {
87
- this.setState({value: value === undefined ? null : value});
88
- this.props.onValueChange(value === undefined ? null : value);
89
- }}
90
- onSelect={(value) => {
91
- this.setState({value: value === undefined ? null : value});
92
- this.props.onValueChange(value === undefined ? null : value);
93
- }}
94
- onMouseDown={() => {
95
- this.updateValueImmediately();
96
- }}
97
- open={this.state.opened}
98
- onDropdownVisibleChange={(visible) => {
99
- this.setState({opened: visible});
100
- }}
101
- getPopupContainer={(_trigger) => {
102
- // 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)
103
- return (ReactDOM.findDOMNode(this)?.parentNode ?? document.body) as HTMLElement;
104
- }}
105
- onInputKeyDown={(e) => {
106
- if (!e.altKey && (e.key === Key.ArrowUp || e.key === Key.ArrowDown)) {
107
- this.updateValueFromPreselection();
108
- }
109
- }}
110
- onSearch={() => {
111
- this.updateValueFromPreselection();
112
- }}
113
- dropdownRender={(menu) => {
114
- return (
115
- <div ref={(component) => {
116
- this.wrappingComponent = component;
117
- }}>
118
- {menu}
119
- </div>
120
- );
121
- }}
122
- >
123
- {this.props.statusTexts?.map((statusTextItem) => {
124
- return <Select.Option
125
- id={"select-value-" + statusTextItem.value}
126
- key={"" + statusTextItem.value}
127
- value={statusTextItem.value}
128
- title={statusTextItem.text}
129
- data-optionvalue={"" + statusTextItem.value}
130
- >
131
- <span
132
- onMouseDown={() => {
133
- this.setState({value: statusTextItem.value});
134
- this.props.onValueChange(statusTextItem.value);
135
- }}
136
- style={{
137
- color: "rgba(0, 0, 0, 0.85)",
138
- whiteSpace: "nowrap"
139
- }}>
140
- {`${statusTextItem.text} (${statusTextItem.value})`}
141
- </span>
142
- </Select.Option>;
143
- })}
144
- </Select>
145
- </div>
146
- );
147
- }
148
-
149
- private updateValueFromPreselection() {
150
- setTimeout(() => {
151
- this.updateValueImmediately();
152
- }, 200)
153
- }
154
-
155
- private updateValueImmediately() {
156
- let selectables: HTMLElement[] = Array.from(this.wrappingComponent?.getElementsByClassName("ant-select-item-option-active") ?? []) as HTMLElement[];
157
- if (selectables.length > 0) {
158
- const optionStringValue = selectables[0].dataset?.optionvalue;
159
- const optionValue = optionStringValue !== undefined ? Number.parseFloat(optionStringValue) : undefined
160
- if (optionValue) {
161
- this.setState({value: optionValue});
162
- this.props.onValueChange(optionValue);
163
- }
164
- }
165
- }
166
- }
167
-
168
- export default withAgGridHooks(SimpleStatusTextCellEditor)