@coveord/plasma-mantine 47.0.1-next.2
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/.eslintrc.js +27 -0
- package/.turbo/turbo-build.log +8 -0
- package/.turbo/turbo-test.log +30 -0
- package/LICENSE +15 -0
- package/dist/.tsbuildinfo +1 -0
- package/dist/cjs/__tests__/GlobalSetup.js +17 -0
- package/dist/cjs/__tests__/GlobalSetup.js.map +1 -0
- package/dist/cjs/__tests__/Setup.js +6 -0
- package/dist/cjs/__tests__/Setup.js.map +1 -0
- package/dist/cjs/__tests__/SetupAfterEnv.js +19 -0
- package/dist/cjs/__tests__/SetupAfterEnv.js.map +1 -0
- package/dist/cjs/__tests__/Utils.js +38 -0
- package/dist/cjs/__tests__/Utils.js.map +1 -0
- package/dist/cjs/components/blank-slate/BlankSlate.js +26 -0
- package/dist/cjs/components/blank-slate/BlankSlate.js.map +1 -0
- package/dist/cjs/components/blank-slate/index.js +8 -0
- package/dist/cjs/components/blank-slate/index.js.map +1 -0
- package/dist/cjs/components/code-editor/CodeEditor.example.js +41 -0
- package/dist/cjs/components/code-editor/CodeEditor.example.js.map +1 -0
- package/dist/cjs/components/code-editor/CodeEditor.js +214 -0
- package/dist/cjs/components/code-editor/CodeEditor.js.map +1 -0
- package/dist/cjs/components/code-editor/__mocks__/@monaco-editor/react.js +30 -0
- package/dist/cjs/components/code-editor/__mocks__/@monaco-editor/react.js.map +1 -0
- package/dist/cjs/components/code-editor/__mocks__/monaco-editor.js +24 -0
- package/dist/cjs/components/code-editor/__mocks__/monaco-editor.js.map +1 -0
- package/dist/cjs/components/code-editor/index.js +8 -0
- package/dist/cjs/components/code-editor/index.js.map +1 -0
- package/dist/cjs/components/collection/Collection.example.js +64 -0
- package/dist/cjs/components/collection/Collection.example.js.map +1 -0
- package/dist/cjs/components/collection/Collection.js +129 -0
- package/dist/cjs/components/collection/Collection.js.map +1 -0
- package/dist/cjs/components/collection/CollectionItem.js +109 -0
- package/dist/cjs/components/collection/CollectionItem.js.map +1 -0
- package/dist/cjs/components/collection/Colllection.styles.js +25 -0
- package/dist/cjs/components/collection/Colllection.styles.js.map +1 -0
- package/dist/cjs/components/collection/index.js +8 -0
- package/dist/cjs/components/collection/index.js.map +1 -0
- package/dist/cjs/components/date-range-picker/DateRangePickerInlineCalendar.js +102 -0
- package/dist/cjs/components/date-range-picker/DateRangePickerInlineCalendar.js.map +1 -0
- package/dist/cjs/components/date-range-picker/DateRangePickerPopoverCalendar.js +93 -0
- package/dist/cjs/components/date-range-picker/DateRangePickerPopoverCalendar.js.map +1 -0
- package/dist/cjs/components/date-range-picker/DateRangePickerPresetSelect.js +64 -0
- package/dist/cjs/components/date-range-picker/DateRangePickerPresetSelect.js.map +1 -0
- package/dist/cjs/components/date-range-picker/EditableDateRangePicker.js +66 -0
- package/dist/cjs/components/date-range-picker/EditableDateRangePicker.js.map +1 -0
- package/dist/cjs/components/date-range-picker/index.js +9 -0
- package/dist/cjs/components/date-range-picker/index.js.map +1 -0
- package/dist/cjs/components/header/Header.js +78 -0
- package/dist/cjs/components/header/Header.js.map +1 -0
- package/dist/cjs/components/header/index.js +8 -0
- package/dist/cjs/components/header/index.js.map +1 -0
- package/dist/cjs/components/index.js +17 -0
- package/dist/cjs/components/index.js.map +1 -0
- package/dist/cjs/components/inline-confirm/InlineConfirm.js +39 -0
- package/dist/cjs/components/inline-confirm/InlineConfirm.js.map +1 -0
- package/dist/cjs/components/inline-confirm/InlineConfirmButton.js +28 -0
- package/dist/cjs/components/inline-confirm/InlineConfirmButton.js.map +1 -0
- package/dist/cjs/components/inline-confirm/InlineConfirmContext.js +14 -0
- package/dist/cjs/components/inline-confirm/InlineConfirmContext.js.map +1 -0
- package/dist/cjs/components/inline-confirm/InlineConfirmPrompt.js +48 -0
- package/dist/cjs/components/inline-confirm/InlineConfirmPrompt.js.map +1 -0
- package/dist/cjs/components/inline-confirm/index.js +10 -0
- package/dist/cjs/components/inline-confirm/index.js.map +1 -0
- package/dist/cjs/components/inline-confirm/useInlineConfirm.js +21 -0
- package/dist/cjs/components/inline-confirm/useInlineConfirm.js.map +1 -0
- package/dist/cjs/components/modal-wizard/ModalWizard.js +132 -0
- package/dist/cjs/components/modal-wizard/ModalWizard.js.map +1 -0
- package/dist/cjs/components/modal-wizard/ModalWizardStep.js +23 -0
- package/dist/cjs/components/modal-wizard/ModalWizardStep.js.map +1 -0
- package/dist/cjs/components/modal-wizard/index.js +8 -0
- package/dist/cjs/components/modal-wizard/index.js.map +1 -0
- package/dist/cjs/components/prompt/Prompt.js +100 -0
- package/dist/cjs/components/prompt/Prompt.js.map +1 -0
- package/dist/cjs/components/prompt/PromptFooter.js +25 -0
- package/dist/cjs/components/prompt/PromptFooter.js.map +1 -0
- package/dist/cjs/components/prompt/index.js +8 -0
- package/dist/cjs/components/prompt/index.js.map +1 -0
- package/dist/cjs/components/sticky-footer/StickyFooter.js +50 -0
- package/dist/cjs/components/sticky-footer/StickyFooter.js.map +1 -0
- package/dist/cjs/components/sticky-footer/index.js +8 -0
- package/dist/cjs/components/sticky-footer/index.js.map +1 -0
- package/dist/cjs/components/table/Table.js +259 -0
- package/dist/cjs/components/table/Table.js.map +1 -0
- package/dist/cjs/components/table/TableActions.js +25 -0
- package/dist/cjs/components/table/TableActions.js.map +1 -0
- package/dist/cjs/components/table/TableCollapsibleColumn.js +33 -0
- package/dist/cjs/components/table/TableCollapsibleColumn.js.map +1 -0
- package/dist/cjs/components/table/TableContext.js +14 -0
- package/dist/cjs/components/table/TableContext.js.map +1 -0
- package/dist/cjs/components/table/TableDateRangePicker.js +72 -0
- package/dist/cjs/components/table/TableDateRangePicker.js.map +1 -0
- package/dist/cjs/components/table/TableFilter.js +53 -0
- package/dist/cjs/components/table/TableFilter.js.map +1 -0
- package/dist/cjs/components/table/TableFooter.js +23 -0
- package/dist/cjs/components/table/TableFooter.js.map +1 -0
- package/dist/cjs/components/table/TableHeader.js +37 -0
- package/dist/cjs/components/table/TableHeader.js.map +1 -0
- package/dist/cjs/components/table/TablePagination.js +47 -0
- package/dist/cjs/components/table/TablePagination.js.map +1 -0
- package/dist/cjs/components/table/TablePerPage.js +52 -0
- package/dist/cjs/components/table/TablePerPage.js.map +1 -0
- package/dist/cjs/components/table/TablePredicate.js +45 -0
- package/dist/cjs/components/table/TablePredicate.js.map +1 -0
- package/dist/cjs/components/table/Th.js +107 -0
- package/dist/cjs/components/table/Th.js.map +1 -0
- package/dist/cjs/components/table/index.js +9 -0
- package/dist/cjs/components/table/index.js.map +1 -0
- package/dist/cjs/components/table/useTable.js +21 -0
- package/dist/cjs/components/table/useTable.js.map +1 -0
- package/dist/cjs/hooks/index.js +9 -0
- package/dist/cjs/hooks/index.js.map +1 -0
- package/dist/cjs/hooks/useControlledList.js +52 -0
- package/dist/cjs/hooks/useControlledList.js.map +1 -0
- package/dist/cjs/hooks/useParentHeight.js +36 -0
- package/dist/cjs/hooks/useParentHeight.js.map +1 -0
- package/dist/cjs/index.js +31 -0
- package/dist/cjs/index.js.map +1 -0
- package/dist/cjs/theme/PlasmaColors.js +54 -0
- package/dist/cjs/theme/PlasmaColors.js.map +1 -0
- package/dist/cjs/theme/Plasmantine.js +24 -0
- package/dist/cjs/theme/Plasmantine.js.map +1 -0
- package/dist/cjs/theme/Theme.js +223 -0
- package/dist/cjs/theme/Theme.js.map +1 -0
- package/dist/cjs/theme/index.js +8 -0
- package/dist/cjs/theme/index.js.map +1 -0
- package/dist/definitions/__tests__/GlobalSetup.d.ts +3 -0
- package/dist/definitions/__tests__/GlobalSetup.d.ts.map +1 -0
- package/dist/definitions/__tests__/Setup.d.ts +5 -0
- package/dist/definitions/__tests__/Setup.d.ts.map +1 -0
- package/dist/definitions/__tests__/SetupAfterEnv.d.ts +7 -0
- package/dist/definitions/__tests__/SetupAfterEnv.d.ts.map +1 -0
- package/dist/definitions/__tests__/Utils.d.ts +8 -0
- package/dist/definitions/__tests__/Utils.d.ts.map +1 -0
- package/dist/definitions/components/blank-slate/BlankSlate.d.ts +12 -0
- package/dist/definitions/components/blank-slate/BlankSlate.d.ts.map +1 -0
- package/dist/definitions/components/blank-slate/index.d.ts +2 -0
- package/dist/definitions/components/blank-slate/index.d.ts.map +1 -0
- package/dist/definitions/components/code-editor/CodeEditor.d.ts +50 -0
- package/dist/definitions/components/code-editor/CodeEditor.d.ts.map +1 -0
- package/dist/definitions/components/code-editor/CodeEditor.example.d.ts +4 -0
- package/dist/definitions/components/code-editor/CodeEditor.example.d.ts.map +1 -0
- package/dist/definitions/components/code-editor/__mocks__/@monaco-editor/react.d.ts +9 -0
- package/dist/definitions/components/code-editor/__mocks__/@monaco-editor/react.d.ts.map +1 -0
- package/dist/definitions/components/code-editor/__mocks__/monaco-editor.d.ts +8 -0
- package/dist/definitions/components/code-editor/__mocks__/monaco-editor.d.ts.map +1 -0
- package/dist/definitions/components/code-editor/index.d.ts +2 -0
- package/dist/definitions/components/code-editor/index.d.ts.map +1 -0
- package/dist/definitions/components/collection/Collection.d.ts +21 -0
- package/dist/definitions/components/collection/Collection.d.ts.map +1 -0
- package/dist/definitions/components/collection/Collection.example.d.ts +4 -0
- package/dist/definitions/components/collection/Collection.example.d.ts.map +1 -0
- package/dist/definitions/components/collection/CollectionItem.d.ts +15 -0
- package/dist/definitions/components/collection/CollectionItem.d.ts.map +1 -0
- package/dist/definitions/components/collection/Colllection.styles.d.ts +9 -0
- package/dist/definitions/components/collection/Colllection.styles.d.ts.map +1 -0
- package/dist/definitions/components/collection/index.d.ts +2 -0
- package/dist/definitions/components/collection/index.d.ts.map +1 -0
- package/dist/definitions/components/date-range-picker/DateRangePickerInlineCalendar.d.ts +37 -0
- package/dist/definitions/components/date-range-picker/DateRangePickerInlineCalendar.d.ts.map +1 -0
- package/dist/definitions/components/date-range-picker/DateRangePickerPopoverCalendar.d.ts +30 -0
- package/dist/definitions/components/date-range-picker/DateRangePickerPopoverCalendar.d.ts.map +1 -0
- package/dist/definitions/components/date-range-picker/DateRangePickerPresetSelect.d.ts +16 -0
- package/dist/definitions/components/date-range-picker/DateRangePickerPresetSelect.d.ts.map +1 -0
- package/dist/definitions/components/date-range-picker/EditableDateRangePicker.d.ts +18 -0
- package/dist/definitions/components/date-range-picker/EditableDateRangePicker.d.ts.map +1 -0
- package/dist/definitions/components/date-range-picker/index.d.ts +3 -0
- package/dist/definitions/components/date-range-picker/index.d.ts.map +1 -0
- package/dist/definitions/components/header/Header.d.ts +12 -0
- package/dist/definitions/components/header/Header.d.ts.map +1 -0
- package/dist/definitions/components/header/index.d.ts +2 -0
- package/dist/definitions/components/header/index.d.ts.map +1 -0
- package/dist/definitions/components/index.d.ts +11 -0
- package/dist/definitions/components/index.d.ts.map +1 -0
- package/dist/definitions/components/inline-confirm/InlineConfirm.d.ts +10 -0
- package/dist/definitions/components/inline-confirm/InlineConfirm.d.ts.map +1 -0
- package/dist/definitions/components/inline-confirm/InlineConfirmButton.d.ts +8 -0
- package/dist/definitions/components/inline-confirm/InlineConfirmButton.d.ts.map +1 -0
- package/dist/definitions/components/inline-confirm/InlineConfirmContext.d.ts +9 -0
- package/dist/definitions/components/inline-confirm/InlineConfirmContext.d.ts.map +1 -0
- package/dist/definitions/components/inline-confirm/InlineConfirmPrompt.d.ts +11 -0
- package/dist/definitions/components/inline-confirm/InlineConfirmPrompt.d.ts.map +1 -0
- package/dist/definitions/components/inline-confirm/index.d.ts +4 -0
- package/dist/definitions/components/inline-confirm/index.d.ts.map +1 -0
- package/dist/definitions/components/inline-confirm/useInlineConfirm.d.ts +6 -0
- package/dist/definitions/components/inline-confirm/useInlineConfirm.d.ts.map +1 -0
- package/dist/definitions/components/modal-wizard/ModalWizard.d.ts +73 -0
- package/dist/definitions/components/modal-wizard/ModalWizard.d.ts.map +1 -0
- package/dist/definitions/components/modal-wizard/ModalWizardStep.d.ts +42 -0
- package/dist/definitions/components/modal-wizard/ModalWizardStep.d.ts.map +1 -0
- package/dist/definitions/components/modal-wizard/index.d.ts +3 -0
- package/dist/definitions/components/modal-wizard/index.d.ts.map +1 -0
- package/dist/definitions/components/prompt/Prompt.d.ts +14 -0
- package/dist/definitions/components/prompt/Prompt.d.ts.map +1 -0
- package/dist/definitions/components/prompt/PromptFooter.d.ts +6 -0
- package/dist/definitions/components/prompt/PromptFooter.d.ts.map +1 -0
- package/dist/definitions/components/prompt/index.d.ts +2 -0
- package/dist/definitions/components/prompt/index.d.ts.map +1 -0
- package/dist/definitions/components/sticky-footer/StickyFooter.d.ts +10 -0
- package/dist/definitions/components/sticky-footer/StickyFooter.d.ts.map +1 -0
- package/dist/definitions/components/sticky-footer/index.d.ts +2 -0
- package/dist/definitions/components/sticky-footer/index.d.ts.map +1 -0
- package/dist/definitions/components/table/Table.d.ts +84 -0
- package/dist/definitions/components/table/Table.d.ts.map +1 -0
- package/dist/definitions/components/table/TableActions.d.ts +26 -0
- package/dist/definitions/components/table/TableActions.d.ts.map +1 -0
- package/dist/definitions/components/table/TableCollapsibleColumn.d.ts +6 -0
- package/dist/definitions/components/table/TableCollapsibleColumn.d.ts.map +1 -0
- package/dist/definitions/components/table/TableContext.d.ts +54 -0
- package/dist/definitions/components/table/TableContext.d.ts.map +1 -0
- package/dist/definitions/components/table/TableDateRangePicker.d.ts +20 -0
- package/dist/definitions/components/table/TableDateRangePicker.d.ts.map +1 -0
- package/dist/definitions/components/table/TableFilter.d.ts +12 -0
- package/dist/definitions/components/table/TableFilter.d.ts.map +1 -0
- package/dist/definitions/components/table/TableFooter.d.ts +3 -0
- package/dist/definitions/components/table/TableFooter.d.ts.map +1 -0
- package/dist/definitions/components/table/TableHeader.d.ts +3 -0
- package/dist/definitions/components/table/TableHeader.d.ts.map +1 -0
- package/dist/definitions/components/table/TablePagination.d.ts +10 -0
- package/dist/definitions/components/table/TablePagination.d.ts.map +1 -0
- package/dist/definitions/components/table/TablePerPage.d.ts +20 -0
- package/dist/definitions/components/table/TablePerPage.d.ts.map +1 -0
- package/dist/definitions/components/table/TablePredicate.d.ts +21 -0
- package/dist/definitions/components/table/TablePredicate.d.ts.map +1 -0
- package/dist/definitions/components/table/Th.d.ts +8 -0
- package/dist/definitions/components/table/Th.d.ts.map +1 -0
- package/dist/definitions/components/table/index.d.ts +4 -0
- package/dist/definitions/components/table/index.d.ts.map +1 -0
- package/dist/definitions/components/table/useTable.d.ts +11 -0
- package/dist/definitions/components/table/useTable.d.ts.map +1 -0
- package/dist/definitions/hooks/index.d.ts +3 -0
- package/dist/definitions/hooks/index.d.ts.map +1 -0
- package/dist/definitions/hooks/useControlledList.d.ts +25 -0
- package/dist/definitions/hooks/useControlledList.d.ts.map +1 -0
- package/dist/definitions/hooks/useParentHeight.d.ts +5 -0
- package/dist/definitions/hooks/useParentHeight.d.ts.map +1 -0
- package/dist/definitions/index.d.ts +17 -0
- package/dist/definitions/index.d.ts.map +1 -0
- package/dist/definitions/theme/PlasmaColors.d.ts +14 -0
- package/dist/definitions/theme/PlasmaColors.d.ts.map +1 -0
- package/dist/definitions/theme/Plasmantine.d.ts +3 -0
- package/dist/definitions/theme/Plasmantine.d.ts.map +1 -0
- package/dist/definitions/theme/Theme.d.ts +3 -0
- package/dist/definitions/theme/Theme.d.ts.map +1 -0
- package/dist/definitions/theme/index.d.ts +2 -0
- package/dist/definitions/theme/index.d.ts.map +1 -0
- package/dist/esm/__tests__/GlobalSetup.js +7 -0
- package/dist/esm/__tests__/GlobalSetup.js.map +1 -0
- package/dist/esm/__tests__/Setup.js +5 -0
- package/dist/esm/__tests__/Setup.js.map +1 -0
- package/dist/esm/__tests__/SetupAfterEnv.js +15 -0
- package/dist/esm/__tests__/SetupAfterEnv.js.map +1 -0
- package/dist/esm/__tests__/Utils.js +21 -0
- package/dist/esm/__tests__/Utils.js.map +1 -0
- package/dist/esm/components/blank-slate/BlankSlate.js +16 -0
- package/dist/esm/components/blank-slate/BlankSlate.js.map +1 -0
- package/dist/esm/components/blank-slate/index.js +3 -0
- package/dist/esm/components/blank-slate/index.js.map +1 -0
- package/dist/esm/components/code-editor/CodeEditor.example.js +31 -0
- package/dist/esm/components/code-editor/CodeEditor.example.js.map +1 -0
- package/dist/esm/components/code-editor/CodeEditor.js +201 -0
- package/dist/esm/components/code-editor/CodeEditor.js.map +1 -0
- package/dist/esm/components/code-editor/__mocks__/@monaco-editor/react.js +12 -0
- package/dist/esm/components/code-editor/__mocks__/@monaco-editor/react.js.map +1 -0
- package/dist/esm/components/code-editor/__mocks__/monaco-editor.js +14 -0
- package/dist/esm/components/code-editor/__mocks__/monaco-editor.js.map +1 -0
- package/dist/esm/components/code-editor/index.js +3 -0
- package/dist/esm/components/code-editor/index.js.map +1 -0
- package/dist/esm/components/collection/Collection.example.js +54 -0
- package/dist/esm/components/collection/Collection.example.js.map +1 -0
- package/dist/esm/components/collection/Collection.js +118 -0
- package/dist/esm/components/collection/Collection.js.map +1 -0
- package/dist/esm/components/collection/CollectionItem.js +98 -0
- package/dist/esm/components/collection/CollectionItem.js.map +1 -0
- package/dist/esm/components/collection/Colllection.styles.js +15 -0
- package/dist/esm/components/collection/Colllection.styles.js.map +1 -0
- package/dist/esm/components/collection/index.js +3 -0
- package/dist/esm/components/collection/index.js.map +1 -0
- package/dist/esm/components/date-range-picker/DateRangePickerInlineCalendar.js +92 -0
- package/dist/esm/components/date-range-picker/DateRangePickerInlineCalendar.js.map +1 -0
- package/dist/esm/components/date-range-picker/DateRangePickerPopoverCalendar.js +83 -0
- package/dist/esm/components/date-range-picker/DateRangePickerPopoverCalendar.js.map +1 -0
- package/dist/esm/components/date-range-picker/DateRangePickerPresetSelect.js +53 -0
- package/dist/esm/components/date-range-picker/DateRangePickerPresetSelect.js.map +1 -0
- package/dist/esm/components/date-range-picker/EditableDateRangePicker.js +55 -0
- package/dist/esm/components/date-range-picker/EditableDateRangePicker.js.map +1 -0
- package/dist/esm/components/date-range-picker/index.js +4 -0
- package/dist/esm/components/date-range-picker/index.js.map +1 -0
- package/dist/esm/components/header/Header.js +68 -0
- package/dist/esm/components/header/Header.js.map +1 -0
- package/dist/esm/components/header/index.js +3 -0
- package/dist/esm/components/header/index.js.map +1 -0
- package/dist/esm/components/index.js +12 -0
- package/dist/esm/components/index.js.map +1 -0
- package/dist/esm/components/inline-confirm/InlineConfirm.js +29 -0
- package/dist/esm/components/inline-confirm/InlineConfirm.js.map +1 -0
- package/dist/esm/components/inline-confirm/InlineConfirmButton.js +18 -0
- package/dist/esm/components/inline-confirm/InlineConfirmButton.js.map +1 -0
- package/dist/esm/components/inline-confirm/InlineConfirmContext.js +4 -0
- package/dist/esm/components/inline-confirm/InlineConfirmContext.js.map +1 -0
- package/dist/esm/components/inline-confirm/InlineConfirmPrompt.js +38 -0
- package/dist/esm/components/inline-confirm/InlineConfirmPrompt.js.map +1 -0
- package/dist/esm/components/inline-confirm/index.js +5 -0
- package/dist/esm/components/inline-confirm/index.js.map +1 -0
- package/dist/esm/components/inline-confirm/useInlineConfirm.js +11 -0
- package/dist/esm/components/inline-confirm/useInlineConfirm.js.map +1 -0
- package/dist/esm/components/modal-wizard/ModalWizard.js +122 -0
- package/dist/esm/components/modal-wizard/ModalWizard.js.map +1 -0
- package/dist/esm/components/modal-wizard/ModalWizardStep.js +14 -0
- package/dist/esm/components/modal-wizard/ModalWizardStep.js.map +1 -0
- package/dist/esm/components/modal-wizard/index.js +3 -0
- package/dist/esm/components/modal-wizard/index.js.map +1 -0
- package/dist/esm/components/prompt/Prompt.js +90 -0
- package/dist/esm/components/prompt/Prompt.js.map +1 -0
- package/dist/esm/components/prompt/PromptFooter.js +15 -0
- package/dist/esm/components/prompt/PromptFooter.js.map +1 -0
- package/dist/esm/components/prompt/index.js +3 -0
- package/dist/esm/components/prompt/index.js.map +1 -0
- package/dist/esm/components/sticky-footer/StickyFooter.js +40 -0
- package/dist/esm/components/sticky-footer/StickyFooter.js.map +1 -0
- package/dist/esm/components/sticky-footer/index.js +3 -0
- package/dist/esm/components/sticky-footer/index.js.map +1 -0
- package/dist/esm/components/table/Table.js +248 -0
- package/dist/esm/components/table/Table.js.map +1 -0
- package/dist/esm/components/table/TableActions.js +15 -0
- package/dist/esm/components/table/TableActions.js.map +1 -0
- package/dist/esm/components/table/TableCollapsibleColumn.js +25 -0
- package/dist/esm/components/table/TableCollapsibleColumn.js.map +1 -0
- package/dist/esm/components/table/TableContext.js +4 -0
- package/dist/esm/components/table/TableContext.js.map +1 -0
- package/dist/esm/components/table/TableDateRangePicker.js +61 -0
- package/dist/esm/components/table/TableDateRangePicker.js.map +1 -0
- package/dist/esm/components/table/TableFilter.js +43 -0
- package/dist/esm/components/table/TableFilter.js.map +1 -0
- package/dist/esm/components/table/TableFooter.js +13 -0
- package/dist/esm/components/table/TableFooter.js.map +1 -0
- package/dist/esm/components/table/TableHeader.js +27 -0
- package/dist/esm/components/table/TableHeader.js.map +1 -0
- package/dist/esm/components/table/TablePagination.js +37 -0
- package/dist/esm/components/table/TablePagination.js.map +1 -0
- package/dist/esm/components/table/TablePerPage.js +42 -0
- package/dist/esm/components/table/TablePerPage.js.map +1 -0
- package/dist/esm/components/table/TablePredicate.js +35 -0
- package/dist/esm/components/table/TablePredicate.js.map +1 -0
- package/dist/esm/components/table/Th.js +97 -0
- package/dist/esm/components/table/Th.js.map +1 -0
- package/dist/esm/components/table/index.js +4 -0
- package/dist/esm/components/table/index.js.map +1 -0
- package/dist/esm/components/table/useTable.js +11 -0
- package/dist/esm/components/table/useTable.js.map +1 -0
- package/dist/esm/hooks/index.js +4 -0
- package/dist/esm/hooks/index.js.map +1 -0
- package/dist/esm/hooks/useControlledList.js +44 -0
- package/dist/esm/hooks/useControlledList.js.map +1 -0
- package/dist/esm/hooks/useParentHeight.js +28 -0
- package/dist/esm/hooks/useParentHeight.js.map +1 -0
- package/dist/esm/index.js +11 -0
- package/dist/esm/index.js.map +1 -0
- package/dist/esm/theme/PlasmaColors.js +44 -0
- package/dist/esm/theme/PlasmaColors.js.map +1 -0
- package/dist/esm/theme/Plasmantine.js +14 -0
- package/dist/esm/theme/Plasmantine.js.map +1 -0
- package/dist/esm/theme/Theme.js +213 -0
- package/dist/esm/theme/Theme.js.map +1 -0
- package/dist/esm/theme/index.js +3 -0
- package/dist/esm/theme/index.js.map +1 -0
- package/jest.config.js +25 -0
- package/package.json +88 -0
- package/src/__tests__/GlobalSetup.ts +5 -0
- package/src/__tests__/Setup.ts +4 -0
- package/src/__tests__/SetupAfterEnv.ts +16 -0
- package/src/__tests__/Utils.tsx +15 -0
- package/src/components/blank-slate/BlankSlate.tsx +17 -0
- package/src/components/blank-slate/__tests__/BlankSlate.spec.tsx +11 -0
- package/src/components/blank-slate/index.ts +1 -0
- package/src/components/code-editor/CodeEditor.example.tsx +32 -0
- package/src/components/code-editor/CodeEditor.tsx +214 -0
- package/src/components/code-editor/__mocks__/@monaco-editor/react.tsx +10 -0
- package/src/components/code-editor/__mocks__/monaco-editor.ts +9 -0
- package/src/components/code-editor/__tests__/CodeEditor.spec.tsx +56 -0
- package/src/components/code-editor/index.ts +1 -0
- package/src/components/collection/Collection.example.tsx +37 -0
- package/src/components/collection/Collection.tsx +129 -0
- package/src/components/collection/CollectionItem.tsx +92 -0
- package/src/components/collection/Colllection.styles.ts +14 -0
- package/src/components/collection/__tests__/Collection.spec.tsx +247 -0
- package/src/components/collection/index.ts +1 -0
- package/src/components/date-range-picker/DateRangePickerInlineCalendar.tsx +111 -0
- package/src/components/date-range-picker/DateRangePickerPopoverCalendar.tsx +94 -0
- package/src/components/date-range-picker/DateRangePickerPresetSelect.tsx +62 -0
- package/src/components/date-range-picker/EditableDateRangePicker.tsx +60 -0
- package/src/components/date-range-picker/__tests__/DateRangePickerInlineCalendar.spec.tsx +95 -0
- package/src/components/date-range-picker/__tests__/DateRangePickerPopoverCalendar.spec.tsx +101 -0
- package/src/components/date-range-picker/__tests__/DateRangePickerPresetSelect.spec.tsx +53 -0
- package/src/components/date-range-picker/__tests__/EditableDateRangePicker.spec.tsx +47 -0
- package/src/components/date-range-picker/index.tsx +2 -0
- package/src/components/header/Header.tsx +43 -0
- package/src/components/header/__tests__/Header.spec.tsx +79 -0
- package/src/components/header/index.ts +1 -0
- package/src/components/index.ts +10 -0
- package/src/components/inline-confirm/InlineConfirm.tsx +29 -0
- package/src/components/inline-confirm/InlineConfirmButton.tsx +17 -0
- package/src/components/inline-confirm/InlineConfirmContext.ts +9 -0
- package/src/components/inline-confirm/InlineConfirmPrompt.tsx +48 -0
- package/src/components/inline-confirm/__tests__/InlineConfirm.spec.tsx +94 -0
- package/src/components/inline-confirm/index.ts +3 -0
- package/src/components/inline-confirm/useInlineConfirm.ts +12 -0
- package/src/components/modal-wizard/ModalWizard.tsx +211 -0
- package/src/components/modal-wizard/ModalWizardStep.tsx +55 -0
- package/src/components/modal-wizard/__tests__/ModalWizard.spec.tsx +345 -0
- package/src/components/modal-wizard/index.ts +2 -0
- package/src/components/prompt/Prompt.tsx +66 -0
- package/src/components/prompt/PromptFooter.tsx +8 -0
- package/src/components/prompt/__tests__/Prompt.spec.tsx +29 -0
- package/src/components/prompt/index.ts +1 -0
- package/src/components/sticky-footer/StickyFooter.tsx +35 -0
- package/src/components/sticky-footer/__tests__/StickyFooter.spec.tsx +20 -0
- package/src/components/sticky-footer/index.ts +1 -0
- package/src/components/table/Table.tsx +293 -0
- package/src/components/table/TableActions.tsx +36 -0
- package/src/components/table/TableCollapsibleColumn.tsx +26 -0
- package/src/components/table/TableContext.tsx +56 -0
- package/src/components/table/TableDateRangePicker.tsx +65 -0
- package/src/components/table/TableFilter.tsx +44 -0
- package/src/components/table/TableFooter.tsx +8 -0
- package/src/components/table/TableHeader.tsx +21 -0
- package/src/components/table/TablePagination.tsx +41 -0
- package/src/components/table/TablePerPage.tsx +49 -0
- package/src/components/table/TablePredicate.tsx +43 -0
- package/src/components/table/Th.tsx +84 -0
- package/src/components/table/__tests__/Table.spec.tsx +128 -0
- package/src/components/table/__tests__/TableActions.spec.tsx +36 -0
- package/src/components/table/__tests__/TableDateRangePicker.spec.tsx +87 -0
- package/src/components/table/__tests__/TableFilter.spec.tsx +39 -0
- package/src/components/table/__tests__/TablePagination.spec.tsx +50 -0
- package/src/components/table/__tests__/TablePerPage.spec.tsx +81 -0
- package/src/components/table/__tests__/TablePredicate.spec.tsx +120 -0
- package/src/components/table/__tests__/Th.spec.tsx +63 -0
- package/src/components/table/index.ts +3 -0
- package/src/components/table/useTable.tsx +11 -0
- package/src/hooks/__tests__/useControlledList.spec.tsx +41 -0
- package/src/hooks/index.ts +2 -0
- package/src/hooks/useControlledList.ts +53 -0
- package/src/hooks/useParentHeight.ts +25 -0
- package/src/index.ts +21 -0
- package/src/theme/PlasmaColors.ts +44 -0
- package/src/theme/Plasmantine.tsx +10 -0
- package/src/theme/Theme.tsx +161 -0
- package/src/theme/index.ts +1 -0
- package/tsconfig.build.json +4 -0
- package/tsconfig.json +14 -0
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
import _object_spread from "@swc/helpers/src/_object_spread.mjs";
|
|
2
|
+
import _object_spread_props from "@swc/helpers/src/_object_spread_props.mjs";
|
|
3
|
+
import _sliced_to_array from "@swc/helpers/src/_sliced_to_array.mjs";
|
|
4
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
5
|
+
import { Button, createStyles, Modal, Progress } from "@mantine/core";
|
|
6
|
+
import { Children, useMemo, useState } from "react";
|
|
7
|
+
import { StickyFooter } from "../sticky-footer";
|
|
8
|
+
import { ModalWizardStep } from "./ModalWizardStep";
|
|
9
|
+
import { Header } from "../header";
|
|
10
|
+
var useStyles = createStyles(function() {
|
|
11
|
+
return {
|
|
12
|
+
modal: {
|
|
13
|
+
height: "70%",
|
|
14
|
+
display: "flex",
|
|
15
|
+
flexDirection: "column"
|
|
16
|
+
}
|
|
17
|
+
};
|
|
18
|
+
});
|
|
19
|
+
export var ModalWizard = function(param) {
|
|
20
|
+
var _cancelButtonLabel = param.cancelButtonLabel, cancelButtonLabel = _cancelButtonLabel === void 0 ? "Cancel" : _cancelButtonLabel, _nextButtonLabel = param.nextButtonLabel, nextButtonLabel = _nextButtonLabel === void 0 ? "Next" : _nextButtonLabel, _previousButtonLabel = param.previousButtonLabel, previousButtonLabel = _previousButtonLabel === void 0 ? "Previous" : _previousButtonLabel, _finishButtonLabel = param.finishButtonLabel, finishButtonLabel = _finishButtonLabel === void 0 ? "Finish" : _finishButtonLabel, onNext = param.onNext, onPrevious = param.onPrevious, onClose = param.onClose, onFinish = param.onFinish, isDirty = param.isDirty, modalProps = param.modalProps, handleDirtyState = param.handleDirtyState, closeButtonLabel = param.closeButtonLabel, children = param.children;
|
|
21
|
+
var ref, ref1;
|
|
22
|
+
var ref2 = _sliced_to_array(useState(0), 2), currentStepIndex = ref2[0], setCurrentStepIndex = ref2[1];
|
|
23
|
+
var modalSteps = Children.toArray(children).filter(function(child) {
|
|
24
|
+
return child.type === ModalWizardStep;
|
|
25
|
+
});
|
|
26
|
+
var numberOfSteps = modalSteps.length;
|
|
27
|
+
var numberOfStepsCountAsProgress = modalSteps.filter(function(step) {
|
|
28
|
+
return step.props.countsAsProgress;
|
|
29
|
+
}).length;
|
|
30
|
+
var isFirstStep = currentStepIndex === 0;
|
|
31
|
+
var isLastStep = currentStepIndex === numberOfSteps - 1;
|
|
32
|
+
var currentStep = modalSteps.filter(function(step, index) {
|
|
33
|
+
return index === currentStepIndex;
|
|
34
|
+
})[0];
|
|
35
|
+
var ref3;
|
|
36
|
+
var isValid = ((ref3 = currentStep === null || currentStep === void 0 ? void 0 : (ref = currentStep.props) === null || ref === void 0 ? void 0 : (ref1 = ref.validateStep) === null || ref1 === void 0 ? void 0 : ref1.call(ref, currentStepIndex, numberOfSteps)) !== null && ref3 !== void 0 ? ref3 : {
|
|
37
|
+
isValid: true
|
|
38
|
+
}).isValid;
|
|
39
|
+
var isModalDirty = isDirty && isDirty();
|
|
40
|
+
var classes = useStyles().classes;
|
|
41
|
+
var closeModalWizard = function() {
|
|
42
|
+
if (isModalDirty && handleDirtyState) {
|
|
43
|
+
handleDirtyState() && (onClose === null || onClose === void 0 ? void 0 : onClose());
|
|
44
|
+
} else {
|
|
45
|
+
onClose === null || onClose === void 0 ? void 0 : onClose();
|
|
46
|
+
}
|
|
47
|
+
};
|
|
48
|
+
var getProgress = function(currStepIndex) {
|
|
49
|
+
var validSteps = modalSteps.filter(function(step, index) {
|
|
50
|
+
return step.props.countsAsProgress && index <= currStepIndex;
|
|
51
|
+
}).length;
|
|
52
|
+
return validSteps / numberOfStepsCountAsProgress * 100;
|
|
53
|
+
};
|
|
54
|
+
var getProgressMemo = useMemo(function() {
|
|
55
|
+
return getProgress(currentStepIndex);
|
|
56
|
+
}, [
|
|
57
|
+
currentStepIndex
|
|
58
|
+
]);
|
|
59
|
+
return /*#__PURE__*/ _jsxs(Modal, _object_spread_props(_object_spread({
|
|
60
|
+
opened: true,
|
|
61
|
+
classNames: {
|
|
62
|
+
modal: classes.modal
|
|
63
|
+
},
|
|
64
|
+
centered: true,
|
|
65
|
+
closeButtonLabel: closeButtonLabel,
|
|
66
|
+
padding: "xl",
|
|
67
|
+
title: /*#__PURE__*/ _jsx(Header, {
|
|
68
|
+
docLink: currentStep.props.docLin,
|
|
69
|
+
description: typeof currentStep.props.description === "function" ? currentStep.props.description(currentStepIndex + 1, numberOfSteps) : currentStep.props.description,
|
|
70
|
+
py: null,
|
|
71
|
+
px: null,
|
|
72
|
+
children: typeof currentStep.props.title === "function" ? currentStep.props.title(currentStepIndex + 1, numberOfSteps) : currentStep.props.title
|
|
73
|
+
}),
|
|
74
|
+
onClose: closeModalWizard
|
|
75
|
+
}, modalProps), {
|
|
76
|
+
children: [
|
|
77
|
+
currentStep.props.showProgressBar && /*#__PURE__*/ _jsx(Progress, {
|
|
78
|
+
value: getProgressMemo
|
|
79
|
+
}),
|
|
80
|
+
currentStep,
|
|
81
|
+
/*#__PURE__*/ _jsxs(StickyFooter, {
|
|
82
|
+
borderTop: true,
|
|
83
|
+
py: null,
|
|
84
|
+
px: null,
|
|
85
|
+
pt: "md",
|
|
86
|
+
children: [
|
|
87
|
+
/*#__PURE__*/ _jsx(Button, {
|
|
88
|
+
name: isFirstStep ? cancelButtonLabel : previousButtonLabel,
|
|
89
|
+
disabled: false,
|
|
90
|
+
size: "md",
|
|
91
|
+
variant: "outline",
|
|
92
|
+
onClick: function() {
|
|
93
|
+
if (isFirstStep) {
|
|
94
|
+
closeModalWizard();
|
|
95
|
+
} else {
|
|
96
|
+
onPrevious === null || onPrevious === void 0 ? void 0 : onPrevious();
|
|
97
|
+
setCurrentStepIndex(currentStepIndex - 1);
|
|
98
|
+
}
|
|
99
|
+
},
|
|
100
|
+
children: isFirstStep ? cancelButtonLabel : previousButtonLabel
|
|
101
|
+
}),
|
|
102
|
+
/*#__PURE__*/ _jsx(Button, {
|
|
103
|
+
disabled: !isValid,
|
|
104
|
+
size: "md",
|
|
105
|
+
onClick: function() {
|
|
106
|
+
if (isLastStep) {
|
|
107
|
+
onFinish ? onFinish() : onClose();
|
|
108
|
+
} else {
|
|
109
|
+
onNext === null || onNext === void 0 ? void 0 : onNext();
|
|
110
|
+
setCurrentStepIndex(currentStepIndex + 1);
|
|
111
|
+
}
|
|
112
|
+
},
|
|
113
|
+
children: isLastStep ? finishButtonLabel : nextButtonLabel
|
|
114
|
+
})
|
|
115
|
+
]
|
|
116
|
+
})
|
|
117
|
+
]
|
|
118
|
+
}));
|
|
119
|
+
};
|
|
120
|
+
ModalWizard.Step = ModalWizardStep;
|
|
121
|
+
|
|
122
|
+
//# sourceMappingURL=ModalWizard.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../src/components/modal-wizard/ModalWizard.tsx"],"sourcesContent":["import {Button, createStyles, Modal, Progress} from '@mantine/core';\nimport {Children, ReactElement, useMemo, useState} from 'react';\nimport {StickyFooter} from '../sticky-footer';\nimport {ModalWizardStep} from './ModalWizardStep';\nimport {Header} from '../header';\n\ninterface ModalWizardProps {\n /**\n * The label of the cancel button\n *\n * @default \"Cancel\"\n */\n cancelButtonLabel?: string;\n\n /**\n * The label of the next button\n *\n * @default \"Next\"\n */\n\n nextButtonLabel?: string;\n /**\n * The label of the previous button\n *\n * @default \"Previous\"\n */\n previousButtonLabel?: string;\n /**\n * The label of the finish button\n *\n * @default \"Finish\"\n */\n\n finishButtonLabel?: string;\n\n /**\n * A callback function that is executed when the user clicks on the next button\n */\n onNext?: () => unknown;\n\n /**\n * A callback function that is executed when the user clicks on the previous button\n */\n onPrevious?: () => unknown;\n\n /**\n * A callback function that is executed when the user clicks on the cancel button\n */\n\n onClose?: () => unknown;\n\n /**\n * A function that is executed when user completes all the steps.\n *\n * @param close A function that closes the modal when called.\n */\n onFinish?: () => unknown;\n\n /**\n * Determine if user interacted with any steps in the modal wizard\n */\n\n isDirty?: () => boolean;\n\n /**\n * A function to confirm close if the state is dirty before closing\n */\n handleDirtyState?: () => boolean;\n\n /**\n * Props to pass to each modal\n */\n modalProps?: any;\n\n /**\n * Label for close button\n */\n closeButtonLabel?: string;\n\n /**\n * Children to display in modal wizard\n * */\n children?: Array<ReturnType<typeof ModalWizardStep>>;\n}\n\nconst useStyles = createStyles(() => ({\n modal: {\n height: '70%',\n display: 'flex',\n flexDirection: 'column',\n },\n}));\n\ninterface ModalWizardType {\n <T>(props: ModalWizardProps): ReactElement;\n\n Step: typeof ModalWizardStep;\n}\n\nexport const ModalWizard: ModalWizardType = ({\n cancelButtonLabel = 'Cancel',\n nextButtonLabel = 'Next',\n previousButtonLabel = 'Previous',\n finishButtonLabel = 'Finish',\n onNext,\n onPrevious,\n onClose,\n onFinish,\n isDirty,\n modalProps,\n handleDirtyState,\n closeButtonLabel,\n children,\n}) => {\n const [currentStepIndex, setCurrentStepIndex] = useState(0);\n const modalSteps = (Children.toArray(children) as ReactElement[]).filter((child) => child.type === ModalWizardStep);\n\n const numberOfSteps = modalSteps.length;\n const numberOfStepsCountAsProgress = modalSteps.filter((step) => step.props.countsAsProgress).length;\n const isFirstStep = currentStepIndex === 0;\n const isLastStep = currentStepIndex === numberOfSteps - 1;\n const currentStep = modalSteps.filter((step: ReactElement, index: number) => index === currentStepIndex)[0];\n\n const {isValid} = currentStep?.props?.validateStep?.(currentStepIndex, numberOfSteps) ?? {isValid: true};\n const isModalDirty = isDirty && isDirty();\n\n const {classes} = useStyles();\n\n const closeModalWizard = () => {\n if (isModalDirty && handleDirtyState) {\n handleDirtyState() && onClose?.();\n } else {\n onClose?.();\n }\n };\n\n const getProgress = (currStepIndex: number) => {\n const validSteps = modalSteps.filter(\n (step, index) => step.props.countsAsProgress && index <= currStepIndex\n ).length;\n return (validSteps / numberOfStepsCountAsProgress) * 100;\n };\n\n const getProgressMemo = useMemo(() => getProgress(currentStepIndex), [currentStepIndex]);\n\n return (\n <Modal\n opened\n classNames={{modal: classes.modal}}\n centered\n closeButtonLabel={closeButtonLabel}\n padding=\"xl\"\n title={\n <Header\n docLink={currentStep.props.docLin}\n description={\n typeof currentStep.props.description === 'function'\n ? currentStep.props.description(currentStepIndex + 1, numberOfSteps)\n : currentStep.props.description\n }\n py={null}\n px={null}\n >\n {typeof currentStep.props.title === 'function'\n ? currentStep.props.title(currentStepIndex + 1, numberOfSteps)\n : currentStep.props.title}\n </Header>\n }\n onClose={closeModalWizard}\n {...modalProps}\n >\n {currentStep.props.showProgressBar && <Progress value={getProgressMemo} />}\n {currentStep}\n <StickyFooter borderTop py={null} px={null} pt=\"md\">\n <Button\n name={isFirstStep ? cancelButtonLabel : previousButtonLabel}\n disabled={false}\n size=\"md\"\n variant=\"outline\"\n onClick={() => {\n if (isFirstStep) {\n closeModalWizard();\n } else {\n onPrevious?.();\n setCurrentStepIndex(currentStepIndex - 1);\n }\n }}\n >\n {isFirstStep ? cancelButtonLabel : previousButtonLabel}\n </Button>\n\n <Button\n disabled={!isValid}\n size=\"md\"\n onClick={() => {\n if (isLastStep) {\n onFinish ? onFinish() : onClose();\n } else {\n onNext?.();\n setCurrentStepIndex(currentStepIndex + 1);\n }\n }}\n >\n {isLastStep ? finishButtonLabel : nextButtonLabel}\n </Button>\n </StickyFooter>\n </Modal>\n );\n};\n\nModalWizard.Step = ModalWizardStep;\n"],"names":["Button","createStyles","Modal","Progress","Children","useMemo","useState","StickyFooter","ModalWizardStep","Header","useStyles","modal","height","display","flexDirection","ModalWizard","cancelButtonLabel","nextButtonLabel","previousButtonLabel","finishButtonLabel","onNext","onPrevious","onClose","onFinish","isDirty","modalProps","handleDirtyState","closeButtonLabel","children","currentStep","currentStepIndex","setCurrentStepIndex","modalSteps","toArray","filter","child","type","numberOfSteps","length","numberOfStepsCountAsProgress","step","props","countsAsProgress","isFirstStep","isLastStep","index","isValid","validateStep","isModalDirty","classes","closeModalWizard","getProgress","currStepIndex","validSteps","getProgressMemo","opened","classNames","centered","padding","title","docLink","docLin","description","py","px","showProgressBar","value","borderTop","pt","name","disabled","size","variant","onClick","Step"],"mappings":"AAAA;;;;AAAA,SAAQA,MAAM,EAAEC,YAAY,EAAEC,KAAK,EAAEC,QAAQ,QAAO,eAAe,CAAC;AACpE,SAAQC,QAAQ,EAAgBC,OAAO,EAAEC,QAAQ,QAAO,OAAO,CAAC;AAChE,SAAQC,YAAY,QAAO,kBAAkB,CAAC;AAC9C,SAAQC,eAAe,QAAO,mBAAmB,CAAC;AAClD,SAAQC,MAAM,QAAO,WAAW,CAAC;AAiFjC,IAAMC,SAAS,GAAGT,YAAY,CAAC;WAAO;QAClCU,KAAK,EAAE;YACHC,MAAM,EAAE,KAAK;YACbC,OAAO,EAAE,MAAM;YACfC,aAAa,EAAE,QAAQ;SAC1B;KACJ;CAAC,CAAC,AAAC;AAQJ,OAAO,IAAMC,WAAW,GAAoB,gBActC;mCAbFC,iBAAiB,EAAjBA,iBAAiB,mCAAG,QAAQ,qBAAA,2BAC5BC,eAAe,EAAfA,eAAe,iCAAG,MAAM,mBAAA,+BACxBC,mBAAmB,EAAnBA,mBAAmB,qCAAG,UAAU,uBAAA,6BAChCC,iBAAiB,EAAjBA,iBAAiB,mCAAG,QAAQ,qBAAA,EAC5BC,MAAM,SAANA,MAAM,EACNC,UAAU,SAAVA,UAAU,EACVC,OAAO,SAAPA,OAAO,EACPC,QAAQ,SAARA,QAAQ,EAC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AClB,MAAM;wBACHsE,QAAQ,EAAE,CAACxB,OAAO;wBAClByB,IAAI,EAAC,IAAI;wBACTE,OAAO,EAAE,WAAM;4BACX,IAAI7B,UAAU,EAAE;gCACZrB,QAAQ,GAAGA,QAAQ,EAAE,GAAGD,OAAO,EAAE,CAAC;4BACtC,OAAO;gCACHF,MAAM,aAANA,MAAM,WAAI,GAAVA,KAAAA,CAAU,GAAVA,MAAM,EAAI,CAAC;gCACXW,mBAAmB,CAACD,gBAAgB,GAAG,CAAC,CAAC,CAAC;4BAC9C,CAAC;wBACL,CAAC;kCAEAc,UAAU,GAAGzB,iBAAiB,GAAGF,eAAe;sBAC5C;;cACE;;OACX,CACV;AACN,CAAC,CAAC;AAEFF,WAAW,CAAC2D,IAAI,GAAGlE,eAAe,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
var ModalWizardStep = function(param) {
|
|
3
|
+
var children = param.children;
|
|
4
|
+
return /*#__PURE__*/ _jsx("div", {
|
|
5
|
+
children: children
|
|
6
|
+
});
|
|
7
|
+
};
|
|
8
|
+
ModalWizardStep.defaultProps = {
|
|
9
|
+
showProgressBar: true,
|
|
10
|
+
countsAsProgress: true
|
|
11
|
+
};
|
|
12
|
+
export { ModalWizardStep };
|
|
13
|
+
|
|
14
|
+
//# sourceMappingURL=ModalWizardStep.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../src/components/modal-wizard/ModalWizardStep.tsx"],"sourcesContent":["import {FunctionComponent, PropsWithChildren, ReactElement} from 'react';\n\ntype DependsOnStep<T> = (currentStep: number, numberOfSteps: number) => T;\n\nexport interface ModalWizardStepProps {\n /**\n * The title of the current step. The title can be dependent on the current step if needed\n */\n title?: string | ReactElement | DependsOnStep<string | ReactElement>;\n\n /**\n * The description of the current step. The description can be dependent on the current step if needed\n */\n description?: string | ReactElement | DependsOnStep<string | ReactElement>;\n\n /**\n * A link to the documentation for the current step\n */\n docLink: string;\n\n /**\n * A tooltip label for the docLink\n */\n docLinkTooltipLabel?: string | ReactElement | DependsOnStep<string | ReactElement>;\n\n /**\n * A function to validate the current step, it determines if the next step should be enabled or not.\n */\n validateStep: (currentStep: any, numberOfSteps: any) => {isValid: boolean; messsage?: unknown};\n\n /**\n * Show progress bar at this step\n *\n * @default true\n */\n showProgressBar?: boolean;\n\n /**\n * Does completion of current step count moves the progress bar\n *\n * @default true\n */\n countsAsProgress?: boolean;\n}\n\nconst ModalWizardStep: FunctionComponent<PropsWithChildren<ModalWizardStepProps>> = ({children}) => (\n <div>{children}</div>\n);\n\nModalWizardStep.defaultProps = {\n showProgressBar: true,\n countsAsProgress: true,\n};\n\nexport {ModalWizardStep};\n"],"names":["ModalWizardStep","children","div","defaultProps","showProgressBar","countsAsProgress"],"mappings":"AAAA;AA6CA,IAAMA,eAAe,GAA+D;QAAEC,QAAQ,SAARA,QAAQ;yBAC1F,KAACC,KAAG;kBAAED,QAAQ;MAAO;CACxB,AAAC;AAEFD,eAAe,CAACG,YAAY,GAAG;IAC3BC,eAAe,EAAE,IAAI;IACrBC,gBAAgB,EAAE,IAAI;CACzB,CAAC;AAEF,SAAQL,eAAe,GAAE"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../src/components/modal-wizard/index.ts"],"sourcesContent":["export * from './ModalWizard';\nexport {type ModalWizardStepProps} from './ModalWizardStep';\n"],"names":[],"mappings":"AAAA,cAAc,eAAe,CAAC"}
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
import _object_spread from "@swc/helpers/src/_object_spread.mjs";
|
|
2
|
+
import _object_spread_props from "@swc/helpers/src/_object_spread_props.mjs";
|
|
3
|
+
import _object_without_properties from "@swc/helpers/src/_object_without_properties.mjs";
|
|
4
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
5
|
+
import { createStyles, Modal } from "@mantine/core";
|
|
6
|
+
import { Children } from "react";
|
|
7
|
+
import { PromptFooter } from "./PromptFooter";
|
|
8
|
+
var useStyles = createStyles(function(theme) {
|
|
9
|
+
var white = "#fff";
|
|
10
|
+
return {
|
|
11
|
+
body: {
|
|
12
|
+
padding: 0
|
|
13
|
+
},
|
|
14
|
+
modalType: {
|
|
15
|
+
overflow: "hidden",
|
|
16
|
+
width: 550
|
|
17
|
+
},
|
|
18
|
+
innerBody: {
|
|
19
|
+
padding: "".concat(theme.spacing.md, "px ").concat(theme.spacing.xl, "px ").concat(theme.spacing.lg, "px")
|
|
20
|
+
},
|
|
21
|
+
header: {
|
|
22
|
+
padding: "".concat(theme.spacing.md, "px ").concat(theme.spacing.xl, "px"),
|
|
23
|
+
width: "100%",
|
|
24
|
+
borderBottom: "1px solid ".concat(theme.colors.gray[3]),
|
|
25
|
+
fontSize: theme.headings.sizes.h4.fontSize,
|
|
26
|
+
lineHeight: theme.headings.sizes.h4.fontSize
|
|
27
|
+
},
|
|
28
|
+
default: {},
|
|
29
|
+
success: {
|
|
30
|
+
backgroundColor: theme.colors.lime[6],
|
|
31
|
+
color: white
|
|
32
|
+
},
|
|
33
|
+
warning: {
|
|
34
|
+
backgroundColor: theme.colors.yellow[5],
|
|
35
|
+
color: white
|
|
36
|
+
},
|
|
37
|
+
critical: {
|
|
38
|
+
backgroundColor: theme.colors.red[6],
|
|
39
|
+
color: white
|
|
40
|
+
},
|
|
41
|
+
info: {
|
|
42
|
+
backgroundColor: theme.colors.navy[5],
|
|
43
|
+
color: white
|
|
44
|
+
},
|
|
45
|
+
whiteClose: {
|
|
46
|
+
color: white,
|
|
47
|
+
"&:hover": {
|
|
48
|
+
backgroundColor: "transparent"
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
};
|
|
52
|
+
});
|
|
53
|
+
export var Prompt = function(_param) {
|
|
54
|
+
var children = _param.children, variant = _param.variant, size = _param.size, otherProps = _object_without_properties(_param, [
|
|
55
|
+
"children",
|
|
56
|
+
"variant",
|
|
57
|
+
"size"
|
|
58
|
+
]);
|
|
59
|
+
var ref = useStyles(), classes = ref.classes, cx = ref.cx;
|
|
60
|
+
var defaultVariant = variant === "default";
|
|
61
|
+
var convertedChildren = Children.toArray(children);
|
|
62
|
+
var otherChildren = convertedChildren.filter(function(child) {
|
|
63
|
+
return child.type !== PromptFooter;
|
|
64
|
+
});
|
|
65
|
+
var footer = convertedChildren.find(function(child) {
|
|
66
|
+
return child.type === PromptFooter;
|
|
67
|
+
});
|
|
68
|
+
var classNames = {
|
|
69
|
+
header: cx(classes.header, classes[variant]),
|
|
70
|
+
close: !defaultVariant && classes.whiteClose,
|
|
71
|
+
body: classes.body,
|
|
72
|
+
modal: !defaultVariant && classes.modalType
|
|
73
|
+
};
|
|
74
|
+
return /*#__PURE__*/ _jsxs(Modal, _object_spread_props(_object_spread({
|
|
75
|
+
padding: 0,
|
|
76
|
+
classNames: classNames,
|
|
77
|
+
size: defaultVariant ? size : "sm"
|
|
78
|
+
}, otherProps), {
|
|
79
|
+
children: [
|
|
80
|
+
/*#__PURE__*/ _jsx("div", {
|
|
81
|
+
className: classes.innerBody,
|
|
82
|
+
children: otherChildren
|
|
83
|
+
}),
|
|
84
|
+
footer
|
|
85
|
+
]
|
|
86
|
+
}));
|
|
87
|
+
};
|
|
88
|
+
Prompt.Footer = PromptFooter;
|
|
89
|
+
|
|
90
|
+
//# sourceMappingURL=Prompt.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../src/components/prompt/Prompt.tsx"],"sourcesContent":["import {createStyles, Modal, ModalProps} from '@mantine/core';\nimport {Children, ReactElement, ReactNode} from 'react';\nimport {PromptFooter} from './PromptFooter';\n\nconst useStyles = createStyles((theme) => {\n const white = '#fff';\n return {\n body: {\n padding: 0,\n },\n modalType: {overflow: 'hidden', width: 550},\n innerBody: {\n padding: `${theme.spacing.md}px ${theme.spacing.xl}px ${theme.spacing.lg}px`,\n },\n header: {\n padding: `${theme.spacing.md}px ${theme.spacing.xl}px`,\n width: '100%',\n borderBottom: `1px solid ${theme.colors.gray[3]}`,\n fontSize: theme.headings.sizes.h4.fontSize,\n lineHeight: theme.headings.sizes.h4.fontSize,\n },\n default: {},\n success: {backgroundColor: theme.colors.lime[6], color: white},\n warning: {backgroundColor: theme.colors.yellow[5], color: white},\n critical: {\n backgroundColor: theme.colors.red[6],\n color: white,\n },\n info: {backgroundColor: theme.colors.navy[5], color: white},\n whiteClose: {color: white, '&:hover': {backgroundColor: 'transparent'}},\n };\n});\n\nexport interface PromptProps extends ModalProps {\n variant: 'default' | 'success' | 'warning' | 'critical' | 'info';\n children: ReactNode;\n}\ninterface PromptType {\n (props: PromptProps): ReactElement;\n Footer: typeof PromptFooter;\n}\n\nexport const Prompt: PromptType = ({children, variant, size, ...otherProps}) => {\n const {classes, cx} = useStyles();\n const defaultVariant = variant === 'default';\n const convertedChildren = Children.toArray(children) as ReactElement[];\n\n const otherChildren = convertedChildren.filter((child) => child.type !== PromptFooter);\n const footer = convertedChildren.find((child) => child.type === PromptFooter);\n\n const classNames = {\n header: cx(classes.header, classes[variant]),\n close: !defaultVariant && classes.whiteClose,\n body: classes.body,\n modal: !defaultVariant && classes.modalType,\n };\n\n return (\n <Modal padding={0} classNames={classNames} size={defaultVariant ? size : 'sm'} {...otherProps}>\n <div className={classes.innerBody}>{otherChildren}</div>\n {footer}\n </Modal>\n );\n};\n\nPrompt.Footer = PromptFooter;\n"],"names":["createStyles","Modal","Children","PromptFooter","useStyles","theme","white","body","padding","modalType","overflow","width","innerBody","spacing","md","xl","lg","header","borderBottom","colors","gray","fontSize","headings","sizes","h4","lineHeight","default","success","backgroundColor","lime","color","warning","yellow","critical","red","info","navy","whiteClose","Prompt","children","variant","size","otherProps","classes","cx","defaultVariant","convertedChildren","toArray","otherChildren","filter","child","type","footer","find","classNames","close","modal","div","className","Footer"],"mappings":"AAAA;;;;AAAA,SAAQA,YAAY,EAAEC,KAAK,QAAmB,eAAe,CAAC;AAC9D,SAAQC,QAAQ,QAAgC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AAO,CAAC1B,MAAM,EAAE0B,OAAO,CAACH,OAAO,CAAC,CAAC;QAC5Ce,KAAK,EAAE,CAACV,cAAc,IAAIF,OAAO,CAACN,UAAU;QAC5C9B,IAAI,EAAEoC,OAAO,CAACpC,IAAI;QAClBiD,KAAK,EAAE,CAACX,cAAc,IAAIF,OAAO,CAAClC,SAAS;KAC9C,AAAC;IAEF,qBACI,MAACR,KAAK;QAACO,OAAO,EAAE,CAAC;QAAE8C,UAAU,EAAEA,UAAU;QAAEb,IAAI,EAAEI,cAAc,GAAGJ,IAAI,GAAG,IAAI;OAAMC,UAAU;;0BACzF,KAACe,KAAG;gBAACC,SAAS,EAAEf,OAAO,CAAC/B,SAAS;0BAAGoC,aAAa;cAAO;YACvDI,MAAM;;OACH,CACV;AACN,CAAC,CAAC;AAEFd,MAAM,CAACqB,MAAM,GAAGxD,YAAY,CAAC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import _object_spread from "@swc/helpers/src/_object_spread.mjs";
|
|
2
|
+
import _object_spread_props from "@swc/helpers/src/_object_spread_props.mjs";
|
|
3
|
+
import _object_without_properties from "@swc/helpers/src/_object_without_properties.mjs";
|
|
4
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
5
|
+
import { StickyFooter } from "../sticky-footer";
|
|
6
|
+
export var PromptFooter = function(_param) /*#__PURE__*/ {
|
|
7
|
+
var children = _param.children, otherProps = _object_without_properties(_param, [
|
|
8
|
+
"children"
|
|
9
|
+
]);
|
|
10
|
+
return _jsx(StickyFooter, _object_spread_props(_object_spread({}, otherProps), {
|
|
11
|
+
children: children
|
|
12
|
+
}));
|
|
13
|
+
};
|
|
14
|
+
|
|
15
|
+
//# sourceMappingURL=PromptFooter.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../src/components/prompt/PromptFooter.tsx"],"sourcesContent":["import {FunctionComponent, PropsWithChildren} from 'react';\nimport {StickyFooter, StickyFooterProps} from '../sticky-footer';\n\nexport interface PromptFooterProps extends StickyFooterProps {}\n\nexport const PromptFooter: FunctionComponent<PropsWithChildren<PromptFooterProps>> = ({children, ...otherProps}) => (\n <StickyFooter {...otherProps}>{children}</StickyFooter>\n);\n"],"names":["StickyFooter","PromptFooter","children","otherProps"],"mappings":"AAAA;;;;AACA,SAAQA,YAAY,QAA0B,kBAAkB,CAAC;AAIjE,OAAO,IAAMC,YAAY,GAA4D,+BACjF;QADmFC,QAAQ,UAARA,QAAQ,EAAKC,UAAU;QAAvBD,UAAQ;;WAC3F,KAACF,YAAY,0CAAKG,UAAU;kBAAGD,QAAQ;OAAgB;AAAD,CACzD,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../src/components/prompt/index.ts"],"sourcesContent":["export * from './Prompt';\n"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAC"}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import _object_spread from "@swc/helpers/src/_object_spread.mjs";
|
|
2
|
+
import _object_spread_props from "@swc/helpers/src/_object_spread_props.mjs";
|
|
3
|
+
import _object_without_properties from "@swc/helpers/src/_object_without_properties.mjs";
|
|
4
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
5
|
+
import { createStyles, Divider, Group, Paper } from "@mantine/core";
|
|
6
|
+
var useStyles = createStyles(function() {
|
|
7
|
+
return {
|
|
8
|
+
footer: {
|
|
9
|
+
position: "sticky",
|
|
10
|
+
bottom: 0,
|
|
11
|
+
zIndex: 1,
|
|
12
|
+
maxHeight: "80px"
|
|
13
|
+
}
|
|
14
|
+
};
|
|
15
|
+
});
|
|
16
|
+
export var StickyFooter = function(_param) {
|
|
17
|
+
var borderTop = _param.borderTop, children = _param.children, others = _object_without_properties(_param, [
|
|
18
|
+
"borderTop",
|
|
19
|
+
"children"
|
|
20
|
+
]);
|
|
21
|
+
var classes = useStyles().classes;
|
|
22
|
+
return /*#__PURE__*/ _jsxs(Paper, {
|
|
23
|
+
className: classes.footer,
|
|
24
|
+
children: [
|
|
25
|
+
borderTop ? /*#__PURE__*/ _jsx(Divider, {
|
|
26
|
+
size: "xs"
|
|
27
|
+
}) : null,
|
|
28
|
+
/*#__PURE__*/ _jsx(Group, _object_spread_props(_object_spread({
|
|
29
|
+
position: "right",
|
|
30
|
+
spacing: "xs",
|
|
31
|
+
py: "md",
|
|
32
|
+
px: "xl"
|
|
33
|
+
}, others), {
|
|
34
|
+
children: children
|
|
35
|
+
}))
|
|
36
|
+
]
|
|
37
|
+
});
|
|
38
|
+
};
|
|
39
|
+
|
|
40
|
+
//# sourceMappingURL=StickyFooter.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../src/components/sticky-footer/StickyFooter.tsx"],"sourcesContent":["import {createStyles, DefaultProps, Divider, Group, Paper} from '@mantine/core';\nimport {FunctionComponent, PropsWithChildren} from 'react';\n\nexport interface StickyFooterProps extends DefaultProps {\n /**\n * Whether a border is render on top of the footer\n */\n borderTop?: boolean;\n}\n\nconst useStyles = createStyles(() => ({\n footer: {\n position: 'sticky',\n bottom: 0,\n zIndex: 1,\n maxHeight: '80px',\n },\n}));\n\nexport const StickyFooter: FunctionComponent<PropsWithChildren<StickyFooterProps>> = ({\n borderTop,\n children,\n ...others\n}) => {\n const {classes} = useStyles();\n\n return (\n <Paper className={classes.footer}>\n {borderTop ? <Divider size=\"xs\" /> : null}\n <Group position=\"right\" spacing=\"xs\" py=\"md\" px=\"xl\" {...others}>\n {children}\n </Group>\n </Paper>\n );\n};\n"],"names":["createStyles","Divider","Group","Paper","useStyles","footer","position","bottom","zIndex","maxHeight","StickyFooter","borderTop","children","others","classes","className","size","spacing","py","px"],"mappings":"AAAA;;;;AAAA,SAAQA,YAAY,EAAgBC,OAAO,EAAEC,KAAK,EAAEC,KAAK,QAAO,eAAe,CAAC;AAUhF,IAAMC,SAAS,GAAGJ,YAAY,CAAC;WAAO;QAClCK,MAAM,EAAE;YACJC,QAAQ,EAAE,QAAQ;YAClBC,MAAM,EAAE,CAAC;YACTC,MAAM,EAAE,CAAC;YACTC,SAAS,EAAE,MAAM;SACpB;KACJ;CAAC,CAAC,AAAC;AAEJ,OAAO,IAAMC,YAAY,GAA4D,iBAI/E;QAHFC,SAAS,UAATA,SAAS,EACTC,QAAQ,UAARA,QAAQ,EACLC,MAAM;QAFTF,WAAS;QACTC,UAAQ;;IAGR,IAAM,AAACE,OAAO,GAAIV,SAAS,EAAE,CAAtBU,OAAO,AAAe,AAAC;IAE9B,qBACI,MAACX,KAAK;QAACY,SAAS,EAAED,OAAO,CAACT,MAAM;;YAC3BM,SAAS,iBAAG,KAACV,OAAO;gBAACe,IAAI,EAAC,IAAI;cAAG,GAAG,IAAI;0BACzC,KAACd,KAAK;gBAACI,QAAQ,EAAC,OAAO;gBAACW,OAAO,EAAC,IAAI;gBAACC,EAAE,EAAC,IAAI;gBAACC,EAAE,EAAC,IAAI;eAAKN,MAAM;0BAC1DD,QAAQ;eACL;;MACJ,CACV;AACN,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../src/components/sticky-footer/index.ts"],"sourcesContent":["export * from './StickyFooter';\n"],"names":[],"mappings":"AAAA,cAAc,gBAAgB,CAAC"}
|
|
@@ -0,0 +1,248 @@
|
|
|
1
|
+
import _define_property from "@swc/helpers/src/_define_property.mjs";
|
|
2
|
+
import _object_spread from "@swc/helpers/src/_object_spread.mjs";
|
|
3
|
+
import _object_spread_props from "@swc/helpers/src/_object_spread_props.mjs";
|
|
4
|
+
import _object_without_properties from "@swc/helpers/src/_object_without_properties.mjs";
|
|
5
|
+
import _sliced_to_array from "@swc/helpers/src/_sliced_to_array.mjs";
|
|
6
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
7
|
+
import { Center, Collapse, createStyles, Loader, Skeleton, Table as MantineTable } from "@mantine/core";
|
|
8
|
+
import { useForm } from "@mantine/form";
|
|
9
|
+
import { useDidUpdate } from "@mantine/hooks";
|
|
10
|
+
import { defaultColumnSizing, flexRender, getCoreRowModel, useReactTable } from "@tanstack/react-table";
|
|
11
|
+
import defaultsDeep from "lodash.defaultsdeep";
|
|
12
|
+
import { Children, Fragment, useCallback, useEffect, useState } from "react";
|
|
13
|
+
import { TableActions } from "./TableActions";
|
|
14
|
+
import { TableCollapsibleColumn } from "./TableCollapsibleColumn";
|
|
15
|
+
import { TableContext } from "./TableContext";
|
|
16
|
+
import { TableDateRangePicker } from "./TableDateRangePicker";
|
|
17
|
+
import { TableFilter } from "./TableFilter";
|
|
18
|
+
import { TableFooter } from "./TableFooter";
|
|
19
|
+
import { TableHeader } from "./TableHeader";
|
|
20
|
+
import { TablePagination } from "./TablePagination";
|
|
21
|
+
import { TablePerPage } from "./TablePerPage";
|
|
22
|
+
import { TablePredicate } from "./TablePredicate";
|
|
23
|
+
import { Th } from "./Th";
|
|
24
|
+
var useStyles = createStyles(function(theme, param, getRef) {
|
|
25
|
+
var hasHeader = param.hasHeader;
|
|
26
|
+
return {
|
|
27
|
+
table: {
|
|
28
|
+
width: "100%"
|
|
29
|
+
},
|
|
30
|
+
header: {
|
|
31
|
+
position: "sticky",
|
|
32
|
+
top: hasHeader ? 69 : 0,
|
|
33
|
+
backgroundColor: theme.colorScheme === "dark" ? theme.black : theme.white,
|
|
34
|
+
transition: "box-shadow 150ms ease",
|
|
35
|
+
zIndex: 12,
|
|
36
|
+
"&::after": {
|
|
37
|
+
content: '""',
|
|
38
|
+
position: "absolute",
|
|
39
|
+
left: 0,
|
|
40
|
+
right: 0,
|
|
41
|
+
bottom: 0,
|
|
42
|
+
borderBottom: "1px solid ".concat(theme.colors.gray[2])
|
|
43
|
+
}
|
|
44
|
+
},
|
|
45
|
+
rowSelected: {
|
|
46
|
+
ref: getRef("rowSelected")
|
|
47
|
+
},
|
|
48
|
+
row: _define_property({}, "&:hover, &.".concat(getRef("rowSelected")), {
|
|
49
|
+
backgroundColor: theme.colorScheme === "dark" ? theme.fn.rgba(theme.colors[theme.primaryColor][7], 0.2) : theme.colors[theme.primaryColor][0]
|
|
50
|
+
})
|
|
51
|
+
};
|
|
52
|
+
});
|
|
53
|
+
export var Table = function(param) {
|
|
54
|
+
var data = param.data, noDataChildren = param.noDataChildren, getExpandChildren = param.getExpandChildren, _initialState = param.initialState, initialState = _initialState === void 0 ? {} : _initialState, columns = param.columns, onMount = param.onMount, onChange = param.onChange, children = param.children, _loading = param.loading, loading = _loading === void 0 ? false : _loading;
|
|
55
|
+
var convertedChildren = Children.toArray(children);
|
|
56
|
+
var header = convertedChildren.find(function(child) {
|
|
57
|
+
return child.type === TableHeader;
|
|
58
|
+
});
|
|
59
|
+
var footer = convertedChildren.find(function(child) {
|
|
60
|
+
return child.type === TableFooter;
|
|
61
|
+
});
|
|
62
|
+
var predicates = initialState.predicates, dateRange = initialState.dateRange, initialStateWithoutForm = _object_without_properties(initialState, [
|
|
63
|
+
"predicates",
|
|
64
|
+
"dateRange"
|
|
65
|
+
]);
|
|
66
|
+
var ref, ref1;
|
|
67
|
+
var form = useForm({
|
|
68
|
+
initialValues: {
|
|
69
|
+
predicates: (ref = initialState === null || initialState === void 0 ? void 0 : initialState.predicates) !== null && ref !== void 0 ? ref : {},
|
|
70
|
+
dateRange: (ref1 = initialState === null || initialState === void 0 ? void 0 : initialState.dateRange) !== null && ref1 !== void 0 ? ref1 : [
|
|
71
|
+
null,
|
|
72
|
+
null
|
|
73
|
+
]
|
|
74
|
+
}
|
|
75
|
+
});
|
|
76
|
+
var ref2 = useStyles({
|
|
77
|
+
hasHeader: !!header
|
|
78
|
+
}), cx = ref2.cx, classes = ref2.classes;
|
|
79
|
+
var ref3;
|
|
80
|
+
var table = useReactTable({
|
|
81
|
+
initialState: defaultsDeep(initialStateWithoutForm, {
|
|
82
|
+
pagination: {
|
|
83
|
+
pageSize: TablePerPage.DEFAULT_SIZE
|
|
84
|
+
}
|
|
85
|
+
}),
|
|
86
|
+
data: data,
|
|
87
|
+
columns: columns,
|
|
88
|
+
getCoreRowModel: getCoreRowModel(),
|
|
89
|
+
manualPagination: true,
|
|
90
|
+
getRowCanExpand: function(row) {
|
|
91
|
+
return (ref3 = !!(getExpandChildren === null || getExpandChildren === void 0 ? void 0 : getExpandChildren(row.original))) !== null && ref3 !== void 0 ? ref3 : false;
|
|
92
|
+
}
|
|
93
|
+
});
|
|
94
|
+
var ref4 = _sliced_to_array(useState(table.initialState), 2), state = ref4[0], setState = ref4[1];
|
|
95
|
+
table.setOptions(function(prev) {
|
|
96
|
+
return _object_spread_props(_object_spread({}, prev), {
|
|
97
|
+
state: state,
|
|
98
|
+
onStateChange: setState
|
|
99
|
+
});
|
|
100
|
+
});
|
|
101
|
+
var triggerChange = function() {
|
|
102
|
+
return onChange === null || onChange === void 0 ? void 0 : onChange(_object_spread({}, state, form.values));
|
|
103
|
+
};
|
|
104
|
+
useEffect(function() {
|
|
105
|
+
onMount === null || onMount === void 0 ? void 0 : onMount(_object_spread({}, state, form.values));
|
|
106
|
+
}, []);
|
|
107
|
+
useDidUpdate(function() {
|
|
108
|
+
triggerChange();
|
|
109
|
+
clearSelection();
|
|
110
|
+
}, [
|
|
111
|
+
state.globalFilter,
|
|
112
|
+
state.sorting,
|
|
113
|
+
state.pagination,
|
|
114
|
+
form.values
|
|
115
|
+
]);
|
|
116
|
+
var clearFilters = useCallback(function() {
|
|
117
|
+
form.setFieldValue("predicates", {});
|
|
118
|
+
setState(function(prevState) {
|
|
119
|
+
return _object_spread_props(_object_spread({}, prevState), {
|
|
120
|
+
globalFilter: ""
|
|
121
|
+
});
|
|
122
|
+
});
|
|
123
|
+
}, []);
|
|
124
|
+
var clearSelection = function() {
|
|
125
|
+
setState(function(prevState) {
|
|
126
|
+
return _object_spread_props(_object_spread({}, prevState), {
|
|
127
|
+
rowSelection: {}
|
|
128
|
+
});
|
|
129
|
+
});
|
|
130
|
+
};
|
|
131
|
+
var ref5;
|
|
132
|
+
var getSelectedRow = useCallback(function() {
|
|
133
|
+
var ref, ref1;
|
|
134
|
+
return (ref5 = (ref = table.getSelectedRowModel().flatRows) === null || ref === void 0 ? void 0 : (ref1 = ref[0]) === null || ref1 === void 0 ? void 0 : ref1.original) !== null && ref5 !== void 0 ? ref5 : null;
|
|
135
|
+
}, [
|
|
136
|
+
state.rowSelection
|
|
137
|
+
]);
|
|
138
|
+
if (!data) {
|
|
139
|
+
return /*#__PURE__*/ _jsx(Center, {
|
|
140
|
+
sx: {
|
|
141
|
+
flexGrow: 1
|
|
142
|
+
},
|
|
143
|
+
children: /*#__PURE__*/ _jsx(Loader, {})
|
|
144
|
+
});
|
|
145
|
+
}
|
|
146
|
+
var toggleRowSelection = function(row) {
|
|
147
|
+
table.setRowSelection(function() {
|
|
148
|
+
return _define_property({}, row.id, !row.getIsSelected());
|
|
149
|
+
});
|
|
150
|
+
};
|
|
151
|
+
var rows = table.getRowModel().rows.map(function(row) {
|
|
152
|
+
var ref;
|
|
153
|
+
var rowChildren = (ref = getExpandChildren === null || getExpandChildren === void 0 ? void 0 : getExpandChildren(row.original)) !== null && ref !== void 0 ? ref : null;
|
|
154
|
+
return /*#__PURE__*/ _jsxs(Fragment, {
|
|
155
|
+
children: [
|
|
156
|
+
/*#__PURE__*/ _jsx("tr", {
|
|
157
|
+
onClick: function() {
|
|
158
|
+
return toggleRowSelection(row);
|
|
159
|
+
},
|
|
160
|
+
className: cx(classes.row, _define_property({}, classes.rowSelected, row.getIsSelected())),
|
|
161
|
+
children: row.getVisibleCells().map(function(cell) {
|
|
162
|
+
var size = cell.column.getSize();
|
|
163
|
+
var width = size !== defaultColumnSizing.size ? size : undefined;
|
|
164
|
+
return /*#__PURE__*/ _jsx("td", {
|
|
165
|
+
style: {
|
|
166
|
+
width: width
|
|
167
|
+
},
|
|
168
|
+
children: /*#__PURE__*/ _jsx(Skeleton, {
|
|
169
|
+
visible: loading,
|
|
170
|
+
children: flexRender(cell.column.columnDef.cell, cell.getContext())
|
|
171
|
+
})
|
|
172
|
+
}, cell.id);
|
|
173
|
+
})
|
|
174
|
+
}),
|
|
175
|
+
rowChildren ? /*#__PURE__*/ _jsx("tr", {
|
|
176
|
+
children: /*#__PURE__*/ _jsx("td", {
|
|
177
|
+
colSpan: columns.length + 1,
|
|
178
|
+
style: {
|
|
179
|
+
padding: 0,
|
|
180
|
+
borderBottomColor: row.getIsExpanded() ? undefined : "transparent"
|
|
181
|
+
},
|
|
182
|
+
children: /*#__PURE__*/ _jsx(Collapse, {
|
|
183
|
+
in: row.getIsExpanded(),
|
|
184
|
+
px: "sm",
|
|
185
|
+
py: "xs",
|
|
186
|
+
children: rowChildren
|
|
187
|
+
})
|
|
188
|
+
})
|
|
189
|
+
}) : null
|
|
190
|
+
]
|
|
191
|
+
}, row.id);
|
|
192
|
+
});
|
|
193
|
+
return /*#__PURE__*/ _jsxs(TableContext.Provider, {
|
|
194
|
+
value: {
|
|
195
|
+
onChange: triggerChange,
|
|
196
|
+
state: state,
|
|
197
|
+
setState: setState,
|
|
198
|
+
clearFilters: clearFilters,
|
|
199
|
+
getSelectedRow: getSelectedRow,
|
|
200
|
+
clearSelection: clearSelection,
|
|
201
|
+
form: form
|
|
202
|
+
},
|
|
203
|
+
children: [
|
|
204
|
+
header,
|
|
205
|
+
/*#__PURE__*/ _jsxs(MantineTable, {
|
|
206
|
+
className: classes.table,
|
|
207
|
+
horizontalSpacing: "sm",
|
|
208
|
+
verticalSpacing: "xs",
|
|
209
|
+
pb: "sm",
|
|
210
|
+
children: [
|
|
211
|
+
/*#__PURE__*/ _jsx("thead", {
|
|
212
|
+
className: classes.header,
|
|
213
|
+
children: table.getHeaderGroups().map(function(headerGroup) {
|
|
214
|
+
return /*#__PURE__*/ _jsx("tr", {
|
|
215
|
+
children: headerGroup.headers.map(function(columnHeader) {
|
|
216
|
+
return /*#__PURE__*/ _jsx(Th, {
|
|
217
|
+
header: columnHeader
|
|
218
|
+
}, columnHeader.id);
|
|
219
|
+
})
|
|
220
|
+
}, headerGroup.id);
|
|
221
|
+
})
|
|
222
|
+
}),
|
|
223
|
+
/*#__PURE__*/ _jsx("tbody", {
|
|
224
|
+
children: rows.length ? rows : /*#__PURE__*/ _jsx("tr", {
|
|
225
|
+
children: /*#__PURE__*/ _jsx("td", {
|
|
226
|
+
colSpan: columns.length,
|
|
227
|
+
children: noDataChildren
|
|
228
|
+
})
|
|
229
|
+
})
|
|
230
|
+
})
|
|
231
|
+
]
|
|
232
|
+
}),
|
|
233
|
+
footer
|
|
234
|
+
]
|
|
235
|
+
});
|
|
236
|
+
};
|
|
237
|
+
Table.Actions = TableActions;
|
|
238
|
+
Table.Filter = TableFilter;
|
|
239
|
+
Table.Footer = TableFooter;
|
|
240
|
+
Table.Header = TableHeader;
|
|
241
|
+
Table.Pagination = TablePagination;
|
|
242
|
+
Table.Predicate = TablePredicate;
|
|
243
|
+
Table.PerPage = TablePerPage;
|
|
244
|
+
Table.Predicate = TablePredicate;
|
|
245
|
+
Table.CollapsibleColumn = TableCollapsibleColumn;
|
|
246
|
+
Table.DateRangePicker = TableDateRangePicker;
|
|
247
|
+
|
|
248
|
+
//# sourceMappingURL=Table.js.map
|