@adaptabletools/adaptable 20.3.0-canary.2 → 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 +71 -187
- 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 +11 -11
- package/src/AdaptableState/Common/ExtendedLayout.d.ts +50 -0
- package/src/AdaptableState/Common/ProgressIndicatorConfig.d.ts +1 -4
- package/src/AdaptableState/Common/RowScope.d.ts +1 -1
- package/src/AdaptableState/FormatColumnState.d.ts +16 -9
- 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 +6 -2
- 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 +12 -13
- package/src/Api/Internal/FormatColumnInternalApi.js +45 -16
- 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 +4 -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/FormatColumn/getFormatColumnSettingsTargetItems.d.ts +5 -0
- package/src/Strategy/Utilities/FormatColumn/getFormatColumnSettingsTargetItems.js +12 -0
- 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 -2
- 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/Utilities/getScopeViewItems.js +5 -2
- 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/NewScopeComponent.js +5 -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 +59 -22
- package/src/View/FormatColumn/Wizard/FormatColumnRuleWizardSection.js +4 -0
- package/src/View/FormatColumn/Wizard/FormatColumnScopeWizardSection.js +1 -40
- package/src/View/FormatColumn/Wizard/FormatColumnSettingsWizardSection.js +13 -12
- package/src/View/FormatColumn/Wizard/FormatColumnTargetWizardSection.d.ts +8 -0
- package/src/View/FormatColumn/Wizard/FormatColumnTargetWizardSection.js +31 -0
- package/src/View/FormatColumn/Wizard/FormatColumnWizard.js +18 -4
- 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 +256 -218
- 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 +3 -3
- package/src/agGrid/AgGridColumnAdapter.js +86 -40
- package/src/agGrid/AgGridExportAdapter.js +1 -1
- 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 +172 -20
- 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 +8 -9
- 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
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import { forwardRef, useImperativeHandle } from 'react';
|
|
3
2
|
import { renderWithAdaptableContext } from '../View/renderWithAdaptableContext';
|
|
4
3
|
import { AdaptableFloatingFilter } from '../View/Components/ColumnFilter/AdaptableFloatingFilter';
|
|
5
|
-
import { getAgGridFilterNotifyModelFn } from './getAgGridFilterNotifyModelFn';
|
|
6
4
|
const filterContainerStyle = {
|
|
7
5
|
overflow: 'hidden',
|
|
8
6
|
minWidth: '0',
|
|
@@ -12,7 +10,7 @@ const filterContainerStyle = {
|
|
|
12
10
|
position: 'relative',
|
|
13
11
|
flex: '1 1 auto',
|
|
14
12
|
};
|
|
15
|
-
export const
|
|
13
|
+
export const AgGridFloatingFilterAdapterFactory = (adaptable) => {
|
|
16
14
|
const adaptableApi = adaptable.api;
|
|
17
15
|
function getContainerId(colId) {
|
|
18
16
|
return `floatingFilter_${colId}_${adaptable.adaptableOptions.adaptableId}`;
|
|
@@ -26,9 +24,6 @@ export const FloatingFilterWrapperFactory = (adaptable) => {
|
|
|
26
24
|
};
|
|
27
25
|
return columnFilterProps;
|
|
28
26
|
}
|
|
29
|
-
function getNotifyModel(colId, onModelChange) {
|
|
30
|
-
return getAgGridFilterNotifyModelFn(adaptableApi, colId, onModelChange);
|
|
31
|
-
}
|
|
32
27
|
function findParentWithClass(element, className, stopClasses, applyToAll) {
|
|
33
28
|
let current = element.parentElement;
|
|
34
29
|
while (current) {
|
|
@@ -82,55 +77,49 @@ export const FloatingFilterWrapperFactory = (adaptable) => {
|
|
|
82
77
|
}
|
|
83
78
|
};
|
|
84
79
|
}
|
|
85
|
-
|
|
86
|
-
return forwardRef(function ReactFloatingFilterWrapper(props, ref) {
|
|
87
|
-
const colId = props.column.getId();
|
|
88
|
-
const { onModelChange } = props;
|
|
89
|
-
const column = adaptableApi.columnApi.getColumnWithColumnId(colId);
|
|
90
|
-
useImperativeHandle(ref, () => {
|
|
91
|
-
return {
|
|
92
|
-
onParentModelChanged() { },
|
|
93
|
-
};
|
|
94
|
-
});
|
|
95
|
-
const notifyModel = getNotifyModel(colId, onModelChange);
|
|
96
|
-
if (!column) {
|
|
97
|
-
return null;
|
|
98
|
-
}
|
|
99
|
-
return renderWithAdaptableContext(React.createElement("div", { ref: patchParentElement, id: getContainerId(colId), style: filterContainerStyle },
|
|
100
|
-
React.createElement(AdaptableFloatingFilter, { ...getFilterProps(colId), onChange: notifyModel, onClear: notifyModel })), adaptable);
|
|
101
|
-
});
|
|
102
|
-
}
|
|
103
|
-
return class FloatingFilterWrapper {
|
|
104
|
-
onParentModelChanged(parentModel, filterChangedEvent) {
|
|
105
|
-
// todo?
|
|
106
|
-
}
|
|
107
|
-
afterGuiAttached() {
|
|
108
|
-
patchParentElement(this.filterContainer);
|
|
109
|
-
}
|
|
80
|
+
return class AgGridFloatingFilterAdapter {
|
|
110
81
|
init(params) {
|
|
111
82
|
const colId = params.column.getColId();
|
|
83
|
+
this.colId = colId;
|
|
112
84
|
this.filterContainer = document.createElement('div');
|
|
113
85
|
this.filterContainer.id = getContainerId(colId);
|
|
114
86
|
Object.keys(filterContainerStyle).forEach((key) => {
|
|
115
87
|
//@ts-ignore
|
|
116
88
|
this.filterContainer.style[key] = filterContainerStyle[key];
|
|
117
89
|
});
|
|
118
|
-
const notifyModel = getNotifyModel(colId, params.filterParams.filterChangedCallback);
|
|
119
90
|
const column = adaptableApi.columnApi.getColumnWithColumnId(colId);
|
|
120
91
|
if (column) {
|
|
121
92
|
const filterProps = getFilterProps(colId);
|
|
122
93
|
this.unmountReactRoot = adaptable.renderReactRoot(renderWithAdaptableContext(React.createElement(AdaptableFloatingFilter, {
|
|
123
94
|
...filterProps,
|
|
124
|
-
onChange: notifyModel,
|
|
125
|
-
onClear: notifyModel,
|
|
126
95
|
}), adaptable), this.filterContainer);
|
|
127
96
|
}
|
|
128
97
|
}
|
|
98
|
+
onParentModelChanged(parentModel, filterChangedEvent) {
|
|
99
|
+
// AFL: this should NOT be required, but AG Grid calls this method
|
|
100
|
+
// most likely is a bug and will be removed in future versions
|
|
101
|
+
}
|
|
102
|
+
afterGuiAttached() {
|
|
103
|
+
patchParentElement(this.filterContainer);
|
|
104
|
+
}
|
|
129
105
|
getGui() {
|
|
130
106
|
return this.filterContainer;
|
|
131
107
|
}
|
|
108
|
+
refresh(params) {
|
|
109
|
+
// always reuse the current instance
|
|
110
|
+
// the filte ris refreshed in the underlying React component
|
|
111
|
+
return true;
|
|
112
|
+
}
|
|
132
113
|
destroy() {
|
|
133
|
-
|
|
114
|
+
// Use setTimeout to defer unmounting to next event loop tick
|
|
115
|
+
// This ensures we're not unmounting during React's rendering phase
|
|
116
|
+
if (this.unmountReactRoot) {
|
|
117
|
+
const unmount = this.unmountReactRoot;
|
|
118
|
+
setTimeout(() => {
|
|
119
|
+
unmount();
|
|
120
|
+
}, 0);
|
|
121
|
+
this.unmountReactRoot = undefined;
|
|
122
|
+
}
|
|
134
123
|
this.filterContainer = null;
|
|
135
124
|
}
|
|
136
125
|
};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { AdaptableAgGrid } from './AdaptableAgGrid';
|
|
2
|
+
import { Module, AgModuleName } from 'ag-grid-enterprise';
|
|
3
|
+
export declare const AG_GRID_VERSION: string;
|
|
4
|
+
export declare class AgGridModulesAdapter {
|
|
5
|
+
private adaptableInstance;
|
|
6
|
+
private allAgGridModules;
|
|
7
|
+
constructor(adaptableInstance: AdaptableAgGrid);
|
|
8
|
+
destroy(): void;
|
|
9
|
+
private get agGridApi();
|
|
10
|
+
isAgGridModuleRegistered(moduleName: AgModuleName): boolean;
|
|
11
|
+
getAgGridRegisteredModules(): Module[];
|
|
12
|
+
getAgGridRegisteredModuleNames(): AgModuleName[];
|
|
13
|
+
getMandatoryAgGridModuleNames(): AgModuleName[];
|
|
14
|
+
private extractAgGridModuleNames;
|
|
15
|
+
}
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import { AllEnterpriseModule } from 'ag-grid-enterprise';
|
|
2
|
+
export const AG_GRID_VERSION = AllEnterpriseModule.version;
|
|
3
|
+
export class AgGridModulesAdapter {
|
|
4
|
+
constructor(adaptableInstance) {
|
|
5
|
+
this.adaptableInstance = adaptableInstance;
|
|
6
|
+
this.allAgGridModules = new Set();
|
|
7
|
+
this.allAgGridModules = this.extractAgGridModuleNames(AllEnterpriseModule);
|
|
8
|
+
}
|
|
9
|
+
destroy() {
|
|
10
|
+
this.adaptableInstance = null;
|
|
11
|
+
this.allAgGridModules.clear();
|
|
12
|
+
this.allAgGridModules = null;
|
|
13
|
+
}
|
|
14
|
+
get agGridApi() {
|
|
15
|
+
return this.adaptableInstance.agGridAdapter.getAgGridApi();
|
|
16
|
+
}
|
|
17
|
+
isAgGridModuleRegistered(moduleName) {
|
|
18
|
+
return this.agGridApi.isModuleRegistered(moduleName);
|
|
19
|
+
}
|
|
20
|
+
getAgGridRegisteredModules() {
|
|
21
|
+
const registeredModules = [];
|
|
22
|
+
this.allAgGridModules.forEach((module) => {
|
|
23
|
+
const agModuleName = `${module.moduleName}Module`;
|
|
24
|
+
if (this.isAgGridModuleRegistered(agModuleName)) {
|
|
25
|
+
registeredModules.push(module);
|
|
26
|
+
}
|
|
27
|
+
});
|
|
28
|
+
return registeredModules;
|
|
29
|
+
}
|
|
30
|
+
getAgGridRegisteredModuleNames() {
|
|
31
|
+
return this.getAgGridRegisteredModules().map((module) => {
|
|
32
|
+
const agModuleName = `${module.moduleName}Module`;
|
|
33
|
+
return agModuleName;
|
|
34
|
+
});
|
|
35
|
+
}
|
|
36
|
+
getMandatoryAgGridModuleNames() {
|
|
37
|
+
const mandatoryModules = [];
|
|
38
|
+
const rowModelType = this.agGridApi.getGridOption('rowModelType');
|
|
39
|
+
switch (rowModelType) {
|
|
40
|
+
case 'serverSide':
|
|
41
|
+
mandatoryModules.push('ServerSideRowModelModule');
|
|
42
|
+
mandatoryModules.push('ServerSideRowModelApiModule');
|
|
43
|
+
break;
|
|
44
|
+
case 'infinite':
|
|
45
|
+
mandatoryModules.push('InfiniteRowModelModule');
|
|
46
|
+
break;
|
|
47
|
+
default:
|
|
48
|
+
mandatoryModules.push('ClientSideRowModelModule');
|
|
49
|
+
mandatoryModules.push('ClientSideRowModelApiModule');
|
|
50
|
+
}
|
|
51
|
+
mandatoryModules.push('CellApiModule', 'CellStyleModule', 'ColumnApiModule', 'ColumnMenuModule', 'ContextMenuModule', 'CustomFilterModule', 'EventApiModule', 'ExternalFilterModule', 'GridStateModule', 'GroupFilterModule', 'RenderApiModule', 'RowApiModule', 'RowGroupingModule', 'RowStyleModule', 'ScrollApiModule');
|
|
52
|
+
return mandatoryModules;
|
|
53
|
+
}
|
|
54
|
+
extractAgGridModuleNames(module, collectedModules = new Set()) {
|
|
55
|
+
if (!module || !module.moduleName) {
|
|
56
|
+
return collectedModules;
|
|
57
|
+
}
|
|
58
|
+
collectedModules.add(module);
|
|
59
|
+
if (module.dependsOn) {
|
|
60
|
+
module.dependsOn.forEach((dep) => {
|
|
61
|
+
this.extractAgGridModuleNames(dep, collectedModules);
|
|
62
|
+
});
|
|
63
|
+
}
|
|
64
|
+
return collectedModules;
|
|
65
|
+
}
|
|
66
|
+
}
|
|
@@ -81,5 +81,5 @@ export const InternalAdaptableNumberEditor = React.forwardRef(function InternalA
|
|
|
81
81
|
focus();
|
|
82
82
|
}
|
|
83
83
|
} },
|
|
84
|
-
React.createElement(Icon, { size:
|
|
84
|
+
React.createElement(Icon, { size: 15, name: "close", tabIndex: 0 }))) : null));
|
|
85
85
|
});
|
|
@@ -74,7 +74,7 @@ export const InternalAdaptablePercentageEditor = React.forwardRef(function Inter
|
|
|
74
74
|
focus();
|
|
75
75
|
}
|
|
76
76
|
} },
|
|
77
|
-
React.createElement(Icon, { size:
|
|
77
|
+
React.createElement(Icon, { size: 15, name: "close", tabIndex: 0 }))) : null,
|
|
78
78
|
React.createElement("div", { style: {
|
|
79
79
|
position: 'absolute',
|
|
80
80
|
right: showClear ? 20 : 0,
|
|
@@ -95,7 +95,7 @@ export const Dialog = React.forwardRef((props, dialogRef) => {
|
|
|
95
95
|
return null;
|
|
96
96
|
}
|
|
97
97
|
const closeButton = showCloseButton ? (React.createElement(Box, { padding: 1, title: "Close dialog", onClick: () => setIsOpen(false), className: `${baseClassName}__close-button` },
|
|
98
|
-
React.createElement(Icon, { size:
|
|
98
|
+
React.createElement(Icon, { size: 20, name: "close" }))) : null;
|
|
99
99
|
const setPreventDismissFlag = (e) => {
|
|
100
100
|
if (dismissOnClickOutside) {
|
|
101
101
|
e.nativeEvent.preventDialogDismiss = true;
|
|
@@ -12,7 +12,7 @@ const Arrows = () => {
|
|
|
12
12
|
transform: 'translate3d(0px, -50%, 0px)',
|
|
13
13
|
cursor: 'pointer',
|
|
14
14
|
} },
|
|
15
|
-
React.createElement(Icon, { name: "triangle-up", size:
|
|
16
|
-
React.createElement(Icon, { name: "triangle-down", size:
|
|
15
|
+
React.createElement(Icon, { name: "triangle-up", size: 20, style: { position: 'relative', top: 7 } }),
|
|
16
|
+
React.createElement(Icon, { name: "triangle-down", size: 20, style: { position: 'relative', top: -7 } })));
|
|
17
17
|
};
|
|
18
18
|
export default Arrows;
|
|
@@ -8,7 +8,7 @@ export declare const PrimitiveColumnOrFieldSelector: (props: {
|
|
|
8
8
|
onChange: (colId: string) => void;
|
|
9
9
|
hideFields?: boolean;
|
|
10
10
|
}) => React.JSX.Element;
|
|
11
|
-
export declare const
|
|
11
|
+
export declare const PrimitiveValueInput: (props: {
|
|
12
12
|
inputType: ExpressionFunctionInputType;
|
|
13
13
|
value: any;
|
|
14
14
|
onChange(value: any): void;
|
|
@@ -63,7 +63,7 @@ export const PrimitiveColumnOrFieldSelector = (props) => {
|
|
|
63
63
|
} }),
|
|
64
64
|
input));
|
|
65
65
|
};
|
|
66
|
-
export const
|
|
66
|
+
export const PrimitiveValueInput = (props) => {
|
|
67
67
|
const adaptable = useAdaptable();
|
|
68
68
|
const hasFields = React.useMemo(() => {
|
|
69
69
|
return adaptable.api.expressionApi.internalApi.getAvailableFields()?.length > 0;
|
|
@@ -130,7 +130,7 @@ export const PrimiteValueInput = (props) => {
|
|
|
130
130
|
} }));
|
|
131
131
|
}
|
|
132
132
|
else if (!['date', 'boolean'].includes(props.inputType)) {
|
|
133
|
-
editor = (React.createElement(PermittedValuesSelector, { allowNewValues: true, value: props.value, columnId: mapColumnExpressionToColumnId(props.lefthandColumnIdParam), onChange: (value) => {
|
|
133
|
+
editor = (React.createElement(PermittedValuesSelector, { allowNewValues: true, searchable: 'inline', value: props.value, columnId: mapColumnExpressionToColumnId(props.lefthandColumnIdParam), onChange: (value) => {
|
|
134
134
|
props.onChange(value);
|
|
135
135
|
} }));
|
|
136
136
|
}
|
|
@@ -9,7 +9,7 @@ import DropdownButton from '../../DropdownButton';
|
|
|
9
9
|
import ErrorBox from '../../ErrorBox';
|
|
10
10
|
import { Icon } from '../../icons';
|
|
11
11
|
import SimpleButton from '../../SimpleButton';
|
|
12
|
-
import { CombinatorSelector, ExpressionSelector,
|
|
12
|
+
import { CombinatorSelector, ExpressionSelector, PrimitiveValueInput, PrimitiveColumnOrFieldSelector, PrimitiveMultiValueInput, } from './QueryBuilderInputs';
|
|
13
13
|
import { getOperatorMatchingInputs as getFunctionMatchingInputTypes, mapExpressionToFieldValue, } from './utils';
|
|
14
14
|
const ITEM_HEIGHT = 40;
|
|
15
15
|
const BASE_CLASS_NAME = 'ab-QueryBuilder-predicate-editor';
|
|
@@ -185,7 +185,7 @@ const PrimitiveFunctionEditor = (props) => {
|
|
|
185
185
|
});
|
|
186
186
|
} }));
|
|
187
187
|
}
|
|
188
|
-
return (React.createElement(
|
|
188
|
+
return (React.createElement(PrimitiveValueInput, { ...commonProps, key: key, value: restOfArgs[index] ?? null, onChange: (value) => {
|
|
189
189
|
const args = [...props.predicate.args];
|
|
190
190
|
// +1 because col is the first argument
|
|
191
191
|
args[index + 1] = value;
|
|
@@ -35,7 +35,7 @@ export const readJSONFile = async (file, toJSON) => {
|
|
|
35
35
|
});
|
|
36
36
|
};
|
|
37
37
|
const FileDroppable = (props = {}) => {
|
|
38
|
-
const { onDropSuccess, message, fileAccept = '.json', helpText = 'AdapTable No Code Version', defaultText = 'Click here to select a JSON file to load or drag it here', dragOverText = 'Drop file here to start Adaptable Wizard', icon = React.createElement(Icon, { name: "paperclip", size:
|
|
38
|
+
const { onDropSuccess, message, fileAccept = '.json', helpText = 'AdapTable No Code Version', defaultText = 'Click here to select a JSON file to load or drag it here', dragOverText = 'Drop file here to start Adaptable Wizard', icon = React.createElement(Icon, { name: "paperclip", size: 40 }), value, ...domProps } = props;
|
|
39
39
|
const [state, dispatch] = useReducer(reducer, initialState);
|
|
40
40
|
const onDragEnter = (e) => {
|
|
41
41
|
dispatch({
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { FunctionComponent } from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import { CustomIcon } from '../../types';
|
|
3
3
|
export interface IconSelectorProps {
|
|
4
|
-
customIcons?:
|
|
4
|
+
customIcons?: CustomIcon[];
|
|
5
5
|
value?: string;
|
|
6
6
|
onChange: (iconName: string) => void;
|
|
7
7
|
clearable?: boolean;
|
|
@@ -40,7 +40,7 @@ const ensurePortalElement = () => {
|
|
|
40
40
|
}
|
|
41
41
|
portalElement = document.createElement('div');
|
|
42
42
|
portalElement.style.position = 'absolute';
|
|
43
|
-
portalElement.style.zIndex = '
|
|
43
|
+
portalElement.style.zIndex = '9999999';
|
|
44
44
|
portalElement.style.top = '0px';
|
|
45
45
|
portalElement.style.left = '0px';
|
|
46
46
|
document.body.appendChild(portalElement);
|
|
@@ -13,7 +13,7 @@ export type SelectProps<SelectValue extends unknown, IsMulti extends boolean = f
|
|
|
13
13
|
menuPlacement?: 'auto' | 'bottom' | 'top';
|
|
14
14
|
menuStyle?: React.CSSProperties;
|
|
15
15
|
menuMinWidth?: string | number;
|
|
16
|
-
searchable?:
|
|
16
|
+
searchable?: false | 'inline' | 'menulist';
|
|
17
17
|
resizable?: boolean;
|
|
18
18
|
isClearable?: boolean;
|
|
19
19
|
closeMenuOnSelect?: boolean;
|
|
@@ -3,11 +3,12 @@ import * as React from 'react';
|
|
|
3
3
|
import ReactSelect, { components, } from 'react-select';
|
|
4
4
|
import CreatableSelect from 'react-select/creatable';
|
|
5
5
|
import { Icon } from '../icons';
|
|
6
|
-
import { Box } from 'rebass';
|
|
6
|
+
import { Box, Flex } from 'rebass';
|
|
7
7
|
import { DataSource, InfiniteTable, components as InfiniteTableComponents, } from '@infinite-table/infinite-react';
|
|
8
|
-
import { useCallback, useMemo } from 'react';
|
|
8
|
+
import { useCallback, useMemo, useState } from 'react';
|
|
9
9
|
import join from '../utils/join';
|
|
10
10
|
import { Resizable } from 're-resizable';
|
|
11
|
+
import Tooltip from '../Tooltip';
|
|
11
12
|
const resizableDirections = {
|
|
12
13
|
right: true,
|
|
13
14
|
bottom: true,
|
|
@@ -28,6 +29,15 @@ const INFINITE_DOM_PROPS = {
|
|
|
28
29
|
width: '100%',
|
|
29
30
|
},
|
|
30
31
|
};
|
|
32
|
+
const infiniteContentValueClassName = 'InfiniteCell_content_value';
|
|
33
|
+
const renderValue = ({ renderBag, data, value }) => {
|
|
34
|
+
if (data.tooltip) {
|
|
35
|
+
const tooltipNode = typeof data.tooltip === 'string' ? data.tooltip : value;
|
|
36
|
+
return (React.createElement(Tooltip, { label: tooltipNode },
|
|
37
|
+
React.createElement("div", { className: infiniteContentValueClassName }, renderBag.value)));
|
|
38
|
+
}
|
|
39
|
+
return React.createElement("div", { className: infiniteContentValueClassName }, renderBag.value);
|
|
40
|
+
};
|
|
31
41
|
const INFINITE_COLUMNS_WITH_CHECKBOX = {
|
|
32
42
|
label: {
|
|
33
43
|
field: 'label',
|
|
@@ -44,9 +54,7 @@ const INFINITE_COLUMNS_WITH_CHECKBOX = {
|
|
|
44
54
|
},
|
|
45
55
|
renderHeaderSelectionCheckBox: true,
|
|
46
56
|
className: 'ab-Select-CheckboxColumn',
|
|
47
|
-
renderValue
|
|
48
|
-
return React.createElement("div", { className: "InfiniteCell_content_value" }, renderBag.value);
|
|
49
|
-
},
|
|
57
|
+
renderValue,
|
|
50
58
|
renderHeader: (headerParams) => {
|
|
51
59
|
return (React.createElement(React.Fragment, null,
|
|
52
60
|
headerParams.renderBag.selectionCheckBox,
|
|
@@ -59,6 +67,7 @@ const INFINITE_COLUMNS_WITH_RADIO = {
|
|
|
59
67
|
label: {
|
|
60
68
|
field: 'label',
|
|
61
69
|
defaultFlex: 1,
|
|
70
|
+
renderValue,
|
|
62
71
|
},
|
|
63
72
|
};
|
|
64
73
|
const isRowDisabled = ({ data, }) => {
|
|
@@ -91,6 +100,19 @@ const doesOptionMatchValue = function (value) {
|
|
|
91
100
|
};
|
|
92
101
|
export const Select = function (props) {
|
|
93
102
|
let maxLabelLength = 0;
|
|
103
|
+
const searchableInMenulist = props.searchable === 'menulist';
|
|
104
|
+
const searchableInline = props.searchable === 'inline';
|
|
105
|
+
// relevant for menulist search only
|
|
106
|
+
const menulistInputRef = React.useRef(null);
|
|
107
|
+
const [isSelectMenuOpen, setIsSelectMenuOpen] = useState(false);
|
|
108
|
+
const openSelectMenu = () => {
|
|
109
|
+
setIsSelectMenuOpen(true);
|
|
110
|
+
// it's a react-select bug, onMenuOpen is not called with controlled menuIsOpen
|
|
111
|
+
props.onMenuOpen?.();
|
|
112
|
+
};
|
|
113
|
+
const closeSelectMenu = () => {
|
|
114
|
+
setIsSelectMenuOpen(false);
|
|
115
|
+
};
|
|
94
116
|
const ref = React.useRef(null);
|
|
95
117
|
const valueToOptionMap = new Map((props.options || []).map((opt) => {
|
|
96
118
|
let label = opt.label;
|
|
@@ -153,12 +175,23 @@ export const Select = function (props) {
|
|
|
153
175
|
* If on each render a new reference is passed, the menu will not open using the keyboard.
|
|
154
176
|
*/
|
|
155
177
|
const SelectContainer = React.useMemo(() => {
|
|
156
|
-
return (
|
|
157
|
-
return (React.createElement(components.SelectContainer, { ...
|
|
178
|
+
return (selectContainerProps) => {
|
|
179
|
+
return (React.createElement(components.SelectContainer, { ...selectContainerProps, innerProps: {
|
|
158
180
|
// @ts-ignore
|
|
159
181
|
'data-name': props['data-name'],
|
|
160
182
|
'data-id': props['data-id'],
|
|
161
|
-
|
|
183
|
+
'data-test': props.searchable || false,
|
|
184
|
+
...selectContainerProps.innerProps,
|
|
185
|
+
onMouseDown: (e) => {
|
|
186
|
+
if (!searchableInMenulist) {
|
|
187
|
+
return;
|
|
188
|
+
}
|
|
189
|
+
if (!isSelectMenuOpen) {
|
|
190
|
+
openSelectMenu();
|
|
191
|
+
e.stopPropagation();
|
|
192
|
+
e.preventDefault();
|
|
193
|
+
}
|
|
194
|
+
},
|
|
162
195
|
} }));
|
|
163
196
|
};
|
|
164
197
|
}, []);
|
|
@@ -193,10 +226,10 @@ export const Select = function (props) {
|
|
|
193
226
|
}, [renderMultipleValues, props.placeholder]);
|
|
194
227
|
const sizeRef = React.useRef({ ...defaultResizableSize });
|
|
195
228
|
const MenuComponent = React.useMemo(() => {
|
|
196
|
-
return (
|
|
197
|
-
const { isLoading } =
|
|
229
|
+
return (menuProps) => {
|
|
230
|
+
const { isLoading } = menuProps;
|
|
198
231
|
const theChildren = (React.createElement(React.Fragment, null,
|
|
199
|
-
|
|
232
|
+
menuProps.children,
|
|
200
233
|
React.createElement("div", { style: {
|
|
201
234
|
display: isLoading ? 'block' : 'none',
|
|
202
235
|
position: 'absolute',
|
|
@@ -212,9 +245,37 @@ export const Select = function (props) {
|
|
|
212
245
|
sizeRef.current = newSize;
|
|
213
246
|
}, []);
|
|
214
247
|
return (React.createElement(React.Fragment, null,
|
|
215
|
-
React.createElement(components.Menu, { ...
|
|
248
|
+
React.createElement(components.Menu, { ...menuProps, innerProps: {
|
|
249
|
+
// @ts-ignore
|
|
216
250
|
'data-name': 'menu-container',
|
|
217
|
-
...
|
|
251
|
+
...menuProps.innerProps,
|
|
252
|
+
onBlur: (e) => {
|
|
253
|
+
if (!searchableInMenulist) {
|
|
254
|
+
return;
|
|
255
|
+
}
|
|
256
|
+
const { relatedTarget } = e;
|
|
257
|
+
const menuDOMNode = menuProps.innerRef && 'current' in menuProps.innerRef
|
|
258
|
+
? menuProps.innerRef.current
|
|
259
|
+
: null;
|
|
260
|
+
if ((menuDOMNode && relatedTarget == menuDOMNode) ||
|
|
261
|
+
menuDOMNode?.contains(relatedTarget)) {
|
|
262
|
+
// ignore the event if the focus is still inside the menu
|
|
263
|
+
return;
|
|
264
|
+
}
|
|
265
|
+
setTimeout(() => {
|
|
266
|
+
// wee need to wait for the single value selectio to complete before closing
|
|
267
|
+
closeSelectMenu();
|
|
268
|
+
}, 100);
|
|
269
|
+
},
|
|
270
|
+
onMouseDownCapture: (event) => {
|
|
271
|
+
if (!searchableInMenulist) {
|
|
272
|
+
return;
|
|
273
|
+
}
|
|
274
|
+
if (props.isMulti) {
|
|
275
|
+
// to avoid the menu closing when clicking inside it
|
|
276
|
+
event.stopPropagation();
|
|
277
|
+
}
|
|
278
|
+
},
|
|
218
279
|
} }, resizable ? (React.createElement(Resizable, { enable: resizableDirections, minWidth: '100%', maxHeight: '60vh', maxWidth: '60vw', defaultSize: sizeRef.current, onResizeStop: onResizeStop }, theChildren)) : (theChildren))));
|
|
219
280
|
};
|
|
220
281
|
}, [resizable]);
|
|
@@ -229,6 +290,12 @@ export const Select = function (props) {
|
|
|
229
290
|
return (props) => {
|
|
230
291
|
const { setValue, getValue, focusedOption, options, selectProps } = props;
|
|
231
292
|
const { filterOption, inputValue, options: selectOptions, isLoading } = selectProps;
|
|
293
|
+
// Focus the input when MenuList mounts
|
|
294
|
+
React.useEffect(() => {
|
|
295
|
+
if (menulistInputRef.current) {
|
|
296
|
+
menulistInputRef.current.focus();
|
|
297
|
+
}
|
|
298
|
+
}, []);
|
|
232
299
|
const filterFunction = React.useCallback(({ data }) => filterOption({ data, label: `${data.label}`, value: data.value }, inputValue), [filterOption, inputValue]);
|
|
233
300
|
const hasFilter = inputValue !== '';
|
|
234
301
|
const filteredOptionsValues = new Set();
|
|
@@ -352,11 +419,13 @@ export const Select = function (props) {
|
|
|
352
419
|
const pk = dataSourceApi.getPrimaryKeyByIndex(rowIndex);
|
|
353
420
|
api.rowSelectionApi.toggleRowSelection(pk);
|
|
354
421
|
}
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
422
|
+
if (searchableInMenulist) {
|
|
423
|
+
requestAnimationFrame(() => {
|
|
424
|
+
menulistInputRef.current?.focus();
|
|
425
|
+
});
|
|
426
|
+
}
|
|
359
427
|
}, []);
|
|
428
|
+
const prevInputValueRef = React.useRef('');
|
|
360
429
|
return (React.createElement(DataSource, {
|
|
361
430
|
// @ts-ignore
|
|
362
431
|
// data={props.options}
|
|
@@ -364,12 +433,33 @@ export const Select = function (props) {
|
|
|
364
433
|
data: filteredOptions, primaryKey: "value", selectionMode: isMulti ? 'multi-row' : 'single-row',
|
|
365
434
|
// @ts-ignore
|
|
366
435
|
onRowSelectionChange: isLoading ? null : isMulti ? onRowSelectionChange : onSingleRowSelectionChange, rowSelection: rowSelection, isRowDisabled: isRowDisabled },
|
|
436
|
+
searchableInMenulist && (React.createElement(Flex, { p: 1 },
|
|
437
|
+
React.createElement("input", { ref: menulistInputRef, "data-name": "menulist-search-input", style: {
|
|
438
|
+
width: '100%',
|
|
439
|
+
}, className: 'ab-Select-MenulistSearch ab-Input ab-Input--type-text', autoCorrect: "off", autoComplete: "off", spellCheck: "false", type: "text", value: inputValue, onChange: (e) => {
|
|
440
|
+
const currentValue = e.currentTarget.value;
|
|
441
|
+
onInputChange(currentValue, {
|
|
442
|
+
action: 'input-change',
|
|
443
|
+
prevInputValue: prevInputValueRef.current,
|
|
444
|
+
});
|
|
445
|
+
prevInputValueRef.current = currentValue;
|
|
446
|
+
}, onMouseDown: (e) => {
|
|
447
|
+
e.stopPropagation();
|
|
448
|
+
const inputElement = e.target;
|
|
449
|
+
inputElement?.focus?.();
|
|
450
|
+
}, onTouchEnd: (e) => {
|
|
451
|
+
e.stopPropagation();
|
|
452
|
+
const inputElement = e.target;
|
|
453
|
+
inputElement?.focus?.();
|
|
454
|
+
}, placeholder: "Search..." }))),
|
|
367
455
|
React.createElement(InfiniteTable, { header: isMulti && showHeaderSelectionCheckbox ? true : false, rowClassName: rowClassName, showZebraRows: false, rowHeight: '--ab-grid-row-height', onCellClick: isLoading ? null : onCellClick, keyboardNavigation: isLoading ? false : 'row', activeRowIndex: focusedOptionIndex, keyboardSelection: true, columns: isMulti ? INFINITE_COLUMNS_WITH_CHECKBOX : INFINITE_COLUMNS_WITH_RADIO, domProps: INFINITE_DOM_PROPS })));
|
|
368
456
|
};
|
|
369
457
|
}, [isMulti, showHeaderSelectionCheckbox]);
|
|
370
458
|
const DropdownIndicator = React.useMemo(() => {
|
|
371
|
-
return (
|
|
372
|
-
return (React.createElement(components.DropdownIndicator, { ...
|
|
459
|
+
return (dropdownIndicatorProps) => {
|
|
460
|
+
return (React.createElement(components.DropdownIndicator, { ...dropdownIndicatorProps, innerProps: {
|
|
461
|
+
...dropdownIndicatorProps.innerProps,
|
|
462
|
+
} },
|
|
373
463
|
React.createElement(Icon, { name: "triangle-down", style: { height: 20, width: 20 } })));
|
|
374
464
|
};
|
|
375
465
|
}, []);
|
|
@@ -391,20 +481,22 @@ export const Select = function (props) {
|
|
|
391
481
|
setInputValue(value);
|
|
392
482
|
props.onInputChange?.(value);
|
|
393
483
|
}, [props.onInputChange, isMulti]);
|
|
394
|
-
return (React.createElement(SelectComponent, { ref: ref, "aria-label": props['aria-label'], onKeyDown: props.onKeyDown, inputValue: inputValue, onInputChange: onInputChange, onFocus: onFocus, onBlur: onBlur, onMenuOpen: props.onMenuOpen, isLoading: props.isLoading, options: props.options, className: join(props.className, 'ab-Select'), isDisabled: disabled, menuPlacement: props.menuPlacement ?? 'auto',
|
|
484
|
+
return (React.createElement(SelectComponent, { ref: ref, openMenuOnClick: searchableInMenulist ? false : undefined, openMenuOnFocus: searchableInMenulist ? false : undefined, menuIsOpen: searchableInMenulist ? isSelectMenuOpen : undefined, isSearchable: searchableInline, "aria-label": props['aria-label'], onKeyDown: props.onKeyDown, inputValue: inputValue, onInputChange: onInputChange, onFocus: onFocus, onBlur: onBlur, onMenuOpen: props.onMenuOpen, isLoading: props.isLoading, options: props.options, className: join(props.className, 'ab-Select'), isDisabled: disabled, menuPlacement: props.menuPlacement ?? 'auto', hideSelectedOptions: false, isMulti: isMulti, value: selectedOption, blurInputOnSelect: false, menuPosition: props.menuPosition ?? 'absolute',
|
|
395
485
|
// This needed so the menu is not clipped by overflow: hidden
|
|
396
486
|
menuPortalTarget: props.menuPortalTarget === undefined ? document.body : null, isClearable: props.isClearable, closeMenuOnSelect: props.closeMenuOnSelect, onChange: (option) => {
|
|
397
487
|
if (isMulti) {
|
|
398
488
|
const value = option.map((x) => x?.value);
|
|
399
489
|
props.onChange(value);
|
|
400
|
-
// ensure element keeps focus
|
|
401
|
-
requestAnimationFrame(() => {
|
|
402
|
-
ref.current?.focus();
|
|
403
|
-
});
|
|
404
490
|
}
|
|
405
491
|
else {
|
|
406
492
|
props.onChange(option?.value);
|
|
407
493
|
}
|
|
494
|
+
if (searchableInMenulist) {
|
|
495
|
+
// ensure element keeps focus
|
|
496
|
+
requestAnimationFrame(() => {
|
|
497
|
+
menulistInputRef.current?.focus();
|
|
498
|
+
});
|
|
499
|
+
}
|
|
408
500
|
}, placeholder: props.placeholder, createOptionPosition: 'first',
|
|
409
501
|
// formatCreateLabel={(inputValue) => inputValue} // can we make this auto??
|
|
410
502
|
// we use this: https://react-select.com/creatable
|
|
@@ -8,6 +8,5 @@ export type IconProps = {
|
|
|
8
8
|
style?: React.CSSProperties;
|
|
9
9
|
color?: string;
|
|
10
10
|
};
|
|
11
|
-
export declare const getSize: (size: number) => number;
|
|
12
11
|
declare const _default: ({ children, size, name, tabIndex, color, ...props }: IconProps) => React.JSX.Element;
|
|
13
12
|
export default _default;
|
|
@@ -1,12 +1,6 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import join from '../utils/join';
|
|
3
|
-
const HUNDRED_PERCENT_SIZE = 24;
|
|
4
3
|
const DEFAULT_SIZE = 20;
|
|
5
|
-
export const getSize = (size) => Math.round(size * (DEFAULT_SIZE / HUNDRED_PERCENT_SIZE));
|
|
6
4
|
export default ({ children, size = DEFAULT_SIZE, name, tabIndex, color, ...props }) => {
|
|
7
|
-
size =
|
|
8
|
-
typeof size === 'number' || parseInt(size) == size
|
|
9
|
-
? getSize(size)
|
|
10
|
-
: size;
|
|
11
5
|
return (React.createElement("svg", { width: size, height: size, viewBox: "0 0 24 24", tabIndex: tabIndex, "data-id": name, "data-name": "AdaptableIcon", ...props, className: join(props.className, `ab-Icon ab-Icon--${name}`), style: { verticalAlign: 'middle', fill: color ?? 'currentColor', ...props.style } }, children));
|
|
12
6
|
};
|
package/src/env.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export default {
|
|
2
2
|
NEXT_PUBLIC_INFINITE_TABLE_LICENSE_KEY: "StartDate=2021-06-29|EndDate=2030-01-01|Owner=Adaptable|Type=distribution|TS=1624971462479|C=137829811,1004007071,2756196225,1839832928,3994409405,636616862" || '',
|
|
3
|
-
PUBLISH_TIMESTAMP:
|
|
4
|
-
VERSION: "
|
|
3
|
+
PUBLISH_TIMESTAMP: 1756391396935 || Date.now(),
|
|
4
|
+
VERSION: "21.0.0-canary.0" || '--current-version--',
|
|
5
5
|
};
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { ColumnSizingMap } from '../../AdaptableState/LayoutState';
|
|
1
2
|
import { XOR } from '../../Utilities/Extensions/TypeExtensions';
|
|
2
3
|
/**
|
|
3
4
|
* Defines how a Column is sorted
|
|
@@ -13,6 +14,10 @@ export interface ColumnSortModel {
|
|
|
13
14
|
SortOrder: 'Asc' | 'Desc';
|
|
14
15
|
}
|
|
15
16
|
export interface BaseLayoutModel {
|
|
17
|
+
/**
|
|
18
|
+
* @defaultValue 'single'
|
|
19
|
+
*/
|
|
20
|
+
RowGroupDisplayType?: 'single' | 'multi';
|
|
16
21
|
/**
|
|
17
22
|
* Those are not actually used by the LayoutManager,
|
|
18
23
|
* but we need to keep them here so we can give the layout
|
|
@@ -55,12 +60,7 @@ export interface BaseLayoutModel {
|
|
|
55
60
|
ColumnVisibility?: {
|
|
56
61
|
[columnId: string]: false;
|
|
57
62
|
};
|
|
58
|
-
|
|
59
|
-
* Set of widths for some (or all columns)
|
|
60
|
-
*/
|
|
61
|
-
ColumnWidths?: {
|
|
62
|
-
[columnId: string]: number;
|
|
63
|
-
};
|
|
63
|
+
ColumnSizing?: ColumnSizingMap;
|
|
64
64
|
/**
|
|
65
65
|
* Behaviour for Expanding / Collapsing Row Groups
|
|
66
66
|
*/
|
|
@@ -142,10 +142,6 @@ export interface TableLayoutModel extends BaseLayoutModel {
|
|
|
142
142
|
* Columns which are row-grouped when the Layout is applied
|
|
143
143
|
*/
|
|
144
144
|
RowGroupedColumns?: string[];
|
|
145
|
-
/**
|
|
146
|
-
* @defaultValue 'single'
|
|
147
|
-
*/
|
|
148
|
-
RowGroupDisplayType?: 'single' | 'multi';
|
|
149
145
|
PivotAggregationColumns?: never;
|
|
150
146
|
PivotColumns?: never;
|
|
151
147
|
PivotGroupedColumns?: never;
|