d2coreui 21.0.33 → 23.0.0

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 (295) hide show
  1. package/components/clipboard/clipboardUtils.d.ts +4 -3
  2. package/components/clipboard/clipboardUtils.js +47 -22
  3. package/components/clipboard/clipboardUtils.js.map +1 -1
  4. package/components/codemirror/SyntaxHighlighter.d.ts +21 -21
  5. package/components/codemirror/SyntaxHighlighter.js +45 -44
  6. package/components/codemirror/SyntaxHighlighter.js.map +1 -1
  7. package/components/collapse/expandable.d.ts +13 -12
  8. package/components/collapse/expandable.js +20 -20
  9. package/components/collapse/expandable.js.map +1 -1
  10. package/components/color/colorPicker.d.ts +20 -20
  11. package/components/color/colorPicker.js +53 -53
  12. package/components/color/colorPicker.js.map +1 -1
  13. package/components/color/colorSwatch.d.ts +13 -12
  14. package/components/color/colorSwatch.js +62 -62
  15. package/components/color/colorSwatch.js.map +1 -1
  16. package/components/color/colorUtils.d.ts +7 -7
  17. package/components/color/colorUtils.js +43 -43
  18. package/components/color/colorUtils.js.map +1 -1
  19. package/components/date/dateRangeInput.d.ts +66 -64
  20. package/components/date/dateRangeInput.js +292 -297
  21. package/components/date/dateRangeInput.js.map +1 -1
  22. package/components/date/dateRangeInputAdvancedPanel.d.ts +27 -26
  23. package/components/date/dateRangeInputAdvancedPanel.js +130 -115
  24. package/components/date/dateRangeInputAdvancedPanel.js.map +1 -1
  25. package/components/date/dateRangeInputConfirm.d.ts +31 -29
  26. package/components/date/dateRangeInputConfirm.js +132 -121
  27. package/components/date/dateRangeInputConfirm.js.map +1 -1
  28. package/components/date/dateTimeInput.d.ts +72 -69
  29. package/components/date/dateTimeInput.js +440 -412
  30. package/components/date/dateTimeInput.js.map +1 -1
  31. package/components/date/durationInput.d.ts +59 -56
  32. package/components/date/durationInput.js +269 -280
  33. package/components/date/durationInput.js.map +1 -1
  34. package/components/form/NiceFormItem.d.ts +14 -14
  35. package/components/form/NiceFormItem.js +28 -31
  36. package/components/form/NiceFormItem.js.map +1 -1
  37. package/components/grid/cell/beanAccessor.d.ts +9 -0
  38. package/components/grid/cell/beanAccessor.js +13 -0
  39. package/components/grid/cell/beanAccessor.js.map +1 -0
  40. package/components/grid/cell/cellEditorUtils.d.ts +4 -4
  41. package/components/grid/cell/cellEditorUtils.js +8 -8
  42. package/components/grid/cell/customEnumCellEditor.d.ts +4 -26
  43. package/components/grid/cell/customEnumCellEditor.js +82 -91
  44. package/components/grid/cell/customEnumCellEditor.js.map +1 -1
  45. package/components/grid/cell/dataGridCellEditorComponent.d.ts +14 -0
  46. package/components/grid/cell/dataGridCellEditorComponent.js +49 -0
  47. package/components/grid/cell/dataGridCellEditorComponent.js.map +1 -0
  48. package/components/grid/cell/dateCellEditor.d.ts +4 -25
  49. package/components/grid/cell/dateCellEditor.js +53 -72
  50. package/components/grid/cell/dateCellEditor.js.map +1 -1
  51. package/components/grid/cell/durationCellEditor.d.ts +4 -24
  52. package/components/grid/cell/durationCellEditor.js +74 -97
  53. package/components/grid/cell/durationCellEditor.js.map +1 -1
  54. package/components/grid/cell/hexaOctetStringCellEditor.d.ts +4 -24
  55. package/components/grid/cell/hexaOctetStringCellEditor.js +70 -94
  56. package/components/grid/cell/hexaOctetStringCellEditor.js.map +1 -1
  57. package/components/grid/cell/hexaValueCellEditor.d.ts +4 -24
  58. package/components/grid/cell/hexaValueCellEditor.js +65 -89
  59. package/components/grid/cell/hexaValueCellEditor.js.map +1 -1
  60. package/components/grid/cell/numberCellEditor.d.ts +4 -27
  61. package/components/grid/cell/numberCellEditor.js +73 -95
  62. package/components/grid/cell/numberCellEditor.js.map +1 -1
  63. package/components/grid/cell/rangeSelector.d.ts +78 -78
  64. package/components/grid/cell/rangeSelector.js +526 -518
  65. package/components/grid/cell/rangeSelector.js.map +1 -1
  66. package/components/grid/cell/simpleStatusTextCellEditor.d.ts +4 -32
  67. package/components/grid/cell/simpleStatusTextCellEditor.js +106 -116
  68. package/components/grid/cell/simpleStatusTextCellEditor.js.map +1 -1
  69. package/components/grid/cell/statusTextCellEditor.d.ts +4 -32
  70. package/components/grid/cell/statusTextCellEditor.js +136 -159
  71. package/components/grid/cell/statusTextCellEditor.js.map +1 -1
  72. package/components/grid/cell/tableDefaultRowStyleRules.d.ts +20 -20
  73. package/components/grid/cell/tableDefaultRowStyleRules.js +29 -18
  74. package/components/grid/cell/tableDefaultRowStyleRules.js.map +1 -1
  75. package/components/grid/cell/textCellEditor.d.ts +4 -21
  76. package/components/grid/cell/textCellEditor.js +63 -85
  77. package/components/grid/cell/textCellEditor.js.map +1 -1
  78. package/components/grid/cell/withAgGridHooks.d.ts +3 -0
  79. package/components/grid/cell/withAgGridHooks.js +15 -0
  80. package/components/grid/cell/withAgGridHooks.js.map +1 -0
  81. package/components/grid/columnUtils.d.ts +5 -5
  82. package/components/grid/columnUtils.js +26 -26
  83. package/components/grid/columnUtils.js.map +1 -1
  84. package/components/grid/config/columnTransfer.d.ts +21 -22
  85. package/components/grid/config/columnTransfer.js +205 -201
  86. package/components/grid/config/columnTransfer.js.map +1 -1
  87. package/components/grid/config/dataGridEditor.d.ts +41 -41
  88. package/components/grid/config/dataGridEditor.js +181 -160
  89. package/components/grid/config/dataGridEditor.js.map +1 -1
  90. package/components/grid/config/rowHeightCalculator.d.ts +8 -0
  91. package/components/grid/config/rowHeightCalculator.js +20 -0
  92. package/components/grid/config/rowHeightCalculator.js.map +1 -0
  93. package/components/grid/config/rowStylePicker.d.ts +27 -25
  94. package/components/grid/config/rowStylePicker.js +127 -109
  95. package/components/grid/config/rowStylePicker.js.map +1 -1
  96. package/components/grid/dataGrid.d.ts +218 -206
  97. package/components/grid/dataGrid.js +1629 -1538
  98. package/components/grid/dataGrid.js.map +1 -1
  99. package/components/grid/detail/detailHeaderPanel.d.ts +13 -13
  100. package/components/grid/detail/detailHeaderPanel.js +25 -25
  101. package/components/grid/detail/detailHeaderPanel.js.map +1 -1
  102. package/components/grid/export/contextMenu.d.ts +18 -24
  103. package/components/grid/export/contextMenu.js +116 -113
  104. package/components/grid/export/contextMenu.js.map +1 -1
  105. package/components/grid/export/progressPopup.d.ts +29 -29
  106. package/components/grid/export/progressPopup.js +93 -93
  107. package/components/grid/export/progressPopup.js.map +1 -1
  108. package/components/grid/export/worker/clipboardExport.d.ts +1 -1
  109. package/components/grid/export/worker/clipboardExport.js +8 -8
  110. package/components/grid/export/worker/csvExport.d.ts +1 -1
  111. package/components/grid/export/worker/csvExport.js +8 -8
  112. package/components/grid/export/worker/pdfExport.d.ts +1 -1
  113. package/components/grid/export/worker/pdfExport.js +81 -81
  114. package/components/grid/export/worker/pdfExport.js.map +1 -1
  115. package/components/grid/export/worker/txtExport.d.ts +1 -1
  116. package/components/grid/export/worker/txtExport.js +19 -19
  117. package/components/grid/extendedDataGrid.d.ts +140 -140
  118. package/components/grid/extendedDataGrid.js +704 -695
  119. package/components/grid/extendedDataGrid.js.map +1 -1
  120. package/components/grid/filter/customColumnFilter.d.ts +5 -21
  121. package/components/grid/filter/customColumnFilter.js +11 -82
  122. package/components/grid/filter/customColumnFilter.js.map +1 -1
  123. package/components/grid/filter/dataGridColumnFilter.d.ts +17 -0
  124. package/components/grid/filter/dataGridColumnFilter.js +49 -0
  125. package/components/grid/filter/dataGridColumnFilter.js.map +1 -0
  126. package/components/grid/filter/dateColumnFilter.d.ts +7 -11
  127. package/components/grid/filter/dateColumnFilter.js +22 -56
  128. package/components/grid/filter/dateColumnFilter.js.map +1 -1
  129. package/components/grid/filter/textColumnFilter.d.ts +8 -20
  130. package/components/grid/filter/textColumnFilter.js +24 -76
  131. package/components/grid/filter/textColumnFilter.js.map +1 -1
  132. package/components/grid/filter/wildcardQuickFilterEngine.d.ts +7 -0
  133. package/components/grid/filter/wildcardQuickFilterEngine.js +48 -0
  134. package/components/grid/filter/wildcardQuickFilterEngine.js.map +1 -0
  135. package/components/grid/header/simpleHeader.d.ts +17 -16
  136. package/components/grid/header/simpleHeader.js +230 -186
  137. package/components/grid/header/simpleHeader.js.map +1 -1
  138. package/components/grid/panel/dataGridPagination.d.ts +16 -16
  139. package/components/grid/panel/dataGridPagination.js +58 -58
  140. package/components/grid/panel/dataGridPagination.js.map +1 -1
  141. package/components/grid/panel/loadingOverlay.d.ts +6 -6
  142. package/components/grid/panel/loadingOverlay.js +10 -10
  143. package/components/grid/panel/loadingOverlay.js.map +1 -1
  144. package/components/grid/panel/noRecordsOverlay.d.ts +6 -6
  145. package/components/grid/panel/noRecordsOverlay.js +10 -10
  146. package/components/grid/panel/noRecordsOverlay.js.map +1 -1
  147. package/components/grid/panel/tablePagination.d.ts +10 -10
  148. package/components/grid/panel/tablePagination.js +45 -45
  149. package/components/grid/panel/tablePagination.js.map +1 -1
  150. package/components/icons/dropdownArrow.d.ts +8 -0
  151. package/components/icons/dropdownArrow.js +59 -0
  152. package/components/icons/dropdownArrow.js.map +1 -0
  153. package/components/icons/undoIcon.d.ts +8 -8
  154. package/components/icons/undoIcon.js +6 -6
  155. package/components/input/autoCompleteInput.d.ts +35 -35
  156. package/components/input/autoCompleteInput.js +122 -121
  157. package/components/input/autoCompleteInput.js.map +1 -1
  158. package/components/input/draftUtils.d.ts +4 -4
  159. package/components/input/draftUtils.js +48 -48
  160. package/components/input/draftUtils.js.map +1 -1
  161. package/components/input/draftail.d.ts +1 -1
  162. package/components/input/draftail.js +1 -1
  163. package/components/input/hexaFormattedInput.d.ts +16 -16
  164. package/components/input/hexaFormattedInput.js +54 -54
  165. package/components/input/hexaFormattedInput.js.map +1 -1
  166. package/components/input/mask/helpers.d.ts +28 -28
  167. package/components/input/mask/helpers.js +112 -112
  168. package/components/input/mask/helpers.js.map +1 -1
  169. package/components/input/mask/inputMaskCore.d.ts +46 -46
  170. package/components/input/mask/inputMaskCore.js +278 -278
  171. package/components/input/mask/inputMaskCore.js.map +1 -1
  172. package/components/input/mask/pattern.d.ts +20 -20
  173. package/components/input/mask/pattern.js +78 -78
  174. package/components/input/mask/pattern.js.map +1 -1
  175. package/components/input/maskedInput.d.ts +373 -351
  176. package/components/input/maskedInput.js +224 -224
  177. package/components/input/maskedInput.js.map +1 -1
  178. package/components/input/passwordInput.d.ts +9 -9
  179. package/components/input/passwordInput.js +55 -55
  180. package/components/input/passwordInput.js.map +1 -1
  181. package/components/input/simpleAutoComplete.d.ts +12 -12
  182. package/components/input/simpleAutoComplete.js +41 -43
  183. package/components/input/simpleAutoComplete.js.map +1 -1
  184. package/components/input/textarea/extractSpansOfClasses.d.ts +15 -15
  185. package/components/input/textarea/extractSpansOfClasses.js +96 -96
  186. package/components/input/textarea/extractSpansOfClasses.js.map +1 -1
  187. package/components/input/textarea/getRanges.d.ts +1 -1
  188. package/components/input/textarea/getRanges.js +73 -73
  189. package/components/input/textarea/getRanges.js.map +1 -1
  190. package/components/input/textarea/getType.d.ts +1 -1
  191. package/components/input/textarea/getType.js +26 -26
  192. package/components/input/textarea/getType.js.map +1 -1
  193. package/components/input/textarea/highlighedContents.d.ts +6 -6
  194. package/components/input/textarea/highlighedContents.js +10 -10
  195. package/components/input/textarea/mentionsWithHighlighting.d.ts +27 -27
  196. package/components/input/textarea/mentionsWithHighlighting.js +60 -60
  197. package/components/input/textarea/mentionsWithHighlighting.js.map +1 -1
  198. package/components/keyboard/keyboardUtils.d.ts +5 -5
  199. package/components/keyboard/keyboardUtils.js +32 -32
  200. package/components/modal/draggableModalProvider.d.ts +4 -4
  201. package/components/modal/draggableModalProvider.js +21 -21
  202. package/components/modal/draggableModalProvider.js.map +1 -1
  203. package/components/modal/impl/clamp.d.ts +1 -1
  204. package/components/modal/impl/clamp.js +1 -1
  205. package/components/modal/impl/clamp.js.map +1 -1
  206. package/components/modal/impl/draggableModal.d.ts +12 -12
  207. package/components/modal/impl/draggableModal.js +17 -17
  208. package/components/modal/impl/draggableModal.js.map +1 -1
  209. package/components/modal/impl/draggableModalContext.d.ts +9 -9
  210. package/components/modal/impl/draggableModalContext.js +2 -2
  211. package/components/modal/impl/draggableModalContext.js.map +1 -1
  212. package/components/modal/impl/draggableModalInner.d.ts +15 -13
  213. package/components/modal/impl/draggableModalInner.js +57 -55
  214. package/components/modal/impl/draggableModalInner.js.map +1 -1
  215. package/components/modal/impl/draggableModalReducer.d.ts +66 -62
  216. package/components/modal/impl/draggableModalReducer.js +77 -78
  217. package/components/modal/impl/draggableModalReducer.js.map +1 -1
  218. package/components/modal/impl/getWindowSize.d.ts +4 -4
  219. package/components/modal/impl/getWindowSize.js +4 -4
  220. package/components/modal/impl/getWindowSize.js.map +1 -1
  221. package/components/modal/impl/index.d.ts +3 -3
  222. package/components/modal/impl/index.js +3 -3
  223. package/components/modal/impl/index.js.map +1 -1
  224. package/components/modal/impl/resizeHandle.d.ts +3 -3
  225. package/components/modal/impl/resizeHandle.js +4 -4
  226. package/components/modal/impl/resizeHandle.js.map +1 -1
  227. package/components/modal/impl/useDrag.d.ts +5 -5
  228. package/components/modal/impl/useDrag.js +42 -42
  229. package/components/modal/impl/useDrag.js.map +1 -1
  230. package/components/modal/impl/usePrevious.d.ts +1 -1
  231. package/components/modal/impl/usePrevious.js +8 -8
  232. package/components/modal/impl/usePrevious.js.map +1 -1
  233. package/components/modal/impl/useResize.d.ts +7 -7
  234. package/components/modal/impl/useResize.js +46 -46
  235. package/components/modal/impl/useResize.js.map +1 -1
  236. package/components/modal/modalDialog.d.ts +49 -49
  237. package/components/modal/modalDialog.js +152 -152
  238. package/components/modal/modalDialog.js.map +1 -1
  239. package/components/picker/enumValuePicker.d.ts +16 -16
  240. package/components/picker/enumValuePicker.js +34 -34
  241. package/components/picker/enumValuePicker.js.map +1 -1
  242. package/components/platformSpecific.d.ts +10 -10
  243. package/components/platformSpecific.js +27 -27
  244. package/components/scrollTo/onlyText.d.ts +4 -4
  245. package/components/scrollTo/onlyText.js +30 -30
  246. package/components/scrollTo/onlyText.js.map +1 -1
  247. package/components/scrollTo/scrollTo.d.ts +41 -39
  248. package/components/scrollTo/scrollTo.js +264 -264
  249. package/components/scrollTo/scrollTo.js.map +1 -1
  250. package/components/style/withCss.d.ts +9 -0
  251. package/components/style/withCss.js +6 -0
  252. package/components/style/withCss.js.map +1 -0
  253. package/components/style/withInputNumberCss.d.ts +6 -0
  254. package/components/style/withInputNumberCss.js +13 -0
  255. package/components/style/withInputNumberCss.js.map +1 -0
  256. package/components/table/dragSortingTable.d.ts +13 -14
  257. package/components/table/dragSortingTable.js +96 -82
  258. package/components/table/dragSortingTable.js.map +1 -1
  259. package/components/text/impl/innerSize.d.ts +2 -2
  260. package/components/text/impl/innerSize.js +12 -12
  261. package/components/text/impl/series.d.ts +1 -1
  262. package/components/text/impl/series.js +28 -28
  263. package/components/text/impl/shallowEqual.d.ts +1 -1
  264. package/components/text/impl/shallowEqual.js +18 -18
  265. package/components/text/impl/shallowEqual.js.map +1 -1
  266. package/components/text/impl/uniqueId.d.ts +1 -1
  267. package/components/text/impl/uniqueId.js +4 -4
  268. package/components/text/impl/whilst.d.ts +1 -1
  269. package/components/text/impl/whilst.js +19 -19
  270. package/components/text/impl/whilst.js.map +1 -1
  271. package/components/text/textFit.d.ts +38 -38
  272. package/components/text/textFit.js +165 -168
  273. package/components/text/textFit.js.map +1 -1
  274. package/i18n/components.cs.json +101 -100
  275. package/i18n/components.sk.json +101 -100
  276. package/i18n/components.uk.json +101 -100
  277. package/i18n/componentsLocaleHolder.d.ts +3 -3
  278. package/i18n/componentsLocaleHolder.js +28 -28
  279. package/i18n/componentsLocaleHolder.js.map +1 -1
  280. package/package.json +71 -70
  281. package/style/index.less +274 -298
  282. package/style/modal/DraggableModal.css +43 -40
  283. package/style/modal/ResizeHandle.css +27 -19
  284. package/tsconfig.build.json +24 -24
  285. package/tsconfig.json +11 -11
  286. package/components/grid/cell/wildcardQuickFilter.d.ts +0 -11
  287. package/components/grid/cell/wildcardQuickFilter.js +0 -61
  288. package/components/grid/cell/wildcardQuickFilter.js.map +0 -1
  289. package/components/table/dataTable.d.ts +0 -17
  290. package/components/table/dataTable.js +0 -79
  291. package/components/table/dataTable.js.map +0 -1
  292. package/style/antd/antd-tree-showline.css +0 -25
  293. package/style/antd/full-height-tabs.scss +0 -63
  294. package/style/draftail/draftail-editor.css +0 -179
  295. package/style/table/dragSortingTable.css +0 -7
