@adaptabletools/adaptable 20.3.0 → 21.0.0-canary.0
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/agGrid.d.ts +2 -1
- package/agGrid.js +2 -1
- package/base.css +36 -15
- package/base.css.map +1 -1
- package/icons/add-circle.svg +1 -0
- package/icons/add.svg +1 -0
- package/icons/alert.svg +1 -0
- package/icons/align-center.svg +1 -0
- package/icons/align-justify.svg +1 -0
- package/icons/align-left.svg +1 -0
- package/icons/align-right.svg +1 -0
- package/icons/arrow-down-long.svg +1 -0
- package/icons/arrow-down.svg +1 -0
- package/icons/arrow-expand.svg +1 -0
- package/icons/arrow-left.svg +1 -0
- package/icons/arrow-right.svg +1 -0
- package/icons/arrow-up-long.svg +1 -0
- package/icons/arrow-up.svg +1 -0
- package/icons/assignment.svg +1 -0
- package/icons/badge.svg +1 -0
- package/icons/bold.svg +1 -0
- package/icons/boolean-list.svg +1 -0
- package/icons/brain.svg +1 -0
- package/icons/broadcast.svg +1 -0
- package/icons/brush.svg +1 -0
- package/icons/building.svg +1 -0
- package/icons/calculated-column.svg +1 -0
- package/icons/calendar.svg +1 -0
- package/icons/call.svg +1 -0
- package/icons/case-lower.svg +1 -0
- package/icons/case-sentence.svg +1 -0
- package/icons/case-upper.svg +1 -0
- package/icons/cells.svg +1 -0
- package/icons/chart.svg +1 -0
- package/icons/chat.svg +1 -0
- package/icons/check-circle.svg +1 -0
- package/icons/check.svg +1 -0
- package/icons/checked.svg +1 -0
- package/icons/clipboard.svg +1 -0
- package/icons/clone.svg +1 -0
- package/icons/close.svg +1 -0
- package/icons/cloud-upload.svg +1 -0
- package/icons/collapse-all.svg +1 -0
- package/icons/collapse.svg +1 -0
- package/icons/color-palette.svg +1 -0
- package/icons/column-add.svg +1 -0
- package/icons/column-outline.svg +1 -0
- package/icons/columns.svg +1 -0
- package/icons/comment.svg +1 -0
- package/icons/comments.svg +1 -0
- package/icons/contact.svg +1 -0
- package/icons/contains.svg +1 -0
- package/icons/copy.svg +1 -0
- package/icons/csv.svg +1 -0
- package/icons/dashboard.svg +1 -0
- package/icons/data-set.svg +1 -0
- package/icons/date-range.svg +1 -0
- package/icons/delete.svg +1 -0
- package/icons/division.svg +1 -0
- package/icons/dock.svg +1 -0
- package/icons/dollar.svg +1 -0
- package/icons/download.svg +1 -0
- package/icons/downloaded.svg +1 -0
- package/icons/drag.svg +1 -0
- package/icons/edit-table.svg +1 -0
- package/icons/edit.svg +1 -0
- package/icons/ends-with.svg +1 -0
- package/icons/equals.svg +1 -0
- package/icons/equation.svg +1 -0
- package/icons/error.svg +1 -0
- package/icons/excel.svg +1 -0
- package/icons/expand-all.svg +1 -0
- package/icons/expand.svg +1 -0
- package/icons/exponent.svg +1 -0
- package/icons/export-data.svg +1 -0
- package/icons/export.svg +1 -0
- package/icons/fast-backward.svg +1 -0
- package/icons/fast-forward.svg +1 -0
- package/icons/fdc3.svg +1 -0
- package/icons/filled-circle.svg +1 -0
- package/icons/filter-list.svg +1 -0
- package/icons/filter-off.svg +1 -0
- package/icons/filter.svg +1 -0
- package/icons/flag.svg +1 -0
- package/icons/folder-open.svg +1 -0
- package/icons/folder-shared.svg +1 -0
- package/icons/folder.svg +1 -0
- package/icons/function.svg +1 -0
- package/icons/gradient.svg +1 -0
- package/icons/greater-than-or-equal.svg +1 -0
- package/icons/greater-than.svg +1 -0
- package/icons/grid-filter.svg +1 -0
- package/icons/grid-info.svg +1 -0
- package/icons/grid.svg +1 -0
- package/icons/history.svg +1 -0
- package/icons/home.svg +1 -0
- package/icons/horizontal-lines.svg +1 -0
- package/icons/import-export.svg +1 -0
- package/icons/import.svg +1 -0
- package/icons/info.svg +1 -0
- package/icons/interactions.svg +1 -0
- package/icons/italic.svg +1 -0
- package/icons/json.svg +1 -0
- package/icons/laptop.svg +1 -0
- package/icons/less-than-or-equal.svg +1 -0
- package/icons/less-than.svg +1 -0
- package/icons/lightning.svg +1 -0
- package/icons/link.svg +1 -0
- package/icons/list.svg +1 -0
- package/icons/logout.svg +1 -0
- package/icons/mail.svg +1 -0
- package/icons/menu.svg +1 -0
- package/icons/minus.svg +1 -0
- package/icons/money.svg +1 -0
- package/icons/multiplication.svg +1 -0
- package/icons/newpage.svg +1 -0
- package/icons/news.svg +1 -0
- package/icons/not-contains.svg +1 -0
- package/icons/not-equal.svg +1 -0
- package/icons/note.svg +1 -0
- package/icons/open-in-new.svg +1 -0
- package/icons/order.svg +1 -0
- package/icons/organisation.svg +1 -0
- package/icons/overline.svg +1 -0
- package/icons/paperclip.svg +1 -0
- package/icons/pause.svg +1 -0
- package/icons/percent-tag.svg +1 -0
- package/icons/percent.svg +1 -0
- package/icons/person.svg +1 -0
- package/icons/pie-chart.svg +1 -0
- package/icons/play.svg +1 -0
- package/icons/plus.svg +1 -0
- package/icons/quote.svg +1 -0
- package/icons/refresh.svg +1 -0
- package/icons/regex.svg +1 -0
- package/icons/reminder.svg +1 -0
- package/icons/resume.svg +1 -0
- package/icons/rows.svg +1 -0
- package/icons/save.svg +1 -0
- package/icons/schedule.svg +1 -0
- package/icons/science.svg +1 -0
- package/icons/search-table.svg +1 -0
- package/icons/search.svg +1 -0
- package/icons/select-all.svg +1 -0
- package/icons/select-fwd.svg +1 -0
- package/icons/select-off.svg +1 -0
- package/icons/settings.svg +1 -0
- package/icons/sort-asc.svg +1 -0
- package/icons/sort-desc.svg +1 -0
- package/icons/spanner.svg +1 -0
- package/icons/spark-line.svg +1 -0
- package/icons/starts-with.svg +1 -0
- package/icons/statusbar.svg +1 -0
- package/icons/stop.svg +1 -0
- package/icons/strikethrough.svg +1 -0
- package/icons/styled-grid.svg +1 -0
- package/icons/sync.svg +1 -0
- package/icons/tab-unselected.svg +1 -0
- package/icons/target.svg +1 -0
- package/icons/theme.svg +1 -0
- package/icons/traffic-lights.svg +1 -0
- package/icons/triangle-down.svg +1 -0
- package/icons/triangle-up.svg +1 -0
- package/icons/unchecked.svg +1 -0
- package/icons/underline.svg +1 -0
- package/icons/undo.svg +1 -0
- package/icons/unfilled-circle.svg +1 -0
- package/icons/upload.svg +1 -0
- package/icons/visibility-off-bold.svg +1 -0
- package/icons/visibility-off.svg +1 -0
- package/icons/visibility-on-bold.svg +1 -0
- package/icons/visibility-on.svg +1 -0
- package/icons/warning.svg +1 -0
- package/index.css +32 -15
- package/index.css.map +1 -1
- package/package.json +2 -2
- package/src/AdaptableInterfaces/IAdaptable.d.ts +10 -5
- package/src/AdaptableOptions/ColumnOptions.d.ts +38 -38
- package/src/AdaptableOptions/DefaultAdaptableOptions.js +3 -2
- package/src/AdaptableOptions/EditOptions.d.ts +4 -7
- package/src/AdaptableOptions/FilterOptions.d.ts +50 -15
- package/src/AdaptableOptions/LayoutOptions.d.ts +8 -21
- package/src/AdaptableOptions/PredicateOptions.d.ts +1 -1
- package/src/AdaptableOptions/UserInterfaceOptions.d.ts +1 -1
- package/src/AdaptableState/Common/AdaptableColumn.d.ts +7 -0
- package/src/AdaptableState/Common/AdaptablePredicate.js +2 -2
- package/src/AdaptableState/Common/CustomWindowConfig.d.ts +2 -2
- package/src/AdaptableState/Common/ExtendedLayout.d.ts +50 -0
- package/src/AdaptableState/FormatColumnState.d.ts +8 -1
- package/src/AdaptableState/InternalState.d.ts +1 -1
- package/src/AdaptableState/LayoutState.d.ts +26 -6
- package/src/AdaptableState/Selection/GridCell.d.ts +32 -0
- package/src/AdaptableState/StyledColumnState.d.ts +2 -2
- package/src/Api/AlertApi.d.ts +5 -11
- package/src/Api/ColumnApi.d.ts +17 -1
- package/src/Api/ColumnFilterApi.d.ts +32 -2
- package/src/Api/CustomSortApi.d.ts +5 -10
- package/src/Api/FlashingCellApi.d.ts +10 -6
- package/src/Api/FormatColumnApi.d.ts +8 -18
- package/src/Api/Implementation/AlertApiImpl.d.ts +6 -9
- package/src/Api/Implementation/AlertApiImpl.js +7 -6
- package/src/Api/Implementation/ApiBase.d.ts +2 -12
- package/src/Api/Implementation/ApiBase.js +5 -5
- package/src/Api/Implementation/ColumnApiImpl.d.ts +5 -2
- package/src/Api/Implementation/ColumnApiImpl.js +59 -23
- package/src/Api/Implementation/ColumnFilterApiImpl.d.ts +7 -1
- package/src/Api/Implementation/ColumnFilterApiImpl.js +76 -3
- package/src/Api/Implementation/ColumnScopeApiImpl.js +10 -2
- package/src/Api/Implementation/CustomSortApiImpl.d.ts +5 -10
- package/src/Api/Implementation/CustomSortApiImpl.js +6 -4
- package/src/Api/Implementation/FlashingCellApiImpl.d.ts +7 -6
- package/src/Api/Implementation/FlashingCellApiImpl.js +11 -8
- package/src/Api/Implementation/FormatColumnApiImpl.d.ts +8 -18
- package/src/Api/Implementation/FormatColumnApiImpl.js +10 -9
- package/src/Api/Implementation/LayoutApiImpl.d.ts +3 -2
- package/src/Api/Implementation/LayoutApiImpl.js +101 -7
- package/src/Api/Implementation/LayoutHelpers.d.ts +1 -0
- package/src/Api/Implementation/LayoutHelpers.js +23 -4
- package/src/Api/Implementation/PlusMinusApiImpl.d.ts +7 -5
- package/src/Api/Implementation/PlusMinusApiImpl.js +10 -7
- package/src/Api/Implementation/ScheduleApiImpl.d.ts +9 -16
- package/src/Api/Implementation/ScheduleApiImpl.js +15 -17
- package/src/Api/Implementation/ShortcutApiImpl.d.ts +5 -6
- package/src/Api/Implementation/ShortcutApiImpl.js +7 -8
- package/src/Api/Implementation/StyledColumnApiImpl.d.ts +7 -8
- package/src/Api/Implementation/StyledColumnApiImpl.js +12 -9
- package/src/Api/Implementation/TeamSharingApiImpl.js +1 -4
- package/src/Api/Implementation/UserInterfaceApiImpl.d.ts +2 -1
- package/src/Api/Implementation/UserInterfaceApiImpl.js +10 -9
- package/src/Api/Internal/AdaptableInternalApi.d.ts +2 -0
- package/src/Api/Internal/AdaptableInternalApi.js +3 -0
- package/src/Api/Internal/AlertInternalApi.d.ts +6 -6
- package/src/Api/Internal/AlertInternalApi.js +10 -10
- package/src/Api/Internal/ColumnFilterInternalApi.d.ts +13 -0
- package/src/Api/Internal/ColumnFilterInternalApi.js +93 -1
- package/src/Api/Internal/ColumnInternalApi.d.ts +2 -1
- package/src/Api/Internal/ColumnInternalApi.js +4 -0
- package/src/Api/Internal/DashboardInternalApi.js +1 -1
- package/src/Api/Internal/EntitlementInternalApi.d.ts +1 -0
- package/src/Api/Internal/EntitlementInternalApi.js +8 -0
- package/src/Api/Internal/ExportInternalApi.js +1 -1
- package/src/Api/Internal/FlashingCellInternalApi.js +1 -1
- package/src/Api/Internal/FormatColumnInternalApi.d.ts +8 -11
- package/src/Api/Internal/FormatColumnInternalApi.js +13 -13
- package/src/Api/Internal/GridInternalApi.d.ts +7 -10
- package/src/Api/Internal/GridInternalApi.js +76 -27
- package/src/Api/Internal/LayoutInternalApi.d.ts +5 -5
- package/src/Api/Internal/LayoutInternalApi.js +42 -5
- package/src/Api/Internal/PredicateInternalApi.d.ts +2 -6
- package/src/Api/Internal/PredicateInternalApi.js +4 -6
- package/src/Api/Internal/UserInterfaceInternalApi.d.ts +1 -0
- package/src/Api/Internal/UserInterfaceInternalApi.js +10 -3
- package/src/Api/LayoutApi.d.ts +7 -2
- package/src/Api/PlusMinusApi.d.ts +11 -7
- package/src/Api/ScheduleApi.d.ts +9 -16
- package/src/Api/ShortcutApi.d.ts +5 -6
- package/src/Api/StyledColumnApi.d.ts +10 -7
- package/src/Api/UserInterfaceApi.d.ts +5 -6
- package/src/Redux/ActionsReducers/InternalRedux.d.ts +4 -4
- package/src/Redux/ActionsReducers/InternalRedux.js +7 -7
- package/src/Redux/ActionsReducers/StyledColumnRedux.d.ts +7 -0
- package/src/Redux/ActionsReducers/StyledColumnRedux.js +13 -0
- package/src/Redux/Store/AdaptableStore.js +10 -10
- package/src/Strategy/AdaptableModuleBase.d.ts +14 -4
- package/src/Strategy/AdaptableModuleBase.js +46 -9
- package/src/Strategy/AlertModule.d.ts +3 -4
- package/src/Strategy/AlertModule.js +7 -4
- package/src/Strategy/CalculatedColumnModule.js +2 -2
- package/src/Strategy/CellSummaryModule.js +2 -2
- package/src/Strategy/ChartingModule.d.ts +3 -1
- package/src/Strategy/ChartingModule.js +9 -3
- package/src/Strategy/ColumnFilterModule.d.ts +1 -1
- package/src/Strategy/ColumnFilterModule.js +31 -15
- package/src/Strategy/ColumnInfoModule.js +2 -2
- package/src/Strategy/CommentModule.d.ts +1 -1
- package/src/Strategy/CommentModule.js +3 -3
- package/src/Strategy/CustomSortModule.d.ts +3 -4
- package/src/Strategy/CustomSortModule.js +2 -2
- package/src/Strategy/DashboardModule.js +1 -1
- package/src/Strategy/DataChangeHistoryModule.d.ts +2 -1
- package/src/Strategy/DataChangeHistoryModule.js +3 -10
- package/src/Strategy/DataImportModule.js +3 -3
- package/src/Strategy/ExportModule.js +1 -1
- package/src/Strategy/Fdc3Module.js +1 -1
- package/src/Strategy/FlashingCellModule.d.ts +3 -5
- package/src/Strategy/FlashingCellModule.js +3 -3
- package/src/Strategy/FormatColumnModule.d.ts +3 -4
- package/src/Strategy/FormatColumnModule.js +2 -2
- package/src/Strategy/FreeTextColumnModule.d.ts +1 -1
- package/src/Strategy/FreeTextColumnModule.js +2 -2
- package/src/Strategy/GridInfoModule.js +2 -2
- package/src/Strategy/Interface/IModule.d.ts +7 -3
- package/src/Strategy/LayoutModule.js +11 -11
- package/src/Strategy/NoteModule.d.ts +1 -1
- package/src/Strategy/NoteModule.js +3 -3
- package/src/Strategy/PlusMinusModule.d.ts +3 -4
- package/src/Strategy/PlusMinusModule.js +2 -2
- package/src/Strategy/QuickSearchModule.d.ts +2 -0
- package/src/Strategy/QuickSearchModule.js +9 -0
- package/src/Strategy/ScheduleModule.d.ts +3 -4
- package/src/Strategy/ScheduleModule.js +2 -2
- package/src/Strategy/SettingsPanelModule.js +1 -1
- package/src/Strategy/ShortcutModule.d.ts +3 -4
- package/src/Strategy/ShortcutModule.js +2 -2
- package/src/Strategy/StatusBarModule.d.ts +3 -2
- package/src/Strategy/StatusBarModule.js +6 -3
- package/src/Strategy/StyledColumnModule.d.ts +3 -4
- package/src/Strategy/StyledColumnModule.js +2 -2
- package/src/Strategy/SystemStatusModule.js +2 -2
- package/src/Strategy/TeamSharingModule.d.ts +1 -1
- package/src/Strategy/TeamSharingModule.js +5 -2
- package/src/Strategy/ToolPanelModule.d.ts +1 -1
- package/src/Strategy/ToolPanelModule.js +1 -4
- package/src/Strategy/Utilities/Layout/getLayoutFilterViewItems.js +1 -1
- package/src/Utilities/Constants/DocumentationLinkConstants.d.ts +1 -0
- package/src/Utilities/Constants/DocumentationLinkConstants.js +1 -0
- package/src/Utilities/Extensions/ArrayExtensions.d.ts +15 -2
- package/src/Utilities/Extensions/ArrayExtensions.js +62 -13
- package/src/Utilities/ObjectFactory.js +3 -3
- package/src/Utilities/Services/AnnotationsService.js +1 -1
- package/src/Utilities/Services/Interface/IModuleService.d.ts +2 -1
- package/src/Utilities/Services/ModuleService.d.ts +3 -3
- package/src/Utilities/Services/ModuleService.js +19 -7
- package/src/View/AdaptableView.js +3 -1
- package/src/View/ColumnInfo/ColumnInfo.js +9 -3
- package/src/View/Components/AdaptableIconSelector/index.js +2 -3
- package/src/View/Components/ColumnFilter/AdaptableColumnFilter.d.ts +0 -1
- package/src/View/Components/ColumnFilter/AdaptableColumnFilter.js +2 -3
- package/src/View/Components/ColumnFilter/AdaptableFloatingFilter.d.ts +0 -2
- package/src/View/Components/ColumnFilter/AdaptableFloatingFilter.js +4 -7
- package/src/View/Components/ColumnFilter/ColumnFilter.js +11 -4
- package/src/View/Components/ColumnFilter/ColumnFilterWindow.js +1 -1
- package/src/View/Components/ColumnFilter/FloatingFilter.js +1 -2
- package/src/View/Components/ColumnFilter/LayoutColumnFilter.js +1 -1
- package/src/View/Components/ColumnFilter/components/ColumnFilterInput.js +2 -2
- package/src/View/Components/ColumnFilter/components/FloatingFilterValues.js +2 -2
- package/src/View/Components/ColumnFilter/useAdaptableFilterWrapper.d.ts +1 -1
- package/src/View/Components/ColumnFilter/useAdaptableFilterWrapper.js +2 -2
- package/src/View/Components/ColumnFilter/utils.d.ts +2 -2
- package/src/View/Components/ColumnFilter/utils.js +6 -1
- package/src/View/Components/EntityRulesEditor/index.js +1 -2
- package/src/View/Components/FilterForm/ListBoxFilterForm.js +1 -1
- package/src/View/Components/Popups/AdaptablePopup/AdaptablePopupModuleView.js +6 -6
- package/src/View/Components/PredicateEditor/PredicateEditor.js +1 -2
- package/src/View/Components/Selectors/BulkUpdateValueSelector.js +1 -1
- package/src/View/Components/Selectors/ColumnSelector.js +1 -1
- package/src/View/Components/Selectors/FieldSelector.js +1 -1
- package/src/View/Components/Selectors/PermittedValuesSelector.d.ts +1 -0
- package/src/View/Components/Selectors/PermittedValuesSelector.js +2 -2
- package/src/View/Dashboard/Dashboard.js +2 -2
- package/src/View/Dashboard/DashboardPopup.js +3 -1
- package/src/View/Dashboard/PinnedDashboard.js +1 -1
- package/src/View/DataChangeHistory/DataChangeHistoryGrid.js +9 -21
- package/src/View/FormatColumn/Wizard/FormatColumnFormatWizardSection.js +58 -21
- package/src/View/FormatColumn/Wizard/FormatColumnSettingsWizardSection.js +11 -11
- package/src/View/GridInfo/GridInfoPopup/AdaptableObjectsSummary.js +1 -1
- package/src/View/GridInfo/GridInfoPopup/GridInfoPopup.js +1 -1
- package/src/View/Layout/TransposedPopup.js +2 -2
- package/src/View/Layout/Wizard/sections/ColumnsSection.js +64 -9
- package/src/View/Layout/Wizard/sections/PivotAggregationsSection.js +5 -5
- package/src/View/StatusBar/AdaptableStatusBar.js +1 -4
- package/src/View/StatusBar/StatusBarPopup.js +1 -1
- package/src/View/Theme/ThemeSelector.js +1 -1
- package/src/agGrid/AdaptableAgGrid.d.ts +11 -7
- package/src/agGrid/AdaptableAgGrid.js +251 -216
- package/src/agGrid/AdaptableFilterHandler.d.ts +18 -0
- package/src/agGrid/AdaptableFilterHandler.js +61 -0
- package/src/agGrid/AgGridAdapter.d.ts +3 -7
- package/src/agGrid/AgGridAdapter.js +13 -46
- package/src/agGrid/AgGridColumnAdapter.d.ts +2 -2
- package/src/agGrid/AgGridColumnAdapter.js +81 -36
- package/src/agGrid/AgGridFilterAdapter.d.ts +2 -0
- package/src/agGrid/AgGridFilterAdapter.js +48 -0
- package/src/agGrid/AgGridFloatingFilterAdapter.d.ts +2 -0
- package/src/agGrid/{FloatingFilterWrapper.js → AgGridFloatingFilterAdapter.js} +24 -35
- package/src/agGrid/AgGridModulesAdapter.d.ts +15 -0
- package/src/agGrid/AgGridModulesAdapter.js +66 -0
- package/src/agGrid/editors/AdaptableNumberEditor/InternalAdaptableNumberEditor.js +1 -1
- package/src/agGrid/editors/AdaptablePercentageEditor/InternalAdaptablePercentageEditor.js +1 -1
- package/src/components/Dialog/index.js +1 -1
- package/src/components/Dropdown/Arrows.js +2 -2
- package/src/components/ExpressionEditor/QueryBuilder/QueryBuilderInputs.d.ts +1 -1
- package/src/components/ExpressionEditor/QueryBuilder/QueryBuilderInputs.js +2 -2
- package/src/components/ExpressionEditor/QueryBuilder/QueryPredicateBuilder.js +2 -2
- package/src/components/FileDroppable/index.js +1 -1
- package/src/components/IconSelector/IconSelector.d.ts +2 -2
- package/src/components/OverlayTrigger/index.js +1 -1
- package/src/components/Select/Select.d.ts +1 -1
- package/src/components/Select/Select.js +116 -24
- package/src/components/icons/DefaultIcon.d.ts +0 -1
- package/src/components/icons/DefaultIcon.js +0 -6
- package/src/env.js +2 -2
- package/src/layout-manager/src/LayoutManagerModel.d.ts +6 -10
- package/src/layout-manager/src/index.d.ts +11 -3
- package/src/layout-manager/src/index.js +302 -87
- package/src/layout-manager/src/normalizeLayoutModel.js +7 -4
- package/src/layout-manager/src/simplifyLayoutModel.js +4 -4
- package/src/metamodel/adaptable.metamodel.d.ts +70 -19
- package/src/metamodel/adaptable.metamodel.js +1 -1
- package/src/migration/AdaptableUpgradeHelper.js +2 -0
- package/src/migration/VersionUpgrade17.js +1 -1
- package/src/migration/VersionUpgrade20.js +1 -0
- package/src/migration/VersionUpgrade21.d.ts +6 -0
- package/src/migration/VersionUpgrade21.js +24 -0
- package/src/types.d.ts +7 -8
- package/tsconfig.esm.tsbuildinfo +1 -1
- package/src/AdaptableState/Common/ExtendedLayoutInfo.d.ts +0 -27
- package/src/agGrid/FilterWrapper.d.ts +0 -2
- package/src/agGrid/FilterWrapper.js +0 -131
- package/src/agGrid/FloatingFilterWrapper.d.ts +0 -2
- package/src/agGrid/agGridModules.d.ts +0 -3
- package/src/agGrid/agGridModules.js +0 -15
- package/src/agGrid/getAgGridFilterNotifyModelFn.d.ts +0 -2
- package/src/agGrid/getAgGridFilterNotifyModelFn.js +0 -16
- /package/src/AdaptableState/Common/{ExtendedLayoutInfo.js → ExtendedLayout.js} +0 -0
|
@@ -114,7 +114,42 @@ export function areArraysEqualWithOrder(arr1, arr2) {
|
|
|
114
114
|
}
|
|
115
115
|
return arr1.every((x, index) => arr2.indexOf(x) == index);
|
|
116
116
|
}
|
|
117
|
-
|
|
117
|
+
/**
|
|
118
|
+
* Checks if two arrays contain the same elements (order-independent).
|
|
119
|
+
*
|
|
120
|
+
* @param arr1 First array to compare
|
|
121
|
+
* @param arr2 Second array to compare
|
|
122
|
+
* @param equalityFn Optional function to determine if two elements are equal
|
|
123
|
+
* @returns True if arrays contain the same elements, false otherwise
|
|
124
|
+
*/
|
|
125
|
+
export function areArraysEqualWithCustomComparator(arr1, arr2, equalityFn) {
|
|
126
|
+
// Handle null/undefined cases
|
|
127
|
+
if (!arr1 && !arr2) {
|
|
128
|
+
return true;
|
|
129
|
+
}
|
|
130
|
+
if (!arr1 || !arr2) {
|
|
131
|
+
return false;
|
|
132
|
+
}
|
|
133
|
+
// Check length
|
|
134
|
+
if (arr1.length !== arr2.length) {
|
|
135
|
+
return false;
|
|
136
|
+
}
|
|
137
|
+
// Use default equality comparison if no custom function provided
|
|
138
|
+
const compareElements = equalityFn || ((a, b) => a === b);
|
|
139
|
+
// For each element in arr1, find a matching element in arr2
|
|
140
|
+
const arr2Copy = [...arr2];
|
|
141
|
+
for (let i = 0; i < arr1.length; i++) {
|
|
142
|
+
const element = arr1[i];
|
|
143
|
+
const matchIndex = arr2Copy.findIndex((el) => compareElements(element, el));
|
|
144
|
+
if (matchIndex === -1) {
|
|
145
|
+
return false;
|
|
146
|
+
}
|
|
147
|
+
// Remove the matched element to prevent duplicate matches
|
|
148
|
+
arr2Copy.splice(matchIndex, 1);
|
|
149
|
+
}
|
|
150
|
+
return true;
|
|
151
|
+
}
|
|
152
|
+
export function areArraysEqualWithOrderAndProperties(value, other) {
|
|
118
153
|
const type = Object.prototype.toString.call(value);
|
|
119
154
|
// If the two objects are not the same type, return false
|
|
120
155
|
if (type !== Object.prototype.toString.call(other)) {
|
|
@@ -136,7 +171,7 @@ export function areArraysEqualWithOrderandProperties(value, other) {
|
|
|
136
171
|
const itemType = Object.prototype.toString.call(item1);
|
|
137
172
|
// If an object or array, compare recursively
|
|
138
173
|
if (['[object Array]', '[object Object]'].indexOf(itemType) >= 0) {
|
|
139
|
-
if (!
|
|
174
|
+
if (!areArraysEqualWithOrderAndProperties(item1, item2)) {
|
|
140
175
|
return false;
|
|
141
176
|
}
|
|
142
177
|
}
|
|
@@ -211,15 +246,20 @@ export function sortArray(values, sortOrder = SortOrder.Asc) {
|
|
|
211
246
|
const direction = sortOrder == SortOrder.Asc ? 1 : -1;
|
|
212
247
|
return newValues.sort((a, b) => (a < b ? -1 * direction : a > b ? 1 * direction : 0));
|
|
213
248
|
}
|
|
249
|
+
export const getGenericComparatorForGridCell = (sortOrder) => {
|
|
250
|
+
const direction = sortOrder == SortOrder.Asc ? 1 : -1;
|
|
251
|
+
return (a, b) => {
|
|
252
|
+
return a.rawValue < b.rawValue ? -1 * direction : a.rawValue > b.rawValue ? 1 * direction : 0;
|
|
253
|
+
};
|
|
254
|
+
};
|
|
214
255
|
export function sortCellValueArray(cellValues, sortOrder = SortOrder.Asc) {
|
|
215
256
|
const newValues = [].concat(cellValues);
|
|
216
|
-
const
|
|
217
|
-
return newValues.sort(
|
|
257
|
+
const comparator = getGenericComparatorForGridCell(sortOrder);
|
|
258
|
+
return newValues.sort(comparator);
|
|
218
259
|
}
|
|
219
|
-
export
|
|
260
|
+
export const getNumericComparatorForGridCell = (sortOrder) => {
|
|
220
261
|
const direction = sortOrder == SortOrder.Asc ? 1 : -1;
|
|
221
|
-
|
|
222
|
-
return newValues.sort((a, b) => {
|
|
262
|
+
return (a, b) => {
|
|
223
263
|
const valueAAsNumber = Number(a.rawValue);
|
|
224
264
|
const valueBAsNumber = Number(b.rawValue);
|
|
225
265
|
if (isNaN(valueAAsNumber)) {
|
|
@@ -233,15 +273,23 @@ export function sortCellValueArrayNumeric(cellValues, sortOrder = SortOrder.Asc)
|
|
|
233
273
|
: valueAAsNumber > valueBAsNumber
|
|
234
274
|
? 1 * direction
|
|
235
275
|
: 0;
|
|
236
|
-
}
|
|
276
|
+
};
|
|
277
|
+
};
|
|
278
|
+
export function sortCellValueArrayNumeric(cellValues, sortOrder = SortOrder.Asc) {
|
|
279
|
+
const newValues = [].concat(cellValues);
|
|
280
|
+
const comparator = getNumericComparatorForGridCell(sortOrder);
|
|
281
|
+
return newValues.sort(comparator);
|
|
237
282
|
}
|
|
238
|
-
export
|
|
239
|
-
|
|
283
|
+
export const getDateComparatorForGridCell = (sortOrder) => {
|
|
284
|
+
return (a, b) => {
|
|
240
285
|
return sortOrder == SortOrder.Asc
|
|
241
286
|
? +new Date(a.rawValue) - +new Date(b.rawValue)
|
|
242
287
|
: +new Date(b.rawValue) - +new Date(a.rawValue);
|
|
243
|
-
}
|
|
244
|
-
|
|
288
|
+
};
|
|
289
|
+
};
|
|
290
|
+
export function sortCellValueArrayDates(cellValues, sortOrder = SortOrder.Asc) {
|
|
291
|
+
const comparator = getDateComparatorForGridCell(sortOrder);
|
|
292
|
+
return [].concat(cellValues).sort(comparator);
|
|
245
293
|
}
|
|
246
294
|
export function groupArrayBy(array, prop) {
|
|
247
295
|
return array.reduce((acc, item) => {
|
|
@@ -346,7 +394,8 @@ export const ArrayExtensions = {
|
|
|
346
394
|
areArraysEqual,
|
|
347
395
|
areArraysNotEqual,
|
|
348
396
|
areArraysEqualWithOrder,
|
|
349
|
-
|
|
397
|
+
areArraysEqualWithOrderAndProperties,
|
|
398
|
+
areArraysEqualWithCustomComparator,
|
|
350
399
|
sortArray,
|
|
351
400
|
sortCellValueArray,
|
|
352
401
|
sortCellValueArrayNumeric,
|
|
@@ -230,7 +230,7 @@ export function CreateEmptyFormatColumn() {
|
|
|
230
230
|
DisplayFormat: undefined,
|
|
231
231
|
CellAlignment: undefined,
|
|
232
232
|
RowScope: undefined,
|
|
233
|
-
Target: 'cell'
|
|
233
|
+
Target: 'cell',
|
|
234
234
|
};
|
|
235
235
|
}
|
|
236
236
|
export function CreateEmptyFreeTextColumn(defaultSpecialColumnSettings) {
|
|
@@ -255,7 +255,7 @@ export function CreateEmptyPivotLayout(layout) {
|
|
|
255
255
|
PivotColumns: layout.PivotColumns || [],
|
|
256
256
|
PivotAggregationColumns: layout.PivotAggregationColumns || [],
|
|
257
257
|
PivotGroupedColumns: layout.PivotGroupedColumns || [],
|
|
258
|
-
|
|
258
|
+
ColumnSizing: layout.ColumnSizing || {},
|
|
259
259
|
};
|
|
260
260
|
return result;
|
|
261
261
|
}
|
|
@@ -270,7 +270,7 @@ export function CreateEmptyLayout(layout, adaptableColumns) {
|
|
|
270
270
|
TableColumns: tableLayout.TableColumns || [],
|
|
271
271
|
ColumnSorts: tableLayout.ColumnSorts || [],
|
|
272
272
|
ColumnFilters: tableLayout.ColumnFilters || [],
|
|
273
|
-
|
|
273
|
+
ColumnSizing: tableLayout.ColumnSizing || {},
|
|
274
274
|
RowGroupedColumns: tableLayout.RowGroupedColumns ||
|
|
275
275
|
(adaptableColumns ? adaptableColumns.filter((c) => c.isGrouped).map((c) => c.columnId) : []),
|
|
276
276
|
};
|
|
@@ -41,7 +41,7 @@ export class AnnotationsService {
|
|
|
41
41
|
shouldListenToEvents() {
|
|
42
42
|
// Listen to events if we either have Notes in state or if Comments have been set up
|
|
43
43
|
return (ArrayExtensions.IsNotNullOrEmpty(this.api.noteApi.getAllNotes()) ||
|
|
44
|
-
this.api.internalApi.getModuleService().
|
|
44
|
+
this.api.internalApi.getModuleService().isAdapTableModulePresent('Comment'));
|
|
45
45
|
}
|
|
46
46
|
setUpEventListeners() {
|
|
47
47
|
this.adaptable._on('MouseEnter', (event) => this.handleMouseEnter(event));
|
|
@@ -4,7 +4,8 @@ import { AdaptableObject } from '../../../AdaptableState/Common/AdaptableObject'
|
|
|
4
4
|
import { IAdaptableService } from './IAdaptableService';
|
|
5
5
|
import { AdaptableModule } from '../../../AdaptableState/Common/Types';
|
|
6
6
|
export interface IModuleService extends IAdaptableService {
|
|
7
|
-
|
|
7
|
+
logMissingAgGridDepsInfos(): void;
|
|
8
|
+
isAdapTableModulePresent(adaptableModule: AdaptableModule): boolean;
|
|
8
9
|
isModuleEditable(adaptableModule: AdaptableModule): boolean;
|
|
9
10
|
createModuleUIItems(): void;
|
|
10
11
|
getTeamSharingAction(adaptableModule: AdaptableModule): TeamSharingImportInfo<AdaptableObject> | undefined;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { AdaptableModule } from '../../types';
|
|
2
|
-
import { IModule,
|
|
2
|
+
import { IModule, IModuleCollection, ModuleInfo } from '../../Strategy/Interface/IModule';
|
|
3
3
|
import { TeamSharingImportInfo } from '../../AdaptableState/TeamSharingState';
|
|
4
4
|
import { AdaptableObject } from '../../AdaptableState/Common/AdaptableObject';
|
|
5
5
|
import { IModuleService } from './Interface/IModuleService';
|
|
@@ -7,9 +7,9 @@ import { AdaptableApi } from '../../../types';
|
|
|
7
7
|
export declare class ModuleService implements IModuleService {
|
|
8
8
|
private adaptableApi;
|
|
9
9
|
constructor(adaptableApi: AdaptableApi);
|
|
10
|
-
|
|
11
|
-
isModuleName(adaptableModule: string): adaptableModule is AdaptableModule;
|
|
10
|
+
isAdapTableModulePresent(adaptableModule: AdaptableModule): boolean;
|
|
12
11
|
isModuleEditable(adaptableModule: AdaptableModule): boolean;
|
|
12
|
+
logMissingAgGridDepsInfos(): void;
|
|
13
13
|
getModuleFriendlyName(adaptableModule: AdaptableModule): string;
|
|
14
14
|
createModuleUIItems(): void;
|
|
15
15
|
private createSettingsPanelItems;
|
|
@@ -1,20 +1,16 @@
|
|
|
1
1
|
import Helper from '../Helpers/Helper';
|
|
2
|
-
import { HOST_URL_DOCS } from '../Constants/DocumentationLinkConstants';
|
|
3
|
-
import { ALL_MODULES } from '../../AdaptableState/Common/Types';
|
|
2
|
+
import { AgGridRequiredModulesDocsLink, HOST_URL_DOCS, } from '../Constants/DocumentationLinkConstants';
|
|
4
3
|
export class ModuleService {
|
|
5
4
|
constructor(adaptableApi) {
|
|
6
5
|
this.adaptableApi = adaptableApi;
|
|
7
6
|
this.adaptableApi = adaptableApi;
|
|
8
7
|
}
|
|
9
|
-
|
|
8
|
+
isAdapTableModulePresent(adaptableModule) {
|
|
10
9
|
let module = this.getModuleCollection().get(adaptableModule);
|
|
11
10
|
if (!module) {
|
|
12
11
|
return false;
|
|
13
12
|
}
|
|
14
|
-
return module.
|
|
15
|
-
}
|
|
16
|
-
isModuleName(adaptableModule) {
|
|
17
|
-
return ALL_MODULES.includes(adaptableModule);
|
|
13
|
+
return module.isModuleVisible();
|
|
18
14
|
}
|
|
19
15
|
isModuleEditable(adaptableModule) {
|
|
20
16
|
let module = this.getModuleCollection().get(adaptableModule);
|
|
@@ -23,6 +19,22 @@ export class ModuleService {
|
|
|
23
19
|
}
|
|
24
20
|
return module.isModuleEditable();
|
|
25
21
|
}
|
|
22
|
+
logMissingAgGridDepsInfos() {
|
|
23
|
+
// log missing core (required) AG Grid dependencies
|
|
24
|
+
const agGridModulesAdapter = this.adaptableApi.internalApi.getAgGridModulesAdapter();
|
|
25
|
+
const mandatoryAgGridModuleNames = agGridModulesAdapter.getMandatoryAgGridModuleNames();
|
|
26
|
+
const registeredAgGridModuleNames = agGridModulesAdapter.getAgGridRegisteredModuleNames();
|
|
27
|
+
const missingAgGridModuleNames = mandatoryAgGridModuleNames.filter((moduleName) => !registeredAgGridModuleNames.includes(moduleName));
|
|
28
|
+
if (missingAgGridModuleNames.length) {
|
|
29
|
+
this.adaptableApi.consoleError(`AdapTable requires the following AG Grid modules to be registered: ${missingAgGridModuleNames.join(', ')}.
|
|
30
|
+
|
|
31
|
+
See for more information: ${AgGridRequiredModulesDocsLink}`);
|
|
32
|
+
}
|
|
33
|
+
// log optional missing AG Grid dependencies for all modules
|
|
34
|
+
this.getModuleCollection().forEach((adaptableModule) => {
|
|
35
|
+
adaptableModule.logMissingAgGridDepsInfos();
|
|
36
|
+
});
|
|
37
|
+
}
|
|
26
38
|
getModuleFriendlyName(adaptableModule) {
|
|
27
39
|
return this.getModuleInfoByModule(adaptableModule)?.FriendlyName ?? adaptableModule;
|
|
28
40
|
}
|
|
@@ -20,7 +20,9 @@ class AdaptableView extends React.Component {
|
|
|
20
20
|
return (React.createElement("div", null,
|
|
21
21
|
React.createElement(GridCellPopup, null),
|
|
22
22
|
React.createElement(QuickSearchDrawer, null),
|
|
23
|
-
this.props.AdaptableApi.internalApi
|
|
23
|
+
this.props.AdaptableApi.internalApi
|
|
24
|
+
.getModuleService()
|
|
25
|
+
.isAdapTableModulePresent('Dashboard') && React.createElement(Dashboard, { api: this.props.AdaptableApi }),
|
|
24
26
|
this.props.PopupState.PromptPopup.ShowPromptPopup && (React.createElement(AdaptablePopupPrompt, { message: this.props.PopupState.PromptPopup.Message, header: this.props.PopupState.PromptPopup.Header, onClose: this.props.onClosePromptPopup, onConfirm: this.props.onConfirmPromptPopup, onConfirmActionCreator: this.props.PopupState.PromptPopup.ConfirmActionCreator, defaultValue: this.props.PopupState.PromptPopup.DefaultValue })),
|
|
25
27
|
Boolean(this.props.PopupState.ConfirmationPopup.ShowConfirmationPopup) && (React.createElement(AdaptablePopupConfirmation, { header: this.props.PopupState.ConfirmationPopup.Header, messsage: this.props.PopupState.ConfirmationPopup.Msg, showPopup: this.props.PopupState.ConfirmationPopup.ShowConfirmationPopup, cancelButtonText: this.props.PopupState.ConfirmationPopup.CancelButtonText, confirmButtonText: this.props.PopupState.ConfirmationPopup.ConfirmButtonText, onCancel: this.props.onCancelConfirmationPopup, onConfirm: this.props.onConfirmConfirmationPopup, showInputBox: this.props.PopupState.ConfirmationPopup.ShowInputBox, messageType: this.props.PopupState.ConfirmationPopup.MessageType, api: this.props.AdaptableApi })),
|
|
26
28
|
Boolean(this.props.PopupState.ScreenPopup.ShowScreenPopup) && (React.createElement(AdaptablePopup, { componentName: this.props.PopupState.ScreenPopup.ComponentName, componentModule: this.props.PopupState.ScreenPopup.ComponentModule, onHide: this.props.onCloseScreenPopup, api: this.props.AdaptableApi, onClearParams: () => this.props.onClearPopupParams(), moduleParams: this.props.PopupState.ScreenPopup.Params, moduleProps: this.props.PopupState.ScreenPopup.PopupProps })),
|
|
@@ -40,6 +40,8 @@ const MODULES_WITH_SCOPE = [
|
|
|
40
40
|
const ColumnDefPreview = (props) => {
|
|
41
41
|
const adaptable = useAdaptable();
|
|
42
42
|
if (props.column) {
|
|
43
|
+
const api = adaptable.api;
|
|
44
|
+
const summary = api.columnApi.getColumnSummaryForColumnId(props.column.columnId);
|
|
43
45
|
const keyValuePairs = [
|
|
44
46
|
{
|
|
45
47
|
Key: 'Column Id',
|
|
@@ -112,7 +114,7 @@ const ColumnDefPreview = (props) => {
|
|
|
112
114
|
{
|
|
113
115
|
Key: 'Column Filter',
|
|
114
116
|
Value: props.column.filterable
|
|
115
|
-
?
|
|
117
|
+
? api.filterApi.columnFilterApi.columnFilterToString(summary.columnFilter)
|
|
116
118
|
: 'Ignore',
|
|
117
119
|
},
|
|
118
120
|
{
|
|
@@ -143,6 +145,10 @@ const ColumnDefPreview = (props) => {
|
|
|
143
145
|
Key: 'Sortable',
|
|
144
146
|
Value: props.column.sortable ? 'Yes' : 'No',
|
|
145
147
|
},
|
|
148
|
+
{
|
|
149
|
+
Key: 'No. Distinct Values',
|
|
150
|
+
Value: summary.uniqueGridCells.length,
|
|
151
|
+
},
|
|
146
152
|
]
|
|
147
153
|
.map((keyValuePair) => {
|
|
148
154
|
return {
|
|
@@ -162,7 +168,7 @@ const ColumnDefPreview = (props) => {
|
|
|
162
168
|
const ModuleView = (props) => {
|
|
163
169
|
const adaptable = useAdaptable();
|
|
164
170
|
const module = adaptable.ModuleService.getModuleById(props.moduleName);
|
|
165
|
-
if (!module
|
|
171
|
+
if (!module?.isModuleVisible()) {
|
|
166
172
|
return null;
|
|
167
173
|
}
|
|
168
174
|
const moduleInfo = module.moduleInfo;
|
|
@@ -213,7 +219,7 @@ export const ColumnInfo = (props) => {
|
|
|
213
219
|
React.createElement(Box, { mb: 3 },
|
|
214
220
|
React.createElement(FormLayout, null,
|
|
215
221
|
React.createElement(FormRow, { label: "Select Column" },
|
|
216
|
-
React.createElement(ColumnSelector, {
|
|
222
|
+
React.createElement(ColumnSelector, { value: selectedColumnId, onChange: (columnId) => setSelectedColumnId(columnId) })))),
|
|
217
223
|
selectedColumnId && (React.createElement(Tabs, { mb: 3 },
|
|
218
224
|
React.createElement(Tabs.Tab, null, "Column Summary"),
|
|
219
225
|
React.createElement(Tabs.Tab, null, "Column State"),
|
|
@@ -6,7 +6,6 @@ import { useAdaptable } from '../../AdaptableContext';
|
|
|
6
6
|
*/
|
|
7
7
|
export const AdaptableIconSelector = (props) => {
|
|
8
8
|
const adaptable = useAdaptable();
|
|
9
|
-
const
|
|
10
|
-
|
|
11
|
-
return React.createElement(IconSelector, { customIcons: customDefinedIcons, ...props });
|
|
9
|
+
const customIcons = adaptable.api.userInterfaceApi.getCustomIcons();
|
|
10
|
+
return React.createElement(IconSelector, { customIcons: customIcons, ...props });
|
|
12
11
|
};
|
|
@@ -6,9 +6,8 @@ import { useAdaptableFilterWrapper } from './useAdaptableFilterWrapper';
|
|
|
6
6
|
* It transforms predicates in QlPredicates.
|
|
7
7
|
*/
|
|
8
8
|
export const AdaptableColumnFilter = (props) => {
|
|
9
|
-
const { qlPredicate, qlPredicateDefs, columnFilter, handlePredicateChange } = useAdaptableFilterWrapper(props.columnId);
|
|
9
|
+
const { qlPredicate, qlPredicateDefs, columnFilter, handlePredicateChange } = useAdaptableFilterWrapper(props.columnId, 'FilterForm');
|
|
10
10
|
return (React.createElement(ColumnFilterComponent, { wrapperProps: props.wrapperProps, columnId: props.columnId, predicate: qlPredicate, predicateDefs: qlPredicateDefs, disabled: columnFilter?.IsSuspended, onPredicateChange: React.useCallback((predicate) => {
|
|
11
11
|
handlePredicateChange(predicate);
|
|
12
|
-
|
|
13
|
-
}, [handlePredicateChange, props.onChange]) }));
|
|
12
|
+
}, [handlePredicateChange]) }));
|
|
14
13
|
};
|
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { ColumnFilterProps } from '../../../Utilities/Interface/ColumnFilterProps';
|
|
3
3
|
export interface AdaptableColumnFilterProps extends ColumnFilterProps {
|
|
4
|
-
onClear?: () => void;
|
|
5
|
-
onChange?: () => void;
|
|
6
4
|
}
|
|
7
5
|
/**
|
|
8
6
|
* This wrapper knows about predicates.
|
|
@@ -8,15 +8,13 @@ import { useAdaptableFilterWrapper } from './useAdaptableFilterWrapper';
|
|
|
8
8
|
*/
|
|
9
9
|
export const AdaptableFloatingFilter = (props) => {
|
|
10
10
|
const adaptable = useAdaptable();
|
|
11
|
-
const { qlPredicate, qlPredicateDefs, columnFilter, column, handlePredicateChange, handleOnChange, handleClear, } = useAdaptableFilterWrapper(props.Column.columnId);
|
|
11
|
+
const { qlPredicate, qlPredicateDefs, columnFilter, column, handlePredicateChange, handleOnChange, handleClear, } = useAdaptableFilterWrapper(props.Column.columnId, 'FilterBar');
|
|
12
12
|
const onClear = React.useCallback(() => {
|
|
13
13
|
handleClear();
|
|
14
|
-
|
|
15
|
-
}, [handleClear, props.onClear]);
|
|
14
|
+
}, [handleClear]);
|
|
16
15
|
const onPredicateChange = React.useCallback((newPredicate) => {
|
|
17
16
|
handlePredicateChange(newPredicate);
|
|
18
|
-
|
|
19
|
-
}, [handlePredicateChange, props.onChange]);
|
|
17
|
+
}, [handlePredicateChange]);
|
|
20
18
|
if (!column) {
|
|
21
19
|
return null;
|
|
22
20
|
}
|
|
@@ -32,7 +30,6 @@ export const AdaptableFloatingFilter = (props) => {
|
|
|
32
30
|
Inputs: [],
|
|
33
31
|
},
|
|
34
32
|
]);
|
|
35
|
-
props.onChange?.();
|
|
36
33
|
}
|
|
37
|
-
}, onClear: onClear, columnId: props.Column.columnId, predicate: qlPredicate, predicateDefs: qlPredicateDefs, disabled: columnFilter?.IsSuspended, onPredicateChange: onPredicateChange
|
|
34
|
+
}, onClear: onClear, columnId: props.Column.columnId, predicate: qlPredicate, predicateDefs: qlPredicateDefs, disabled: columnFilter?.IsSuspended, onPredicateChange: onPredicateChange }));
|
|
38
35
|
};
|
|
@@ -62,7 +62,7 @@ const AndOrInput = (props) => {
|
|
|
62
62
|
};
|
|
63
63
|
export const ColumnFilterComponent = (props) => {
|
|
64
64
|
const adaptable = useAdaptable();
|
|
65
|
-
const autoApplyColumnFilter = adaptable.
|
|
65
|
+
const autoApplyColumnFilter = adaptable.api.filterApi.columnFilterApi.internalApi.shouldAutoApplyColumnFilter(props.columnId);
|
|
66
66
|
const [predicateNotYetApplied, setPredicateNotYetApplied] = React.useState(props.predicate);
|
|
67
67
|
const applyFilter = () => {
|
|
68
68
|
props.onPredicateChange(currentPredicateRef.current);
|
|
@@ -116,7 +116,7 @@ export const ColumnFilterComponent = (props) => {
|
|
|
116
116
|
React.createElement(AndOrInput, { onChange: onCombineChange, operator: currentPredicate.operator }),
|
|
117
117
|
React.createElement(SimpleButton, { ml: 2, onClick: () => onPredicateChange(null) }, "Clear All")),
|
|
118
118
|
React.createElement(Flex, { flexDirection: "column", className: "ab-ColumnFilter", flex: 1, minHeight: 0, ...props.wrapperProps },
|
|
119
|
-
React.createElement(Box, {
|
|
119
|
+
React.createElement(Box, { style: { overflow: 'auto' } },
|
|
120
120
|
currentPredicate.args.map((predicate, index) => {
|
|
121
121
|
return (React.createElement(ColumnFilterEditor, { deleteDisabled: currentPredicate.args.length < 2, onDelete: () => {
|
|
122
122
|
const currentPredicate = currentPredicateRef.current;
|
|
@@ -141,6 +141,13 @@ export const ColumnFilterComponent = (props) => {
|
|
|
141
141
|
} }));
|
|
142
142
|
}),
|
|
143
143
|
isLastPredicateValid && filterPredicateDropdown),
|
|
144
|
-
!autoApplyColumnFilter ? (React.createElement(
|
|
145
|
-
React.createElement(
|
|
144
|
+
!autoApplyColumnFilter ? (React.createElement(React.Fragment, null,
|
|
145
|
+
React.createElement(Box, { flex: 1, "data-name": "spacer" }),
|
|
146
|
+
React.createElement(Flex, { pt: 2, className: "ab-ColumnFilter-actions", justifyContent: "space-between" },
|
|
147
|
+
React.createElement(Box, { className: "ab-ColumnFilter-action-apply" },
|
|
148
|
+
React.createElement(SimpleButton, { tone: "accent", variant: "raised", onClick: applyFilter }, "Apply Filter")),
|
|
149
|
+
React.createElement(Box, { className: "ab-ColumnFilter-action-reset" },
|
|
150
|
+
React.createElement(SimpleButton, { tone: "neutral", variant: "raised", onClick: () => {
|
|
151
|
+
setPredicateNotYetApplied(props.predicate);
|
|
152
|
+
} }, "Reset Filter"))))) : null)));
|
|
146
153
|
};
|
|
@@ -29,5 +29,5 @@ export const ColumnFilterWindow = (props) => {
|
|
|
29
29
|
}
|
|
30
30
|
return label;
|
|
31
31
|
}, onChange: (column) => setColumnId(column), filterColumn: (column) => column.queryable, isMulti: false, value: columnId })))),
|
|
32
|
-
React.createElement(AdaptableColumnFilter, { columnId: columnId
|
|
32
|
+
React.createElement(AdaptableColumnFilter, { columnId: columnId })));
|
|
33
33
|
};
|
|
@@ -9,13 +9,12 @@ import { FloatingFilterInputList } from './components/FloatingFilterInputList';
|
|
|
9
9
|
import { isPredicateEmpty, qlPredicateToString } from './utils';
|
|
10
10
|
export const FloatingFilter = (props) => {
|
|
11
11
|
const adaptable = useAdaptable();
|
|
12
|
-
const columnFilterOptions = adaptable.adaptableOptions.filterOptions.columnFilterOptions;
|
|
13
12
|
/**
|
|
14
13
|
* We always have a syntetic predicate with AND or OR, so the logic is easyer.
|
|
15
14
|
* The wrapper is in charge of constructing the correct column filter.
|
|
16
15
|
*/
|
|
17
16
|
const isMultiple = props.predicate?.args?.length > 1;
|
|
18
|
-
const isManualApply = !
|
|
17
|
+
const isManualApply = !adaptable.api.filterApi.columnFilterApi.internalApi.shouldAutoApplyColumnFilter(props.columnId);
|
|
19
18
|
const isInlineEditable = !isMultiple && !isManualApply;
|
|
20
19
|
// only used when there is only one filter selected
|
|
21
20
|
let singleFilterPredicateDef = null;
|
|
@@ -10,7 +10,7 @@ export const LayoutColumnFilter = (props) => {
|
|
|
10
10
|
const predicateDefs = api.filterApi.columnFilterApi.getFilterPredicateDefsForColumn(column);
|
|
11
11
|
const qlDataType = mapColumnDataTypeToExpressionFunctionType(column.dataType);
|
|
12
12
|
const qlPredicateDefs = predicateDefs.map((predDef) => mapAdaptablePredicateDefToQlPredicateDef(predDef, qlDataType));
|
|
13
|
-
const qlPredicate = mapColumnFilterToQlPredicate(props.columnFilter, column, qlPredicateDefs, columnFilterOptions, api);
|
|
13
|
+
const qlPredicate = mapColumnFilterToQlPredicate(props.columnFilter, column, qlPredicateDefs, columnFilterOptions, 'FilterForm', api);
|
|
14
14
|
const handlePredicateChange = (newPredicate) => {
|
|
15
15
|
const newAdaptablePredicates = newPredicate.args.map(mapQlPredicateToAdaptablePredicate);
|
|
16
16
|
const newFilter = {
|
|
@@ -70,7 +70,7 @@ export const ColumnFilterInput = ({ type, value, onChange: onChangeProp, onClear
|
|
|
70
70
|
}
|
|
71
71
|
};
|
|
72
72
|
if (type === 'date' && !showDatePicker) {
|
|
73
|
-
return (React.createElement(AdaptableDateInlineInput, { value: liveValue, disabled: disabled, onFocus: onFocus, onBlur: onBlur, pr: 0, style: { border: 'none' }, onKeyDownCapture: onKeyDownCapture, onChange: (value) => {
|
|
73
|
+
return (React.createElement(AdaptableDateInlineInput, { "data-name": "floating-filter-input", value: liveValue, disabled: disabled, onFocus: onFocus, onBlur: onBlur, pr: 0, style: { border: 'none' }, onKeyDownCapture: onKeyDownCapture, onChange: (value) => {
|
|
74
74
|
onChange(value);
|
|
75
75
|
setLiveValue(value);
|
|
76
76
|
} }));
|
|
@@ -96,7 +96,7 @@ export const ColumnFilterInput = ({ type, value, onChange: onChangeProp, onClear
|
|
|
96
96
|
borderRadius: 0,
|
|
97
97
|
border: 'none',
|
|
98
98
|
}
|
|
99
|
-
: {}, onFocus: onFocus, onBlur: onBlur, disabled: disabled, type: type === 'number' ? 'text' : type,
|
|
99
|
+
: {}, "data-name": "floating-filter-input", onFocus: onFocus, onBlur: onBlur, disabled: disabled, type: type === 'number' ? 'text' : type,
|
|
100
100
|
// autoFocus has to be FALSE because if the input receives focus in the init phase,
|
|
101
101
|
// it may scroll the AG Grid header viewport into view and de-synchronize it (relative to the content viewport)
|
|
102
102
|
autoFocus: false, value: liveValue ?? '', onKeyDown: onKeyDown, showClearButton: false, onChange: (e) => {
|
|
@@ -33,8 +33,8 @@ export function useDistinctFilterColumnValues(options) {
|
|
|
33
33
|
let ignore = false;
|
|
34
34
|
setIsDistinctColumnValuesLoading(true);
|
|
35
35
|
let searchValueUsedInFilterValue = false;
|
|
36
|
-
api.
|
|
37
|
-
.
|
|
36
|
+
api.filterApi.columnFilterApi.internalApi
|
|
37
|
+
.getColumnFilterValues({
|
|
38
38
|
columnId,
|
|
39
39
|
get currentSearchValue() {
|
|
40
40
|
searchValueUsedInFilterValue = true;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { QlLogicalOperator, QlPredicate } from '../../../parser/src/predicate';
|
|
2
2
|
import * as LayoutRedux from '../../../Redux/ActionsReducers/LayoutRedux';
|
|
3
3
|
import { AdaptablePredicate, ColumnFilter } from '../../../types';
|
|
4
|
-
export declare const useAdaptableFilterWrapper: (columnId: string, handleOnChangeOverride?: (columnFilter: ColumnFilter) => void) => {
|
|
4
|
+
export declare const useAdaptableFilterWrapper: (columnId: string, filterComponent: 'FilterBar' | 'FilterForm', handleOnChangeOverride?: (columnFilter: ColumnFilter) => void) => {
|
|
5
5
|
qlPredicate: QlPredicate;
|
|
6
6
|
qlPredicateDefs: import("@adaptabletools/adaptable/src/parser/src/predicate/types").QlPredicateDef[];
|
|
7
7
|
columnFilter: ColumnFilter;
|
|
@@ -6,7 +6,7 @@ import { getCurrentLayoutSelector } from '../../../Redux/ActionsReducers/LayoutR
|
|
|
6
6
|
import { mapColumnDataTypeToExpressionFunctionType } from '../../../Utilities/adaptableQlUtils';
|
|
7
7
|
import { useAdaptable } from '../../AdaptableContext';
|
|
8
8
|
import { mapAdaptablePredicateDefToQlPredicateDef, mapColumnFilterToQlPredicate, mapQlPredicateToAdaptablePredicate, } from './utils';
|
|
9
|
-
export const useAdaptableFilterWrapper = (columnId, handleOnChangeOverride) => {
|
|
9
|
+
export const useAdaptableFilterWrapper = (columnId, filterComponent, handleOnChangeOverride) => {
|
|
10
10
|
const adaptable = useAdaptable();
|
|
11
11
|
const dispatch = useDispatch();
|
|
12
12
|
const api = adaptable.api;
|
|
@@ -23,7 +23,7 @@ export const useAdaptableFilterWrapper = (columnId, handleOnChangeOverride) => {
|
|
|
23
23
|
return currentLayout?.ColumnFilters?.find((cf) => cf.ColumnId === columnId);
|
|
24
24
|
}, [currentLayout?.ColumnFilters, columnId]);
|
|
25
25
|
const qlPredicate = column
|
|
26
|
-
? mapColumnFilterToQlPredicate(columnFilter, column, qlPredicateDefs, columnFilterOptions, api)
|
|
26
|
+
? mapColumnFilterToQlPredicate(columnFilter, column, qlPredicateDefs, columnFilterOptions, filterComponent, api)
|
|
27
27
|
: null;
|
|
28
28
|
const handleOnChange = (adaptablePredicate, logic = 'AND') => {
|
|
29
29
|
// make sure we always have the latest columnFiler
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { QlPredicate, QlPredicateDef } from '../../../parser/src/predicate';
|
|
2
|
-
import { AdaptableApi, AdaptableColumn, AdaptablePredicate, AdaptablePredicateDef, ColumnFilter, ColumnFilterOptions, ExpressionFunctionInputType } from '../../../types';
|
|
2
|
+
import { AdaptableApi, AdaptableColumn, AdaptableFilterComponentLocation, AdaptablePredicate, AdaptablePredicateDef, ColumnFilter, ColumnFilterOptions, ExpressionFunctionInputType } from '../../../types';
|
|
3
3
|
export declare const mapAdaptablePredicateDefToQlPredicateDef: (adaptablePredicateDef: AdaptablePredicateDef, dataType: ExpressionFunctionInputType) => QlPredicateDef;
|
|
4
4
|
export declare const mapAdaptablePredicateToQlPredicate: (adaptablePredicate: AdaptablePredicate) => QlPredicate;
|
|
5
5
|
export declare const mapQlPredicateToAdaptablePredicate: (qlPredicate: QlPredicate) => AdaptablePredicate;
|
|
6
6
|
export declare const qlPredicateToString: (qlPredicate: QlPredicate, predicateDefs: QlPredicateDef[]) => string;
|
|
7
7
|
export declare const isPredicateEmpty: (predicate: QlPredicate, predicateDef: QlPredicateDef) => boolean;
|
|
8
|
-
export declare const mapColumnFilterToQlPredicate: (columnFilter: ColumnFilter, abColumn: AdaptableColumn, qlPredicateDefs: QlPredicateDef[], columnFilterOptions: ColumnFilterOptions, api: AdaptableApi) => QlPredicate;
|
|
8
|
+
export declare const mapColumnFilterToQlPredicate: (columnFilter: ColumnFilter, abColumn: AdaptableColumn, qlPredicateDefs: QlPredicateDef[], columnFilterOptions: ColumnFilterOptions, filterComponent: AdaptableFilterComponentLocation, api: AdaptableApi) => QlPredicate;
|
|
@@ -82,7 +82,7 @@ export const isPredicateEmpty = (predicate, predicateDef) => {
|
|
|
82
82
|
predicate.args.length === 0 ||
|
|
83
83
|
predicate.args.every((arg) => arg == undefined));
|
|
84
84
|
};
|
|
85
|
-
export const mapColumnFilterToQlPredicate = (columnFilter, abColumn, qlPredicateDefs, columnFilterOptions, api) => {
|
|
85
|
+
export const mapColumnFilterToQlPredicate = (columnFilter, abColumn, qlPredicateDefs, columnFilterOptions, filterComponent, api) => {
|
|
86
86
|
const combinator = columnFilter?.PredicatesOperator ?? 'AND';
|
|
87
87
|
const qlPredicate = {
|
|
88
88
|
operator: combinator,
|
|
@@ -99,6 +99,7 @@ export const mapColumnFilterToQlPredicate = (columnFilter, abColumn, qlPredicate
|
|
|
99
99
|
if (typeof defaultNumericColumnFilter === 'function') {
|
|
100
100
|
const context = {
|
|
101
101
|
column: abColumn,
|
|
102
|
+
filterComponent,
|
|
102
103
|
...api.internalApi.buildBaseContext(),
|
|
103
104
|
};
|
|
104
105
|
defaultQlNumberPredicate = defaultNumericColumnFilter(context);
|
|
@@ -118,6 +119,7 @@ export const mapColumnFilterToQlPredicate = (columnFilter, abColumn, qlPredicate
|
|
|
118
119
|
if (typeof defaultTextColumnFilter === 'function') {
|
|
119
120
|
const context = {
|
|
120
121
|
column: abColumn,
|
|
122
|
+
filterComponent,
|
|
121
123
|
...api.internalApi.buildBaseContext(),
|
|
122
124
|
};
|
|
123
125
|
defaultQlTextPredicate = defaultTextColumnFilter(context);
|
|
@@ -131,12 +133,14 @@ export const mapColumnFilterToQlPredicate = (columnFilter, abColumn, qlPredicate
|
|
|
131
133
|
: { operator: 'Contains', args: [] };
|
|
132
134
|
break;
|
|
133
135
|
case 'date':
|
|
136
|
+
case 'dateString':
|
|
134
137
|
let defaultQlDatePredicate;
|
|
135
138
|
const defaultDateColumnFilter = columnFilterOptions.defaultDateColumnFilter;
|
|
136
139
|
if (defaultDateColumnFilter) {
|
|
137
140
|
if (typeof defaultDateColumnFilter === 'function') {
|
|
138
141
|
const context = {
|
|
139
142
|
column: abColumn,
|
|
143
|
+
filterComponent,
|
|
140
144
|
...api.internalApi.buildBaseContext(),
|
|
141
145
|
};
|
|
142
146
|
defaultQlDatePredicate = defaultDateColumnFilter(context);
|
|
@@ -160,6 +164,7 @@ export const mapColumnFilterToQlPredicate = (columnFilter, abColumn, qlPredicate
|
|
|
160
164
|
if (typeof defaultArrayColumnFilter === 'function') {
|
|
161
165
|
const context = {
|
|
162
166
|
column: abColumn,
|
|
167
|
+
filterComponent,
|
|
163
168
|
...api.internalApi.buildBaseContext(),
|
|
164
169
|
};
|
|
165
170
|
defaultQlArrayPredicate = defaultArrayColumnFilter(context);
|
|
@@ -107,9 +107,8 @@ export const EntityRulesEditor = (props) => {
|
|
|
107
107
|
});
|
|
108
108
|
}
|
|
109
109
|
};
|
|
110
|
-
const isValuesPredicateDef = (colDef) => colDef && ['In', 'NotIn'].includes(colDef.id);
|
|
111
110
|
const filteredPredicateDefs = predicateDefs.filter((def) => {
|
|
112
|
-
if (
|
|
111
|
+
if (api.predicateApi.internalApi.IsInorNotInPredicateDef(def)) {
|
|
113
112
|
return 'ColumnIds' in data.Scope && data.Scope.ColumnIds.length === 1;
|
|
114
113
|
}
|
|
115
114
|
return true;
|
|
@@ -29,7 +29,7 @@ export const ColumnValuesSelect = (props) => {
|
|
|
29
29
|
minWidth: `var(--ab-cmp-select-column-menu-${column.columnId}__min-width, var(--ab-cmp-select-column-menu__min-width, 160px))`,
|
|
30
30
|
};
|
|
31
31
|
}, [column.columnId]);
|
|
32
|
-
const component = (React.createElement(Select, { key: "select", isMulti: true, resizable: true, showHeaderSelectionCheckbox: true, searchable:
|
|
32
|
+
const component = (React.createElement(Select, { key: "select", isMulti: true, resizable: true, showHeaderSelectionCheckbox: true, searchable: 'menulist', closeMenuOnSelect: false, menuStyle: menuStyle, ...props.selectProps, options: options, value: value, isLoading: props.isLoading, onChange: props.onChange }));
|
|
33
33
|
return (React.createElement("div", { className: join(baseClassName, props.isLoading && `${baseClassName}--loading`, !value.length && `${baseClassName}--empty`), onKeyDownCapture: (e) => {
|
|
34
34
|
const event = e.nativeEvent || e;
|
|
35
35
|
event.stopPropagation = () => {
|
|
@@ -8,7 +8,7 @@ import { ButtonNew } from '../../Buttons/ButtonNew';
|
|
|
8
8
|
import { PopupPanel } from './PopupPanel';
|
|
9
9
|
import { Flex } from 'rebass';
|
|
10
10
|
import { CheckBox } from '../../../../components/CheckBox';
|
|
11
|
-
import {
|
|
11
|
+
import { LayoutShowNonExtendedObjects } from '../../../../Redux/ActionsReducers/InternalRedux';
|
|
12
12
|
import SimpleButton from '../../../../components/SimpleButton';
|
|
13
13
|
import { useAdaptable } from '../../../AdaptableContext';
|
|
14
14
|
import { useEffect } from 'react';
|
|
@@ -113,16 +113,16 @@ export const AdaptablePopupModuleView = (props) => {
|
|
|
113
113
|
.getModuleService()
|
|
114
114
|
.getModuleById(props.module.moduleInfo.ModuleName);
|
|
115
115
|
const dispatch = useDispatch();
|
|
116
|
-
const
|
|
117
|
-
const
|
|
118
|
-
if (!adaptableModule?.
|
|
116
|
+
const showLayoutNonExtendedObjects = useSelector((state) => state.Internal.Layout.showLayoutNonExtendedObjects);
|
|
117
|
+
const toggleButtonShowLayoutExtensionObjects = () => {
|
|
118
|
+
if (!adaptableModule?.containsLayoutExtensions()) {
|
|
119
119
|
return;
|
|
120
120
|
}
|
|
121
121
|
if (!props.api.layoutApi.internalApi.hasLayoutSpecificObjects()) {
|
|
122
122
|
return;
|
|
123
123
|
}
|
|
124
124
|
return (React.createElement(Flex, { justifyContent: "flex-start" },
|
|
125
|
-
React.createElement(CheckBox, { padding: 0, margin: 0, checked:
|
|
125
|
+
React.createElement(CheckBox, { padding: 0, margin: 0, checked: showLayoutNonExtendedObjects, onChange: (checked) => dispatch(LayoutShowNonExtendedObjects(checked)) },
|
|
126
126
|
"Show ",
|
|
127
127
|
moduleInfo.FriendlyName,
|
|
128
128
|
"s not available in current Layout")));
|
|
@@ -132,7 +132,7 @@ export const AdaptablePopupModuleView = (props) => {
|
|
|
132
132
|
" ",
|
|
133
133
|
newButton), infoLinkDisabled: !props.api.internalApi.isDocumentationLinksDisplayed() },
|
|
134
134
|
moduleViewProperties.HeaderComponent && React.createElement(moduleViewProperties.HeaderComponent, null),
|
|
135
|
-
|
|
135
|
+
toggleButtonShowLayoutExtensionObjects(),
|
|
136
136
|
items?.length ? (React.createElement(AdaptableObjectList, { module: props.module, items: items })) : (React.createElement(EmptyContent, null, emptyContent ?? `Click 'New' to create a new ${moduleInfo.FriendlyName}`)),
|
|
137
137
|
isWizardOpen && EditWizard && (React.createElement(EditWizard, { abObjectType: abObjectType, moduleInfo: moduleInfo, data: null, popupParams: props.popupParams, configEntities: null, onCloseWizard: handleWizardClose, onFinishWizard: handleWizardClose }))));
|
|
138
138
|
};
|