@onewelcome/react-lib-components 13.2.0-alpha.1 → 13.3.0-alpha.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/dist/components/Breadcrumbs/Breadcrumbs.module.scss.cjs.js +2 -2
- package/dist/components/Breadcrumbs/Breadcrumbs.module.scss.es.js +5 -5
- package/dist/components/Button/BaseButton.module.scss.cjs.js +2 -2
- package/dist/components/Button/BaseButton.module.scss.es.js +4 -4
- package/dist/components/Button/Button.module.scss.cjs.js +2 -2
- package/dist/components/Button/Button.module.scss.es.js +17 -17
- package/dist/components/Button/IconButton.module.scss.cjs.js +2 -2
- package/dist/components/Button/IconButton.module.scss.es.js +18 -18
- package/dist/components/ContextMenu/ContextMenu.cjs.js.map +1 -1
- package/dist/components/ContextMenu/ContextMenu.es.js.map +1 -1
- package/dist/components/ContextMenu/ContextMenu.module.scss.cjs.js +2 -2
- package/dist/components/ContextMenu/ContextMenu.module.scss.es.js +6 -6
- package/dist/components/ContextMenu/ContextMenuDivider.module.scss.cjs.js +2 -2
- package/dist/components/ContextMenu/ContextMenuDivider.module.scss.es.js +2 -2
- package/dist/components/ContextMenu/ContextMenuItem.module.scss.cjs.js +2 -2
- package/dist/components/ContextMenu/ContextMenuItem.module.scss.es.js +3 -3
- package/dist/components/ContextMenu/ContextMenuService.cjs.js +1 -1
- package/dist/components/ContextMenu/ContextMenuService.cjs.js.map +1 -1
- package/dist/components/ContextMenu/ContextMenuService.es.js +20 -17
- package/dist/components/ContextMenu/ContextMenuService.es.js.map +1 -1
- package/dist/components/DataGrid/DataGrid.cjs.js +1 -1
- package/dist/components/DataGrid/DataGrid.cjs.js.map +1 -1
- package/dist/components/DataGrid/DataGrid.es.js +76 -51
- package/dist/components/DataGrid/DataGrid.es.js.map +1 -1
- package/dist/components/DataGrid/DataGrid.module.scss.cjs.js +2 -2
- package/dist/components/DataGrid/DataGrid.module.scss.es.js +8 -7
- package/dist/components/DataGrid/DataGrid.module.scss.es.js.map +1 -1
- package/dist/components/DataGrid/DataGridActions/DataGridActions.module.scss.cjs.js +2 -2
- package/dist/components/DataGrid/DataGridActions/DataGridActions.module.scss.es.js +6 -6
- package/dist/components/DataGrid/DataGridActions/DataGridColumnsToggle.module.scss.cjs.js +2 -2
- package/dist/components/DataGrid/DataGridActions/DataGridColumnsToggle.module.scss.es.js +7 -7
- package/dist/components/DataGrid/DataGridBody/DataGridBody.cjs.js +1 -1
- package/dist/components/DataGrid/DataGridBody/DataGridBody.cjs.js.map +1 -1
- package/dist/components/DataGrid/DataGridBody/DataGridBody.es.js +4 -2
- package/dist/components/DataGrid/DataGridBody/DataGridBody.es.js.map +1 -1
- package/dist/components/DataGrid/DataGridBody/DataGridBody.module.scss.cjs.js +2 -2
- package/dist/components/DataGrid/DataGridBody/DataGridBody.module.scss.es.js +2 -2
- package/dist/components/DataGrid/DataGridBody/DataGridCell/DataGridCell.module.scss.cjs.js +2 -2
- package/dist/components/DataGrid/DataGridBody/DataGridCell/DataGridCell.module.scss.es.js +5 -5
- package/dist/components/DataGrid/DataGridBody/DataGridDrawer/DataGridDrawer.module.scss.cjs.js +2 -2
- package/dist/components/DataGrid/DataGridBody/DataGridDrawer/DataGridDrawer.module.scss.es.js +4 -4
- package/dist/components/DataGrid/DataGridBody/DataGridDrawer/DataGridDrawerItem.module.scss.cjs.js +2 -2
- package/dist/components/DataGrid/DataGridBody/DataGridDrawer/DataGridDrawerItem.module.scss.es.js +5 -5
- package/dist/components/DataGrid/DataGridBody/DataGridRow/DataGridRow.module.scss.cjs.js +2 -2
- package/dist/components/DataGrid/DataGridBody/DataGridRow/DataGridRow.module.scss.es.js +24 -24
- package/dist/components/DataGrid/DataGridBody/DataGridRow/useNestedRow.cjs.js.map +1 -1
- package/dist/components/DataGrid/DataGridBody/DataGridRow/useNestedRow.es.js +1 -1
- package/dist/components/DataGrid/DataGridBody/DataGridRow/useNestedRow.es.js.map +1 -1
- package/dist/components/DataGrid/DataGridFilters/DataGridFilter.cjs.js +1 -1
- package/dist/components/DataGrid/DataGridFilters/DataGridFilter.cjs.js.map +1 -1
- package/dist/components/DataGrid/DataGridFilters/DataGridFilter.es.js +4 -4
- package/dist/components/DataGrid/DataGridFilters/DataGridFilter.es.js.map +1 -1
- package/dist/components/DataGrid/DataGridFilters/DataGridFilter.module.scss.cjs.js +2 -2
- package/dist/components/DataGrid/DataGridFilters/DataGridFilter.module.scss.es.js +9 -9
- package/dist/components/DataGrid/DataGridFilters/DataGridFilterService.cjs.js +1 -1
- package/dist/components/DataGrid/DataGridFilters/DataGridFilterService.cjs.js.map +1 -1
- package/dist/components/DataGrid/DataGridFilters/DataGridFilterService.es.js +44 -25
- package/dist/components/DataGrid/DataGridFilters/DataGridFilterService.es.js.map +1 -1
- package/dist/components/DataGrid/DataGridFilters/DataGridFilterTag.cjs.js +1 -1
- package/dist/components/DataGrid/DataGridFilters/DataGridFilterTag.cjs.js.map +1 -1
- package/dist/components/DataGrid/DataGridFilters/DataGridFilterTag.es.js +15 -4
- package/dist/components/DataGrid/DataGridFilters/DataGridFilterTag.es.js.map +1 -1
- package/dist/components/DataGrid/DataGridFilters/DataGridFilterValueSelect.cjs.js +1 -1
- package/dist/components/DataGrid/DataGridFilters/DataGridFilterValueSelect.cjs.js.map +1 -1
- package/dist/components/DataGrid/DataGridFilters/DataGridFilterValueSelect.es.js +56 -6
- package/dist/components/DataGrid/DataGridFilters/DataGridFilterValueSelect.es.js.map +1 -1
- package/dist/components/DataGrid/DataGridFilters/DataGridFilters.interfaces.cjs.js.map +1 -1
- package/dist/components/DataGrid/DataGridFilters/DataGridFilters.interfaces.es.js.map +1 -1
- package/dist/components/DataGrid/DataGridFilters/DataGridToolbar.cjs.js +1 -1
- package/dist/components/DataGrid/DataGridFilters/DataGridToolbar.cjs.js.map +1 -1
- package/dist/components/DataGrid/DataGridFilters/DataGridToolbar.es.js +4 -4
- package/dist/components/DataGrid/DataGridFilters/DataGridToolbar.es.js.map +1 -1
- package/dist/components/DataGrid/DataGridFilters/DataGridToolbar.module.scss.cjs.js +2 -2
- package/dist/components/DataGrid/DataGridFilters/DataGridToolbar.module.scss.es.js +10 -10
- package/dist/components/DataGrid/DataGridFilters/DateTimePicker/DateTimePicker.cjs.js +1 -1
- package/dist/components/DataGrid/DataGridFilters/DateTimePicker/DateTimePicker.cjs.js.map +1 -1
- package/dist/components/DataGrid/DataGridFilters/DateTimePicker/DateTimePicker.es.js +1 -1
- package/dist/components/DataGrid/DataGridFilters/DateTimePicker/DateTimePicker.es.js.map +1 -1
- package/dist/components/DataGrid/DataGridFilters/DateTimePicker/DateTimePicker.module.scss.cjs.js +2 -2
- package/dist/components/DataGrid/DataGridFilters/DateTimePicker/DateTimePicker.module.scss.es.js +17 -17
- package/dist/components/DataGrid/DataGridFilters/DateTimePicker/DateTimePickerCalendarSection.cjs.js +1 -1
- package/dist/components/DataGrid/DataGridFilters/DateTimePicker/DateTimePickerCalendarSection.cjs.js.map +1 -1
- package/dist/components/DataGrid/DataGridFilters/DateTimePicker/DateTimePickerCalendarSection.es.js +45 -24
- package/dist/components/DataGrid/DataGridFilters/DateTimePicker/DateTimePickerCalendarSection.es.js.map +1 -1
- package/dist/components/DataGrid/DataGridFilters/useFiltersReducer.cjs.js +1 -1
- package/dist/components/DataGrid/DataGridFilters/useFiltersReducer.cjs.js.map +1 -1
- package/dist/components/DataGrid/DataGridFilters/useFiltersReducer.es.js +7 -9
- package/dist/components/DataGrid/DataGridFilters/useFiltersReducer.es.js.map +1 -1
- package/dist/components/DataGrid/DataGridHeader/DataGridHeader.cjs.js +1 -1
- package/dist/components/DataGrid/DataGridHeader/DataGridHeader.cjs.js.map +1 -1
- package/dist/components/DataGrid/DataGridHeader/DataGridHeader.es.js +5 -2
- package/dist/components/DataGrid/DataGridHeader/DataGridHeader.es.js.map +1 -1
- package/dist/components/DataGrid/DataGridHeader/DataGridHeader.module.scss.cjs.js +2 -2
- package/dist/components/DataGrid/DataGridHeader/DataGridHeader.module.scss.es.js +7 -4
- package/dist/components/DataGrid/DataGridHeader/DataGridHeader.module.scss.es.js.map +1 -1
- package/dist/components/DataGrid/DataGridHeader/DataGridHeaderCell.cjs.js.map +1 -1
- package/dist/components/DataGrid/DataGridHeader/DataGridHeaderCell.es.js +1 -1
- package/dist/components/DataGrid/DataGridHeader/DataGridHeaderCell.es.js.map +1 -1
- package/dist/components/DataGrid/DataGridHeader/DataGridHeaderCell.module.scss.cjs.js +2 -2
- package/dist/components/DataGrid/DataGridHeader/DataGridHeaderCell.module.scss.es.js +11 -11
- package/dist/components/DatePicker/DatePicker.module.scss.cjs.js +2 -2
- package/dist/components/DatePicker/DatePicker.module.scss.es.js +31 -31
- package/dist/components/Form/Checkbox/Checkbox.module.scss.cjs.js +2 -2
- package/dist/components/Form/Checkbox/Checkbox.module.scss.es.js +13 -13
- package/dist/components/Form/Fieldset/Fieldset.cjs.js +1 -1
- package/dist/components/Form/Fieldset/Fieldset.cjs.js.map +1 -1
- package/dist/components/Form/Fieldset/Fieldset.es.js +2 -1
- package/dist/components/Form/Fieldset/Fieldset.es.js.map +1 -1
- package/dist/components/Form/Fieldset/Fieldset.module.scss.cjs.js +2 -2
- package/dist/components/Form/Fieldset/Fieldset.module.scss.es.js +8 -5
- package/dist/components/Form/Fieldset/Fieldset.module.scss.es.js.map +1 -1
- package/dist/components/Form/FileUpload/FileItem/FileItem.cjs.js +1 -1
- package/dist/components/Form/FileUpload/FileItem/FileItem.cjs.js.map +1 -1
- package/dist/components/Form/FileUpload/FileItem/FileItem.es.js +1 -1
- package/dist/components/Form/FileUpload/FileItem/FileItem.es.js.map +1 -1
- package/dist/components/Form/FileUpload/FileItem/FileItem.module.scss.cjs.js +2 -2
- package/dist/components/Form/FileUpload/FileItem/FileItem.module.scss.es.js +18 -18
- package/dist/components/Form/FileUpload/FileUpload.cjs.js +1 -1
- package/dist/components/Form/FileUpload/FileUpload.cjs.js.map +1 -1
- package/dist/components/Form/FileUpload/FileUpload.es.js +6 -6
- package/dist/components/Form/FileUpload/FileUpload.es.js.map +1 -1
- package/dist/components/Form/FileUpload/FileUpload.module.scss.cjs.js +2 -2
- package/dist/components/Form/FileUpload/FileUpload.module.scss.es.js +16 -16
- package/dist/components/Form/Form.module.scss.cjs.js +2 -2
- package/dist/components/Form/Form.module.scss.es.js +2 -2
- package/dist/components/Form/FormControl/FormControl.module.scss.cjs.js +2 -2
- package/dist/components/Form/FormControl/FormControl.module.scss.es.js +13 -13
- package/dist/components/Form/FormErrorText/FormErrorText.module.scss.cjs.js +2 -2
- package/dist/components/Form/FormErrorText/FormErrorText.module.scss.es.js +9 -6
- package/dist/components/Form/FormErrorText/FormErrorText.module.scss.es.js.map +1 -1
- package/dist/components/Form/FormGroup/FormGroup.module.scss.cjs.js +2 -2
- package/dist/components/Form/FormGroup/FormGroup.module.scss.es.js +3 -3
- package/dist/components/Form/FormHelperText/FormHelperText.module.scss.cjs.js +2 -2
- package/dist/components/Form/FormHelperText/FormHelperText.module.scss.es.js +4 -4
- package/dist/components/Form/FormSelectorWrapper/FormSelectorWrapper.cjs.js +1 -1
- package/dist/components/Form/FormSelectorWrapper/FormSelectorWrapper.cjs.js.map +1 -1
- package/dist/components/Form/FormSelectorWrapper/FormSelectorWrapper.es.js +4 -1
- package/dist/components/Form/FormSelectorWrapper/FormSelectorWrapper.es.js.map +1 -1
- package/dist/components/Form/FormSelectorWrapper/FormSelectorWrapper.module.scss.cjs.js +2 -2
- package/dist/components/Form/FormSelectorWrapper/FormSelectorWrapper.module.scss.es.js +6 -6
- package/dist/components/Form/Input/Input.cjs.js +1 -1
- package/dist/components/Form/Input/Input.cjs.js.map +1 -1
- package/dist/components/Form/Input/Input.es.js +2 -1
- package/dist/components/Form/Input/Input.es.js.map +1 -1
- package/dist/components/Form/Input/Input.module.scss.cjs.js +2 -2
- package/dist/components/Form/Input/Input.module.scss.es.js +8 -8
- package/dist/components/Form/Label/Label.module.scss.cjs.js +2 -2
- package/dist/components/Form/Label/Label.module.scss.es.js +2 -2
- package/dist/components/Form/Radio/Radio.cjs.js.map +1 -1
- package/dist/components/Form/Radio/Radio.es.js +1 -1
- package/dist/components/Form/Radio/Radio.es.js.map +1 -1
- package/dist/components/Form/Radio/Radio.module.scss.cjs.js +2 -2
- package/dist/components/Form/Radio/Radio.module.scss.es.js +11 -11
- package/dist/components/Form/Select/MultiSelect/MultiOption.cjs.js +1 -1
- package/dist/components/Form/Select/MultiSelect/MultiOption.cjs.js.map +1 -1
- package/dist/components/Form/Select/MultiSelect/MultiOption.es.js +6 -6
- package/dist/components/Form/Select/MultiSelect/MultiOption.es.js.map +1 -1
- package/dist/components/Form/Select/MultiSelect/MultiSelect.cjs.js +1 -1
- package/dist/components/Form/Select/MultiSelect/MultiSelect.cjs.js.map +1 -1
- package/dist/components/Form/Select/MultiSelect/MultiSelect.es.js +198 -40
- package/dist/components/Form/Select/MultiSelect/MultiSelect.es.js.map +1 -1
- package/dist/components/Form/Select/MultiSelect/MultiSelect.module.scss.cjs.js +2 -2
- package/dist/components/Form/Select/MultiSelect/MultiSelect.module.scss.es.js +18 -15
- package/dist/components/Form/Select/MultiSelect/MultiSelect.module.scss.es.js.map +1 -1
- package/dist/components/Form/Select/MultiSelect/SelectButton.module.scss.cjs.js +2 -2
- package/dist/components/Form/Select/MultiSelect/SelectButton.module.scss.es.js +2 -2
- package/dist/components/Form/Select/MultiSelect/SelectedOptions.cjs.js.map +1 -1
- package/dist/components/Form/Select/MultiSelect/SelectedOptions.es.js.map +1 -1
- package/dist/components/Form/Select/MultiSelect/SelectedOptions.module.scss.cjs.js +2 -2
- package/dist/components/Form/Select/MultiSelect/SelectedOptions.module.scss.es.js +4 -4
- package/dist/components/Form/Select/MultiSelect/useArrowNavigation.cjs.js +1 -1
- package/dist/components/Form/Select/MultiSelect/useArrowNavigation.cjs.js.map +1 -1
- package/dist/components/Form/Select/MultiSelect/useArrowNavigation.es.js +81 -33
- package/dist/components/Form/Select/MultiSelect/useArrowNavigation.es.js.map +1 -1
- package/dist/components/Form/Select/MultiSelect/useSearch.cjs.js +1 -1
- package/dist/components/Form/Select/MultiSelect/useSearch.cjs.js.map +1 -1
- package/dist/components/Form/Select/MultiSelect/useSearch.es.js +40 -6
- package/dist/components/Form/Select/MultiSelect/useSearch.es.js.map +1 -1
- package/dist/components/Form/Select/Select.interfaces.cjs.js.map +1 -1
- package/dist/components/Form/Select/Select.interfaces.es.js.map +1 -1
- package/dist/components/Form/Select/SingleSelect/Option.cjs.js +1 -1
- package/dist/components/Form/Select/SingleSelect/Option.cjs.js.map +1 -1
- package/dist/components/Form/Select/SingleSelect/Option.es.js +10 -3
- package/dist/components/Form/Select/SingleSelect/Option.es.js.map +1 -1
- package/dist/components/Form/Select/SingleSelect/Select.cjs.js +1 -1
- package/dist/components/Form/Select/SingleSelect/Select.cjs.js.map +1 -1
- package/dist/components/Form/Select/SingleSelect/Select.es.js +169 -31
- package/dist/components/Form/Select/SingleSelect/Select.es.js.map +1 -1
- package/dist/components/Form/Select/SingleSelect/Select.module.scss.cjs.js +2 -2
- package/dist/components/Form/Select/SingleSelect/Select.module.scss.es.js +20 -17
- package/dist/components/Form/Select/SingleSelect/Select.module.scss.es.js.map +1 -1
- package/dist/components/Form/Select/SingleSelect/useArrowNavigation.cjs.js +1 -1
- package/dist/components/Form/Select/SingleSelect/useArrowNavigation.cjs.js.map +1 -1
- package/dist/components/Form/Select/SingleSelect/useArrowNavigation.es.js +119 -91
- package/dist/components/Form/Select/SingleSelect/useArrowNavigation.es.js.map +1 -1
- package/dist/components/Form/Select/SingleSelect/useSearch.cjs.js +1 -1
- package/dist/components/Form/Select/SingleSelect/useSearch.cjs.js.map +1 -1
- package/dist/components/Form/Select/SingleSelect/useSearch.es.js +34 -4
- package/dist/components/Form/Select/SingleSelect/useSearch.es.js.map +1 -1
- package/dist/components/Form/Select/useAddNewBtn.module.scss.cjs.js +2 -2
- package/dist/components/Form/Select/useAddNewBtn.module.scss.es.js +4 -4
- package/dist/components/Form/Select/useSelectPositionList.cjs.js +1 -1
- package/dist/components/Form/Select/useSelectPositionList.cjs.js.map +1 -1
- package/dist/components/Form/Select/useSelectPositionList.es.js +18 -5
- package/dist/components/Form/Select/useSelectPositionList.es.js.map +1 -1
- package/dist/components/Form/Textarea/Textarea.cjs.js +1 -1
- package/dist/components/Form/Textarea/Textarea.cjs.js.map +1 -1
- package/dist/components/Form/Textarea/Textarea.es.js +4 -0
- package/dist/components/Form/Textarea/Textarea.es.js.map +1 -1
- package/dist/components/Form/Textarea/Textarea.module.scss.cjs.js +2 -2
- package/dist/components/Form/Textarea/Textarea.module.scss.es.js +6 -6
- package/dist/components/Form/Toggle/Toggle.cjs.js +1 -1
- package/dist/components/Form/Toggle/Toggle.cjs.js.map +1 -1
- package/dist/components/Form/Toggle/Toggle.es.js +5 -3
- package/dist/components/Form/Toggle/Toggle.es.js.map +1 -1
- package/dist/components/Form/Toggle/Toggle.module.scss.cjs.js +2 -2
- package/dist/components/Form/Toggle/Toggle.module.scss.es.js +18 -18
- package/dist/components/Form/Wrapper/CheckboxWrapper/CheckboxWrapper.cjs.js +1 -1
- package/dist/components/Form/Wrapper/CheckboxWrapper/CheckboxWrapper.cjs.js.map +1 -1
- package/dist/components/Form/Wrapper/CheckboxWrapper/CheckboxWrapper.es.js +25 -17
- package/dist/components/Form/Wrapper/CheckboxWrapper/CheckboxWrapper.es.js.map +1 -1
- package/dist/components/Form/Wrapper/CheckboxWrapper/CheckboxWrapper.module.scss.cjs.js +2 -2
- package/dist/components/Form/Wrapper/CheckboxWrapper/CheckboxWrapper.module.scss.es.js +8 -4
- package/dist/components/Form/Wrapper/CheckboxWrapper/CheckboxWrapper.module.scss.es.js.map +1 -1
- package/dist/components/Form/Wrapper/InputWrapper/InputWrapper.module.scss.cjs.js +2 -2
- package/dist/components/Form/Wrapper/InputWrapper/InputWrapper.module.scss.es.js +5 -5
- package/dist/components/Form/Wrapper/MultiSelectWrapper/MultiSelectWrapper.module.scss.cjs.js +2 -2
- package/dist/components/Form/Wrapper/MultiSelectWrapper/MultiSelectWrapper.module.scss.es.js +3 -3
- package/dist/components/Form/Wrapper/RadioWrapper/RadioWrapper.cjs.js +1 -1
- package/dist/components/Form/Wrapper/RadioWrapper/RadioWrapper.cjs.js.map +1 -1
- package/dist/components/Form/Wrapper/RadioWrapper/RadioWrapper.es.js +37 -21
- package/dist/components/Form/Wrapper/RadioWrapper/RadioWrapper.es.js.map +1 -1
- package/dist/components/Form/Wrapper/RadioWrapper/RadioWrapper.module.scss.cjs.js +2 -2
- package/dist/components/Form/Wrapper/RadioWrapper/RadioWrapper.module.scss.es.js +8 -4
- package/dist/components/Form/Wrapper/RadioWrapper/RadioWrapper.module.scss.es.js.map +1 -1
- package/dist/components/Form/Wrapper/SelectWrapper/SelectWrapper.module.scss.cjs.js +2 -2
- package/dist/components/Form/Wrapper/SelectWrapper/SelectWrapper.module.scss.es.js +3 -3
- package/dist/components/Form/Wrapper/TextareaWrapper/TextareaWrapper.cjs.js +1 -1
- package/dist/components/Form/Wrapper/TextareaWrapper/TextareaWrapper.cjs.js.map +1 -1
- package/dist/components/Form/Wrapper/TextareaWrapper/TextareaWrapper.es.js +2 -0
- package/dist/components/Form/Wrapper/TextareaWrapper/TextareaWrapper.es.js.map +1 -1
- package/dist/components/Form/Wrapper/TextareaWrapper/TextareaWrapper.module.scss.cjs.js +2 -2
- package/dist/components/Form/Wrapper/TextareaWrapper/TextareaWrapper.module.scss.es.js +8 -8
- package/dist/components/Form/Wrapper/Wrapper/Wrapper.cjs.js +1 -1
- package/dist/components/Form/Wrapper/Wrapper/Wrapper.cjs.js.map +1 -1
- package/dist/components/Form/Wrapper/Wrapper/Wrapper.es.js +1 -1
- package/dist/components/Form/Wrapper/Wrapper/Wrapper.es.js.map +1 -1
- package/dist/components/Form/Wrapper/Wrapper/Wrapper.module.scss.cjs.js +2 -2
- package/dist/components/Form/Wrapper/Wrapper/Wrapper.module.scss.es.js +6 -6
- package/dist/components/Icon/Icon.cjs.js +1 -1
- package/dist/components/Icon/Icon.cjs.js.map +1 -1
- package/dist/components/Icon/Icon.es.js +1 -1
- package/dist/components/Icon/Icon.es.js.map +1 -1
- package/dist/components/Icon/Icon.module.scss.cjs.js +2 -2
- package/dist/components/Icon/Icon.module.scss.es.js +108 -108
- package/dist/components/Layout/ActionBar/ActionBar.module.scss.cjs.js +2 -2
- package/dist/components/Layout/ActionBar/ActionBar.module.scss.es.js +10 -10
- package/dist/components/Layout/Card/Card.module.scss.cjs.js +2 -2
- package/dist/components/Layout/Card/Card.module.scss.es.js +12 -12
- package/dist/components/Layout/ContentHeader/ContentHeader.cjs.js +1 -1
- package/dist/components/Layout/ContentHeader/ContentHeader.cjs.js.map +1 -1
- package/dist/components/Layout/ContentHeader/ContentHeader.es.js +66 -41
- package/dist/components/Layout/ContentHeader/ContentHeader.es.js.map +1 -1
- package/dist/components/Layout/ContentHeader/ContentHeader.module.scss.cjs.js +2 -2
- package/dist/components/Layout/ContentHeader/ContentHeader.module.scss.es.js +28 -13
- package/dist/components/Layout/ContentHeader/ContentHeader.module.scss.es.js.map +1 -1
- package/dist/components/Layout/FormPage/FormWithStepper/FormSection/FormSection.module.scss.cjs.js +2 -2
- package/dist/components/Layout/FormPage/FormWithStepper/FormSection/FormSection.module.scss.es.js +4 -4
- package/dist/components/Layout/FormPage/FormWithStepper/FormStepper/FormStepper.module.scss.cjs.js +2 -2
- package/dist/components/Layout/FormPage/FormWithStepper/FormStepper/FormStepper.module.scss.es.js +2 -2
- package/dist/components/Layout/FormPage/FormWithStepper/FormWithStepper.module.scss.cjs.js +2 -2
- package/dist/components/Layout/FormPage/FormWithStepper/FormWithStepper.module.scss.es.js +3 -3
- package/dist/components/Link/Link.cjs.js.map +1 -1
- package/dist/components/Link/Link.es.js +1 -1
- package/dist/components/Link/Link.es.js.map +1 -1
- package/dist/components/Link/Link.module.scss.cjs.js +2 -2
- package/dist/components/Link/Link.module.scss.es.js +17 -17
- package/dist/components/Notifications/Alert/AlertContainer/AlertContainer.module.scss.cjs.js +2 -2
- package/dist/components/Notifications/Alert/AlertContainer/AlertContainer.module.scss.es.js +11 -11
- package/dist/components/Notifications/Alert/AlertContainer/useAlertContainerHeightAnimation.cjs.js +1 -1
- package/dist/components/Notifications/Alert/AlertContainer/useAlertContainerHeightAnimation.cjs.js.map +1 -1
- package/dist/components/Notifications/Alert/AlertContainer/useAlertContainerHeightAnimation.es.js +7 -1
- package/dist/components/Notifications/Alert/AlertContainer/useAlertContainerHeightAnimation.es.js.map +1 -1
- package/dist/components/Notifications/Alert/AlertItem/AlertItem.module.scss.cjs.js +2 -2
- package/dist/components/Notifications/Alert/AlertItem/AlertItem.module.scss.es.js +22 -22
- package/dist/components/Notifications/Banner/Banner.module.scss.cjs.js +2 -2
- package/dist/components/Notifications/Banner/Banner.module.scss.es.js +9 -9
- package/dist/components/Notifications/BaseModal/BaseModal.cjs.js +1 -1
- package/dist/components/Notifications/BaseModal/BaseModal.cjs.js.map +1 -1
- package/dist/components/Notifications/BaseModal/BaseModal.es.js +1 -1
- package/dist/components/Notifications/BaseModal/BaseModal.es.js.map +1 -1
- package/dist/components/Notifications/BaseModal/BaseModal.module.scss.cjs.js +2 -2
- package/dist/components/Notifications/BaseModal/BaseModal.module.scss.es.js +5 -5
- package/dist/components/Notifications/BaseModal/BaseModalActions/BaseModalActions.module.scss.cjs.js +2 -2
- package/dist/components/Notifications/BaseModal/BaseModalActions/BaseModalActions.module.scss.es.js +4 -4
- package/dist/components/Notifications/BaseModal/BaseModalContent/BaseModalContent.module.scss.cjs.js +2 -2
- package/dist/components/Notifications/BaseModal/BaseModalContent/BaseModalContent.module.scss.es.js +2 -2
- package/dist/components/Notifications/BaseModal/BaseModalHeader/BaseModalHeader.module.scss.cjs.js +2 -2
- package/dist/components/Notifications/BaseModal/BaseModalHeader/BaseModalHeader.module.scss.es.js +6 -6
- package/dist/components/Notifications/Dialog/Dialog.module.scss.cjs.js +2 -2
- package/dist/components/Notifications/Dialog/Dialog.module.scss.es.js +4 -4
- package/dist/components/Notifications/Dialog/DialogActions/DialogActions.module.scss.cjs.js +2 -2
- package/dist/components/Notifications/Dialog/DialogActions/DialogActions.module.scss.es.js +3 -3
- package/dist/components/Notifications/Dialog/DialogTitle/DialogTitle.module.scss.cjs.js +2 -2
- package/dist/components/Notifications/Dialog/DialogTitle/DialogTitle.module.scss.es.js +10 -10
- package/dist/components/Notifications/SideSheet/SideSheet.cjs.js.map +1 -1
- package/dist/components/Notifications/SideSheet/SideSheet.es.js +1 -1
- package/dist/components/Notifications/SideSheet/SideSheet.es.js.map +1 -1
- package/dist/components/Notifications/SideSheet/SideSheet.module.scss.cjs.js +2 -2
- package/dist/components/Notifications/SideSheet/SideSheet.module.scss.es.js +13 -13
- package/dist/components/Notifications/SideSheet/SideSheetContent/SideSheetContent.module.scss.cjs.js +2 -2
- package/dist/components/Notifications/SideSheet/SideSheetContent/SideSheetContent.module.scss.es.js +2 -2
- package/dist/components/Notifications/SideSheet/SideSheetHeader/SideSheetHeader.module.scss.cjs.js +2 -2
- package/dist/components/Notifications/SideSheet/SideSheetHeader/SideSheetHeader.module.scss.es.js +2 -2
- package/dist/components/Notifications/SlideInModal/SlideInModal.cjs.js.map +1 -1
- package/dist/components/Notifications/SlideInModal/SlideInModal.es.js +1 -1
- package/dist/components/Notifications/SlideInModal/SlideInModal.es.js.map +1 -1
- package/dist/components/Notifications/SlideInModal/SlideInModal.module.scss.cjs.js +2 -2
- package/dist/components/Notifications/SlideInModal/SlideInModal.module.scss.es.js +10 -10
- package/dist/components/Pagination/Pagination.cjs.js +1 -1
- package/dist/components/Pagination/Pagination.cjs.js.map +1 -1
- package/dist/components/Pagination/Pagination.es.js +118 -90
- package/dist/components/Pagination/Pagination.es.js.map +1 -1
- package/dist/components/Pagination/Pagination.module.scss.cjs.js +2 -2
- package/dist/components/Pagination/Pagination.module.scss.es.js +15 -14
- package/dist/components/Pagination/Pagination.module.scss.es.js.map +1 -1
- package/dist/components/Popover/Popover.module.scss.cjs.js +2 -2
- package/dist/components/Popover/Popover.module.scss.es.js +3 -3
- package/dist/components/ProgressBar/ProgressBar.cjs.js.map +1 -1
- package/dist/components/ProgressBar/ProgressBar.es.js.map +1 -1
- package/dist/components/ProgressBar/ProgressBar.module.scss.cjs.js +2 -2
- package/dist/components/ProgressBar/ProgressBar.module.scss.es.js +9 -9
- package/dist/components/Skeleton/Skeleton.module.scss.cjs.js +2 -2
- package/dist/components/Skeleton/Skeleton.module.scss.es.js +5 -5
- package/dist/components/Spinner/Spinner.module.scss.cjs.js +2 -2
- package/dist/components/Spinner/Spinner.module.scss.es.js +3 -3
- package/dist/components/Stepper/Step.module.scss.cjs.js +2 -2
- package/dist/components/Stepper/Step.module.scss.es.js +22 -22
- package/dist/components/Stepper/Stepper.module.scss.cjs.js +2 -2
- package/dist/components/Stepper/Stepper.module.scss.es.js +4 -4
- package/dist/components/Tabs/Tab.module.scss.cjs.js +2 -2
- package/dist/components/Tabs/Tab.module.scss.es.js +3 -3
- package/dist/components/Tabs/TabButton.module.scss.cjs.js +2 -2
- package/dist/components/Tabs/TabButton.module.scss.es.js +12 -12
- package/dist/components/Tabs/Tabs.cjs.js +1 -1
- package/dist/components/Tabs/Tabs.cjs.js.map +1 -1
- package/dist/components/Tabs/Tabs.es.js +1 -1
- package/dist/components/Tabs/Tabs.es.js.map +1 -1
- package/dist/components/Tabs/Tabs.module.scss.cjs.js +2 -2
- package/dist/components/Tabs/Tabs.module.scss.es.js +10 -10
- package/dist/components/Tag/RemoveButton.module.scss.cjs.js +2 -2
- package/dist/components/Tag/RemoveButton.module.scss.es.js +3 -3
- package/dist/components/Tag/Tag.cjs.js +1 -1
- package/dist/components/Tag/Tag.cjs.js.map +1 -1
- package/dist/components/Tag/Tag.es.js +1 -1
- package/dist/components/Tag/Tag.es.js.map +1 -1
- package/dist/components/Tag/Tag.module.scss.cjs.js +2 -2
- package/dist/components/Tag/Tag.module.scss.es.js +6 -6
- package/dist/components/TextEllipsis/TextEllipsis.cjs.js.map +1 -1
- package/dist/components/TextEllipsis/TextEllipsis.es.js.map +1 -1
- package/dist/components/TextEllipsis/TextEllipsis.module.scss.cjs.js +2 -2
- package/dist/components/TextEllipsis/TextEllipsis.module.scss.es.js +3 -3
- package/dist/components/Tiles/Tile.cjs.js.map +1 -1
- package/dist/components/Tiles/Tile.es.js.map +1 -1
- package/dist/components/Tiles/Tile.module.scss.cjs.js +2 -2
- package/dist/components/Tiles/Tile.module.scss.es.js +8 -8
- package/dist/components/Tiles/Tiles.module.scss.cjs.js +2 -2
- package/dist/components/Tiles/Tiles.module.scss.es.js +2 -2
- package/dist/components/Tooltip/Tooltip.cjs.js +1 -1
- package/dist/components/Tooltip/Tooltip.cjs.js.map +1 -1
- package/dist/components/Tooltip/Tooltip.es.js +9 -16
- package/dist/components/Tooltip/Tooltip.es.js.map +1 -1
- package/dist/components/Tooltip/Tooltip.module.scss.cjs.js +2 -2
- package/dist/components/Tooltip/Tooltip.module.scss.es.js +28 -27
- package/dist/components/Tooltip/Tooltip.module.scss.es.js.map +1 -1
- package/dist/components/Typography/Typography.module.scss.cjs.js +2 -2
- package/dist/components/Typography/Typography.module.scss.es.js +13 -13
- package/dist/components/_BaseStyling_/BaseStyling.cjs.js +2 -1
- package/dist/components/_BaseStyling_/BaseStyling.cjs.js.map +1 -1
- package/dist/components/_BaseStyling_/BaseStyling.es.js +3 -3
- package/dist/components/_BaseStyling_/BaseStyling.es.js.map +1 -1
- package/dist/components/admin/layout/LeftNav/LeftNav.cjs.js.map +1 -1
- package/dist/components/admin/layout/LeftNav/LeftNav.es.js +1 -1
- package/dist/components/admin/layout/LeftNav/LeftNav.es.js.map +1 -1
- package/dist/components/admin/layout/LeftNav/LeftNav.module.scss.cjs.js +2 -2
- package/dist/components/admin/layout/LeftNav/LeftNav.module.scss.es.js +5 -5
- package/dist/components/admin/layout/LeftNav/LeftNavItem/LeftNavItem.module.scss.cjs.js +2 -2
- package/dist/components/admin/layout/LeftNav/LeftNavItem/LeftNavItem.module.scss.es.js +14 -14
- package/dist/components/admin/layout/LeftNav/useRefItems.cjs.js +1 -1
- package/dist/components/admin/layout/LeftNav/useRefItems.cjs.js.map +1 -1
- package/dist/components/admin/layout/LeftNav/useRefItems.es.js +7 -6
- package/dist/components/admin/layout/LeftNav/useRefItems.es.js.map +1 -1
- package/dist/components/admin/layout/MicrofrontendContainer/MicrofrontendContainer.module.scss.cjs.js +2 -2
- package/dist/components/admin/layout/MicrofrontendContainer/MicrofrontendContainer.module.scss.es.js +3 -3
- package/dist/components/admin/layout/ProfileMenu/ProfileMenu.module.scss.cjs.js +2 -2
- package/dist/components/admin/layout/ProfileMenu/ProfileMenu.module.scss.es.js +7 -7
- package/dist/components/admin/layout/TopNavBar/TopNavBar.module.scss.cjs.js +2 -2
- package/dist/components/admin/layout/TopNavBar/TopNavBar.module.scss.es.js +13 -13
- package/dist/components/miscellaneous/IdentityProviderButton.module.scss.cjs.js +2 -2
- package/dist/components/miscellaneous/IdentityProviderButton.module.scss.es.js +3 -3
- package/dist/components/withReadOnly.cjs.js +1 -1
- package/dist/components/withReadOnly.cjs.js.map +1 -1
- package/dist/components/withReadOnly.es.js +2 -4
- package/dist/components/withReadOnly.es.js.map +1 -1
- package/dist/hooks/useScreenSize.cjs.js +1 -1
- package/dist/hooks/useScreenSize.cjs.js.map +1 -1
- package/dist/hooks/useScreenSize.es.js +1 -1
- package/dist/hooks/useScreenSize.es.js.map +1 -1
- package/dist/hooks/useStickyStacking.cjs.js +2 -0
- package/dist/hooks/useStickyStacking.cjs.js.map +1 -0
- package/dist/hooks/useStickyStacking.es.js +208 -0
- package/dist/hooks/useStickyStacking.es.js.map +1 -0
- package/dist/hooks/useUploadFile.cjs.js +1 -1
- package/dist/hooks/useUploadFile.cjs.js.map +1 -1
- package/dist/hooks/useUploadFile.es.js +1 -1
- package/dist/hooks/useUploadFile.es.js.map +1 -1
- package/dist/index.cjs.js +1 -1
- package/dist/index.d.ts +95 -7
- package/dist/index.es.js +2 -0
- package/dist/index.es.js.map +1 -1
- package/dist/readyclasses.module.scss.cjs.js +2 -2
- package/dist/readyclasses.module.scss.es.js +5 -5
- package/dist/util/helper.cjs.js +1 -1
- package/dist/util/helper.cjs.js.map +1 -1
- package/dist/util/helper.es.js +14 -16
- package/dist/util/helper.es.js.map +1 -1
- package/package.json +4 -4
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DateTimePickerCalendarSection.cjs.js","sources":["../../../../../src/components/DataGrid/DataGridFilters/DateTimePicker/DateTimePickerCalendarSection.tsx"],"sourcesContent":["/*\n * Copyright 2022 OneWelcome B.V.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport React from \"react\";\nimport classes from \"./DateTimePicker.module.scss\";\nimport { DatePicker } from \"../../../DatePicker/DatePicker\";\nimport { IconButton } from \"../../../Button/IconButton\";\nimport { DateRange } from \"react-day-picker\";\nimport { formatInputDate, getMonthName, getYearFromDate } from \"./DateTimeService\";\nimport { Icon, Icons } from \"../../../Icon/Icon\";\nimport { Typography } from \"../../../Typography/Typography\";\n\ntype Props = {\n previousMonth: string;\n nextMonth: string;\n selectedDate: DateRange | undefined;\n disableDateRangePickers: boolean;\n setSelectedDate: React.Dispatch<React.SetStateAction<DateRange>>;\n setFromDateText: React.Dispatch<React.SetStateAction<string>>;\n setToDateText: React.Dispatch<React.SetStateAction<string>>;\n setFromDateError: React.Dispatch<React.SetStateAction<string>>;\n setToDateError: React.Dispatch<React.SetStateAction<string>>;\n};\n\nexport const DateTimePickerCalendarSection = ({\n previousMonth,\n nextMonth,\n selectedDate,\n disableDateRangePickers,\n setSelectedDate,\n setFromDateText,\n setFromDateError,\n setToDateError,\n setToDateText\n}: Props) => {\n const onDatePickerSelect = (date: Date | DateRange | undefined): void => {\n if (date) {\n setSelectedDate(date as DateRange);\n\n const fromDate = (date as DateRange).from;\n const toDate = (date as DateRange).to;\n\n if (fromDate) {\n setFromDateText(formatInputDate(fromDate));\n setFromDateError(\"\");\n }\n\n if (toDate) {\n setToDateText(formatInputDate(toDate));\n setToDateError(\"\");\n }\n }\n };\n
|
|
1
|
+
{"version":3,"file":"DateTimePickerCalendarSection.cjs.js","sources":["../../../../../src/components/DataGrid/DataGridFilters/DateTimePicker/DateTimePickerCalendarSection.tsx"],"sourcesContent":["/*\n * Copyright 2022 OneWelcome B.V.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport React, { useMemo } from \"react\";\nimport classes from \"./DateTimePicker.module.scss\";\nimport { DatePicker } from \"../../../DatePicker/DatePicker\";\nimport { IconButton } from \"../../../Button/IconButton\";\nimport { CustomComponents, DateRange, MonthCaptionProps, NavProps } from \"react-day-picker\";\nimport { formatInputDate, getMonthName, getYearFromDate } from \"./DateTimeService\";\nimport { Icon, Icons } from \"../../../Icon/Icon\";\nimport { Typography } from \"../../../Typography/Typography\";\n\ntype CalendarNavProps = NavProps & {\n previousMonthLabel: string;\n nextMonthLabel: string;\n disabled: boolean;\n};\n\nconst CalendarNav = ({\n onNextClick,\n onPreviousClick,\n previousMonthLabel,\n nextMonthLabel,\n disabled\n}: CalendarNavProps) => (\n <div className={classes[\"nav\"]}>\n <IconButton\n title={previousMonthLabel}\n onClick={onPreviousClick}\n className={classes[\"prev-button\"]}\n disabled={disabled}\n >\n <Icon size=\"0.75rem\" icon={Icons.ChevronLeft} />\n </IconButton>\n <IconButton\n title={nextMonthLabel}\n onClick={onNextClick}\n className={classes[\"next-button\"]}\n disabled={disabled}\n >\n <Icon size=\"0.75rem\" icon={Icons.ChevronRight} />\n </IconButton>\n </div>\n);\n\nconst CalendarMonthCaption = ({ calendarMonth }: MonthCaptionProps) => (\n <Typography className={classes[\"month-caption\"]} variant=\"body\">\n {getMonthName(calendarMonth.date)} {getYearFromDate(calendarMonth.date)}\n </Typography>\n);\n\nconst createCalendarComponents = (\n previousMonthLabel: string,\n nextMonthLabel: string,\n disabled: boolean\n): Partial<CustomComponents> => ({\n Nav: props => (\n <CalendarNav\n {...props}\n previousMonthLabel={previousMonthLabel}\n nextMonthLabel={nextMonthLabel}\n disabled={disabled}\n />\n ),\n MonthCaption: CalendarMonthCaption\n});\n\ntype Props = {\n previousMonth: string;\n nextMonth: string;\n selectedDate: DateRange | undefined;\n disableDateRangePickers: boolean;\n setSelectedDate: React.Dispatch<React.SetStateAction<DateRange>>;\n setFromDateText: React.Dispatch<React.SetStateAction<string>>;\n setToDateText: React.Dispatch<React.SetStateAction<string>>;\n setFromDateError: React.Dispatch<React.SetStateAction<string>>;\n setToDateError: React.Dispatch<React.SetStateAction<string>>;\n};\n\nexport const DateTimePickerCalendarSection = ({\n previousMonth,\n nextMonth,\n selectedDate,\n disableDateRangePickers,\n setSelectedDate,\n setFromDateText,\n setFromDateError,\n setToDateError,\n setToDateText\n}: Props) => {\n const onDatePickerSelect = (date: Date | DateRange | undefined): void => {\n if (date) {\n setSelectedDate(date as DateRange);\n\n const fromDate = (date as DateRange).from;\n const toDate = (date as DateRange).to;\n\n if (fromDate) {\n setFromDateText(formatInputDate(fromDate));\n setFromDateError(\"\");\n }\n\n if (toDate) {\n setToDateText(formatInputDate(toDate));\n setToDateError(\"\");\n }\n }\n };\n\n const components = useMemo(\n () => createCalendarComponents(previousMonth, nextMonth, disableDateRangePickers),\n [previousMonth, nextMonth, disableDateRangePickers]\n );\n\n return (\n <DatePicker\n onSelect={onDatePickerSelect}\n value={selectedDate}\n disabled={disableDateRangePickers}\n mode={\"range\"}\n components={components}\n numberOfMonths={2}\n />\n );\n};\n"],"names":["CalendarNav","onNextClick","onPreviousClick","previousMonthLabel","nextMonthLabel","disabled","React","createElement","className","classes","IconButton","title","onClick","Icon","size","icon","Icons","ChevronLeft","ChevronRight","CalendarMonthCaption","calendarMonth","Typography","variant","getMonthName","date","getYearFromDate","previousMonth","nextMonth","selectedDate","disableDateRangePickers","setSelectedDate","setFromDateText","setFromDateError","setToDateError","setToDateText","components","useMemo","createCalendarComponents","Nav","props","MonthCaption","DatePicker","onSelect","fromDate","from","toDate","to","formatInputDate","value","mode","numberOfMonths"],"mappings":"4XA+BMA,EAAc,EAClBC,cACAC,kBACAC,qBACAC,iBACAC,cAEAC,EAAAC,cAAC,MAAA,CAAIC,UAAWC,EAAAA,QAAa,KAC3BH,EAAAC,cAACG,EAAAA,WAAA,CACCC,MAAOR,EACPS,QAASV,EACTM,UAAWC,EAAAA,QAAQ,eACnBJ,4BAECQ,EAAAA,KAAA,CAAKC,KAAK,UAAUC,KAAMC,EAAAA,MAAMC,eAEnCX,EAAAC,cAACG,EAAAA,WAAA,CACCC,MAAOP,EACPQ,QAASX,EACTO,UAAWC,EAAAA,QAAQ,eACnBJ,4BAECQ,EAAAA,KAAA,CAAKC,KAAK,UAAUC,KAAMC,EAAAA,MAAME,iBAKjCC,EAAuB,EAAGC,mBAC9Bd,EAAAC,cAACc,aAAA,CAAWb,UAAWC,EAAAA,QAAQ,iBAAkBa,QAAQ,QACtDC,EAAAA,aAAaH,EAAcI,MAAM,IAAEC,EAAAA,gBAAgBL,EAAcI,6CAgCzB,EAC3CE,gBACAC,YACAC,eACAC,0BACAC,kBACAC,kBACAC,mBACAC,iBACAC,oBAEA,MAmBMC,EAAaC,EAAAA,QACjB,KAAMC,OA1DRlC,EA0DiCuB,EAzDjCtB,EAyDgDuB,EAxDhDtB,EAwD2DwB,EAxD3D,CAEAS,IAAKC,GACHjC,EAAAC,cAACP,EAAA,IACKuC,EACJpC,qBACAC,iBACAC,aAGJmC,aAAcrB,GAbiB,IAC/BhB,EACAC,EACAC,GAyDE,CAACqB,EAAeC,EAAWE,IAG7B,OACEvB,EAAAC,cAACkC,EAAAA,WAAA,CACCC,SA1BwBlB,IAC1B,GAAIA,EAAM,CACRM,EAAgBN,GAEhB,MAAMmB,EAAYnB,EAAmBoB,KAC/BC,EAAUrB,EAAmBsB,GAE/BH,IACFZ,EAAgBgB,EAAAA,gBAAgBJ,IAChCX,EAAiB,KAGfa,IACFX,EAAca,EAAAA,gBAAgBF,IAC9BZ,EAAe,IAEnB,GAWEe,MAAOpB,EACPvB,SAAUwB,EACVoB,KAAM,QACNd,aACAe,eAAgB"}
|
package/dist/components/DataGrid/DataGridFilters/DateTimePicker/DateTimePickerCalendarSection.es.js
CHANGED
|
@@ -1,10 +1,48 @@
|
|
|
1
|
-
import React from "react";
|
|
1
|
+
import React, { useMemo } from "react";
|
|
2
2
|
import classes from "./DateTimePicker.module.scss.es.js";
|
|
3
3
|
import { DatePicker } from "../../../DatePicker/DatePicker.es.js";
|
|
4
4
|
import { IconButton } from "../../../Button/IconButton.es.js";
|
|
5
|
-
import { getMonthName, getYearFromDate
|
|
5
|
+
import { formatInputDate, getMonthName, getYearFromDate } from "./DateTimeService.es.js";
|
|
6
6
|
import { Icon, Icons } from "../../../Icon/Icon.es.js";
|
|
7
7
|
import { Typography } from "../../../Typography/Typography.es.js";
|
|
8
|
+
const CalendarNav = ({
|
|
9
|
+
onNextClick,
|
|
10
|
+
onPreviousClick,
|
|
11
|
+
previousMonthLabel,
|
|
12
|
+
nextMonthLabel,
|
|
13
|
+
disabled
|
|
14
|
+
}) => /* @__PURE__ */ React.createElement("div", { className: classes["nav"] }, /* @__PURE__ */ React.createElement(
|
|
15
|
+
IconButton,
|
|
16
|
+
{
|
|
17
|
+
title: previousMonthLabel,
|
|
18
|
+
onClick: onPreviousClick,
|
|
19
|
+
className: classes["prev-button"],
|
|
20
|
+
disabled
|
|
21
|
+
},
|
|
22
|
+
/* @__PURE__ */ React.createElement(Icon, { size: "0.75rem", icon: Icons.ChevronLeft })
|
|
23
|
+
), /* @__PURE__ */ React.createElement(
|
|
24
|
+
IconButton,
|
|
25
|
+
{
|
|
26
|
+
title: nextMonthLabel,
|
|
27
|
+
onClick: onNextClick,
|
|
28
|
+
className: classes["next-button"],
|
|
29
|
+
disabled
|
|
30
|
+
},
|
|
31
|
+
/* @__PURE__ */ React.createElement(Icon, { size: "0.75rem", icon: Icons.ChevronRight })
|
|
32
|
+
));
|
|
33
|
+
const CalendarMonthCaption = ({ calendarMonth }) => /* @__PURE__ */ React.createElement(Typography, { className: classes["month-caption"], variant: "body" }, getMonthName(calendarMonth.date), " ", getYearFromDate(calendarMonth.date));
|
|
34
|
+
const createCalendarComponents = (previousMonthLabel, nextMonthLabel, disabled) => ({
|
|
35
|
+
Nav: (props) => /* @__PURE__ */ React.createElement(
|
|
36
|
+
CalendarNav,
|
|
37
|
+
{
|
|
38
|
+
...props,
|
|
39
|
+
previousMonthLabel,
|
|
40
|
+
nextMonthLabel,
|
|
41
|
+
disabled
|
|
42
|
+
}
|
|
43
|
+
),
|
|
44
|
+
MonthCaption: CalendarMonthCaption
|
|
45
|
+
});
|
|
8
46
|
const DateTimePickerCalendarSection = ({
|
|
9
47
|
previousMonth,
|
|
10
48
|
nextMonth,
|
|
@@ -31,6 +69,10 @@ const DateTimePickerCalendarSection = ({
|
|
|
31
69
|
}
|
|
32
70
|
}
|
|
33
71
|
};
|
|
72
|
+
const components = useMemo(
|
|
73
|
+
() => createCalendarComponents(previousMonth, nextMonth, disableDateRangePickers),
|
|
74
|
+
[previousMonth, nextMonth, disableDateRangePickers]
|
|
75
|
+
);
|
|
34
76
|
return /* @__PURE__ */ React.createElement(
|
|
35
77
|
DatePicker,
|
|
36
78
|
{
|
|
@@ -38,28 +80,7 @@ const DateTimePickerCalendarSection = ({
|
|
|
38
80
|
value: selectedDate,
|
|
39
81
|
disabled: disableDateRangePickers,
|
|
40
82
|
mode: "range",
|
|
41
|
-
components
|
|
42
|
-
Nav: ({ onNextClick, onPreviousClick }) => /* @__PURE__ */ React.createElement("div", { className: classes["nav"] }, /* @__PURE__ */ React.createElement(
|
|
43
|
-
IconButton,
|
|
44
|
-
{
|
|
45
|
-
title: previousMonth,
|
|
46
|
-
onClick: onPreviousClick,
|
|
47
|
-
className: classes["prev-button"],
|
|
48
|
-
disabled: disableDateRangePickers
|
|
49
|
-
},
|
|
50
|
-
/* @__PURE__ */ React.createElement(Icon, { size: "0.75rem", icon: Icons.ChevronLeft })
|
|
51
|
-
), /* @__PURE__ */ React.createElement(
|
|
52
|
-
IconButton,
|
|
53
|
-
{
|
|
54
|
-
title: nextMonth,
|
|
55
|
-
onClick: onNextClick,
|
|
56
|
-
className: classes["next-button"],
|
|
57
|
-
disabled: disableDateRangePickers
|
|
58
|
-
},
|
|
59
|
-
/* @__PURE__ */ React.createElement(Icon, { size: "0.75rem", icon: Icons.ChevronRight })
|
|
60
|
-
)),
|
|
61
|
-
MonthCaption: ({ calendarMonth }) => /* @__PURE__ */ React.createElement(Typography, { className: classes["month-caption"], variant: "body" }, getMonthName(calendarMonth.date), " ", getYearFromDate(calendarMonth.date))
|
|
62
|
-
},
|
|
83
|
+
components,
|
|
63
84
|
numberOfMonths: 2
|
|
64
85
|
}
|
|
65
86
|
);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DateTimePickerCalendarSection.es.js","sources":["../../../../../src/components/DataGrid/DataGridFilters/DateTimePicker/DateTimePickerCalendarSection.tsx"],"sourcesContent":["/*\n * Copyright 2022 OneWelcome B.V.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport React from \"react\";\nimport classes from \"./DateTimePicker.module.scss\";\nimport { DatePicker } from \"../../../DatePicker/DatePicker\";\nimport { IconButton } from \"../../../Button/IconButton\";\nimport { DateRange } from \"react-day-picker\";\nimport { formatInputDate, getMonthName, getYearFromDate } from \"./DateTimeService\";\nimport { Icon, Icons } from \"../../../Icon/Icon\";\nimport { Typography } from \"../../../Typography/Typography\";\n\ntype Props = {\n previousMonth: string;\n nextMonth: string;\n selectedDate: DateRange | undefined;\n disableDateRangePickers: boolean;\n setSelectedDate: React.Dispatch<React.SetStateAction<DateRange>>;\n setFromDateText: React.Dispatch<React.SetStateAction<string>>;\n setToDateText: React.Dispatch<React.SetStateAction<string>>;\n setFromDateError: React.Dispatch<React.SetStateAction<string>>;\n setToDateError: React.Dispatch<React.SetStateAction<string>>;\n};\n\nexport const DateTimePickerCalendarSection = ({\n previousMonth,\n nextMonth,\n selectedDate,\n disableDateRangePickers,\n setSelectedDate,\n setFromDateText,\n setFromDateError,\n setToDateError,\n setToDateText\n}: Props) => {\n const onDatePickerSelect = (date: Date | DateRange | undefined): void => {\n if (date) {\n setSelectedDate(date as DateRange);\n\n const fromDate = (date as DateRange).from;\n const toDate = (date as DateRange).to;\n\n if (fromDate) {\n setFromDateText(formatInputDate(fromDate));\n setFromDateError(\"\");\n }\n\n if (toDate) {\n setToDateText(formatInputDate(toDate));\n setToDateError(\"\");\n }\n }\n };\n
|
|
1
|
+
{"version":3,"file":"DateTimePickerCalendarSection.es.js","sources":["../../../../../src/components/DataGrid/DataGridFilters/DateTimePicker/DateTimePickerCalendarSection.tsx"],"sourcesContent":["/*\n * Copyright 2022 OneWelcome B.V.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport React, { useMemo } from \"react\";\nimport classes from \"./DateTimePicker.module.scss\";\nimport { DatePicker } from \"../../../DatePicker/DatePicker\";\nimport { IconButton } from \"../../../Button/IconButton\";\nimport { CustomComponents, DateRange, MonthCaptionProps, NavProps } from \"react-day-picker\";\nimport { formatInputDate, getMonthName, getYearFromDate } from \"./DateTimeService\";\nimport { Icon, Icons } from \"../../../Icon/Icon\";\nimport { Typography } from \"../../../Typography/Typography\";\n\ntype CalendarNavProps = NavProps & {\n previousMonthLabel: string;\n nextMonthLabel: string;\n disabled: boolean;\n};\n\nconst CalendarNav = ({\n onNextClick,\n onPreviousClick,\n previousMonthLabel,\n nextMonthLabel,\n disabled\n}: CalendarNavProps) => (\n <div className={classes[\"nav\"]}>\n <IconButton\n title={previousMonthLabel}\n onClick={onPreviousClick}\n className={classes[\"prev-button\"]}\n disabled={disabled}\n >\n <Icon size=\"0.75rem\" icon={Icons.ChevronLeft} />\n </IconButton>\n <IconButton\n title={nextMonthLabel}\n onClick={onNextClick}\n className={classes[\"next-button\"]}\n disabled={disabled}\n >\n <Icon size=\"0.75rem\" icon={Icons.ChevronRight} />\n </IconButton>\n </div>\n);\n\nconst CalendarMonthCaption = ({ calendarMonth }: MonthCaptionProps) => (\n <Typography className={classes[\"month-caption\"]} variant=\"body\">\n {getMonthName(calendarMonth.date)} {getYearFromDate(calendarMonth.date)}\n </Typography>\n);\n\nconst createCalendarComponents = (\n previousMonthLabel: string,\n nextMonthLabel: string,\n disabled: boolean\n): Partial<CustomComponents> => ({\n Nav: props => (\n <CalendarNav\n {...props}\n previousMonthLabel={previousMonthLabel}\n nextMonthLabel={nextMonthLabel}\n disabled={disabled}\n />\n ),\n MonthCaption: CalendarMonthCaption\n});\n\ntype Props = {\n previousMonth: string;\n nextMonth: string;\n selectedDate: DateRange | undefined;\n disableDateRangePickers: boolean;\n setSelectedDate: React.Dispatch<React.SetStateAction<DateRange>>;\n setFromDateText: React.Dispatch<React.SetStateAction<string>>;\n setToDateText: React.Dispatch<React.SetStateAction<string>>;\n setFromDateError: React.Dispatch<React.SetStateAction<string>>;\n setToDateError: React.Dispatch<React.SetStateAction<string>>;\n};\n\nexport const DateTimePickerCalendarSection = ({\n previousMonth,\n nextMonth,\n selectedDate,\n disableDateRangePickers,\n setSelectedDate,\n setFromDateText,\n setFromDateError,\n setToDateError,\n setToDateText\n}: Props) => {\n const onDatePickerSelect = (date: Date | DateRange | undefined): void => {\n if (date) {\n setSelectedDate(date as DateRange);\n\n const fromDate = (date as DateRange).from;\n const toDate = (date as DateRange).to;\n\n if (fromDate) {\n setFromDateText(formatInputDate(fromDate));\n setFromDateError(\"\");\n }\n\n if (toDate) {\n setToDateText(formatInputDate(toDate));\n setToDateError(\"\");\n }\n }\n };\n\n const components = useMemo(\n () => createCalendarComponents(previousMonth, nextMonth, disableDateRangePickers),\n [previousMonth, nextMonth, disableDateRangePickers]\n );\n\n return (\n <DatePicker\n onSelect={onDatePickerSelect}\n value={selectedDate}\n disabled={disableDateRangePickers}\n mode={\"range\"}\n components={components}\n numberOfMonths={2}\n />\n );\n};\n"],"names":[],"mappings":";;;;;;;AA+BA,MAAM,cAAc,CAAC;AAAA,EACnB;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,MACE,sBAAA,cAAC,OAAA,EAAI,WAAW,QAAQ,KAAK,KAC3B,sBAAA;AAAA,EAAC;AAAA,EAAA;AAAA,IACC,OAAO;AAAA,IACP,SAAS;AAAA,IACT,WAAW,QAAQ,aAAa;AAAA,IAChC;AAAA,EAAA;AAAA,sCAEC,MAAA,EAAK,MAAK,WAAU,MAAM,MAAM,YAAA,CAAa;AAChD,GACA,sBAAA;AAAA,EAAC;AAAA,EAAA;AAAA,IACC,OAAO;AAAA,IACP,SAAS;AAAA,IACT,WAAW,QAAQ,aAAa;AAAA,IAChC;AAAA,EAAA;AAAA,sCAEC,MAAA,EAAK,MAAK,WAAU,MAAM,MAAM,aAAA,CAAc;AACjD,CACF;AAGF,MAAM,uBAAuB,CAAC,EAAE,cAAA,MAC9B,sBAAA,cAAC,YAAA,EAAW,WAAW,QAAQ,eAAe,GAAG,SAAQ,OAAA,GACtD,aAAa,cAAc,IAAI,GAAE,KAAE,gBAAgB,cAAc,IAAI,CACxE;AAGF,MAAM,2BAA2B,CAC/B,oBACA,gBACA,cAC+B;AAAA,EAC/B,KAAK,CAAA,UACH,sBAAA;AAAA,IAAC;AAAA,IAAA;AAAA,MACE,GAAG;AAAA,MACJ;AAAA,MACA;AAAA,MACA;AAAA,IAAA;AAAA,EAAA;AAAA,EAGJ,cAAc;AAChB;AAcO,MAAM,gCAAgC,CAAC;AAAA,EAC5C;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,MAAa;AACX,QAAM,qBAAqB,CAAC,SAA6C;AACvE,QAAI,MAAM;AACR,sBAAgB,IAAiB;AAEjC,YAAM,WAAY,KAAmB;AACrC,YAAM,SAAU,KAAmB;AAEnC,UAAI,UAAU;AACZ,wBAAgB,gBAAgB,QAAQ,CAAC;AACzC,yBAAiB,EAAE;AAAA,MACrB;AAEA,UAAI,QAAQ;AACV,sBAAc,gBAAgB,MAAM,CAAC;AACrC,uBAAe,EAAE;AAAA,MACnB;AAAA,IACF;AAAA,EACF;AAEA,QAAM,aAAa;AAAA,IACjB,MAAM,yBAAyB,eAAe,WAAW,uBAAuB;AAAA,IAChF,CAAC,eAAe,WAAW,uBAAuB;AAAA,EAAA;AAGpD,SACE,sBAAA;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,UAAU;AAAA,MACV,OAAO;AAAA,MACP,UAAU;AAAA,MACV,MAAM;AAAA,MACN;AAAA,MACA,gBAAgB;AAAA,IAAA;AAAA,EAAA;AAGtB;"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react");exports.useFiltersReducer=t=>{const[r,a]=e.useReducer((e,t)=>{switch(t.type){case"add":return{...e,filters:[...e.filters,{...t.payload}]};case"edit":return{...e,filters:
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react");exports.useFiltersReducer=t=>{const[r,a]=e.useReducer((e,t)=>{switch(t.type){case"add":return{...e,filters:[...e.filters,{...t.payload}]};case"edit":return{...e,filters:e.filters.map(e=>e.id===t.payload.id?t.payload:e)};case"remove":return{...e,filters:e.filters.filter(e=>e.id!==t.payload.id)};case"reset":return{...e,filters:t.payload};case"clear":return{...e,filters:[]}}},{filters:t||[]});return{state:r,addFilter:e=>a({type:"add",payload:e}),deleteFilter:e=>a({type:"remove",payload:{id:e}}),editFilter:e=>a({type:"edit",payload:e}),resetFilters:e=>a({type:"reset",payload:e}),clearFilters:()=>a({type:"clear"})}};
|
|
2
2
|
//# sourceMappingURL=useFiltersReducer.cjs.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useFiltersReducer.cjs.js","sources":["../../../../src/components/DataGrid/DataGridFilters/useFiltersReducer.tsx"],"sourcesContent":["/*\n * Copyright 2022 OneWelcome B.V.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { useReducer } from \"react\";\nimport { Filter, FiltersAction, FiltersState } from \"./DataGridFilters.interfaces\";\n\nexport const useFiltersReducer = (filterValues: Filter[] | undefined) => {\n const filtersReducer = (state: FiltersState, action: FiltersAction): FiltersState => {\n switch (action.type) {\n case \"add\":\n return { ...state, filters: [...state.filters, { ...action.payload }] };\n case \"edit\":\n return {\n ...state,\n filters:
|
|
1
|
+
{"version":3,"file":"useFiltersReducer.cjs.js","sources":["../../../../src/components/DataGrid/DataGridFilters/useFiltersReducer.tsx"],"sourcesContent":["/*\n * Copyright 2022 OneWelcome B.V.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { useReducer } from \"react\";\nimport { Filter, FiltersAction, FiltersState } from \"./DataGridFilters.interfaces\";\n\nexport const useFiltersReducer = (filterValues: Filter[] | undefined) => {\n const filtersReducer = (state: FiltersState, action: FiltersAction): FiltersState => {\n switch (action.type) {\n case \"add\":\n return { ...state, filters: [...state.filters, { ...action.payload }] };\n case \"edit\":\n return {\n ...state,\n filters: state.filters.map(value => {\n if (value.id === action.payload.id) {\n return action.payload;\n }\n return value;\n })\n };\n case \"remove\":\n return {\n ...state,\n filters: state.filters.filter(value => value.id !== action.payload.id)\n };\n case \"reset\":\n return {\n ...state,\n filters: action.payload\n };\n case \"clear\":\n return { ...state, filters: [] };\n }\n };\n\n const [state, dispatch] = useReducer(filtersReducer, { filters: filterValues || [] });\n\n const addFilter = (filter: Filter) =>\n dispatch({\n type: \"add\",\n payload: filter\n });\n\n const editFilter = (filter: Filter) =>\n dispatch({\n type: \"edit\",\n payload: filter\n });\n\n const deleteFilter = (id: string) => dispatch({ type: \"remove\", payload: { id } });\n\n const resetFilters = (filters: Filter[]) => dispatch({ type: \"reset\", payload: filters });\n\n const clearFilters = () => dispatch({ type: \"clear\" });\n\n return { state, addFilter, deleteFilter, editFilter, resetFilters, clearFilters };\n};\n"],"names":["filterValues","state","dispatch","useReducer","action","type","filters","payload","map","value","id","filter","addFilter","deleteFilter","editFilter","resetFilters","clearFilters"],"mappings":"mIAmBkCA,IAChC,MA6BOC,EAAOC,GAAYC,EAAAA,WA7BH,CAACF,EAAqBG,KAC3C,OAAQA,EAAOC,MACb,IAAK,MACH,MAAO,IAAKJ,EAAOK,QAAS,IAAIL,EAAMK,QAAS,IAAKF,EAAOG,WAC7D,IAAK,OACH,MAAO,IACFN,EACHK,QAASL,EAAMK,QAAQE,IAAIC,GACrBA,EAAMC,KAAON,EAAOG,QAAQG,GACvBN,EAAOG,QAETE,IAGb,IAAK,SACH,MAAO,IACFR,EACHK,QAASL,EAAMK,QAAQK,UAAgBF,EAAMC,KAAON,EAAOG,QAAQG,KAEvE,IAAK,QACH,MAAO,IACFT,EACHK,QAASF,EAAOG,SAEpB,IAAK,QACH,MAAO,IAAKN,EAAOK,QAAS,MAImB,CAAEA,QAASN,GAAgB,KAoBhF,MAAO,CAAEC,QAAOW,UAlBGD,GACjBT,EAAS,CACPG,KAAM,MACNE,QAASI,IAecE,aANLH,GAAeR,EAAS,CAAEG,KAAM,SAAUE,QAAS,CAAEG,QAMlCI,WAZrBH,GAClBT,EAAS,CACPG,KAAM,OACNE,QAASI,IASwCI,aAJ/BT,GAAsBJ,EAAS,CAAEG,KAAM,QAASE,QAASD,IAIZU,aAF9C,IAAMd,EAAS,CAAEG,KAAM"}
|
|
@@ -7,19 +7,17 @@ const useFiltersReducer = (filterValues) => {
|
|
|
7
7
|
case "edit":
|
|
8
8
|
return {
|
|
9
9
|
...state2,
|
|
10
|
-
filters:
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
})
|
|
17
|
-
]
|
|
10
|
+
filters: state2.filters.map((value) => {
|
|
11
|
+
if (value.id === action.payload.id) {
|
|
12
|
+
return action.payload;
|
|
13
|
+
}
|
|
14
|
+
return value;
|
|
15
|
+
})
|
|
18
16
|
};
|
|
19
17
|
case "remove":
|
|
20
18
|
return {
|
|
21
19
|
...state2,
|
|
22
|
-
filters:
|
|
20
|
+
filters: state2.filters.filter((value) => value.id !== action.payload.id)
|
|
23
21
|
};
|
|
24
22
|
case "reset":
|
|
25
23
|
return {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useFiltersReducer.es.js","sources":["../../../../src/components/DataGrid/DataGridFilters/useFiltersReducer.tsx"],"sourcesContent":["/*\n * Copyright 2022 OneWelcome B.V.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { useReducer } from \"react\";\nimport { Filter, FiltersAction, FiltersState } from \"./DataGridFilters.interfaces\";\n\nexport const useFiltersReducer = (filterValues: Filter[] | undefined) => {\n const filtersReducer = (state: FiltersState, action: FiltersAction): FiltersState => {\n switch (action.type) {\n case \"add\":\n return { ...state, filters: [...state.filters, { ...action.payload }] };\n case \"edit\":\n return {\n ...state,\n filters:
|
|
1
|
+
{"version":3,"file":"useFiltersReducer.es.js","sources":["../../../../src/components/DataGrid/DataGridFilters/useFiltersReducer.tsx"],"sourcesContent":["/*\n * Copyright 2022 OneWelcome B.V.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { useReducer } from \"react\";\nimport { Filter, FiltersAction, FiltersState } from \"./DataGridFilters.interfaces\";\n\nexport const useFiltersReducer = (filterValues: Filter[] | undefined) => {\n const filtersReducer = (state: FiltersState, action: FiltersAction): FiltersState => {\n switch (action.type) {\n case \"add\":\n return { ...state, filters: [...state.filters, { ...action.payload }] };\n case \"edit\":\n return {\n ...state,\n filters: state.filters.map(value => {\n if (value.id === action.payload.id) {\n return action.payload;\n }\n return value;\n })\n };\n case \"remove\":\n return {\n ...state,\n filters: state.filters.filter(value => value.id !== action.payload.id)\n };\n case \"reset\":\n return {\n ...state,\n filters: action.payload\n };\n case \"clear\":\n return { ...state, filters: [] };\n }\n };\n\n const [state, dispatch] = useReducer(filtersReducer, { filters: filterValues || [] });\n\n const addFilter = (filter: Filter) =>\n dispatch({\n type: \"add\",\n payload: filter\n });\n\n const editFilter = (filter: Filter) =>\n dispatch({\n type: \"edit\",\n payload: filter\n });\n\n const deleteFilter = (id: string) => dispatch({ type: \"remove\", payload: { id } });\n\n const resetFilters = (filters: Filter[]) => dispatch({ type: \"reset\", payload: filters });\n\n const clearFilters = () => dispatch({ type: \"clear\" });\n\n return { state, addFilter, deleteFilter, editFilter, resetFilters, clearFilters };\n};\n"],"names":["state"],"mappings":";AAmBO,MAAM,oBAAoB,CAAC,iBAAuC;AACvE,QAAM,iBAAiB,CAACA,QAAqB,WAAwC;AACnF,YAAQ,OAAO,MAAA;AAAA,MACb,KAAK;AACH,eAAO,EAAE,GAAGA,QAAO,SAAS,CAAC,GAAGA,OAAM,SAAS,EAAE,GAAG,OAAO,QAAA,CAAS,EAAA;AAAA,MACtE,KAAK;AACH,eAAO;AAAA,UACL,GAAGA;AAAAA,UACH,SAASA,OAAM,QAAQ,IAAI,CAAA,UAAS;AAClC,gBAAI,MAAM,OAAO,OAAO,QAAQ,IAAI;AAClC,qBAAO,OAAO;AAAA,YAChB;AACA,mBAAO;AAAA,UACT,CAAC;AAAA,QAAA;AAAA,MAEL,KAAK;AACH,eAAO;AAAA,UACL,GAAGA;AAAAA,UACH,SAASA,OAAM,QAAQ,OAAO,WAAS,MAAM,OAAO,OAAO,QAAQ,EAAE;AAAA,QAAA;AAAA,MAEzE,KAAK;AACH,eAAO;AAAA,UACL,GAAGA;AAAAA,UACH,SAAS,OAAO;AAAA,QAAA;AAAA,MAEpB,KAAK;AACH,eAAO,EAAE,GAAGA,QAAO,SAAS,GAAC;AAAA,IAAE;AAAA,EAErC;AAEA,QAAM,CAAC,OAAO,QAAQ,IAAI,WAAW,gBAAgB,EAAE,SAAS,gBAAgB,CAAA,GAAI;AAEpF,QAAM,YAAY,CAAC,WACjB,SAAS;AAAA,IACP,MAAM;AAAA,IACN,SAAS;AAAA,EAAA,CACV;AAEH,QAAM,aAAa,CAAC,WAClB,SAAS;AAAA,IACP,MAAM;AAAA,IACN,SAAS;AAAA,EAAA,CACV;AAEH,QAAM,eAAe,CAAC,OAAe,SAAS,EAAE,MAAM,UAAU,SAAS,EAAE,GAAA,GAAM;AAEjF,QAAM,eAAe,CAAC,YAAsB,SAAS,EAAE,MAAM,SAAS,SAAS,SAAS;AAExF,QAAM,eAAe,MAAM,SAAS,EAAE,MAAM,SAAS;AAErD,SAAO,EAAE,OAAO,WAAW,cAAc,YAAY,cAAc,aAAA;AACrE;"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react"),t=require("./DataGridHeaderCell.cjs.js"),n=require("./DataGridHeader.module.scss.cjs.js"),a=[void 0,"ASC","DESC"],i=e.forwardRef(({initialSort:i,onSort:l,headers:r,disableContextMenuColumn:d,enableExpandableRow:o,enableNestedRows:s,enableMultiSorting:c,enableSortDropdown:u,spacing:m,sticky:g,className:f,...p},h)=>{const[S,b]=e.useState(i??[]);e.useEffect(()=>{b(i??[])},[i]);const v=e=>{const t=(e=>{const t=S.find(t=>t.name===e),n=c?S.filter(t=>t.name!==e):[],i=(e=>{const t=a.indexOf(e);return a[t+1%a.length]})(null==t?void 0:t.direction);return i?[{name:e,direction:i},...n]:n})(e);null==l||l(t),b(t)},y=(e,t)=>{const n=c?S.filter(t=>t.name!==e):[],a=t?[{name:e,direction:t},...n]:n;null==l||l(a),b(a)},x=r.map((n,a)=>{if(n.hidden)return null;const i={textAlign:n.align??"left"};0===a&&(i.paddingLeft=null==m?void 0:m.paddingLeft),a===r.length-1&&d&&(i.paddingRight=null==m?void 0:m.paddingRight);const o=S.find(e=>e.name===n.name),s=u??!1;return e.createElement(t.DataGridHeaderCell,{key:n.name,name:n.name,headline:n.headline,headlineContent:n.headlineContent,disableSorting:n.disableSorting??!l,onSort:v,onDirectSort:y,activeSortDirection:null==o?void 0:o.direction,enableSortDropdown:s,columnType:n.columnType,style:i})}),D=[g?n.default.sticky:void 0,f].filter(Boolean).join(" ")||void 0;return e.createElement("thead",{...p,ref:h,className:D},e.createElement("tr",{className:n.default.row},o&&e.createElement("td",{style:{paddingRight:null==m?void 0:m.paddingRight},"aria-label":"expandable row"}),x,!d&&e.createElement("td",{style:{paddingRight:null==m?void 0:m.paddingRight},"aria-label":"context menu",className:n.default["context-menu"]})))});exports.DataGridHeader=i;
|
|
2
2
|
//# sourceMappingURL=DataGridHeader.cjs.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DataGridHeader.cjs.js","sources":["../../../../src/components/DataGrid/DataGridHeader/DataGridHeader.tsx"],"sourcesContent":["/*\n * Copyright 2022 OneWelcome B.V.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport React, { ForwardRefRenderFunction, ComponentPropsWithRef, useEffect, useState } from \"react\";\nimport { Direction, HeaderCell, OnSortFunction, Sort } from \"../datagrid.interfaces\";\nimport { DataGridHeaderCell } from \"./DataGridHeaderCell\";\nimport classes from \"./DataGridHeader.module.scss\";\n\nexport interface Props extends ComponentPropsWithRef<\"thead\"> {\n headers: HeaderCell[];\n initialSort?: Sort;\n onSort?: OnSortFunction;\n enableExpandableRow?: boolean;\n enableNestedRows?: boolean;\n disableContextMenuColumn?: boolean;\n enableMultiSorting?: boolean;\n enableSortDropdown?: boolean;\n spacing?: React.CSSProperties;\n}\n\nconst sortingStates = [undefined, \"ASC\", \"DESC\"] as (Direction | undefined)[];\n\nconst DataGridHeaderComponent: ForwardRefRenderFunction<HTMLTableSectionElement, Props> = (\n {\n initialSort,\n onSort,\n headers,\n disableContextMenuColumn,\n enableExpandableRow,\n enableNestedRows,\n enableMultiSorting,\n enableSortDropdown,\n spacing,\n ...rest\n }: Props,\n ref\n) => {\n const [sortList, setSortList] = useState(initialSort ?? []);\n\n useEffect(() => {\n setSortList(initialSort ?? []);\n }, [initialSort]);\n\n const calculateNextSortState = (direction?: Direction) => {\n const currentDirectionIdx = sortingStates.
|
|
1
|
+
{"version":3,"file":"DataGridHeader.cjs.js","sources":["../../../../src/components/DataGrid/DataGridHeader/DataGridHeader.tsx"],"sourcesContent":["/*\n * Copyright 2022 OneWelcome B.V.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport React, { ForwardRefRenderFunction, ComponentPropsWithRef, useEffect, useState } from \"react\";\nimport { Direction, HeaderCell, OnSortFunction, Sort } from \"../datagrid.interfaces\";\nimport { DataGridHeaderCell } from \"./DataGridHeaderCell\";\nimport classes from \"./DataGridHeader.module.scss\";\n\nexport interface Props extends ComponentPropsWithRef<\"thead\"> {\n headers: HeaderCell[];\n initialSort?: Sort;\n onSort?: OnSortFunction;\n enableExpandableRow?: boolean;\n enableNestedRows?: boolean;\n disableContextMenuColumn?: boolean;\n enableMultiSorting?: boolean;\n enableSortDropdown?: boolean;\n spacing?: React.CSSProperties;\n sticky?: boolean;\n}\n\nconst sortingStates = [undefined, \"ASC\", \"DESC\"] as (Direction | undefined)[];\n\nconst DataGridHeaderComponent: ForwardRefRenderFunction<HTMLTableSectionElement, Props> = (\n {\n initialSort,\n onSort,\n headers,\n disableContextMenuColumn,\n enableExpandableRow,\n enableNestedRows,\n enableMultiSorting,\n enableSortDropdown,\n spacing,\n sticky,\n className,\n ...rest\n }: Props,\n ref\n) => {\n const [sortList, setSortList] = useState(initialSort ?? []);\n\n useEffect(() => {\n setSortList(initialSort ?? []);\n }, [initialSort]);\n\n const calculateNextSortState = (direction?: Direction) => {\n const currentDirectionIdx = sortingStates.indexOf(direction);\n return sortingStates[currentDirectionIdx + (1 % sortingStates.length)];\n };\n\n /**\n * The sortList contains sorting columns objects. The order of those objects determines priorities of sorting.\n * Last modified sorting column has the highest priority.\n */\n const updateSortList = (name: string): Sort => {\n const current = sortList.find(item => item.name === name);\n const restSortList = enableMultiSorting ? sortList.filter(item => item.name !== name) : [];\n const newSortDirection = calculateNextSortState(current?.direction);\n return newSortDirection\n ? [{ name, direction: newSortDirection }, ...restSortList]\n : restSortList;\n };\n\n const wrapOnSort = (name: string) => {\n const newSort = updateSortList(name);\n onSort?.(newSort);\n setSortList(newSort);\n };\n\n const wrapOnDirectSort = (name: string, direction?: Direction) => {\n const restSortList = enableMultiSorting ? sortList.filter(item => item.name !== name) : [];\n const newSort = direction ? [{ name, direction }, ...restSortList] : restSortList;\n onSort?.(newSort);\n setSortList(newSort);\n };\n\n const headerCells = headers.map((header, index) => {\n if (header.hidden) {\n return null;\n }\n\n const headerStyle: React.CSSProperties = {\n textAlign: header.align ?? \"left\"\n };\n\n if (index === 0) {\n headerStyle.paddingLeft = spacing?.paddingLeft;\n }\n if (index === headers.length - 1 && disableContextMenuColumn) {\n headerStyle.paddingRight = spacing?.paddingRight;\n }\n\n const sort = sortList.find(item => item.name === header.name);\n const shouldEnableDropdown = enableSortDropdown ?? false;\n return (\n <DataGridHeaderCell\n key={header.name}\n name={header.name}\n headline={header.headline}\n headlineContent={header.headlineContent}\n disableSorting={header.disableSorting ?? !onSort}\n onSort={wrapOnSort}\n onDirectSort={wrapOnDirectSort}\n activeSortDirection={sort?.direction}\n enableSortDropdown={shouldEnableDropdown}\n columnType={header.columnType}\n style={headerStyle}\n />\n );\n });\n\n const theadClassName =\n [sticky ? classes[\"sticky\"] : undefined, className].filter(Boolean).join(\" \") || undefined;\n\n return (\n <thead {...rest} ref={ref} className={theadClassName}>\n <tr className={classes[\"row\"]}>\n {enableExpandableRow && (\n <td style={{ paddingRight: spacing?.paddingRight }} aria-label=\"expandable row\"></td>\n )}\n {headerCells}\n {!disableContextMenuColumn && (\n <td\n style={{ paddingRight: spacing?.paddingRight }}\n aria-label=\"context menu\"\n className={classes[\"context-menu\"]}\n ></td>\n )}\n </tr>\n </thead>\n );\n};\n\nexport const DataGridHeader = React.forwardRef(DataGridHeaderComponent);\n"],"names":["sortingStates","DataGridHeader","React","forwardRef","initialSort","onSort","headers","disableContextMenuColumn","enableExpandableRow","enableNestedRows","enableMultiSorting","enableSortDropdown","spacing","sticky","className","rest","ref","sortList","setSortList","useState","useEffect","wrapOnSort","name","newSort","current","find","item","restSortList","filter","newSortDirection","direction","currentDirectionIdx","indexOf","length","calculateNextSortState","updateSortList","wrapOnDirectSort","headerCells","map","header","index","hidden","headerStyle","textAlign","align","paddingLeft","paddingRight","sort","shouldEnableDropdown","createElement","DataGridHeaderCell","key","headline","headlineContent","disableSorting","onDirectSort","activeSortDirection","columnType","style","theadClassName","classes","Boolean","join"],"mappings":"mMAkCMA,EAAgB,MAAC,EAAW,MAAO,QAiH5BC,EAAiBC,EAAMC,WA/GsD,EAEtFC,cACAC,SACAC,UACAC,2BACAC,sBACAC,mBACAC,qBACAC,qBACAC,UACAC,SACAC,eACGC,GAELC,KAEA,MAAOC,EAAUC,GAAeC,EAAAA,SAASf,GAAe,IAExDgB,EAAAA,UAAU,KACRF,EAAYd,GAAe,KAC1B,CAACA,IAEJ,MAkBMiB,EAAcC,IAClB,MAAMC,EAVe,CAACD,IACtB,MAAME,EAAUP,EAASQ,KAAKC,GAAQA,EAAKJ,OAASA,GAC9CK,EAAejB,EAAqBO,EAASW,UAAeF,EAAKJ,OAASA,GAAQ,GAClFO,EAZuB,CAACC,IAC9B,MAAMC,EAAsB/B,EAAcgC,QAAQF,GAClD,OAAO9B,EAAc+B,EAAuB,EAAI/B,EAAciC,SAUrCC,CAAuB,MAAAV,OAAA,EAAAA,EAASM,WACzD,OAAOD,EACH,CAAC,CAAEP,OAAMQ,UAAWD,MAAuBF,GAC3CA,GAIYQ,CAAeb,GAC/B,MAAAjB,GAAAA,EAASkB,GACTL,EAAYK,IAGRa,EAAmB,CAACd,EAAcQ,KACtC,MAAMH,EAAejB,EAAqBO,EAASW,UAAeF,EAAKJ,OAASA,GAAQ,GAClFC,EAAUO,EAAY,CAAC,CAAER,OAAMQ,gBAAgBH,GAAgBA,EACrE,MAAAtB,GAAAA,EAASkB,GACTL,EAAYK,IAGRc,EAAc/B,EAAQgC,IAAI,CAACC,EAAQC,KACvC,GAAID,EAAOE,OACT,OAAO,KAGT,MAAMC,EAAmC,CACvCC,UAAWJ,EAAOK,OAAS,QAGf,IAAVJ,IACFE,EAAYG,YAAc,MAAAjC,OAAA,EAAAA,EAASiC,aAEjCL,IAAUlC,EAAQ2B,OAAS,GAAK1B,IAClCmC,EAAYI,aAAe,MAAAlC,OAAA,EAAAA,EAASkC,cAGtC,MAAMC,EAAO9B,EAASQ,QAAaC,EAAKJ,OAASiB,EAAOjB,MAClD0B,EAAuBrC,IAAsB,EACnD,OACET,EAAA+C,cAACC,EAAAA,mBAAA,CACCC,IAAKZ,EAAOjB,KACZA,KAAMiB,EAAOjB,KACb8B,SAAUb,EAAOa,SACjBC,gBAAiBd,EAAOc,gBACxBC,eAAgBf,EAAOe,iBAAmBjD,EAC1CA,OAAQgB,EACRkC,aAAcnB,EACdoB,oBAAqB,MAAAT,OAAA,EAAAA,EAAMjB,UAC3BnB,mBAAoBqC,EACpBS,WAAYlB,EAAOkB,WACnBC,MAAOhB,MAKPiB,EACJ,CAAC9C,EAAS+C,EAAAA,QAAgB,YAAI,EAAW9C,GAAWc,OAAOiC,SAASC,KAAK,WAAQ,EAEnF,SACEb,cAAC,QAAA,IAAUlC,EAAMC,MAAUF,UAAW6C,KACpCV,cAAC,KAAA,CAAGnC,UAAW8C,EAAAA,QAAa,KACzBpD,KACCyC,cAAC,KAAA,CAAGS,MAAO,CAAEZ,aAAc,MAAAlC,OAAA,EAAAA,EAASkC,cAAgB,aAAW,mBAEhET,GACC9B,GACAL,EAAA+C,cAAC,KAAA,CACCS,MAAO,CAAEZ,aAAc,MAAAlC,OAAA,EAAAA,EAASkC,cAChC,aAAW,eACXhC,UAAW8C,EAAAA,QAAQ"}
|
|
@@ -12,6 +12,8 @@ const DataGridHeaderComponent = ({
|
|
|
12
12
|
enableMultiSorting,
|
|
13
13
|
enableSortDropdown,
|
|
14
14
|
spacing,
|
|
15
|
+
sticky,
|
|
16
|
+
className,
|
|
15
17
|
...rest
|
|
16
18
|
}, ref) => {
|
|
17
19
|
const [sortList, setSortList] = useState(initialSort ?? []);
|
|
@@ -19,7 +21,7 @@ const DataGridHeaderComponent = ({
|
|
|
19
21
|
setSortList(initialSort ?? []);
|
|
20
22
|
}, [initialSort]);
|
|
21
23
|
const calculateNextSortState = (direction) => {
|
|
22
|
-
const currentDirectionIdx = sortingStates.
|
|
24
|
+
const currentDirectionIdx = sortingStates.indexOf(direction);
|
|
23
25
|
return sortingStates[currentDirectionIdx + 1 % sortingStates.length];
|
|
24
26
|
};
|
|
25
27
|
const updateSortList = (name) => {
|
|
@@ -71,7 +73,8 @@ const DataGridHeaderComponent = ({
|
|
|
71
73
|
}
|
|
72
74
|
);
|
|
73
75
|
});
|
|
74
|
-
|
|
76
|
+
const theadClassName = [sticky ? classes["sticky"] : void 0, className].filter(Boolean).join(" ") || void 0;
|
|
77
|
+
return /* @__PURE__ */ React.createElement("thead", { ...rest, ref, className: theadClassName }, /* @__PURE__ */ React.createElement("tr", { className: classes["row"] }, enableExpandableRow && /* @__PURE__ */ React.createElement("td", { style: { paddingRight: spacing == null ? void 0 : spacing.paddingRight }, "aria-label": "expandable row" }), headerCells, !disableContextMenuColumn && /* @__PURE__ */ React.createElement(
|
|
75
78
|
"td",
|
|
76
79
|
{
|
|
77
80
|
style: { paddingRight: spacing == null ? void 0 : spacing.paddingRight },
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DataGridHeader.es.js","sources":["../../../../src/components/DataGrid/DataGridHeader/DataGridHeader.tsx"],"sourcesContent":["/*\n * Copyright 2022 OneWelcome B.V.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport React, { ForwardRefRenderFunction, ComponentPropsWithRef, useEffect, useState } from \"react\";\nimport { Direction, HeaderCell, OnSortFunction, Sort } from \"../datagrid.interfaces\";\nimport { DataGridHeaderCell } from \"./DataGridHeaderCell\";\nimport classes from \"./DataGridHeader.module.scss\";\n\nexport interface Props extends ComponentPropsWithRef<\"thead\"> {\n headers: HeaderCell[];\n initialSort?: Sort;\n onSort?: OnSortFunction;\n enableExpandableRow?: boolean;\n enableNestedRows?: boolean;\n disableContextMenuColumn?: boolean;\n enableMultiSorting?: boolean;\n enableSortDropdown?: boolean;\n spacing?: React.CSSProperties;\n}\n\nconst sortingStates = [undefined, \"ASC\", \"DESC\"] as (Direction | undefined)[];\n\nconst DataGridHeaderComponent: ForwardRefRenderFunction<HTMLTableSectionElement, Props> = (\n {\n initialSort,\n onSort,\n headers,\n disableContextMenuColumn,\n enableExpandableRow,\n enableNestedRows,\n enableMultiSorting,\n enableSortDropdown,\n spacing,\n ...rest\n }: Props,\n ref\n) => {\n const [sortList, setSortList] = useState(initialSort ?? []);\n\n useEffect(() => {\n setSortList(initialSort ?? []);\n }, [initialSort]);\n\n const calculateNextSortState = (direction?: Direction) => {\n const currentDirectionIdx = sortingStates.
|
|
1
|
+
{"version":3,"file":"DataGridHeader.es.js","sources":["../../../../src/components/DataGrid/DataGridHeader/DataGridHeader.tsx"],"sourcesContent":["/*\n * Copyright 2022 OneWelcome B.V.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport React, { ForwardRefRenderFunction, ComponentPropsWithRef, useEffect, useState } from \"react\";\nimport { Direction, HeaderCell, OnSortFunction, Sort } from \"../datagrid.interfaces\";\nimport { DataGridHeaderCell } from \"./DataGridHeaderCell\";\nimport classes from \"./DataGridHeader.module.scss\";\n\nexport interface Props extends ComponentPropsWithRef<\"thead\"> {\n headers: HeaderCell[];\n initialSort?: Sort;\n onSort?: OnSortFunction;\n enableExpandableRow?: boolean;\n enableNestedRows?: boolean;\n disableContextMenuColumn?: boolean;\n enableMultiSorting?: boolean;\n enableSortDropdown?: boolean;\n spacing?: React.CSSProperties;\n sticky?: boolean;\n}\n\nconst sortingStates = [undefined, \"ASC\", \"DESC\"] as (Direction | undefined)[];\n\nconst DataGridHeaderComponent: ForwardRefRenderFunction<HTMLTableSectionElement, Props> = (\n {\n initialSort,\n onSort,\n headers,\n disableContextMenuColumn,\n enableExpandableRow,\n enableNestedRows,\n enableMultiSorting,\n enableSortDropdown,\n spacing,\n sticky,\n className,\n ...rest\n }: Props,\n ref\n) => {\n const [sortList, setSortList] = useState(initialSort ?? []);\n\n useEffect(() => {\n setSortList(initialSort ?? []);\n }, [initialSort]);\n\n const calculateNextSortState = (direction?: Direction) => {\n const currentDirectionIdx = sortingStates.indexOf(direction);\n return sortingStates[currentDirectionIdx + (1 % sortingStates.length)];\n };\n\n /**\n * The sortList contains sorting columns objects. The order of those objects determines priorities of sorting.\n * Last modified sorting column has the highest priority.\n */\n const updateSortList = (name: string): Sort => {\n const current = sortList.find(item => item.name === name);\n const restSortList = enableMultiSorting ? sortList.filter(item => item.name !== name) : [];\n const newSortDirection = calculateNextSortState(current?.direction);\n return newSortDirection\n ? [{ name, direction: newSortDirection }, ...restSortList]\n : restSortList;\n };\n\n const wrapOnSort = (name: string) => {\n const newSort = updateSortList(name);\n onSort?.(newSort);\n setSortList(newSort);\n };\n\n const wrapOnDirectSort = (name: string, direction?: Direction) => {\n const restSortList = enableMultiSorting ? sortList.filter(item => item.name !== name) : [];\n const newSort = direction ? [{ name, direction }, ...restSortList] : restSortList;\n onSort?.(newSort);\n setSortList(newSort);\n };\n\n const headerCells = headers.map((header, index) => {\n if (header.hidden) {\n return null;\n }\n\n const headerStyle: React.CSSProperties = {\n textAlign: header.align ?? \"left\"\n };\n\n if (index === 0) {\n headerStyle.paddingLeft = spacing?.paddingLeft;\n }\n if (index === headers.length - 1 && disableContextMenuColumn) {\n headerStyle.paddingRight = spacing?.paddingRight;\n }\n\n const sort = sortList.find(item => item.name === header.name);\n const shouldEnableDropdown = enableSortDropdown ?? false;\n return (\n <DataGridHeaderCell\n key={header.name}\n name={header.name}\n headline={header.headline}\n headlineContent={header.headlineContent}\n disableSorting={header.disableSorting ?? !onSort}\n onSort={wrapOnSort}\n onDirectSort={wrapOnDirectSort}\n activeSortDirection={sort?.direction}\n enableSortDropdown={shouldEnableDropdown}\n columnType={header.columnType}\n style={headerStyle}\n />\n );\n });\n\n const theadClassName =\n [sticky ? classes[\"sticky\"] : undefined, className].filter(Boolean).join(\" \") || undefined;\n\n return (\n <thead {...rest} ref={ref} className={theadClassName}>\n <tr className={classes[\"row\"]}>\n {enableExpandableRow && (\n <td style={{ paddingRight: spacing?.paddingRight }} aria-label=\"expandable row\"></td>\n )}\n {headerCells}\n {!disableContextMenuColumn && (\n <td\n style={{ paddingRight: spacing?.paddingRight }}\n aria-label=\"context menu\"\n className={classes[\"context-menu\"]}\n ></td>\n )}\n </tr>\n </thead>\n );\n};\n\nexport const DataGridHeader = React.forwardRef(DataGridHeaderComponent);\n"],"names":[],"mappings":";;;AAkCA,MAAM,gBAAgB,CAAC,QAAW,OAAO,MAAM;AAE/C,MAAM,0BAAoF,CACxF;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA,GAAG;AACL,GACA,QACG;AACH,QAAM,CAAC,UAAU,WAAW,IAAI,SAAS,eAAe,CAAA,CAAE;AAE1D,YAAU,MAAM;AACd,gBAAY,eAAe,EAAE;AAAA,EAC/B,GAAG,CAAC,WAAW,CAAC;AAEhB,QAAM,yBAAyB,CAAC,cAA0B;AACxD,UAAM,sBAAsB,cAAc,QAAQ,SAAS;AAC3D,WAAO,cAAc,sBAAuB,IAAI,cAAc,MAAO;AAAA,EACvE;AAMA,QAAM,iBAAiB,CAAC,SAAuB;AAC7C,UAAM,UAAU,SAAS,KAAK,CAAA,SAAQ,KAAK,SAAS,IAAI;AACxD,UAAM,eAAe,qBAAqB,SAAS,OAAO,UAAQ,KAAK,SAAS,IAAI,IAAI,CAAA;AACxF,UAAM,mBAAmB,uBAAuB,mCAAS,SAAS;AAClE,WAAO,mBACH,CAAC,EAAE,MAAM,WAAW,oBAAoB,GAAG,YAAY,IACvD;AAAA,EACN;AAEA,QAAM,aAAa,CAAC,SAAiB;AACnC,UAAM,UAAU,eAAe,IAAI;AACnC,qCAAS;AACT,gBAAY,OAAO;AAAA,EACrB;AAEA,QAAM,mBAAmB,CAAC,MAAc,cAA0B;AAChE,UAAM,eAAe,qBAAqB,SAAS,OAAO,UAAQ,KAAK,SAAS,IAAI,IAAI,CAAA;AACxF,UAAM,UAAU,YAAY,CAAC,EAAE,MAAM,aAAa,GAAG,YAAY,IAAI;AACrE,qCAAS;AACT,gBAAY,OAAO;AAAA,EACrB;AAEA,QAAM,cAAc,QAAQ,IAAI,CAAC,QAAQ,UAAU;AACjD,QAAI,OAAO,QAAQ;AACjB,aAAO;AAAA,IACT;AAEA,UAAM,cAAmC;AAAA,MACvC,WAAW,OAAO,SAAS;AAAA,IAAA;AAG7B,QAAI,UAAU,GAAG;AACf,kBAAY,cAAc,mCAAS;AAAA,IACrC;AACA,QAAI,UAAU,QAAQ,SAAS,KAAK,0BAA0B;AAC5D,kBAAY,eAAe,mCAAS;AAAA,IACtC;AAEA,UAAM,OAAO,SAAS,KAAK,UAAQ,KAAK,SAAS,OAAO,IAAI;AAC5D,UAAM,uBAAuB,sBAAsB;AACnD,WACE,sBAAA;AAAA,MAAC;AAAA,MAAA;AAAA,QACC,KAAK,OAAO;AAAA,QACZ,MAAM,OAAO;AAAA,QACb,UAAU,OAAO;AAAA,QACjB,iBAAiB,OAAO;AAAA,QACxB,gBAAgB,OAAO,kBAAkB,CAAC;AAAA,QAC1C,QAAQ;AAAA,QACR,cAAc;AAAA,QACd,qBAAqB,6BAAM;AAAA,QAC3B,oBAAoB;AAAA,QACpB,YAAY,OAAO;AAAA,QACnB,OAAO;AAAA,MAAA;AAAA,IAAA;AAAA,EAGb,CAAC;AAED,QAAM,iBACJ,CAAC,SAAS,QAAQ,QAAQ,IAAI,QAAW,SAAS,EAAE,OAAO,OAAO,EAAE,KAAK,GAAG,KAAK;AAEnF,SACE,sBAAA,cAAC,SAAA,EAAO,GAAG,MAAM,KAAU,WAAW,eAAA,GACpC,sBAAA,cAAC,MAAA,EAAG,WAAW,QAAQ,KAAK,EAAA,GACzB,uBACC,sBAAA,cAAC,MAAA,EAAG,OAAO,EAAE,cAAc,mCAAS,aAAA,GAAgB,cAAW,kBAAiB,GAEjF,aACA,CAAC,4BACA,sBAAA;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,OAAO,EAAE,cAAc,mCAAS,aAAA;AAAA,MAChC,cAAW;AAAA,MACX,WAAW,QAAQ,cAAc;AAAA,IAAA;AAAA,EAAA,CAGvC,CACF;AAEJ;AAEO,MAAM,iBAAiB,MAAM,WAAW,uBAAuB;"}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
!function(){"use strict";try{if("undefined"!=typeof document){var e=document.createElement("style");e.appendChild(document.createTextNode('/*!\n * Copyright 2022 OneWelcome B.V.\n *\n * Licensed under the Apache License, Version 2.0 (the "License");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an "AS IS" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */.
|
|
2
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e="
|
|
1
|
+
!function(){"use strict";try{if("undefined"!=typeof document){var e=document.createElement("style");e.appendChild(document.createTextNode('/*!\n * Copyright 2022 OneWelcome B.V.\n *\n * Licensed under the Apache License, Version 2.0 (the "License");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an "AS IS" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */.DataGridHeader_row_PX3IM{height:3.25rem;background-color:var(--color-blue-grey25);position:relative;border-top:2px solid var(--light-grey-border)}.DataGridHeader_row_PX3IM:after{content:"";position:absolute;width:100%;left:0;bottom:0;border-bottom:2px solid var(--light-grey-border)}.DataGridHeader_context-menu_PX3IM{width:2.5rem;box-sizing:border-box}.DataGridHeader_sticky_PX3IM th,.DataGridHeader_sticky_PX3IM td{position:sticky;top:var(--sticky-stack-offset, -1px);z-index:2;background-color:var(--color-blue-grey25);box-shadow:inset 0 2px 0 var(--light-grey-border),inset 0 -2px 0 var(--light-grey-border)}')),document.head.appendChild(e)}}catch(t){console.error("vite-plugin-css-injected-by-js",t)}}();
|
|
2
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e="DataGridHeader_row_PX3IM",t="DataGridHeader_sticky_PX3IM",r={row:e,"context-menu":"DataGridHeader_context-menu_PX3IM",sticky:t};exports.default=r,exports.row=e,exports.sticky=t;
|
|
3
3
|
//# sourceMappingURL=DataGridHeader.module.scss.cjs.js.map
|
|
@@ -1,11 +1,14 @@
|
|
|
1
|
-
!function(){"use strict";try{if("undefined"!=typeof document){var e=document.createElement("style");e.appendChild(document.createTextNode('/*!\n * Copyright 2022 OneWelcome B.V.\n *\n * Licensed under the Apache License, Version 2.0 (the "License");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an "AS IS" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */.
|
|
2
|
-
const row = "
|
|
1
|
+
!function(){"use strict";try{if("undefined"!=typeof document){var e=document.createElement("style");e.appendChild(document.createTextNode('/*!\n * Copyright 2022 OneWelcome B.V.\n *\n * Licensed under the Apache License, Version 2.0 (the "License");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an "AS IS" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */.DataGridHeader_row_PX3IM{height:3.25rem;background-color:var(--color-blue-grey25);position:relative;border-top:2px solid var(--light-grey-border)}.DataGridHeader_row_PX3IM:after{content:"";position:absolute;width:100%;left:0;bottom:0;border-bottom:2px solid var(--light-grey-border)}.DataGridHeader_context-menu_PX3IM{width:2.5rem;box-sizing:border-box}.DataGridHeader_sticky_PX3IM th,.DataGridHeader_sticky_PX3IM td{position:sticky;top:var(--sticky-stack-offset, -1px);z-index:2;background-color:var(--color-blue-grey25);box-shadow:inset 0 2px 0 var(--light-grey-border),inset 0 -2px 0 var(--light-grey-border)}')),document.head.appendChild(e)}}catch(t){console.error("vite-plugin-css-injected-by-js",t)}}();
|
|
2
|
+
const row = "DataGridHeader_row_PX3IM";
|
|
3
|
+
const sticky = "DataGridHeader_sticky_PX3IM";
|
|
3
4
|
const classes = {
|
|
4
5
|
row,
|
|
5
|
-
"context-menu": "DataGridHeader_context-
|
|
6
|
+
"context-menu": "DataGridHeader_context-menu_PX3IM",
|
|
7
|
+
sticky
|
|
6
8
|
};
|
|
7
9
|
export {
|
|
8
10
|
classes as default,
|
|
9
|
-
row
|
|
11
|
+
row,
|
|
12
|
+
sticky
|
|
10
13
|
};
|
|
11
14
|
//# sourceMappingURL=DataGridHeader.module.scss.es.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DataGridHeader.module.scss.es.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"DataGridHeader.module.scss.es.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DataGridHeaderCell.cjs.js","sources":["../../../../src/components/DataGrid/DataGridHeader/DataGridHeaderCell.tsx"],"sourcesContent":["/*\n * Copyright 2022 OneWelcome B.V.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport React, { ForwardRefRenderFunction, ComponentPropsWithRef, Fragment, ReactNode } from \"react\";\nimport { Icon, Icons } from \"../../Icon/Icon\";\nimport { Direction } from \"../datagrid.interfaces\";\nimport { ContextMenu } from \"../../ContextMenu/ContextMenu\";\nimport { ContextMenuItem } from \"../../ContextMenu/ContextMenuItem\";\nimport classes from \"./DataGridHeaderCell.module.scss\";\nimport sortingIcon from \"../assets/sorting.png\";\n\nexport interface Props extends ComponentPropsWithRef<\"th\"> {\n headline: string;\n headlineContent?: ReactNode;\n name: string;\n disableSorting?: boolean;\n activeSortDirection?: Direction;\n onSort?: (name: string) => void;\n onDirectSort?: (name: string, direction?: Direction) => void;\n enableSortDropdown?: boolean;\n columnType?: \"text\" | \"date\" | \"number\";\n}\n\nconst ariaSortMapping = {\n ASC: \"ascending\",\n DESC: \"descending\"\n} as const;\n\nconst DataGridHeaderCellComponent: ForwardRefRenderFunction<HTMLTableCellElement, Props> = (\n {\n headline,\n headlineContent,\n name,\n disableSorting,\n activeSortDirection,\n onSort,\n onDirectSort,\n enableSortDropdown,\n columnType,\n ...rest\n }: Props,\n ref\n) => {\n const onCellClick = () => {\n onSort?.(name);\n };\n\n const handleDirectSort = (direction?: Direction) => {\n onDirectSort?.(name, direction);\n };\n\n const getSortText = () => {\n switch (columnType) {\n case \"text\":\n return {\n desc: \"Descending (Z-A)\",\n asc: \"Ascending (A-Z)\"\n };\n case \"number\":\n return {\n desc: \"Descending (9-0)\",\n asc: \"Ascending (0-9)\"\n };\n case \"date\":\n return {\n desc: \"Newest to oldest\",\n asc: \"Oldest to newest\"\n };\n default:\n return {\n desc: \"Descending\",\n asc: \"Ascending\"\n };\n }\n };\n\n const sortingIndicator = () => {\n if (enableSortDropdown) {\n // Show directional arrow when sorted, plus sorting icon\n return (\n <Fragment>\n {activeSortDirection && (\n <Icon\n className={\n activeSortDirection === \"ASC\" ? classes[\"ascending\"] : classes[\"descending\"]\n }\n icon={Icons.ArrowUp}\n />\n )}\n <img src={sortingIcon} alt=\"Sort\" className={classes[\"sorting-image\"]} />\n </Fragment>\n );\n }\n\n const getSortingIndicatorClasses = () => {\n const sortingIndicatorClasses = [classes[\"indicator\"]];\n activeSortDirection &&\n sortingIndicatorClasses.push(\n activeSortDirection === \"ASC\" ? classes[\"ascending\"] : classes[\"descending\"]\n );\n return sortingIndicatorClasses;\n };\n\n return <Icon className={getSortingIndicatorClasses().join(\" \")} icon={Icons.ArrowUp} />;\n };\n\n const innerContent = (\n <Fragment>\n <span className={classes[\"headline\"]}>{headlineContent ?? headline}</span>\n {!disableSorting && (\n <div className={classes[\"sorting-indicator-container\"]}>{sortingIndicator()}</div>\n )}\n </Fragment>\n );\n\n const headerCellClasses = [classes[\"header-cell\"]];\n const renderSortButton = () => {\n if (disableSorting) {\n return <div key={name}>{innerContent}</div>;\n }\n\n if (enableSortDropdown) {\n const sortText = getSortText();\n\n return (\n <ContextMenu\n key={name}\n trigger={\n <span className={classes[\"dropdown-trigger\"]} aria-label={`Sort ${headline}`}>\n {innerContent}\n </span>\n }\n showChevron={false}\n placement={{ vertical: \"bottom\", horizontal: \"left\" }}\n transformOrigin={{ vertical: \"top\", horizontal: \"left\" }}\n >\n <ContextMenuItem\n onClick={() => handleDirectSort(\"ASC\")}\n className={activeSortDirection === \"ASC\" ? classes[\"selected-item\"] : \"\"}\n disabled={activeSortDirection === \"ASC\"}\n >\n {sortText.asc}\n </ContextMenuItem>\n <ContextMenuItem\n onClick={() => handleDirectSort(\"DESC\")}\n className={activeSortDirection === \"DESC\" ? classes[\"selected-item\"] : \"\"}\n disabled={activeSortDirection === \"DESC\"}\n >\n {sortText.desc}\n </ContextMenuItem>\n <ContextMenuItem\n onClick={() => handleDirectSort()}\n className={
|
|
1
|
+
{"version":3,"file":"DataGridHeaderCell.cjs.js","sources":["../../../../src/components/DataGrid/DataGridHeader/DataGridHeaderCell.tsx"],"sourcesContent":["/*\n * Copyright 2022 OneWelcome B.V.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport React, { ForwardRefRenderFunction, ComponentPropsWithRef, Fragment, ReactNode } from \"react\";\nimport { Icon, Icons } from \"../../Icon/Icon\";\nimport { Direction } from \"../datagrid.interfaces\";\nimport { ContextMenu } from \"../../ContextMenu/ContextMenu\";\nimport { ContextMenuItem } from \"../../ContextMenu/ContextMenuItem\";\nimport classes from \"./DataGridHeaderCell.module.scss\";\nimport sortingIcon from \"../assets/sorting.png\";\n\nexport interface Props extends ComponentPropsWithRef<\"th\"> {\n headline: string;\n headlineContent?: ReactNode;\n name: string;\n disableSorting?: boolean;\n activeSortDirection?: Direction;\n onSort?: (name: string) => void;\n onDirectSort?: (name: string, direction?: Direction) => void;\n enableSortDropdown?: boolean;\n columnType?: \"text\" | \"date\" | \"number\";\n}\n\nconst ariaSortMapping = {\n ASC: \"ascending\",\n DESC: \"descending\"\n} as const;\n\nconst DataGridHeaderCellComponent: ForwardRefRenderFunction<HTMLTableCellElement, Props> = (\n {\n headline,\n headlineContent,\n name,\n disableSorting,\n activeSortDirection,\n onSort,\n onDirectSort,\n enableSortDropdown,\n columnType,\n ...rest\n }: Props,\n ref\n) => {\n const onCellClick = () => {\n onSort?.(name);\n };\n\n const handleDirectSort = (direction?: Direction) => {\n onDirectSort?.(name, direction);\n };\n\n const getSortText = () => {\n switch (columnType) {\n case \"text\":\n return {\n desc: \"Descending (Z-A)\",\n asc: \"Ascending (A-Z)\"\n };\n case \"number\":\n return {\n desc: \"Descending (9-0)\",\n asc: \"Ascending (0-9)\"\n };\n case \"date\":\n return {\n desc: \"Newest to oldest\",\n asc: \"Oldest to newest\"\n };\n default:\n return {\n desc: \"Descending\",\n asc: \"Ascending\"\n };\n }\n };\n\n const sortingIndicator = () => {\n if (enableSortDropdown) {\n // Show directional arrow when sorted, plus sorting icon\n return (\n <Fragment>\n {activeSortDirection && (\n <Icon\n className={\n activeSortDirection === \"ASC\" ? classes[\"ascending\"] : classes[\"descending\"]\n }\n icon={Icons.ArrowUp}\n />\n )}\n <img src={sortingIcon} alt=\"Sort\" className={classes[\"sorting-image\"]} />\n </Fragment>\n );\n }\n\n const getSortingIndicatorClasses = () => {\n const sortingIndicatorClasses = [classes[\"indicator\"]];\n activeSortDirection &&\n sortingIndicatorClasses.push(\n activeSortDirection === \"ASC\" ? classes[\"ascending\"] : classes[\"descending\"]\n );\n return sortingIndicatorClasses;\n };\n\n return <Icon className={getSortingIndicatorClasses().join(\" \")} icon={Icons.ArrowUp} />;\n };\n\n const innerContent = (\n <Fragment>\n <span className={classes[\"headline\"]}>{headlineContent ?? headline}</span>\n {!disableSorting && (\n <div className={classes[\"sorting-indicator-container\"]}>{sortingIndicator()}</div>\n )}\n </Fragment>\n );\n\n const headerCellClasses = [classes[\"header-cell\"]];\n const renderSortButton = () => {\n if (disableSorting) {\n return <div key={name}>{innerContent}</div>;\n }\n\n if (enableSortDropdown) {\n const sortText = getSortText();\n\n return (\n <ContextMenu\n key={name}\n trigger={\n <span className={classes[\"dropdown-trigger\"]} aria-label={`Sort ${headline}`}>\n {innerContent}\n </span>\n }\n showChevron={false}\n placement={{ vertical: \"bottom\", horizontal: \"left\" }}\n transformOrigin={{ vertical: \"top\", horizontal: \"left\" }}\n >\n <ContextMenuItem\n onClick={() => handleDirectSort(\"ASC\")}\n className={activeSortDirection === \"ASC\" ? classes[\"selected-item\"] : \"\"}\n disabled={activeSortDirection === \"ASC\"}\n >\n {sortText.asc}\n </ContextMenuItem>\n <ContextMenuItem\n onClick={() => handleDirectSort(\"DESC\")}\n className={activeSortDirection === \"DESC\" ? classes[\"selected-item\"] : \"\"}\n disabled={activeSortDirection === \"DESC\"}\n >\n {sortText.desc}\n </ContextMenuItem>\n <ContextMenuItem\n onClick={() => handleDirectSort()}\n className={activeSortDirection ? \"\" : classes[\"selected-item\"]}\n disabled={!activeSortDirection}\n >\n No sorting\n </ContextMenuItem>\n </ContextMenu>\n );\n }\n\n return (\n <button key={name} onClick={onCellClick}>\n {innerContent}\n </button>\n );\n };\n\n return (\n <th\n {...rest}\n ref={ref}\n className={headerCellClasses.join(\" \")}\n aria-sort={activeSortDirection && ariaSortMapping[activeSortDirection]}\n >\n <div className={classes[\"header-cell-wrapper\"]}>{renderSortButton()}</div>\n </th>\n );\n};\n\nexport const DataGridHeaderCell = React.forwardRef(DataGridHeaderCellComponent);\n"],"names":["ariaSortMapping","ASC","DESC","DataGridHeaderCell","React","forwardRef","headline","headlineContent","name","disableSorting","activeSortDirection","onSort","onDirectSort","enableSortDropdown","columnType","rest","ref","onCellClick","handleDirectSort","direction","innerContent","Fragment","createElement","className","classes","Icon","icon","Icons","ArrowUp","src","sortingIcon","alt","sortingIndicatorClasses","push","getSortingIndicatorClasses","join","headerCellClasses","key","sortText","desc","asc","getSortText","ContextMenu","trigger","showChevron","placement","vertical","horizontal","transformOrigin","ContextMenuItem","onClick","disabled","renderSortButton"],"mappings":"oVAoCMA,EAAkB,CACtBC,IAAK,YACLC,KAAM,cA2JKC,EAAqBC,EAAMC,WAxJmD,EAEvFC,WACAC,kBACAC,OACAC,iBACAC,sBACAC,SACAC,eACAC,qBACAC,gBACGC,GAELC,KAEA,MAAMC,EAAc,KAClB,MAAAN,GAAAA,EAASH,IAGLU,EAAoBC,IACxB,MAAAP,GAAAA,EAAeJ,EAAMW,IA0DjBC,kBACHC,EAAAA,SAAA,KACCjB,EAAAkB,cAAC,QAAKC,UAAWC,EAAAA,QAAkB,UAAIjB,GAAmBD,IACxDG,mBACC,MAAA,CAAIc,UAAWC,EAAAA,QAAQ,gCAjCxBX,IAGAS,cAACD,EAAAA,cACEX,GACCN,EAAAkB,cAACG,EAAAA,KAAA,CACCF,UAC0B,QAAxBb,EAAgCc,EAAAA,QAAmB,UAAIA,EAAAA,QAAoB,WAE7EE,KAAMC,EAAAA,MAAMC,UAGhBxB,EAAAkB,cAAC,MAAA,CAAIO,IAAKC,EAAAA,QAAaC,IAAI,OAAOR,UAAWC,EAAAA,QAAQ,oBAcpDpB,EAAAkB,cAACG,OAAA,CAAKF,UATsB,MACjC,MAAMS,EAA0B,CAACR,UAAmB,WAKpD,OAJAd,GACEsB,EAAwBC,KACE,QAAxBvB,EAAgCc,EAAAA,QAAmB,UAAIA,EAAAA,QAAoB,YAExEQ,GAGeE,GAA6BC,KAAK,KAAMT,KAAMC,EAAAA,MAAMC,YAYxEQ,EAAoB,CAACZ,UAAQ,gBAqDnC,OACEpB,EAAAkB,cAAC,KAAA,IACKP,EACJC,MACAO,UAAWa,EAAkBD,KAAK,KAClC,YAAWzB,GAAuBV,EAAgBU,oBAEjD,MAAA,CAAIa,UAAWC,EAAAA,QAAQ,wBA3DH,MACvB,GAAIf,EACF,SAAOa,cAAC,MAAA,CAAIe,IAAK7B,GAAOY,GAG1B,GAAIP,EAAoB,CACtB,MAAMyB,EAvEU,MAClB,OAAQxB,GACN,IAAK,OACH,MAAO,CACLyB,KAAM,mBACNC,IAAK,mBAET,IAAK,SACH,MAAO,CACLD,KAAM,mBACNC,IAAK,mBAET,IAAK,OACH,MAAO,CACLD,KAAM,mBACNC,IAAK,oBAET,QACE,MAAO,CACLD,KAAM,aACNC,IAAK,eAmDQC,GAEjB,OACErC,EAAAkB,cAACoB,EAAAA,YAAA,CACCL,IAAK7B,EACLmC,QACEvC,EAAAkB,cAAC,OAAA,CAAKC,UAAWC,EAAAA,QAAQ,oBAAqB,aAAY,QAAQlB,KAC/Dc,GAGLwB,aAAa,EACbC,UAAW,CAAEC,SAAU,SAAUC,WAAY,QAC7CC,gBAAiB,CAAEF,SAAU,MAAOC,WAAY,SAEhD3C,EAAAkB,cAAC2B,EAAAA,gBAAA,CACCC,QAAS,IAAMhC,EAAiB,OAChCK,UAAmC,QAAxBb,EAAgCc,EAAAA,QAAQ,iBAAmB,GACtE2B,SAAkC,QAAxBzC,GAET4B,EAASE,KAEZpC,EAAAkB,cAAC2B,EAAAA,gBAAA,CACCC,QAAS,IAAMhC,EAAiB,QAChCK,UAAmC,SAAxBb,EAAiCc,EAAAA,QAAQ,iBAAmB,GACvE2B,SAAkC,SAAxBzC,GAET4B,EAASC,MAEZnC,EAAAkB,cAAC2B,EAAAA,gBAAA,CACCC,QAAS,IAAMhC,IACfK,UAAWb,EAAsB,GAAKc,EAAAA,QAAQ,iBAC9C2B,UAAWzC,GACZ,cAKP,CAEA,uBACG,SAAA,CAAO2B,IAAK7B,EAAM0C,QAASjC,GACzBG,IAY8CgC"}
|
|
@@ -108,7 +108,7 @@ const DataGridHeaderCellComponent = ({
|
|
|
108
108
|
ContextMenuItem,
|
|
109
109
|
{
|
|
110
110
|
onClick: () => handleDirectSort(),
|
|
111
|
-
className:
|
|
111
|
+
className: activeSortDirection ? "" : classes["selected-item"],
|
|
112
112
|
disabled: !activeSortDirection
|
|
113
113
|
},
|
|
114
114
|
"No sorting"
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DataGridHeaderCell.es.js","sources":["../../../../src/components/DataGrid/DataGridHeader/DataGridHeaderCell.tsx"],"sourcesContent":["/*\n * Copyright 2022 OneWelcome B.V.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport React, { ForwardRefRenderFunction, ComponentPropsWithRef, Fragment, ReactNode } from \"react\";\nimport { Icon, Icons } from \"../../Icon/Icon\";\nimport { Direction } from \"../datagrid.interfaces\";\nimport { ContextMenu } from \"../../ContextMenu/ContextMenu\";\nimport { ContextMenuItem } from \"../../ContextMenu/ContextMenuItem\";\nimport classes from \"./DataGridHeaderCell.module.scss\";\nimport sortingIcon from \"../assets/sorting.png\";\n\nexport interface Props extends ComponentPropsWithRef<\"th\"> {\n headline: string;\n headlineContent?: ReactNode;\n name: string;\n disableSorting?: boolean;\n activeSortDirection?: Direction;\n onSort?: (name: string) => void;\n onDirectSort?: (name: string, direction?: Direction) => void;\n enableSortDropdown?: boolean;\n columnType?: \"text\" | \"date\" | \"number\";\n}\n\nconst ariaSortMapping = {\n ASC: \"ascending\",\n DESC: \"descending\"\n} as const;\n\nconst DataGridHeaderCellComponent: ForwardRefRenderFunction<HTMLTableCellElement, Props> = (\n {\n headline,\n headlineContent,\n name,\n disableSorting,\n activeSortDirection,\n onSort,\n onDirectSort,\n enableSortDropdown,\n columnType,\n ...rest\n }: Props,\n ref\n) => {\n const onCellClick = () => {\n onSort?.(name);\n };\n\n const handleDirectSort = (direction?: Direction) => {\n onDirectSort?.(name, direction);\n };\n\n const getSortText = () => {\n switch (columnType) {\n case \"text\":\n return {\n desc: \"Descending (Z-A)\",\n asc: \"Ascending (A-Z)\"\n };\n case \"number\":\n return {\n desc: \"Descending (9-0)\",\n asc: \"Ascending (0-9)\"\n };\n case \"date\":\n return {\n desc: \"Newest to oldest\",\n asc: \"Oldest to newest\"\n };\n default:\n return {\n desc: \"Descending\",\n asc: \"Ascending\"\n };\n }\n };\n\n const sortingIndicator = () => {\n if (enableSortDropdown) {\n // Show directional arrow when sorted, plus sorting icon\n return (\n <Fragment>\n {activeSortDirection && (\n <Icon\n className={\n activeSortDirection === \"ASC\" ? classes[\"ascending\"] : classes[\"descending\"]\n }\n icon={Icons.ArrowUp}\n />\n )}\n <img src={sortingIcon} alt=\"Sort\" className={classes[\"sorting-image\"]} />\n </Fragment>\n );\n }\n\n const getSortingIndicatorClasses = () => {\n const sortingIndicatorClasses = [classes[\"indicator\"]];\n activeSortDirection &&\n sortingIndicatorClasses.push(\n activeSortDirection === \"ASC\" ? classes[\"ascending\"] : classes[\"descending\"]\n );\n return sortingIndicatorClasses;\n };\n\n return <Icon className={getSortingIndicatorClasses().join(\" \")} icon={Icons.ArrowUp} />;\n };\n\n const innerContent = (\n <Fragment>\n <span className={classes[\"headline\"]}>{headlineContent ?? headline}</span>\n {!disableSorting && (\n <div className={classes[\"sorting-indicator-container\"]}>{sortingIndicator()}</div>\n )}\n </Fragment>\n );\n\n const headerCellClasses = [classes[\"header-cell\"]];\n const renderSortButton = () => {\n if (disableSorting) {\n return <div key={name}>{innerContent}</div>;\n }\n\n if (enableSortDropdown) {\n const sortText = getSortText();\n\n return (\n <ContextMenu\n key={name}\n trigger={\n <span className={classes[\"dropdown-trigger\"]} aria-label={`Sort ${headline}`}>\n {innerContent}\n </span>\n }\n showChevron={false}\n placement={{ vertical: \"bottom\", horizontal: \"left\" }}\n transformOrigin={{ vertical: \"top\", horizontal: \"left\" }}\n >\n <ContextMenuItem\n onClick={() => handleDirectSort(\"ASC\")}\n className={activeSortDirection === \"ASC\" ? classes[\"selected-item\"] : \"\"}\n disabled={activeSortDirection === \"ASC\"}\n >\n {sortText.asc}\n </ContextMenuItem>\n <ContextMenuItem\n onClick={() => handleDirectSort(\"DESC\")}\n className={activeSortDirection === \"DESC\" ? classes[\"selected-item\"] : \"\"}\n disabled={activeSortDirection === \"DESC\"}\n >\n {sortText.desc}\n </ContextMenuItem>\n <ContextMenuItem\n onClick={() => handleDirectSort()}\n className={
|
|
1
|
+
{"version":3,"file":"DataGridHeaderCell.es.js","sources":["../../../../src/components/DataGrid/DataGridHeader/DataGridHeaderCell.tsx"],"sourcesContent":["/*\n * Copyright 2022 OneWelcome B.V.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport React, { ForwardRefRenderFunction, ComponentPropsWithRef, Fragment, ReactNode } from \"react\";\nimport { Icon, Icons } from \"../../Icon/Icon\";\nimport { Direction } from \"../datagrid.interfaces\";\nimport { ContextMenu } from \"../../ContextMenu/ContextMenu\";\nimport { ContextMenuItem } from \"../../ContextMenu/ContextMenuItem\";\nimport classes from \"./DataGridHeaderCell.module.scss\";\nimport sortingIcon from \"../assets/sorting.png\";\n\nexport interface Props extends ComponentPropsWithRef<\"th\"> {\n headline: string;\n headlineContent?: ReactNode;\n name: string;\n disableSorting?: boolean;\n activeSortDirection?: Direction;\n onSort?: (name: string) => void;\n onDirectSort?: (name: string, direction?: Direction) => void;\n enableSortDropdown?: boolean;\n columnType?: \"text\" | \"date\" | \"number\";\n}\n\nconst ariaSortMapping = {\n ASC: \"ascending\",\n DESC: \"descending\"\n} as const;\n\nconst DataGridHeaderCellComponent: ForwardRefRenderFunction<HTMLTableCellElement, Props> = (\n {\n headline,\n headlineContent,\n name,\n disableSorting,\n activeSortDirection,\n onSort,\n onDirectSort,\n enableSortDropdown,\n columnType,\n ...rest\n }: Props,\n ref\n) => {\n const onCellClick = () => {\n onSort?.(name);\n };\n\n const handleDirectSort = (direction?: Direction) => {\n onDirectSort?.(name, direction);\n };\n\n const getSortText = () => {\n switch (columnType) {\n case \"text\":\n return {\n desc: \"Descending (Z-A)\",\n asc: \"Ascending (A-Z)\"\n };\n case \"number\":\n return {\n desc: \"Descending (9-0)\",\n asc: \"Ascending (0-9)\"\n };\n case \"date\":\n return {\n desc: \"Newest to oldest\",\n asc: \"Oldest to newest\"\n };\n default:\n return {\n desc: \"Descending\",\n asc: \"Ascending\"\n };\n }\n };\n\n const sortingIndicator = () => {\n if (enableSortDropdown) {\n // Show directional arrow when sorted, plus sorting icon\n return (\n <Fragment>\n {activeSortDirection && (\n <Icon\n className={\n activeSortDirection === \"ASC\" ? classes[\"ascending\"] : classes[\"descending\"]\n }\n icon={Icons.ArrowUp}\n />\n )}\n <img src={sortingIcon} alt=\"Sort\" className={classes[\"sorting-image\"]} />\n </Fragment>\n );\n }\n\n const getSortingIndicatorClasses = () => {\n const sortingIndicatorClasses = [classes[\"indicator\"]];\n activeSortDirection &&\n sortingIndicatorClasses.push(\n activeSortDirection === \"ASC\" ? classes[\"ascending\"] : classes[\"descending\"]\n );\n return sortingIndicatorClasses;\n };\n\n return <Icon className={getSortingIndicatorClasses().join(\" \")} icon={Icons.ArrowUp} />;\n };\n\n const innerContent = (\n <Fragment>\n <span className={classes[\"headline\"]}>{headlineContent ?? headline}</span>\n {!disableSorting && (\n <div className={classes[\"sorting-indicator-container\"]}>{sortingIndicator()}</div>\n )}\n </Fragment>\n );\n\n const headerCellClasses = [classes[\"header-cell\"]];\n const renderSortButton = () => {\n if (disableSorting) {\n return <div key={name}>{innerContent}</div>;\n }\n\n if (enableSortDropdown) {\n const sortText = getSortText();\n\n return (\n <ContextMenu\n key={name}\n trigger={\n <span className={classes[\"dropdown-trigger\"]} aria-label={`Sort ${headline}`}>\n {innerContent}\n </span>\n }\n showChevron={false}\n placement={{ vertical: \"bottom\", horizontal: \"left\" }}\n transformOrigin={{ vertical: \"top\", horizontal: \"left\" }}\n >\n <ContextMenuItem\n onClick={() => handleDirectSort(\"ASC\")}\n className={activeSortDirection === \"ASC\" ? classes[\"selected-item\"] : \"\"}\n disabled={activeSortDirection === \"ASC\"}\n >\n {sortText.asc}\n </ContextMenuItem>\n <ContextMenuItem\n onClick={() => handleDirectSort(\"DESC\")}\n className={activeSortDirection === \"DESC\" ? classes[\"selected-item\"] : \"\"}\n disabled={activeSortDirection === \"DESC\"}\n >\n {sortText.desc}\n </ContextMenuItem>\n <ContextMenuItem\n onClick={() => handleDirectSort()}\n className={activeSortDirection ? \"\" : classes[\"selected-item\"]}\n disabled={!activeSortDirection}\n >\n No sorting\n </ContextMenuItem>\n </ContextMenu>\n );\n }\n\n return (\n <button key={name} onClick={onCellClick}>\n {innerContent}\n </button>\n );\n };\n\n return (\n <th\n {...rest}\n ref={ref}\n className={headerCellClasses.join(\" \")}\n aria-sort={activeSortDirection && ariaSortMapping[activeSortDirection]}\n >\n <div className={classes[\"header-cell-wrapper\"]}>{renderSortButton()}</div>\n </th>\n );\n};\n\nexport const DataGridHeaderCell = React.forwardRef(DataGridHeaderCellComponent);\n"],"names":[],"mappings":";;;;;;AAoCA,MAAM,kBAAkB;AAAA,EACtB,KAAK;AAAA,EACL,MAAM;AACR;AAEA,MAAM,8BAAqF,CACzF;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA,GAAG;AACL,GACA,QACG;AACH,QAAM,cAAc,MAAM;AACxB,qCAAS;AAAA,EACX;AAEA,QAAM,mBAAmB,CAAC,cAA0B;AAClD,iDAAe,MAAM;AAAA,EACvB;AAEA,QAAM,cAAc,MAAM;AACxB,YAAQ,YAAA;AAAA,MACN,KAAK;AACH,eAAO;AAAA,UACL,MAAM;AAAA,UACN,KAAK;AAAA,QAAA;AAAA,MAET,KAAK;AACH,eAAO;AAAA,UACL,MAAM;AAAA,UACN,KAAK;AAAA,QAAA;AAAA,MAET,KAAK;AACH,eAAO;AAAA,UACL,MAAM;AAAA,UACN,KAAK;AAAA,QAAA;AAAA,MAET;AACE,eAAO;AAAA,UACL,MAAM;AAAA,UACN,KAAK;AAAA,QAAA;AAAA,IACP;AAAA,EAEN;AAEA,QAAM,mBAAmB,MAAM;AAC7B,QAAI,oBAAoB;AAEtB,aACE,sBAAA,cAAC,gBACE,uBACC,sBAAA;AAAA,QAAC;AAAA,QAAA;AAAA,UACC,WACE,wBAAwB,QAAQ,QAAQ,WAAW,IAAI,QAAQ,YAAY;AAAA,UAE7E,MAAM,MAAM;AAAA,QAAA;AAAA,MAAA,GAGhB,sBAAA,cAAC,OAAA,EAAI,KAAK,aAAa,KAAI,QAAO,WAAW,QAAQ,eAAe,EAAA,CAAG,CACzE;AAAA,IAEJ;AAEA,UAAM,6BAA6B,MAAM;AACvC,YAAM,0BAA0B,CAAC,QAAQ,WAAW,CAAC;AACrD,6BACE,wBAAwB;AAAA,QACtB,wBAAwB,QAAQ,QAAQ,WAAW,IAAI,QAAQ,YAAY;AAAA,MAAA;AAE/E,aAAO;AAAA,IACT;AAEA,WAAO,sBAAA,cAAC,MAAA,EAAK,WAAW,2BAAA,EAA6B,KAAK,GAAG,GAAG,MAAM,MAAM,QAAA,CAAS;AAAA,EACvF;AAEA,QAAM,mDACH,UAAA,MACC,sBAAA,cAAC,UAAK,WAAW,QAAQ,UAAU,EAAA,GAAI,mBAAmB,QAAS,GAClE,CAAC,sDACC,OAAA,EAAI,WAAW,QAAQ,6BAA6B,KAAI,iBAAA,CAAmB,CAEhF;AAGF,QAAM,oBAAoB,CAAC,QAAQ,aAAa,CAAC;AACjD,QAAM,mBAAmB,MAAM;AAC7B,QAAI,gBAAgB;AAClB,aAAO,sBAAA,cAAC,OAAA,EAAI,KAAK,KAAA,GAAO,YAAa;AAAA,IACvC;AAEA,QAAI,oBAAoB;AACtB,YAAM,WAAW,YAAA;AAEjB,aACE,sBAAA;AAAA,QAAC;AAAA,QAAA;AAAA,UACC,KAAK;AAAA,UACL,SACE,sBAAA,cAAC,QAAA,EAAK,WAAW,QAAQ,kBAAkB,GAAG,cAAY,QAAQ,QAAQ,GAAA,GACvE,YACH;AAAA,UAEF,aAAa;AAAA,UACb,WAAW,EAAE,UAAU,UAAU,YAAY,OAAA;AAAA,UAC7C,iBAAiB,EAAE,UAAU,OAAO,YAAY,OAAA;AAAA,QAAO;AAAA,QAEvD,sBAAA;AAAA,UAAC;AAAA,UAAA;AAAA,YACC,SAAS,MAAM,iBAAiB,KAAK;AAAA,YACrC,WAAW,wBAAwB,QAAQ,QAAQ,eAAe,IAAI;AAAA,YACtE,UAAU,wBAAwB;AAAA,UAAA;AAAA,UAEjC,SAAS;AAAA,QAAA;AAAA,QAEZ,sBAAA;AAAA,UAAC;AAAA,UAAA;AAAA,YACC,SAAS,MAAM,iBAAiB,MAAM;AAAA,YACtC,WAAW,wBAAwB,SAAS,QAAQ,eAAe,IAAI;AAAA,YACvE,UAAU,wBAAwB;AAAA,UAAA;AAAA,UAEjC,SAAS;AAAA,QAAA;AAAA,QAEZ,sBAAA;AAAA,UAAC;AAAA,UAAA;AAAA,YACC,SAAS,MAAM,iBAAA;AAAA,YACf,WAAW,sBAAsB,KAAK,QAAQ,eAAe;AAAA,YAC7D,UAAU,CAAC;AAAA,UAAA;AAAA,UACZ;AAAA,QAAA;AAAA,MAED;AAAA,IAGN;AAEA,+CACG,UAAA,EAAO,KAAK,MAAM,SAAS,eACzB,YACH;AAAA,EAEJ;AAEA,SACE,sBAAA;AAAA,IAAC;AAAA,IAAA;AAAA,MACE,GAAG;AAAA,MACJ;AAAA,MACA,WAAW,kBAAkB,KAAK,GAAG;AAAA,MACrC,aAAW,uBAAuB,gBAAgB,mBAAmB;AAAA,IAAA;AAAA,wCAEpE,OAAA,EAAI,WAAW,QAAQ,qBAAqB,EAAA,GAAI,kBAAmB;AAAA,EAAA;AAG1E;AAEO,MAAM,qBAAqB,MAAM,WAAW,2BAA2B;"}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
!function(){"use strict";try{if("undefined"!=typeof document){var e=document.createElement("style");e.appendChild(document.createTextNode('/*!\n * Copyright 2022 OneWelcome B.V.\n *\n * Licensed under the Apache License, Version 2.0 (the "License");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an "AS IS" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */.DataGridHeaderCell_header-
|
|
2
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e="
|
|
1
|
+
!function(){"use strict";try{if("undefined"!=typeof document){var e=document.createElement("style");e.appendChild(document.createTextNode('/*!\n * Copyright 2022 OneWelcome B.V.\n *\n * Licensed under the Apache License, Version 2.0 (the "License");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an "AS IS" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */.DataGridHeaderCell_header-cell_PX3IM{font-weight:400;text-align:left;padding:.625rem .75rem}.DataGridHeaderCell_header-cell_PX3IM:first-child{padding-left:1rem}.DataGridHeaderCell_header-cell_PX3IM:last-child{padding-right:1rem}.DataGridHeaderCell_header-cell_PX3IM>*{display:inline-flex}.DataGridHeaderCell_header-cell_PX3IM>button{padding:0;margin:0;border:0;background:none;cursor:pointer;display:inline-flex;align-items:center;font-family:inherit;font-size:inherit;line-height:inherit;color:inherit}.DataGridHeaderCell_header-cell_PX3IM>button:hover{background:none}.DataGridHeaderCell_header-cell_PX3IM>button:focus{outline:none}.DataGridHeaderCell_header-cell_PX3IM .DataGridHeaderCell_dropdown-trigger_PX3IM{cursor:pointer;display:inline-flex;align-items:center}.DataGridHeaderCell_header-cell-wrapper_PX3IM{display:inline-flex;align-items:center;gap:.5rem}.DataGridHeaderCell_header-cell-wrapper_PX3IM>button{padding:0;margin:0;border:0;background:none;cursor:pointer;display:inline-flex;align-items:center}.DataGridHeaderCell_header-cell-wrapper_PX3IM>div{display:inline-flex;align-items:center}.DataGridHeaderCell_headline_PX3IM{font-family:var(--font-family);font-size:var(--font-size-data-grid);line-height:var(--data-grid-line-height);font-weight:700;color:var(--default);display:inline-flex;align-items:center;gap:.25rem}.DataGridHeaderCell_sorting-indicator-container_PX3IM{display:flex;flex-direction:row;padding-left:.5rem;justify-content:center;align-items:center;gap:.25rem}.DataGridHeaderCell_sorting-indicator-container_PX3IM>*{font-size:var(--font-size-small)}.DataGridHeaderCell_sorting-indicator-container_PX3IM .DataGridHeaderCell_indicator_PX3IM{color:var(--greyed-out);transition:transform .2s ease-in-out;transform:rotate(0)}.DataGridHeaderCell_sorting-indicator-container_PX3IM .DataGridHeaderCell_indicator_PX3IM.DataGridHeaderCell_ascending_PX3IM{color:var(--color-primary)}.DataGridHeaderCell_sorting-indicator-container_PX3IM .DataGridHeaderCell_indicator_PX3IM.DataGridHeaderCell_descending_PX3IM{color:var(--color-primary);transform:rotate(180deg)}.DataGridHeaderCell_sorting-indicator-container_PX3IM .DataGridHeaderCell_indicator_PX3IM.DataGridHeaderCell_hidden_PX3IM{visibility:hidden}.DataGridHeaderCell_sorting-indicator-container_PX3IM .DataGridHeaderCell_ascending_PX3IM,.DataGridHeaderCell_sorting-indicator-container_PX3IM .DataGridHeaderCell_descending_PX3IM{color:var(--color-primary)}.DataGridHeaderCell_sorting-indicator-container_PX3IM .DataGridHeaderCell_descending_PX3IM{transform:rotate(180deg)}.DataGridHeaderCell_sorting-indicator-container_PX3IM .DataGridHeaderCell_sorting-image_PX3IM{width:1rem;height:1rem;display:inline-block}.DataGridHeaderCell_selected-item_PX3IM{border-left:4px solid var(--color-primary);font-weight:600}.DataGridHeaderCell_selected-item_PX3IM button{color:var(--color-primary)!important}@media only screen and (min-width:50em){.DataGridHeaderCell_header-cell_PX3IM:first-child{padding-left:1.25rem}.DataGridHeaderCell_header-cell_PX3IM:last-child{padding-right:1.25rem}}')),document.head.appendChild(e)}}catch(r){console.error("vite-plugin-css-injected-by-js",r)}}();
|
|
2
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e="DataGridHeaderCell_headline_PX3IM",a="DataGridHeaderCell_indicator_PX3IM",r="DataGridHeaderCell_ascending_PX3IM",d="DataGridHeaderCell_descending_PX3IM",i={"header-cell":"DataGridHeaderCell_header-cell_PX3IM","dropdown-trigger":"DataGridHeaderCell_dropdown-trigger_PX3IM","header-cell-wrapper":"DataGridHeaderCell_header-cell-wrapper_PX3IM",headline:e,"sorting-indicator-container":"DataGridHeaderCell_sorting-indicator-container_PX3IM",indicator:a,ascending:r,descending:d,"sorting-image":"DataGridHeaderCell_sorting-image_PX3IM","selected-item":"DataGridHeaderCell_selected-item_PX3IM"};exports.ascending=r,exports.default=i,exports.descending=d,exports.headline=e,exports.indicator=a;
|
|
3
3
|
//# sourceMappingURL=DataGridHeaderCell.module.scss.cjs.js.map
|