@@ -1,110 +1,128 @@
1
- import React from "react";
2
- import { BgColorsOutlined, BoldOutlined, FontColorsOutlined } from "@ant-design/icons";
3
- import { Button, Divider, InputNumber } from "antd";
4
- import i18n from "d2core/i18n/i18n";
5
- import PlatformSpecific from "../../platformSpecific";
6
- import ColorPicker from "../../color/colorPicker";
7
- export default class RowStylePicker extends React.Component {
8
- constructor(props) {
9
- super(props);
10
- this.state = {
11
- disableColorEdit: PlatformSpecific.INSTANCE.configurationChangesDisabled(),
12
- };
13
- this.onChange = this.onChange.bind(this);
14
- }
15
- onChange(style) {
16
- const textColor = style.color;
17
- const rowStyleRule = this.props.rowStyleRule;
18
- if (textColor === null) {
19
- delete rowStyleRule.style.color;
20
- }
21
- else if (typeof textColor === 'object') {
22
- if (textColor.rgb.r === 0 && textColor.rgb.g === 0 && textColor.rgb.b === 0 && textColor.rgb.a === 0) {
23
- delete rowStyleRule.style.color;
24
- }
25
- else if (textColor.rgb.a === 0 || textColor.rgb.a === 1) {
26
- rowStyleRule.style.color = textColor.hex;
27
- }
28
- else {
29
- rowStyleRule.style.color = textColor.rgb;
30
- }
31
- }
32
- else if (textColor !== undefined) {
33
- rowStyleRule.style.color = textColor;
34
- }
35
- const backgroundColor = style.backgroundColor;
36
- if (backgroundColor === null) {
37
- delete rowStyleRule.style.backgroundColor;
38
- }
39
- else if (typeof backgroundColor === 'object') {
40
- if (backgroundColor.rgb.r === 0 && backgroundColor.rgb.g === 0 && backgroundColor.rgb.b === 0 && backgroundColor.rgb.a === 0) {
41
- delete rowStyleRule.style.backgroundColor;
42
- }
43
- else if (backgroundColor.rgb.a === 0 || backgroundColor.rgb.a === 1) {
44
- rowStyleRule.style.backgroundColor = backgroundColor.hex;
45
- }
46
- else {
47
- rowStyleRule.style.backgroundColor = backgroundColor.rgb;
48
- }
49
- }
50
- else if (backgroundColor !== undefined) {
51
- rowStyleRule.style.backgroundColor = backgroundColor;
52
- }
53
- if (style.fontWeight === null) {
54
- delete rowStyleRule.style.fontWeight;
55
- }
56
- else if (style.fontWeight !== undefined) {
57
- rowStyleRule.style.fontWeight = style.fontWeight;
58
- }
59
- if (style.fontSize === null) {
60
- delete rowStyleRule.style.fontSize;
61
- }
62
- else if (style.fontSize !== undefined) {
63
- rowStyleRule.style.fontSize = style.fontSize;
64
- }
65
- this.props.onChange(rowStyleRule);
66
- }
67
- render() {
68
- return React.createElement(React.Fragment, null,
69
- this.props.rowStyleRule.divider &&
70
- React.createElement(Divider, { style: { fontSize: 12 } }, i18n(this.props.rowStyleRule.divider)),
71
- React.createElement("div", { style: { display: "flex" } },
72
- React.createElement("div", { style: { flexGrow: 1 } }, i18n(this.props.rowStyleRule.name)),
73
- this.props.rowStyleRule.styleEditor && this.props.rowStyleRule.styleEditor.color &&
74
- React.createElement("div", { style: { marginBottom: 8, marginLeft: 16 } },
75
- React.createElement(ColorPicker, { title: i18n("Background Color"), disabled: this.state.disableColorEdit, placement: "left", color: this.getColor(), onChangeComplete: color => {
76
- this.onChange({ color: color });
77
- }, onResetColor: () => {
78
- this.onChange({ color: null });
79
- }, badgeIcon: React.createElement(FontColorsOutlined, null), transparentColorAllowed: true })),
80
- this.props.rowStyleRule.styleEditor && this.props.rowStyleRule.styleEditor.backgroundColor &&
81
- React.createElement("div", { style: { marginBottom: 8, marginLeft: 16 } },
82
- React.createElement(ColorPicker, { title: i18n("Background Color"), disabled: this.state.disableColorEdit, placement: "left", color: this.getBackgroundColor(), onChangeComplete: color => {
83
- this.onChange({ backgroundColor: color });
84
- }, onResetColor: () => {
85
- this.onChange({ backgroundColor: null });
86
- }, badgeIcon: React.createElement(BgColorsOutlined, null), transparentColorAllowed: true })),
87
- this.props.rowStyleRule.styleEditor && this.props.rowStyleRule.styleEditor.fontWeight &&
88
- React.createElement("div", { style: { marginBottom: 8, marginLeft: 16 } },
89
- React.createElement(Button, { icon: React.createElement(BoldOutlined, null), disabled: this.state.disableColorEdit, type: this.props.rowStyleRule.style.fontWeight === "bold" ? "primary" : "default", onClick: () => {
90
- this.onChange({ fontWeight: this.props.rowStyleRule.style.fontWeight === "bold" ? null : "bold" });
91
- } })),
92
- this.props.rowStyleRule.styleEditor && this.props.rowStyleRule.styleEditor.fontSize &&
93
- React.createElement("div", { style: { marginBottom: 8, marginLeft: 16 } },
94
- React.createElement(InputNumber, { style: { width: 70 }, className: "custom", min: 10, max: 50, value: this.getFontSize(), onChange: (fontSize) => {
95
- if (fontSize && typeof fontSize === "number") {
96
- this.onChange({ fontSize: fontSize });
97
- }
98
- } }))));
99
- }
100
- getColor() {
101
- return this.props.rowStyleRule.style.color;
102
- }
103
- getBackgroundColor() {
104
- return this.props.rowStyleRule.style.backgroundColor;
105
- }
106
- getFontSize() {
107
- return this.props.rowStyleRule.style.fontSize;
108
- }
109
- }
1
+ import React from "react";
2
+ import { BgColorsOutlined, BoldOutlined, FontColorsOutlined } from "@ant-design/icons";
3
+ import { Button, Divider, InputNumber } from "antd";
4
+ import i18n from "d2core/i18n/i18n";
5
+ import PlatformSpecific from "../../platformSpecific";
6
+ import ColorPicker from "../../color/colorPicker";
7
+ import { GRID_DEFAULT_ROW_HEIGHT_DELTA } from "./rowHeightCalculator";
8
+ export default class RowStylePicker extends React.Component {
9
+ constructor(props) {
10
+ super(props);
11
+ this.state = {
12
+ disableColorEdit: PlatformSpecific.INSTANCE.configurationChangesDisabled(),
13
+ };
14
+ this.onChange = this.onChange.bind(this);
15
+ }
16
+ onChange(style) {
17
+ const textColor = style.color;
18
+ const rowStyleRule = this.props.rowStyleRule;
19
+ if (textColor === null) {
20
+ delete rowStyleRule.style.color;
21
+ }
22
+ else if (typeof textColor === 'object') {
23
+ if (textColor.rgb.r === 0 && textColor.rgb.g === 0 && textColor.rgb.b === 0 && textColor.rgb.a === 0) {
24
+ delete rowStyleRule.style.color;
25
+ }
26
+ else if (textColor.rgb.a === 0 || textColor.rgb.a === 1) {
27
+ rowStyleRule.style.color = textColor.hex;
28
+ }
29
+ else {
30
+ rowStyleRule.style.color = textColor.rgb;
31
+ }
32
+ }
33
+ else if (textColor !== undefined) {
34
+ rowStyleRule.style.color = textColor;
35
+ }
36
+ const backgroundColor = style.backgroundColor;
37
+ if (backgroundColor === null) {
38
+ delete rowStyleRule.style.backgroundColor;
39
+ }
40
+ else if (typeof backgroundColor === 'object') {
41
+ if (backgroundColor.rgb.r === 0 && backgroundColor.rgb.g === 0 && backgroundColor.rgb.b === 0 && backgroundColor.rgb.a === 0) {
42
+ delete rowStyleRule.style.backgroundColor;
43
+ }
44
+ else if (backgroundColor.rgb.a === 0 || backgroundColor.rgb.a === 1) {
45
+ rowStyleRule.style.backgroundColor = backgroundColor.hex;
46
+ }
47
+ else {
48
+ rowStyleRule.style.backgroundColor = backgroundColor.rgb;
49
+ }
50
+ }
51
+ else if (backgroundColor !== undefined) {
52
+ rowStyleRule.style.backgroundColor = backgroundColor;
53
+ }
54
+ if (style.fontWeight === null) {
55
+ delete rowStyleRule.style.fontWeight;
56
+ }
57
+ else if (style.fontWeight !== undefined) {
58
+ rowStyleRule.style.fontWeight = style.fontWeight;
59
+ }
60
+ if (style.fontSize === null) {
61
+ delete rowStyleRule.style.fontSize;
62
+ }
63
+ else if (style.fontSize !== undefined) {
64
+ rowStyleRule.style.fontSize = style.fontSize;
65
+ }
66
+ if (style.rowHeightDelta === null) {
67
+ delete rowStyleRule.style.rowHeightDelta;
68
+ }
69
+ else if (style.rowHeightDelta !== undefined) {
70
+ rowStyleRule.style.rowHeightDelta = style.rowHeightDelta;
71
+ }
72
+ this.props.onChange(rowStyleRule);
73
+ }
74
+ render() {
75
+ return React.createElement(React.Fragment, null,
76
+ this.props.rowStyleRule.divider &&
77
+ React.createElement(Divider, { style: { fontSize: 12 } }, i18n(this.props.rowStyleRule.divider)),
78
+ React.createElement("div", { style: { display: "flex" } },
79
+ React.createElement("div", { style: { flexGrow: 1 } }, i18n(this.props.rowStyleRule.name)),
80
+ this.props.rowStyleRule.styleEditor && this.props.rowStyleRule.styleEditor.color &&
81
+ React.createElement("div", { style: { marginBottom: 8, marginLeft: 16 } },
82
+ React.createElement(ColorPicker, { title: i18n("Background Color"), disabled: this.state.disableColorEdit, placement: "left", color: this.getColor(), onChangeComplete: color => {
83
+ this.onChange({ color: color });
84
+ }, onResetColor: () => {
85
+ this.onChange({ color: null });
86
+ }, badgeIcon: React.createElement(FontColorsOutlined, null), transparentColorAllowed: true })),
87
+ this.props.rowStyleRule.styleEditor && this.props.rowStyleRule.styleEditor.backgroundColor &&
88
+ React.createElement("div", { style: { marginBottom: 8, marginLeft: 16 } },
89
+ React.createElement(ColorPicker, { title: i18n("Background Color"), disabled: this.state.disableColorEdit, placement: "left", color: this.getBackgroundColor(), onChangeComplete: color => {
90
+ this.onChange({ backgroundColor: color });
91
+ }, onResetColor: () => {
92
+ this.onChange({ backgroundColor: null });
93
+ }, badgeIcon: React.createElement(BgColorsOutlined, null), transparentColorAllowed: true })),
94
+ this.props.rowStyleRule.styleEditor && this.props.rowStyleRule.styleEditor.fontWeight &&
95
+ React.createElement("div", { style: { marginBottom: 8, marginLeft: 16 } },
96
+ React.createElement(Button, { icon: React.createElement(BoldOutlined, null), disabled: this.state.disableColorEdit, type: this.props.rowStyleRule.style.fontWeight === "bold" ? "primary" : "default", onClick: () => {
97
+ this.onChange({ fontWeight: this.props.rowStyleRule.style.fontWeight === "bold" ? null : "bold" });
98
+ } })),
99
+ this.props.rowStyleRule.styleEditor && this.props.rowStyleRule.styleEditor.fontSize &&
100
+ React.createElement("div", { style: { marginBottom: 8, marginLeft: 16 } },
101
+ React.createElement(InputNumber, { style: { width: 70 }, className: "custom", min: 10, max: 50, value: this.getFontSize(), onChange: (fontSize) => {
102
+ if (fontSize && typeof fontSize === "number") {
103
+ this.onChange({ fontSize: fontSize });
104
+ }
105
+ } })),
106
+ this.props.rowStyleRule.styleEditor && this.props.rowStyleRule.styleEditor.rowHeightDelta &&
107
+ React.createElement("div", { style: { marginBottom: 8, marginLeft: 16 } },
108
+ React.createElement(InputNumber, { style: { width: 70 }, min: 1, max: 28, value: this.getRowHeightDelta(), onChange: (rowHeightDelta) => {
109
+ if (rowHeightDelta && typeof rowHeightDelta === "number") {
110
+ this.onChange({ rowHeightDelta: rowHeightDelta });
111
+ }
112
+ } }))));
113
+ }
114
+ getColor() {
115
+ return this.props.rowStyleRule.style.color;
116
+ }
117
+ getBackgroundColor() {
118
+ return this.props.rowStyleRule.style.backgroundColor;
119
+ }
120
+ getFontSize() {
121
+ return this.props.rowStyleRule.style.fontSize;
122
+ }
123
+ getRowHeightDelta() {
124
+ var _a;
125
+ return (_a = this.props.rowStyleRule.style.rowHeightDelta) !== null && _a !== void 0 ? _a : GRID_DEFAULT_ROW_HEIGHT_DELTA;
126
+ }
127
+ }
110
128
  //# sourceMappingURL=rowStylePicker.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"rowStylePicker.js","sourceRoot":"","sources":["../../../../../components/grid/config/rowStylePicker.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAC,gBAAgB,EAAE,YAAY,EAAE,kBAAkB,EAAC,MAAM,mBAAmB,CAAC;AACrF,OAAO,EAAC,MAAM,EAAE,OAAO,EAAE,WAAW,EAAC,MAAM,MAAM,CAAC;AAClD,OAAO,IAAI,MAAM,kBAAkB,CAAC;AAGpC,OAAO,gBAAgB,MAAM,wBAAwB,CAAC;AACtD,OAAO,WAAW,MAAM,yBAAyB,CAAC;AAkBlD,MAAM,CAAC,OAAO,OAAO,cAAe,SAAQ,KAAK,CAAC,SAAmD;IAEjG,YAAY,KAAoC;QAC5C,KAAK,CAAC,KAAK,CAAC,CAAC;QAEb,IAAI,CAAC,KAAK,GAAG;YACT,gBAAgB,EAAE,gBAAgB,CAAC,QAAQ,CAAC,4BAA4B,EAAE;SAC7E,CAAA;QAED,IAAI,CAAC,QAAQ,GAAG,IAAI,CA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W,IACR,KAAK,EAAE,EAAC,KAAK,EAAE,EAAE,EAAC,EAClB,SAAS,EAAC,QAAQ,EAClB,GAAG,EAAE,EAAE,EACP,GAAG,EAAE,EAAE,EACP,KAAK,EAAE,IAAI,CAAC,WAAW,EAAE,EACzB,QAAQ,EAAE,CAAC,QAAQ,EAAE,EAAE;gCACnB,IAAI,QAAQ,IAAI,OAAO,QAAQ,KAAK,QAAQ,EAAE;oCAC1C,IAAI,CAAC,QAAQ,CAAC,EAAC,QAAQ,EAAE,QAAQ,EAAC,CAAC,CAAC;iCACvC;4BACL,CAAC,GACH,CACA,CACJ,CACP,CAAC;IACR,CAAC;IAEO,QAAQ;QAEZ,OAAO,IAAI,CAAC,KAAK,CAAC,YAAY,CAAC,KAAK,CAAC,KAAK,CAAC;IAC/C,CAAC;IAEO,kBAAkB;QAEtB,OAAO,IAAI,CAAC,KAAK,CAAC,YAAY,CAAC,KAAK,CAAC,eAAe,CAAC;IACzD,CAAC;IAEO,WAAW;QACf,OAAO,IAAI,CAAC,KAAK,CAAC,YAAY,CAAC,KAAK,CAAC,QAAkB,CAAC;IAC5D,CAAC;CACJ","sourcesContent":["import React from \"react\";\nimport {BgColorsOutlined, BoldOutlined, FontColorsOutlined} from \"@ant-design/icons\";\nimport {Button, Divider, InputNumber} from \"antd\";\nimport i18n from \"d2core/i18n/i18n\";\nimport {ColorResult, RGBColor} from \"react-color\";\nimport {RowStyleRule} from \"d2coreui/components/grid/cell/tableDefaultRowStyleRules\";\nimport PlatformSpecific from \"../../platformSpecific\";\nimport ColorPicker from \"../../color/colorPicker\";\n\ninterface RowStylePickerProps {\n rowStyleRule: RowStyleRule\n onChange: (rowStyleRule: RowStyleRule) => void\n}\n\ninterface RowStylePickerState {\n disableColorEdit: boolean\n}\n\ninterface StyleChange {\n color?: ColorResult | null\n backgroundColor?: ColorResult | null\n fontWeight?: string | null\n fontSize?: number | null\n}\n\nexport default class RowStylePicker extends React.Component<RowStylePickerProps, RowStylePickerState> {\n\n constructor(props: Readonly<RowStylePickerProps>) {\n super(props);\n\n this.state = {\n disableColorEdit: PlatformSpecific.INSTANCE.configurationChangesDisabled(),\n }\n\n this.onChange = this.onChange.bind(this);\n }\n\n onChange(style: StyleChange): void {\n const textColor = style.color;\n const rowStyleRule = this.props.rowStyleRule;\n if (textColor === null) {\n delete rowStyleRule.style.color;\n } else if (typeof textColor === 'object') {\n if (textColor.rgb.r === 0 && textColor.rgb.g === 0 && textColor.rgb.b === 0 && textColor.rgb.a === 0) {\n delete rowStyleRule.style.color;\n } else if (textColor.rgb.a === 0 || textColor.rgb.a === 1) {\n rowStyleRule.style.color = textColor.hex;\n } else {\n rowStyleRule.style.color = textColor.rgb;\n }\n } else if (textColor !== undefined) {\n rowStyleRule.style.color = textColor;\n }\n\n const backgroundColor = style.backgroundColor;\n if (backgroundColor === null) {\n delete rowStyleRule.style.backgroundColor;\n } else if (typeof backgroundColor === 'object') {\n if (backgroundColor.rgb.r === 0 && backgroundColor.rgb.g === 0 && backgroundColor.rgb.b === 0 && backgroundColor.rgb.a === 0) {\n delete rowStyleRule.style.backgroundColor;\n } else if (backgroundColor.rgb.a === 0 || backgroundColor.rgb.a === 1) {\n rowStyleRule.style.backgroundColor = backgroundColor.hex;\n } else {\n rowStyleRule.style.backgroundColor = backgroundColor.rgb;\n }\n } else if (backgroundColor !== undefined) {\n rowStyleRule.style.backgroundColor = backgroundColor;\n }\n\n\n if (style.fontWeight === null) {\n delete rowStyleRule.style.fontWeight;\n } else if (style.fontWeight !== undefined) {\n rowStyleRule.style.fontWeight = style.fontWeight;\n }\n if (style.fontSize === null) {\n delete rowStyleRule.style.fontSize;\n } else if (style.fontSize !== undefined) {\n rowStyleRule.style.fontSize = style.fontSize;\n }\n this.props.onChange(rowStyleRule);\n }\n\n render() {\n return <>\n {this.props.rowStyleRule.divider &&\n <Divider style={{fontSize: 12}}>{i18n(this.props.rowStyleRule.divider)}</Divider>}\n <div style={{display: \"flex\"}}>\n <div style={{flexGrow: 1}}>\n {i18n(this.props.rowStyleRule.name)}\n </div>\n {this.props.rowStyleRule.styleEditor && this.props.rowStyleRule.styleEditor.color &&\n <div style={{marginBottom: 8, marginLeft: 16}}>\n <ColorPicker\n title={i18n(\"Background Color\")}\n disabled={this.state.disableColorEdit}\n placement=\"left\"\n color={this.getColor()}\n onChangeComplete={color => {\n this.onChange({color: color})\n }}\n onResetColor={() => {\n this.onChange({color: null})\n }}\n badgeIcon={<FontColorsOutlined/>}\n transparentColorAllowed\n />\n </div>\n }\n {this.props.rowStyleRule.styleEditor && this.props.rowStyleRule.styleEditor.backgroundColor &&\n <div style={{marginBottom: 8, marginLeft: 16}}>\n <ColorPicker\n title={i18n(\"Background Color\")}\n disabled={this.state.disableColorEdit}\n placement=\"left\"\n color={this.getBackgroundColor()}\n onChangeComplete={color => {\n this.onChange({backgroundColor: color})\n }}\n onResetColor={() => {\n this.onChange({backgroundColor: null})\n }}\n badgeIcon={<BgColorsOutlined/>}\n transparentColorAllowed\n />\n </div>\n }\n {this.props.rowStyleRule.styleEditor && this.props.rowStyleRule.styleEditor.fontWeight &&\n <div style={{marginBottom: 8, marginLeft: 16}}>\n <Button icon={<BoldOutlined/>}\n disabled={this.state.disableColorEdit}\n type={this.props.rowStyleRule.style.fontWeight === \"bold\" ? \"primary\" : \"default\"}\n onClick={() => {\n this.onChange({fontWeight: this.props.rowStyleRule.style.fontWeight === \"bold\" ? null : \"bold\"})\n }}\n />\n </div>}\n {this.props.rowStyleRule.styleEditor && this.props.rowStyleRule.styleEditor.fontSize &&\n <div style={{marginBottom: 8, marginLeft: 16}}>\n <InputNumber\n style={{width: 70}}\n className=\"custom\"\n min={10}\n max={50}\n value={this.getFontSize()}\n onChange={(fontSize) => {\n if (fontSize && typeof fontSize === \"number\") {\n this.onChange({fontSize: fontSize});\n }\n }}\n />\n </div>}\n </div>\n </>;\n }\n\n private getColor(): string | RGBColor | undefined {\n // @ts-ignore\n return this.props.rowStyleRule.style.color;\n }\n\n private getBackgroundColor(): string | RGBColor | undefined {\n // @ts-ignore\n return this.props.rowStyleRule.style.backgroundColor;\n }\n\n private getFontSize() : number {\n return this.props.rowStyleRule.style.fontSize as number;\n }\n}"]}
