@talxis/base-controls 1.2508.2 → 1.2509.1-alpha.1
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/DatasetControl/DatasetControl.js +59 -55
- package/dist/components/DatasetControl/DatasetControl.js.map +1 -1
- package/dist/components/DatasetControl/DatasetControlModel.d.ts +37 -0
- package/dist/components/DatasetControl/DatasetControlModel.js +110 -0
- package/dist/components/DatasetControl/DatasetControlModel.js.map +1 -0
- package/dist/components/DatasetControl/Filtering/DatasetColumnFiltering.d.ts +3 -0
- package/dist/components/DatasetControl/Filtering/DatasetColumnFiltering.js +166 -0
- package/dist/components/DatasetControl/Filtering/DatasetColumnFiltering.js.map +1 -0
- package/dist/components/DatasetControl/Filtering/DatasetColumnFilteringModel.d.ts +16 -0
- package/dist/components/DatasetControl/Filtering/DatasetColumnFilteringModel.js +59 -0
- package/dist/components/DatasetControl/Filtering/DatasetColumnFilteringModel.js.map +1 -0
- package/dist/components/DatasetControl/Filtering/interfaces.d.ts +32 -0
- package/dist/components/DatasetControl/Filtering/styles.d.ts +16 -0
- package/dist/components/DatasetControl/Filtering/styles.js +23 -0
- package/dist/components/DatasetControl/Filtering/styles.js.map +1 -0
- package/dist/components/DatasetControl/Filtering/translations.d.ts +154 -0
- package/dist/components/DatasetControl/Filtering/translations.js +43 -0
- package/dist/components/DatasetControl/Filtering/translations.js.map +1 -0
- package/dist/components/DatasetControl/Header/Header.d.ts +5 -0
- package/dist/components/DatasetControl/Header/Header.js +89 -0
- package/dist/components/DatasetControl/Header/Header.js.map +1 -0
- package/dist/components/DatasetControl/Header/styles.d.ts +22 -0
- package/dist/components/DatasetControl/Header/styles.js +29 -0
- package/dist/components/DatasetControl/Header/styles.js.map +1 -0
- package/dist/components/DatasetControl/Pagination/Pagination.d.ts +5 -0
- package/dist/components/DatasetControl/Pagination/Pagination.js +91 -0
- package/dist/components/DatasetControl/Pagination/Pagination.js.map +1 -0
- package/dist/components/DatasetControl/Pagination/PaginationModel.d.ts +10 -0
- package/dist/components/DatasetControl/Pagination/PaginationModel.js +45 -0
- package/dist/components/DatasetControl/Pagination/PaginationModel.js.map +1 -0
- package/dist/components/DatasetControl/Pagination/styles.d.ts +23 -0
- package/dist/components/DatasetControl/Pagination/styles.js +29 -0
- package/dist/components/DatasetControl/Pagination/styles.js.map +1 -0
- package/dist/components/DatasetControl/QuickFind/QuickFind.d.ts +4 -12
- package/dist/components/DatasetControl/QuickFind/QuickFind.js +36 -32
- package/dist/components/DatasetControl/QuickFind/QuickFind.js.map +1 -1
- package/dist/components/DatasetControl/QuickFind/styles.d.ts +1 -1
- package/dist/components/DatasetControl/QuickFind/styles.js +2 -2
- package/dist/components/DatasetControl/QuickFind/styles.js.map +1 -1
- package/dist/components/DatasetControl/index.d.ts +0 -1
- package/dist/components/DatasetControl/index.js +0 -2
- package/dist/components/DatasetControl/index.js.map +1 -1
- package/dist/components/DatasetControl/interfaces.d.ts +54 -20
- package/dist/components/DatasetControl/styles.d.ts +4 -11
- package/dist/components/DatasetControl/styles.js +5 -11
- package/dist/components/DatasetControl/styles.js.map +1 -1
- package/dist/components/DatasetControl/translations.d.ts +44 -0
- package/dist/components/DatasetControl/translations.js +15 -1
- package/dist/components/DatasetControl/translations.js.map +1 -1
- package/dist/components/DatasetControl/useModel.d.ts +4 -0
- package/dist/components/DatasetControl/useModel.js +9 -0
- package/dist/components/DatasetControl/useModel.js.map +1 -0
- package/dist/components/DateTime/translations.d.ts +1 -0
- package/dist/components/Duration/durationOptions.d.ts +1 -0
- package/dist/components/Grid/{core/components/Cell → cells/cell}/Cell.d.ts +3 -3
- package/dist/components/Grid/cells/cell/Cell.js +302 -0
- package/dist/components/Grid/cells/cell/Cell.js.map +1 -0
- package/dist/components/Grid/{core/components/Cell/CellContent → cells/cell/content}/CellContent.d.ts +2 -2
- package/dist/components/Grid/{core/components/Cell/CellContent → cells/cell/content}/CellContent.js +41 -32
- package/dist/components/Grid/cells/cell/content/CellContent.js.map +1 -0
- package/dist/components/Grid/cells/cell/content/styles.js.map +1 -0
- package/dist/components/Grid/{core/components/Cell/Notifications → cells/cell/notifications}/Notifications.d.ts +1 -1
- package/dist/components/Grid/{core/components/Cell/Notifications → cells/cell/notifications}/Notifications.js +5 -5
- package/dist/components/Grid/cells/cell/notifications/Notifications.js.map +1 -0
- package/dist/components/Grid/{core/components/Cell/Notifications → cells/cell/notifications}/styles.js +1 -1
- package/dist/components/Grid/cells/cell/notifications/styles.js.map +1 -0
- package/dist/components/Grid/{core/components/Cell → cells/cell}/styles.d.ts +34 -3
- package/dist/components/Grid/cells/cell/styles.js +78 -0
- package/dist/components/Grid/cells/cell/styles.js.map +1 -0
- package/dist/components/Grid/{core/components/ColumnHeader → column-headers/column-header}/ColumnHeader.d.ts +1 -1
- package/dist/components/Grid/column-headers/column-header/ColumnHeader.js +82 -0
- package/dist/components/Grid/column-headers/column-header/ColumnHeader.js.map +1 -0
- package/dist/components/Grid/{sorting/components/SortingContextualMenu/SortingContextualMenu.d.ts → column-headers/column-header/ColumnHeaderContextualMenu.d.ts} +3 -3
- package/dist/components/Grid/column-headers/column-header/ColumnHeaderContextualMenu.js +115 -0
- package/dist/components/Grid/column-headers/column-header/ColumnHeaderContextualMenu.js.map +1 -0
- package/dist/components/Grid/{filtering/components/FilterCallout → column-headers/column-header}/FilterCallout.d.ts +1 -1
- package/dist/components/Grid/column-headers/column-header/FilterCallout.js +103 -0
- package/dist/components/Grid/column-headers/column-header/FilterCallout.js.map +1 -0
- package/dist/components/Grid/column-headers/column-header/styles.d.ts +84 -0
- package/dist/components/Grid/{filtering/components/FilterCallout → column-headers/column-header}/styles.js +20 -11
- package/dist/components/Grid/column-headers/column-header/styles.js.map +1 -0
- package/dist/components/Grid/column-headers/record-selection-checkbox/RecordSelectionCheckbox.d.ts +2 -0
- package/dist/components/Grid/column-headers/record-selection-checkbox/RecordSelectionCheckbox.js +50 -0
- package/dist/components/Grid/column-headers/record-selection-checkbox/RecordSelectionCheckbox.js.map +1 -0
- package/dist/components/Grid/column-headers/record-selection-checkbox/styles.js.map +1 -0
- package/dist/components/Grid/errors/FullWidthCellRendererError/FullWidthCellRendererError.d.ts +6 -0
- package/dist/components/Grid/errors/FullWidthCellRendererError/FullWidthCellRendererError.js +15 -0
- package/dist/components/Grid/errors/FullWidthCellRendererError/FullWidthCellRendererError.js.map +1 -0
- package/dist/components/Grid/errors/FullWidthCellRendererError/styles.d.ts +6 -0
- package/dist/components/Grid/errors/FullWidthCellRendererError/styles.js +13 -0
- package/dist/components/Grid/errors/FullWidthCellRendererError/styles.js.map +1 -0
- package/dist/components/Grid/{core/components/AgGrid/AgGrid.d.ts → grid/Grid.d.ts} +2 -2
- package/dist/components/Grid/grid/Grid.js +64 -0
- package/dist/components/Grid/grid/Grid.js.map +1 -0
- package/dist/components/Grid/grid/GridContext.d.ts +3 -0
- package/dist/components/Grid/grid/GridContext.js.map +1 -0
- package/dist/components/Grid/grid/GridModel.d.ts +118 -0
- package/dist/components/Grid/grid/GridModel.js +787 -0
- package/dist/components/Grid/grid/GridModel.js.map +1 -0
- package/dist/components/Grid/{core/components/AgGrid/model/Comparator.d.ts → grid/ValueComparator.d.ts} +1 -1
- package/dist/components/Grid/{core/components/AgGrid/model/Comparator.js → grid/ValueComparator.js} +7 -1
- package/dist/components/Grid/grid/ValueComparator.js.map +1 -0
- package/dist/components/Grid/{core/components/AgGrid/context.d.ts → grid/ag-grid/AgGridContext.d.ts} +2 -2
- package/dist/components/Grid/{core/components/AgGrid/context.js → grid/ag-grid/AgGridContext.js} +1 -1
- package/dist/components/Grid/grid/ag-grid/AgGridContext.js.map +1 -0
- package/dist/components/Grid/grid/ag-grid/AgGridModel.d.ts +88 -0
- package/dist/components/Grid/grid/ag-grid/AgGridModel.js +565 -0
- package/dist/components/Grid/grid/ag-grid/AgGridModel.js.map +1 -0
- package/dist/components/Grid/grid/ag-grid/ServerSideDatasource.d.ts +7 -0
- package/dist/components/Grid/grid/ag-grid/ServerSideDatasource.js +38 -0
- package/dist/components/Grid/grid/ag-grid/ServerSideDatasource.js.map +1 -0
- package/dist/components/Grid/grid/ag-grid/useAgGridInstance.d.ts +2 -0
- package/dist/components/Grid/grid/ag-grid/useAgGridInstance.js +9 -0
- package/dist/components/Grid/grid/ag-grid/useAgGridInstance.js.map +1 -0
- package/dist/components/Grid/{core/components/AgGrid → grid}/styles.d.ts +24 -4
- package/dist/components/Grid/{core/components/AgGrid → grid}/styles.js +37 -6
- package/dist/components/Grid/grid/styles.js.map +1 -0
- package/dist/components/Grid/grid/useGridInstance.d.ts +2 -0
- package/dist/components/Grid/{core/hooks → grid}/useGridInstance.js +2 -2
- package/dist/components/Grid/grid/useGridInstance.js.map +1 -0
- package/dist/components/Grid/index.d.ts +1 -1
- package/dist/components/Grid/index.js +1 -1
- package/dist/components/Grid/interfaces.d.ts +10 -0
- package/dist/components/Grid/loading/full-row/FullRowLoading.d.ts +3 -0
- package/dist/components/Grid/loading/full-row/FullRowLoading.js +33 -0
- package/dist/components/Grid/loading/full-row/FullRowLoading.js.map +1 -0
- package/dist/components/Grid/loading/full-row/styles.d.ts +9 -0
- package/dist/components/Grid/loading/full-row/styles.js +16 -0
- package/dist/components/Grid/loading/full-row/styles.js.map +1 -0
- package/dist/components/Grid/overlays/empty-records/EmptyRecordsOverlay.js +13 -0
- package/dist/components/Grid/overlays/empty-records/EmptyRecordsOverlay.js.map +1 -0
- package/dist/components/Grid/{core/components/AgGrid/components/EmptyRecordsOverlay → overlays/empty-records}/styles.d.ts +1 -1
- package/dist/components/Grid/{core/components/AgGrid/components/EmptyRecordsOverlay → overlays/empty-records}/styles.js +1 -1
- package/dist/components/Grid/overlays/empty-records/styles.js.map +1 -0
- package/dist/components/Grid/overlays/loading/LoadingOverlay.js.map +1 -0
- package/dist/components/Grid/translations.d.ts +20 -180
- package/dist/components/Grid/translations.js +5 -48
- package/dist/components/Grid/translations.js.map +1 -1
- package/dist/components/GridCellRenderer/GridCellRenderer.js +99 -282
- package/dist/components/GridCellRenderer/GridCellRenderer.js.map +1 -1
- package/dist/components/GridCellRenderer/GridCellRendererModel.d.ts +52 -0
- package/dist/components/GridCellRenderer/GridCellRendererModel.js +211 -0
- package/dist/components/GridCellRenderer/GridCellRendererModel.js.map +1 -0
- package/dist/components/GridCellRenderer/ValueRenderer/ColorfulOptionSetValueRenderer/ColorfulOptionSetValueRenderer.d.ts +10 -0
- package/dist/components/GridCellRenderer/ValueRenderer/ColorfulOptionSetValueRenderer/ColorfulOptionSetValueRenderer.js +53 -0
- package/dist/components/GridCellRenderer/ValueRenderer/ColorfulOptionSetValueRenderer/ColorfulOptionSetValueRenderer.js.map +1 -0
- package/dist/components/GridCellRenderer/ValueRenderer/ColorfulOptionSetValueRenderer/styles.d.ts +20 -0
- package/dist/components/GridCellRenderer/ValueRenderer/ColorfulOptionSetValueRenderer/styles.js +29 -0
- package/dist/components/GridCellRenderer/ValueRenderer/ColorfulOptionSetValueRenderer/styles.js.map +1 -0
- package/dist/components/GridCellRenderer/ValueRenderer/FileRenderer/FileRenderer.d.ts +7 -0
- package/dist/components/GridCellRenderer/ValueRenderer/FileRenderer/FileRenderer.js +76 -0
- package/dist/components/GridCellRenderer/ValueRenderer/FileRenderer/FileRenderer.js.map +1 -0
- package/dist/components/GridCellRenderer/ValueRenderer/FileRenderer/styles.d.ts +18 -0
- package/dist/components/GridCellRenderer/ValueRenderer/FileRenderer/styles.js +25 -0
- package/dist/components/GridCellRenderer/ValueRenderer/FileRenderer/styles.js.map +1 -0
- package/dist/components/GridCellRenderer/ValueRenderer/ValueRenderer.d.ts +3 -0
- package/dist/components/GridCellRenderer/ValueRenderer/ValueRenderer.js +52 -0
- package/dist/components/GridCellRenderer/ValueRenderer/ValueRenderer.js.map +1 -0
- package/dist/components/GridCellRenderer/ValueRenderer/styles.d.ts +1666 -0
- package/dist/components/GridCellRenderer/ValueRenderer/styles.js +31 -0
- package/dist/components/GridCellRenderer/ValueRenderer/styles.js.map +1 -0
- package/dist/components/GridCellRenderer/interfaces.d.ts +54 -42
- package/dist/components/GridCellRenderer/properties/Email.d.ts +5 -0
- package/dist/components/GridCellRenderer/properties/Email.js +15 -0
- package/dist/components/GridCellRenderer/properties/Email.js.map +1 -0
- package/dist/components/GridCellRenderer/properties/File.d.ts +20 -0
- package/dist/components/GridCellRenderer/properties/File.js +99 -0
- package/dist/components/GridCellRenderer/properties/File.js.map +1 -0
- package/dist/components/GridCellRenderer/properties/Image.d.ts +4 -0
- package/dist/components/GridCellRenderer/properties/Image.js +15 -0
- package/dist/components/GridCellRenderer/properties/Image.js.map +1 -0
- package/dist/components/GridCellRenderer/properties/Lookup.d.ts +6 -0
- package/dist/components/GridCellRenderer/properties/Lookup.js +19 -0
- package/dist/components/GridCellRenderer/properties/Lookup.js.map +1 -0
- package/dist/components/GridCellRenderer/properties/MultiSelectOptionSet.d.ts +6 -0
- package/dist/components/GridCellRenderer/properties/MultiSelectOptionSet.js +11 -0
- package/dist/components/GridCellRenderer/properties/MultiSelectOptionSet.js.map +1 -0
- package/dist/components/GridCellRenderer/properties/MultilineText.d.ts +4 -0
- package/dist/components/GridCellRenderer/properties/MultilineText.js +10 -0
- package/dist/components/GridCellRenderer/properties/MultilineText.js.map +1 -0
- package/dist/components/GridCellRenderer/properties/OptionSet.d.ts +6 -0
- package/dist/components/GridCellRenderer/properties/OptionSet.js +11 -0
- package/dist/components/GridCellRenderer/properties/OptionSet.js.map +1 -0
- package/dist/components/GridCellRenderer/properties/OptionSetBase.d.ts +8 -0
- package/dist/components/GridCellRenderer/properties/OptionSetBase.js +19 -0
- package/dist/components/GridCellRenderer/properties/OptionSetBase.js.map +1 -0
- package/dist/components/GridCellRenderer/properties/Phone.d.ts +9 -0
- package/dist/components/GridCellRenderer/properties/Phone.js +15 -0
- package/dist/components/GridCellRenderer/properties/Phone.js.map +1 -0
- package/dist/components/GridCellRenderer/properties/Property.d.ts +20 -0
- package/dist/components/GridCellRenderer/properties/Property.js +54 -0
- package/dist/components/GridCellRenderer/properties/Property.js.map +1 -0
- package/dist/components/GridCellRenderer/properties/TwoOptions.d.ts +6 -0
- package/dist/components/GridCellRenderer/properties/TwoOptions.js +11 -0
- package/dist/components/GridCellRenderer/properties/TwoOptions.js.map +1 -0
- package/dist/components/GridCellRenderer/properties/Url.d.ts +5 -0
- package/dist/components/GridCellRenderer/properties/Url.js +15 -0
- package/dist/components/GridCellRenderer/properties/Url.js.map +1 -0
- package/dist/components/GridCellRenderer/styles.d.ts +34 -60
- package/dist/components/GridCellRenderer/styles.js +69 -77
- package/dist/components/GridCellRenderer/styles.js.map +1 -1
- package/dist/components/GridCellRenderer/translations.d.ts +1 -1
- package/dist/components/GridCellRenderer/translations.js +30 -32
- package/dist/components/GridCellRenderer/translations.js.map +1 -1
- package/dist/components/GridCellRenderer/useModel.d.ts +4 -0
- package/dist/components/GridCellRenderer/useModel.js +9 -0
- package/dist/components/GridCellRenderer/useModel.js.map +1 -0
- package/dist/components/GridColumnHeader/GridColumnHeader.d.ts +3 -0
- package/dist/components/GridColumnHeader/GridColumnHeader.js +134 -0
- package/dist/components/GridColumnHeader/GridColumnHeader.js.map +1 -0
- package/dist/components/GridColumnHeader/GridColumnHeaderModel.d.ts +26 -0
- package/dist/components/GridColumnHeader/GridColumnHeaderModel.js +87 -0
- package/dist/components/GridColumnHeader/GridColumnHeaderModel.js.map +1 -0
- package/dist/components/GridColumnHeader/interfaces.d.ts +45 -0
- package/dist/components/GridColumnHeader/styles.d.ts +37 -0
- package/dist/components/GridColumnHeader/styles.js +55 -0
- package/dist/components/GridColumnHeader/styles.js.map +1 -0
- package/dist/components/GridColumnHeader/translations.d.ts +26 -0
- package/dist/components/GridColumnHeader/translations.js +29 -0
- package/dist/components/GridColumnHeader/translations.js.map +1 -0
- package/dist/components/Lookup/Lookup.js +1 -1
- package/dist/components/Lookup/Lookup.js.map +1 -1
- package/dist/components/Lookup/hooks/useFetchXml.d.ts +1 -0
- package/dist/components/Lookup/hooks/useLookup.d.ts +1 -0
- package/dist/components/Lookup/hooks/useLookup.js +2 -2
- package/dist/components/Lookup/hooks/useLookup.js.map +1 -1
- package/dist/components/Lookup/interfaces.d.ts +1 -0
- package/dist/components/MultiSelectOptionSet/MultiSelectOptionSet.js +2 -2
- package/dist/components/MultiSelectOptionSet/MultiSelectOptionSet.js.map +1 -1
- package/dist/components/NestedControlRenderer/NestedControl.d.ts +3 -0
- package/dist/components/NestedControlRenderer/NestedControl.js +5 -2
- package/dist/components/NestedControlRenderer/NestedControl.js.map +1 -1
- package/dist/components/NestedControlRenderer/NestedControlRenderer.js +11 -6
- package/dist/components/NestedControlRenderer/NestedControlRenderer.js.map +1 -1
- package/dist/components/NestedControlRenderer/interfaces.d.ts +4 -0
- package/dist/components/NestedControlRenderer/properties/FileProperty.js +1 -1
- package/dist/components/NestedControlRenderer/properties/FileProperty.js.map +1 -1
- package/dist/components/NestedControlRenderer/properties/Property.d.ts +1 -0
- package/dist/components/OptionSet/OptionSet.js +5 -4
- package/dist/components/OptionSet/OptionSet.js.map +1 -1
- package/dist/components/OptionSet/shared.d.ts +1 -0
- package/dist/components/Ribbon/Ribbon.d.ts +3 -0
- package/dist/components/Ribbon/Ribbon.js +97 -0
- package/dist/components/Ribbon/Ribbon.js.map +1 -0
- package/dist/components/Ribbon/RibbonModel.d.ts +4 -0
- package/dist/components/Ribbon/interfaces.d.ts +19 -0
- package/dist/components/Ribbon/styles.d.ts +11 -0
- package/dist/components/Ribbon/styles.js +18 -0
- package/dist/components/Ribbon/styles.js.map +1 -0
- package/dist/components/TextField/TextField.js +1 -1
- package/dist/components/TextField/TextField.js.map +1 -1
- package/dist/components/index.js +1 -3
- package/dist/components/index.js.map +1 -1
- package/dist/hooks/useControl.d.ts +1 -0
- package/dist/hooks/useControl.js +1 -0
- package/dist/hooks/useControl.js.map +1 -1
- package/dist/hooks/useControlSizing.d.ts +1 -0
- package/dist/hooks/useEventEmitter.d.ts +2 -0
- package/dist/hooks/useEventEmitter.js +18 -0
- package/dist/hooks/useEventEmitter.js.map +1 -0
- package/dist/hooks/useInputBasedControl.js +2 -1
- package/dist/hooks/useInputBasedControl.js.map +1 -1
- package/dist/index.d.ts +163 -299
- package/dist/index.js +1 -3
- package/dist/index.js.map +1 -1
- package/dist/interfaces/context.d.ts +1 -0
- package/dist/interfaces/property.d.ts +2 -1
- package/dist/utils/BaseControls.d.ts +2 -1
- package/dist/utils/BaseControls.js +5 -1
- package/dist/utils/BaseControls.js.map +1 -1
- package/dist/utils/dataset/adapters/DatasetAdapter.d.ts +1 -0
- package/dist/utils/dataset/adapters/VirtualDatasetAdapter.d.ts +13 -16
- package/dist/utils/dataset/adapters/VirtualDatasetAdapter.js +27 -72
- package/dist/utils/dataset/adapters/VirtualDatasetAdapter.js.map +1 -1
- package/dist/utils/theme/ControlTheme.d.ts +1 -0
- package/dist/utils/theme/components/ThemeWrapper.d.ts +2 -1
- package/dist/utils/theme/components/ThemeWrapper.js.map +1 -1
- package/dist/utils/theme/hooks/useControlTheme.js +2 -1
- package/dist/utils/theme/hooks/useControlTheme.js.map +1 -1
- package/package.json +9 -5
- package/dist/components/DatasetControl/Paging/DatasetPaging.d.ts +0 -3
- package/dist/components/DatasetControl/Paging/DatasetPaging.js +0 -69
- package/dist/components/DatasetControl/Paging/DatasetPaging.js.map +0 -1
- package/dist/components/DatasetControl/Paging/Paging.d.ts +0 -26
- package/dist/components/DatasetControl/Paging/Paging.js +0 -80
- package/dist/components/DatasetControl/Paging/Paging.js.map +0 -1
- package/dist/components/DatasetControl/Paging/index.d.ts +0 -3
- package/dist/components/DatasetControl/Paging/index.js +0 -3
- package/dist/components/DatasetControl/Paging/index.js.map +0 -1
- package/dist/components/DatasetControl/Paging/interfaces.d.ts +0 -16
- package/dist/components/DatasetControl/Paging/styles.d.ts +0 -35
- package/dist/components/DatasetControl/Paging/styles.js +0 -41
- package/dist/components/DatasetControl/Paging/styles.js.map +0 -1
- package/dist/components/DatasetControl/Paging/translations.d.ts +0 -38
- package/dist/components/DatasetControl/Paging/translations.js +0 -14
- package/dist/components/DatasetControl/Paging/translations.js.map +0 -1
- package/dist/components/Grid/Grid.d.ts +0 -3
- package/dist/components/Grid/Grid.js +0 -37
- package/dist/components/Grid/Grid.js.map +0 -1
- package/dist/components/Grid/GridContext.d.ts +0 -3
- package/dist/components/Grid/GridContext.js.map +0 -1
- package/dist/components/Grid/aggregation/Aggregation.d.ts +0 -18
- package/dist/components/Grid/aggregation/Aggregation.js +0 -129
- package/dist/components/Grid/aggregation/Aggregation.js.map +0 -1
- package/dist/components/Grid/core/components/AgGrid/AgGrid.js +0 -203
- package/dist/components/Grid/core/components/AgGrid/AgGrid.js.map +0 -1
- package/dist/components/Grid/core/components/AgGrid/components/EmptyRecordsOverlay/EmptyRecords.js +0 -12
- package/dist/components/Grid/core/components/AgGrid/components/EmptyRecordsOverlay/EmptyRecords.js.map +0 -1
- package/dist/components/Grid/core/components/AgGrid/components/EmptyRecordsOverlay/styles.js.map +0 -1
- package/dist/components/Grid/core/components/AgGrid/components/LoadingOverlay/LoadingOverlay.js.map +0 -1
- package/dist/components/Grid/core/components/AgGrid/context.js.map +0 -1
- package/dist/components/Grid/core/components/AgGrid/model/AgGrid.d.ts +0 -52
- package/dist/components/Grid/core/components/AgGrid/model/AgGrid.js +0 -343
- package/dist/components/Grid/core/components/AgGrid/model/AgGrid.js.map +0 -1
- package/dist/components/Grid/core/components/AgGrid/model/Comparator.js.map +0 -1
- package/dist/components/Grid/core/components/AgGrid/styles.js.map +0 -1
- package/dist/components/Grid/core/components/Cell/Cell.js +0 -158
- package/dist/components/Grid/core/components/Cell/Cell.js.map +0 -1
- package/dist/components/Grid/core/components/Cell/CellContent/CellContent.js.map +0 -1
- package/dist/components/Grid/core/components/Cell/CellContent/styles.js.map +0 -1
- package/dist/components/Grid/core/components/Cell/Notifications/Notifications.js.map +0 -1
- package/dist/components/Grid/core/components/Cell/Notifications/styles.js.map +0 -1
- package/dist/components/Grid/core/components/Cell/styles.js +0 -59
- package/dist/components/Grid/core/components/Cell/styles.js.map +0 -1
- package/dist/components/Grid/core/components/ColumnHeader/ColumnHeader.js +0 -61
- package/dist/components/Grid/core/components/ColumnHeader/ColumnHeader.js.map +0 -1
- package/dist/components/Grid/core/components/ColumnHeader/components/GlobalCheckbox/GlobalCheckbox.d.ts +0 -2
- package/dist/components/Grid/core/components/ColumnHeader/components/GlobalCheckbox/GlobalCheckbox.js +0 -50
- package/dist/components/Grid/core/components/ColumnHeader/components/GlobalCheckbox/GlobalCheckbox.js.map +0 -1
- package/dist/components/Grid/core/components/ColumnHeader/components/GlobalCheckbox/styles.js.map +0 -1
- package/dist/components/Grid/core/components/ColumnHeader/styles.d.ts +0 -42
- package/dist/components/Grid/core/components/ColumnHeader/styles.js +0 -48
- package/dist/components/Grid/core/components/ColumnHeader/styles.js.map +0 -1
- package/dist/components/Grid/core/components/Dialog/Constants.d.ts +0 -2
- package/dist/components/Grid/core/components/Dialog/Constants.js +0 -9
- package/dist/components/Grid/core/components/Dialog/Constants.js.map +0 -1
- package/dist/components/Grid/core/components/Dialog/Styles.d.ts +0 -2
- package/dist/components/Grid/core/components/Dialog/Styles.js +0 -61
- package/dist/components/Grid/core/components/Dialog/Styles.js.map +0 -1
- package/dist/components/Grid/core/components/Dialog/index.d.ts +0 -4
- package/dist/components/Grid/core/components/Dialog/index.js +0 -16
- package/dist/components/Grid/core/components/Dialog/index.js.map +0 -1
- package/dist/components/Grid/core/components/Dialog/interfaces/index.d.ts +0 -6
- package/dist/components/Grid/core/components/Dialog/interfaces/index.js +0 -2
- package/dist/components/Grid/core/components/Dialog/interfaces/index.js.map +0 -1
- package/dist/components/Grid/core/components/Save/Save.d.ts +0 -2
- package/dist/components/Grid/core/components/Save/Save.js +0 -59
- package/dist/components/Grid/core/components/Save/Save.js.map +0 -1
- package/dist/components/Grid/core/components/Save/components/ChangeEditor/ChangeEditor.d.ts +0 -7
- package/dist/components/Grid/core/components/Save/components/ChangeEditor/ChangeEditor.js +0 -73
- package/dist/components/Grid/core/components/Save/components/ChangeEditor/ChangeEditor.js.map +0 -1
- package/dist/components/Grid/core/components/Save/components/ChangeEditor/components/ChangeGrid/ChangeGrid.d.ts +0 -11
- package/dist/components/Grid/core/components/Save/components/ChangeEditor/components/ChangeGrid/ChangeGrid.js +0 -231
- package/dist/components/Grid/core/components/Save/components/ChangeEditor/components/ChangeGrid/ChangeGrid.js.map +0 -1
- package/dist/components/Grid/core/components/Save/components/ChangeEditor/components/ChangeGrid/styles.d.ts +0 -39
- package/dist/components/Grid/core/components/Save/components/ChangeEditor/components/ChangeGrid/styles.js +0 -45
- package/dist/components/Grid/core/components/Save/components/ChangeEditor/components/ChangeGrid/styles.js.map +0 -1
- package/dist/components/Grid/core/components/Save/components/ChangeEditor/styles.d.ts +0 -31
- package/dist/components/Grid/core/components/Save/components/ChangeEditor/styles.js +0 -37
- package/dist/components/Grid/core/components/Save/components/ChangeEditor/styles.js.map +0 -1
- package/dist/components/Grid/core/components/Save/styles.d.ts +0 -35
- package/dist/components/Grid/core/components/Save/styles.js +0 -42
- package/dist/components/Grid/core/components/Save/styles.js.map +0 -1
- package/dist/components/Grid/core/controllers/useGridController.d.ts +0 -7
- package/dist/components/Grid/core/controllers/useGridController.js +0 -29
- package/dist/components/Grid/core/controllers/useGridController.js.map +0 -1
- package/dist/components/Grid/core/enums/ConditionOperator.d.ts +0 -48
- package/dist/components/Grid/core/enums/ConditionOperator.js +0 -52
- package/dist/components/Grid/core/enums/ConditionOperator.js.map +0 -1
- package/dist/components/Grid/core/enums/DataType.d.ts +0 -25
- package/dist/components/Grid/core/enums/DataType.js +0 -30
- package/dist/components/Grid/core/enums/DataType.js.map +0 -1
- package/dist/components/Grid/core/hooks/useGridInstance.d.ts +0 -2
- package/dist/components/Grid/core/hooks/useGridInstance.js.map +0 -1
- package/dist/components/Grid/core/hooks/useRefreshCallback.d.ts +0 -2
- package/dist/components/Grid/core/hooks/useRefreshCallback.js +0 -20
- package/dist/components/Grid/core/hooks/useRefreshCallback.js.map +0 -1
- package/dist/components/Grid/core/interfaces/IGridColumn.d.ts +0 -13
- package/dist/components/Grid/core/interfaces/IGridContext.d.ts +0 -4
- package/dist/components/Grid/core/model/Grid.d.ts +0 -81
- package/dist/components/Grid/core/model/Grid.js +0 -513
- package/dist/components/Grid/core/model/Grid.js.map +0 -1
- package/dist/components/Grid/core/model/GridDependency.d.ts +0 -13
- package/dist/components/Grid/core/model/GridDependency.js +0 -28
- package/dist/components/Grid/core/model/GridDependency.js.map +0 -1
- package/dist/components/Grid/core/services/KeyListener.d.ts +0 -12
- package/dist/components/Grid/core/services/KeyListener.js +0 -31
- package/dist/components/Grid/core/services/KeyListener.js.map +0 -1
- package/dist/components/Grid/filtering/components/FilterCallout/FilterCallout.js +0 -59
- package/dist/components/Grid/filtering/components/FilterCallout/FilterCallout.js.map +0 -1
- package/dist/components/Grid/filtering/components/FilterCallout/components/ConditionOperator/ConditionOperator.d.ts +0 -7
- package/dist/components/Grid/filtering/components/FilterCallout/components/ConditionOperator/ConditionOperator.js +0 -56
- package/dist/components/Grid/filtering/components/FilterCallout/components/ConditionOperator/ConditionOperator.js.map +0 -1
- package/dist/components/Grid/filtering/components/FilterCallout/components/ConditionValue/ConditionValue.d.ts +0 -7
- package/dist/components/Grid/filtering/components/FilterCallout/components/ConditionValue/ConditionValue.js +0 -73
- package/dist/components/Grid/filtering/components/FilterCallout/components/ConditionValue/ConditionValue.js.map +0 -1
- package/dist/components/Grid/filtering/components/FilterCallout/components/ConditionValue/ConditionValueBetween.d.ts +0 -7
- package/dist/components/Grid/filtering/components/FilterCallout/components/ConditionValue/ConditionValueBetween.js +0 -90
- package/dist/components/Grid/filtering/components/FilterCallout/components/ConditionValue/ConditionValueBetween.js.map +0 -1
- package/dist/components/Grid/filtering/components/FilterCallout/components/ConditionValue/model/ConditionComponentValue.d.ts +0 -48
- package/dist/components/Grid/filtering/components/FilterCallout/components/ConditionValue/model/ConditionComponentValue.js +0 -146
- package/dist/components/Grid/filtering/components/FilterCallout/components/ConditionValue/model/ConditionComponentValue.js.map +0 -1
- package/dist/components/Grid/filtering/components/FilterCallout/components/LegacyControlRendering/Component.d.ts +0 -11
- package/dist/components/Grid/filtering/components/FilterCallout/components/LegacyControlRendering/Component.js +0 -53
- package/dist/components/Grid/filtering/components/FilterCallout/components/LegacyControlRendering/Component.js.map +0 -1
- package/dist/components/Grid/filtering/components/FilterCallout/components/LegacyControlRendering/controller/useComponentController.d.ts +0 -9
- package/dist/components/Grid/filtering/components/FilterCallout/components/LegacyControlRendering/controller/useComponentController.js +0 -31
- package/dist/components/Grid/filtering/components/FilterCallout/components/LegacyControlRendering/controller/useComponentController.js.map +0 -1
- package/dist/components/Grid/filtering/components/FilterCallout/components/LegacyControlRendering/model/Component.d.ts +0 -10
- package/dist/components/Grid/filtering/components/FilterCallout/components/LegacyControlRendering/model/Component.js +0 -294
- package/dist/components/Grid/filtering/components/FilterCallout/components/LegacyControlRendering/model/Component.js.map +0 -1
- package/dist/components/Grid/filtering/components/FilterCallout/styles.d.ts +0 -35
- package/dist/components/Grid/filtering/components/FilterCallout/styles.js.map +0 -1
- package/dist/components/Grid/filtering/constants.d.ts +0 -5
- package/dist/components/Grid/filtering/constants.js +0 -53
- package/dist/components/Grid/filtering/constants.js.map +0 -1
- package/dist/components/Grid/filtering/controller/useColumnFilterConditionController.d.ts +0 -21
- package/dist/components/Grid/filtering/controller/useColumnFilterConditionController.js +0 -44
- package/dist/components/Grid/filtering/controller/useColumnFilterConditionController.js.map +0 -1
- package/dist/components/Grid/filtering/model/Condition.d.ts +0 -49
- package/dist/components/Grid/filtering/model/Condition.js +0 -347
- package/dist/components/Grid/filtering/model/Condition.js.map +0 -1
- package/dist/components/Grid/filtering/model/Filtering.d.ts +0 -11
- package/dist/components/Grid/filtering/model/Filtering.js +0 -78
- package/dist/components/Grid/filtering/model/Filtering.js.map +0 -1
- package/dist/components/Grid/filtering/utils/FilteringUtilts.d.ts +0 -34
- package/dist/components/Grid/filtering/utils/FilteringUtilts.js +0 -195
- package/dist/components/Grid/filtering/utils/FilteringUtilts.js.map +0 -1
- package/dist/components/Grid/selection/model/Selection.d.ts +0 -12
- package/dist/components/Grid/selection/model/Selection.js +0 -54
- package/dist/components/Grid/selection/model/Selection.js.map +0 -1
- package/dist/components/Grid/sorting/Sorting.d.ts +0 -10
- package/dist/components/Grid/sorting/Sorting.js +0 -31
- package/dist/components/Grid/sorting/Sorting.js.map +0 -1
- package/dist/components/Grid/sorting/components/SortingContextualMenu/SortingContextualMenu.js +0 -157
- package/dist/components/Grid/sorting/components/SortingContextualMenu/SortingContextualMenu.js.map +0 -1
- package/dist/components/Grid/sorting/components/SortingContextualMenu/styles.d.ts +0 -9
- package/dist/components/Grid/sorting/components/SortingContextualMenu/styles.js +0 -15
- package/dist/components/Grid/sorting/components/SortingContextualMenu/styles.js.map +0 -1
- package/dist/components/Grid/sorting/controllers/useColumnSortingController.d.ts +0 -9
- package/dist/components/Grid/sorting/controllers/useColumnSortingController.js +0 -22
- package/dist/components/Grid/sorting/controllers/useColumnSortingController.js.map +0 -1
- package/dist/components/GridCellRenderer/DefaultContentRenderer/DefaultContentRenderer.d.ts +0 -2
- package/dist/components/GridCellRenderer/DefaultContentRenderer/DefaultContentRenderer.js +0 -11
- package/dist/components/GridCellRenderer/DefaultContentRenderer/DefaultContentRenderer.js.map +0 -1
- package/dist/components/GridCellRenderer/DefaultContentRenderer/index.d.ts +0 -1
- package/dist/components/GridCellRenderer/DefaultContentRenderer/index.js +0 -2
- package/dist/components/GridCellRenderer/DefaultContentRenderer/index.js.map +0 -1
- package/dist/components/GridCellRenderer/OptionSet/OptionSet.d.ts +0 -5
- package/dist/components/GridCellRenderer/OptionSet/OptionSet.js +0 -75
- package/dist/components/GridCellRenderer/OptionSet/OptionSet.js.map +0 -1
- package/dist/components/GridCellRenderer/OptionSet/index.d.ts +0 -1
- package/dist/components/GridCellRenderer/OptionSet/index.js +0 -2
- package/dist/components/GridCellRenderer/OptionSet/index.js.map +0 -1
- package/dist/components/GridCellRenderer/OptionSet/styles.d.ts +0 -20
- package/dist/components/GridCellRenderer/OptionSet/styles.js +0 -29
- package/dist/components/GridCellRenderer/OptionSet/styles.js.map +0 -1
- package/dist/components/GridCellRenderer/RecordCommands/Icon.d.ts +0 -7
- package/dist/components/GridCellRenderer/RecordCommands/Icon.js +0 -32
- package/dist/components/GridCellRenderer/RecordCommands/Icon.js.map +0 -1
- package/dist/components/GridCellRenderer/RecordCommands/RecordCommands.d.ts +0 -13
- package/dist/components/GridCellRenderer/RecordCommands/RecordCommands.js +0 -103
- package/dist/components/GridCellRenderer/RecordCommands/RecordCommands.js.map +0 -1
- package/dist/components/GridCellRenderer/RecordCommands/styles.d.ts +0 -13
- package/dist/components/GridCellRenderer/RecordCommands/styles.js +0 -32
- package/dist/components/GridCellRenderer/RecordCommands/styles.js.map +0 -1
- package/dist/components/GridCellRenderer/useComponentProps.d.ts +0 -6
- package/dist/components/GridCellRenderer/useComponentProps.js +0 -10
- package/dist/components/GridCellRenderer/useComponentProps.js.map +0 -1
- /package/dist/components/Grid/{core/components/Cell/CellContent → cells/cell/content}/styles.d.ts +0 -0
- /package/dist/components/Grid/{core/components/Cell/CellContent → cells/cell/content}/styles.js +0 -0
- /package/dist/components/Grid/{core/components/Cell/Notifications → cells/cell/notifications}/styles.d.ts +0 -0
- /package/dist/components/Grid/{core/components/ColumnHeader/components/GlobalCheckbox → column-headers/record-selection-checkbox}/styles.d.ts +0 -0
- /package/dist/components/Grid/{core/components/ColumnHeader/components/GlobalCheckbox → column-headers/record-selection-checkbox}/styles.js +0 -0
- /package/dist/components/Grid/{GridContext.js → grid/GridContext.js} +0 -0
- /package/dist/components/Grid/{core/components/AgGrid/components/EmptyRecordsOverlay/EmptyRecords.d.ts → overlays/empty-records/EmptyRecordsOverlay.d.ts} +0 -0
- /package/dist/components/Grid/{core/components/AgGrid/components/LoadingOverlay → overlays/loading}/LoadingOverlay.d.ts +0 -0
- /package/dist/components/Grid/{core/components/AgGrid/components/LoadingOverlay → overlays/loading}/LoadingOverlay.js +0 -0
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"AgGrid.js","sources":["../../../../../../../src/components/Grid/core/components/AgGrid/model/AgGrid.ts"],"sourcesContent":["import { CellClassParams, ColDef, ColumnMovedEvent, ColumnResizedEvent, EditableCallbackParams, GridApi, IRowNode, RowNode, SuppressKeyboardEventParams } from \"@ag-grid-community/core\";\nimport { Grid } from \"../../../model/Grid\";\nimport { GridDependency } from \"../../../model/GridDependency\";\nimport { IGridColumn } from \"../../../interfaces/IGridColumn\";\nimport { CHECKBOX_COLUMN_KEY } from \"../../../../constants\";\nimport { DataTypes, IAddControlNotificationOptions, IColumn, IColumnInfo, IControlParameters, ICustomColumnComponent, ICustomColumnControl, ICustomColumnFormatting, IRecord, Sanitizer } from \"@talxis/client-libraries\";\nimport { GlobalCheckBox } from \"../../ColumnHeader/components/GlobalCheckbox/GlobalCheckbox\";\nimport { ColumnHeader } from \"../../ColumnHeader/ColumnHeader\";\nimport { Cell } from \"../../Cell/Cell\";\nimport { ITheme, merge } from \"@fluentui/react\";\nimport { Theming } from \"@talxis/react-components\";\nimport { Comparator } from \"./Comparator\";\nimport { NestedControl } from \"../../../../../NestedControlRenderer/NestedControl\";\n\nexport interface ICellValues {\n notifications: IAddControlNotificationOptions[];\n customFormatting: Required<ICustomColumnFormatting>;\n customControl: Required<ICustomColumnControl>;\n customComponent: ICustomColumnComponent;\n loading: boolean;\n value: any;\n error: boolean;\n height: number;\n errorMessage: string;\n parameters: IControlParameters;\n columnAlignment: Required<IColumn['alignment']>;\n editing: boolean;\n editable: boolean;\n disabled: boolean;\n}\n\nexport class AgGrid extends GridDependency {\n private _gridApiRef: React.MutableRefObject<GridApi<ComponentFramework.PropertyHelper.DataSetApi.EntityRecord> | undefined>;\n private _theme: ITheme;\n private _rerenderCallback: () => void = () => { };\n private _rerenderGlobalCheckBox: () => void = () => { };\n private _comparator: Comparator = new Comparator();\n public readonly oddRowCellTheme: ITheme;\n public readonly evenRowCellTheme: ITheme;\n\n constructor(grid: Grid, gridApiRef: React.MutableRefObject<GridApi<ComponentFramework.PropertyHelper.DataSetApi.EntityRecord> | undefined>, theme: ITheme) {\n super(grid);\n this._gridApiRef = gridApiRef;\n this._theme = theme;\n this._grid.dataset.addEventListener('onRecordsSelected', (ids) => {\n this.refreshRowSelection();\n })\n this.oddRowCellTheme = Theming.GenerateThemeV8(this._theme.palette.themePrimary, this._theme.palette.neutralLighterAlt, this._theme.semanticColors.bodyText);\n this.evenRowCellTheme = Theming.GenerateThemeV8(this._theme.palette.themePrimary, this._theme.palette.white, this._theme.semanticColors.bodyText);\n }\n public getColumns() {\n const agColumns: ColDef[] = [];\n for (const column of this._grid.columns) {\n const agColumn: ColDef = {\n colId: column.name,\n field: column.name,\n headerName: column.displayName,\n hide: column.isHidden,\n width: column.visualSizeFactor,\n sortable: !column.disableSorting,\n resizable: column.isResizable,\n autoHeaderHeight: true,\n suppressMovable: column.isDraggable === false ? true : false,\n suppressSizeToFit: column.name === CHECKBOX_COLUMN_KEY,\n suppressKeyboardEvent: (params) => this._suppressKeyboardEvent(params, column),\n cellRenderer: Cell,\n cellEditor: Cell,\n editable: (p) => this._isColumnEditable(column, p),\n headerComponent: ColumnHeader,\n onCellClicked: (event) => {\n this._grid.dataset.fireEventListeners?.('onRecordColumnClick', event.data, column.name);\n },\n valueFormatter: (p) => {\n if (column.name === CHECKBOX_COLUMN_KEY) {\n return null;\n }\n return p.data?.getFormattedValue(column.name)\n },\n valueGetter: (p: any) => this._getValue(p, column),\n equals: (valueA, valueB) => {\n return this._comparator.isEqual(valueA, valueB);\n },\n cellRendererParams: {\n baseColumn: column,\n isCellEditor: false\n },\n cellEditorParams: {\n baseColumn: column,\n isCellEditor: true\n },\n headerComponentParams: {\n baseColumn: column\n },\n }\n if (agColumn.field === CHECKBOX_COLUMN_KEY) {\n agColumn.lockPosition = 'left';\n agColumn.headerComponent = GlobalCheckBox;\n }\n agColumns.push(agColumn)\n }\n return agColumns;\n }\n\n public refresh() {\n if (this._grid.loading) {\n return;\n }\n this._gridApi?.resetRowHeights();\n this._gridApi?.refreshCells({\n rowNodes: this._gridApi.getRenderedNodes()\n });\n }\n\n public setGlobalCheckBoxRenderer(renderer: () => void) {\n this._rerenderGlobalCheckBox = renderer;\n }\n\n public rerenderGlobalCheckBox() {\n this._rerenderGlobalCheckBox();\n }\n\n public updateColumnOrder(e: ColumnMovedEvent<IRecord, any>) {\n if (e.type === 'gridOptionsChanged' || !e.finished) {\n return;\n }\n const sortedIds = e.api.getState().columnOrder?.orderedColIds;\n if (!sortedIds) {\n return;\n }\n const idIndexMap = new Map<string, number>();\n sortedIds.forEach((id, index) => {\n idIndexMap.set(id, index);\n });\n\n const orderedColumns = [...this._grid.dataset.columns].sort((a, b) => {\n const aIndex = idIndexMap.has(a.name) ? idIndexMap.get(a.name)! : sortedIds.length;\n const bIndex = idIndexMap.has(b.name) ? idIndexMap.get(b.name)! : sortedIds.length;\n return aIndex - bIndex;\n });\n this._grid.dataset.setColumns?.(orderedColumns);\n }\n\n public updateColumnVisualSizeFactor(e: ColumnResizedEvent<IRecord, any>) {\n const resizedColumnKey = this._grid.dataset.columns.find(x => x.name === e.column?.getId())?.name;\n if (!resizedColumnKey) {\n return;\n }\n const columns = this._grid.dataset.columns;\n for (let i = 0; i < columns.length; i++) {\n if (columns[i].name === resizedColumnKey) {\n columns[i].visualSizeFactor = e.column?.getActualWidth()!\n }\n }\n this._grid.dataset.setColumns?.(columns);\n this.refresh();\n }\n\n public toggleOverlay() {\n if (this._grid.loading) {\n this._gridApi?.showLoadingOverlay();\n }\n else {\n setTimeout(() => {\n if (this._grid.dataset.sortedRecordIds.length === 0) {\n this._gridApi?.showNoRowsOverlay();\n }\n }, 0);\n }\n }\n\n public copyCellValue(event: KeyboardEvent) {\n if ((event.ctrlKey || event.metaKey) && event.key.toLowerCase() === 'c') {\n const cell = this._gridApi?.getFocusedCell();\n if (!cell) {\n return;\n }\n let record: IRecord | undefined;\n //aggregated record\n if(cell.rowPinned) {\n record = this._gridApi?.getPinnedBottomRow(cell.rowIndex)?.data;\n }\n else {\n record = this._gridApi?.getDisplayedRowAtIndex(cell.rowIndex)?.data as IRecord;\n }\n if (record) {\n navigator.clipboard.writeText(record.getFormattedValue(cell.column.getColId()) ?? '');\n }\n }\n }\n\n public getRowHeight(record?: IRecord) {\n const columnWidths: { [name: string]: number } = {};\n this._gridApi?.getAllGridColumns().map(col => {\n columnWidths[col.getColId()] = col.getActualWidth()\n })\n if (Object.keys(columnWidths).length === 0) {\n return this._grid.rowHeight;\n }\n //not defined for grouping\n return record?.getHeight(columnWidths, this._grid.rowHeight) ?? this._grid.rowHeight;\n }\n\n public getTotalColumnsWidth() {\n if (!this._gridApi) {\n return 0;\n }\n let width = 0;\n for (const column of this._gridApi.getAllDisplayedColumns()) {\n width = width + column.getActualWidth();\n }\n return width;\n }\n public refreshRowSelection() {\n if (!this._gridApi) {\n return;\n }\n const selectedIdsSet = new Set(this._grid.dataset.getSelectedRecordIds().map(id => id));\n this._gridApi.forEachNode(node => {\n if (selectedIdsSet.has(node.id!)) {\n node.setSelected(true);\n }\n else {\n node.setSelected(false);\n }\n })\n this._gridApi.refreshCells({\n columns: [CHECKBOX_COLUMN_KEY],\n force: true,\n })\n this._rerenderGlobalCheckBox();\n }\n\n public getCellFormatting(params: CellClassParams<IRecord, any>): Required<ICustomColumnFormatting> {\n //get the latest reference - ag grid might still be referencing the old one and give us wrong index\n const record = this._grid.dataset.records[params.data!.getRecordId()];\n const isEven = record?.getIndex() % 2 === 0;\n const defaultTheme = this.getDefaultCellTheme(isEven);\n const defaultBackgroundColor = defaultTheme.semanticColors.bodyBackground;\n const colId = params.colDef.colId!;\n\n // Handle checkbox column specifically\n if (colId === CHECKBOX_COLUMN_KEY || !params.data) {\n return {\n primaryColor: this._theme.palette.themePrimary,\n backgroundColor: defaultBackgroundColor,\n textColor: Theming.GetTextColorForBackground(defaultBackgroundColor),\n className: '',\n themeOverride: {}\n };\n }\n\n const customFormatting = params.data!.getColumnInfo(colId).ui.getCustomFormatting(defaultTheme) ?? {};\n\n // Prepare the result with defaults\n const result: Required<ICustomColumnFormatting> = {\n backgroundColor: customFormatting.backgroundColor ?? defaultBackgroundColor,\n primaryColor: customFormatting.primaryColor ?? this._theme.palette.themePrimary,\n textColor: customFormatting.textColor ?? '',\n className: customFormatting.className ?? '',\n themeOverride: customFormatting.themeOverride ?? {}\n };\n\n // Apply background-specific adjustments\n if (result.backgroundColor !== defaultBackgroundColor) {\n result.themeOverride = merge({}, {\n fonts: {\n medium: {\n fontWeight: 600\n }\n }\n }, result.themeOverride);\n\n if (!customFormatting.primaryColor) {\n result.primaryColor = Theming.GetTextColorForBackground(result.backgroundColor);\n }\n }\n\n // Ensure text color is set\n if (!result.textColor) {\n result.textColor = Theming.GetTextColorForBackground(result.backgroundColor);\n }\n\n return result;\n }\n\n public getDefaultCellTheme(isEven: boolean): ITheme {\n if (isEven || !this._grid.isZebraEnabled) {\n return this.evenRowCellTheme;\n }\n return this.oddRowCellTheme;\n }\n\n\n public setRerenderCallback(callback: () => void) {\n this._rerenderCallback = callback;\n }\n\n public rerender() {\n this._rerenderCallback();\n }\n\n private get _gridApi() {\n return this._gridApiRef.current;\n }\n\n private _isColumnEditable(column: IGridColumn, params: EditableCallbackParams<IRecord, any>): boolean {\n if (column.name === CHECKBOX_COLUMN_KEY) {\n return false;\n }\n //we cannot edit aggregated or grouped columns\n if (params?.data?.getDataProvider().getSummarizationType() !== 'none') {\n return false;\n }\n const columnInfo = params.data?.getColumnInfo(column.name);\n if (!this._grid.parameters.EnableEditing?.raw || columnInfo?.ui.isLoading() === true) {\n return false;\n }\n //disable ag grid cell editor if oneClickEdit is enabled\n //editor control will be used in cell renderer\n if (column.oneClickEdit) {\n return false;\n }\n return columnInfo?.security.editable ?? true;\n }\n private _suppressKeyboardEvent(params: SuppressKeyboardEventParams<IRecord, any>, column: IGridColumn) {\n if (params.event.key !== 'Enter' || params.api.getEditingCells().length === 0) {\n return false;\n }\n switch (column.dataType) {\n case DataTypes.DateAndTimeDateAndTime:\n case DataTypes.DateAndTimeDateOnly:\n case DataTypes.LookupOwner:\n case DataTypes.LookupCustomer:\n case DataTypes.LookupRegarding:\n case DataTypes.LookupSimple:\n case DataTypes.MultiSelectOptionSet:\n case DataTypes.OptionSet:\n case DataTypes.TwoOptions:\n case DataTypes.WholeDuration: {\n return true;\n }\n }\n return false;\n }\n\n private _getValue(p: any, column: IGridColumn) {\n if (column.name === CHECKBOX_COLUMN_KEY || !p.data) {\n return {\n customFormatting: this.getCellFormatting(p)\n }\n }\n let editing: boolean = false;\n const record = p.data as IRecord;\n const columnInfo = p.data!.getColumnInfo(column.name) as IColumnInfo;\n //i hate this, there is no other way to get the information if we are in edit mode or not\n if (p.api.getEditingCells() > 0 || Error().stack!.includes('startEditing')) {\n editing = true;\n }\n const customControl = this._grid.getControl(column, record, editing || !!column.oneClickEdit);\n const control = new NestedControl({\n onGetBindings: () => this._grid.getBindings(record, column, customControl),\n parentPcfContext: this._grid.pcfContext,\n });\n const parameters = columnInfo.ui.getControlParameters({\n ...control.getParameters(),\n ...this._grid.getParameters(record, column, editing),\n })\n if (column.oneClickEdit) {\n editing = true;\n }\n const isAggregatedRecord = record.getDataProvider().getSummarizationType() === 'aggregation';\n const values = {\n notifications: columnInfo.ui.getNotifications(),\n value: p.data!.getValue(column.name),\n customFormatting: this.getCellFormatting(p),\n customControl: customControl,\n height: p.node.rowHeight,\n //validations need to be disabled for aggregated records\n error: isAggregatedRecord ? false : columnInfo.error,\n loading: columnInfo.ui.isLoading(),\n errorMessage: columnInfo.errorMessage,\n editable: columnInfo.security.editable,\n editing: editing,\n parameters: parameters,\n columnAlignment: column.alignment,\n customComponent: columnInfo.ui.getCustomControlComponent()\n } as ICellValues;\n return values;\n }\n}"],"names":[],"mappings":";;;;;;;;;;;AA+BM,MAAO,MAAO,SAAQ,cAAc,CAAA;AAStC,IAAA,WAAA,CAAY,IAAU,EAAE,UAAkH,EAAE,KAAa,EAAA;QACrJ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,SAAS;;YAExB,KAAK,EAAE,kBAAkB,GAAG,KAAK,GAAG,UAAU,CAAC,KAAK;AACpD,YAAA,OAAO,EAAE,UAAU,CAAC,EAAE,CAAC,SAAS,EAAE;YAClC,YAAY,EAAE,UAAU,CAAC,YAAY;AACrC,YAAA,QAAQ,EAAE,UAAU,CAAC,QAAQ,CAAC,QAAQ;AACtC,YAAA,OAAO,EAAE,OAAO;AAChB,YAAA,UAAU,EAAE,UAAU;YACtB,eAAe,EAAE,MAAM,CAAC,SAAS;AACjC,YAAA,eAAe,EAAE,UAAU,CAAC,EAAE,CAAC,yBAAyB,EAAE;SAC9C,CAAC;AACjB,QAAA,OAAO,MAAM,CAAC;KACjB;AACJ;;;;"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Comparator.js","sources":["../../../../../../../src/components/Grid/core/components/AgGrid/model/Comparator.ts"],"sourcesContent":["import { IAddControlNotificationOptions, ICustomColumnComponent, ICustomColumnFormatting } from \"@talxis/client-libraries\";\nimport deepEqual from 'fast-deep-equal/es6';\nimport { ICellValues } from \"./AgGrid\";\n\nexport class Comparator {\n\n public isEqual(oldValues?: ICellValues, newValues?: ICellValues) {\n if (!this._isEqual(oldValues?.value, newValues?.value)) {\n return false;\n }\n if (!this._isEqual(oldValues?.height, newValues?.height)) {\n return false;\n }\n if (!this._isEqual(oldValues?.columnAlignment, newValues?.columnAlignment)) {\n return false;\n }\n if (!this._isEqual(this._filterParameters(oldValues?.parameters), this._filterParameters(newValues?.parameters))) {\n return false;\n }\n if (!this._areNotificationsEqual(oldValues?.notifications ?? [], newValues?.notifications ?? [])) {\n return false;\n }\n if (!this._isEqual(this._parseFormatting(oldValues?.customFormatting), this._parseFormatting(newValues?.customFormatting))) {\n return false;\n }\n if (!this._isEqual(oldValues?.customControl, newValues?.customControl)) {\n return false;\n }\n if (!this._isEqual(oldValues?.error, newValues?.error)) {\n return false;\n }\n if (!this._isEqual(oldValues?.errorMessage, newValues?.errorMessage)) {\n return false;\n }\n if (!this._isEqual(oldValues?.editable, newValues?.editable)) {\n return false;\n }\n if (!this._isEqual(oldValues?.loading, newValues?.loading)) {\n return false;\n }\n if (!this._isEqual(this._parseCustomComponent(oldValues?.customComponent), this._parseCustomComponent(newValues?.customComponent))) {\n return false;\n }\n return true;\n\n }\n\n private _isEqual(previousValue: any, newValue: any): boolean {\n return deepEqual(previousValue ?? {}, newValue ?? {});\n }\n\n private _areNotificationsEqual(previousNotifications: IAddControlNotificationOptions[], newNotifications: IAddControlNotificationOptions[]): boolean {\n const previousNotificationIds = previousNotifications.map(x => x.uniqueId);\n const newNotificationIds = newNotifications.map(x => x.uniqueId);\n\n return this._isEqual(previousNotificationIds, newNotificationIds);\n }\n\n //ignore the components folder when calculating the diff\n private _parseFormatting(formatting?: ICustomColumnFormatting) {\n if (formatting?.themeOverride) {\n return {\n ...formatting,\n themeOverride: {\n ...formatting.themeOverride,\n components: {}\n }\n }\n }\n return formatting;\n }\n\n private _filterParameters(params: any) {\n if (!params) return {};\n const { Dataset, Record, Column, ...filteredParams } = params;\n let paramsToCompare: any = {};\n Object.entries(filteredParams).map(([key, parameter]: any) => {\n paramsToCompare[key] = { ...parameter };\n delete paramsToCompare[key].attributes;\n Object.entries(paramsToCompare[key]).map(([attributePropKey, value]) => {\n if (typeof value === 'function') {\n delete paramsToCompare[key][attributePropKey];\n }\n })\n\n })\n return paramsToCompare;\n }\n\n private _parseCustomComponent(component?: ICustomColumnComponent) {\n return component?.key ?? '';\n }\n\n}"],"names":[],"mappings":";;MAIa,UAAU,CAAA;IAEZ,OAAO,CAAC,SAAuB,EAAE,SAAuB,EAAA;AAC3D,QAAA,IAAI,CAAC,IAAI,CAAC,QAAQ,CAAC,SAAS,EAAE,KAAK,EAAE,SAAS,EAAE,KAAK,CAAC,EAAE;AACpD,YAAA,OAAO,KAAK,CAAC;AAChB,SAAA;AACD,QAAA,IAAI,CAAC,IAAI,CAAC,QAAQ,CAAC,SAAS,EAAE,MAAM,EAAE,SA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;AACD,QAAA,OAAO,UAAU,CAAC;KACrB;AAEO,IAAA,iBAAiB,CAAC,MAAW,EAAA;AACjC,QAAA,IAAI,CAAC,MAAM;AAAE,YAAA,OAAO,EAAE,CAAC;AACvB,QAAA,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,GAAG,cAAc,EAAE,GAAG,MAAM,CAAC;QAC9D,IAAI,eAAe,GAAQ,EAAE,CAAC;AAC9B,QAAA,MAAM,CAAC,OAAO,CAAC,cAAc,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,GAAG,EAAE,SAAS,CAAM,KAAI;YACzD,eAAe,CAAC,GAAG,CAAC,GAAG,EAAE,GAAG,SAAS,EAAE,CAAC;AACxC,YAAA,OAAO,eAAe,CAAC,GAAG,CAAC,CAAC,UAAU,CAAC;AACvC,YAAA,MAAM,CAAC,OAAO,CAAC,eAAe,CAAC,GAAG,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,gBAAgB,EAAE,KAAK,CAAC,KAAI;AACnE,gBAAA,IAAI,OAAO,KAAK,KAAK,UAAU,EAAE;AAC7B,oBAAA,OAAO,eAAe,CAAC,GAAG,CAAC,CAAC,gBAAgB,CAAC,CAAC;AACjD,iBAAA;AACL,aAAC,CAAC,CAAA;AAEN,SAAC,CAAC,CAAA;AACF,QAAA,OAAO,eAAe,CAAC;KAC1B;AAEO,IAAA,qBAAqB,CAAC,SAAkC,EAAA;AAC5D,QAAA,OAAO,SAAS,EAAE,GAAG,IAAI,EAAE,CAAC;KAC/B;AAEJ;;;;"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"styles.js","sources":["../../../../../../src/components/Grid/core/components/AgGrid/styles.ts"],"sourcesContent":["import { ITheme, mergeStyleSets } from \"@fluentui/react\";\n\nexport const getGridStyles = (theme: ITheme) => {\n return mergeStyleSets({\n root: {\n height: '100%',\n display: 'flex',\n flexDirection: 'column',\n '--ag-borders': 'none !important',\n '.ag-root-wrapper': {\n maxHeight: '100%',\n '--ag-selected-row-background-color': theme.palette.themePrimary,\n '--ag-range-selection-border-color': theme.palette.themePrimary,\n '--ag-row-hover-color': theme.palette.black,\n '--ag-row-border-color': theme.semanticColors.menuDivider,\n '--ag-cell-horizontal-padding': 0,\n '--ag-input-focus-border-color': theme.semanticColors.inputFocusBorderAlt,\n borderBottom: `1px solid ${theme.semanticColors.menuDivider}`,\n '.ag-row::before': {\n zIndex: 1\n },\n '.ag-row-hover::before': {\n opacity: 0.1\n },\n '.ag-row-selected::before': {\n opacity: 0.2\n }\n },\n '.ag-root': {\n minHeight: 180\n },\n '.ag-body': {\n borderTop: `1px solid ${theme.semanticColors.menuDivider}`\n },\n '.ag-header-viewport': {\n backgroundColor: `${theme.semanticColors.bodyBackground}`\n },\n '.ag-center-cols-container': {\n minWidth: '100%',\n },\n '.ag-layout-auto-height .ag-center-cols-clipper, .ag-layout-auto-height .ag-center-cols-container, .ag-layout-print .ag-center-cols-clipper, .ag-layout-print .ag-center-cols-container': {\n minHeight: '42px !important'\n },\n '.ag-header-cell': {\n paddingLeft: 0,\n paddingRight: 0,\n backgroundColor: `${theme.semanticColors.bodyBackground} !important`\n },\n '.ag-cell': {\n border: 'none !important',\n borderRadius: 0\n },\n '.ag-cell-focus': {\n zIndex: 2,\n '::after': {\n content: \"''\",\n position: 'absolute',\n inset: '-1px',\n border: `3px solid ${theme.semanticColors.inputFocusBorderAlt}`,\n borderRadius: theme.effects.roundedCorner2,\n pointerEvents: 'none'\n }\n },\n '.ag-cell-focus:has([data-is-valid=\"false\"])': {\n '::after': {\n borderColor: `${theme.semanticColors.errorIcon} !important`\n }\n },\n '.ag-floating-bottom .ag-row-pinned': {\n borderTop: `1px solid ${theme.semanticColors.menuDivider}`,\n borderBottom: 'none',\n }\n }\n })\n};"],"names":[],"mappings":";;AAEa,MAAA,aAAa,GAAG,CAAC,KAAa,KAAI;AAC3C,IAAA,OAAO,cAAc,CAAC;AAClB,QAAA,IAAI,EAAE;AACF,YAA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AAiB;AAC/B,aAAA;AACD,YAAA,iBAAiB,EAAE;AACf,gBAAA,WAAW,EAAE,CAAC;AACd,gBAAA,YAAY,EAAE,CAAC;AACf,gBAAA,eAAe,EAAE,CAAG,EAAA,KAAK,CAAC,cAAc,CAAC,cAAc,CAAa,WAAA,CAAA;AACvE,aAAA;AACD,YAAA,UAAU,EAAE;AACR,gBAAA,MAAM,EAAE,iBAAiB;AACzB,gBAAA,YAAY,EAAE,CAAC;AAClB,aAAA;AACD,YAAA,gBAAgB,EAAE;AACd,gBAAA,MAAM,EAAE,CAAC;AACT,gBAAA,SAAS,EAAE;AACP,oBAAA,OAAO,EAAE,IAAI;AACb,oBAAA,QAAQ,EAAE,UAAU;AACpB,oBAAA,KAAK,EAAE,MAAM;AACb,oBAAA,MAAM,EAAE,CAAa,UAAA,EAAA,KAAK,CAAC,cAAc,CAAC,mBAAmB,CAAE,CAAA;AAC/D,oBAAA,YAAY,EAAE,KAAK,CAAC,OAAO,CAAC,cAAc;AAC1C,oBAAA,aAAa,EAAE,MAAM;AACxB,iBAAA;AACJ,aAAA;AACD,YAAA,6CAA6C,EAAE;AAC3C,gBAAA,SAAS,EAAE;AACP,oBAAA,WAAW,EAAE,CAAG,EAAA,KAAK,CAAC,cAAc,CAAC,SAAS,CAAa,WAAA,CAAA;AAC9D,iBAAA;AACJ,aAAA;AACD,YAAA,oCAAoC,EAAE;AAClC,gBAAA,SAAS,EAAE,CAAa,UAAA,EAAA,KAAK,CAAC,cAAc,CAAC,WAAW,CAAE,CAAA;AAC1D,gBAAA,YAAY,EAAE,MAAM;AACvB,aAAA;AACJ,SAAA;AACJ,KAAA,CAAC,CAAA;AACN;;;;"}
|
|
@@ -1,158 +0,0 @@
|
|
|
1
|
-
import { jsx, Fragment, jsxs } from 'react/jsx-runtime';
|
|
2
|
-
import { Constants } from '@talxis/client-libraries';
|
|
3
|
-
import { ThemeProvider, Checkbox, useTheme, Shimmer } from '@fluentui/react';
|
|
4
|
-
import { useMemo, useState, useEffect } from 'react';
|
|
5
|
-
import { getCellStyles, getInnerCellStyles } from './styles.js';
|
|
6
|
-
import { CHECKBOX_COLUMN_KEY } from '../../../constants.js';
|
|
7
|
-
import { useGridInstance } from '../../hooks/useGridInstance.js';
|
|
8
|
-
import { Notifications } from './Notifications/Notifications.js';
|
|
9
|
-
import { CellContent } from './CellContent/CellContent.js';
|
|
10
|
-
import { useThemeGenerator, getClassNames } from '@talxis/react-components';
|
|
11
|
-
import { useControlTheme } from '../../../../../utils/theme/hooks/useControlTheme.js';
|
|
12
|
-
|
|
13
|
-
const Cell = (props) => {
|
|
14
|
-
const styles = useMemo(() => getCellStyles(), []);
|
|
15
|
-
const cellFormatting = props.value.customFormatting;
|
|
16
|
-
const cellTheme = useThemeGenerator(cellFormatting.primaryColor, cellFormatting.backgroundColor, cellFormatting.textColor, cellFormatting.themeOverride);
|
|
17
|
-
const grid = useGridInstance();
|
|
18
|
-
const record = props.data;
|
|
19
|
-
const column = props.baseColumn;
|
|
20
|
-
const shouldRenderEmptyCell = () => {
|
|
21
|
-
if (record.getDataProvider().getSummarizationType() === 'aggregation') {
|
|
22
|
-
if (column.name === Constants.RIBBON_BUTTONS_COLUMN_NAME || column.name === CHECKBOX_COLUMN_KEY) {
|
|
23
|
-
return true;
|
|
24
|
-
}
|
|
25
|
-
}
|
|
26
|
-
return false;
|
|
27
|
-
};
|
|
28
|
-
const renderContent = () => {
|
|
29
|
-
if (shouldRenderEmptyCell()) {
|
|
30
|
-
return jsx(Fragment, {});
|
|
31
|
-
}
|
|
32
|
-
switch (props.baseColumn.name) {
|
|
33
|
-
case CHECKBOX_COLUMN_KEY: {
|
|
34
|
-
return (jsx(Checkbox, { checked: props.node.isSelected(), onChange: (e, checked) => {
|
|
35
|
-
grid.selection.toggle(props.node.id);
|
|
36
|
-
}, styles: {
|
|
37
|
-
checkbox: styles.checkbox
|
|
38
|
-
} }));
|
|
39
|
-
}
|
|
40
|
-
default: {
|
|
41
|
-
return jsx(InternalCell, { ...props });
|
|
42
|
-
}
|
|
43
|
-
}
|
|
44
|
-
};
|
|
45
|
-
return jsx(ThemeProvider, { theme: cellTheme, className: getClassNames([styles.cellRoot, cellFormatting.className]), children: renderContent() });
|
|
46
|
-
};
|
|
47
|
-
const InternalCell = (props) => {
|
|
48
|
-
const column = props.baseColumn;
|
|
49
|
-
const record = props.data;
|
|
50
|
-
const formatting = props.value.customFormatting;
|
|
51
|
-
const grid = useGridInstance();
|
|
52
|
-
const error = props.value.error;
|
|
53
|
-
const notifications = props.value.notifications;
|
|
54
|
-
const errorMessage = props.value.errorMessage;
|
|
55
|
-
const theme = useTheme();
|
|
56
|
-
const applicationTheme = useControlTheme(grid.pcfContext.fluentDesignLanguage);
|
|
57
|
-
const [recordCommands, setRecordCommands] = useState(undefined);
|
|
58
|
-
const shouldShowNotEditableNotification = () => {
|
|
59
|
-
if (column.isEditable && !record.getColumnInfo(column.name).security.editable) {
|
|
60
|
-
return true;
|
|
61
|
-
}
|
|
62
|
-
return false;
|
|
63
|
-
};
|
|
64
|
-
const getShouldRenderNotifications = () => {
|
|
65
|
-
if (props.isCellEditor) {
|
|
66
|
-
return false;
|
|
67
|
-
}
|
|
68
|
-
if (error === true) {
|
|
69
|
-
return true;
|
|
70
|
-
}
|
|
71
|
-
if (shouldShowNotEditableNotification()) {
|
|
72
|
-
return true;
|
|
73
|
-
}
|
|
74
|
-
if (notifications && notifications.length > 0) {
|
|
75
|
-
return true;
|
|
76
|
-
}
|
|
77
|
-
return false;
|
|
78
|
-
};
|
|
79
|
-
const renderContent = () => {
|
|
80
|
-
if (isLoading()) {
|
|
81
|
-
return (jsx(Shimmer, { styles: {
|
|
82
|
-
shimmerWrapper: styles.shimmerWrapper,
|
|
83
|
-
root: styles.shimmerRoot
|
|
84
|
-
} }));
|
|
85
|
-
}
|
|
86
|
-
return (jsxs(Fragment, { children: [(column.type !== 'action' || column.name === Constants.RIBBON_BUTTONS_COLUMN_NAME) &&
|
|
87
|
-
jsx(CellContent, { ...props, recordCommands: recordCommands }), shouldRenderNotifications &&
|
|
88
|
-
renderNotifications()] }));
|
|
89
|
-
};
|
|
90
|
-
const getFarNotifications = () => {
|
|
91
|
-
const result = [];
|
|
92
|
-
const tooltipProps = {
|
|
93
|
-
tooltipProps: {
|
|
94
|
-
theme: applicationTheme
|
|
95
|
-
},
|
|
96
|
-
calloutProps: {
|
|
97
|
-
theme: applicationTheme,
|
|
98
|
-
}
|
|
99
|
-
};
|
|
100
|
-
if (shouldShowNotEditableNotification()) {
|
|
101
|
-
result.push({
|
|
102
|
-
key: 'noteditable',
|
|
103
|
-
text: grid.labels['value-not-editable'](),
|
|
104
|
-
iconOnly: true,
|
|
105
|
-
disabled: true,
|
|
106
|
-
tooltipHostProps: tooltipProps,
|
|
107
|
-
iconProps: {
|
|
108
|
-
iconName: 'Uneditable',
|
|
109
|
-
styles: {
|
|
110
|
-
root: styles.uneditableIconRoot
|
|
111
|
-
}
|
|
112
|
-
}
|
|
113
|
-
});
|
|
114
|
-
}
|
|
115
|
-
if (error) {
|
|
116
|
-
result.push({
|
|
117
|
-
key: 'error',
|
|
118
|
-
iconOnly: true,
|
|
119
|
-
disabled: true,
|
|
120
|
-
text: errorMessage,
|
|
121
|
-
tooltipHostProps: tooltipProps,
|
|
122
|
-
iconProps: {
|
|
123
|
-
iconName: 'Error',
|
|
124
|
-
styles: {
|
|
125
|
-
root: styles.errorIconRoot
|
|
126
|
-
}
|
|
127
|
-
}
|
|
128
|
-
});
|
|
129
|
-
}
|
|
130
|
-
return result;
|
|
131
|
-
};
|
|
132
|
-
const renderNotifications = () => {
|
|
133
|
-
return jsx(Notifications, { formatting: formatting, isActionColumn: column.type === 'action', columnAlignment: props.value.columnAlignment, notifications: notifications, farItems: getFarNotifications() });
|
|
134
|
-
};
|
|
135
|
-
const isLoading = () => {
|
|
136
|
-
if (props.value.loading) {
|
|
137
|
-
return true;
|
|
138
|
-
}
|
|
139
|
-
if (column.name === Constants.RIBBON_BUTTONS_COLUMN_NAME && !recordCommands) {
|
|
140
|
-
return true;
|
|
141
|
-
}
|
|
142
|
-
return false;
|
|
143
|
-
};
|
|
144
|
-
const shouldRenderNotifications = getShouldRenderNotifications();
|
|
145
|
-
const styles = useMemo(() => getInnerCellStyles(props.isCellEditor, theme, props.value.columnAlignment), [props.isCellEditor, theme, props.value.columnAlignment]);
|
|
146
|
-
useEffect(() => {
|
|
147
|
-
if (column.name === Constants.RIBBON_BUTTONS_COLUMN_NAME) {
|
|
148
|
-
(async () => {
|
|
149
|
-
//@ts-ignore - typings
|
|
150
|
-
setRecordCommands(await grid.dataset.retrieveRecordCommand([record.getRecordId()], grid.inlineRibbonButtonIds));
|
|
151
|
-
})();
|
|
152
|
-
}
|
|
153
|
-
}, [record.getValue(column.name)]);
|
|
154
|
-
return jsx("div", { className: styles.innerCellRoot, "data-is-valid": !error, children: renderContent() });
|
|
155
|
-
};
|
|
156
|
-
|
|
157
|
-
export { Cell, InternalCell };
|
|
158
|
-
//# sourceMappingURL=Cell.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Cell.js","sources":["../../../../../../src/components/Grid/core/components/Cell/Cell.tsx"],"sourcesContent":["import { ICellRendererParams } from \"@ag-grid-community/core\";\nimport { IGridColumn } from \"../../interfaces/IGridColumn\";\nimport { Constants, IRecord } from \"@talxis/client-libraries\";\nimport { Checkbox, ITooltipHostProps, Shimmer, ThemeProvider, useTheme } from \"@fluentui/react\";\nimport { useEffect, useMemo, useState } from \"react\";\nimport { getCellStyles, getInnerCellStyles } from \"./styles\";\nimport { CHECKBOX_COLUMN_KEY } from \"../../../constants\";\nimport { useGridInstance } from \"../../hooks/useGridInstance\";\nimport { Notifications } from \"./Notifications/Notifications\";\nimport { CellContent } from \"./CellContent/CellContent\";\nimport { ICellValues } from \"../AgGrid/model/AgGrid\";\nimport { getClassNames, ICommandBarItemProps, useThemeGenerator } from \"@talxis/react-components\";\nimport { useControlTheme } from \"../../../../../utils\";\n\nexport interface ICellProps extends ICellRendererParams {\n baseColumn: IGridColumn;\n isCellEditor: boolean;\n data: IRecord;\n value: ICellValues;\n}\nexport const Cell = (props: ICellProps) => {\n const styles = useMemo(() => getCellStyles(), [])\n const cellFormatting = props.value.customFormatting;\n const cellTheme = useThemeGenerator(cellFormatting.primaryColor, cellFormatting.backgroundColor, cellFormatting.textColor, cellFormatting.themeOverride);\n const grid = useGridInstance();\n const record = props.data;\n const column = props.baseColumn;\n \n const shouldRenderEmptyCell = () => {\n if(record.getDataProvider().getSummarizationType() === 'aggregation') {\n if(column.name === Constants.RIBBON_BUTTONS_COLUMN_NAME || column.name === CHECKBOX_COLUMN_KEY) {\n return true;\n }\n }\n return false;\n }\n\n const renderContent = () => {\n if (shouldRenderEmptyCell()) {\n return <></>\n }\n switch (props.baseColumn.name) {\n case CHECKBOX_COLUMN_KEY: {\n return (\n <Checkbox\n checked={props.node.isSelected()}\n onChange={(e, checked) => {\n grid.selection.toggle(props.node.id!);\n }}\n styles={{\n checkbox: styles.checkbox\n }} />\n );\n }\n default: {\n return <InternalCell {...props} />\n }\n }\n }\n\n return <ThemeProvider theme={cellTheme} className={getClassNames([styles.cellRoot, cellFormatting.className])}>\n {renderContent()}\n </ThemeProvider>\n}\n\n\nexport const InternalCell = (props: ICellProps) => {\n const column = props.baseColumn;\n const record = props.data;\n const formatting = props.value.customFormatting;\n const grid = useGridInstance();\n const error = props.value.error;\n const notifications = props.value.notifications;\n const errorMessage = props.value.errorMessage;\n const theme = useTheme();\n const applicationTheme = useControlTheme(grid.pcfContext.fluentDesignLanguage);\n const [recordCommands, setRecordCommands] = useState(undefined);\n\n const shouldShowNotEditableNotification = () => {\n if (column.isEditable && !record.getColumnInfo(column.name).security.editable) {\n return true;\n }\n return false;\n }\n\n const getShouldRenderNotifications = (): boolean => {\n if (props.isCellEditor) {\n return false;\n }\n if (error === true) {\n return true;\n }\n if (shouldShowNotEditableNotification()) {\n return true;\n }\n if (notifications && notifications.length > 0) {\n return true;\n }\n return false;\n }\n\n const renderContent = (): JSX.Element => {\n if (isLoading()) {\n return (\n <Shimmer styles={{\n shimmerWrapper: styles.shimmerWrapper,\n root: styles.shimmerRoot\n }} />\n );\n }\n return (\n <>\n {(column.type !== 'action' || column.name === Constants.RIBBON_BUTTONS_COLUMN_NAME) &&\n <CellContent {...props} recordCommands={recordCommands} />\n }\n {shouldRenderNotifications &&\n renderNotifications()\n }\n </>\n )\n }\n\n const getFarNotifications = (): ICommandBarItemProps[] => {\n const result: ICommandBarItemProps[] = [];\n const tooltipProps: ITooltipHostProps = {\n tooltipProps: {\n theme: applicationTheme\n },\n calloutProps: {\n theme: applicationTheme,\n }\n }\n if (shouldShowNotEditableNotification()) {\n result.push({\n key: 'noteditable',\n text: grid.labels['value-not-editable'](),\n iconOnly: true,\n disabled: true,\n tooltipHostProps: tooltipProps,\n iconProps: {\n iconName: 'Uneditable',\n styles: {\n root: styles.uneditableIconRoot\n }\n }\n })\n }\n if (error) {\n result.push({\n key: 'error',\n iconOnly: true,\n disabled: true,\n text: errorMessage,\n tooltipHostProps: tooltipProps,\n iconProps: {\n iconName: 'Error',\n styles: {\n root: styles.errorIconRoot\n }\n }\n })\n }\n return result;\n }\n\n const renderNotifications = (): JSX.Element => {\n return <Notifications\n formatting={formatting}\n isActionColumn={column.type === 'action'}\n columnAlignment={props.value.columnAlignment}\n notifications={notifications}\n farItems={getFarNotifications()} />\n }\n\n const isLoading = () => {\n if (props.value.loading) {\n return true;\n }\n if (column.name === Constants.RIBBON_BUTTONS_COLUMN_NAME && !recordCommands) {\n return true;\n\n }\n return false;\n }\n\n const shouldRenderNotifications = getShouldRenderNotifications();\n const styles = useMemo(() => getInnerCellStyles(props.isCellEditor, theme, props.value.columnAlignment), [props.isCellEditor, theme, props.value.columnAlignment]);\n\n useEffect(() => {\n if (column.name === Constants.RIBBON_BUTTONS_COLUMN_NAME) {\n (async () => {\n //@ts-ignore - typings\n setRecordCommands(await grid.dataset.retrieveRecordCommand([record.getRecordId()], grid.inlineRibbonButtonIds));\n })();\n }\n }, [record.getValue(column.name)]);\n\n return <div className={styles.innerCellRoot} data-is-valid={!error}>\n {renderContent()}\n </div>\n}"],"names":["_jsx","_jsxs","_Fragment"],"mappings":";;;;;;;;;;;;AAoBa,MAAA,IAAI,GAAG,CAAC,KAAiB,KAAI;AACtC,IAAA,MAAM,MAAM,GAAG,OAAO,CAAC,MAAM,aAAa,EAAE,EAAE,EAAE,CAAC,CAAA;AACjD,IAAA,MAAM,cAAc,GAAG,KAAK,CAAC,KAAK,CAAC,gBAAgB,CAAC;IACpD,MAAM,SAAS,GAAG,iBAAiB,CAAC,cAAc,CAAC,YAAY,EAAE,cAAc,CAAC,eAAe,EAAE,cAAc,CAAC,SAAS,EAAE,cAAc,CAAC,aAAa,CAAC,CAAC;AACzJ,IAAA,MAAM,IAAI,GAAG,eAAe,EAAE,CAAC;AAC/B,IAAA,MAAM,MAAM,GAAG,KAAK,CAAC,IAAI,CAAC;AAC1B,IAAA,MAAM,MAAM,GAAG,KAAK,CAAC,UAAU,CAAC;IAEhC,MAAM,qBAAqB,GAAG,MAAK;QAC/B,IAAG,MAAM,CAAC,eAAe,EAAE,CAAC,oBAAoB,EAAE,KAAK,aAAa,EAAE;AAClE,YAAA,IAAG,MAAM,CAAC,IAAI,KAAK,SAAS,CAAC,0BAA0B,IAAI,MAAM,CAAC,IAAI,KAAK,mBAAmB,EAAE;AAC5F,gBAAA,OAAO,IAAI,CAAC;AACf,aAAA;AACJ,SAAA;AACD,QAAA,OAAO,KAAK,CAAC;AACjB,KAAC,CAAA;IAED,MAAM,aAAa,GAAG,MAAK;QACvB,IAAI,qBAAqB,EAAE,EAAE;AACzB,YAAA,OAAOA,iBAAK,CAAA;AACf,SAAA;AACD,QAAA,QAAQ,KAAK,CAAC,UAAU,CAAC,IAAI;YACzB,KAAK,mBAAmB,EAAE;gBACtB,QACIA,IAAC,QAAQ,EAAA,EACL,OAAO,EAAE,KAAK,CAAC,IAAI,CAAC,UAAU,EAAE,EAChC,QAAQ,E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iB,eAAA,EAAA,CAAC,KAAK,EAAA,QAAA,EAC7D,aAAa,EAAE,GACd,CAAA;AACV;;;;"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"CellContent.js","sources":["../../../../../../../src/components/Grid/core/components/Cell/CellContent/CellContent.tsx"],"sourcesContent":["import * as React from 'react';\nimport { useGridInstance } from '../../../hooks/useGridInstance';\nimport { ICellProps } from '../Cell';\nimport { getCellContentStyles } from './styles';\nimport { NestedControlRenderer } from '../../../../../NestedControlRenderer/NestedControlRenderer';\nimport { ControlTheme, IFluentDesignState } from '../../../../../../utils';\nimport { IComboBoxStyles, IDatePickerStyles, ITextFieldStyles, IToggleStyles, merge, useTheme } from '@fluentui/react';\nimport { useRerender } from '@talxis/react-components';\nimport { getJustifyContent } from '../styles';\nimport { useDebouncedCallback } from 'use-debounce';\nimport { Client, ICommand } from '@talxis/client-libraries';\nimport { AgGridContext } from '../../AgGrid/context';\n\nconst client = new Client();\n\ninterface ICellContentProps extends ICellProps {\n recordCommands?: ICommand[];\n}\n\n\nexport const CellContent = (props: ICellContentProps) => {\n const columnRef = React.useRef(props.baseColumn);\n const mountedRef = React.useRef(false);\n const valueRef = React.useRef(props.value);\n const recordCommands = props.recordCommands;\n columnRef.current = props.baseColumn;\n valueRef.current = props.value;\n const rerender = useRerender();\n const grid = useGridInstance();\n const agGrid = React.useContext(AgGridContext);\n const record = props.data;\n const node = props.node;\n const themeRef = React.useRef(useTheme());\n themeRef.current = useTheme();\n const styles = React.useMemo(() => getCellContentStyles(valueRef.current.columnAlignment), [valueRef.current.columnAlignment]);\n //defer loading of the nested control to solve edge case where the changed values from onNotifyOutputChanged triggered by unmount would not be available straight away\n const [shouldRenderNestedControl, setShouldRenderNestedControl] = React.useState(false);\n const getColumn = () => {\n return columnRef.current;\n }\n\n const getFluentDesignLanguage = (fluentDesignLanguage?: IFluentDesignState) => {\n //@ts-ignore\n const formatting = agGrid.getCellFormatting(props);\n const mergedOverrides: any = merge({}, fluentDesignLanguage?.v8FluentOverrides ?? {}, formatting.themeOverride);\n const columnAlignment = valueRef.current.columnAlignment;\n const result = ControlTheme.GenerateFluentDesignLanguage(formatting.primaryColor, formatting.backgroundColor, formatting.textColor, {\n v8FluentOverrides: merge({},\n {\n semanticColors: {\n inputBorder: 'transparent',\n inputBorderHovered: 'transparent',\n inputBackground: formatting.backgroundColor,\n focusBorder: 'transparent',\n disabledBorder: 'transparent',\n inputFocusBorderAlt: 'transparent',\n errorText: 'transparent'\n\n },\n fonts: record.getDataProvider().getSummarizationType() === 'aggregation' ? {\n medium: {\n fontWeight: 600 as any\n }\n }: {},\n effects: {\n underlined: false\n },\n components: {\n 'TextField': {\n styles: {\n field: {\n textAlign: columnAlignment\n }\n\n } as ITextFieldStyles\n },\n 'ComboBox': {\n styles: {\n input: {\n textAlign: columnAlignment === 'right' ? 'right' : undefined,\n paddingRight: columnAlignment === 'right' ? 8 : undefined,\n }\n } as IComboBoxStyles\n },\n 'DatePicker': {\n styles: {\n root: {\n '.ms-TextField-field': {\n paddingRight: columnAlignment === 'right' ? 8 : undefined,\n textAlign: columnAlignment === 'right' ? 'right' : 'left'\n }\n } as any\n } as IDatePickerStyles\n },\n 'Toggle': {\n styles: {\n root: {\n justifyContent: getJustifyContent(columnAlignment)\n }\n } as IToggleStyles\n }\n }\n },\n mergedOverrides\n ),\n applicationTheme: fluentDesignLanguage?.applicationTheme\n })\n return result;\n }\n\n const onNotifyOutputChanged = (outputs: any) => {\n let isEditing = props.isCellEditor;\n //if we are not mounted, set editing to true so requestRender gets run\n //if this is not present, a PCF editor might trigger this too late and we would not see the current value in renderer until next\n if (!mountedRef.current) {\n isEditing = false;\n }\n grid.onNotifyOutputChanged(record, columnRef.current, isEditing, outputs.value, () => rerender())\n }\n const debouncedNotifyOutputChanged = useDebouncedCallback((outputs) => onNotifyOutputChanged(outputs), 100);\n\n React.useEffect(() => {\n mountedRef.current = true;\n setShouldRenderNestedControl(true);\n return () => {\n mountedRef.current = false;\n }\n }, []);\n\n if (!shouldRenderNestedControl) {\n return <></>\n }\n\n return <NestedControlRenderer\n context={grid.pcfContext}\n parameters={{\n ControlName: valueRef.current.customControl.name,\n LoadingType: 'shimmer',\n Bindings: grid.getBindings(record, getColumn(), valueRef.current.customControl),\n ControlStates: {\n isControlDisabled: !valueRef.current.editing\n },\n }}\n onNotifyOutputChanged={(outputs) => {\n //talxis portal does not have debounce for notifyoutput\n //Power Apps does a debounce of 100ms\n if (getColumn().oneClickEdit && client.isTalxisPortal()) {\n debouncedNotifyOutputChanged(outputs);\n }\n else {\n onNotifyOutputChanged(outputs);\n }\n }}\n onOverrideComponentProps={(componentProps) => {\n return {\n ...componentProps,\n rootContainerProps: {\n ...componentProps.rootContainerProps,\n className: styles.controlRoot\n },\n controlContainerProps: {\n className: styles.controlContainer\n },\n overridenControlContainerProps: {\n className: styles.overridenControlContainer\n },\n messageBarProps: {\n ...componentProps.messageBarProps,\n styles: {\n root: styles.errorMessageRoot,\n content: styles.errorMessageContent\n }\n },\n loadingProps: {\n ...componentProps.loadingProps,\n shimmerProps: {\n ...componentProps.loadingProps.shimmerProps,\n styles: {\n ...componentProps.loadingProps?.shimmerProps?.styles,\n shimmerWrapper: styles.shimmerWrapper\n }\n },\n containerProps: {\n ...componentProps.loadingProps?.containerProps,\n className: styles.loadingWrapper\n }\n },\n onOverrideRender: (control, isCustomPcfComponent, defaultRender) => {\n if (isCustomPcfComponent) {\n grid.setUsesNestedPcfs();\n }\n if (valueRef.current.customComponent) {\n const result = valueRef.current.customComponent.onRender(control.getProps(), themeRef.current, control.getContainer())\n //onRender can explicitly return null to force the grid to use native renderer\n //useful if the custom component is required only for renderer, but not for editor or vice versa\n if (result === null) {\n return defaultRender();\n }\n return result;\n }\n return defaultRender();\n },\n onOverrideUnmount: (control, defaultUnmount) => {\n if (valueRef.current.customComponent) {\n const result = valueRef.current.customComponent.onUnmount(control.getContainer());\n //onRender can explicitly return null to force the grid to use native renderer\n //useful if the custom component is required only for renderer, but not for editor or vice versa\n if (result === null) {\n return defaultUnmount();\n }\n return result;\n }\n //@ts-ignore - internal types\n //skip the unmounting for custom PCF's in Power Apps\n // PCF unmount in Power Apps causes other nested PCF's to reinitialize which causes flickering\n //umounting of nested PCF's happens on grid destroy to prevent memory leaks (currently done by refreshing the page as no better method was found)\n if (control.isMountedPcfComponent() && !grid.getClient().isTalxisPortal()) {\n return;\n }\n return defaultUnmount();\n },\n onOverrideControlProps: (controlProps) => {\n //here we always need to fetch the latest parameters\n //we still might have old one's cached in valueRef\n const columnInfo = record.getColumnInfo(getColumn().name);\n const parameters = columnInfo.ui.getControlParameters({\n ...controlProps.parameters,\n ...grid.getParameters(record, getColumn(), props.isCellEditor, recordCommands)\n })\n return {\n ...controlProps,\n context: {\n ...controlProps.context,\n mode: Object.create(controlProps.context.mode, {\n allocatedHeight: {\n value: node.rowHeight! - 1\n },\n\n }),\n parameters: parameters,\n fluentDesignLanguage: getFluentDesignLanguage(controlProps.context.fluentDesignLanguage)\n },\n parameters: parameters\n }\n }\n }\n }}\n />\n}\n"],"names":["_jsx"],"mappings":";;;;;;;;;;;;;AAaA,MAAM,MAAM,GAAG,IAAI,MAAM,EAAE,CAAC;AAOf,MAAA,WAAW,GAAG,CAAC,KAAwB,KAAI;IACpD,MAAM,SAAS,GAAG,KAAK,CAAC,MAAM,CAAC,KAAK,CAAC,UAAU,CAAC,CAAC;IACjD,MAAM,UAAU,GAAG,KAAK,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;IACvC,MAAM,QAAQ,GAAG,KAAK,CAAC,MAAM,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;AAC3C,IAAA,MAAM,cAAc,GAAG,KAAK,CAAC,cAAc,CAAC;AAC5C,IAAA,SAAS,CAAC,OAAO,GAAG,KAAK,CAAC,UAAU,CAAC;AACrC,IAAA,QAAQ,CAAC,OAAO,GAAG,KAAK,CAAC,KAAK,CAAC;AAC/B,IAAA,MAAM,QAAQ,GAAG,WAAW,EAAE,CAAC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OAAO;AACV,qBAAA;oBACD,OAAO,cAAc,EAAE,CAAC;iBAC3B;AACD,gBAAA,sBAAsB,EAAE,CAAC,YAAY,KAAI;;;oBAGrC,MAAM,UAAU,GAAG,MAAM,CAAC,aAAa,CAAC,SAAS,EAAE,CAAC,IAAI,CAAC,CAAC;AAC1D,oBAAA,MAAM,UAAU,GAAG,UAAU,CAAC,EAAE,CAAC,oBAAoB,CAAC;wBAClD,GAAG,YAAY,CAAC,UAAU;AAC1B,wBAAA,GAAG,IAAI,CAAC,aAAa,CAAC,MAAM,EAAE,SAAS,EAAE,EAAE,KAAK,CAAC,YAAY,EAAE,cAAc,CAAC;AACjF,qBAAA,CAAC,CAAA;oBACF,OAAO;AACH,wBAAA,GAAG,YAAY;AACf,wBAAA,OAAO,EAAE;4BACL,GAAG,YAAY,CAAC,OAAO;4BACvB,IAAI,EAAE,MAAM,CAAC,MAAM,CAAC,YAAY,CAAC,OAAO,CAAC,IAAI,EAAE;AAC3C,gCAAA,eAAe,EAAE;AACb,oCAAA,KAAK,EAAE,IAAI,CAAC,SAAU,GAAG,CAAC;AAC7B,iCAAA;6BAEJ,CAAC;AACF,4BAAA,UAAU,EAAE,UAAU;4BACtB,oBAAoB,EAAE,uBAAuB,CAAC,YAAY,CAAC,OAAO,CAAC,oBAAoB,CAAC;AAC3F,yBAAA;AACD,wBAAA,UAAU,EAAE,UAAU;qBACzB,CAAA;iBACJ;aACJ,CAAA;AACL,SAAC,GACH,CAAA;AACN;;;;"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"styles.js","sources":["../../../../../../../src/components/Grid/core/components/Cell/CellContent/styles.ts"],"sourcesContent":["import { mergeStyleSets } from \"@fluentui/react\"\nimport { IColumn } from \"@talxis/client-libraries\"\n\nexport const getCellContentStyles = (columnAlignment: IColumn['alignment']) => {\n return mergeStyleSets({\n controlRoot: {\n height: '100%',\n order: columnAlignment === 'right' ? 2 : undefined,\n minWidth: 0,\n overflow: 'hidden',\n flexGrow: 1,\n border: '2px solid transparent',\n },\n controlContainer: {\n height: '100%'\n },\n loadingWrapper: {\n height: '100%',\n display: 'flex',\n alignItems: 'center',\n paddingLeft: 10,\n paddingRight: 10\n },\n overridenControlContainer: {\n height: '100%'\n },\n shimmerWrapper: {\n height: 10\n },\n errorMessageRoot: {\n height: '100%'\n },\n errorMessageContent: {\n alignItems: 'center'\n }\n })\n}"],"names":[],"mappings":";;AAGa,MAAA,oBAAoB,GAAG,CAAC,eAAqC,KAAI;AAC1E,IAAA,OAAO,cAAc,CAAC;AAClB,QAAA,WAAW,EAAE;AACT,YAAA,MAAM,EAAE,MAAM;YACd,KAAK,EAAE,eAAe,KAAK,OAAO,GAAG,CAAC,GAAG,SAAS;AAClD,YAAA,QAAQ,EAAE,CAAC;AACX,YAAA,QAAQ,EAAE,QAAQ;AAClB,YAAA,QAAQ,EAAE,CAAC;AACX,YAAA,MAAM,EAAE,uBAAuB;AAClC,SAAA;AACD,QAAA,gBAAgB,EAAE;AACd,YAAA,MAAM,EAAE,MAAM;AACjB,SAAA;AACD,QAAA,cAAc,EAAE;AACZ,YAAA,MAAM,EAAE,MAAM;AACd,YAAA,OAAO,EAAE,MAAM;AACf,YAAA,UAAU,EAAE,QAAQ;AACpB,YAAA,WAAW,EAAE,EAAE;AACf,YAAA,YAAY,EAAE,EAAE;AACnB,SAAA;AACD,QAAA,yBAAyB,EAAE;AACvB,YAAA,MAAM,EAAE,MAAM;AACjB,SAAA;AACD,QAAA,cAAc,EAAE;AACZ,YAAA,MAAM,EAAE,EAAE;AACb,SAAA;AACD,QAAA,gBAAgB,EAAE;AACd,YAAA,MAAM,EAAE,MAAM;AACjB,SAAA;AACD,QAAA,mBAAmB,EAAE;AACjB,YAAA,UAAU,EAAE,QAAQ;AACvB,SAAA;AACJ,KAAA,CAAC,CAAA;AACN;;;;"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Notifications.js","sources":["../../../../../../../src/components/Grid/core/components/Cell/Notifications/Notifications.tsx"],"sourcesContent":["import { Icon, useTheme, Text, Callout, PrimaryButton, DefaultButton, Link, ICommandBar, ThemeProvider, ICommandBarItemProps } from \"@fluentui/react\"\nimport { getNotificationStyles } from \"./styles\";\nimport { useEffect, useMemo, useRef, useState } from \"react\";\nimport { IAddControlNotificationOptions, IColumn, IControlNotificationAction, ICustomColumnFormatting } from \"@talxis/client-libraries\";\nimport { CommandBar, useResizeObserver, useThemeGenerator } from \"@talxis/react-components\";\nimport { useGridInstance } from \"../../../hooks/useGridInstance\";\nimport { useControlTheme } from \"../../../../../../utils\";\n\ninterface INotifications {\n notifications: IAddControlNotificationOptions[],\n formatting: Required<ICustomColumnFormatting>,\n isActionColumn: boolean;\n columnAlignment: IColumn['alignment'],\n farItems?: ICommandBarItemProps[]\n}\n\n\nexport const Notifications = (props: INotifications) => {\n const { notifications, formatting, farItems, isActionColumn, columnAlignment } = { ...props };\n const grid = useGridInstance();\n const theme = useTheme();\n const styles = getNotificationStyles(isActionColumn, columnAlignment);\n const iconId = useMemo(() => `icon${crypto.randomUUID()}`, []);\n const [selectedNotification, setSelectedNotification] = useState<IAddControlNotificationOptions | null>(null);\n const commandBarRef = useRef<ICommandBar>(null);\n const containerRef = useRef<HTMLDivElement>(null);\n\n const observe = useResizeObserver(() => {\n commandBarRef.current?.remeasure();\n })\n const overridenTheme = useThemeGenerator(theme.semanticColors.bodyText, theme.semanticColors.bodyBackground, theme.semanticColors.bodyText, formatting.themeOverride);\n\n const renderActionButton = (action: IControlNotificationAction, buttonType: 'primary' | 'default') => {\n const Button = buttonType === 'primary' ? PrimaryButton : DefaultButton;\n return <Button\n text={action.message}\n iconProps={action?.iconName ? {\n iconName: action.iconName\n } : undefined}\n onClick={() => action.actions.map(callback => callback())} />\n }\n\n const renderActions = (actions: IControlNotificationAction[]): JSX.Element => {\n if (actions.length === 0) {\n return <></>\n }\n //render actions as buttons\n if (actions.length < 3) {\n return <div className={styles.calloutButtons}>\n {actions.map((action, i) => renderActionButton(action, i === 0 ? 'primary' : 'default'))}\n </div>\n }\n return <CommandBar items={actions.map((action, i) => {\n return {\n key: i.toString(),\n text: action.message,\n commandBarButtonAs: () => <Link onClick={() => action.actions.map(callback => callback())} className={styles.calloutLink}>\n {action.iconName &&\n <Icon iconName={action.iconName} />\n }\n {action.message}\n </Link>,\n iconProps: {\n iconName: action.iconName\n },\n onClick: () => {\n action.actions.map(callback => callback())\n }\n }\n })} />\n }\n\n const onNotificationClick = (notification: IAddControlNotificationOptions) => {\n if (notification.actions?.length === 1) {\n notification.actions[0].actions.map(callback => callback());\n return;\n }\n setSelectedNotification(notification);\n };\n\n\n const getCommandBarItems = (): { items: ICommandBarItemProps[], overflowItems: ICommandBarItemProps[] } => {\n const items: ICommandBarItemProps[] = [];\n const overflowItems: ICommandBarItemProps[] = [];\n\n notifications.map(notification => {\n const item: ICommandBarItemProps = {\n key: notification.uniqueId,\n text: notification.text,\n tooltipHostProps: {\n ...notification.buttonProps?.tooltipHostProps,\n calloutProps: {\n theme: contextualMenuTheme\n },\n tooltipProps: {\n theme: contextualMenuTheme\n },\n },\n iconProps: notification.iconName ? {\n iconName: notification.iconName,\n ...notification.buttonProps?.iconProps\n } : undefined,\n ...notification.buttonProps,\n onClick: (e) => {\n notification.buttonProps?.onClick?.(e);\n onNotificationClick(notification);\n }\n }\n if (notification.buttonProps?.renderedInOverflow) {\n overflowItems.push(item);\n }\n else {\n items.push(item);\n }\n })\n return {\n items: items,\n overflowItems: overflowItems\n }\n }\n\n const contextualMenuTheme = useControlTheme(grid.pcfContext.fluentDesignLanguage);\n const { items, overflowItems } = getCommandBarItems();\n\n useEffect(() => {\n if (isActionColumn) {\n observe(containerRef.current!);\n }\n }, [isActionColumn]);\n\n\n return <div ref={containerRef} className={styles.notificationsRoot}>\n <ThemeProvider theme={overridenTheme}>\n <CommandBar\n contextualMenuTheme={contextualMenuTheme}\n id={iconId}\n componentRef={commandBarRef}\n styles={{\n primarySet: styles.notificationsPrimarySet\n }}\n items={items}\n overflowItems={overflowItems}\n farItems={farItems} />\n </ThemeProvider>\n {selectedNotification &&\n <Callout\n theme={contextualMenuTheme}\n hidden={!selectedNotification}\n className={styles.callout}\n onDismiss={() => setSelectedNotification(null)}\n target={`#${iconId}`}>\n <ThemeProvider className={styles.calloutContent} theme={contextualMenuTheme}>\n {selectedNotification.text &&\n <Text title={selectedNotification.text} className={styles.calloutTitle} variant={selectedNotification.messages.length > 0 ? 'xLarge' : undefined}>{selectedNotification.text}</Text>\n }\n <Text>{selectedNotification.messages[0]}</Text>\n {selectedNotification.actions &&\n renderActions(selectedNotification.actions)\n }\n </ThemeProvider>\n </Callout>\n }\n </div>\n}"],"names":["_jsx","_jsxs"],"mappings":";;;;;;;;AAiBa,MAAA,aAAa,GAAG,CAAC,KAAqB,KAAI;AACnD,IAAA,MAAM,EAAE,aAAa,EAAE,UAAU,EAAE,QAAQ,EAAE,cAAc,EAAE,eAAe,EAAE,GAAG,EAAE,GAAG,KAAK,EAAE,CAAC;AAC9F,IAAA,MAAM,IAAI,GAAG,eAAe,EAAE,CAAC;AAC/B,IAAA,MAAM,KAAK,GAAG,QAAQ,EAAE,CAAC;IACzB,MAAM,MAAM,GAAG,qBAAqB,CAAC,cAAc,EAAE,eAAe,CAAC,CAAC;AACtE,IAAA,MAAM,MAAM,GAAG,OAAO,CAAC,MAAM,CAAA,IAAA,EAAO,MAAM,CAAC,UAAU,EAAE,CAAA,CAAE,EAAE,EAAE,CAAC,CAAC;IAC/D,MAAM,CAAC,oBAAoB,EAAE,uBAAuB,CAAC,GAAG,QAAQ,CAAwC,IAAI,CAAC,CAAC;AAC9G,IAAA,MAAM,aAAa,GAAG,MAAM,CAAc,IAAI,CAAC,CAAC;AAChD,IAAA,MAAM,YAAY,GAAG,MAAM,CAAiB,IAAI,CAAC,CAAC;AAElD,IAAA,MAAM,OAAO,GAAG,iBAAiB,CAAC,MAAK;AACnC,QAAA,aAAa,CAAC,OAAO,EAAE,SAAS,EAAE,CAAC;AACvC,KAA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OAAO;gCACzB,aAAa,CAAC,oBAAoB,CAAC,OAAO,CAAC,CAEnC,EAAA,CAAA,EAAA,CACV,IAEZ,CAAA;AACV;;;;"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"styles.js","sources":["../../../../../../../src/components/Grid/core/components/Cell/Notifications/styles.ts"],"sourcesContent":["import { mergeStyleSets } from \"@fluentui/react\"\nimport { IColumn } from \"@talxis/client-libraries\"\nimport { getJustifyContent } from \"../styles\"\n\nexport const getNotificationStyles = (isActionColumn: boolean, columnAlignment: Required<IColumn['alignment']>) => {\n return mergeStyleSets({\n callout: {\n width: 320,\n padding: '20px 24px',\n },\n calloutContent: {\n display: 'flex',\n flexDirection: 'column',\n gap: 20,\n '.ms-CommandBar-primaryCommand': {\n gap: 10\n }\n },\n calloutTitle: {\n overflow: 'hidden',\n textOverflow: 'ellipsis'\n },\n calloutLink: {\n 'i': {\n position: 'relative',\n top: 1,\n marginRight: 3\n }\n },\n calloutButtons: {\n display: 'flex',\n justifyContent: 'flex-end',\n gap: 8\n },\n notificationsRoot: {\n minWidth: isActionColumn ? 0 : undefined,\n flex: isActionColumn ? 1 : undefined,\n },\n notificationsPrimarySet: {\n order: 2,\n justifyContent: isActionColumn ? getJustifyContent(columnAlignment) : undefined\n }\n })\n}"],"names":[],"mappings":";;;MAIa,qBAAqB,GAAG,CAAC,cAAuB,EAAE,eAA+C,KAAI;AAC9G,IAAA,OAAO,cAAc,CAAC;AAClB,QAAA,OAAO,EAAE;AACL,YAAA,KAAK,EAAE,GAAG;AACV,YAAA,OAAO,EAAE,WAAW;AACvB,SAAA;AACD,QAAA,cAAc,EAAE;AACZ,YAAA,OAAO,EAAE,MAAM;AACf,YAAA,aAAa,EAAE,QAAQ;AACvB,YAAA,GAAG,EAAE,EAAE;AACP,YAAA,+BAA+B,EAAE;AAC7B,gBAAA,GAAG,EAAE,EAAE;AACV,aAAA;AACJ,SAAA;AACD,QAAA,YAAY,EAAE;AACV,YAAA,QAAQ,EAAE,QAAQ;AAClB,YAAA,YAAY,EAAE,UAAU;AAC3B,SAAA;AACD,QAAA,WAAW,EAAE;AACT,YAAA,GAAG,EAAE;AACD,gBAAA,QAAQ,EAAE,UAAU;AACpB,gBAAA,GAAG,EAAE,CAAC;AACN,gBAAA,WAAW,EAAE,CAAC;AACjB,aAAA;AACJ,SAAA;AACD,QAAA,cAAc,EAAE;AACZ,YAAA,OAAO,EAAE,MAAM;AACf,YAAA,cAAc,EAAE,UAAU;AAC1B,YAAA,GAAG,EAAE,CAAC;AACT,SAAA;AACD,QAAA,iBAAiB,EAAE;YACf,QAAQ,EAAE,cAAc,GAAG,CAAC,GAAG,SAAS;YACxC,IAAI,EAAE,cAAc,GAAG,CAAC,GAAG,SAAS;AACvC,SAAA;AACD,QAAA,uBAAuB,EAAE;AACrB,YAAA,KAAK,EAAE,CAAC;AACR,YAAA,cAAc,EAAE,cAAc,GAAG,iBAAiB,CAAC,eAAe,CAAC,GAAG,SAAS;AAClF,SAAA;AACJ,KAAA,CAAC,CAAA;AACN;;;;"}
|
|
@@ -1,59 +0,0 @@
|
|
|
1
|
-
import { mergeStyleSets } from '@fluentui/react';
|
|
2
|
-
|
|
3
|
-
const getJustifyContent = (columnAlignment) => {
|
|
4
|
-
switch (columnAlignment) {
|
|
5
|
-
case 'left': {
|
|
6
|
-
return 'flex-start';
|
|
7
|
-
}
|
|
8
|
-
case 'center': {
|
|
9
|
-
return 'center';
|
|
10
|
-
}
|
|
11
|
-
case 'right': {
|
|
12
|
-
return 'flex-end';
|
|
13
|
-
}
|
|
14
|
-
}
|
|
15
|
-
};
|
|
16
|
-
const getCellStyles = () => {
|
|
17
|
-
return mergeStyleSets({
|
|
18
|
-
cellRoot: {
|
|
19
|
-
height: '100%',
|
|
20
|
-
width: '100%',
|
|
21
|
-
display: 'flex',
|
|
22
|
-
alignItems: 'center',
|
|
23
|
-
justifyContent: 'center'
|
|
24
|
-
},
|
|
25
|
-
checkbox: {
|
|
26
|
-
marginRight: 0.5
|
|
27
|
-
}
|
|
28
|
-
});
|
|
29
|
-
};
|
|
30
|
-
const getInnerCellStyles = (isEditing, theme, columnAlignment) => {
|
|
31
|
-
return mergeStyleSets({
|
|
32
|
-
innerCellRoot: {
|
|
33
|
-
flex: 1,
|
|
34
|
-
display: 'flex',
|
|
35
|
-
overflow: 'hidden',
|
|
36
|
-
alignItems: 'center',
|
|
37
|
-
height: '100%',
|
|
38
|
-
marginLeft: isEditing ? -1 : undefined,
|
|
39
|
-
marginRight: isEditing ? -1 : undefined,
|
|
40
|
-
},
|
|
41
|
-
shimmerWrapper: {
|
|
42
|
-
height: 10
|
|
43
|
-
},
|
|
44
|
-
shimmerRoot: {
|
|
45
|
-
width: '100%',
|
|
46
|
-
paddingLeft: 10,
|
|
47
|
-
paddingRight: 10
|
|
48
|
-
},
|
|
49
|
-
errorIconRoot: {
|
|
50
|
-
color: `${theme.semanticColors.errorIcon} !important`
|
|
51
|
-
},
|
|
52
|
-
uneditableIconRoot: {
|
|
53
|
-
color: `${theme.semanticColors.bodyText} !important`
|
|
54
|
-
}
|
|
55
|
-
});
|
|
56
|
-
};
|
|
57
|
-
|
|
58
|
-
export { getCellStyles, getInnerCellStyles, getJustifyContent };
|
|
59
|
-
//# sourceMappingURL=styles.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"styles.js","sources":["../../../../../../src/components/Grid/core/components/Cell/styles.ts"],"sourcesContent":["import { ITheme, mergeStyleSets } from \"@fluentui/react\";\nimport { IColumn } from \"@talxis/client-libraries\";\n\nexport const getJustifyContent = (columnAlignment: Required<IColumn['alignment']>) => {\n switch(columnAlignment) {\n case 'left': {\n return 'flex-start'\n }\n case 'center': {\n return 'center'\n }\n case 'right': {\n return 'flex-end'\n }\n }\n}\n\n\nexport const getCellStyles = () => {\n return mergeStyleSets({\n cellRoot: {\n height: '100%',\n width: '100%',\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'center'\n },\n checkbox: {\n marginRight: 0.5\n }\n })\n}\n\nexport const getInnerCellStyles = (isEditing: boolean, theme: ITheme, columnAlignment: IColumn['alignment']) => {\n return mergeStyleSets({\n innerCellRoot: {\n flex: 1,\n display: 'flex',\n overflow: 'hidden',\n alignItems: 'center',\n height: '100%',\n marginLeft: isEditing ? - 1 : undefined,\n marginRight: isEditing ? - 1 : undefined,\n },\n\n shimmerWrapper: {\n height: 10\n },\n shimmerRoot: {\n width: '100%',\n paddingLeft: 10,\n paddingRight: 10\n },\n errorIconRoot: {\n color: `${theme.semanticColors.errorIcon} !important`\n },\n uneditableIconRoot: {\n color: `${theme.semanticColors.bodyText} !important`\n }\n })\n}\n\n"],"names":[],"mappings":";;AAGa,MAAA,iBAAiB,GAAG,CAAC,eAA+C,KAAI;AACjF,IAAA,QAAO,eAAe;QAClB,KAAK,MAAM,EAAE;AACT,YAAA,OAAO,YAAY,CAAA;AACtB,SAAA;QACD,KAAK,QAAQ,EAAE;AACX,YAAA,OAAO,QAAQ,CAAA;AAClB,SAAA;QACD,KAAK,OAAO,EAAE;AACV,YAAA,OAAO,UAAU,CAAA;AACpB,SAAA;AACJ,KAAA;AACL,EAAC;AAGM,MAAM,aAAa,GAAG,MAAK;AAC9B,IAAA,OAAO,cAAc,CAAC;AAClB,QAAA,QAAQ,EAAE;AACN,YAAA,MAAM,EAAE,MAAM;AACd,YAAA,KAAK,EAAE,MAAM;AACb,YAAA,OAAO,EAAE,MAAM;AACf,YAAA,UAAU,EAAE,QAAQ;AACpB,YAAA,cAAc,EAAE,QAAQ;AAC3B,SAAA;AACD,QAAA,QAAQ,EAAE;AACN,YAAA,WAAW,EAAE,GAAG;AACnB,SAAA;AACJ,KAAA,CAAC,CAAA;AACN,EAAC;AAEY,MAAA,kBAAkB,GAAG,CAAC,SAAkB,EAAE,KAAa,EAAE,eAAqC,KAAI;AAC3G,IAAA,OAAO,cAAc,CAAC;AAClB,QAAA,aAAa,EAAE;AACX,YAAA,IAAI,EAAE,CAAC;AACP,YAAA,OAAO,EAAE,MAAM;AACf,YAAA,QAAQ,EAAE,QAAQ;AAClB,YAAA,UAAU,EAAE,QAAQ;AACpB,YAAA,MAAM,EAAE,MAAM;YACd,UAAU,EAAE,SAAS,GAAG,CAAE,CAAC,GAAG,SAAS;YACvC,WAAW,EAAE,SAAS,GAAG,CAAE,CAAC,GAAG,SAAS;AAC3C,SAAA;AAED,QAAA,cAAc,EAAE;AACZ,YAAA,MAAM,EAAE,EAAE;AACb,SAAA;AACD,QAAA,WAAW,EAAE;AACT,YAAA,KAAK,EAAE,MAAM;AACb,YAAA,WAAW,EAAE,EAAE;AACf,YAAA,YAAY,EAAE,EAAE;AACnB,SAAA;AACD,QAAA,aAAa,EAAE;AACX,YAAA,KAAK,EAAE,CAAG,EAAA,KAAK,CAAC,cAAc,CAAC,SAAS,CAAa,WAAA,CAAA;AACxD,SAAA;AACD,QAAA,kBAAkB,EAAE;AAChB,YAAA,KAAK,EAAE,CAAG,EAAA,KAAK,CAAC,cAAc,CAAC,QAAQ,CAAa,WAAA,CAAA;AACvD,SAAA;AACJ,KAAA,CAAC,CAAA;AACN;;;;"}
|
|
@@ -1,61 +0,0 @@
|
|
|
1
|
-
import { jsxs, Fragment, jsx } from 'react/jsx-runtime';
|
|
2
|
-
import { useState, useMemo, useRef } from 'react';
|
|
3
|
-
import { useTheme, CommandBarButton, Icon, Label } from '@fluentui/react';
|
|
4
|
-
import { FilterCallout } from '../../../filtering/components/FilterCallout/FilterCallout.js';
|
|
5
|
-
import { SortingContextualMenu } from '../../../sorting/components/SortingContextualMenu/SortingContextualMenu.js';
|
|
6
|
-
import { getColumnHeaderStyles } from './styles.js';
|
|
7
|
-
import { useGridInstance } from '../../hooks/useGridInstance.js';
|
|
8
|
-
|
|
9
|
-
const ColumnHeader = (props) => {
|
|
10
|
-
const grid = useGridInstance();
|
|
11
|
-
const column = props.baseColumn;
|
|
12
|
-
const [columnHeaderContextualMenuProps, setColumnHeaderContextualMenuProps] = useState(null);
|
|
13
|
-
const [filterCalloutProps, setFilterCalloutProps] = useState(null);
|
|
14
|
-
const theme = useTheme();
|
|
15
|
-
const columnHeaderStyles = useMemo(() => getColumnHeaderStyles(theme, column.alignment), [theme, column.alignment]);
|
|
16
|
-
const buttonRef = useRef(null);
|
|
17
|
-
const onClick = () => {
|
|
18
|
-
if ((column.isFilterable === false && column.disableSorting && !column.canBeAggregated)) {
|
|
19
|
-
return;
|
|
20
|
-
}
|
|
21
|
-
setColumnHeaderContextualMenuProps({
|
|
22
|
-
column: column,
|
|
23
|
-
onDismiss: (e, dismissAll, showFilterCallout) => {
|
|
24
|
-
setColumnHeaderContextualMenuProps(null);
|
|
25
|
-
if (!showFilterCallout) {
|
|
26
|
-
return;
|
|
27
|
-
}
|
|
28
|
-
setFilterCalloutProps({
|
|
29
|
-
column: column,
|
|
30
|
-
onDismiss: () => {
|
|
31
|
-
setFilterCalloutProps(null);
|
|
32
|
-
}
|
|
33
|
-
});
|
|
34
|
-
}
|
|
35
|
-
});
|
|
36
|
-
};
|
|
37
|
-
const preventDismissOnEvent = (e) => {
|
|
38
|
-
if (e.type !== 'scroll') {
|
|
39
|
-
return false;
|
|
40
|
-
}
|
|
41
|
-
const target = e.target;
|
|
42
|
-
//check for vertical scroll
|
|
43
|
-
if (target?.classList?.contains('ag-body-viewport') || target?.classList?.contains('ag-body-vertical-scroll-viewport')) {
|
|
44
|
-
return true;
|
|
45
|
-
}
|
|
46
|
-
//ios outputs horizontal scroll if focused in callout btn which would result in dismiss of callout
|
|
47
|
-
if (/iPad|iPhone|iPod/.test(navigator.userAgent)) {
|
|
48
|
-
return true;
|
|
49
|
-
}
|
|
50
|
-
return false;
|
|
51
|
-
};
|
|
52
|
-
return (jsxs(Fragment, { children: [jsxs(CommandBarButton, { elementRef: buttonRef, title: column.displayName, className: columnHeaderStyles.root, onClick: onClick, children: [grid.isEditable && !column.isEditable && column.type !== 'action' && jsx(Icon, { className: columnHeaderStyles.editIcon, iconName: 'Uneditable' }), jsxs("div", { className: columnHeaderStyles.labelWrapper, children: [jsx(Label, { className: columnHeaderStyles.label, children: column.displayName }), column.isRequired &&
|
|
53
|
-
jsx("span", { className: columnHeaderStyles.requiredSymbol, children: "*" })] }), jsxs("div", { className: columnHeaderStyles.filterSortIcons, children: [column.isSorted && jsx(Icon, { iconName: column.isSortedDescending ? 'SortDown' : 'SortUp' }), column.isFiltered && jsx(Icon, { iconName: 'Filter' })] })] }), columnHeaderContextualMenuProps &&
|
|
54
|
-
jsx(SortingContextualMenu, { target: buttonRef, calloutProps: {
|
|
55
|
-
preventDismissOnEvent: preventDismissOnEvent
|
|
56
|
-
}, ...columnHeaderContextualMenuProps }), filterCalloutProps &&
|
|
57
|
-
jsx(FilterCallout, { preventDismissOnEvent: preventDismissOnEvent, target: buttonRef, ...filterCalloutProps })] }));
|
|
58
|
-
};
|
|
59
|
-
|
|
60
|
-
export { ColumnHeader };
|
|
61
|
-
//# sourceMappingURL=ColumnHeader.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ColumnHeader.js","sources":["../../../../../../src/components/Grid/core/components/ColumnHeader/ColumnHeader.tsx"],"sourcesContent":["import { useMemo, useRef, useState } from 'react';\nimport { CommandBarButton, Icon, Label, useTheme } from '@fluentui/react';\nimport { FilterCallout, IFilterCallout } from '../../../filtering/components/FilterCallout/FilterCallout';\nimport { IGridColumn } from '../../interfaces/IGridColumn';\nimport { ISortingContextualMenu, SortingContextualMenu } from '../../../sorting/components/SortingContextualMenu/SortingContextualMenu';\nimport { getColumnHeaderStyles } from './styles';\nimport { useGridInstance } from '../../hooks/useGridInstance';\nimport React from 'react';\n\nexport interface IColumnHeader {\n baseColumn: IGridColumn;\n}\n\nexport const ColumnHeader = (props: IColumnHeader) => {\n const grid = useGridInstance();\n const column = props.baseColumn;\n const [columnHeaderContextualMenuProps, setColumnHeaderContextualMenuProps] = useState<ISortingContextualMenu | null>(null);\n const [filterCalloutProps, setFilterCalloutProps] = useState<IFilterCallout | null>(null);\n const theme = useTheme();\n const columnHeaderStyles = useMemo(() => getColumnHeaderStyles(theme, column.alignment), [theme, column.alignment])\n const buttonRef = useRef<HTMLElement>(null);\n\n const onClick = () => {\n if ((column.isFilterable === false && column.disableSorting && !column.canBeAggregated)) {\n return;\n }\n setColumnHeaderContextualMenuProps({\n column: column,\n onDismiss: (e, dismissAll, showFilterCallout) => {\n setColumnHeaderContextualMenuProps(null);\n if (!showFilterCallout) {\n return;\n }\n setFilterCalloutProps({\n column: column,\n onDismiss: () => {\n setFilterCalloutProps(null)\n }\n })\n }\n });\n }\n const preventDismissOnEvent = (e: Event | React.MouseEvent<Element, MouseEvent> | React.KeyboardEvent<Element> | React.FocusEvent<Element, Element>) => {\n if(e.type !== 'scroll') {\n return false;\n }\n const target = e.target as HTMLElement;\n //check for vertical scroll\n if (target?.classList?.contains('ag-body-viewport') || target?.classList?.contains('ag-body-vertical-scroll-viewport')) {\n return true;\n }\n //ios outputs horizontal scroll if focused in callout btn which would result in dismiss of callout\n if (/iPad|iPhone|iPod/.test(navigator.userAgent)) {\n return true;\n }\n return false;\n }\n return (\n <>\n <CommandBarButton\n elementRef={buttonRef}\n title={column.displayName}\n className={columnHeaderStyles.root}\n onClick={onClick}\n >\n {grid.isEditable && !column.isEditable && column.type !== 'action' && <Icon className={columnHeaderStyles.editIcon} iconName='Uneditable' />}\n <div className={columnHeaderStyles.labelWrapper}>\n <Label className={columnHeaderStyles.label}>{column.displayName}</Label>\n {column.isRequired &&\n <span className={columnHeaderStyles.requiredSymbol}>*</span>\n }\n </div>\n <div className={columnHeaderStyles.filterSortIcons}>\n {column.isSorted && <Icon iconName={column.isSortedDescending ? 'SortDown' : 'SortUp'} />}\n {column.isFiltered && <Icon iconName='Filter' />}\n </div>\n </CommandBarButton>\n {columnHeaderContextualMenuProps &&\n <SortingContextualMenu \n target={buttonRef}\n calloutProps={{\n preventDismissOnEvent: preventDismissOnEvent\n }} \n {...columnHeaderContextualMenuProps} />\n }\n {filterCalloutProps &&\n <FilterCallout preventDismiss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A,EAAA,EAAA,SAAS,EAAE,kBAAkB,CAAC,cAAc,EAAU,QAAA,EAAA,GAAA,EAAA,CAAA,CAAA,EAAA,CAE9D,EACNF,IAAA,CAAA,KAAA,EAAA,EAAK,SAAS,EAAE,kBAAkB,CAAC,eAAe,EAC7C,QAAA,EAAA,CAAA,MAAM,CAAC,QAAQ,IAAIE,GAAC,CAAA,IAAI,EAAC,EAAA,QAAQ,EAAE,MAAM,CAAC,kBAAkB,GAAG,UAAU,GAAG,QAAQ,EAAI,CAAA,EACxF,MAAM,CAAC,UAAU,IAAIA,GAAA,CAAC,IAAI,EAAA,EAAC,QAAQ,EAAC,QAAQ,EAAG,CAAA,CAAA,EAAA,CAC9C,CACS,EAAA,CAAA,EAClB,+BAA+B;AAC5B,gBAAAA,GAAA,CAAC,qBAAqB,EAClB,EAAA,MAAM,EAAE,SAAS,EACjB,YAAY,EAAE;AACV,wBAAA,qBAAqB,EAAE,qBAAqB;qBAC/C,EACG,GAAA,+BAA+B,EAAI,CAAA,EAE9C,kBAAkB;AACf,gBAAAA,GAAA,CAAC,aAAa,EAAA,EAAC,qBAAqB,EAAE,qBAAqB,EAAE,MAAM,EAAE,SAAS,EAAM,GAAA,kBAAkB,EAAI,CAAA,CAAA,EAAA,CAE/G,EACN;AACL;;;;"}
|
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
import { jsx, Fragment } from 'react/jsx-runtime';
|
|
2
|
-
import { useTheme, ThemeProvider, Checkbox } from '@fluentui/react';
|
|
3
|
-
import { useContext, useEffect } from 'react';
|
|
4
|
-
import { useGridInstance } from '../../../../hooks/useGridInstance.js';
|
|
5
|
-
import { getGlobalCheckboxStyles } from './styles.js';
|
|
6
|
-
import { AgGridContext } from '../../../AgGrid/context.js';
|
|
7
|
-
import { useThemeGenerator, Theming, useRerender } from '@talxis/react-components';
|
|
8
|
-
|
|
9
|
-
const GlobalCheckBox = () => {
|
|
10
|
-
const grid = useGridInstance();
|
|
11
|
-
const baseTheme = useTheme();
|
|
12
|
-
const theme = useThemeGenerator(baseTheme.palette.themePrimary, baseTheme.semanticColors.bodyBackground, Theming.GetTextColorForBackground(baseTheme.semanticColors.bodyBackground),
|
|
13
|
-
//@ts-ignore - typings
|
|
14
|
-
grid.pcfContext.fluentDesignLanguage?.v8FluentOverrides);
|
|
15
|
-
const styles = getGlobalCheckboxStyles(theme);
|
|
16
|
-
const selection = grid.selection;
|
|
17
|
-
const agGrid = useContext(AgGridContext);
|
|
18
|
-
const rerender = useRerender();
|
|
19
|
-
const getCheckBoxState = () => {
|
|
20
|
-
if (grid.selection.allRecordsSelected) {
|
|
21
|
-
return 'checked';
|
|
22
|
-
}
|
|
23
|
-
if (grid.dataset.getSelectedRecordIds().length > 0) {
|
|
24
|
-
return 'intermediate';
|
|
25
|
-
}
|
|
26
|
-
return 'unchecked';
|
|
27
|
-
};
|
|
28
|
-
const onChange = (checked) => {
|
|
29
|
-
if (checked) {
|
|
30
|
-
selection.selectAll();
|
|
31
|
-
}
|
|
32
|
-
else {
|
|
33
|
-
selection.clear();
|
|
34
|
-
}
|
|
35
|
-
};
|
|
36
|
-
const checkboxState = getCheckBoxState();
|
|
37
|
-
useEffect(() => {
|
|
38
|
-
agGrid.setGlobalCheckBoxRenderer(() => rerender());
|
|
39
|
-
}, []);
|
|
40
|
-
if (grid.dataset.sortedRecordIds.length === 0) {
|
|
41
|
-
return jsx(Fragment, {});
|
|
42
|
-
}
|
|
43
|
-
return (jsx(ThemeProvider, { theme: theme, className: styles.root, children: selection.type === 'multiple' &&
|
|
44
|
-
jsx(Checkbox, { checked: checkboxState === 'checked', styles: {
|
|
45
|
-
checkbox: styles.checkbox
|
|
46
|
-
}, indeterminate: checkboxState === 'intermediate', onChange: (e, checked) => onChange(checked) }) }));
|
|
47
|
-
};
|
|
48
|
-
|
|
49
|
-
export { GlobalCheckBox };
|
|
50
|
-
//# sourceMappingURL=GlobalCheckbox.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"GlobalCheckbox.js","sources":["../../../../../../../../src/components/Grid/core/components/ColumnHeader/components/GlobalCheckbox/GlobalCheckbox.tsx"],"sourcesContent":["import { Checkbox, ThemeProvider, useTheme } from \"@fluentui/react\";\nimport { useContext, useEffect } from \"react\";\nimport { useGridInstance } from \"../../../../hooks/useGridInstance\";\nimport { getGlobalCheckboxStyles } from \"./styles\";\nimport { AgGridContext } from \"../../../AgGrid/context\";\nimport { Theming, useRerender, useThemeGenerator } from \"@talxis/react-components\";\n\n\nexport const GlobalCheckBox = () => {\n const grid = useGridInstance();\n const baseTheme = useTheme();\n const theme = useThemeGenerator(\n baseTheme.palette.themePrimary,\n baseTheme.semanticColors.bodyBackground,\n Theming.GetTextColorForBackground(baseTheme.semanticColors.bodyBackground),\n //@ts-ignore - typings\n grid.pcfContext.fluentDesignLanguage?.v8FluentOverrides\n )\n const styles = getGlobalCheckboxStyles(theme);\n const selection = grid.selection;\n const agGrid = useContext(AgGridContext);\n const rerender = useRerender();\n\n const getCheckBoxState = () => {\n if (grid.selection.allRecordsSelected) {\n return 'checked';\n }\n if (grid.dataset.getSelectedRecordIds().length > 0) {\n return 'intermediate';\n }\n return 'unchecked';\n }\n\n const onChange = (checked?: boolean) => {\n if (checked) {\n selection.selectAll();\n }\n else {\n selection.clear();\n }\n }\n\n const checkboxState = getCheckBoxState();\n\n useEffect(() => {\n agGrid.setGlobalCheckBoxRenderer(() => rerender())\n }, []);\n\n if (grid.dataset.sortedRecordIds.length === 0) {\n return <></>\n }\n return (\n <ThemeProvider theme={theme} className={styles.root}>\n {selection.type === 'multiple' &&\n <Checkbox\n checked={checkboxState === 'checked'}\n styles={{\n checkbox: styles.checkbox\n }}\n indeterminate={checkboxState === 'intermediate'}\n onChange={(e, checked) => onChange(checked)} />\n }\n </ThemeProvider>\n )\n};"],"names":["_jsx"],"mappings":";;;;;;;;AAQO,MAAM,cAAc,GAAG,MAAK;AAC/B,IAAA,MAAM,IAAI,GAAG,eAAe,EAAE,CAAC;AAC/B,IA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AAC,MAAM,KAAK,CAAC,EAAE;AAC3C,QAAA,OAAOA,iBAAK,CAAA;AACf,KAAA;AACD,IAAA,QACIA,GAAC,CAAA,aAAa,IAAC,KAAK,EAAE,KAAK,EAAE,SAAS,EAAE,MAAM,CAAC,IAAI,EAAA,QAAA,EAC9C,SAAS,CAAC,IAAI,KAAK,UAAU;YAC1BA,GAAC,CAAA,QAAQ,IACL,OAAO,EAAE,aAAa,KAAK,SAAS,EACpC,MAAM,EAAE;oBACJ,QAAQ,EAAE,MAAM,CAAC,QAAQ;iBAC5B,EACD,aAAa,EAAE,aAAa,KAAK,cAAc,EAC/C,QAAQ,EAAE,CAAC,CAAC,EAAE,OAAO,KAAK,QAAQ,CAAC,OAAO,CAAC,EAAA,CAAI,EAE3C,CAAA,EACnB;AACL;;;;"}
|
package/dist/components/Grid/core/components/ColumnHeader/components/GlobalCheckbox/styles.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"styles.js","sources":["../../../../../../../../src/components/Grid/core/components/ColumnHeader/components/GlobalCheckbox/styles.ts"],"sourcesContent":["import { ITheme, mergeStyleSets } from \"@fluentui/react\"\n\nexport const getGlobalCheckboxStyles = (theme: ITheme) => {\n return mergeStyleSets({\n root: {\n backgroundColor: theme.semanticColors.bodyBackground,\n flexGrow: 1,\n display: 'flex',\n justifyContent: 'center',\n height: '100%',\n alignItems: 'center'\n },\n checkbox: {\n marginRight: 0.5\n }\n });\n}"],"names":[],"mappings":";;AAEa,MAAA,uBAAuB,GAAG,CAAC,KAAa,KAAI;AACrD,IAAA,OAAO,cAAc,CAAC;AAClB,QAAA,IAAI,EAAE;AACF,YAAA,eAAe,EAAE,KAAK,CAAC,cAAc,CAAC,cAAc;AACpD,YAAA,QAAQ,EAAE,CAAC;AACX,YAAA,OAAO,EAAE,MAAM;AACf,YAAA,cAAc,EAAE,QAAQ;AACxB,YAAA,MAAM,EAAE,MAAM;AACd,YAAA,UAAU,EAAE,QAAQ;AACvB,SAAA;AACD,QAAA,QAAQ,EAAE;AACN,YAAA,WAAW,EAAE,GAAG;AACnB,SAAA;AACJ,KAAA,CAAC,CAAC;AACP;;;;"}
|