@adaptabletools/adaptable-cjs 18.0.0-canary.8 → 18.0.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/base.css +18 -20
- package/base.css.map +1 -1
- package/index.css +22 -20
- package/index.css.map +1 -1
- package/package.json +1 -1
- package/src/AdaptableInterfaces/IAdaptable.d.ts +10 -4
- package/src/AdaptableOptions/ActionColumnOptions.d.ts +3 -2
- package/src/AdaptableOptions/AdaptableFrameworkComponent.d.ts +3 -0
- package/src/AdaptableOptions/AdaptableOptions.d.ts +15 -14
- package/src/AdaptableOptions/AdaptablePlugin.d.ts +2 -0
- package/src/AdaptableOptions/AdaptablePlugin.js +2 -0
- package/src/AdaptableOptions/ColumnFilterOptions.d.ts +7 -0
- package/src/AdaptableOptions/ColumnMenuOptions.d.ts +94 -0
- package/src/AdaptableOptions/ColumnOptions.d.ts +9 -4
- package/src/AdaptableOptions/CommentOptions.d.ts +20 -9
- package/src/AdaptableOptions/ContextMenuOptions.d.ts +94 -0
- package/src/AdaptableOptions/CustomSortOptions.d.ts +2 -2
- package/src/AdaptableOptions/DataImportOptions.d.ts +2 -2
- package/src/AdaptableOptions/FormatColumnOptions.d.ts +2 -2
- package/src/AdaptableOptions/GroupingOptions.d.ts +0 -26
- package/src/AdaptableOptions/NoteOptions.d.ts +12 -3
- package/src/AdaptableOptions/PredicateOptions.d.ts +2 -2
- package/src/AdaptableOptions/QuickSearchOptions.d.ts +1 -1
- package/src/AdaptableOptions/StateOptions.d.ts +6 -0
- package/src/AdaptableOptions/UserInterfaceOptions.d.ts +2 -2
- package/src/Api/AdaptableApi.d.ts +16 -6
- package/src/Api/ColumnApi.d.ts +13 -0
- package/src/Api/ColumnMenuApi.d.ts +13 -0
- package/src/Api/{ScopeApi.d.ts → ColumnScopeApi.d.ts} +36 -26
- package/src/Api/CommentApi.d.ts +20 -22
- package/src/Api/ConfigApi.d.ts +4 -5
- package/src/Api/ContextMenuApi.d.ts +9 -0
- package/src/Api/EventApi.d.ts +7 -9
- package/src/Api/Events/CommentChanged.d.ts +11 -0
- package/src/Api/Events/CommentChanged.js +2 -0
- package/src/Api/Events/GridDataChanged.d.ts +1 -1
- package/src/Api/FlashingCellApi.d.ts +2 -2
- package/src/Api/GridApi.d.ts +35 -3
- package/src/Api/Implementation/ActionColumnApiImpl.js +3 -6
- package/src/Api/Implementation/ActionRowApiImpl.js +3 -7
- package/src/Api/Implementation/AdaptableApiImpl.d.ts +7 -5
- package/src/Api/Implementation/AdaptableApiImpl.js +9 -5
- package/src/Api/Implementation/AlertApiImpl.js +8 -13
- package/src/Api/Implementation/ApiBase.d.ts +6 -4
- package/src/Api/Implementation/ApiBase.js +11 -5
- package/src/Api/Implementation/CalendarApiImpl.js +1 -6
- package/src/Api/Implementation/CellSummaryApiImpl.d.ts +0 -5
- package/src/Api/Implementation/CellSummaryApiImpl.js +2 -23
- package/src/Api/Implementation/ChartingApiImpl.js +3 -3
- package/src/Api/Implementation/ColumnApiImpl.d.ts +5 -0
- package/src/Api/Implementation/ColumnApiImpl.js +48 -16
- package/src/Api/Implementation/ColumnFilterApiImpl.js +7 -7
- package/src/Api/Implementation/ColumnMenuApiImpl.d.ts +8 -0
- package/src/Api/Implementation/ColumnMenuApiImpl.js +16 -0
- package/src/Api/Implementation/ColumnScopeApiImpl.d.ts +33 -0
- package/src/Api/Implementation/{ScopeApiImpl.js → ColumnScopeApiImpl.js} +67 -21
- package/src/Api/Implementation/CommentsApiImpl.d.ts +8 -5
- package/src/Api/Implementation/CommentsApiImpl.js +10 -5
- package/src/Api/Implementation/ConfigApiImpl.d.ts +2 -2
- package/src/Api/Implementation/ConfigApiImpl.js +27 -28
- package/src/Api/Implementation/ContextMenuApiImpl.d.ts +7 -0
- package/src/Api/Implementation/ContextMenuApiImpl.js +13 -0
- package/src/Api/Implementation/DashboardApiImpl.js +1 -6
- package/src/Api/Implementation/ExportApiImpl.js +5 -10
- package/src/Api/Implementation/ExpressionApiImpl.js +14 -19
- package/src/Api/Implementation/Fdc3ApiImpl.js +1 -1
- package/src/Api/Implementation/FlashingCellApiImpl.d.ts +2 -2
- package/src/Api/Implementation/FlashingCellApiImpl.js +3 -8
- package/src/Api/Implementation/FormatColumnApiImpl.js +4 -4
- package/src/Api/Implementation/FreeTextColumnApiImpl.js +1 -1
- package/src/Api/Implementation/GridApiImpl.d.ts +9 -1
- package/src/Api/Implementation/GridApiImpl.js +63 -9
- package/src/Api/Implementation/LayoutApiImpl.d.ts +4 -11
- package/src/Api/Implementation/LayoutApiImpl.js +19 -27
- package/src/Api/Implementation/NoteApiImpl.d.ts +18 -0
- package/src/Api/Implementation/NoteApiImpl.js +45 -0
- package/src/Api/Implementation/OptionsApiImpl.d.ts +6 -5
- package/src/Api/Implementation/OptionsApiImpl.js +7 -4
- package/src/Api/Implementation/PredicateApiImpl.js +2 -2
- package/src/Api/Implementation/ScheduleApiImpl.js +6 -6
- package/src/Api/Implementation/TeamSharingApiImpl.js +3 -15
- package/src/Api/Implementation/ThemeApiImpl.js +2 -7
- package/src/Api/Implementation/UserInterfaceApiImpl.d.ts +14 -8
- package/src/Api/Implementation/UserInterfaceApiImpl.js +32 -27
- package/src/Api/Internal/ActionRowInternalApi.d.ts +1 -0
- package/src/Api/Internal/ActionRowInternalApi.js +19 -46
- package/src/Api/Internal/AdaptableInternalApi.d.ts +3 -4
- package/src/Api/Internal/AdaptableInternalApi.js +16 -30
- package/src/Api/Internal/AlertInternalApi.d.ts +2 -2
- package/src/Api/Internal/AlertInternalApi.js +7 -20
- package/src/Api/Internal/CalculatedColumnInternalApi.js +11 -17
- package/src/Api/Internal/ChartingInternalApi.js +13 -13
- package/src/Api/Internal/ColumnFilterInternalApi.d.ts +1 -0
- package/src/Api/Internal/ColumnFilterInternalApi.js +24 -30
- package/src/Api/Internal/ColumnInternalApi.d.ts +2 -0
- package/src/Api/Internal/ColumnInternalApi.js +8 -1
- package/src/Api/Internal/CommentsInternalApi.d.ts +4 -0
- package/src/Api/Internal/CommentsInternalApi.js +18 -0
- package/src/Api/Internal/CustomSortInternalApi.js +1 -1
- package/src/Api/Internal/DashboardInternalApi.js +5 -11
- package/src/Api/Internal/DataImportInternalApi.js +3 -9
- package/src/Api/Internal/DataSetInternalApi.js +2 -7
- package/src/Api/Internal/ExportInternalApi.d.ts +2 -1
- package/src/Api/Internal/ExportInternalApi.js +8 -5
- package/src/Api/Internal/ExpressionInternalApi.js +3 -13
- package/src/Api/Internal/Fdc3InternalApi.js +3 -12
- package/src/Api/Internal/FormatColumnInternalApi.d.ts +3 -6
- package/src/Api/Internal/FormatColumnInternalApi.js +38 -30
- package/src/Api/Internal/FreeTextColumnInternalApi.js +5 -4
- package/src/Api/Internal/GridFilterInternalApi.d.ts +5 -0
- package/src/Api/Internal/GridFilterInternalApi.js +8 -8
- package/src/Api/Internal/GridInternalApi.d.ts +2 -0
- package/src/Api/Internal/GridInternalApi.js +28 -40
- package/src/Api/Internal/LayoutInternalApi.d.ts +2 -0
- package/src/Api/Internal/LayoutInternalApi.js +26 -19
- package/src/Api/Internal/NoteInternalApi.d.ts +4 -0
- package/src/Api/Internal/NoteInternalApi.js +18 -0
- package/src/Api/Internal/PredicateInternalApi.d.ts +6 -6
- package/src/Api/Internal/PredicateInternalApi.js +5 -40
- package/src/Api/Internal/ScheduleInternalApi.js +1 -6
- package/src/Api/Internal/StyledColumnInternalApi.d.ts +2 -2
- package/src/Api/Internal/StyledColumnInternalApi.js +8 -9
- package/src/Api/Internal/SystemStatusInternalApi.js +1 -7
- package/src/Api/Internal/TeamSharingInternalApi.js +2 -7
- package/src/Api/Internal/ThemeInternalApi.js +1 -1
- package/src/Api/Internal/UserInterfaceInternalApi.js +1 -1
- package/src/Api/LayoutApi.d.ts +15 -15
- package/src/Api/NoteApi.d.ts +48 -0
- package/src/Api/NoteApi.js +2 -0
- package/src/Api/OptionsApi.d.ts +14 -10
- package/src/Api/UserInterfaceApi.d.ts +15 -13
- package/src/PredefinedConfig/AdaptableState.d.ts +2 -2
- package/src/PredefinedConfig/AlertState.d.ts +2 -2
- package/src/PredefinedConfig/CommentState.d.ts +27 -23
- package/src/PredefinedConfig/Common/AdaptableColumn.d.ts +4 -0
- package/src/PredefinedConfig/Common/AdaptableIcon.d.ts +1 -1
- package/src/PredefinedConfig/Common/AdaptableObject.d.ts +4 -4
- package/src/PredefinedConfig/Common/AdaptablePredicate.d.ts +2 -2
- package/src/PredefinedConfig/Common/CellSummary.d.ts +5 -14
- package/src/PredefinedConfig/Common/{AdaptableScope.d.ts → ColumnScope.d.ts} +4 -1
- package/src/PredefinedConfig/Common/ColumnScope.js +2 -0
- package/src/PredefinedConfig/Common/DataUpdateConfig.d.ts +1 -5
- package/src/PredefinedConfig/Common/Enums.d.ts +4 -1
- package/src/PredefinedConfig/Common/Enums.js +3 -0
- package/src/PredefinedConfig/Common/Fdc3Intent.d.ts +2 -2
- package/src/PredefinedConfig/Common/Menu.d.ts +39 -4
- package/src/PredefinedConfig/Common/Menu.js +126 -0
- package/src/PredefinedConfig/Common/RowScope.d.ts +17 -0
- package/src/PredefinedConfig/Common/RowScope.js +2 -0
- package/src/PredefinedConfig/Common/RowSummary.d.ts +21 -0
- package/src/PredefinedConfig/Common/RowSummary.js +20 -0
- package/src/PredefinedConfig/Common/TransposeConfig.d.ts +30 -0
- package/src/PredefinedConfig/Common/TransposeConfig.js +2 -0
- package/src/PredefinedConfig/Common/Types.d.ts +4 -4
- package/src/PredefinedConfig/Common/Types.js +4 -1
- package/src/PredefinedConfig/ExportState.d.ts +2 -2
- package/src/PredefinedConfig/FlashingCellState.d.ts +2 -2
- package/src/PredefinedConfig/FormatColumnState.d.ts +9 -5
- package/src/PredefinedConfig/LayoutState.d.ts +6 -1
- package/src/PredefinedConfig/{NotesState.d.ts → NoteState.d.ts} +4 -4
- package/src/PredefinedConfig/NoteState.js +2 -0
- package/src/PredefinedConfig/PlusMinusState.d.ts +2 -2
- package/src/PredefinedConfig/PopupState.d.ts +1 -2
- package/src/PredefinedConfig/PredefinedConfig.d.ts +2 -2
- package/src/PredefinedConfig/Selection/GridCell.d.ts +13 -0
- package/src/PredefinedConfig/ShortcutState.d.ts +2 -2
- package/src/PredefinedConfig/StyledColumnState.d.ts +5 -5
- package/src/PredefinedConfig/SystemState.d.ts +12 -4
- package/src/Redux/ActionsReducers/CommentsRedux.d.ts +0 -4
- package/src/Redux/ActionsReducers/CommentsRedux.js +1 -39
- package/src/Redux/ActionsReducers/LayoutRedux.d.ts +9 -0
- package/src/Redux/ActionsReducers/LayoutRedux.js +34 -11
- package/src/Redux/ActionsReducers/NoteRedux.d.ts +38 -0
- package/src/Redux/ActionsReducers/{NotesRedux.js → NoteRedux.js} +31 -31
- package/src/Redux/ActionsReducers/PopupRedux.d.ts +5 -13
- package/src/Redux/ActionsReducers/PopupRedux.js +1 -22
- package/src/Redux/ActionsReducers/SystemRedux.d.ts +15 -4
- package/src/Redux/ActionsReducers/SystemRedux.js +27 -11
- package/src/Redux/Store/AdaptableStore.js +47 -29
- package/src/Redux/Store/Interface/IAdaptableStore.d.ts +2 -2
- package/src/Strategy/AdaptableModuleBase.d.ts +10 -10
- package/src/Strategy/AdaptableModuleBase.js +13 -16
- package/src/Strategy/AlertModule.d.ts +3 -2
- package/src/Strategy/AlertModule.js +4 -4
- package/src/Strategy/BulkUpdateModule.d.ts +3 -2
- package/src/Strategy/BulkUpdateModule.js +2 -1
- package/src/Strategy/CalculatedColumnModule.d.ts +3 -4
- package/src/Strategy/CalculatedColumnModule.js +18 -14
- package/src/Strategy/CellSummaryModule.d.ts +10 -9
- package/src/Strategy/CellSummaryModule.js +101 -83
- package/src/Strategy/ColumnFilterModule.d.ts +3 -3
- package/src/Strategy/ColumnFilterModule.js +36 -57
- package/src/Strategy/ColumnInfoModule.d.ts +3 -3
- package/src/Strategy/ColumnInfoModule.js +6 -4
- package/src/Strategy/CommentModule.d.ts +12 -0
- package/src/Strategy/CommentModule.js +75 -0
- package/src/Strategy/CustomSortModule.d.ts +1 -2
- package/src/Strategy/CustomSortModule.js +3 -2
- package/src/Strategy/DashboardModule.d.ts +3 -3
- package/src/Strategy/DashboardModule.js +10 -20
- package/src/Strategy/DataImportModule.d.ts +4 -4
- package/src/Strategy/DataImportModule.js +8 -8
- package/src/Strategy/ExportModule.d.ts +1 -2
- package/src/Strategy/ExportModule.js +56 -42
- package/src/Strategy/Fdc3Module.d.ts +1 -1
- package/src/Strategy/Fdc3Module.js +3 -13
- package/src/Strategy/FlashingCellModule.d.ts +4 -3
- package/src/Strategy/FlashingCellModule.js +10 -10
- package/src/Strategy/FormatColumnModule.d.ts +1 -1
- package/src/Strategy/FormatColumnModule.js +29 -47
- package/src/Strategy/FreeTextColumnModule.d.ts +1 -2
- package/src/Strategy/FreeTextColumnModule.js +2 -2
- package/src/Strategy/GridInfoModule.d.ts +3 -3
- package/src/Strategy/GridInfoModule.js +5 -3
- package/src/Strategy/Interface/IModule.d.ts +4 -4
- package/src/Strategy/LayoutModule.d.ts +4 -3
- package/src/Strategy/LayoutModule.js +71 -72
- package/src/Strategy/NoteModule.d.ts +10 -0
- package/src/Strategy/NoteModule.js +60 -0
- package/src/Strategy/PlusMinusModule.d.ts +1 -2
- package/src/Strategy/PlusMinusModule.js +5 -5
- package/src/Strategy/SettingsPanelModule.d.ts +3 -3
- package/src/Strategy/SettingsPanelModule.js +6 -6
- package/src/Strategy/ShortcutModule.js +1 -1
- package/src/Strategy/SmartEditModule.d.ts +3 -2
- package/src/Strategy/SmartEditModule.js +2 -1
- package/src/Strategy/StyledColumnModule.d.ts +2 -1
- package/src/Strategy/StyledColumnModule.js +42 -22
- package/src/Strategy/SystemStatusModule.d.ts +3 -3
- package/src/Strategy/SystemStatusModule.js +6 -3
- package/src/Strategy/Utilities/FormatColumn/getFormatColumnSettingsViewItems.js +4 -2
- package/src/Strategy/Utilities/getScopeViewItems.d.ts +2 -2
- package/src/Strategy/Utilities/getScopeViewItems.js +3 -0
- package/src/Utilities/Constants/GeneralConstants.d.ts +1 -0
- package/src/Utilities/Constants/GeneralConstants.js +3 -2
- package/src/Utilities/Constants/ModuleConstants.d.ts +6 -6
- package/src/Utilities/Constants/ModuleConstants.js +7 -7
- package/src/Utilities/Defaults/DefaultSettingsPanel.js +2 -2
- package/src/Utilities/ExpressionFunctions/aggregatedScalarExpressionFunctions.d.ts +3 -2
- package/src/Utilities/ExpressionFunctions/aggregatedScalarExpressionFunctions.js +434 -3
- package/src/Utilities/ExpressionFunctions/observableExpressionFunctions.js +3 -3
- package/src/Utilities/ExpressionFunctions/scalarAggregationHelper.js +1 -1
- package/src/Utilities/ExpressionFunctions/scalarExpressionFunctions.d.ts +1 -1
- package/src/Utilities/ExpressionFunctions/scalarExpressionFunctions.js +15 -0
- package/src/Utilities/Extensions/ArrayExtensions.d.ts +2 -0
- package/src/Utilities/Extensions/ArrayExtensions.js +6 -1
- package/src/Utilities/Helpers/AdaptableHelper.d.ts +3 -1
- package/src/Utilities/Helpers/AdaptableHelper.js +21 -1
- package/src/Utilities/Interface/MessagePopups.d.ts +0 -3
- package/src/Utilities/MenuItem.d.ts +10 -7
- package/src/Utilities/MenuItem.js +6 -3
- package/src/Utilities/ObjectFactory.d.ts +3 -3
- package/src/Utilities/ObjectFactory.js +7 -25
- package/src/Utilities/Services/AggregatedScalarLiveValue.d.ts +4 -2
- package/src/Utilities/Services/AggregatedScalarLiveValue.js +23 -18
- package/src/Utilities/Services/CellPopupService.js +4 -4
- package/src/Utilities/Services/Interface/IQueryLanguageService.d.ts +1 -1
- package/src/Utilities/Services/Interface/IReportService.d.ts +1 -4
- package/src/Utilities/Services/LicenseService/index.js +1 -195
- package/src/Utilities/Services/ModuleService.js +6 -2
- package/src/Utilities/Services/QueryLanguageService.d.ts +1 -1
- package/src/Utilities/Services/QueryLanguageService.js +4 -3
- package/src/Utilities/Services/ReportService.d.ts +7 -5
- package/src/Utilities/Services/ReportService.js +245 -26
- package/src/Utilities/Services/RowSummaryService.d.ts +26 -0
- package/src/Utilities/Services/RowSummaryService.js +160 -0
- package/src/Utilities/Services/ValidationService.js +2 -2
- package/src/Utilities/adaptableQlUtils.d.ts +2 -0
- package/src/Utilities/adaptableQlUtils.js +18 -0
- package/src/Utilities/license/decode.js +1 -70
- package/src/Utilities/license/hashing.js +1 -47
- package/src/View/AdaptableViewFactory.js +2 -2
- package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/UIOptions/UIOptionsStatusbarForm.js +1 -1
- package/src/View/Alert/AlertEntityRow.js +1 -1
- package/src/View/Alert/Utilities/getAvailablePredicates.d.ts +2 -2
- package/src/View/Alert/Utilities/getDefaultAlertDefinition.d.ts +1 -1
- package/src/View/Alert/Wizard/AlertScopeWizardSection.js +2 -2
- package/src/View/Alert/Wizard/BaseAlertScopeWizardSection.js +1 -1
- package/src/View/BulkUpdate/BulkUpdatePopup.js +2 -2
- package/src/View/CalculatedColumn/Wizard/CalculatedColumnWizard.d.ts +1 -1
- package/src/View/CalculatedColumn/Wizard/CalculatedColumnWizard.js +3 -3
- package/src/View/ColumnInfo/ColumnInfo.js +1 -1
- package/src/View/Comments/CommentsEditor.js +28 -17
- package/src/View/Comments/CommentsPopup.js +15 -7
- package/src/View/Components/AdaptableDateInput/index.d.ts +1 -1
- package/src/View/Components/AdaptableInput/AdaptableDateInlineInput.d.ts +5 -0
- package/src/View/Components/AdaptableInput/AdaptableDateInlineInput.js +46 -0
- package/src/View/Components/AdaptableObjectList/AdaptableObjectList.js +5 -2
- package/src/View/Components/CellPopup/index.d.ts +1 -0
- package/src/View/Components/CellPopup/index.js +6 -3
- package/src/View/Components/EntityRulesEditor/EntityRulePredicatesEditor/EntityRulePredicatesEditor.d.ts +3 -3
- package/src/View/Components/EntityRulesEditor/index.d.ts +3 -3
- package/src/View/Components/FilterForm/FilterForm.js +20 -12
- package/src/View/Components/FilterForm/QuickFilterForm.js +15 -8
- package/src/View/Components/FilterForm/QuickFilterValues.js +39 -23
- package/src/View/Components/NewScopeComponent.d.ts +5 -5
- package/src/View/Components/NewScopeComponent.js +36 -3
- package/src/View/Components/Popups/AdaptablePopup/AdaptablePopup.js +4 -1
- package/src/View/Components/Popups/AdaptablePopup/useMenuItems.js +10 -1
- package/src/View/Components/Popups/GridCellPopup/GridCellPopup.js +7 -10
- package/src/View/Components/RangesComponent.d.ts +2 -2
- package/src/View/Components/RangesComponent.js +1 -1
- package/src/View/Components/Selectors/PermittedValuesSelector.js +1 -1
- package/src/View/Components/SharedProps/WizardScopeState.d.ts +2 -2
- package/src/View/Components/ValueSelector/index.d.ts +1 -0
- package/src/View/Components/ValueSelector/index.js +2 -2
- package/src/View/CustomSort/Wizard/CustomSortColumnWizardSection.js +1 -1
- package/src/View/DataChangeHistory/DataChangeHistoryGrid.js +4 -2
- package/src/View/DataImport/DataImportWizard/DataImportWizard.js +1 -1
- package/src/View/FormatColumn/Wizard/FormatColumnFormatWizardSection.d.ts +2 -2
- package/src/View/FormatColumn/Wizard/FormatColumnFormatWizardSection.js +20 -7
- package/src/View/FormatColumn/Wizard/FormatColumnRuleWizardSection.js +1 -1
- package/src/View/FormatColumn/Wizard/FormatColumnScopeWizardSection.js +1 -1
- package/src/View/FormatColumn/Wizard/FormatColumnSettingsWizardSection.js +27 -12
- package/src/View/FormatColumn/Wizard/FormatColumnStyleWizardSection.js +1 -1
- package/src/View/FreeTextColumn/FreeTextColumnSummary.js +1 -1
- package/src/View/FreeTextColumn/Wizard/FreeTextColumnWizard.js +3 -1
- package/src/View/GridFilter/GridFilterViewPanel.js +3 -3
- package/src/View/GridFilter/useGridFilterExpressionEditor.js +1 -1
- package/src/View/Layout/LayoutViewPanel.js +2 -1
- package/src/View/Layout/TransposedPopup.js +27 -25
- package/src/View/Layout/Wizard/LayoutWizard.js +38 -3
- package/src/View/Layout/Wizard/sections/ColumnsSection.js +1 -1
- package/src/View/Layout/Wizard/sections/FilterSection.js +1 -1
- package/src/View/Layout/Wizard/sections/RowGroupingSection.js +18 -2
- package/src/View/Layout/Wizard/sections/RowSummarySection.d.ts +9 -0
- package/src/View/Layout/Wizard/sections/RowSummarySection.js +181 -0
- package/src/View/License/LicenseWatermark.js +1 -66
- package/src/View/Note/NotePopup.d.ts +2 -0
- package/src/View/{Notes/NotesPopup.js → Note/NotePopup.js} +16 -11
- package/src/View/PlusMinus/PlusMinusSummary.js +2 -2
- package/src/View/SmartEdit/SmartEditPopup.js +1 -1
- package/src/View/SpecialColumnSettingsWizardStep.js +4 -4
- package/src/View/StyledColumn/Wizard/StyledColumnBadgeSection.js +5 -7
- package/src/View/StyledColumn/Wizard/StyledColumnWizard.js +1 -1
- package/src/View/StyledColumn/Wizard/StyledColumnWizardColumnSection.js +1 -1
- package/src/View/StyledColumn/Wizard/StyledColumnWizardSettingsSection.js +38 -14
- package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/StyledColumnWizardStyleSection.js +1 -1
- package/src/agGrid/ActionColumnRenderer.js +40 -4
- package/src/agGrid/AdaptableAgGrid.d.ts +21 -12
- package/src/agGrid/AdaptableAgGrid.js +313 -225
- package/src/agGrid/AgGridAdapter.d.ts +5 -2
- package/src/agGrid/AgGridAdapter.js +20 -0
- package/src/agGrid/AgGridColumnAdapter.d.ts +1 -3
- package/src/agGrid/AgGridColumnAdapter.js +52 -70
- package/src/agGrid/AgGridMenuAdapter.d.ts +25 -8
- package/src/agGrid/AgGridMenuAdapter.js +405 -74
- package/src/agGrid/AgGridOptionsService.d.ts +4 -1
- package/src/agGrid/AgGridOptionsService.js +22 -0
- package/src/agGrid/BadgeRenderer.d.ts +2 -2
- package/src/agGrid/BadgeRenderer.js +24 -11
- package/src/agGrid/PercentBarRenderer.js +2 -1
- package/src/agGrid/buildSortedColumnStateForLayout.d.ts +7 -0
- package/src/agGrid/buildSortedColumnStateForLayout.js +124 -0
- package/src/agGrid/defaultAdaptableOptions.js +7 -12
- package/src/agGrid/editors/AdaptableDateEditor/index.d.ts +1 -1
- package/src/agGrid/editors/AdaptableDateEditor/index.js +1 -1
- package/src/agGrid/editors/AdaptableNumberEditor/index.d.ts +2 -2
- package/src/agGrid/sortColumnStateForVisibleColumns.d.ts +12 -0
- package/src/agGrid/sortColumnStateForVisibleColumns.js +50 -0
- package/src/agGrid/weightedAverage.d.ts +0 -2
- package/src/agGrid/weightedAverage.js +1 -56
- package/src/components/Accordion.d.ts +7 -0
- package/src/components/Accordion.js +41 -0
- package/src/components/ColorPicker/ColorPicker.d.ts +1 -1
- package/src/components/Datepicker/index.d.ts +1 -1
- package/src/components/Datepicker/index.js +10 -2
- package/src/components/ExpressionEditor/QueryBuilder/QueryPredicateBuilder.js +2 -1
- package/src/components/ExpressionEditor/QueryBuilder/utils.d.ts +0 -1
- package/src/components/ExpressionEditor/QueryBuilder/utils.js +3 -17
- package/src/components/Input/index.d.ts +1 -2
- package/src/components/List/ListGroupItem/index.d.ts +1 -1
- package/src/components/ProgressIndicator/ProgressIndicator.js +15 -6
- package/src/components/Select/Select.d.ts +1 -1
- package/src/components/Select/Select.js +3 -1
- package/src/components/Textarea/index.d.ts +2 -2
- package/src/components/icons/collapse-all.d.ts +3 -0
- package/src/components/icons/collapse-all.js +7 -0
- package/src/components/icons/copy.d.ts +3 -0
- package/src/components/icons/copy.js +7 -0
- package/src/components/icons/csv.d.ts +3 -0
- package/src/components/icons/csv.js +7 -0
- package/src/components/icons/data-object.d.ts +3 -0
- package/src/components/icons/data-object.js +7 -0
- package/src/components/icons/excel.d.ts +3 -0
- package/src/components/icons/excel.js +8 -0
- package/src/components/icons/expand-all.d.ts +3 -0
- package/src/components/icons/expand-all.js +7 -0
- package/src/components/icons/filter-off.d.ts +3 -0
- package/src/components/icons/filter-off.js +7 -0
- package/src/components/icons/grid-info.d.ts +3 -0
- package/src/components/icons/grid-info.js +7 -0
- package/src/components/icons/index.js +24 -0
- package/src/components/icons/note.js +2 -2
- package/src/components/icons/rows.d.ts +3 -0
- package/src/components/icons/rows.js +7 -0
- package/src/components/icons/select-all.d.ts +3 -0
- package/src/components/icons/select-all.js +7 -0
- package/src/components/icons/select-fwd.d.ts +3 -0
- package/src/components/icons/select-fwd.js +7 -0
- package/src/components/icons/select-off.d.ts +3 -0
- package/src/components/icons/select-off.js +7 -0
- package/src/env.js +2 -2
- package/src/metamodel/adaptable.metamodel.d.ts +230 -116
- package/src/metamodel/adaptable.metamodel.js +1 -9411
- package/src/parser/src/parser.js +576 -553
- package/src/parser/src/predicate/mapExpressionToQlPredicate.js +1 -1
- package/src/parser/src/predicate/mapQlPredicateToExpression.js +3 -4
- package/src/parser/src/types.d.ts +7 -2
- package/src/parser/src/types.js +1 -2
- package/src/types.d.ts +32 -25
- package/tsconfig.cjs.tsbuildinfo +1 -1
- package/src/AdaptableOptions/MenuOptions.d.ts +0 -234
- package/src/AdaptableOptions/MenuOptions.js +0 -99
- package/src/Api/Events/CommentsChangedInfo.d.ts +0 -5
- package/src/Api/Implementation/NotesApiImpl.d.ts +0 -14
- package/src/Api/Implementation/NotesApiImpl.js +0 -40
- package/src/Api/Implementation/ScopeApiImpl.d.ts +0 -31
- package/src/Api/NotesApi.d.ts +0 -48
- package/src/PredefinedConfig/CellAddress.d.ts +0 -13
- package/src/PredefinedConfig/CellAddress.js +0 -5
- package/src/Redux/ActionsReducers/NotesRedux.d.ts +0 -38
- package/src/Strategy/CommentsModule.d.ts +0 -17
- package/src/Strategy/CommentsModule.js +0 -83
- package/src/Strategy/NotesModule.d.ts +0 -10
- package/src/Strategy/NotesModule.js +0 -62
- package/src/View/Components/ScopeComponent.d.ts +0 -24
- package/src/View/Components/ScopeComponent.js +0 -138
- package/src/View/Export/Wizard/ReportScopeWizard.d.ts +0 -17
- package/src/View/Export/Wizard/ReportScopeWizard.js +0 -52
- package/src/View/Notes/NotesPopup.d.ts +0 -2
- /package/src/{Api/Events/CommentsChangedInfo.js → AdaptableOptions/ColumnMenuOptions.js} +0 -0
- /package/src/{Api/NotesApi.js → AdaptableOptions/ContextMenuOptions.js} +0 -0
- /package/src/Api/{ScopeApi.js → ColumnMenuApi.js} +0 -0
- /package/src/{PredefinedConfig/Common/AdaptableScope.js → Api/ColumnScopeApi.js} +0 -0
- /package/src/{PredefinedConfig/NotesState.js → Api/ContextMenuApi.js} +0 -0
- /package/src/View/{Notes → Note}/NoteEditor.d.ts +0 -0
- /package/src/View/{Notes → Note}/NoteEditor.js +0 -0
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { AdaptableApi } from '../../Api/AdaptableApi';
|
|
3
3
|
import { CellColorRange, ColumnComparison, NumericStyledColumn } from '../../PredefinedConfig/StyledColumnState';
|
|
4
|
-
import {
|
|
4
|
+
import { ColumnScope } from '../../PredefinedConfig/Common/ColumnScope';
|
|
5
5
|
export interface RangesComponentProps extends React.ClassAttributes<RangesComponent> {
|
|
6
6
|
ranges: CellColorRange[];
|
|
7
7
|
columnComparison?: ColumnComparison;
|
|
8
8
|
rangeValueType: NumericStyledColumn['RangeValueType'];
|
|
9
9
|
onRangeValueTypeChange: (rangeValueType: NumericStyledColumn['RangeValueType']) => void;
|
|
10
|
-
scope:
|
|
10
|
+
scope: ColumnScope;
|
|
11
11
|
api: AdaptableApi;
|
|
12
12
|
showRangeDirection: boolean;
|
|
13
13
|
updateRanges: (ranges: CellColorRange[]) => void;
|
|
@@ -118,7 +118,7 @@ class RangesComponent extends React.Component {
|
|
|
118
118
|
this.props.updateColumnComparison(columnComparison);
|
|
119
119
|
}
|
|
120
120
|
else {
|
|
121
|
-
const ranges = this.props.api.
|
|
121
|
+
const ranges = this.props.api.columnScopeApi.createCellColorRangesForScope(this.props.scope);
|
|
122
122
|
this.setState({
|
|
123
123
|
rangesType: 'Standard',
|
|
124
124
|
});
|
|
@@ -68,6 +68,6 @@ const PermittedValuesSelector = function (props) {
|
|
|
68
68
|
handleSingleValueChange(value);
|
|
69
69
|
}
|
|
70
70
|
};
|
|
71
|
-
return (React.createElement(Select_1.Select, { isMulti: props.isMulti, className: props.className, disabled: props.disabled, "data-name": "permitted-values-selector", placeholder: props.placeholder || (props.allowNewValues ? 'Select or type new value' : 'Select value'), isCreatable: isCreatable, isClearable: true, options: options,
|
|
71
|
+
return (React.createElement(Select_1.Select, { isMulti: props.isMulti, className: props.className, disabled: props.disabled, "data-name": "permitted-values-selector", placeholder: props.placeholder || (props.allowNewValues ? 'Select or type new value' : 'Select value'), isCreatable: isCreatable, isClearable: true, options: options, isLoading: isLoading, onInputChange: setFilter, onChange: handleOnChange, value: props.value }));
|
|
72
72
|
};
|
|
73
73
|
exports.PermittedValuesSelector = PermittedValuesSelector;
|
|
@@ -26,6 +26,7 @@ export type ValueSelectorProps<OPTION_TYPE, ID_TYPE extends number | string> = {
|
|
|
26
26
|
onShowSelectedOnlyChange?: (selectedOnly: boolean) => void;
|
|
27
27
|
isOptionDisabled?: (option: OPTION_TYPE) => boolean;
|
|
28
28
|
disabled?: boolean;
|
|
29
|
+
style?: React.CSSProperties;
|
|
29
30
|
};
|
|
30
31
|
export declare function ValueSelector<OPTION_TYPE, ID_TYPE extends number | string>(props: ValueSelectorProps<OPTION_TYPE, ID_TYPE>): JSX.Element;
|
|
31
32
|
export declare namespace ValueSelector {
|
|
@@ -66,7 +66,7 @@ function ValueSelector(props) {
|
|
|
66
66
|
const label = !allowReorder ? preparedToLabel(option) : null;
|
|
67
67
|
const reorderable = typeof allowReorder === 'function' ? allowReorder(option) : allowReorder;
|
|
68
68
|
const renderNode = (props, dragHandleProps) => {
|
|
69
|
-
return (React.createElement(rebass_1.Flex, Object.assign({ className: `${baseClassName}__option`, alignItems: "center", mt: index ? 1 : 0, key: identifier, backgroundColor: 'primary', padding: 2, "data-index": index, "data-id": identifier, "data-name": "option" }, props),
|
|
69
|
+
return (React.createElement(rebass_1.Flex, Object.assign({ className: `${baseClassName}__option`, alignItems: "center", mt: index ? 1 : 0, key: identifier !== null && identifier !== void 0 ? identifier : index, backgroundColor: 'primary', padding: 2, "data-index": index, "data-id": identifier, "data-name": "option" }, props),
|
|
70
70
|
React.createElement(rebass_1.Flex, { flex: 1, flexDirection: "row", alignItems: "center" },
|
|
71
71
|
reorderable ? (React.createElement(rebass_1.Box, Object.assign({ mr: 3 }, dragHandleProps),
|
|
72
72
|
React.createElement(icons_1.Icon, { name: "drag", style: { cursor: 'grab' } }))) : null,
|
|
@@ -115,7 +115,7 @@ function ValueSelector(props) {
|
|
|
115
115
|
};
|
|
116
116
|
const showOnlySelectedCheckbox = (React.createElement(CheckBox_1.CheckBox, { disabled: !value.length, checked: selectedOnly, onChange: setSelectedOnly }, showSelectedOnlyLabel !== null && showSelectedOnlyLabel !== void 0 ? showSelectedOnlyLabel : 'Show Selected Only'));
|
|
117
117
|
const showSelectedOnlyPosition = (_a = props.showSelectedOnlyPosition) !== null && _a !== void 0 ? _a : 'floating';
|
|
118
|
-
return (React.createElement(rebass_1.Flex, { className: baseClassName, flexDirection: "column", flex: 1 },
|
|
118
|
+
return (React.createElement(rebass_1.Flex, { style: props.style, className: baseClassName, flexDirection: "column", flex: 1 },
|
|
119
119
|
React.createElement(rebass_1.Flex, { mb: 1 },
|
|
120
120
|
showFilterInput && filter ? (React.createElement(AdaptableFormControlTextClear_1.AdaptableFormControlTextClear, { value: searchInputValue, OnTextChange: setSearchInputValue, placeholder: "Type to search", style: { flex: 1, border: 0, margin: 3 } })) : (React.createElement(rebass_1.Box, { flex: 1 })),
|
|
121
121
|
showSelectedOnlyPosition === 'top' && React.createElement(rebass_1.Box, { ml: 20 }, showOnlySelectedCheckbox)),
|
|
@@ -30,7 +30,7 @@ const CustomSortColumnWizardSection = (props) => {
|
|
|
30
30
|
const columnSortComparers = api.optionsApi.getCustomSortOptions().customSortComparers || [];
|
|
31
31
|
const usedColumnIds = [
|
|
32
32
|
...customSorts.map((customSort) => customSort.ColumnId),
|
|
33
|
-
...columnSortComparers.map((comparer) => api.
|
|
33
|
+
...columnSortComparers.map((comparer) => api.columnScopeApi.getColumnIdsInScope(comparer.scope)),
|
|
34
34
|
];
|
|
35
35
|
// filter out used colum ids, but include the current one
|
|
36
36
|
return sortableColumns.filter((column) => {
|
|
@@ -99,7 +99,10 @@ const buildAdaptableOptions = (mainAdaptableInstance, gridOptions, adaptableCont
|
|
|
99
99
|
{
|
|
100
100
|
columnId: 'undoActionColumn',
|
|
101
101
|
friendlyName: ' ',
|
|
102
|
-
|
|
102
|
+
rowScope: {
|
|
103
|
+
ExcludeGroupRows: true,
|
|
104
|
+
ExcludeSummaryRows: true,
|
|
105
|
+
},
|
|
103
106
|
actionColumnSettings: { suppressMenu: true, suppressMovable: true },
|
|
104
107
|
actionColumnButton,
|
|
105
108
|
},
|
|
@@ -213,7 +216,6 @@ const buildGridOptions = (mainAdaptableInstance, changeHistoryLog) => {
|
|
|
213
216
|
},
|
|
214
217
|
autoGroupColumnDef: {
|
|
215
218
|
sortable: true,
|
|
216
|
-
// suppressMenu: true,
|
|
217
219
|
},
|
|
218
220
|
columnDefs: [
|
|
219
221
|
{
|
|
@@ -136,7 +136,7 @@ const DataImportWizard = (props) => {
|
|
|
136
136
|
return [...userDefinedHandlers, ...systemFileHandlers_1.systemFileHandlers];
|
|
137
137
|
}, []);
|
|
138
138
|
const supportedFileFormats = React.useMemo(() => {
|
|
139
|
-
return fileHandlers.map((h) => h.fileExtension).join(', ');
|
|
139
|
+
return [...new Set(fileHandlers.map((h) => h.fileExtension)).values()].join(', ');
|
|
140
140
|
}, [fileHandlers]);
|
|
141
141
|
const readFile = React.useCallback(async (file) => {
|
|
142
142
|
var _a, _b;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { FormatColumn } from '../../../PredefinedConfig/FormatColumnState';
|
|
3
3
|
import { AdaptableFormat } from '../../../PredefinedConfig/Common/AdaptableFormat';
|
|
4
|
-
import {
|
|
4
|
+
import { ColumnScope } from '../../../PredefinedConfig/Common/ColumnScope';
|
|
5
5
|
import { AdaptableApi } from '../../../Api/AdaptableApi';
|
|
6
6
|
export type FormatColumnFormatWizardSectionProps = {
|
|
7
7
|
onChange: (data: FormatColumn) => void;
|
|
@@ -12,5 +12,5 @@ export interface FormatColumnFormatWizardState {
|
|
|
12
12
|
}
|
|
13
13
|
export declare const getFormatColumnFormatSummaryValue: (data: FormatColumn) => string;
|
|
14
14
|
export declare const renderFormatColumnFormatSummary: (data: FormatColumn) => JSX.Element;
|
|
15
|
-
export declare const getFormatDisplayTypeForScope: (scope:
|
|
15
|
+
export declare const getFormatDisplayTypeForScope: (scope: ColumnScope, api: AdaptableApi) => 'Number' | 'Date' | 'String' | undefined;
|
|
16
16
|
export declare const FormatColumnFormatWizardSection: (props: FormatColumnFormatWizardSectionProps) => JSX.Element;
|
|
@@ -149,6 +149,19 @@ const getFormatDisplayTypeForScope = (scope, api) => {
|
|
|
149
149
|
if ('DataTypes' in scope && scope.DataTypes.length == 1 && scope.DataTypes[0] == 'String') {
|
|
150
150
|
return 'String';
|
|
151
151
|
}
|
|
152
|
+
if ('ColumnTypes' in scope && scope.ColumnTypes.length) {
|
|
153
|
+
// need to check if all column with this column type has the same data type and return that particular one
|
|
154
|
+
const columns = scope.ColumnTypes.flatMap((columnType) => {
|
|
155
|
+
return api.columnApi.getColumnsByColumnType(columnType);
|
|
156
|
+
});
|
|
157
|
+
// check if all have the same type
|
|
158
|
+
if (columns.length &&
|
|
159
|
+
columns.every((column) => column.dataType === columns[0].dataType) &&
|
|
160
|
+
// supported data types
|
|
161
|
+
['Number', 'Date', 'String'].includes(columns[0].dataType)) {
|
|
162
|
+
return columns[0].dataType;
|
|
163
|
+
}
|
|
164
|
+
}
|
|
152
165
|
return undefined;
|
|
153
166
|
};
|
|
154
167
|
exports.getFormatDisplayTypeForScope = getFormatDisplayTypeForScope;
|
|
@@ -196,7 +209,7 @@ const renderDateFormat = (data, _onChange, setFormatOption, scopedCustomFormatte
|
|
|
196
209
|
] })))))));
|
|
197
210
|
};
|
|
198
211
|
const renderNumberFormat = (data, onChange, setFormatOption, scopedCustomFormatters, formatColumnApi) => {
|
|
199
|
-
var _a, _b, _c;
|
|
212
|
+
var _a, _b, _c, _d, _e;
|
|
200
213
|
if (data.DisplayFormat.Formatter !== 'NumberFormatter') {
|
|
201
214
|
return null;
|
|
202
215
|
}
|
|
@@ -255,13 +268,13 @@ const renderNumberFormat = (data, onChange, setFormatOption, scopedCustomFormatt
|
|
|
255
268
|
React.createElement(rebass_1.Flex, { flexDirection: "row" },
|
|
256
269
|
React.createElement(FormLayout_1.default, { mr: 3 },
|
|
257
270
|
React.createElement(FormLayout_1.FormRow, { label: "Fraction Separator" },
|
|
258
|
-
React.createElement(Input_1.default, { "data-name": "fraction-separator", value: data.DisplayFormat.Options.FractionSeparator, onChange: (e) => setFormatOption('FractionSeparator', e.currentTarget.value) })),
|
|
271
|
+
React.createElement(Input_1.default, { "data-name": "fraction-separator", value: (_a = data.DisplayFormat.Options.FractionSeparator) !== null && _a !== void 0 ? _a : '', onChange: (e) => setFormatOption('FractionSeparator', e.currentTarget.value) })),
|
|
259
272
|
React.createElement(FormLayout_1.FormRow, { label: "Integer Separator" },
|
|
260
|
-
React.createElement(Input_1.default, { "data-name": "integer-separator", value: data.DisplayFormat.Options.IntegerSeparator, onChange: (e) => setFormatOption('IntegerSeparator', e.currentTarget.value) })),
|
|
273
|
+
React.createElement(Input_1.default, { "data-name": "integer-separator", value: (_b = data.DisplayFormat.Options.IntegerSeparator) !== null && _b !== void 0 ? _b : '', onChange: (e) => setFormatOption('IntegerSeparator', e.currentTarget.value) })),
|
|
261
274
|
React.createElement(FormLayout_1.FormRow, { label: "Prefix" },
|
|
262
|
-
React.createElement(Input_1.default, { "data-name": "prefix", value: (
|
|
275
|
+
React.createElement(Input_1.default, { "data-name": "prefix", value: (_c = data.DisplayFormat.Options.Prefix) !== null && _c !== void 0 ? _c : '', onChange: (e) => setFormatOption('Prefix', e.currentTarget.value) })),
|
|
263
276
|
React.createElement(FormLayout_1.FormRow, { label: "Suffix" },
|
|
264
|
-
React.createElement(Input_1.default, { "data-name": "suffix", value: (
|
|
277
|
+
React.createElement(Input_1.default, { "data-name": "suffix", value: (_d = data.DisplayFormat.Options.Suffix) !== null && _d !== void 0 ? _d : '', onChange: (e) => setFormatOption('Suffix', e.currentTarget.value) })),
|
|
265
278
|
React.createElement(FormLayout_1.FormRow, { label: "Truncate" },
|
|
266
279
|
React.createElement(CheckBox_1.CheckBox, { "data-name": "truncate-checkbox", checked: data.DisplayFormat.Options.Truncate, onChange: (checked) => setFormatOption('Truncate', checked) })),
|
|
267
280
|
React.createElement(FormLayout_1.FormRow, { label: "Ceiling" },
|
|
@@ -286,7 +299,7 @@ const renderNumberFormat = (data, onChange, setFormatOption, scopedCustomFormatt
|
|
|
286
299
|
React.createElement(Input_1.default, { "data-name": "multiplier", type: "number", value: data.DisplayFormat.Options.Multiplier, onChange: (e) => setFormatOption('Multiplier', Number(e.currentTarget.value)) })),
|
|
287
300
|
' ',
|
|
288
301
|
React.createElement(FormLayout_1.FormRow, { label: "Content" },
|
|
289
|
-
React.createElement(Input_1.default, { "data-name": "content", value: (
|
|
302
|
+
React.createElement(Input_1.default, { "data-name": "content", value: (_e = data.DisplayFormat.Options.Content) !== null && _e !== void 0 ? _e : '', onChange: (e) => setFormatOption('Content', e.currentTarget.value) })),
|
|
290
303
|
' ',
|
|
291
304
|
React.createElement(FormLayout_1.FormRow, { label: "Parentheses" },
|
|
292
305
|
React.createElement(CheckBox_1.CheckBox, { "data-name": "parentheses-checkbox", checked: data.DisplayFormat.Options.Parentheses, onChange: (checked) => setFormatOption('Parentheses', checked) })),
|
|
@@ -404,7 +417,7 @@ const FormatColumnFormatWizardSection = (props) => {
|
|
|
404
417
|
update({ DisplayFormat });
|
|
405
418
|
};
|
|
406
419
|
const Type = data.DisplayFormat && data.DisplayFormat.Formatter;
|
|
407
|
-
const customScopedFormatters = customDisplayFormatters.filter((displayFormatter) => adaptable.api.
|
|
420
|
+
const customScopedFormatters = customDisplayFormatters.filter((displayFormatter) => adaptable.api.columnScopeApi.isScopeInScope(data.Scope, displayFormatter.scope));
|
|
408
421
|
if (Type === 'NumberFormatter') {
|
|
409
422
|
return renderNumberFormat(data, update, setFormatOption, customScopedFormatters, formatColumnApi);
|
|
410
423
|
}
|
|
@@ -9,7 +9,7 @@ function FormatColumnRuleWizardSection(props) {
|
|
|
9
9
|
const { data, api, moduleInfo } = (0, OnePageAdaptableWizard_1.useOnePageAdaptableWizardContext)();
|
|
10
10
|
return (React.createElement(EntityRulesEditor_1.EntityRulesEditor, { module: moduleInfo.ModuleName, defaultPredicateId: props.defaultPredicateId,
|
|
11
11
|
// TODO see what is this
|
|
12
|
-
predicateDefs: api.formatColumnApi.internalApi.getFormatColumnDefsForScope(data.Scope), getPredicateDefsForColId: (colId) => api.formatColumnApi.internalApi.getFormatColumnDefsForScope({ ColumnIds: [colId] }), showNoRule: true, showBoolean: true, showAggregation: false, showObservable: false, showPredicate: !api.
|
|
12
|
+
predicateDefs: api.formatColumnApi.internalApi.getFormatColumnDefsForScope(data.Scope), getPredicateDefsForColId: (colId) => api.formatColumnApi.internalApi.getFormatColumnDefsForScope({ ColumnIds: [colId] }), showNoRule: true, showBoolean: true, showAggregation: false, showObservable: false, showPredicate: !api.columnScopeApi.scopeIsAll(data.Scope), data: data, onChange: (formatColumn) => props.onChange(formatColumn), descriptions: {
|
|
13
13
|
selectPredicate: 'Create a Format Column Rule - to be applied when data changes',
|
|
14
14
|
useBooleanQuery: (React.createElement(React.Fragment, null,
|
|
15
15
|
"Use an BooleanQuery if ",
|
|
@@ -22,7 +22,7 @@ const FormatColumnScopeWizardSection = (props) => {
|
|
|
22
22
|
}, scope: data.Scope, updateScope: (Scope) => {
|
|
23
23
|
var _a, _b;
|
|
24
24
|
const newData = Object.assign(Object.assign({}, data), { Scope });
|
|
25
|
-
const wholeRow = api.
|
|
25
|
+
const wholeRow = api.columnScopeApi.scopeIsAll(Scope);
|
|
26
26
|
if ((_b = (_a = newData.Rule) === null || _a === void 0 ? void 0 : _a.Predicates) === null || _b === void 0 ? void 0 : _b.length) {
|
|
27
27
|
if (wholeRow) {
|
|
28
28
|
// if scope is whole row, a predicate cannot be present, so we set the rule
|
|
@@ -11,23 +11,26 @@ const OnePageAdaptableWizard_1 = require("../../Wizard/OnePageAdaptableWizard");
|
|
|
11
11
|
const Tag_1 = require("../../../components/Tag");
|
|
12
12
|
const ToggleGroup_1 = require("../../../components/Toggle/ToggleGroup");
|
|
13
13
|
const Toggle_1 = require("../../../components/Toggle/Toggle");
|
|
14
|
-
let alignmentOptions = [
|
|
15
|
-
{ value: 'Left', label: 'Left' },
|
|
16
|
-
{ value: 'Right', label: 'Right' },
|
|
17
|
-
{ value: 'Center', label: 'Center' },
|
|
18
|
-
];
|
|
19
14
|
const renderFormatColumnSettingsSummary = (data) => {
|
|
20
|
-
var _a;
|
|
15
|
+
var _a, _b, _c, _d;
|
|
21
16
|
return (React.createElement(rebass_1.Box, { padding: 2 },
|
|
22
17
|
React.createElement(rebass_1.Text, null,
|
|
23
18
|
"Cell alignment ",
|
|
24
19
|
React.createElement(Tag_1.Tag, null, (_a = data.CellAlignment) !== null && _a !== void 0 ? _a : 'default')),
|
|
25
20
|
React.createElement(rebass_1.Text, { mt: 3 },
|
|
26
|
-
"
|
|
27
|
-
React.createElement(Tag_1.Tag, null, data.
|
|
21
|
+
"Data Rows ",
|
|
22
|
+
React.createElement(Tag_1.Tag, null, ((_b = data.RowScope) === null || _b === void 0 ? void 0 : _b.ExcludeDataRows) ? 'no' : 'yes')),
|
|
23
|
+
' ',
|
|
24
|
+
React.createElement(rebass_1.Text, { mt: 3 },
|
|
25
|
+
"Group Rows ",
|
|
26
|
+
React.createElement(Tag_1.Tag, null, ((_c = data.RowScope) === null || _c === void 0 ? void 0 : _c.ExcludeGroupRows) ? 'no' : 'yes')),
|
|
27
|
+
React.createElement(rebass_1.Text, { mt: 3 },
|
|
28
|
+
"Summary Rows ",
|
|
29
|
+
React.createElement(Tag_1.Tag, null, ((_d = data.RowScope) === null || _d === void 0 ? void 0 : _d.ExcludeSummaryRows) ? 'no' : 'yes'))));
|
|
28
30
|
};
|
|
29
31
|
exports.renderFormatColumnSettingsSummary = renderFormatColumnSettingsSummary;
|
|
30
32
|
const FormatColumnSettingsWizardSection = (props) => {
|
|
33
|
+
var _a, _b, _c;
|
|
31
34
|
const { data } = (0, OnePageAdaptableWizard_1.useOnePageAdaptableWizardContext)();
|
|
32
35
|
const onCellAlignmentSelectChanged = (CellAlignment) => {
|
|
33
36
|
const newData = Object.assign(Object.assign({}, data), { CellAlignment });
|
|
@@ -36,8 +39,14 @@ const FormatColumnSettingsWizardSection = (props) => {
|
|
|
36
39
|
}
|
|
37
40
|
props.onChange(newData);
|
|
38
41
|
};
|
|
39
|
-
const
|
|
40
|
-
props.onChange(Object.assign(Object.assign({}, data), {
|
|
42
|
+
const onExcludeDataRowsChanged = (ExcludeDataRows) => {
|
|
43
|
+
props.onChange(Object.assign(Object.assign({}, data), { RowScope: Object.assign(Object.assign({}, data.RowScope), { ExcludeDataRows }) }));
|
|
44
|
+
};
|
|
45
|
+
const onExcludeGroupedRowsChanged = (ExcludeGroupedRows) => {
|
|
46
|
+
props.onChange(Object.assign(Object.assign({}, data), { RowScope: Object.assign(Object.assign({}, data.RowScope), { ExcludeGroupRows: ExcludeGroupedRows }) }));
|
|
47
|
+
};
|
|
48
|
+
const onExcludeSummaryRowsChanged = (ExcludeSummaryRows) => {
|
|
49
|
+
props.onChange(Object.assign(Object.assign({}, data), { RowScope: Object.assign(Object.assign({}, data.RowScope), { ExcludeSummaryRows }) }));
|
|
41
50
|
};
|
|
42
51
|
return (React.createElement(Tabs_1.Tabs, null,
|
|
43
52
|
React.createElement(Tabs_1.Tabs.Tab, null, "Settings"),
|
|
@@ -55,8 +64,14 @@ const FormatColumnSettingsWizardSection = (props) => {
|
|
|
55
64
|
React.createElement(Toggle_1.Toggle, { icon: "align-right", pressed: data.CellAlignment === 'Right', onPressedChange: (pressed) => pressed
|
|
56
65
|
? onCellAlignmentSelectChanged('Right')
|
|
57
66
|
: onCellAlignmentSelectChanged(null) }))),
|
|
58
|
-
React.createElement(FormLayout_1.FormRow, { label: "
|
|
67
|
+
React.createElement(FormLayout_1.FormRow, { label: "Exclude Data Rows:" },
|
|
68
|
+
React.createElement(rebass_1.Flex, { alignItems: "center", marginLeft: 2 },
|
|
69
|
+
React.createElement(CheckBox_1.CheckBox, { "data-name": "exclude-data-rows-checkbox", checked: (_a = data.RowScope) === null || _a === void 0 ? void 0 : _a.ExcludeDataRows, onChange: onExcludeDataRowsChanged, mr: 2 }))),
|
|
70
|
+
React.createElement(FormLayout_1.FormRow, { label: "Exclude Group Rows:" },
|
|
71
|
+
React.createElement(rebass_1.Flex, { alignItems: "center", marginLeft: 2 },
|
|
72
|
+
React.createElement(CheckBox_1.CheckBox, { "data-name": "exclude-grouped-rows-checkbox", checked: (_b = data.RowScope) === null || _b === void 0 ? void 0 : _b.ExcludeGroupRows, onChange: onExcludeGroupedRowsChanged, mr: 2 }))),
|
|
73
|
+
React.createElement(FormLayout_1.FormRow, { label: "Exclude Row Summaries:" },
|
|
59
74
|
React.createElement(rebass_1.Flex, { alignItems: "center", marginLeft: 2 },
|
|
60
|
-
React.createElement(CheckBox_1.CheckBox, { "data-name": "
|
|
75
|
+
React.createElement(CheckBox_1.CheckBox, { "data-name": "exclude-summary-rows-checkbox", checked: (_c = data.RowScope) === null || _c === void 0 ? void 0 : _c.ExcludeSummaryRows, onChange: onExcludeSummaryRowsChanged, mr: 2 }))))))));
|
|
61
76
|
};
|
|
62
77
|
exports.FormatColumnSettingsWizardSection = FormatColumnSettingsWizardSection;
|
|
@@ -13,7 +13,7 @@ const isFormatColumnStyleValid = (data, api) => {
|
|
|
13
13
|
UIHelper_1.default.IsEmptyStyle(data.Style) &&
|
|
14
14
|
data.DisplayFormat === undefined &&
|
|
15
15
|
data.CellAlignment === undefined &&
|
|
16
|
-
!api.
|
|
16
|
+
!api.columnScopeApi.isSingleBooleanColumnScope(data.Scope)) {
|
|
17
17
|
return 'No format applied';
|
|
18
18
|
}
|
|
19
19
|
return true;
|
|
@@ -49,7 +49,7 @@ class FreeTextColumnSummaryComponent extends React.Component {
|
|
|
49
49
|
this.state.editedAdaptableObject && (React.createElement(FreeTextColumnWizard_1.FreeTextColumnWizard, { moduleInfo: this.props.moduleInfo, data: this.state.editedAdaptableObject, configEntities: this.props.FreeTextColumns, onCloseWizard: () => this.onCloseWizard(), onFinishWizard: this.onFinishWizard }))));
|
|
50
50
|
}
|
|
51
51
|
onNew() {
|
|
52
|
-
let configEntity = ObjectFactory_1.ObjectFactory.CreateEmptyFreeTextColumn();
|
|
52
|
+
let configEntity = ObjectFactory_1.ObjectFactory.CreateEmptyFreeTextColumn(this.props.api.gridApi.internalApi.deriveSpecialColumnSettingsFromAgGridDefaultColDef());
|
|
53
53
|
configEntity.ColumnId = this.props.summarisedColumn.columnId;
|
|
54
54
|
this.setState({
|
|
55
55
|
editedAdaptableObject: configEntity,
|
|
@@ -12,8 +12,10 @@ const ObjectFactory_1 = tslib_1.__importDefault(require("../../../Utilities/Obje
|
|
|
12
12
|
const FreeTextColumnRedux = tslib_1.__importStar(require("../../../Redux/ActionsReducers/FreeTextColumnRedux"));
|
|
13
13
|
const react_redux_1 = require("react-redux");
|
|
14
14
|
const ObjectTagsWizardSection_1 = require("../../Wizard/ObjectTagsWizardSection");
|
|
15
|
+
const AdaptableContext_1 = require("../../AdaptableContext");
|
|
15
16
|
const FreeTextColumnWizard = (props) => {
|
|
16
17
|
var _a;
|
|
18
|
+
const adaptable = (0, AdaptableContext_1.useAdaptable)();
|
|
17
19
|
const allFreeTextColumns = (0, react_redux_1.useSelector)((state) => state.FreeTextColumn.FreeTextColumns);
|
|
18
20
|
const [freeTextColumn, setFreeTextColumn] = (0, react_1.useState)(() => {
|
|
19
21
|
var _a, _b;
|
|
@@ -23,7 +25,7 @@ const FreeTextColumnWizard = (props) => {
|
|
|
23
25
|
if (((_a = props.popupParams) === null || _a === void 0 ? void 0 : _a.action) === 'Edit' && ((_b = props.popupParams) === null || _b === void 0 ? void 0 : _b.column)) {
|
|
24
26
|
return allFreeTextColumns.find((column) => column.ColumnId === props.popupParams.column.columnId);
|
|
25
27
|
}
|
|
26
|
-
return ObjectFactory_1.default.CreateEmptyFreeTextColumn();
|
|
28
|
+
return ObjectFactory_1.default.CreateEmptyFreeTextColumn(adaptable.api.gridApi.internalApi.deriveSpecialColumnSettingsFromAgGridDefaultColDef());
|
|
27
29
|
});
|
|
28
30
|
const dispatch = (0, react_redux_1.useDispatch)();
|
|
29
31
|
const isEdit = props.data || ((_a = props.popupParams) === null || _a === void 0 ? void 0 : _a.action) === 'Edit';
|
|
@@ -53,7 +53,7 @@ const QueryViewPanelComponent = (props) => {
|
|
|
53
53
|
paddingTop: 6,
|
|
54
54
|
overflow: 'hidden',
|
|
55
55
|
zIndex: 100,
|
|
56
|
-
},
|
|
56
|
+
}, placeholder: "Grid Filter", onChange: (x) => setExpression(x.target.value), value: expression })),
|
|
57
57
|
isExpressionValid && (React.createElement(ButtonPlay_1.ButtonPlay, { onClick: () => runQuery(), tooltip: '', accessLevel: gridFilterAccessLevel, variant: "text", tone: "neutral", disabled: disabled || expression == '' || expression == (gridFilter === null || gridFilter === void 0 ? void 0 : gridFilter.Expression), marginRight: 1 })),
|
|
58
58
|
gridFilter && !isExpressionValid && (React.createElement(ButtonInvalid_1.ButtonInvalid, { variant: "text", tone: "neutral", tooltip: "Invalid Grid Filter", marginRight: 1 })),
|
|
59
59
|
' ',
|
|
@@ -79,11 +79,11 @@ const QueryViewPanelComponent = (props) => {
|
|
|
79
79
|
zIndex: 100,
|
|
80
80
|
height: '100%',
|
|
81
81
|
overflow: 'hidden',
|
|
82
|
-
},
|
|
82
|
+
}, placeholder: "Grid Filter", onChange: (x) => setExpression(x.target.value), value: expression }))));
|
|
83
83
|
};
|
|
84
84
|
const saveButton = (React.createElement(ButtonSave_1.ButtonSave, { onClick: () => saveQuery(), tooltip: "Save as Named Query", accessLevel: namedQueryModuleAccessLevel, disabled: disabled || !isExpressionValid || isExpressionNamedQuery || expression == '', variant: "text", tone: "neutral", marginRight: 1 }));
|
|
85
85
|
const suspendButton = (React.createElement(ButtonPause_1.ButtonPause, { onClick: () => suspendGridFilter(), tooltip: "Suspend Grid Filter", accessLevel: gridFilterAccessLevel, disabled: disabled || !isExpressionValid, variant: "text", tone: "neutral", marginRight: 1 }));
|
|
86
|
-
const unSuspendButton = (React.createElement(ButtonUnsuspend_1.ButtonUnsuspend, { onClick: () => unSuspendGridFilter(), tooltip: "Unsuspend Grid Filter", accessLevel: gridFilterAccessLevel, disabled:
|
|
86
|
+
const unSuspendButton = (React.createElement(ButtonUnsuspend_1.ButtonUnsuspend, { onClick: () => unSuspendGridFilter(), tooltip: "Unsuspend Grid Filter", accessLevel: gridFilterAccessLevel, disabled: !isExpressionValid, variant: "text", tone: "neutral", marginRight: 1 }));
|
|
87
87
|
const namedQuerySelector = (React.createElement(NamedQuerySelector_1.NamedQuerySelector, { namedQueries: namedQueries, cachedQueries: cachedQueries, currentQuery: gridFilter === null || gridFilter === void 0 ? void 0 : gridFilter.Expression, onSelect: (query) => runQuery(query), setGridFilterExpression: (query) => setGridFilterExpression(query) }));
|
|
88
88
|
const columnsDropdown = (React.createElement(DropdownButton_1.default, { disabled: disabled, accessLevel: gridFilterAccessLevel, variant: "text", items: availableColumns, marginRight: 1, tooltip: "Pick Columns" },
|
|
89
89
|
React.createElement(icons_1.Icon, { name: 'list' })));
|
|
@@ -63,7 +63,7 @@ const useGridFilterExpressionEditor = () => {
|
|
|
63
63
|
const runQuery = (newExpression = expression) => {
|
|
64
64
|
if (StringExtensions_1.default.IsNullOrEmpty(newExpression) &&
|
|
65
65
|
StringExtensions_1.default.IsNotNullOrEmpty(gridFilter === null || gridFilter === void 0 ? void 0 : gridFilter.Expression)) {
|
|
66
|
-
// user pressed enter key with an empty input => clear existing
|
|
66
|
+
// user pressed enter key with an empty input => clear existing expression
|
|
67
67
|
adaptable.api.gridFilterApi.setGridFilterExpression('');
|
|
68
68
|
return;
|
|
69
69
|
}
|
|
@@ -29,8 +29,9 @@ class LayoutViewPanelComponent extends React.Component {
|
|
|
29
29
|
return Object.assign(Object.assign({}, layout), { label: layout.Name, value: layout.Name, onClick: () => this.props.onSelectLayout(layout.Name) });
|
|
30
30
|
});
|
|
31
31
|
const elementType = this.props.viewType === 'Toolbar' ? 'DashboardToolbar' : 'ToolPanel';
|
|
32
|
+
let layoutSelectStyle = elementType === 'ToolPanel' ? { minWidth: '100%' } : {};
|
|
32
33
|
return (React.createElement(rebass_1.Flex, { flexDirection: "row", className: `ab-${elementType}__Layout__wrap`, flexWrap: this.props.viewType === 'ToolPanel' ? 'wrap' : 'nowrap' },
|
|
33
|
-
React.createElement(rebass_1.Flex, { flex: 1 },
|
|
34
|
+
React.createElement(rebass_1.Flex, { style: layoutSelectStyle, flex: 1 },
|
|
34
35
|
React.createElement(Select_1.Select, { style: { width: '100%' }, options: availableLayoutOptions, className: `ab-${elementType}__Layout__select`, value: layoutEntity ? layoutEntity.Name : null, onChange: (layout) => this.props.onSelectLayout(layout) })),
|
|
35
36
|
React.createElement(rebass_1.Flex, { flexDirection: "row", className: (0, join_1.default)(this.props.accessLevel == 'ReadOnly' ? GeneralConstants.READ_ONLY_STYLE : '', `ab-${elementType}__Layout__wrap`) },
|
|
36
37
|
isManualSaveLayout && (React.createElement(ButtonSave_1.ButtonSave, { className: `ab-${elementType}__Layout__save`, onClick: () => this.onSaveLayout(), tooltip: "Save Changes to Current Layout", disabled: !this.props.CanSave, accessLevel: accessLevel })),
|
|
@@ -8,23 +8,24 @@ const FormLayout_1 = tslib_1.__importStar(require("../../components/FormLayout")
|
|
|
8
8
|
const Panel_1 = tslib_1.__importDefault(require("../../components/Panel"));
|
|
9
9
|
const AdaptableContext_1 = require("../AdaptableContext");
|
|
10
10
|
const ColumnSelector_1 = require("../Components/Selectors/ColumnSelector");
|
|
11
|
+
const AdaptableAgGrid_1 = require("../../agGrid/AdaptableAgGrid");
|
|
11
12
|
const TransposedPopup = (props) => {
|
|
12
13
|
const adaptable = (0, AdaptableContext_1.useAdaptable)();
|
|
14
|
+
const { transposedColumnId, hideTransposedColumn, visibleColumns, visibleRows, autosize } = props.popupProps;
|
|
13
15
|
const rowNodes = React.useMemo(() => {
|
|
14
|
-
return
|
|
16
|
+
return props.popupProps.visibleRows
|
|
17
|
+
? adaptable.api.gridApi.getVisibleRowNodes()
|
|
18
|
+
: adaptable.api.gridApi.getAllRowNodes();
|
|
15
19
|
}, [
|
|
16
|
-
// can be later triggered by
|
|
20
|
+
// can be later triggered by tickng data
|
|
17
21
|
]);
|
|
18
|
-
const { transposedColumnId, hideTransposedColumn = true } = props.popupProps;
|
|
19
22
|
const primaryKey = adaptable.api.optionsApi.getPrimaryKey();
|
|
20
|
-
|
|
21
|
-
const transposeByColumnId = primaryKey;
|
|
22
|
-
// Only used to show nice values a the top of the grid, istead on the value
|
|
23
|
-
// of the primarykey
|
|
24
|
-
const [synteticTransposedByColumnId, setSynteticTransposedByColumnId] = React.useState(transposedColumnId !== null && transposedColumnId !== void 0 ? transposedColumnId : primaryKey);
|
|
23
|
+
const [syntheticTransposedByColumnId, setSyntheticTransposedByColumnId] = React.useState(transposedColumnId);
|
|
25
24
|
const columns = React.useMemo(() => {
|
|
26
25
|
// customisable
|
|
27
|
-
return
|
|
26
|
+
return visibleColumns
|
|
27
|
+
? adaptable.api.columnApi.getVisibleColumns()
|
|
28
|
+
: adaptable.api.columnApi.getColumns();
|
|
28
29
|
}, []);
|
|
29
30
|
const adaptableContainerId = 'transposed-adaptable-container';
|
|
30
31
|
const agGridContainerId = 'transposed-adaptable-ag-grid-container';
|
|
@@ -43,9 +44,10 @@ const TransposedPopup = (props) => {
|
|
|
43
44
|
for (const row of rowNodes) {
|
|
44
45
|
// we force the col-ids to be strings, easer to work with
|
|
45
46
|
//row[transposeByColumnId] + '';
|
|
46
|
-
const colId = adaptable.api.gridApi.getNormalisedValueFromRowNode(row,
|
|
47
|
+
const colId = adaptable.api.gridApi.getNormalisedValueFromRowNode(row, primaryKey) + '';
|
|
47
48
|
//row[synteticTransposedByColumnId] + '';
|
|
48
|
-
const header = adaptable.api.gridApi.getNormalisedValueFromRowNode(row,
|
|
49
|
+
const header = adaptable.api.gridApi.getNormalisedValueFromRowNode(row, syntheticTransposedByColumnId) +
|
|
50
|
+
'';
|
|
49
51
|
transposedColumns.push({
|
|
50
52
|
colId,
|
|
51
53
|
header,
|
|
@@ -55,7 +57,7 @@ const TransposedPopup = (props) => {
|
|
|
55
57
|
/**
|
|
56
58
|
* We can hide the transposed column, if we want
|
|
57
59
|
*/
|
|
58
|
-
if (hideTransposedColumn && column.columnId ===
|
|
60
|
+
if (hideTransposedColumn && column.columnId === syntheticTransposedByColumnId) {
|
|
59
61
|
continue;
|
|
60
62
|
}
|
|
61
63
|
const transposedRow = {
|
|
@@ -66,7 +68,7 @@ const TransposedPopup = (props) => {
|
|
|
66
68
|
};
|
|
67
69
|
for (let row of rowNodes) {
|
|
68
70
|
// [transposed-by-column-value[n]]: [other column value[n]]
|
|
69
|
-
const key = adaptable.api.gridApi.getNormalisedValueFromRowNode(row,
|
|
71
|
+
const key = adaptable.api.gridApi.getNormalisedValueFromRowNode(row, primaryKey);
|
|
70
72
|
// row[column.field]
|
|
71
73
|
let value = adaptable.api.gridApi.getDisplayValueFromRowNode(row, column.columnId);
|
|
72
74
|
if (value instanceof Date) {
|
|
@@ -80,7 +82,7 @@ const TransposedPopup = (props) => {
|
|
|
80
82
|
transposedColumns,
|
|
81
83
|
transposedRows,
|
|
82
84
|
};
|
|
83
|
-
}, [rowNodes, primaryKey,
|
|
85
|
+
}, [rowNodes, primaryKey, syntheticTransposedByColumnId]);
|
|
84
86
|
React.useEffect(() => {
|
|
85
87
|
// Mounting in an effect, so the nodes are rendered/available
|
|
86
88
|
const hostAdaptableOptions = adaptable.adaptableOptions;
|
|
@@ -98,7 +100,7 @@ const TransposedPopup = (props) => {
|
|
|
98
100
|
},
|
|
99
101
|
layoutOptions: {
|
|
100
102
|
createDefaultLayout: false,
|
|
101
|
-
autoSizeColumnsInLayout:
|
|
103
|
+
autoSizeColumnsInLayout: autosize,
|
|
102
104
|
},
|
|
103
105
|
predefinedConfig: {
|
|
104
106
|
Layout: {
|
|
@@ -124,7 +126,7 @@ const TransposedPopup = (props) => {
|
|
|
124
126
|
};
|
|
125
127
|
const firstColumn = {
|
|
126
128
|
field: transposedFirstColumnHeader,
|
|
127
|
-
headerName: adaptable.api.columnApi.getFriendlyNameForColumnId(
|
|
129
|
+
headerName: adaptable.api.columnApi.getFriendlyNameForColumnId(syntheticTransposedByColumnId),
|
|
128
130
|
};
|
|
129
131
|
const agGridOptions = {
|
|
130
132
|
suppressLoadingOverlay: true,
|
|
@@ -159,14 +161,14 @@ const TransposedPopup = (props) => {
|
|
|
159
161
|
sideBar: false,
|
|
160
162
|
};
|
|
161
163
|
const modules = adaptable.getAgGridRegisteredModules();
|
|
162
|
-
const adaptableInitFn = Object.getPrototypeOf(adaptable).constructor.init;
|
|
163
|
-
const agGridConfig = {
|
|
164
|
-
gridOptions: agGridOptions,
|
|
165
|
-
modules: modules,
|
|
166
|
-
};
|
|
167
164
|
let transposedAdaptableApi;
|
|
168
165
|
(async () => {
|
|
169
|
-
transposedAdaptableApi = await
|
|
166
|
+
transposedAdaptableApi = await AdaptableAgGrid_1.AdaptableAgGrid._initInternal({
|
|
167
|
+
variant: 'vanilla',
|
|
168
|
+
adaptableOptions,
|
|
169
|
+
gridOptions: agGridOptions,
|
|
170
|
+
modules,
|
|
171
|
+
});
|
|
170
172
|
adaptable.api.eventApi.on('ThemeChanged', (event) => {
|
|
171
173
|
transposedAdaptableApi.themeApi.loadTheme(typeof event.theme === 'object' ? event.theme.Name : event.theme);
|
|
172
174
|
});
|
|
@@ -176,7 +178,7 @@ const TransposedPopup = (props) => {
|
|
|
176
178
|
transposedAdaptableApi.destroy();
|
|
177
179
|
}
|
|
178
180
|
};
|
|
179
|
-
}, [
|
|
181
|
+
}, [syntheticTransposedByColumnId]);
|
|
180
182
|
/**
|
|
181
183
|
* Need to get all data, manualy pivot the grid using the primary key.
|
|
182
184
|
*
|
|
@@ -188,8 +190,8 @@ const TransposedPopup = (props) => {
|
|
|
188
190
|
React.createElement(Panel_1.default, null,
|
|
189
191
|
React.createElement(FormLayout_1.default, null,
|
|
190
192
|
React.createElement(FormLayout_1.FormRow, { label: "Elevated Column" },
|
|
191
|
-
React.createElement(ColumnSelector_1.ColumnSelector, { value:
|
|
192
|
-
|
|
193
|
+
React.createElement(ColumnSelector_1.ColumnSelector, { value: syntheticTransposedByColumnId, onChange: (colId) => {
|
|
194
|
+
setSyntheticTransposedByColumnId(colId);
|
|
193
195
|
} })))),
|
|
194
196
|
React.createElement(rebass_1.Flex, { height: "100%" },
|
|
195
197
|
React.createElement(rebass_1.Box, { id: "transposed-adaptable-container" }),
|
|
@@ -18,6 +18,8 @@ const AggregationsSection_1 = require("./sections/AggregationsSection");
|
|
|
18
18
|
const SortSection_1 = require("./sections/SortSection");
|
|
19
19
|
const FilterSection_1 = require("./sections/FilterSection");
|
|
20
20
|
const GridFilterSection_1 = require("./sections/GridFilterSection");
|
|
21
|
+
const RowSummarySection_1 = require("./sections/RowSummarySection");
|
|
22
|
+
const RowSummary_1 = require("../../../PredefinedConfig/Common/RowSummary");
|
|
21
23
|
const LayoutWizard = (props) => {
|
|
22
24
|
var _a, _b;
|
|
23
25
|
const dispatch = (0, react_redux_1.useDispatch)();
|
|
@@ -31,14 +33,16 @@ const LayoutWizard = (props) => {
|
|
|
31
33
|
preparedLayout = (0, Helper_1.cloneObject)(initialLayout);
|
|
32
34
|
if (((_a = props === null || props === void 0 ? void 0 : props.popupParams) === null || _a === void 0 ? void 0 : _a.action) === 'Clone') {
|
|
33
35
|
preparedLayout.Name = '';
|
|
36
|
+
delete preparedLayout.Uuid;
|
|
34
37
|
}
|
|
35
38
|
}
|
|
36
39
|
else {
|
|
37
40
|
preparedLayout = ObjectFactory_1.default.CreateEmptyLayout({ Name: '' });
|
|
38
41
|
}
|
|
39
42
|
if (preparedLayout.SuppressAggFuncInHeader === undefined) {
|
|
40
|
-
preparedLayout.SuppressAggFuncInHeader =
|
|
41
|
-
|
|
43
|
+
preparedLayout.SuppressAggFuncInHeader = !!adaptable.agGridAdapter
|
|
44
|
+
.getAgGridApi()
|
|
45
|
+
.getGridOption('suppressAggFuncInHeader');
|
|
42
46
|
}
|
|
43
47
|
return preparedLayout;
|
|
44
48
|
});
|
|
@@ -105,6 +109,7 @@ const LayoutWizard = (props) => {
|
|
|
105
109
|
{
|
|
106
110
|
title: 'Row Groups',
|
|
107
111
|
isVisible: () => layoutSupportedFeatures.RowGroupedColumns,
|
|
112
|
+
isValid: RowSummarySection_1.areSummaryRowsValid,
|
|
108
113
|
details: 'Configure Row Grouping',
|
|
109
114
|
renderSummary: () => React.createElement(RowGroupingSection_1.RowGroupingSectionSummary, null),
|
|
110
115
|
render: () => (React.createElement(rebass_1.Box, { p: 2, style: { height: '100%' } },
|
|
@@ -117,7 +122,37 @@ const LayoutWizard = (props) => {
|
|
|
117
122
|
renderSummary: () => React.createElement(AggregationsSection_1.AggregationsSectionSummary, null),
|
|
118
123
|
isValid: (data) => (0, AggregationsSection_1.isAggregationsSectionValid)(data),
|
|
119
124
|
render: () => (React.createElement(rebass_1.Box, { p: 2, style: { height: '100%' } },
|
|
120
|
-
React.createElement(AggregationsSection_1.AggregationsSection, { onChange:
|
|
125
|
+
React.createElement(AggregationsSection_1.AggregationsSection, { onChange: (layout) => {
|
|
126
|
+
let newLayout = (0, Helper_1.cloneObject)(layout);
|
|
127
|
+
// if we do not have an weighted avg col, we need to clear the row summary if one exists
|
|
128
|
+
if (newLayout.RowSummaries) {
|
|
129
|
+
newLayout.RowSummaries = newLayout.RowSummaries.map((rowSummary) => {
|
|
130
|
+
return Object.assign(Object.assign({}, rowSummary), { ColumnsMap: Object.entries(rowSummary.ColumnsMap).reduce((acc, [columnId, aggFunc]) => {
|
|
131
|
+
if (
|
|
132
|
+
// see if it is weighted avg
|
|
133
|
+
aggFunc === RowSummary_1.WEIGHTED_AVERAGE_AGGREATED_FUNCTION &&
|
|
134
|
+
// see if we have a weight in the agg columns
|
|
135
|
+
newLayout.AggregationColumns[columnId] &&
|
|
136
|
+
(typeof newLayout.AggregationColumns[columnId] !== 'object' ||
|
|
137
|
+
newLayout.AggregationColumns[columnId].weightColumnId)) {
|
|
138
|
+
// need to remove the row summary
|
|
139
|
+
return acc;
|
|
140
|
+
}
|
|
141
|
+
acc[columnId] = aggFunc;
|
|
142
|
+
return acc;
|
|
143
|
+
}, {}) });
|
|
144
|
+
});
|
|
145
|
+
}
|
|
146
|
+
setLayout(newLayout);
|
|
147
|
+
} }))),
|
|
148
|
+
},
|
|
149
|
+
{
|
|
150
|
+
title: 'Row Summaries',
|
|
151
|
+
details: 'Configure Row Summaries',
|
|
152
|
+
renderSummary: () => React.createElement(RowGroupingSection_1.RowGroupingSectionSummary, null),
|
|
153
|
+
isVisible: () => layoutSupportedFeatures.RowSummaries,
|
|
154
|
+
render: () => (React.createElement(rebass_1.Box, { p: 2, style: { height: '100%' } },
|
|
155
|
+
React.createElement(RowSummarySection_1.RowSummarySection, { onChange: setLayout }))),
|
|
121
156
|
},
|
|
122
157
|
{
|
|
123
158
|
title: 'Sort',
|
|
@@ -175,7 +175,7 @@ const ColumnRow = (props) => {
|
|
|
175
175
|
React.createElement(FormLayout_1.FormRow, { label: "ColumnId" },
|
|
176
176
|
React.createElement(Tag_1.Tag, null, props.column.columnId)),
|
|
177
177
|
React.createElement(FormLayout_1.FormRow, { label: "Header" },
|
|
178
|
-
React.createElement(Input_1.default, { "data-name": "column-header", className: "ab-Layout-Wizard__ColumnRow__Input",
|
|
178
|
+
React.createElement(Input_1.default, { "data-name": "column-header", className: "ab-Layout-Wizard__ColumnRow__Input", placeholder: "Custom name (optional)", onChange: () => {
|
|
179
179
|
props.onColumnNameChange(props.column.columnId, event.target.value);
|
|
180
180
|
}, value: customHeader })),
|
|
181
181
|
React.createElement(FormLayout_1.FormRow, { label: "Width" },
|
|
@@ -58,7 +58,7 @@ const FilterSection = (props) => {
|
|
|
58
58
|
React.createElement(Tabs_1.Tabs.Content, null,
|
|
59
59
|
React.createElement(FormLayout_1.default, { mb: 2 },
|
|
60
60
|
React.createElement(FormLayout_1.FormRow, { label: "Add Column Filter" },
|
|
61
|
-
React.createElement(ColumnSelector_1.ColumnSelector, { filterColumn: (column) => column.filterable && !layoutFilters.some((f) => f.ColumnId === column.columnId), placeholder: "Select
|
|
61
|
+
React.createElement(ColumnSelector_1.ColumnSelector, { filterColumn: (column) => column.filterable && !layoutFilters.some((f) => f.ColumnId === column.columnId), placeholder: "Select Column to create Filter", onChange: (option) => {
|
|
62
62
|
props.onChange(Object.assign(Object.assign({}, layout), { ColumnFilters: [
|
|
63
63
|
...layoutFilters,
|
|
64
64
|
{
|