1
+ {"version":3,"file":"rowStylePicker.js","sourceRoot":"","sources":["../../../../../components/grid/config/rowStylePicker.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAC,gBAAgB,EAAE,YAAY,EAAE,kBAAkB,EAAC,MAAM,mBAAmB,CAAC;AACrF,OAAO,EAAC,MAAM,EAAE,OAAO,EAAE,WAAW,EAAC,MAAM,MAAM,CAAC;AAClD,OAAO,IAAI,MAAM,kBAAkB,CAAC;AAGpC,OAAO,gBAAgB,MAAM,wBAAwB,CAAC;AACtD,OAAO,WAAW,MAAM,yBAAyB,CAAC;AAClD,OAAO,EAAC,6BAA6B,EAAC,MAAM,uBAAuB,CAAC;AAoBpE,MAAM,CAAC,OAAO,OAAO,cAAe,SAAQ,KAAK,CAAC,SAAmD;IAEjG,YAAY,KAAoC;QAC5C,KAAK,CAAC,KAAK,CAAC,CAAC;QAEb,IAAI,CAAC,KAAK,GAAG;YACT,gBAAgB,EAAE,gBAAgB,CAAC,QAAQ,CAAC,4BAA4B,EAAE;SAC7E,CAAA;QAED,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IAC7C,CAAC;IAED,QAAQ,CAAC,KAAkB;QACvB,MAAM,SAAS,GAAG,KAAK,CAAC,KAAK,CAAC;QAC9B,MAAM,YAAY,GAAG,IAAI,CAAC,KAAK,CAAC,YAAY,CAAC;QAC7C,IAAI,SAAS,KAAK,IAAI,EAAE,CAAC;YACrB,OAAO,YAAY,CAAC,KAAK,CAAC,KAAK,CAAC;QACpC,CAAC;aAAM,IAAI,OAAO,SAAS,KAAK,QAAQ,EAAE,CAAC;YACvC,IAAI,SAAS,CAAC,GAAG,CAAC,CAAC,KAAK,CAAC,IAA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O,IAAI,CAAC,KAAK,CAAC,YAAY,CAAC,KAAK,CAAC,QAAkB,CAAC;IAC5D,CAAC;IAEO,iBAAiB;;QACrB,OAAO,MAAA,IAAI,CAAC,KAAK,CAAC,YAAY,CAAC,KAAK,CAAC,cAAwB,mCAAI,6BAA6B,CAAC;IACnG,CAAC;CACJ","sourcesContent":["import React from \"react\";\r\nimport {BgColorsOutlined, BoldOutlined, FontColorsOutlined} from \"@ant-design/icons\";\r\nimport {Button, Divider, InputNumber} from \"antd\";\r\nimport i18n from \"d2core/i18n/i18n\";\r\nimport {ColorResult, RGBColor} from \"react-color\";\r\nimport {RowStyleRule} from \"d2coreui/components/grid/cell/tableDefaultRowStyleRules\";\r\nimport PlatformSpecific from \"../../platformSpecific\";\r\nimport ColorPicker from \"../../color/colorPicker\";\r\nimport {GRID_DEFAULT_ROW_HEIGHT_DELTA} from \"./rowHeightCalculator\";\r\n\r\n\r\ninterface RowStylePickerProps {\r\n rowStyleRule: RowStyleRule\r\n onChange: (rowStyleRule: RowStyleRule) => void\r\n}\r\n\r\ninterface RowStylePickerState {\r\n disableColorEdit: boolean\r\n}\r\n\r\ninterface StyleChange {\r\n color?: ColorResult | null\r\n backgroundColor?: ColorResult | null\r\n fontWeight?: string | null\r\n fontSize?: number | null\r\n rowHeightDelta?: number | null\r\n}\r\n\r\nexport default class RowStylePicker extends React.Component<RowStylePickerProps, RowStylePickerState> {\r\n\r\n constructor(props: Readonly<RowStylePickerProps>) {\r\n super(props);\r\n\r\n this.state = {\r\n disableColorEdit: PlatformSpecific.INSTANCE.configurationChangesDisabled(),\r\n }\r\n\r\n this.onChange = this.onChange.bind(this);\r\n }\r\n\r\n onChange(style: StyleChange): void {\r\n const textColor = style.color;\r\n const rowStyleRule = this.props.rowStyleRule;\r\n if (textColor === null) {\r\n delete rowStyleRule.style.color;\r\n } else if (typeof textColor === 'object') {\r\n if (textColor.rgb.r === 0 && textColor.rgb.g === 0 && textColor.rgb.b === 0 && textColor.rgb.a === 0) {\r\n delete rowStyleRule.style.color;\r\n } else if (textColor.rgb.a === 0 || textColor.rgb.a === 1) {\r\n rowStyleRule.style.color = textColor.hex;\r\n } else {\r\n rowStyleRule.style.color = textColor.rgb;\r\n }\r\n } else if (textColor !== undefined) {\r\n rowStyleRule.style.color = textColor;\r\n }\r\n\r\n const backgroundColor = style.backgroundColor;\r\n if (backgroundColor === null) {\r\n delete rowStyleRule.style.backgroundColor;\r\n } else if (typeof backgroundColor === 'object') {\r\n if (backgroundColor.rgb.r === 0 && backgroundColor.rgb.g === 0 && backgroundColor.rgb.b === 0 && backgroundColor.rgb.a === 0) {\r\n delete rowStyleRule.style.backgroundColor;\r\n } else if (backgroundColor.rgb.a === 0 || backgroundColor.rgb.a === 1) {\r\n rowStyleRule.style.backgroundColor = backgroundColor.hex;\r\n } else {\r\n rowStyleRule.style.backgroundColor = backgroundColor.rgb;\r\n }\r\n } else if (backgroundColor !== undefined) {\r\n rowStyleRule.style.backgroundColor = backgroundColor;\r\n }\r\n\r\n\r\n if (style.fontWeight === null) {\r\n delete rowStyleRule.style.fontWeight;\r\n } else if (style.fontWeight !== undefined) {\r\n rowStyleRule.style.fontWeight = style.fontWeight;\r\n }\r\n if (style.fontSize === null) {\r\n delete rowStyleRule.style.fontSize;\r\n } else if (style.fontSize !== undefined) {\r\n rowStyleRule.style.fontSize = style.fontSize;\r\n }\r\n if (style.rowHeightDelta === null) {\r\n delete rowStyleRule.style.rowHeightDelta;\r\n } else if (style.rowHeightDelta !== undefined) {\r\n rowStyleRule.style.rowHeightDelta = style.rowHeightDelta;\r\n }\r\n this.props.onChange(rowStyleRule);\r\n }\r\n\r\n render() {\r\n return <>\r\n {this.props.rowStyleRule.divider &&\r\n <Divider style={{fontSize: 12}}>{i18n(this.props.rowStyleRule.divider)}</Divider>}\r\n <div style={{display: \"flex\"}}>\r\n <div style={{flexGrow: 1}}>\r\n {i18n(this.props.rowStyleRule.name)}\r\n </div>\r\n {this.props.rowStyleRule.styleEditor && this.props.rowStyleRule.styleEditor.color &&\r\n <div style={{marginBottom: 8, marginLeft: 16}}>\r\n <ColorPicker\r\n title={i18n(\"Background Color\")}\r\n disabled={this.state.disableColorEdit}\r\n placement=\"left\"\r\n color={this.getColor()}\r\n onChangeComplete={color => {\r\n this.onChange({color: color})\r\n }}\r\n onResetColor={() => {\r\n this.onChange({color: null})\r\n }}\r\n badgeIcon={<FontColorsOutlined/>}\r\n transparentColorAllowed\r\n />\r\n </div>\r\n }\r\n {this.props.rowStyleRule.styleEditor && this.props.rowStyleRule.styleEditor.backgroundColor &&\r\n <div style={{marginBottom: 8, marginLeft: 16}}>\r\n <ColorPicker\r\n title={i18n(\"Background Color\")}\r\n disabled={this.state.disableColorEdit}\r\n placement=\"left\"\r\n color={this.getBackgroundColor()}\r\n onChangeComplete={color => {\r\n this.onChange({backgroundColor: color})\r\n }}\r\n onResetColor={() => {\r\n this.onChange({backgroundColor: null})\r\n }}\r\n badgeIcon={<BgColorsOutlined/>}\r\n transparentColorAllowed\r\n />\r\n </div>\r\n }\r\n {this.props.rowStyleRule.styleEditor && this.props.rowStyleRule.styleEditor.fontWeight &&\r\n <div style={{marginBottom: 8, marginLeft: 16}}>\r\n <Button icon={<BoldOutlined/>}\r\n disabled={this.state.disableColorEdit}\r\n type={this.props.rowStyleRule.style.fontWeight === \"bold\" ? \"primary\" : \"default\"}\r\n onClick={() => {\r\n this.onChange({fontWeight: this.props.rowStyleRule.style.fontWeight === \"bold\" ? null : \"bold\"})\r\n }}\r\n />\r\n </div>}\r\n {this.props.rowStyleRule.styleEditor && this.props.rowStyleRule.styleEditor.fontSize &&\r\n <div style={{marginBottom: 8, marginLeft: 16}}>\r\n <InputNumber\r\n style={{width: 70}}\r\n className=\"custom\"\r\n min={10}\r\n max={50}\r\n value={this.getFontSize()}\r\n onChange={(fontSize) => {\r\n if (fontSize && typeof fontSize === \"number\") {\r\n this.onChange({fontSize: fontSize});\r\n }\r\n }}\r\n />\r\n </div>}\r\n {this.props.rowStyleRule.styleEditor && this.props.rowStyleRule.styleEditor.rowHeightDelta &&\r\n <div style={{marginBottom: 8, marginLeft: 16}}>\r\n <InputNumber\r\n style={{width: 70}}\r\n min={1}\r\n max={28}\r\n value={this.getRowHeightDelta()}\r\n onChange={(rowHeightDelta) => {\r\n if (rowHeightDelta && typeof rowHeightDelta === \"number\") {\r\n this.onChange({rowHeightDelta: rowHeightDelta});\r\n }\r\n }}\r\n />\r\n </div>}\r\n </div>\r\n </>;\r\n }\r\n\r\n private getColor(): string | RGBColor | undefined {\r\n // @ts-ignore\r\n return this.props.rowStyleRule.style.color;\r\n }\r\n\r\n private getBackgroundColor(): string | RGBColor | undefined {\r\n // @ts-ignore\r\n return this.props.rowStyleRule.style.backgroundColor;\r\n }\r\n\r\n private getFontSize(): number {\r\n return this.props.rowStyleRule.style.fontSize as number;\r\n }\r\n\r\n private getRowHeightDelta(): number {\r\n return this.props.rowStyleRule.style.rowHeightDelta as number ?? GRID_DEFAULT_ROW_HEIGHT_DELTA;\r\n }\r\n}"]}