d2coreui 21.0.15 → 21.0.17

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 (137) hide show
  1. package/components/clipboard/clipboardUtils.js.map +1 -1
  2. package/components/codemirror/SyntaxHighlighter.js.map +1 -1
  3. package/components/collapse/expandable.js.map +1 -1
  4. package/components/color/colorPicker.d.ts +1 -0
  5. package/components/color/colorPicker.js +1 -1
  6. package/components/color/colorPicker.js.map +1 -1
  7. package/components/color/colorSwatch.js.map +1 -1
  8. package/components/color/colorUtils.js.map +1 -1
  9. package/components/date/dateRangeInput.js +2 -2
  10. package/components/date/dateRangeInput.js.map +1 -1
  11. package/components/date/dateRangeInputAdvancedPanel.js.map +1 -1
  12. package/components/date/dateRangeInputConfirm.js.map +1 -1
  13. package/components/date/dateTimeInput.d.ts +2 -0
  14. package/components/date/dateTimeInput.js +10 -4
  15. package/components/date/dateTimeInput.js.map +1 -1
  16. package/components/date/durationInput.d.ts +7 -7
  17. package/components/date/durationInput.js +128 -75
  18. package/components/date/durationInput.js.map +1 -1
  19. package/components/form/NiceFormItem.d.ts +13 -0
  20. package/components/form/NiceFormItem.js +29 -0
  21. package/components/form/NiceFormItem.js.map +1 -0
  22. package/components/grid/cell/cellEditorUtils.js.map +1 -1
  23. package/components/grid/cell/customEnumCellEditor.js.map +1 -1
  24. package/components/grid/cell/dateCellEditor.js +1 -1
  25. package/components/grid/cell/dateCellEditor.js.map +1 -1
  26. package/components/grid/cell/durationCellEditor.js.map +1 -1
  27. package/components/grid/cell/hexaOctetStringCellEditor.js.map +1 -1
  28. package/components/grid/cell/hexaValueCellEditor.js.map +1 -1
  29. package/components/grid/cell/numberCellEditor.js.map +1 -1
  30. package/components/grid/cell/rangeSelector.js.map +1 -1
  31. package/components/grid/cell/simpleStatusTextCellEditor.js.map +1 -1
  32. package/components/grid/cell/statusTextCellEditor.js.map +1 -1
  33. package/components/grid/cell/tableDefaultRowStyleRules.js.map +1 -1
  34. package/components/grid/cell/textCellEditor.js +5 -1
  35. package/components/grid/cell/textCellEditor.js.map +1 -1
  36. package/components/grid/cell/wildcardQuickFilter.js.map +1 -1
  37. package/components/grid/columnUtils.js.map +1 -1
  38. package/components/grid/config/columnTransfer.js.map +1 -1
  39. package/components/grid/config/dataGridEditor.js.map +1 -1
  40. package/components/grid/config/rowStylePicker.js.map +1 -1
  41. package/components/grid/dataGrid.d.ts +3 -2
  42. package/components/grid/dataGrid.js +51 -54
  43. package/components/grid/dataGrid.js.map +1 -1
  44. package/components/grid/export/contextMenu.d.ts +2 -1
  45. package/components/grid/export/contextMenu.js +3 -3
  46. package/components/grid/export/contextMenu.js.map +1 -1
  47. package/components/grid/export/progressPopup.js.map +1 -1
  48. package/components/grid/export/worker/clipboardExport.js.map +1 -1
  49. package/components/grid/export/worker/csvExport.js.map +1 -1
  50. package/components/grid/export/worker/pdfExport.js.map +1 -1
  51. package/components/grid/export/worker/txtExport.js.map +1 -1
  52. package/components/grid/extendedDataGrid.d.ts +1 -0
  53. package/components/grid/extendedDataGrid.js +6 -2
  54. package/components/grid/extendedDataGrid.js.map +1 -1
  55. package/components/grid/filter/customColumnFilter.js.map +1 -1
  56. package/components/grid/filter/dateColumnFilter.js.map +1 -1
  57. package/components/grid/filter/textColumnFilter.js.map +1 -1
  58. package/components/grid/header/simpleHeader.js.map +1 -1
  59. package/components/grid/panel/dataGridPagination.d.ts +16 -0
  60. package/components/grid/panel/dataGridPagination.js +59 -0
  61. package/components/grid/panel/dataGridPagination.js.map +1 -0
  62. package/components/grid/panel/loadingOverlay.js.map +1 -1
  63. package/components/grid/panel/noRecordsOverlay.js.map +1 -1
  64. package/components/grid/panel/tablePagination.js.map +1 -1
  65. package/components/icons/ant-design-double-right-outline.svg +5 -5
  66. package/components/icons/ant-design_close-outline.svg +5 -5
  67. package/components/icons/undoIcon.js.map +1 -1
  68. package/components/input/autoCompleteInput.js.map +1 -1
  69. package/components/input/draftUtils.js.map +1 -1
  70. package/components/input/draftail.js.map +1 -1
  71. package/components/input/hexaFormattedInput.js.map +1 -1
  72. package/components/input/mask/helpers.js.map +1 -1
  73. package/components/input/mask/inputMaskCore.js.map +1 -1
  74. package/components/input/mask/pattern.js.map +1 -1
  75. package/components/input/maskedInput.d.ts +2 -2
  76. package/components/input/maskedInput.js.map +1 -1
  77. package/components/input/passwordInput.js.map +1 -1
  78. package/components/input/simpleAutoComplete.js.map +1 -1
  79. package/components/input/textarea/extractSpansOfClasses.js.map +1 -1
  80. package/components/input/textarea/getRanges.js.map +1 -1
  81. package/components/input/textarea/getType.js.map +1 -1
  82. package/components/input/textarea/highlighedContents.js.map +1 -1
  83. package/components/input/textarea/mentionsWithHighlighting.js +1 -1
  84. package/components/input/textarea/mentionsWithHighlighting.js.map +1 -1
  85. package/components/keyboard/keyboardUtils.js.map +1 -1
  86. package/components/modal/draggableModalProvider.js.map +1 -1
  87. package/components/modal/impl/clamp.js.map +1 -1
  88. package/components/modal/impl/draggableModal.js.map +1 -1
  89. package/components/modal/impl/draggableModalContext.js.map +1 -1
  90. package/components/modal/impl/draggableModalInner.js.map +1 -1
  91. package/components/modal/impl/draggableModalReducer.js.map +1 -1
  92. package/components/modal/impl/getWindowSize.js.map +1 -1
  93. package/components/modal/impl/index.js.map +1 -1
  94. package/components/modal/impl/resizeHandle.js.map +1 -1
  95. package/components/modal/impl/useDrag.js.map +1 -1
  96. package/components/modal/impl/usePrevious.js.map +1 -1
  97. package/components/modal/impl/useResize.js.map +1 -1
  98. package/components/modal/modalDialog.js.map +1 -1
  99. package/components/picker/enumValuePicker.js.map +1 -1
  100. package/components/platformSpecific.js.map +1 -1
  101. package/components/scrollTo/onlyText.js.map +1 -1
  102. package/components/scrollTo/scrollTo.js.map +1 -1
  103. package/components/table/dataTable.d.ts +1 -0
  104. package/components/table/dataTable.js.map +1 -1
  105. package/components/table/dragSortingTable.js.map +1 -1
  106. package/components/text/impl/innerSize.js.map +1 -1
  107. package/components/text/impl/series.js.map +1 -1
  108. package/components/text/impl/shallowEqual.js.map +1 -1
  109. package/components/text/impl/uniqueId.js.map +1 -1
  110. package/components/text/impl/whilst.js.map +1 -1
  111. package/components/text/textFit.js.map +1 -1
  112. package/i18n/components.cs.json +100 -0
  113. package/i18n/components.sk.json +5 -1
  114. package/i18n/componentsLocaleHolder.d.ts +1 -1
  115. package/i18n/componentsLocaleHolder.js +6 -4
  116. package/i18n/componentsLocaleHolder.js.map +1 -1
  117. package/package.json +70 -70
  118. package/style/ag-grid/_ag-theme-antd-vars.scss +194 -194
  119. package/style/ag-grid/ag-theme-antd.scss +87 -87
  120. package/style/ag-grid/aggrid-adaptations.css +42 -42
  121. package/style/ag-grid/aggrid.scss +11 -11
  122. package/style/antd/antd-tree-showline.css +24 -24
  123. package/style/antd/full-height-tabs.scss +62 -62
  124. package/style/draftail/draftail-editor.css +179 -179
  125. package/style/flexLayout/flexLayout.scss +130 -130
  126. package/style/flexLayout/flexLayoutBase.scss +623 -623
  127. package/style/flexLayout/new/flexLayoutBase.scss +621 -621
  128. package/style/form/niceFormItem.css +39 -0
  129. package/style/index.less +291 -291
  130. package/style/loading.css +31 -31
  131. package/style/modal/DraggableModal.css +40 -40
  132. package/style/modal/ResizeHandle.css +19 -19
  133. package/style/splitPane/splitPane.css +48 -48
  134. package/style/table/dragSortingTable.css +6 -6
  135. package/components/date/millisecondDatePicker.d.ts +0 -16
  136. package/components/date/millisecondDatePicker.js +0 -56
  137. package/components/date/millisecondDatePicker.js.map +0 -1
