d2coreui 23.0.13 → 23.0.15
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/components/clipboard/clipboardUtils.ts +53 -0
- package/components/codemirror/SyntaxHighlighter.tsx +58 -0
- package/components/collapse/expandable.tsx +48 -0
- package/components/color/colorPicker.tsx +121 -0
- package/components/color/colorSwatch.d.ts +18 -13
- package/components/color/colorSwatch.jsx +87 -0
- package/components/color/colorUtils.ts +60 -0
- package/components/date/dateRangeInput.tsx +468 -0
- package/components/date/dateRangeInputAdvancedPanel.tsx +238 -0
- package/components/date/dateRangeInputConfirm.tsx +200 -0
- package/components/date/dateTimeInput.tsx +633 -0
- package/components/date/durationInput.tsx +375 -0
- package/components/form/NiceFormItem.tsx +32 -0
- package/components/grid/cell/beanAccessor.ts +17 -0
- package/components/grid/cell/cellEditorUtils.ts +12 -0
- package/components/grid/cell/customEnumCellEditor.tsx +130 -0
- package/components/grid/cell/dataGridCellEditorComponent.tsx +61 -0
- package/components/grid/cell/dateCellEditor.tsx +83 -0
- package/components/grid/cell/durationCellEditor.tsx +105 -0
- package/components/grid/cell/hexaOctetStringCellEditor.tsx +101 -0
- package/components/grid/cell/hexaValueCellEditor.tsx +92 -0
- package/components/grid/cell/numberCellEditor.tsx +115 -0
- package/components/grid/cell/rangeSelector.d.ts +9 -78
- package/components/grid/cell/rangeSelector.js +674 -527
- package/components/grid/cell/simpleStatusTextCellEditor.tsx +168 -0
- package/components/grid/cell/statusTextCellEditor.tsx +198 -0
- package/components/grid/cell/tableDefaultRowStyleRules.ts +51 -0
- package/components/grid/cell/textCellEditor.tsx +94 -0
- package/components/grid/cell/withAgGridHooks.tsx +15 -0
- package/components/grid/columnUtils.ts +29 -0
- package/components/grid/config/columnTransfer.tsx +258 -0
- package/components/grid/config/dataGridEditor.tsx +328 -0
- package/components/grid/config/rowHeightCalculator.tsx +29 -0
- package/components/grid/config/rowStylePicker.tsx +196 -0
- package/components/grid/dataGrid.tsx +2183 -0
- package/components/grid/detail/detailHeaderPanel.tsx +59 -0
- package/components/grid/export/contextMenu.tsx +154 -0
- package/components/grid/export/progressPopup.tsx +106 -0
- package/components/grid/export/worker/clipboardExport.ts +10 -0
- package/components/grid/export/worker/csvExport.ts +10 -0
- package/components/grid/export/worker/pdfExport.ts +98 -0
- package/components/grid/export/worker/txtExport.ts +21 -0
- package/components/grid/extendedDataGrid.tsx +974 -0
- package/components/grid/filter/customColumnFilter.tsx +14 -0
- package/components/grid/filter/dataGridColumnFilter.tsx +70 -0
- package/components/grid/filter/dateColumnFilter.tsx +34 -0
- package/components/grid/filter/textColumnFilter.tsx +37 -0
- package/components/grid/filter/wildcardQuickFilterEngine.ts +50 -0
- package/components/grid/header/simpleHeader.tsx +270 -0
- package/components/grid/panel/dataGridPagination.tsx +123 -0
- package/components/grid/panel/loadingOverlay.tsx +14 -0
- package/components/grid/panel/noRecordsOverlay.tsx +16 -0
- package/components/grid/panel/tablePagination.tsx +77 -0
- package/components/icons/ant-design-double-right-outline.svg +5 -5
- package/components/icons/ant-design_close-outline.svg +5 -5
- package/components/icons/dropdownArrow.tsx +67 -0
- package/components/icons/undoIcon.tsx +16 -0
- package/components/input/autoCompleteInput.tsx +174 -0
- package/components/input/draftUtils.tsx +62 -0
- package/components/input/draftail.d.ts +186 -1
- package/components/input/draftail.js +1 -2
- package/components/input/hexaFormattedInput.tsx +64 -0
- package/components/input/mask/helpers.ts +154 -0
- package/components/input/mask/inputMaskCore.ts +452 -0
- package/components/input/mask/pattern.ts +122 -0
- package/components/input/maskedInput.tsx +275 -0
- package/components/input/passwordInput.tsx +62 -0
- package/components/input/simpleAutoComplete.tsx +60 -0
- package/components/input/textarea/extractSpansOfClasses.tsx +125 -0
- package/components/input/textarea/getRanges.ts +82 -0
- package/components/input/textarea/getType.ts +23 -0
- package/components/input/textarea/highlighedContents.tsx +20 -0
- package/components/input/textarea/highlightedTextarea.css +61 -0
- package/components/input/textarea/mentionsWithHighlighting.tsx +95 -0
- package/components/keyboard/keyboardUtils.ts +42 -0
- package/components/modal/draggableModalProvider.tsx +37 -0
- package/components/modal/impl/clamp.ts +4 -0
- package/components/modal/impl/draggableModal.tsx +36 -0
- package/components/modal/impl/draggableModalContext.ts +14 -0
- package/components/modal/impl/draggableModalInner.tsx +114 -0
- package/components/modal/impl/draggableModalReducer.ts +285 -0
- package/components/modal/impl/getWindowSize.ts +6 -0
- package/components/modal/impl/index.ts +5 -0
- package/components/modal/impl/resizeHandle.tsx +12 -0
- package/components/modal/impl/useDrag.ts +57 -0
- package/components/modal/impl/usePrevious.ts +11 -0
- package/components/modal/impl/useResize.ts +79 -0
- package/components/modal/modalDialog.tsx +172 -0
- package/components/picker/enumValuePicker.tsx +48 -0
- package/components/platformSpecific.ts +39 -0
- package/components/scrollTo/dom-scroll-into-view.d.ts +1 -0
- package/components/scrollTo/onlyText.ts +36 -0
- package/components/scrollTo/scrollTo.tsx +324 -0
- package/components/style/withCss.tsx +14 -0
- package/components/style/withInputNumberCss.tsx +18 -0
- package/components/svg.d.ts +1 -0
- package/components/table/dragSortingTable.tsx +123 -0
- package/components/text/impl/innerSize.ts +15 -0
- package/components/text/impl/series.ts +37 -0
- package/components/text/impl/shallowEqual.ts +19 -0
- package/components/text/impl/uniqueId.ts +5 -0
- package/components/text/impl/whilst.ts +25 -0
- package/components/text/textFit.tsx +229 -0
- package/i18n/components.cs.json +101 -101
- package/i18n/components.sk.json +101 -101
- package/i18n/components.uk.json +101 -101
- package/i18n/componentsLocaleHolder.js +24 -29
- package/i18n/componentsLocaleLoader.d.ts +9 -0
- package/lib/esm/components/codemirror/SyntaxHighlighter.js.map +1 -0
- package/lib/esm/components/color/colorSwatch.d.ts +13 -0
- package/lib/esm/components/color/colorSwatch.js.map +1 -0
- package/{components → lib/esm/components}/grid/cell/cellEditorUtils.js.map +1 -1
- package/lib/esm/components/grid/cell/rangeSelector.d.ts +78 -0
- package/lib/esm/components/grid/cell/rangeSelector.js +527 -0
- package/lib/esm/components/grid/columnUtils.js.map +1 -0
- package/{components → lib/esm/components}/grid/export/contextMenu.js +4 -4
- package/lib/esm/components/grid/export/progressPopup.js.map +1 -0
- package/{components → lib/esm/components}/grid/export/worker/clipboardExport.js.map +1 -1
- package/{components → lib/esm/components}/grid/export/worker/csvExport.js.map +1 -1
- package/{components → lib/esm/components}/grid/export/worker/txtExport.js.map +1 -1
- package/lib/esm/components/icons/undoIcon.js.map +1 -0
- package/lib/esm/components/input/draftUtils.js.map +1 -0
- package/lib/esm/components/input/draftail.d.ts +1 -0
- package/lib/esm/components/input/draftail.js +2 -0
- package/{components → lib/esm/components}/input/draftail.js.map +1 -1
- package/lib/esm/components/input/mask/inputMaskCore.js.map +1 -0
- package/lib/esm/components/input/mask/pattern.js.map +1 -0
- package/lib/esm/components/input/passwordInput.js.map +1 -0
- package/lib/esm/components/input/textarea/extractSpansOfClasses.js.map +1 -0
- package/lib/esm/components/input/textarea/getRanges.js.map +1 -0
- package/{components → lib/esm/components}/input/textarea/getType.js.map +1 -1
- package/{components → lib/esm/components}/input/textarea/highlighedContents.js.map +1 -1
- package/lib/esm/components/input/textarea/mentionsWithHighlighting.js.map +1 -0
- package/{components → lib/esm/components}/keyboard/keyboardUtils.js.map +1 -1
- package/lib/esm/components/platformSpecific.js.map +1 -0
- package/{components → lib/esm/components}/text/impl/innerSize.js.map +1 -1
- package/lib/esm/components/text/impl/series.js.map +1 -0
- package/{components → lib/esm/components}/text/impl/shallowEqual.js.map +1 -1
- package/{components → lib/esm/components}/text/impl/uniqueId.js.map +1 -1
- package/lib/esm/components/text/impl/whilst.js.map +1 -0
- package/lib/esm/i18n/components.cs.json +101 -0
- package/lib/esm/i18n/components.sk.json +101 -0
- package/lib/esm/i18n/components.uk.json +101 -0
- package/lib/esm/i18n/componentsLocaleHolder.js +29 -0
- package/lib/esm/i18n/componentsLocaleHolder.js.map +1 -0
- package/lib/esm/package.json +70 -0
- package/lib/esm/tsconfig.build.json +24 -0
- package/lib/esm/tsconfig.json +11 -0
- package/package.json +3 -3
- package/style/ag-grid/_ag-theme-antd-vars.scss +194 -194
- package/style/ag-grid/ag-theme-antd.scss +87 -87
- package/style/ag-grid/aggrid-adaptations.css +42 -42
- package/style/ag-grid/aggrid.scss +11 -11
- package/style/flexLayout/flexLayout.scss +130 -130
- package/style/flexLayout/flexLayoutBase.scss +623 -623
- package/style/flexLayout/new/_base.scss +616 -616
- package/style/flexLayout/new/flexLayoutBase.scss +621 -621
- package/style/flexLayout/new/light.scss +107 -107
- package/style/flexLayout/old/_base.scss +551 -551
- package/style/flexLayout/old/light.scss +16 -16
- package/style/form/niceFormItem.css +38 -38
- package/style/loading.css +31 -31
- package/style/splitPane/splitPane.css +48 -48
- package/tsconfig.build.json +24 -24
- package/tsconfig.json +11 -11
- package/components/codemirror/SyntaxHighlighter.js.map +0 -1
- package/components/color/colorSwatch.js.map +0 -1
- package/components/grid/columnUtils.js.map +0 -1
- package/components/grid/export/progressPopup.js.map +0 -1
- package/components/icons/undoIcon.js.map +0 -1
- package/components/input/draftUtils.js.map +0 -1
- package/components/input/mask/inputMaskCore.js.map +0 -1
- package/components/input/mask/pattern.js.map +0 -1
- package/components/input/passwordInput.js.map +0 -1
- package/components/input/textarea/extractSpansOfClasses.js.map +0 -1
- package/components/input/textarea/getRanges.js.map +0 -1
- package/components/input/textarea/mentionsWithHighlighting.js.map +0 -1
- package/components/platformSpecific.js.map +0 -1
- package/components/text/impl/series.js.map +0 -1
- package/components/text/impl/whilst.js.map +0 -1
- package/i18n/componentsLocaleHolder.js.map +0 -1
- /package/{components → lib/esm/components}/clipboard/clipboardUtils.d.ts +0 -0
- /package/{components → lib/esm/components}/clipboard/clipboardUtils.js +0 -0
- /package/{components → lib/esm/components}/clipboard/clipboardUtils.js.map +0 -0
- /package/{components → lib/esm/components}/codemirror/SyntaxHighlighter.d.ts +0 -0
- /package/{components → lib/esm/components}/codemirror/SyntaxHighlighter.js +0 -0
- /package/{components → lib/esm/components}/collapse/expandable.d.ts +0 -0
- /package/{components → lib/esm/components}/collapse/expandable.js +0 -0
- /package/{components → lib/esm/components}/collapse/expandable.js.map +0 -0
- /package/{components → lib/esm/components}/color/colorPicker.d.ts +0 -0
- /package/{components → lib/esm/components}/color/colorPicker.js +0 -0
- /package/{components → lib/esm/components}/color/colorPicker.js.map +0 -0
- /package/{components → lib/esm/components}/color/colorSwatch.js +0 -0
- /package/{components → lib/esm/components}/color/colorUtils.d.ts +0 -0
- /package/{components → lib/esm/components}/color/colorUtils.js +0 -0
- /package/{components → lib/esm/components}/color/colorUtils.js.map +0 -0
- /package/{components → lib/esm/components}/date/dateRangeInput.d.ts +0 -0
- /package/{components → lib/esm/components}/date/dateRangeInput.js +0 -0
- /package/{components → lib/esm/components}/date/dateRangeInput.js.map +0 -0
- /package/{components → lib/esm/components}/date/dateRangeInputAdvancedPanel.d.ts +0 -0
- /package/{components → lib/esm/components}/date/dateRangeInputAdvancedPanel.js +0 -0
- /package/{components → lib/esm/components}/date/dateRangeInputAdvancedPanel.js.map +0 -0
- /package/{components → lib/esm/components}/date/dateRangeInputConfirm.d.ts +0 -0
- /package/{components → lib/esm/components}/date/dateRangeInputConfirm.js +0 -0
- /package/{components → lib/esm/components}/date/dateRangeInputConfirm.js.map +0 -0
- /package/{components → lib/esm/components}/date/dateTimeInput.d.ts +0 -0
- /package/{components → lib/esm/components}/date/dateTimeInput.js +0 -0
- /package/{components → lib/esm/components}/date/dateTimeInput.js.map +0 -0
- /package/{components → lib/esm/components}/date/durationInput.d.ts +0 -0
- /package/{components → lib/esm/components}/date/durationInput.js +0 -0
- /package/{components → lib/esm/components}/date/durationInput.js.map +0 -0
- /package/{components → lib/esm/components}/form/NiceFormItem.d.ts +0 -0
- /package/{components → lib/esm/components}/form/NiceFormItem.js +0 -0
- /package/{components → lib/esm/components}/form/NiceFormItem.js.map +0 -0
- /package/{components → lib/esm/components}/grid/cell/beanAccessor.d.ts +0 -0
- /package/{components → lib/esm/components}/grid/cell/beanAccessor.js +0 -0
- /package/{components → lib/esm/components}/grid/cell/beanAccessor.js.map +0 -0
- /package/{components → lib/esm/components}/grid/cell/cellEditorUtils.d.ts +0 -0
- /package/{components → lib/esm/components}/grid/cell/cellEditorUtils.js +0 -0
- /package/{components → lib/esm/components}/grid/cell/customEnumCellEditor.d.ts +0 -0
- /package/{components → lib/esm/components}/grid/cell/customEnumCellEditor.js +0 -0
- /package/{components → lib/esm/components}/grid/cell/customEnumCellEditor.js.map +0 -0
- /package/{components → lib/esm/components}/grid/cell/dataGridCellEditorComponent.d.ts +0 -0
- /package/{components → lib/esm/components}/grid/cell/dataGridCellEditorComponent.js +0 -0
- /package/{components → lib/esm/components}/grid/cell/dataGridCellEditorComponent.js.map +0 -0
- /package/{components → lib/esm/components}/grid/cell/dateCellEditor.d.ts +0 -0
- /package/{components → lib/esm/components}/grid/cell/dateCellEditor.js +0 -0
- /package/{components → lib/esm/components}/grid/cell/dateCellEditor.js.map +0 -0
- /package/{components → lib/esm/components}/grid/cell/durationCellEditor.d.ts +0 -0
- /package/{components → lib/esm/components}/grid/cell/durationCellEditor.js +0 -0
- /package/{components → lib/esm/components}/grid/cell/durationCellEditor.js.map +0 -0
- /package/{components → lib/esm/components}/grid/cell/hexaOctetStringCellEditor.d.ts +0 -0
- /package/{components → lib/esm/components}/grid/cell/hexaOctetStringCellEditor.js +0 -0
- /package/{components → lib/esm/components}/grid/cell/hexaOctetStringCellEditor.js.map +0 -0
- /package/{components → lib/esm/components}/grid/cell/hexaValueCellEditor.d.ts +0 -0
- /package/{components → lib/esm/components}/grid/cell/hexaValueCellEditor.js +0 -0
- /package/{components → lib/esm/components}/grid/cell/hexaValueCellEditor.js.map +0 -0
- /package/{components → lib/esm/components}/grid/cell/numberCellEditor.d.ts +0 -0
- /package/{components → lib/esm/components}/grid/cell/numberCellEditor.js +0 -0
- /package/{components → lib/esm/components}/grid/cell/numberCellEditor.js.map +0 -0
- /package/{components → lib/esm/components}/grid/cell/rangeSelector.js.map +0 -0
- /package/{components → lib/esm/components}/grid/cell/simpleStatusTextCellEditor.d.ts +0 -0
- /package/{components → lib/esm/components}/grid/cell/simpleStatusTextCellEditor.js +0 -0
- /package/{components → lib/esm/components}/grid/cell/simpleStatusTextCellEditor.js.map +0 -0
- /package/{components → lib/esm/components}/grid/cell/statusTextCellEditor.d.ts +0 -0
- /package/{components → lib/esm/components}/grid/cell/statusTextCellEditor.js +0 -0
- /package/{components → lib/esm/components}/grid/cell/statusTextCellEditor.js.map +0 -0
- /package/{components → lib/esm/components}/grid/cell/tableDefaultRowStyleRules.d.ts +0 -0
- /package/{components → lib/esm/components}/grid/cell/tableDefaultRowStyleRules.js +0 -0
- /package/{components → lib/esm/components}/grid/cell/tableDefaultRowStyleRules.js.map +0 -0
- /package/{components → lib/esm/components}/grid/cell/textCellEditor.d.ts +0 -0
- /package/{components → lib/esm/components}/grid/cell/textCellEditor.js +0 -0
- /package/{components → lib/esm/components}/grid/cell/textCellEditor.js.map +0 -0
- /package/{components → lib/esm/components}/grid/cell/withAgGridHooks.d.ts +0 -0
- /package/{components → lib/esm/components}/grid/cell/withAgGridHooks.js +0 -0
- /package/{components → lib/esm/components}/grid/cell/withAgGridHooks.js.map +0 -0
- /package/{components → lib/esm/components}/grid/columnUtils.d.ts +0 -0
- /package/{components → lib/esm/components}/grid/columnUtils.js +0 -0
- /package/{components → lib/esm/components}/grid/config/columnTransfer.d.ts +0 -0
- /package/{components → lib/esm/components}/grid/config/columnTransfer.js +0 -0
- /package/{components → lib/esm/components}/grid/config/columnTransfer.js.map +0 -0
- /package/{components → lib/esm/components}/grid/config/dataGridEditor.d.ts +0 -0
- /package/{components → lib/esm/components}/grid/config/dataGridEditor.js +0 -0
- /package/{components → lib/esm/components}/grid/config/dataGridEditor.js.map +0 -0
- /package/{components → lib/esm/components}/grid/config/rowHeightCalculator.d.ts +0 -0
- /package/{components → lib/esm/components}/grid/config/rowHeightCalculator.js +0 -0
- /package/{components → lib/esm/components}/grid/config/rowHeightCalculator.js.map +0 -0
- /package/{components → lib/esm/components}/grid/config/rowStylePicker.d.ts +0 -0
- /package/{components → lib/esm/components}/grid/config/rowStylePicker.js +0 -0
- /package/{components → lib/esm/components}/grid/config/rowStylePicker.js.map +0 -0
- /package/{components → lib/esm/components}/grid/dataGrid.d.ts +0 -0
- /package/{components → lib/esm/components}/grid/dataGrid.js +0 -0
- /package/{components → lib/esm/components}/grid/dataGrid.js.map +0 -0
- /package/{components → lib/esm/components}/grid/detail/detailHeaderPanel.d.ts +0 -0
- /package/{components → lib/esm/components}/grid/detail/detailHeaderPanel.js +0 -0
- /package/{components → lib/esm/components}/grid/detail/detailHeaderPanel.js.map +0 -0
- /package/{components → lib/esm/components}/grid/export/contextMenu.d.ts +0 -0
- /package/{components → lib/esm/components}/grid/export/contextMenu.js.map +0 -0
- /package/{components → lib/esm/components}/grid/export/progressPopup.d.ts +0 -0
- /package/{components → lib/esm/components}/grid/export/progressPopup.js +0 -0
- /package/{components → lib/esm/components}/grid/export/worker/clipboardExport.d.ts +0 -0
- /package/{components → lib/esm/components}/grid/export/worker/clipboardExport.js +0 -0
- /package/{components → lib/esm/components}/grid/export/worker/csvExport.d.ts +0 -0
- /package/{components → lib/esm/components}/grid/export/worker/csvExport.js +0 -0
- /package/{components → lib/esm/components}/grid/export/worker/pdfExport.d.ts +0 -0
- /package/{components → lib/esm/components}/grid/export/worker/pdfExport.js +0 -0
- /package/{components → lib/esm/components}/grid/export/worker/pdfExport.js.map +0 -0
- /package/{components → lib/esm/components}/grid/export/worker/txtExport.d.ts +0 -0
- /package/{components → lib/esm/components}/grid/export/worker/txtExport.js +0 -0
- /package/{components → lib/esm/components}/grid/extendedDataGrid.d.ts +0 -0
- /package/{components → lib/esm/components}/grid/extendedDataGrid.js +0 -0
- /package/{components → lib/esm/components}/grid/extendedDataGrid.js.map +0 -0
- /package/{components → lib/esm/components}/grid/filter/customColumnFilter.d.ts +0 -0
- /package/{components → lib/esm/components}/grid/filter/customColumnFilter.js +0 -0
- /package/{components → lib/esm/components}/grid/filter/customColumnFilter.js.map +0 -0
- /package/{components → lib/esm/components}/grid/filter/dataGridColumnFilter.d.ts +0 -0
- /package/{components → lib/esm/components}/grid/filter/dataGridColumnFilter.js +0 -0
- /package/{components → lib/esm/components}/grid/filter/dataGridColumnFilter.js.map +0 -0
- /package/{components → lib/esm/components}/grid/filter/dateColumnFilter.d.ts +0 -0
- /package/{components → lib/esm/components}/grid/filter/dateColumnFilter.js +0 -0
- /package/{components → lib/esm/components}/grid/filter/dateColumnFilter.js.map +0 -0
- /package/{components → lib/esm/components}/grid/filter/textColumnFilter.d.ts +0 -0
- /package/{components → lib/esm/components}/grid/filter/textColumnFilter.js +0 -0
- /package/{components → lib/esm/components}/grid/filter/textColumnFilter.js.map +0 -0
- /package/{components → lib/esm/components}/grid/filter/wildcardQuickFilterEngine.d.ts +0 -0
- /package/{components → lib/esm/components}/grid/filter/wildcardQuickFilterEngine.js +0 -0
- /package/{components → lib/esm/components}/grid/filter/wildcardQuickFilterEngine.js.map +0 -0
- /package/{components → lib/esm/components}/grid/header/simpleHeader.d.ts +0 -0
- /package/{components → lib/esm/components}/grid/header/simpleHeader.js +0 -0
- /package/{components → lib/esm/components}/grid/header/simpleHeader.js.map +0 -0
- /package/{components → lib/esm/components}/grid/panel/dataGridPagination.d.ts +0 -0
- /package/{components → lib/esm/components}/grid/panel/dataGridPagination.js +0 -0
- /package/{components → lib/esm/components}/grid/panel/dataGridPagination.js.map +0 -0
- /package/{components → lib/esm/components}/grid/panel/loadingOverlay.d.ts +0 -0
- /package/{components → lib/esm/components}/grid/panel/loadingOverlay.js +0 -0
- /package/{components → lib/esm/components}/grid/panel/loadingOverlay.js.map +0 -0
- /package/{components → lib/esm/components}/grid/panel/noRecordsOverlay.d.ts +0 -0
- /package/{components → lib/esm/components}/grid/panel/noRecordsOverlay.js +0 -0
- /package/{components → lib/esm/components}/grid/panel/noRecordsOverlay.js.map +0 -0
- /package/{components → lib/esm/components}/grid/panel/tablePagination.d.ts +0 -0
- /package/{components → lib/esm/components}/grid/panel/tablePagination.js +0 -0
- /package/{components → lib/esm/components}/grid/panel/tablePagination.js.map +0 -0
- /package/{components → lib/esm/components}/icons/dropdownArrow.d.ts +0 -0
- /package/{components → lib/esm/components}/icons/dropdownArrow.js +0 -0
- /package/{components → lib/esm/components}/icons/dropdownArrow.js.map +0 -0
- /package/{components → lib/esm/components}/icons/undoIcon.d.ts +0 -0
- /package/{components → lib/esm/components}/icons/undoIcon.js +0 -0
- /package/{components → lib/esm/components}/input/autoCompleteInput.d.ts +0 -0
- /package/{components → lib/esm/components}/input/autoCompleteInput.js +0 -0
- /package/{components → lib/esm/components}/input/autoCompleteInput.js.map +0 -0
- /package/{components → lib/esm/components}/input/draftUtils.d.ts +0 -0
- /package/{components → lib/esm/components}/input/draftUtils.js +0 -0
- /package/{components → lib/esm/components}/input/hexaFormattedInput.d.ts +0 -0
- /package/{components → lib/esm/components}/input/hexaFormattedInput.js +0 -0
- /package/{components → lib/esm/components}/input/hexaFormattedInput.js.map +0 -0
- /package/{components → lib/esm/components}/input/mask/helpers.d.ts +0 -0
- /package/{components → lib/esm/components}/input/mask/helpers.js +0 -0
- /package/{components → lib/esm/components}/input/mask/helpers.js.map +0 -0
- /package/{components → lib/esm/components}/input/mask/inputMaskCore.d.ts +0 -0
- /package/{components → lib/esm/components}/input/mask/inputMaskCore.js +0 -0
- /package/{components → lib/esm/components}/input/mask/pattern.d.ts +0 -0
- /package/{components → lib/esm/components}/input/mask/pattern.js +0 -0
- /package/{components → lib/esm/components}/input/maskedInput.d.ts +0 -0
- /package/{components → lib/esm/components}/input/maskedInput.js +0 -0
- /package/{components → lib/esm/components}/input/maskedInput.js.map +0 -0
- /package/{components → lib/esm/components}/input/passwordInput.d.ts +0 -0
- /package/{components → lib/esm/components}/input/passwordInput.js +0 -0
- /package/{components → lib/esm/components}/input/simpleAutoComplete.d.ts +0 -0
- /package/{components → lib/esm/components}/input/simpleAutoComplete.js +0 -0
- /package/{components → lib/esm/components}/input/simpleAutoComplete.js.map +0 -0
- /package/{components → lib/esm/components}/input/textarea/extractSpansOfClasses.d.ts +0 -0
- /package/{components → lib/esm/components}/input/textarea/extractSpansOfClasses.js +0 -0
- /package/{components → lib/esm/components}/input/textarea/getRanges.d.ts +0 -0
- /package/{components → lib/esm/components}/input/textarea/getRanges.js +0 -0
- /package/{components → lib/esm/components}/input/textarea/getType.d.ts +0 -0
- /package/{components → lib/esm/components}/input/textarea/getType.js +0 -0
- /package/{components → lib/esm/components}/input/textarea/highlighedContents.d.ts +0 -0
- /package/{components → lib/esm/components}/input/textarea/highlighedContents.js +0 -0
- /package/{components → lib/esm/components}/input/textarea/mentionsWithHighlighting.d.ts +0 -0
- /package/{components → lib/esm/components}/input/textarea/mentionsWithHighlighting.js +0 -0
- /package/{components → lib/esm/components}/keyboard/keyboardUtils.d.ts +0 -0
- /package/{components → lib/esm/components}/keyboard/keyboardUtils.js +0 -0
- /package/{components → lib/esm/components}/modal/draggableModalProvider.d.ts +0 -0
- /package/{components → lib/esm/components}/modal/draggableModalProvider.js +0 -0
- /package/{components → lib/esm/components}/modal/draggableModalProvider.js.map +0 -0
- /package/{components → lib/esm/components}/modal/impl/clamp.d.ts +0 -0
- /package/{components → lib/esm/components}/modal/impl/clamp.js +0 -0
- /package/{components → lib/esm/components}/modal/impl/clamp.js.map +0 -0
- /package/{components → lib/esm/components}/modal/impl/draggableModal.d.ts +0 -0
- /package/{components → lib/esm/components}/modal/impl/draggableModal.js +0 -0
- /package/{components → lib/esm/components}/modal/impl/draggableModal.js.map +0 -0
- /package/{components → lib/esm/components}/modal/impl/draggableModalContext.d.ts +0 -0
- /package/{components → lib/esm/components}/modal/impl/draggableModalContext.js +0 -0
- /package/{components → lib/esm/components}/modal/impl/draggableModalContext.js.map +0 -0
- /package/{components → lib/esm/components}/modal/impl/draggableModalInner.d.ts +0 -0
- /package/{components → lib/esm/components}/modal/impl/draggableModalInner.js +0 -0
- /package/{components → lib/esm/components}/modal/impl/draggableModalInner.js.map +0 -0
- /package/{components → lib/esm/components}/modal/impl/draggableModalReducer.d.ts +0 -0
- /package/{components → lib/esm/components}/modal/impl/draggableModalReducer.js +0 -0
- /package/{components → lib/esm/components}/modal/impl/draggableModalReducer.js.map +0 -0
- /package/{components → lib/esm/components}/modal/impl/getWindowSize.d.ts +0 -0
- /package/{components → lib/esm/components}/modal/impl/getWindowSize.js +0 -0
- /package/{components → lib/esm/components}/modal/impl/getWindowSize.js.map +0 -0
- /package/{components → lib/esm/components}/modal/impl/index.d.ts +0 -0
- /package/{components → lib/esm/components}/modal/impl/index.js +0 -0
- /package/{components → lib/esm/components}/modal/impl/index.js.map +0 -0
- /package/{components → lib/esm/components}/modal/impl/resizeHandle.d.ts +0 -0
- /package/{components → lib/esm/components}/modal/impl/resizeHandle.js +0 -0
- /package/{components → lib/esm/components}/modal/impl/resizeHandle.js.map +0 -0
- /package/{components → lib/esm/components}/modal/impl/useDrag.d.ts +0 -0
- /package/{components → lib/esm/components}/modal/impl/useDrag.js +0 -0
- /package/{components → lib/esm/components}/modal/impl/useDrag.js.map +0 -0
- /package/{components → lib/esm/components}/modal/impl/usePrevious.d.ts +0 -0
- /package/{components → lib/esm/components}/modal/impl/usePrevious.js +0 -0
- /package/{components → lib/esm/components}/modal/impl/usePrevious.js.map +0 -0
- /package/{components → lib/esm/components}/modal/impl/useResize.d.ts +0 -0
- /package/{components → lib/esm/components}/modal/impl/useResize.js +0 -0
- /package/{components → lib/esm/components}/modal/impl/useResize.js.map +0 -0
- /package/{components → lib/esm/components}/modal/modalDialog.d.ts +0 -0
- /package/{components → lib/esm/components}/modal/modalDialog.js +0 -0
- /package/{components → lib/esm/components}/modal/modalDialog.js.map +0 -0
- /package/{components → lib/esm/components}/picker/enumValuePicker.d.ts +0 -0
- /package/{components → lib/esm/components}/picker/enumValuePicker.js +0 -0
- /package/{components → lib/esm/components}/picker/enumValuePicker.js.map +0 -0
- /package/{components → lib/esm/components}/platformSpecific.d.ts +0 -0
- /package/{components → lib/esm/components}/platformSpecific.js +0 -0
- /package/{components → lib/esm/components}/scrollTo/onlyText.d.ts +0 -0
- /package/{components → lib/esm/components}/scrollTo/onlyText.js +0 -0
- /package/{components → lib/esm/components}/scrollTo/onlyText.js.map +0 -0
- /package/{components → lib/esm/components}/scrollTo/scrollTo.d.ts +0 -0
- /package/{components → lib/esm/components}/scrollTo/scrollTo.js +0 -0
- /package/{components → lib/esm/components}/scrollTo/scrollTo.js.map +0 -0
- /package/{components → lib/esm/components}/style/withCss.d.ts +0 -0
- /package/{components → lib/esm/components}/style/withCss.js +0 -0
- /package/{components → lib/esm/components}/style/withCss.js.map +0 -0
- /package/{components → lib/esm/components}/style/withInputNumberCss.d.ts +0 -0
- /package/{components → lib/esm/components}/style/withInputNumberCss.js +0 -0
- /package/{components → lib/esm/components}/style/withInputNumberCss.js.map +0 -0
- /package/{components → lib/esm/components}/table/dragSortingTable.d.ts +0 -0
- /package/{components → lib/esm/components}/table/dragSortingTable.js +0 -0
- /package/{components → lib/esm/components}/table/dragSortingTable.js.map +0 -0
- /package/{components → lib/esm/components}/text/impl/innerSize.d.ts +0 -0
- /package/{components → lib/esm/components}/text/impl/innerSize.js +0 -0
- /package/{components → lib/esm/components}/text/impl/series.d.ts +0 -0
- /package/{components → lib/esm/components}/text/impl/series.js +0 -0
- /package/{components → lib/esm/components}/text/impl/shallowEqual.d.ts +0 -0
- /package/{components → lib/esm/components}/text/impl/shallowEqual.js +0 -0
- /package/{components → lib/esm/components}/text/impl/uniqueId.d.ts +0 -0
- /package/{components → lib/esm/components}/text/impl/uniqueId.js +0 -0
- /package/{components → lib/esm/components}/text/impl/whilst.d.ts +0 -0
- /package/{components → lib/esm/components}/text/impl/whilst.js +0 -0
- /package/{components → lib/esm/components}/text/textFit.d.ts +0 -0
- /package/{components → lib/esm/components}/text/textFit.js +0 -0
- /package/{components → lib/esm/components}/text/textFit.js.map +0 -0
- /package/{i18n → lib/esm/i18n}/componentsLocaleHolder.d.ts +0 -0
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import {DataGridColDef} from "../dataGrid";
|
|
2
|
+
import DataGridColumnFilter, {DataGridColumnFilterProps, DataGridColumnFilterState} from "./dataGridColumnFilter";
|
|
3
|
+
|
|
4
|
+
export default class CustomColumnFilter extends DataGridColumnFilter<DataGridColumnFilterProps, DataGridColumnFilterState> {
|
|
5
|
+
|
|
6
|
+
constructor(props: Readonly<DataGridColumnFilterProps>) {
|
|
7
|
+
super(props);
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
render() {
|
|
11
|
+
const colDef = this.props.column.getColDef() as DataGridColDef;
|
|
12
|
+
return colDef?.renderFilter?.(this.state.currentValue ? this.state.currentValue : "", this.changeValue, this.onSearch);
|
|
13
|
+
}
|
|
14
|
+
}
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import {CustomFloatingFilterProps} from "ag-grid-react";
|
|
3
|
+
import {AgPromise, ProvidedFilterParams} from "ag-grid-community";
|
|
4
|
+
|
|
5
|
+
export interface DataGridColumnFilterProps extends CustomFloatingFilterProps {
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
export interface DataGridColumnFilterState {
|
|
9
|
+
currentValue: string
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
export default class DataGridColumnFilter<P extends DataGridColumnFilterProps, S extends DataGridColumnFilterState> extends React.Component<P, S> {
|
|
13
|
+
|
|
14
|
+
constructor(props: Readonly<P>) {
|
|
15
|
+
super(props);
|
|
16
|
+
// @ts-ignore
|
|
17
|
+
this.state = {
|
|
18
|
+
currentValue: (props.model?.value || "") as string
|
|
19
|
+
};
|
|
20
|
+
this.changeValue = this.changeValue.bind(this);
|
|
21
|
+
this.onSearch = this.onSearch.bind(this);
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
componentDidMount() {
|
|
25
|
+
this.props.parentFilterInstance((instance: any) => {
|
|
26
|
+
this.setState({currentValue: instance.getValues(0)[0]});
|
|
27
|
+
});
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
isUseApplyButton(params: ProvidedFilterParams): boolean {
|
|
31
|
+
return !!params.buttons && params.buttons.indexOf('apply') >= 0;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
changeValue(newValue: string) {
|
|
35
|
+
this.setState({currentValue: newValue},
|
|
36
|
+
() => {
|
|
37
|
+
const newValue = this.state.currentValue;
|
|
38
|
+
this.setValue(newValue);
|
|
39
|
+
});
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
setValue(newValue: string, forceApply?: boolean) {
|
|
43
|
+
const autoApply = !this.isUseApplyButton(this.props.filterParams);
|
|
44
|
+
if (autoApply || forceApply) {
|
|
45
|
+
this.props.onModelChange(this.createModel(newValue));
|
|
46
|
+
} else {
|
|
47
|
+
this.props.parentFilterInstance((instance: any) => {
|
|
48
|
+
(instance.setModel(this.createModel(newValue)) || AgPromise.resolve()).then(() => {
|
|
49
|
+
// instance.setValueFromFloatingFilter(newValue);
|
|
50
|
+
// instance.setTypeFromFloatingFilter('contains');
|
|
51
|
+
instance.onUiChanged(false);
|
|
52
|
+
});
|
|
53
|
+
});
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
protected onSearch() {
|
|
58
|
+
this.setValue(this.state.currentValue, true);
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
private createModel(newValue: string) {
|
|
62
|
+
return newValue === '' ? null :
|
|
63
|
+
{
|
|
64
|
+
...(this.props.model || {
|
|
65
|
+
type: 'contains',
|
|
66
|
+
}),
|
|
67
|
+
filter: newValue,
|
|
68
|
+
};
|
|
69
|
+
}
|
|
70
|
+
}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import React, {ChangeEvent} from "react";
|
|
2
|
+
import {Input} from 'antd'
|
|
3
|
+
import {Key} from "ts-key-enum";
|
|
4
|
+
import DataGridColumnFilter, {DataGridColumnFilterProps, DataGridColumnFilterState} from "./dataGridColumnFilter";
|
|
5
|
+
|
|
6
|
+
export default class DateColumnFilter extends DataGridColumnFilter<DataGridColumnFilterProps, DataGridColumnFilterState> {
|
|
7
|
+
constructor(props: Readonly<any>) {
|
|
8
|
+
super(props);
|
|
9
|
+
this.onValueChanged = this.onValueChanged.bind(this);
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
onValueChanged(event:ChangeEvent) {
|
|
13
|
+
const newValue = (event.target as HTMLInputElement).value;
|
|
14
|
+
this.changeValue(newValue);
|
|
15
|
+
};
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
render() {
|
|
19
|
+
return (
|
|
20
|
+
<Input
|
|
21
|
+
size="small"
|
|
22
|
+
style={{marginTop: "3px"}}
|
|
23
|
+
value={this.state.currentValue}
|
|
24
|
+
allowClear={true}
|
|
25
|
+
onChange={this.onValueChanged}
|
|
26
|
+
onKeyDown={(e) => {
|
|
27
|
+
if (e.key === Key.Enter) {
|
|
28
|
+
this.onSearch();
|
|
29
|
+
}
|
|
30
|
+
}}
|
|
31
|
+
/>
|
|
32
|
+
)
|
|
33
|
+
}
|
|
34
|
+
}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import React, {ChangeEvent} from "react";
|
|
2
|
+
import {Input} from 'antd'
|
|
3
|
+
import {Key} from "ts-key-enum";
|
|
4
|
+
import {CustomFloatingFilterProps} from "ag-grid-react";
|
|
5
|
+
import DataGridColumnFilter, {DataGridColumnFilterProps, DataGridColumnFilterState} from "./dataGridColumnFilter";
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
export default class TextColumnFilter extends DataGridColumnFilter<DataGridColumnFilterProps, DataGridColumnFilterState> {
|
|
9
|
+
|
|
10
|
+
constructor(props: Readonly<CustomFloatingFilterProps>) {
|
|
11
|
+
super(props);
|
|
12
|
+
this.onValueChanged = this.onValueChanged.bind(this);
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
onValueChanged(event: ChangeEvent) {
|
|
16
|
+
const newValue = (event.target as HTMLInputElement).value;
|
|
17
|
+
this.changeValue(newValue);
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
render() {
|
|
21
|
+
return (
|
|
22
|
+
<Input
|
|
23
|
+
size="small"
|
|
24
|
+
style={{marginTop: "3px"}}
|
|
25
|
+
value={this.state.currentValue}
|
|
26
|
+
allowClear={true}
|
|
27
|
+
onChange={this.onValueChanged}
|
|
28
|
+
onKeyDown={(e) => {
|
|
29
|
+
if (e.key === Key.Enter) {
|
|
30
|
+
this.setValue(this.state.currentValue, true);
|
|
31
|
+
this.props.context?.onFilterConfirmed();
|
|
32
|
+
}
|
|
33
|
+
}}
|
|
34
|
+
/>
|
|
35
|
+
)
|
|
36
|
+
}
|
|
37
|
+
}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import memoize from "memoize-one";
|
|
2
|
+
|
|
3
|
+
export default class WildcardQuickFilterEngine {
|
|
4
|
+
|
|
5
|
+
constructor() {
|
|
6
|
+
this.getWildcardFilterRegExp = memoize(this.getWildcardFilterRegExp).bind(this);
|
|
7
|
+
this.quickFilterParser = this.quickFilterParser.bind(this);
|
|
8
|
+
this.quickFilterMatcher = this.quickFilterMatcher.bind(this);
|
|
9
|
+
this.match = this.match.bind(this);
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
quickFilterParser(quickFilter: string): string[] {
|
|
13
|
+
const quickFilterParts = quickFilter.split(' ');
|
|
14
|
+
const quickFilterPartsWildcardMatchers = quickFilterParts.map((quickFilterPart) => {
|
|
15
|
+
return this.getWildcardFilterRegExp(quickFilterPart);
|
|
16
|
+
});
|
|
17
|
+
return quickFilterPartsWildcardMatchers as any as string[];
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
quickFilterMatcher(quickFilterStringParts: string[], rowQuickFilterAggregateText: string): boolean {
|
|
21
|
+
const quickFilterParts = quickFilterStringParts as any as (string | RegExp)[];
|
|
22
|
+
for (const quickFilterPart of quickFilterParts) {
|
|
23
|
+
if (typeof quickFilterPart === 'string') {
|
|
24
|
+
if (rowQuickFilterAggregateText.indexOf(quickFilterPart) < 0) {
|
|
25
|
+
return false;
|
|
26
|
+
}
|
|
27
|
+
} else if (!quickFilterPart.test(rowQuickFilterAggregateText)) {
|
|
28
|
+
return false;
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
return true;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
getWildcardFilterRegExp(wildcardFilter: string): RegExp | string {
|
|
35
|
+
if (wildcardFilter.indexOf("*") >= 0 || wildcardFilter.indexOf("?") >= 0) {
|
|
36
|
+
const pattern = "^" + wildcardFilter.replace(/\./g, '\\.').replace(/\*/g, '[\\w\\. \\t]*').replace(/\?/g, '[\\w\\. \\t]') + "$";
|
|
37
|
+
return new RegExp(pattern, "m");
|
|
38
|
+
} else {
|
|
39
|
+
return wildcardFilter;
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
match(wildcardFilter: RegExp | string, content: string): boolean {
|
|
44
|
+
if (typeof wildcardFilter === "string") {
|
|
45
|
+
return content.indexOf(wildcardFilter) >= 0;
|
|
46
|
+
} else {
|
|
47
|
+
return wildcardFilter.test(content);
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
}
|
|
@@ -0,0 +1,270 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import {
|
|
3
|
+
CheckOutlined,
|
|
4
|
+
ColumnWidthOutlined,
|
|
5
|
+
ControlOutlined,
|
|
6
|
+
EyeInvisibleOutlined,
|
|
7
|
+
PushpinOutlined
|
|
8
|
+
} from "@ant-design/icons";
|
|
9
|
+
import {Dropdown, MenuProps} from "antd";
|
|
10
|
+
import i18n from "d2core/i18n/i18n"
|
|
11
|
+
import {UndoMenuIcon} from "d2coreui/components/icons/undoIcon";
|
|
12
|
+
import {MenuElement} from "../dataGrid";
|
|
13
|
+
import {calculateLineHeight, GRID_DEFAULT_ROW_HEIGHT_DELTA} from "../config/rowHeightCalculator";
|
|
14
|
+
import {Column} from "ag-grid-community";
|
|
15
|
+
|
|
16
|
+
export default class SimpleHeader extends React.Component<any, any> {
|
|
17
|
+
lastMovingChanged: number;
|
|
18
|
+
unmounted: boolean = false;
|
|
19
|
+
|
|
20
|
+
constructor(props: Readonly<any>) {
|
|
21
|
+
super(props);
|
|
22
|
+
this.state = {
|
|
23
|
+
sortMode: "",
|
|
24
|
+
sortOrderIndex: null,
|
|
25
|
+
filterPresent: false,
|
|
26
|
+
menuVisible: false
|
|
27
|
+
};
|
|
28
|
+
this.lastMovingChanged = 0;
|
|
29
|
+
this.onHeaderClick = this.onHeaderClick.bind(this);
|
|
30
|
+
this.onMovingChanged = this.onMovingChanged.bind(this);
|
|
31
|
+
this.onFilterChanged = this.onFilterChanged.bind(this);
|
|
32
|
+
this.onSortChanged = this.onSortChanged.bind(this);
|
|
33
|
+
this.onMultiSortChanged = this.onMultiSortChanged.bind(this);
|
|
34
|
+
this.onMenuSelect = this.onMenuSelect.bind(this);
|
|
35
|
+
props.column.addEventListener('movingChanged', this.onMovingChanged);
|
|
36
|
+
props.column.addEventListener('filterChanged', this.onFilterChanged);
|
|
37
|
+
props.column.addEventListener('sortChanged', this.onSortChanged);
|
|
38
|
+
props.api.addEventListener('sortChanged', this.onMultiSortChanged);
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
componentDidMount() {
|
|
42
|
+
this.onFilterChanged();
|
|
43
|
+
this.onSortChanged();
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
componentWillUnmount() {
|
|
47
|
+
this.props.column.removeEventListener(this.onMovingChanged);
|
|
48
|
+
this.props.column.removeEventListener(this.onFilterChanged);
|
|
49
|
+
this.props.column.removeEventListener(this.onSortChanged);
|
|
50
|
+
this.unmounted = true;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
onHeaderClick(event: React.MouseEvent<HTMLDivElement>) {
|
|
54
|
+
const target = event.target as HTMLElement;
|
|
55
|
+
if (target && target.className && target.className.indexOf("menu") >= 0) {
|
|
56
|
+
// now clicking on menu button, ignore sorting operation
|
|
57
|
+
return;
|
|
58
|
+
}
|
|
59
|
+
// sometimes when moving a column via dragging, this was also firing a clicked event.
|
|
60
|
+
// this check stops sort if a) column is moving or b) column moved less than 200ms ago (so caters for race condition)
|
|
61
|
+
const moving = this.props.column.isMoving();
|
|
62
|
+
const nowTime = new Date().getTime();
|
|
63
|
+
// typically there is <2ms if moving flag was set recently, as it would be done in same VM turn
|
|
64
|
+
const movedRecently = (nowTime - this.lastMovingChanged) < 50;
|
|
65
|
+
const columnMoving = moving || movedRecently;
|
|
66
|
+
|
|
67
|
+
if (!columnMoving && this.props.column.colDef.sortable) {
|
|
68
|
+
const sortUsingCtrl = this.props.api.getGridOption('multiSortKey') === 'ctrl';
|
|
69
|
+
const multiSort = sortUsingCtrl ? (event.ctrlKey || event.metaKey) : event.shiftKey;
|
|
70
|
+
this.props.progressSort(multiSort);
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
// keep track of last time the moving changed flag was set
|
|
75
|
+
onMovingChanged() {
|
|
76
|
+
this.lastMovingChanged = new Date().getTime();
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
onFilterChanged() {
|
|
80
|
+
const filterPresent = this.props.column.isFilterActive();
|
|
81
|
+
if (!this.unmounted) {
|
|
82
|
+
this.setState({filterPresent: filterPresent});
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
onSortChanged() {
|
|
87
|
+
let sortMode = "";
|
|
88
|
+
if (this.props.column.isSortAscending()) {
|
|
89
|
+
sortMode = "asc";
|
|
90
|
+
} else if (this.props.column.isSortDescending()) {
|
|
91
|
+
sortMode = "desc";
|
|
92
|
+
}
|
|
93
|
+
if (!this.unmounted) {
|
|
94
|
+
this.setState({
|
|
95
|
+
sortMode: sortMode,
|
|
96
|
+
});
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
onMultiSortChanged() {
|
|
101
|
+
let showOrderIndex = null;
|
|
102
|
+
const col = this.props.column;
|
|
103
|
+
const allColumnsWithSorting = this.props.api.getColumns().filter((c:Column)=> !!c.getSort());
|
|
104
|
+
|
|
105
|
+
const moreThanOneColSorting = allColumnsWithSorting.length > 1;
|
|
106
|
+
const showIndex = col.isSorting() && moreThanOneColSorting;
|
|
107
|
+
if (showIndex) {
|
|
108
|
+
showOrderIndex = col.getSortIndex()!! + 1;
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
if (!this.unmounted) {
|
|
112
|
+
this.setState({
|
|
113
|
+
showOrderIndex: showOrderIndex
|
|
114
|
+
});
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
onMenuSelect(clickParam: any) {
|
|
119
|
+
const {key} = clickParam;
|
|
120
|
+
const pinned = this.props.column.pinned;
|
|
121
|
+
if (key === "pinLeft") {
|
|
122
|
+
if (pinned === "left") {
|
|
123
|
+
this.props.api.setColumnsPinned([this.props.column], null);
|
|
124
|
+
} else {
|
|
125
|
+
this.props.api.setColumnsPinned([this.props.column], "left");
|
|
126
|
+
}
|
|
127
|
+
} else if (key === "pinRight") {
|
|
128
|
+
if (pinned === "right") {
|
|
129
|
+
this.props.api.setColumnsPinned([this.props.column], null);
|
|
130
|
+
} else {
|
|
131
|
+
this.props.api.setColumnsPinned([this.props.column], "right");
|
|
132
|
+
}
|
|
133
|
+
} else if (key === "autosizeColumn") {
|
|
134
|
+
this.props.api.autoSizeColumns([this.props.column]);
|
|
135
|
+
} else if (key === "hideColumn") {
|
|
136
|
+
this.props.api.setColumnsVisible([this.props.column], false);
|
|
137
|
+
} else if (key === "autosizeAllColumns") {
|
|
138
|
+
this.props.api.autoSizeAllColumns();
|
|
139
|
+
} else if (key === "resetColumns") {
|
|
140
|
+
this.props.api.resetColumnState();
|
|
141
|
+
} else if (key === "columnsConfig") {
|
|
142
|
+
this.props.onColumnsConfigVisible(true);
|
|
143
|
+
}
|
|
144
|
+
this.setState({menuVisible: false});
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
getColumnMenu(): MenuProps {
|
|
148
|
+
const pinned = this.props.column.pinned;
|
|
149
|
+
const items: MenuElement[] = [
|
|
150
|
+
{
|
|
151
|
+
key: "pin",
|
|
152
|
+
label: <span><PushpinOutlined/> {i18n("Pin Column")}</span>,
|
|
153
|
+
children: [
|
|
154
|
+
{
|
|
155
|
+
key: "pinLeft",
|
|
156
|
+
icon: <CheckOutlined style={{visibility: pinned === "left" ? "visible" : "hidden"}}/>,
|
|
157
|
+
label: i18n("Pin Left"),
|
|
158
|
+
},
|
|
159
|
+
{
|
|
160
|
+
key: "pinRight",
|
|
161
|
+
icon: <CheckOutlined style={{visibility: pinned === "right" ? "visible" : "hidden"}}/>,
|
|
162
|
+
label: i18n("Pin Right"),
|
|
163
|
+
},
|
|
164
|
+
]
|
|
165
|
+
},
|
|
166
|
+
{
|
|
167
|
+
key: "autosizeColumn",
|
|
168
|
+
icon: <ColumnWidthOutlined/>,
|
|
169
|
+
label: i18n("Autosize Column")
|
|
170
|
+
},
|
|
171
|
+
{
|
|
172
|
+
key: "hideColumn",
|
|
173
|
+
icon: <EyeInvisibleOutlined/>,
|
|
174
|
+
label: i18n("Hide Column"),
|
|
175
|
+
},
|
|
176
|
+
{
|
|
177
|
+
key: "divider-menu",
|
|
178
|
+
type: "divider",
|
|
179
|
+
},
|
|
180
|
+
{
|
|
181
|
+
key: "autosizeAllColumns",
|
|
182
|
+
icon: <ColumnWidthOutlined/>,
|
|
183
|
+
label: i18n("Autosize All Columns")
|
|
184
|
+
},
|
|
185
|
+
{
|
|
186
|
+
key: "resetColumns",
|
|
187
|
+
icon: <UndoMenuIcon/>,
|
|
188
|
+
label: i18n("Reset Columns")
|
|
189
|
+
},
|
|
190
|
+
{
|
|
191
|
+
key: "columnsConfig",
|
|
192
|
+
icon: <ControlOutlined/>,
|
|
193
|
+
label: i18n("Columns Configuration")
|
|
194
|
+
},
|
|
195
|
+
];
|
|
196
|
+
|
|
197
|
+
return {
|
|
198
|
+
onClick: this.onMenuSelect,
|
|
199
|
+
items: items,
|
|
200
|
+
};
|
|
201
|
+
}
|
|
202
|
+
|
|
203
|
+
render() {
|
|
204
|
+
const alwaysHideNoSort = !this.props.column.getColDef().unSortIcon && !this.props.api.getGridOption('unSortIcon');
|
|
205
|
+
const sortAscClassName = !this.props.column.isSortAscending() ? "ag-hidden" : "",
|
|
206
|
+
sortDescClassName = !this.props.column.isSortDescending() ? "ag-hidden" : "",
|
|
207
|
+
sortNoneClassName = alwaysHideNoSort || !this.props.column.isSortNone() ? "ag-hidden" : "";
|
|
208
|
+
let containerClassName = "";
|
|
209
|
+
if (this.props.column.isSortAscending()) {
|
|
210
|
+
containerClassName = 'ag-header-cell-sorted-asc';
|
|
211
|
+
} else if (this.props.column.isSortDescending()) {
|
|
212
|
+
containerClassName = 'ag-header-cell-sorted-desc';
|
|
213
|
+
} else if (this.props.column.isSortNone()) {
|
|
214
|
+
containerClassName = 'ag-header-cell-sorted-none';
|
|
215
|
+
}
|
|
216
|
+
const sortOrderIndexClassName = !this.state.showOrderIndex ? "ag-hidden" : "";
|
|
217
|
+
const filterClassName = !this.state.filterPresent ? "ag-hidden" : "";
|
|
218
|
+
const columnMenu = this.getColumnMenu();
|
|
219
|
+
|
|
220
|
+
const textStyle = {
|
|
221
|
+
fontSize: this.props.context.fontSize,
|
|
222
|
+
lineHeight: calculateLineHeight(this.props.context.fontSize, GRID_DEFAULT_ROW_HEIGHT_DELTA + 2)
|
|
223
|
+
};
|
|
224
|
+
|
|
225
|
+
return (
|
|
226
|
+
<Dropdown menu={columnMenu} trigger={["contextMenu"]} placement="bottom">
|
|
227
|
+
<div className={"ag-cell-label-container " + containerClassName} role="presentation"
|
|
228
|
+
onClick={this.onHeaderClick}
|
|
229
|
+
onMouseOver={() => {
|
|
230
|
+
this.setState({menuVisible: true});
|
|
231
|
+
}}
|
|
232
|
+
onMouseOut={() => {
|
|
233
|
+
this.setState({menuVisible: false});
|
|
234
|
+
}}>
|
|
235
|
+
<Dropdown menu={columnMenu} trigger={["click"]} placement="bottom">
|
|
236
|
+
<span ref="eMenu" className="ag-header-icon ag-header-cell-menu-button"
|
|
237
|
+
style={{
|
|
238
|
+
opacity: this.state.menuVisible ? 1 : 0,
|
|
239
|
+
transition: "opacity 0.2s, border 0.2s",
|
|
240
|
+
cursor: this.state.menuVisible ? "pointer" : undefined
|
|
241
|
+
}}>
|
|
242
|
+
<span className="ag-icon ag-icon-menu" unselectable="on"/>
|
|
243
|
+
</span>
|
|
244
|
+
</Dropdown>
|
|
245
|
+
<div className="ag-header-cell-label" role="presentation" unselectable="on"
|
|
246
|
+
style={textStyle}>
|
|
247
|
+
<span className="ag-header-cell-text" role="columnheader" unselectable="on">
|
|
248
|
+
{this.props.displayName}
|
|
249
|
+
</span>
|
|
250
|
+
<span className={"ag-header-icon ag-filter-icon " + filterClassName}>
|
|
251
|
+
<span className="ag-icon ag-icon-filter" unselectable="on"/>
|
|
252
|
+
</span>
|
|
253
|
+
<span className={"ag-header-icon ag-sort-ascending-icon " + sortAscClassName}>
|
|
254
|
+
<span className="ag-icon ag-icon-asc" unselectable="on"/>
|
|
255
|
+
</span>
|
|
256
|
+
<span className={"ag-header-icon ag-sort-descending-icon " + sortDescClassName}>
|
|
257
|
+
<span className="ag-icon ag-icon-desc" unselectable="on"/>
|
|
258
|
+
</span>
|
|
259
|
+
<span className={"ag-header-icon ag-sort-none-icon " + sortNoneClassName}>
|
|
260
|
+
<span className="ag-icon ag-icon-none" unselectable="on"/>
|
|
261
|
+
</span>
|
|
262
|
+
<span className={"ag-header-icon ag-sort-order " + sortOrderIndexClassName}>
|
|
263
|
+
{this.state.showOrderIndex}
|
|
264
|
+
</span>
|
|
265
|
+
</div>
|
|
266
|
+
</div>
|
|
267
|
+
</Dropdown>
|
|
268
|
+
);
|
|
269
|
+
}
|
|
270
|
+
}
|
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import {Button, InputNumber, Popover, Space} from "antd";
|
|
3
|
+
import i18n from "d2core/i18n/i18n";
|
|
4
|
+
import {
|
|
5
|
+
CaretLeftOutlined,
|
|
6
|
+
CaretRightOutlined,
|
|
7
|
+
CheckOutlined,
|
|
8
|
+
StepBackwardOutlined,
|
|
9
|
+
StepForwardOutlined
|
|
10
|
+
} from "@ant-design/icons";
|
|
11
|
+
|
|
12
|
+
interface DataGridPaginationProps {
|
|
13
|
+
disabled?: boolean
|
|
14
|
+
current: number
|
|
15
|
+
pageSize: number
|
|
16
|
+
total: number
|
|
17
|
+
|
|
18
|
+
onGoToPage(page: number): void
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
interface DataGridPaginationState {
|
|
22
|
+
gotoPageNumber?: number
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
export default class DataGridPagination extends React.Component<DataGridPaginationProps, DataGridPaginationState> {
|
|
26
|
+
constructor(props: Readonly<DataGridPaginationProps>) {
|
|
27
|
+
super(props);
|
|
28
|
+
|
|
29
|
+
this.state = {}
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
render() {
|
|
33
|
+
const {disabled, total, pageSize, current} = this.props;
|
|
34
|
+
const rangeStart = total === 0 ? 0 : (current - 1) * pageSize + 1;
|
|
35
|
+
const rangeEnd = current * pageSize > total ? total : current * pageSize;
|
|
36
|
+
const totalPages = Math.ceil(total / pageSize);
|
|
37
|
+
return (
|
|
38
|
+
<>
|
|
39
|
+
<li style={{margin: "0 12px", lineHeight: "32px", whiteSpace: "nowrap"}}>
|
|
40
|
+
{`${rangeStart}-${rangeEnd} ${i18n('of')} ${total}`}
|
|
41
|
+
</li>
|
|
42
|
+
<Button.Group>
|
|
43
|
+
<Button
|
|
44
|
+
title={i18n("First Page")}
|
|
45
|
+
disabled={disabled || current === 1}
|
|
46
|
+
icon={<StepBackwardOutlined/>}
|
|
47
|
+
onClick={() => {
|
|
48
|
+
this.props.onGoToPage(0);
|
|
49
|
+
}}
|
|
50
|
+
/>
|
|
51
|
+
<Button
|
|
52
|
+
title={i18n("Previous Page")}
|
|
53
|
+
disabled={disabled || current === 1}
|
|
54
|
+
icon={<CaretLeftOutlined/>}
|
|
55
|
+
onClick={() => {
|
|
56
|
+
this.props.onGoToPage(current - 1);
|
|
57
|
+
}}
|
|
58
|
+
/>
|
|
59
|
+
<Popover
|
|
60
|
+
placement="bottom"
|
|
61
|
+
trigger={disabled || totalPages <= 1 ? [] : ["hover", "click"]}
|
|
62
|
+
content={
|
|
63
|
+
<Space.Compact>
|
|
64
|
+
<InputNumber
|
|
65
|
+
disabled={disabled || total === 0}
|
|
66
|
+
min={1} max={totalPages}
|
|
67
|
+
value={this.state.gotoPageNumber ? this.state.gotoPageNumber : this.props.current}
|
|
68
|
+
onChange={(newValue) => {
|
|
69
|
+
if (typeof newValue === "number") {
|
|
70
|
+
this.setState({gotoPageNumber: newValue});
|
|
71
|
+
}
|
|
72
|
+
}}
|
|
73
|
+
onKeyDown={(e) => {
|
|
74
|
+
if (e.code === "Enter") {
|
|
75
|
+
if (this.state.gotoPageNumber) {
|
|
76
|
+
this.props.onGoToPage(this.state.gotoPageNumber);
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
}}
|
|
80
|
+
/>
|
|
81
|
+
<Button
|
|
82
|
+
title={i18n("Goto Page")}
|
|
83
|
+
type="primary"
|
|
84
|
+
onClick={() => {
|
|
85
|
+
if (this.state.gotoPageNumber) {
|
|
86
|
+
this.props.onGoToPage(this.state.gotoPageNumber);
|
|
87
|
+
}
|
|
88
|
+
}}
|
|
89
|
+
>
|
|
90
|
+
<CheckOutlined/>
|
|
91
|
+
</Button>
|
|
92
|
+
</Space.Compact>
|
|
93
|
+
}>
|
|
94
|
+
<Button disabled={disabled} style={{width: 80, paddingLeft: 0, paddingRight: 0}}>
|
|
95
|
+
<span style={{
|
|
96
|
+
display: "inline-block",
|
|
97
|
+
width: "100%",
|
|
98
|
+
textAlign: "center",
|
|
99
|
+
}}>{total === 0 ? 0 : current} / {totalPages}</span>
|
|
100
|
+
</Button>
|
|
101
|
+
</Popover>
|
|
102
|
+
<Button
|
|
103
|
+
title={i18n("Next Page")}
|
|
104
|
+
disabled={disabled || current === totalPages || total === 0}
|
|
105
|
+
icon={<CaretRightOutlined/>}
|
|
106
|
+
onClick={() => {
|
|
107
|
+
this.props.onGoToPage(current + 1);
|
|
108
|
+
}}
|
|
109
|
+
/>
|
|
110
|
+
<Button
|
|
111
|
+
title={i18n("Last Page")}
|
|
112
|
+
disabled={disabled || current === totalPages || total === 0}
|
|
113
|
+
icon={<StepForwardOutlined/>}
|
|
114
|
+
onClick={() => {
|
|
115
|
+
this.props.onGoToPage(totalPages);
|
|
116
|
+
}}
|
|
117
|
+
/>
|
|
118
|
+
</Button.Group>
|
|
119
|
+
</>
|
|
120
|
+
);
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
|
|
3
|
+
export default class LoadingOverlay extends React.PureComponent {
|
|
4
|
+
loadingOverlayRenderer: () => React.ReactElement;
|
|
5
|
+
|
|
6
|
+
constructor(props: Readonly<any>) {
|
|
7
|
+
super(props);
|
|
8
|
+
this.loadingOverlayRenderer = props.api.getGridOption('context').loadingOverlayRenderer;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
render() {
|
|
12
|
+
return (this.loadingOverlayRenderer());
|
|
13
|
+
}
|
|
14
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
|
|
3
|
+
export default class NoRecordsOverlay extends React.PureComponent<any> {
|
|
4
|
+
noRecordsOverlayRenderer: () => React.ReactElement;
|
|
5
|
+
|
|
6
|
+
constructor(props: Readonly<any>) {
|
|
7
|
+
super(props);
|
|
8
|
+
this.noRecordsOverlayRenderer = props.api.getGridOption('context').noRecordsOverlayRenderer;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
render() {
|
|
12
|
+
return <div style={{pointerEvents: "auto"}}>
|
|
13
|
+
{this.noRecordsOverlayRenderer()}
|
|
14
|
+
</div>;
|
|
15
|
+
}
|
|
16
|
+
}
|