@adaptabletools/adaptable-cjs 20.3.0 → 21.0.0-canary.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/agGrid.d.ts +2 -1
- package/agGrid.js +3 -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 +40 -22
- 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 +107 -13
- package/src/Api/Implementation/LayoutHelpers.d.ts +1 -0
- package/src/Api/Implementation/LayoutHelpers.js +25 -5
- 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 +10 -5
- package/src/Api/Internal/LayoutInternalApi.js +85 -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 +10 -10
- package/src/Redux/ActionsReducers/StyledColumnRedux.d.ts +7 -0
- package/src/Redux/ActionsReducers/StyledColumnRedux.js +15 -1
- 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 +2 -1
- package/src/Utilities/Extensions/ArrayExtensions.d.ts +15 -2
- package/src/Utilities/Extensions/ArrayExtensions.js +68 -15
- package/src/Utilities/Helpers/AdaptableHelper.d.ts +1 -0
- package/src/Utilities/Helpers/AdaptableHelper.js +1 -0
- package/src/Utilities/ObjectFactory.d.ts +7 -3
- package/src/Utilities/ObjectFactory.js +28 -19
- 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 +18 -6
- 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 +5 -5
- 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 +2 -2
- package/src/View/Layout/TransposedPopup.js +2 -2
- package/src/View/Layout/Wizard/LayoutWizard.js +5 -7
- 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 +65 -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 +53 -0
- package/src/agGrid/AgGridFloatingFilterAdapter.d.ts +2 -0
- package/src/agGrid/{FloatingFilterWrapper.js → AgGridFloatingFilterAdapter.js} +26 -37
- package/src/agGrid/AgGridModulesAdapter.d.ts +15 -0
- package/src/agGrid/AgGridModulesAdapter.js +70 -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 +4 -4
- package/src/components/ExpressionEditor/QueryBuilder/QueryPredicateBuilder.js +1 -1
- 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 +114 -22
- package/src/components/icons/DefaultIcon.d.ts +0 -1
- package/src/components/icons/DefaultIcon.js +0 -8
- 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 +103 -40
- 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 +28 -0
- package/src/types.d.ts +7 -8
- package/tsconfig.cjs.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 -136
- package/src/agGrid/FloatingFilterWrapper.d.ts +0 -2
- package/src/agGrid/agGridModules.d.ts +0 -3
- package/src/agGrid/agGridModules.js +0 -18
- package/src/agGrid/getAgGridFilterNotifyModelFn.d.ts +0 -2
- package/src/agGrid/getAgGridFilterNotifyModelFn.js +0 -21
- /package/src/AdaptableState/Common/{ExtendedLayoutInfo.js → ExtendedLayout.js} +0 -0
|
@@ -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,70 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.AgGridModulesAdapter = exports.AG_GRID_VERSION = void 0;
|
|
4
|
+
const ag_grid_enterprise_1 = require("ag-grid-enterprise");
|
|
5
|
+
exports.AG_GRID_VERSION = ag_grid_enterprise_1.AllEnterpriseModule.version;
|
|
6
|
+
class AgGridModulesAdapter {
|
|
7
|
+
constructor(adaptableInstance) {
|
|
8
|
+
this.adaptableInstance = adaptableInstance;
|
|
9
|
+
this.allAgGridModules = new Set();
|
|
10
|
+
this.allAgGridModules = this.extractAgGridModuleNames(ag_grid_enterprise_1.AllEnterpriseModule);
|
|
11
|
+
}
|
|
12
|
+
destroy() {
|
|
13
|
+
this.adaptableInstance = null;
|
|
14
|
+
this.allAgGridModules.clear();
|
|
15
|
+
this.allAgGridModules = null;
|
|
16
|
+
}
|
|
17
|
+
get agGridApi() {
|
|
18
|
+
return this.adaptableInstance.agGridAdapter.getAgGridApi();
|
|
19
|
+
}
|
|
20
|
+
isAgGridModuleRegistered(moduleName) {
|
|
21
|
+
return this.agGridApi.isModuleRegistered(moduleName);
|
|
22
|
+
}
|
|
23
|
+
getAgGridRegisteredModules() {
|
|
24
|
+
const registeredModules = [];
|
|
25
|
+
this.allAgGridModules.forEach((module) => {
|
|
26
|
+
const agModuleName = `${module.moduleName}Module`;
|
|
27
|
+
if (this.isAgGridModuleRegistered(agModuleName)) {
|
|
28
|
+
registeredModules.push(module);
|
|
29
|
+
}
|
|
30
|
+
});
|
|
31
|
+
return registeredModules;
|
|
32
|
+
}
|
|
33
|
+
getAgGridRegisteredModuleNames() {
|
|
34
|
+
return this.getAgGridRegisteredModules().map((module) => {
|
|
35
|
+
const agModuleName = `${module.moduleName}Module`;
|
|
36
|
+
return agModuleName;
|
|
37
|
+
});
|
|
38
|
+
}
|
|
39
|
+
getMandatoryAgGridModuleNames() {
|
|
40
|
+
const mandatoryModules = [];
|
|
41
|
+
const rowModelType = this.agGridApi.getGridOption('rowModelType');
|
|
42
|
+
switch (rowModelType) {
|
|
43
|
+
case 'serverSide':
|
|
44
|
+
mandatoryModules.push('ServerSideRowModelModule');
|
|
45
|
+
mandatoryModules.push('ServerSideRowModelApiModule');
|
|
46
|
+
break;
|
|
47
|
+
case 'infinite':
|
|
48
|
+
mandatoryModules.push('InfiniteRowModelModule');
|
|
49
|
+
break;
|
|
50
|
+
default:
|
|
51
|
+
mandatoryModules.push('ClientSideRowModelModule');
|
|
52
|
+
mandatoryModules.push('ClientSideRowModelApiModule');
|
|
53
|
+
}
|
|
54
|
+
mandatoryModules.push('CellApiModule', 'CellStyleModule', 'ColumnApiModule', 'ColumnMenuModule', 'ContextMenuModule', 'CustomFilterModule', 'EventApiModule', 'ExternalFilterModule', 'GridStateModule', 'GroupFilterModule', 'RenderApiModule', 'RowApiModule', 'RowGroupingModule', 'RowStyleModule', 'ScrollApiModule');
|
|
55
|
+
return mandatoryModules;
|
|
56
|
+
}
|
|
57
|
+
extractAgGridModuleNames(module, collectedModules = new Set()) {
|
|
58
|
+
if (!module || !module.moduleName) {
|
|
59
|
+
return collectedModules;
|
|
60
|
+
}
|
|
61
|
+
collectedModules.add(module);
|
|
62
|
+
if (module.dependsOn) {
|
|
63
|
+
module.dependsOn.forEach((dep) => {
|
|
64
|
+
this.extractAgGridModuleNames(dep, collectedModules);
|
|
65
|
+
});
|
|
66
|
+
}
|
|
67
|
+
return collectedModules;
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
exports.AgGridModulesAdapter = AgGridModulesAdapter;
|
|
@@ -85,5 +85,5 @@ exports.InternalAdaptableNumberEditor = React.forwardRef(function InternalAdapta
|
|
|
85
85
|
focus();
|
|
86
86
|
}
|
|
87
87
|
} },
|
|
88
|
-
React.createElement(icons_1.Icon, { size:
|
|
88
|
+
React.createElement(icons_1.Icon, { size: 15, name: "close", tabIndex: 0 }))) : null));
|
|
89
89
|
});
|
|
@@ -78,7 +78,7 @@ exports.InternalAdaptablePercentageEditor = React.forwardRef(function InternalAd
|
|
|
78
78
|
focus();
|
|
79
79
|
}
|
|
80
80
|
} },
|
|
81
|
-
React.createElement(icons_1.Icon, { size:
|
|
81
|
+
React.createElement(icons_1.Icon, { size: 15, name: "close", tabIndex: 0 }))) : null,
|
|
82
82
|
React.createElement("div", { style: {
|
|
83
83
|
position: 'absolute',
|
|
84
84
|
right: showClear ? 20 : 0,
|
|
@@ -99,7 +99,7 @@ exports.Dialog = React.forwardRef((props, dialogRef) => {
|
|
|
99
99
|
return null;
|
|
100
100
|
}
|
|
101
101
|
const closeButton = showCloseButton ? (React.createElement(rebass_1.Box, { padding: 1, title: "Close dialog", onClick: () => setIsOpen(false), className: `${baseClassName}__close-button` },
|
|
102
|
-
React.createElement(icons_1.Icon, { size:
|
|
102
|
+
React.createElement(icons_1.Icon, { size: 20, name: "close" }))) : null;
|
|
103
103
|
const setPreventDismissFlag = (e) => {
|
|
104
104
|
if (dismissOnClickOutside) {
|
|
105
105
|
e.nativeEvent.preventDialogDismiss = true;
|
|
@@ -15,7 +15,7 @@ const Arrows = () => {
|
|
|
15
15
|
transform: 'translate3d(0px, -50%, 0px)',
|
|
16
16
|
cursor: 'pointer',
|
|
17
17
|
} },
|
|
18
|
-
React.createElement(icons_1.Icon, { name: "triangle-up", size:
|
|
19
|
-
React.createElement(icons_1.Icon, { name: "triangle-down", size:
|
|
18
|
+
React.createElement(icons_1.Icon, { name: "triangle-up", size: 20, style: { position: 'relative', top: 7 } }),
|
|
19
|
+
React.createElement(icons_1.Icon, { name: "triangle-down", size: 20, style: { position: 'relative', top: -7 } })));
|
|
20
20
|
};
|
|
21
21
|
exports.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;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.CombinatorSelector = exports.ExpressionSelector = exports.PrimitiveMultiValueInput = exports.
|
|
3
|
+
exports.CombinatorSelector = exports.ExpressionSelector = exports.PrimitiveMultiValueInput = exports.PrimitiveValueInput = exports.PrimitiveColumnOrFieldSelector = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
const react_1 = tslib_1.__importDefault(require("react"));
|
|
6
6
|
const rebass_1 = require("rebass");
|
|
@@ -68,7 +68,7 @@ const PrimitiveColumnOrFieldSelector = (props) => {
|
|
|
68
68
|
input));
|
|
69
69
|
};
|
|
70
70
|
exports.PrimitiveColumnOrFieldSelector = PrimitiveColumnOrFieldSelector;
|
|
71
|
-
const
|
|
71
|
+
const PrimitiveValueInput = (props) => {
|
|
72
72
|
const adaptable = (0, AdaptableContext_1.useAdaptable)();
|
|
73
73
|
const hasFields = react_1.default.useMemo(() => {
|
|
74
74
|
return adaptable.api.expressionApi.internalApi.getAvailableFields()?.length > 0;
|
|
@@ -135,7 +135,7 @@ const PrimiteValueInput = (props) => {
|
|
|
135
135
|
} }));
|
|
136
136
|
}
|
|
137
137
|
else if (!['date', 'boolean'].includes(props.inputType)) {
|
|
138
|
-
editor = (react_1.default.createElement(PermittedValuesSelector_1.PermittedValuesSelector, { allowNewValues: true, value: props.value, columnId: (0, utils_1.mapColumnExpressionToColumnId)(props.lefthandColumnIdParam), onChange: (value) => {
|
|
138
|
+
editor = (react_1.default.createElement(PermittedValuesSelector_1.PermittedValuesSelector, { allowNewValues: true, searchable: 'inline', value: props.value, columnId: (0, utils_1.mapColumnExpressionToColumnId)(props.lefthandColumnIdParam), onChange: (value) => {
|
|
139
139
|
props.onChange(value);
|
|
140
140
|
} }));
|
|
141
141
|
}
|
|
@@ -174,7 +174,7 @@ const PrimiteValueInput = (props) => {
|
|
|
174
174
|
}, value: typeOption.value, options: options, onChange: (value) => handleTypeChange(value) }),
|
|
175
175
|
editor));
|
|
176
176
|
};
|
|
177
|
-
exports.
|
|
177
|
+
exports.PrimitiveValueInput = PrimitiveValueInput;
|
|
178
178
|
const PrimitiveMultiValueInput = (props) => {
|
|
179
179
|
return (react_1.default.createElement(PermittedValuesSelector_1.PermittedValuesSelector, { isMulti: true, allowNewValues: true, value: props.value, columnId: (0, utils_1.mapColumnExpressionToColumnId)(props.lefthandColumnIdParam), onChange: (value) => {
|
|
180
180
|
props.onChange(value);
|
|
@@ -189,7 +189,7 @@ const PrimitiveFunctionEditor = (props) => {
|
|
|
189
189
|
});
|
|
190
190
|
} }));
|
|
191
191
|
}
|
|
192
|
-
return (react_1.default.createElement(QueryBuilderInputs_1.
|
|
192
|
+
return (react_1.default.createElement(QueryBuilderInputs_1.PrimitiveValueInput, { ...commonProps, key: key, value: restOfArgs[index] ?? null, onChange: (value) => {
|
|
193
193
|
const args = [...props.predicate.args];
|
|
194
194
|
// +1 because col is the first argument
|
|
195
195
|
args[index + 1] = value;
|
|
@@ -40,7 +40,7 @@ const readJSONFile = async (file, toJSON) => {
|
|
|
40
40
|
};
|
|
41
41
|
exports.readJSONFile = readJSONFile;
|
|
42
42
|
const FileDroppable = (props = {}) => {
|
|
43
|
-
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(icons_1.Icon, { name: "paperclip", size:
|
|
43
|
+
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(icons_1.Icon, { name: "paperclip", size: 40 }), value, ...domProps } = props;
|
|
44
44
|
const [state, dispatch] = (0, react_1.useReducer)(reducer_1.default, initialState);
|
|
45
45
|
const onDragEnter = (e) => {
|
|
46
46
|
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;
|
|
@@ -46,7 +46,7 @@ const ensurePortalElement = () => {
|
|
|
46
46
|
}
|
|
47
47
|
portalElement = document.createElement('div');
|
|
48
48
|
portalElement.style.position = 'absolute';
|
|
49
|
-
portalElement.style.zIndex = '
|
|
49
|
+
portalElement.style.zIndex = '9999999';
|
|
50
50
|
portalElement.style.top = '0px';
|
|
51
51
|
portalElement.style.left = '0px';
|
|
52
52
|
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;
|
|
@@ -12,6 +12,7 @@ const infinite_react_1 = require("@infinite-table/infinite-react");
|
|
|
12
12
|
const react_1 = require("react");
|
|
13
13
|
const join_1 = tslib_1.__importDefault(require("../utils/join"));
|
|
14
14
|
const re_resizable_1 = require("re-resizable");
|
|
15
|
+
const Tooltip_1 = tslib_1.__importDefault(require("../Tooltip"));
|
|
15
16
|
const resizableDirections = {
|
|
16
17
|
right: true,
|
|
17
18
|
bottom: true,
|
|
@@ -32,6 +33,15 @@ const INFINITE_DOM_PROPS = {
|
|
|
32
33
|
width: '100%',
|
|
33
34
|
},
|
|
34
35
|
};
|
|
36
|
+
const infiniteContentValueClassName = 'InfiniteCell_content_value';
|
|
37
|
+
const renderValue = ({ renderBag, data, value }) => {
|
|
38
|
+
if (data.tooltip) {
|
|
39
|
+
const tooltipNode = typeof data.tooltip === 'string' ? data.tooltip : value;
|
|
40
|
+
return (React.createElement(Tooltip_1.default, { label: tooltipNode },
|
|
41
|
+
React.createElement("div", { className: infiniteContentValueClassName }, renderBag.value)));
|
|
42
|
+
}
|
|
43
|
+
return React.createElement("div", { className: infiniteContentValueClassName }, renderBag.value);
|
|
44
|
+
};
|
|
35
45
|
const INFINITE_COLUMNS_WITH_CHECKBOX = {
|
|
36
46
|
label: {
|
|
37
47
|
field: 'label',
|
|
@@ -48,9 +58,7 @@ const INFINITE_COLUMNS_WITH_CHECKBOX = {
|
|
|
48
58
|
},
|
|
49
59
|
renderHeaderSelectionCheckBox: true,
|
|
50
60
|
className: 'ab-Select-CheckboxColumn',
|
|
51
|
-
renderValue
|
|
52
|
-
return React.createElement("div", { className: "InfiniteCell_content_value" }, renderBag.value);
|
|
53
|
-
},
|
|
61
|
+
renderValue,
|
|
54
62
|
renderHeader: (headerParams) => {
|
|
55
63
|
return (React.createElement(React.Fragment, null,
|
|
56
64
|
headerParams.renderBag.selectionCheckBox,
|
|
@@ -63,6 +71,7 @@ const INFINITE_COLUMNS_WITH_RADIO = {
|
|
|
63
71
|
label: {
|
|
64
72
|
field: 'label',
|
|
65
73
|
defaultFlex: 1,
|
|
74
|
+
renderValue,
|
|
66
75
|
},
|
|
67
76
|
};
|
|
68
77
|
const isRowDisabled = ({ data, }) => {
|
|
@@ -95,6 +104,19 @@ const doesOptionMatchValue = function (value) {
|
|
|
95
104
|
};
|
|
96
105
|
const Select = function (props) {
|
|
97
106
|
let maxLabelLength = 0;
|
|
107
|
+
const searchableInMenulist = props.searchable === 'menulist';
|
|
108
|
+
const searchableInline = props.searchable === 'inline';
|
|
109
|
+
// relevant for menulist search only
|
|
110
|
+
const menulistInputRef = React.useRef(null);
|
|
111
|
+
const [isSelectMenuOpen, setIsSelectMenuOpen] = (0, react_1.useState)(false);
|
|
112
|
+
const openSelectMenu = () => {
|
|
113
|
+
setIsSelectMenuOpen(true);
|
|
114
|
+
// it's a react-select bug, onMenuOpen is not called with controlled menuIsOpen
|
|
115
|
+
props.onMenuOpen?.();
|
|
116
|
+
};
|
|
117
|
+
const closeSelectMenu = () => {
|
|
118
|
+
setIsSelectMenuOpen(false);
|
|
119
|
+
};
|
|
98
120
|
const ref = React.useRef(null);
|
|
99
121
|
const valueToOptionMap = new Map((props.options || []).map((opt) => {
|
|
100
122
|
let label = opt.label;
|
|
@@ -157,12 +179,23 @@ const Select = function (props) {
|
|
|
157
179
|
* If on each render a new reference is passed, the menu will not open using the keyboard.
|
|
158
180
|
*/
|
|
159
181
|
const SelectContainer = React.useMemo(() => {
|
|
160
|
-
return (
|
|
161
|
-
return (React.createElement(react_select_1.components.SelectContainer, { ...
|
|
182
|
+
return (selectContainerProps) => {
|
|
183
|
+
return (React.createElement(react_select_1.components.SelectContainer, { ...selectContainerProps, innerProps: {
|
|
162
184
|
// @ts-ignore
|
|
163
185
|
'data-name': props['data-name'],
|
|
164
186
|
'data-id': props['data-id'],
|
|
165
|
-
|
|
187
|
+
'data-test': props.searchable || false,
|
|
188
|
+
...selectContainerProps.innerProps,
|
|
189
|
+
onMouseDown: (e) => {
|
|
190
|
+
if (!searchableInMenulist) {
|
|
191
|
+
return;
|
|
192
|
+
}
|
|
193
|
+
if (!isSelectMenuOpen) {
|
|
194
|
+
openSelectMenu();
|
|
195
|
+
e.stopPropagation();
|
|
196
|
+
e.preventDefault();
|
|
197
|
+
}
|
|
198
|
+
},
|
|
166
199
|
} }));
|
|
167
200
|
};
|
|
168
201
|
}, []);
|
|
@@ -197,10 +230,10 @@ const Select = function (props) {
|
|
|
197
230
|
}, [renderMultipleValues, props.placeholder]);
|
|
198
231
|
const sizeRef = React.useRef({ ...defaultResizableSize });
|
|
199
232
|
const MenuComponent = React.useMemo(() => {
|
|
200
|
-
return (
|
|
201
|
-
const { isLoading } =
|
|
233
|
+
return (menuProps) => {
|
|
234
|
+
const { isLoading } = menuProps;
|
|
202
235
|
const theChildren = (React.createElement(React.Fragment, null,
|
|
203
|
-
|
|
236
|
+
menuProps.children,
|
|
204
237
|
React.createElement("div", { style: {
|
|
205
238
|
display: isLoading ? 'block' : 'none',
|
|
206
239
|
position: 'absolute',
|
|
@@ -216,9 +249,37 @@ const Select = function (props) {
|
|
|
216
249
|
sizeRef.current = newSize;
|
|
217
250
|
}, []);
|
|
218
251
|
return (React.createElement(React.Fragment, null,
|
|
219
|
-
React.createElement(react_select_1.components.Menu, { ...
|
|
252
|
+
React.createElement(react_select_1.components.Menu, { ...menuProps, innerProps: {
|
|
253
|
+
// @ts-ignore
|
|
220
254
|
'data-name': 'menu-container',
|
|
221
|
-
...
|
|
255
|
+
...menuProps.innerProps,
|
|
256
|
+
onBlur: (e) => {
|
|
257
|
+
if (!searchableInMenulist) {
|
|
258
|
+
return;
|
|
259
|
+
}
|
|
260
|
+
const { relatedTarget } = e;
|
|
261
|
+
const menuDOMNode = menuProps.innerRef && 'current' in menuProps.innerRef
|
|
262
|
+
? menuProps.innerRef.current
|
|
263
|
+
: null;
|
|
264
|
+
if ((menuDOMNode && relatedTarget == menuDOMNode) ||
|
|
265
|
+
menuDOMNode?.contains(relatedTarget)) {
|
|
266
|
+
// ignore the event if the focus is still inside the menu
|
|
267
|
+
return;
|
|
268
|
+
}
|
|
269
|
+
setTimeout(() => {
|
|
270
|
+
// wee need to wait for the single value selectio to complete before closing
|
|
271
|
+
closeSelectMenu();
|
|
272
|
+
}, 100);
|
|
273
|
+
},
|
|
274
|
+
onMouseDownCapture: (event) => {
|
|
275
|
+
if (!searchableInMenulist) {
|
|
276
|
+
return;
|
|
277
|
+
}
|
|
278
|
+
if (props.isMulti) {
|
|
279
|
+
// to avoid the menu closing when clicking inside it
|
|
280
|
+
event.stopPropagation();
|
|
281
|
+
}
|
|
282
|
+
},
|
|
222
283
|
} }, resizable ? (React.createElement(re_resizable_1.Resizable, { enable: resizableDirections, minWidth: '100%', maxHeight: '60vh', maxWidth: '60vw', defaultSize: sizeRef.current, onResizeStop: onResizeStop }, theChildren)) : (theChildren))));
|
|
223
284
|
};
|
|
224
285
|
}, [resizable]);
|
|
@@ -233,6 +294,12 @@ const Select = function (props) {
|
|
|
233
294
|
return (props) => {
|
|
234
295
|
const { setValue, getValue, focusedOption, options, selectProps } = props;
|
|
235
296
|
const { filterOption, inputValue, options: selectOptions, isLoading } = selectProps;
|
|
297
|
+
// Focus the input when MenuList mounts
|
|
298
|
+
React.useEffect(() => {
|
|
299
|
+
if (menulistInputRef.current) {
|
|
300
|
+
menulistInputRef.current.focus();
|
|
301
|
+
}
|
|
302
|
+
}, []);
|
|
236
303
|
const filterFunction = React.useCallback(({ data }) => filterOption({ data, label: `${data.label}`, value: data.value }, inputValue), [filterOption, inputValue]);
|
|
237
304
|
const hasFilter = inputValue !== '';
|
|
238
305
|
const filteredOptionsValues = new Set();
|
|
@@ -356,11 +423,13 @@ const Select = function (props) {
|
|
|
356
423
|
const pk = dataSourceApi.getPrimaryKeyByIndex(rowIndex);
|
|
357
424
|
api.rowSelectionApi.toggleRowSelection(pk);
|
|
358
425
|
}
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
426
|
+
if (searchableInMenulist) {
|
|
427
|
+
requestAnimationFrame(() => {
|
|
428
|
+
menulistInputRef.current?.focus();
|
|
429
|
+
});
|
|
430
|
+
}
|
|
363
431
|
}, []);
|
|
432
|
+
const prevInputValueRef = React.useRef('');
|
|
364
433
|
return (React.createElement(infinite_react_1.DataSource, {
|
|
365
434
|
// @ts-ignore
|
|
366
435
|
// data={props.options}
|
|
@@ -368,12 +437,33 @@ const Select = function (props) {
|
|
|
368
437
|
data: filteredOptions, primaryKey: "value", selectionMode: isMulti ? 'multi-row' : 'single-row',
|
|
369
438
|
// @ts-ignore
|
|
370
439
|
onRowSelectionChange: isLoading ? null : isMulti ? onRowSelectionChange : onSingleRowSelectionChange, rowSelection: rowSelection, isRowDisabled: isRowDisabled },
|
|
440
|
+
searchableInMenulist && (React.createElement(rebass_1.Flex, { p: 1 },
|
|
441
|
+
React.createElement("input", { ref: menulistInputRef, "data-name": "menulist-search-input", style: {
|
|
442
|
+
width: '100%',
|
|
443
|
+
}, className: 'ab-Select-MenulistSearch ab-Input ab-Input--type-text', autoCorrect: "off", autoComplete: "off", spellCheck: "false", type: "text", value: inputValue, onChange: (e) => {
|
|
444
|
+
const currentValue = e.currentTarget.value;
|
|
445
|
+
onInputChange(currentValue, {
|
|
446
|
+
action: 'input-change',
|
|
447
|
+
prevInputValue: prevInputValueRef.current,
|
|
448
|
+
});
|
|
449
|
+
prevInputValueRef.current = currentValue;
|
|
450
|
+
}, onMouseDown: (e) => {
|
|
451
|
+
e.stopPropagation();
|
|
452
|
+
const inputElement = e.target;
|
|
453
|
+
inputElement?.focus?.();
|
|
454
|
+
}, onTouchEnd: (e) => {
|
|
455
|
+
e.stopPropagation();
|
|
456
|
+
const inputElement = e.target;
|
|
457
|
+
inputElement?.focus?.();
|
|
458
|
+
}, placeholder: "Search..." }))),
|
|
371
459
|
React.createElement(infinite_react_1.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 })));
|
|
372
460
|
};
|
|
373
461
|
}, [isMulti, showHeaderSelectionCheckbox]);
|
|
374
462
|
const DropdownIndicator = React.useMemo(() => {
|
|
375
|
-
return (
|
|
376
|
-
return (React.createElement(react_select_1.components.DropdownIndicator, { ...
|
|
463
|
+
return (dropdownIndicatorProps) => {
|
|
464
|
+
return (React.createElement(react_select_1.components.DropdownIndicator, { ...dropdownIndicatorProps, innerProps: {
|
|
465
|
+
...dropdownIndicatorProps.innerProps,
|
|
466
|
+
} },
|
|
377
467
|
React.createElement(icons_1.Icon, { name: "triangle-down", style: { height: 20, width: 20 } })));
|
|
378
468
|
};
|
|
379
469
|
}, []);
|
|
@@ -395,20 +485,22 @@ const Select = function (props) {
|
|
|
395
485
|
setInputValue(value);
|
|
396
486
|
props.onInputChange?.(value);
|
|
397
487
|
}, [props.onInputChange, isMulti]);
|
|
398
|
-
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: (0, join_1.default)(props.className, 'ab-Select'), isDisabled: disabled, menuPlacement: props.menuPlacement ?? 'auto',
|
|
488
|
+
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: (0, join_1.default)(props.className, 'ab-Select'), isDisabled: disabled, menuPlacement: props.menuPlacement ?? 'auto', hideSelectedOptions: false, isMulti: isMulti, value: selectedOption, blurInputOnSelect: false, menuPosition: props.menuPosition ?? 'absolute',
|
|
399
489
|
// This needed so the menu is not clipped by overflow: hidden
|
|
400
490
|
menuPortalTarget: props.menuPortalTarget === undefined ? document.body : null, isClearable: props.isClearable, closeMenuOnSelect: props.closeMenuOnSelect, onChange: (option) => {
|
|
401
491
|
if (isMulti) {
|
|
402
492
|
const value = option.map((x) => x?.value);
|
|
403
493
|
props.onChange(value);
|
|
404
|
-
// ensure element keeps focus
|
|
405
|
-
requestAnimationFrame(() => {
|
|
406
|
-
ref.current?.focus();
|
|
407
|
-
});
|
|
408
494
|
}
|
|
409
495
|
else {
|
|
410
496
|
props.onChange(option?.value);
|
|
411
497
|
}
|
|
498
|
+
if (searchableInMenulist) {
|
|
499
|
+
// ensure element keeps focus
|
|
500
|
+
requestAnimationFrame(() => {
|
|
501
|
+
menulistInputRef.current?.focus();
|
|
502
|
+
});
|
|
503
|
+
}
|
|
412
504
|
}, placeholder: props.placeholder, createOptionPosition: 'first',
|
|
413
505
|
// formatCreateLabel={(inputValue) => inputValue} // can we make this auto??
|
|
414
506
|
// 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,17 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.getSize = void 0;
|
|
4
3
|
const tslib_1 = require("tslib");
|
|
5
4
|
const React = tslib_1.__importStar(require("react"));
|
|
6
5
|
const join_1 = tslib_1.__importDefault(require("../utils/join"));
|
|
7
|
-
const HUNDRED_PERCENT_SIZE = 24;
|
|
8
6
|
const DEFAULT_SIZE = 20;
|
|
9
|
-
const getSize = (size) => Math.round(size * (DEFAULT_SIZE / HUNDRED_PERCENT_SIZE));
|
|
10
|
-
exports.getSize = getSize;
|
|
11
7
|
exports.default = ({ children, size = DEFAULT_SIZE, name, tabIndex, color, ...props }) => {
|
|
12
|
-
size =
|
|
13
|
-
typeof size === 'number' || parseInt(size) == size
|
|
14
|
-
? (0, exports.getSize)(size)
|
|
15
|
-
: size;
|
|
16
8
|
return (React.createElement("svg", { width: size, height: size, viewBox: "0 0 24 24", tabIndex: tabIndex, "data-id": name, "data-name": "AdaptableIcon", ...props, className: (0, join_1.default)(props.className, `ab-Icon ab-Icon--${name}`), style: { verticalAlign: 'middle', fill: color ?? 'currentColor', ...props.style } }, children));
|
|
17
9
|
};
|
package/src/env.js
CHANGED
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.default = {
|
|
4
4
|
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" || '',
|
|
5
|
-
PUBLISH_TIMESTAMP:
|
|
6
|
-
VERSION: "
|
|
5
|
+
PUBLISH_TIMESTAMP: 1756456094068 || Date.now(),
|
|
6
|
+
VERSION: "21.0.0-canary.1" || '--current-version--',
|
|
7
7
|
};
|
|
@@ -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;
|
|
@@ -42,11 +42,16 @@ export declare class LayoutManager<DATA_TYPE = any> extends LMEmitter {
|
|
|
42
42
|
getTableLayoutModelFromGrid(): TableLayoutModel;
|
|
43
43
|
private isTreeMode;
|
|
44
44
|
getUndecidedLayoutModelFromGrid(columnState: ColumnState[]): TableLayoutModel | PivotLayoutModel;
|
|
45
|
-
static
|
|
45
|
+
static getColumnDefsChangesForLayout(layout: TableLayoutModel | PivotLayoutModel, colDefs: GridOptions['columnDefs']): GridOptions['columnDefs'] | null;
|
|
46
|
+
static getAGGridInitialStateForLayout(layout: TableLayoutModel | PivotLayoutModel, colDefs: GridOptions['columnDefs'], options: {
|
|
46
47
|
isTree: boolean;
|
|
48
|
+
colTypes: GridOptions['columnTypes'];
|
|
49
|
+
defaultColDef: GridOptions['defaultColDef'];
|
|
47
50
|
}): GridState;
|
|
48
51
|
static getAGGridInitialStateForTableLayout(layout: TableLayoutModel, colDefs: GridOptions['columnDefs'], _options?: {
|
|
49
|
-
isTree
|
|
52
|
+
isTree?: boolean;
|
|
53
|
+
colTypes?: GridOptions['columnTypes'];
|
|
54
|
+
defaultColDef?: GridOptions['defaultColDef'];
|
|
50
55
|
}): GridState;
|
|
51
56
|
static getAGGridInitialStateForPivotLayout(layout: PivotLayoutModel, colDefs: GridOptions['columnDefs']): GridState;
|
|
52
57
|
silentSetCurrentLayout(layout: TableLayoutModel | PivotLayoutModel, options?: {
|
|
@@ -60,6 +65,8 @@ export declare class LayoutManager<DATA_TYPE = any> extends LMEmitter {
|
|
|
60
65
|
private suspendAgGridListener;
|
|
61
66
|
private resumeAgGridListener;
|
|
62
67
|
private applyLayout;
|
|
68
|
+
applyColumnDefsChanges(layout: TableLayoutModel | PivotLayoutModel): boolean;
|
|
69
|
+
private applyColumnSizingColumnDefsChanges;
|
|
63
70
|
private applyTableLayout;
|
|
64
71
|
private getRowGroupNodePathsAs;
|
|
65
72
|
applyRowGroupValues(RowGroupValues: TableLayoutModel['RowGroupValues'], rowGroupedColumns: string[]): void;
|
|
@@ -71,7 +78,7 @@ export declare class LayoutManager<DATA_TYPE = any> extends LMEmitter {
|
|
|
71
78
|
private computeRowGrouping;
|
|
72
79
|
private computeColumnSorts;
|
|
73
80
|
private getDefaultColumnWidthForCol;
|
|
74
|
-
private
|
|
81
|
+
private computeColumnSizing;
|
|
75
82
|
private computeColumnOrderAndVisibility;
|
|
76
83
|
autoSizeColumns(columnIds?: string[]): false | string[];
|
|
77
84
|
private applyPivotLayout;
|
|
@@ -82,5 +89,6 @@ export declare class LayoutManager<DATA_TYPE = any> extends LMEmitter {
|
|
|
82
89
|
private setupPivotTotals;
|
|
83
90
|
private patchPivotAggregationTotal;
|
|
84
91
|
private getPivotTotalColumnConfig;
|
|
92
|
+
private isInPivotMode;
|
|
85
93
|
}
|
|
86
94
|
export {};
|