@@ -1,40 +1,40 @@
1
- .ant-design-draggable-modal {
2
- overflow: hidden !important;
3
- }
4
-
5
- .ant-design-draggable-modal .ant-modal {
6
- display: flex;
7
- max-width: none;
8
- transform-origin: 50% 50% !important;
9
- }
10
-
11
- .ant-design-draggable-modal .ant-modal-content {
12
- flex: 1;
13
- display: flex;
14
- flex-direction: column;
15
- }
16
-
17
- .ant-design-draggable-modal .ant-modal-header {
18
- flex: 0;
19
- padding: 0;
20
- }
21
-
22
- .ant-design-draggable-modal .ant-modal-footer {
23
- flex: 0;
24
- padding: 16px;
25
- }
26
-
27
- .ant-design-draggable-modal .ant-design-draggable-modal-title {
28
- cursor: move;
29
- padding: 16px;
30
- }
31
-
32
- .ant-design-draggable-modal .ant-design-draggable-modal-title::before {
33
- content: '\00a0';
34
- }
35
-
36
- .ant-design-draggable-modal .ant-modal-body {
37
- flex: 1;
38
- overflow-y: auto;
39
- padding: 16px;
40
- }
1
+ .ant-design-draggable-modal {
2
+ overflow: hidden !important;
3
+ }
4
+
5
+ .ant-design-draggable-modal .ant-modal {
6
+ display: flex;
7
+ max-width: none;
8
+ transform-origin: 50% 50% !important;
9
+ }
10
+
11
+ .ant-design-draggable-modal .ant-modal-content {
12
+ flex: 1;
13
+ display: flex;
14
+ flex-direction: column;
15
+ }
16
+
17
+ .ant-design-draggable-modal .ant-modal-header {
18
+ flex: 0;
19
+ padding: 0;
20
+ }
21
+
22
+ .ant-design-draggable-modal .ant-modal-footer {
23
+ flex: 0;
24
+ padding: 16px;
25
+ }
26
+
27
+ .ant-design-draggable-modal .ant-design-draggable-modal-title {
28
+ cursor: move;
29
+ padding: 16px;
30
+ }
31
+
32
+ .ant-design-draggable-modal .ant-design-draggable-modal-title::before {
33
+ content: '\00a0';
34
+ }
35
+
36
+ .ant-design-draggable-modal .ant-modal-body {
37
+ flex: 1;
38
+ overflow-y: auto;
39
+ padding: 16px;
40
+ }
@@ -1,19 +1,19 @@
1
- .ant-design-draggable-modal-resize-handle-inner {
2
- width: 12px;
3
- right: 14px;
4
- border: 2px solid grey;
5
- height: 12px;
6
- bottom: 14px;
7
- position: absolute;
8
- border-top: 0;
9
- border-left: 0;
10
- }
11
-
12
- .ant-design-draggable-modal-resize-handle {
13
- right: -10px;
14
- width: 44px;
15
- bottom: -10px;
16
- cursor: se-resize;
17
- height: 44px;
18
- position: absolute;
19
- }
1
+ .ant-design-draggable-modal-resize-handle-inner {
2
+ width: 12px;
3
+ right: 14px;
4
+ border: 2px solid grey;
5
+ height: 12px;
6
+ bottom: 14px;
7
+ position: absolute;
8
+ border-top: 0;
9
+ border-left: 0;
10
+ }
11
+
12
+ .ant-design-draggable-modal-resize-handle {
13
+ right: -10px;
14
+ width: 44px;
15
+ bottom: -10px;
16
+ cursor: se-resize;
17
+ height: 44px;
18
+ position: absolute;
19
+ }
@@ -1,49 +1,49 @@
1
- .Resizer {
2
- background: #000;
3
- opacity: 0.2;
4
- z-index: 1;
5
- -moz-box-sizing: border-box;
6
- -webkit-box-sizing: border-box;
7
- box-sizing: border-box;
8
- -moz-background-clip: padding;
9
- -webkit-background-clip: padding;
10
- background-clip: padding-box;
11
- }
12
-
13
- .Resizer:hover {
14
- -webkit-transition: all 2s ease;
15
- transition: all 2s ease;
16
- }
17
-
18
- .Resizer.horizontal {
19
- height: 11px;
20
- margin: -5px 0;
21
- border-top: 5px solid rgba(255, 255, 255, 0);
22
- border-bottom: 5px solid rgba(255, 255, 255, 0);
23
- cursor: row-resize;
24
- width: 100%;
25
- }
26
-
27
- .Resizer.horizontal:hover {
28
- border-top: 5px solid rgba(0, 0, 0, 0.5);
29
- border-bottom: 5px solid rgba(0, 0, 0, 0.5);
30
- }
31
-
32
- .Resizer.vertical {
33
- width: 11px;
34
- margin: 0 -5px;
35
- border-left: 5px solid rgba(255, 255, 255, 0);
36
- border-right: 5px solid rgba(255, 255, 255, 0);
37
- cursor: col-resize;
38
- }
39
-
40
- .Resizer.vertical:hover {
41
- border-left: 5px solid rgba(0, 0, 0, 0.5);
42
- border-right: 5px solid rgba(0, 0, 0, 0.5);
43
- }
44
- .Resizer.disabled {
45
- cursor: not-allowed;
46
- }
47
- .Resizer.disabled:hover {
48
- border-color: transparent;
1
+ .Resizer {
2
+ background: #000;
3
+ opacity: 0.2;
4
+ z-index: 1;
5
+ -moz-box-sizing: border-box;
6
+ -webkit-box-sizing: border-box;
7
+ box-sizing: border-box;
8
+ -moz-background-clip: padding;
9
+ -webkit-background-clip: padding;
10
+ background-clip: padding-box;
11
+ }
12
+
13
+ .Resizer:hover {
14
+ -webkit-transition: all 2s ease;
15
+ transition: all 2s ease;
16
+ }
17
+
18
+ .Resizer.horizontal {
19
+ height: 11px;
20
+ margin: -5px 0;
21
+ border-top: 5px solid rgba(255, 255, 255, 0);
22
+ border-bottom: 5px solid rgba(255, 255, 255, 0);
23
+ cursor: row-resize;
24
+ width: 100%;
25
+ }
26
+
27
+ .Resizer.horizontal:hover {
28
+ border-top: 5px solid rgba(0, 0, 0, 0.5);
29
+ border-bottom: 5px solid rgba(0, 0, 0, 0.5);
30
+ }
31
+
32
+ .Resizer.vertical {
33
+ width: 11px;
34
+ margin: 0 -5px;
35
+ border-left: 5px solid rgba(255, 255, 255, 0);
36
+ border-right: 5px solid rgba(255, 255, 255, 0);
37
+ cursor: col-resize;
38
+ }
39
+
40
+ .Resizer.vertical:hover {
41
+ border-left: 5px solid rgba(0, 0, 0, 0.5);
42
+ border-right: 5px solid rgba(0, 0, 0, 0.5);
43
+ }
44
+ .Resizer.disabled {
45
+ cursor: not-allowed;
46
+ }
47
+ .Resizer.disabled:hover {
48
+ border-color: transparent;
49
49
  }
@@ -1,7 +1,7 @@
1
- tr.drop-over-downward td {
2
- border-bottom: 2px dashed #1890ff !important;
3
- }
4
-
5
- tr.drop-over-upward td {
6
- border-top: 2px dashed #1890ff !important;
1
+ tr.drop-over-downward td {
2
+ border-bottom: 2px dashed #1890ff !important;
3
+ }
4
+
5
+ tr.drop-over-upward td {
6
+ border-top: 2px dashed #1890ff !important;
7
7
  }
@@ -1,16 +0,0 @@
1
- import React from "react";
2
- import { DatePickerProps } from "antd/es/date-picker";
3
- import { Moment } from "moment";
4
- interface ExtendedDatePickerState {
5
- value: Moment;
6
- }
7
- export default class MillisecondDatePicker extends React.Component<DatePickerProps, ExtendedDatePickerState> {
8
- inputElement?: HTMLInputElement;
9
- constructor(props: Readonly<DatePickerProps>);
10
- componentDidMount(): void;
11
- componentWillUnmount(): void;
12
- onKeyPress(): void;
13
- onChange(value: Moment | null, dateString: string): void;
14
- render(): React.ReactNode;
15
- }
16
- export {};
@@ -1,56 +0,0 @@
1
- var __rest = (this && this.__rest) || function (s, e) {
2
- var t = {};
3
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
4
- t[p] = s[p];
5
- if (s != null && typeof Object.getOwnPropertySymbols === "function")
6
- for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
7
- if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
8
- t[p[i]] = s[p[i]];
9
- }
10
- return t;
11
- };
12
- import React from "react";
13
- import ReactDOM from 'react-dom';
14
- import { DatePicker } from "antd";
15
- import moment from "moment";
16
- export default class MillisecondDatePicker extends React.Component {
17
- constructor(props) {
18
- super(props);
19
- this.onKeyPress = this.onKeyPress.bind(this);
20
- this.onChange = this.onChange.bind(this);
21
- }
22
- componentDidMount() {
23
- const componentNode = ReactDOM.findDOMNode(this);
24
- this.inputElement = componentNode.getElementsByTagName('input')[0];
25
- this.inputElement.addEventListener("keyup", this.onKeyPress);
26
- }
27
- componentWillUnmount() {
28
- var _a;
29
- (_a = this.inputElement) === null || _a === void 0 ? void 0 : _a.removeEventListener("keyup", this.onKeyPress);
30
- delete this.inputElement;
31
- }
32
- onKeyPress() {
33
- var _a, _b, _c, _d;
34
- let enteredText = (_b = (_a = this.inputElement) === null || _a === void 0 ? void 0 : _a.value) !== null && _b !== void 0 ? _b : "";
35
- const parsedDate = moment(enteredText, this.props.format);
36
- if (parsedDate.isValid()) {
37
- if (!this.props.value || !this.props.value.isValid() || this.props.value.valueOf() !== parsedDate.valueOf()) {
38
- (_d = (_c = this.props).onChange) === null || _d === void 0 ? void 0 : _d.call(_c, parsedDate, enteredText);
39
- }
40
- }
41
- }
42
- onChange(value, dateString) {
43
- var _a, _b, _c;
44
- if (value === this.props.value) {
45
- return;
46
- }
47
- if (!this.props.value || !this.props.value.isValid() || this.props.value.valueOf() !== ((_a = value === null || value === void 0 ? void 0 : value.valueOf()) !== null && _a !== void 0 ? _a : 0)) {
48
- (_c = (_b = this.props).onChange) === null || _c === void 0 ? void 0 : _c.call(_b, value, dateString);
49
- }
50
- }
51
- render() {
52
- const _a = this.props, { onChange } = _a, rest = __rest(_a, ["onChange"]);
53
- return React.createElement(DatePicker, Object.assign({ onChange: this.onChange }, rest));
54
- }
55
- }
56
- //# sourceMappingURL=millisecondDatePicker.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"millisecondDatePicker.js","sourceRoot":"","sources":["../../../../components/date/millisecondDatePicker.tsx"],"names":[],"mappings":";;;;;;;;;;;AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,QAAQ,MAAM,WAAW,CAAC;AACjC,OAAO,EAAC,UAAU,EAAC,MAAM,MAAM,CAAC;AAEhC,OAAO,MAAgB,MAAM,QAAQ,CAAC;AAUtC,MAAM,CAAC,OAAO,OAAO,qBAAsB,SAAQ,KAAK,CAAC,SAAmD;IAGxG,YAAY,KAAgC;QACxC,KAAK,CAAC,KAAK,CAAC,CAAC;QACb,IAAI,CAAC,UAAU,GAAG,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QAC7C,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IAE7C,CAAC;IAED,iBAAiB;QACb,MAAM,aAAa,GAAG,QAAQ,CAAC,WAAW,CAAC,IAAI,CAAY,CAAC;QAC5D,IAAI,CAAC,YAAY,GAAG,aAAa,CAAC,oBAAoB,CAAC,OAAO,CAAC,CAAC,CAAC,CAAqB,CAAC;QACvF,IAAI,CAAC,YAAY,CAAC,gBAAgB,CAAC,OAAO,EAAE,IAAI,CAAC,UAAU,CAAC,CAAC;IACjE,CAAC;IAED,oBAAoB;;QAChB,MAAA,IAAI,CAAC,YAAY,0CAAE,mBAAmB,CAAC,OAAO,EAAE,IAAI,CAAC,UAAU,CAAC,CAAC;QACjE,OAAO,IAAI,CAAC,YAAY,CAAC;IAC7B,CAAC;IAED,UAAU;;QACN,IAAI,WAAW,GAAG,MAAA,MAAA,IAAI,CAAC,YAAY,0CAAE,KAAK,mCAAI,EAAE,CAAC;QACjD,MAAM,UAAU,GAAG,MAAM,CAAC,WAAW,EAAE,IAAI,CAAC,KAAK,CAAC,MAAgB,CAAC,CAAC;QACpE,IAAI,UAAU,CAAC,OAAO,EAAE,EAAE;YACtB,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,KAAK,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,OAAO,EAAE,IAAI,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,OAAO,EAAE,KAAK,UAAU,CAAC,OAAO,EAAE,EAAE;gBACzG,MAAA,MAAA,IAAI,CAAC,KAAK,EAAC,QAAQ,mDAAG,UAAU,EAAE,WAAW,CAAC,CAAC;aAClD;SACJ;IACL,CAAC;IAED,QAAQ,CAAC,KAAoB,EAAE,UAAkB;;QAC7C,IAAG,KAAK,KAAK,IAAI,CAAC,KAAK,CAAC,KAAK,EAAE;YAC3B,OAAO;SACV;QACD,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,KAAK,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,OAAO,EAAE,IAAI,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,OAAO,EAAE,KAAK,CAAC,MAAA,KAAK,aAAL,KAAK,uBAAL,KAAK,CAAE,OAAO,EAAE,mCAAI,CAAC,CAAC,EAAE;YAC5G,MAAA,MAAA,IAAI,CAAC,KAAK,EAAC,QAAQ,mDAAG,KAAK,EAAE,UAAU,CAAC,CAAC;SAC5C;IACL,CAAC;IAED,MAAM;QACF,MAAM,KAAsB,IAAI,CAAC,KAAK,EAAhC,EAAC,QAAQ,OAAuB,EAAlB,IAAI,cAAlB,YAAmB,CAAa,CAAC;QACvC,OAAO,oBAAC,UAAU,kBAAC,QAAQ,EAAE,IAAI,CAAC,QAAQ,IAAM,IAAI,EAAG,CAAA;IAC3D,CAAC;CACJ","sourcesContent":["import React from \"react\";\r\nimport ReactDOM from 'react-dom';\r\nimport {DatePicker} from \"antd\";\r\nimport {DatePickerProps} from \"antd/es/date-picker\";\r\nimport moment, {Moment} from \"moment\";\r\n\r\n\r\ninterface ExtendedDatePickerState {\r\n value: Moment\r\n}\r\n\r\n/**\r\n * Date picker which handles also miliseconds\r\n */\r\nexport default class MillisecondDatePicker extends React.Component<DatePickerProps, ExtendedDatePickerState> {\r\n inputElement?: HTMLInputElement;\r\n\r\n constructor(props: Readonly<DatePickerProps>) {\r\n super(props);\r\n this.onKeyPress = this.onKeyPress.bind(this);\r\n this.onChange = this.onChange.bind(this);\r\n\r\n }\r\n\r\n componentDidMount(): void {\r\n const componentNode = ReactDOM.findDOMNode(this) as Element;\r\n this.inputElement = componentNode.getElementsByTagName('input')[0] as HTMLInputElement;\r\n this.inputElement.addEventListener(\"keyup\", this.onKeyPress);\r\n }\r\n\r\n componentWillUnmount(): void {\r\n this.inputElement?.removeEventListener(\"keyup\", this.onKeyPress);\r\n delete this.inputElement;\r\n }\r\n\r\n onKeyPress() {\r\n let enteredText = this.inputElement?.value ?? \"\";\r\n const parsedDate = moment(enteredText, this.props.format as string);\r\n if (parsedDate.isValid()) {\r\n if (!this.props.value || !this.props.value.isValid() || this.props.value.valueOf() !== parsedDate.valueOf()) {\r\n this.props.onChange?.(parsedDate, enteredText);\r\n }\r\n }\r\n }\r\n\r\n onChange(value: Moment | null, dateString: string) {\r\n if(value === this.props.value) {\r\n return;\r\n }\r\n if (!this.props.value || !this.props.value.isValid() || this.props.value.valueOf() !== (value?.valueOf() ?? 0)) {\r\n this.props.onChange?.(value, dateString);\r\n }\r\n }\r\n\r\n render(): React.ReactNode {\r\n const {onChange, ...rest} = this.props;\r\n return <DatePicker onChange={this.onChange} {...rest}/>\r\n }\r\n}"]}