@adaptabletools/adaptable 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 +1 -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 +45 -15
- package/src/Api/Implementation/ColumnFilterApiImpl.js +7 -7
- package/src/Api/Implementation/ColumnMenuApiImpl.d.ts +8 -0
- package/src/Api/Implementation/ColumnMenuApiImpl.js +12 -0
- package/src/Api/Implementation/ColumnScopeApiImpl.d.ts +33 -0
- package/src/Api/Implementation/{ScopeApiImpl.js → ColumnScopeApiImpl.js} +65 -19
- 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 +9 -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 +20 -28
- package/src/Api/Implementation/NoteApiImpl.d.ts +18 -0
- package/src/Api/Implementation/NoteApiImpl.js +40 -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 +7 -1
- package/src/Api/Internal/CommentsInternalApi.d.ts +4 -0
- package/src/Api/Internal/CommentsInternalApi.js +14 -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 +14 -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 +1 -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 +1 -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 +125 -1
- package/src/PredefinedConfig/Common/RowScope.d.ts +17 -0
- package/src/PredefinedConfig/Common/RowScope.js +1 -0
- package/src/PredefinedConfig/Common/RowSummary.d.ts +21 -0
- package/src/PredefinedConfig/Common/RowSummary.js +17 -0
- package/src/PredefinedConfig/Common/TransposeConfig.d.ts +30 -0
- package/src/PredefinedConfig/Common/TransposeConfig.js +1 -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 +1 -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 +0 -34
- package/src/Redux/ActionsReducers/LayoutRedux.d.ts +9 -0
- package/src/Redux/ActionsReducers/LayoutRedux.js +32 -10
- package/src/Redux/ActionsReducers/NoteRedux.d.ts +38 -0
- package/src/Redux/ActionsReducers/{NotesRedux.js → NoteRedux.js} +24 -24
- package/src/Redux/ActionsReducers/PopupRedux.d.ts +5 -13
- package/src/Redux/ActionsReducers/PopupRedux.js +0 -19
- package/src/Redux/ActionsReducers/SystemRedux.d.ts +15 -4
- package/src/Redux/ActionsReducers/SystemRedux.js +24 -9
- package/src/Redux/Store/AdaptableStore.js +48 -30
- 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 +70 -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 +11 -21
- 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 +58 -44
- 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 +55 -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 +1 -0
- package/src/Utilities/Constants/ModuleConstants.d.ts +6 -6
- package/src/Utilities/Constants/ModuleConstants.js +6 -6
- package/src/Utilities/Defaults/DefaultSettingsPanel.js +2 -2
- package/src/Utilities/ExpressionFunctions/aggregatedScalarExpressionFunctions.d.ts +3 -2
- package/src/Utilities/ExpressionFunctions/aggregatedScalarExpressionFunctions.js +433 -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 +4 -0
- package/src/Utilities/Helpers/AdaptableHelper.d.ts +3 -1
- package/src/Utilities/Helpers/AdaptableHelper.js +19 -0
- 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 -190
- 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 +155 -0
- package/src/Utilities/Services/ValidationService.js +2 -2
- package/src/Utilities/adaptableQlUtils.d.ts +2 -0
- package/src/Utilities/adaptableQlUtils.js +14 -0
- package/src/Utilities/license/decode.js +1 -65
- package/src/Utilities/license/hashing.js +1 -43
- 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 +42 -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 +174 -0
- package/src/View/License/LicenseWatermark.js +1 -61
- package/src/View/Note/NotePopup.d.ts +2 -0
- package/src/View/{Notes/NotesPopup.js → Note/NotePopup.js} +14 -9
- 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 +120 -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 +46 -0
- package/src/agGrid/weightedAverage.d.ts +0 -2
- package/src/agGrid/weightedAverage.js +0 -54
- package/src/components/Accordion.d.ts +7 -0
- package/src/components/Accordion.js +36 -0
- package/src/components/CheckBox/index.js +1 -1
- 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 +1 -14
- 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 +4 -0
- package/src/components/icons/copy.d.ts +3 -0
- package/src/components/icons/copy.js +4 -0
- package/src/components/icons/csv.d.ts +3 -0
- package/src/components/icons/csv.js +4 -0
- package/src/components/icons/data-object.d.ts +3 -0
- package/src/components/icons/data-object.js +4 -0
- package/src/components/icons/excel.d.ts +3 -0
- package/src/components/icons/excel.js +5 -0
- package/src/components/icons/expand-all.d.ts +3 -0
- package/src/components/icons/expand-all.js +4 -0
- package/src/components/icons/filter-off.d.ts +3 -0
- package/src/components/icons/filter-off.js +4 -0
- package/src/components/icons/grid-info.d.ts +3 -0
- package/src/components/icons/grid-info.js +4 -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 +4 -0
- package/src/components/icons/select-all.d.ts +3 -0
- package/src/components/icons/select-all.js +4 -0
- package/src/components/icons/select-fwd.d.ts +3 -0
- package/src/components/icons/select-fwd.js +4 -0
- package/src/components/icons/select-off.d.ts +3 -0
- package/src/components/icons/select-off.js +4 -0
- package/src/env.js +2 -2
- package/src/metamodel/adaptable.metamodel.d.ts +230 -116
- package/src/metamodel/adaptable.metamodel.js +1 -9408
- 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.esm.tsbuildinfo +1 -1
- package/src/AdaptableOptions/MenuOptions.d.ts +0 -234
- package/src/AdaptableOptions/MenuOptions.js +0 -95
- 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 -35
- 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 -4
- package/src/Redux/ActionsReducers/NotesRedux.d.ts +0 -38
- package/src/Strategy/CommentsModule.d.ts +0 -17
- package/src/Strategy/CommentsModule.js +0 -78
- package/src/Strategy/NotesModule.d.ts +0 -10
- package/src/Strategy/NotesModule.js +0 -57
- package/src/View/Components/ScopeComponent.d.ts +0 -24
- package/src/View/Components/ScopeComponent.js +0 -133
- package/src/View/Export/Wizard/ReportScopeWizard.d.ts +0 -17
- package/src/View/Export/Wizard/ReportScopeWizard.js +0 -47
- 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,15 +1,15 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import { AdaptablePredicateDef,
|
|
2
|
+
import { AdaptablePredicateDef, ColumnScope } from '../../../../types';
|
|
3
3
|
import { EntityRulesEditorProps, RuleType } from '../index';
|
|
4
4
|
export interface EntityRulePredicatesEditorProps {
|
|
5
5
|
descriptions: EntityRulesEditorProps<any>['descriptions'];
|
|
6
6
|
data: {
|
|
7
7
|
Rule: RuleType;
|
|
8
|
-
Scope:
|
|
8
|
+
Scope: ColumnScope;
|
|
9
9
|
};
|
|
10
10
|
onChange: (data: {
|
|
11
11
|
Rule: RuleType;
|
|
12
|
-
Scope:
|
|
12
|
+
Scope: ColumnScope;
|
|
13
13
|
}) => void;
|
|
14
14
|
predicateDefs: AdaptablePredicateDef[];
|
|
15
15
|
getPredicateDefsForColId?: (colId: string) => AdaptablePredicateDef[];
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { FlexProps } from 'rebass';
|
|
3
|
-
import type { AdaptableColumnPredicate, AdaptableModule, AdaptablePredicateDef,
|
|
3
|
+
import type { AdaptableColumnPredicate, AdaptableModule, AdaptablePredicateDef, ColumnScope } from '../../../types';
|
|
4
4
|
import type { XOR } from '../../../Utilities/Extensions/TypeExtensions';
|
|
5
5
|
import { AdaptableQuery } from '../../../PredefinedConfig/Common/AdaptableQuery';
|
|
6
6
|
export type RuleType = XOR<{
|
|
@@ -30,7 +30,7 @@ export type EntityRulesEditorProps<T> = {
|
|
|
30
30
|
};
|
|
31
31
|
export declare const EntityRulesSummary: <T extends {
|
|
32
32
|
Rule?: RuleType;
|
|
33
|
-
Scope:
|
|
33
|
+
Scope: ColumnScope;
|
|
34
34
|
}>(props: {
|
|
35
35
|
data: T;
|
|
36
36
|
renderPredicate: (content: string) => React.ReactNode;
|
|
@@ -38,5 +38,5 @@ export declare const EntityRulesSummary: <T extends {
|
|
|
38
38
|
}) => JSX.Element;
|
|
39
39
|
export declare const EntityRulesEditor: <T extends {
|
|
40
40
|
Rule: RuleType;
|
|
41
|
-
Scope:
|
|
41
|
+
Scope: ColumnScope;
|
|
42
42
|
}>(props: EntityRulesEditorProps<T>) => JSX.Element;
|
|
@@ -14,12 +14,13 @@ import { ObjectFactory } from '../../../Utilities/ObjectFactory';
|
|
|
14
14
|
import HelpBlock from '../../../components/HelpBlock';
|
|
15
15
|
import { Flex } from 'rebass';
|
|
16
16
|
import Radio from '../../../components/Radio';
|
|
17
|
-
import Helper from '../../../Utilities/Helpers/Helper';
|
|
17
|
+
import Helper, { cloneObject } from '../../../Utilities/Helpers/Helper';
|
|
18
18
|
import AdaptableInput from '../AdaptableInput';
|
|
19
19
|
import { renderWithAdaptableContext } from '../../renderWithAdaptableContext';
|
|
20
20
|
import { CheckBox } from '../../../components/CheckBox';
|
|
21
21
|
import { runIfNotResolvedIn } from '../../../Utilities/runIfNotResolvedIn';
|
|
22
22
|
import { getDefaultColumnFilterPredicate } from './getDefaultColumnFilterPredicate';
|
|
23
|
+
import { AdaptableDateInlineInput } from '../AdaptableInput/AdaptableDateInlineInput';
|
|
23
24
|
const panelStyle = {
|
|
24
25
|
width: '100%',
|
|
25
26
|
minWidth: 150,
|
|
@@ -174,13 +175,20 @@ class FilterFormComponent extends React.Component {
|
|
|
174
175
|
this.changeColumnPredicateInput(newCheckedValue, 0);
|
|
175
176
|
} })));
|
|
176
177
|
}
|
|
177
|
-
return (_a = predicateDef.inputs) === null || _a === void 0 ? void 0 : _a.map((predicateInput, index) =>
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
178
|
+
return (_a = predicateDef.inputs) === null || _a === void 0 ? void 0 : _a.map((predicateInput, index) => {
|
|
179
|
+
var _a, _b;
|
|
180
|
+
const showDatePicker = (_b = (_a = this.props.api.optionsApi) === null || _a === void 0 ? void 0 : _a.getColumnFilterOptions()) === null || _b === void 0 ? void 0 : _b.showDatePicker;
|
|
181
|
+
if (predicateInput.type === 'date' && !showDatePicker) {
|
|
182
|
+
return (React.createElement(AdaptableDateInlineInput, { value: filter.Predicate.Inputs[index], onChange: (value) => this.changeColumnPredicateInput(value, index) }));
|
|
183
|
+
}
|
|
184
|
+
return (React.createElement(Flex, { key: index, flexDirection: "row" },
|
|
185
|
+
React.createElement(AdaptableInput, { onMouseDown: (event) => {
|
|
186
|
+
if (predicateInput.type === 'date') {
|
|
187
|
+
// This prevents the ag-grid dropdown closing when a date is selected
|
|
188
|
+
event.stopPropagation();
|
|
189
|
+
}
|
|
190
|
+
}, disabled: this.isFilterDisabled(), type: predicateInput.type, autoFocus: index === 0, value: filter.Predicate.Inputs[index], onChange: (e) => this.changeColumnPredicateInput(e.target.value, index), mb: 1, flex: 1, fontSize: 2 })));
|
|
191
|
+
});
|
|
184
192
|
}
|
|
185
193
|
isFilterDisabled() {
|
|
186
194
|
var _a;
|
|
@@ -255,12 +263,12 @@ class FilterFormComponent extends React.Component {
|
|
|
255
263
|
}
|
|
256
264
|
changeColumnPredicateInput(value, index) {
|
|
257
265
|
const { editedColumnFilter } = this.state;
|
|
258
|
-
|
|
259
|
-
|
|
266
|
+
const newEditedColumnFilter = cloneObject(editedColumnFilter);
|
|
267
|
+
newEditedColumnFilter.Predicate.Inputs[index] = value;
|
|
268
|
+
this.setState({ editedColumnFilter: newEditedColumnFilter });
|
|
260
269
|
if (this.props.api.optionsApi.getColumnFilterOptions().autoApplyFilter) {
|
|
261
|
-
this.props.onSetColumnFilter(
|
|
270
|
+
this.props.onSetColumnFilter(newEditedColumnFilter);
|
|
262
271
|
}
|
|
263
|
-
// this.props.onSetColumnFilter(editedColumnFilter);
|
|
264
272
|
}
|
|
265
273
|
}
|
|
266
274
|
function mapStateToProps(state, ownProps) {
|
|
@@ -15,6 +15,7 @@ import { getDefaultColumnFilterPredicate } from './getDefaultColumnFilterPredica
|
|
|
15
15
|
import { isAdaptableIcon } from '../../../components/Icon';
|
|
16
16
|
import { QuickFilterValues } from './QuickFilterValues';
|
|
17
17
|
import { AdaptableIconComponent } from '../AdaptableIconComponent';
|
|
18
|
+
import { AdaptableDateInlineInput } from '../AdaptableInput/AdaptableDateInlineInput';
|
|
18
19
|
class QuickFilterFormComponent extends React.Component {
|
|
19
20
|
constructor(props) {
|
|
20
21
|
super(props);
|
|
@@ -136,17 +137,23 @@ class QuickFilterFormComponent extends React.Component {
|
|
|
136
137
|
} })));
|
|
137
138
|
}
|
|
138
139
|
return (_a = predicateDef === null || predicateDef === void 0 ? void 0 : predicateDef.inputs) === null || _a === void 0 ? void 0 : _a.map((predicateInput, index) => {
|
|
139
|
-
var _a, _b;
|
|
140
|
+
var _a, _b, _c, _d, _e, _f;
|
|
141
|
+
const showDatePicker = (_b = (_a = this.props.api.optionsApi) === null || _a === void 0 ? void 0 : _a.getColumnFilterOptions()) === null || _b === void 0 ? void 0 : _b.showDatePicker;
|
|
142
|
+
const value = (_d = (_c = filter.Predicate.Inputs) === null || _c === void 0 ? void 0 : _c[index]) !== null && _d !== void 0 ? _d : '';
|
|
143
|
+
const onKeyDownCapture = (e) => {
|
|
144
|
+
if (e.nativeEvent.key === 'Escape') {
|
|
145
|
+
e.nativeEvent.preventDefault();
|
|
146
|
+
e.nativeEvent.stopPropagation();
|
|
147
|
+
this.clearFilter();
|
|
148
|
+
}
|
|
149
|
+
};
|
|
150
|
+
if (predicateInput.type === 'date' && !showDatePicker) {
|
|
151
|
+
return (React.createElement(AdaptableDateInlineInput, { value: value, key: index, onKeyDownCapture: onKeyDownCapture, onChange: (value) => this.changeColumnPredicateInput(value, index) }));
|
|
152
|
+
}
|
|
140
153
|
return (React.createElement(AdaptableInput, { disabled: this.isFilterDisabled(), key: index, type: predicateInput.type === 'number' ? 'text' : predicateInput.type,
|
|
141
154
|
// autoFocus has to be FALSE because if the input receives focus in the init phase,
|
|
142
155
|
// it may scroll the AG Grid header viewport into view and de-synchronize it (relative to the content viewport)
|
|
143
|
-
autoFocus: false, value: (
|
|
144
|
-
if (e.nativeEvent.key === 'Escape') {
|
|
145
|
-
e.nativeEvent.preventDefault();
|
|
146
|
-
e.nativeEvent.stopPropagation();
|
|
147
|
-
this.clearFilter();
|
|
148
|
-
}
|
|
149
|
-
}, style: {
|
|
156
|
+
autoFocus: false, value: (_f = (_e = filter.Predicate.Inputs) === null || _e === void 0 ? void 0 : _e[index]) !== null && _f !== void 0 ? _f : '', onChange: (e) => this.changeColumnPredicateInput(e.target.value, index), onKeyDownCapture: onKeyDownCapture, style: {
|
|
150
157
|
width: '100%',
|
|
151
158
|
padding: 'var(--ab-space-1)',
|
|
152
159
|
borderRadius: 0,
|
|
@@ -6,6 +6,7 @@ import { isSameDay } from 'date-fns';
|
|
|
6
6
|
import OverlayTrigger from '../../../components/OverlayTrigger';
|
|
7
7
|
import { Flex } from 'rebass';
|
|
8
8
|
import { ListBoxFilterForm } from './ListBoxFilterForm';
|
|
9
|
+
import { Resizable } from 're-resizable';
|
|
9
10
|
export const QuickFilterValues = (props) => {
|
|
10
11
|
const { api } = props;
|
|
11
12
|
const currentOverlayVisible = useRef(false);
|
|
@@ -135,33 +136,48 @@ export const QuickFilterValues = (props) => {
|
|
|
135
136
|
}
|
|
136
137
|
}, render: ({ targetWidth }) => {
|
|
137
138
|
var _a;
|
|
138
|
-
return (React.createElement(
|
|
139
|
-
if (showEvent === 'click') {
|
|
140
|
-
// For showEvent=mousenter this is not needed.
|
|
141
|
-
// When mouseenter is triggered on the overlay, onShowFn is called, the overlay is no longer hidden.
|
|
142
|
-
// But in this case because the trigger is click, another show is not triggered.
|
|
143
|
-
// The hide event is added direcly on the element so it does not use the React event system.
|
|
144
|
-
// But this event does, maybe beause it uses event delegation it is triggered to soon.
|
|
145
|
-
requestAnimationFrame(() => {
|
|
146
|
-
var _a;
|
|
147
|
-
(_a = valuesDropdownRef.current) === null || _a === void 0 ? void 0 : _a.show();
|
|
148
|
-
});
|
|
149
|
-
}
|
|
150
|
-
}, "data-name": "quick-filter-form", flexDirection: "column", style: {
|
|
139
|
+
return (React.createElement(Resizable, { style: {
|
|
151
140
|
fontSize: 'var(--ab-font-size-2)',
|
|
152
141
|
border: '1px solid var(--ab-color-primarydark)',
|
|
153
142
|
background: 'var(--ab-color-defaultbackground)',
|
|
154
143
|
zIndex: 1000,
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
144
|
+
}, enable: {
|
|
145
|
+
top: false,
|
|
146
|
+
right: true,
|
|
147
|
+
bottom: false,
|
|
148
|
+
left: false,
|
|
149
|
+
topRight: false,
|
|
150
|
+
bottomRight: false,
|
|
151
|
+
bottomLeft: false,
|
|
152
|
+
topLeft: false,
|
|
153
|
+
}, minWidth: getPopoverWidth(targetWidth) },
|
|
154
|
+
React.createElement(Flex, { onMouseEnter: () => {
|
|
155
|
+
if (showEvent === 'click') {
|
|
156
|
+
// For showEvent=mousenter this is not needed.
|
|
157
|
+
// When mouseenter is triggered on the overlay, onShowFn is called, the overlay is no longer hidden.
|
|
158
|
+
// But in this case because the trigger is click, another show is not triggered.
|
|
159
|
+
// The hide event is added direcly on the element so it does not use the React event system.
|
|
160
|
+
// But this event does, maybe beause it uses event delegation it is triggered to soon.
|
|
161
|
+
requestAnimationFrame(() => {
|
|
162
|
+
var _a;
|
|
163
|
+
(_a = valuesDropdownRef.current) === null || _a === void 0 ? void 0 : _a.show();
|
|
164
|
+
});
|
|
165
|
+
}
|
|
166
|
+
}, "data-name": "quick-filter-form", flexDirection: "column", style: {
|
|
167
|
+
// fontSize: 'var(--ab-font-size-2)',
|
|
168
|
+
// border: '1px solid var(--ab-color-primarydark)',
|
|
169
|
+
// background: 'var(--ab-color-defaultbackground)',
|
|
170
|
+
// zIndex: 1000,
|
|
171
|
+
// width: getPopoverWidth(targetWidth),
|
|
172
|
+
} },
|
|
173
|
+
React.createElement(Flex, { m: 2 },
|
|
174
|
+
React.createElement(SimpleButton, { onClick: () => clearColumnFilter() }, "Clear Filter"),
|
|
175
|
+
((_a = api.optionsApi.getColumnFilterOptions()) === null || _a === void 0 ? void 0 : _a.autoApplyFilter) == false && (React.createElement(SimpleButton, { ml: 2, onClick: () => {
|
|
176
|
+
if (transientColumnFilter) {
|
|
177
|
+
props.updateColumnFilter(transientColumnFilter);
|
|
178
|
+
}
|
|
179
|
+
} }, "Apply Filter"))),
|
|
180
|
+
React.createElement(ListBoxFilterForm, { disabled: props.isFilterDisabled, suppressClientSideFilter: quickFilterValues.suppressClientSideFilter, isLoading: isDistinctColumnValuesLoading, onFilterChange: handleFilterChange, currentColumn: props.currentColumn, columns: [], columnDistinctValues: quickFilterValues.values, dataType: props.currentColumn.dataType, uiSelectedColumnValues: props.columnFilter.Predicate.Inputs.filter((input) => input !== ''), useAgGridStyle: true, onColumnValueSelectedChange: (list) => onColumnValueSelectedChange(list) }))));
|
|
165
181
|
} },
|
|
166
182
|
React.createElement(SimpleButton, { "data-name": 'Select Values', style: {
|
|
167
183
|
flex: 1,
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import { ScopeDataType,
|
|
2
|
+
import { ScopeDataType, ColumnScope } from '../../PredefinedConfig/Common/ColumnScope';
|
|
3
3
|
import { AdaptableColumn } from '../../types';
|
|
4
4
|
export declare const isScopeValid: ({ Scope }: {
|
|
5
|
-
Scope:
|
|
5
|
+
Scope: ColumnScope;
|
|
6
6
|
}) => string | true;
|
|
7
|
-
export declare const renderScopeSummary: (scope:
|
|
7
|
+
export declare const renderScopeSummary: (scope: ColumnScope, labels: {
|
|
8
8
|
scopeWholeRow: string;
|
|
9
9
|
scopeColumns: string;
|
|
10
10
|
scopeDataTypes: string;
|
|
11
11
|
}) => JSX.Element;
|
|
12
12
|
export interface NewScopeComponentProps extends React.ClassAttributes<any> {
|
|
13
|
-
scope:
|
|
13
|
+
scope: ColumnScope;
|
|
14
14
|
scopeColumns?: AdaptableColumn[];
|
|
15
|
-
updateScope: (scope:
|
|
15
|
+
updateScope: (scope: ColumnScope) => void;
|
|
16
16
|
availableDataTypes?: ScopeDataType[];
|
|
17
17
|
hideWholeRow?: boolean;
|
|
18
18
|
style?: React.CSSProperties;
|
|
@@ -42,7 +42,7 @@ const DATA_TYPES_MAP = {
|
|
|
42
42
|
};
|
|
43
43
|
export const renderScopeSummary = (scope, labels) => {
|
|
44
44
|
const adaptable = useAdaptable();
|
|
45
|
-
const scopeApi = adaptable.api.
|
|
45
|
+
const scopeApi = adaptable.api.columnScopeApi;
|
|
46
46
|
const columnsInScope = scopeApi.getColumnsForScope(scope);
|
|
47
47
|
return (React.createElement(React.Fragment, null,
|
|
48
48
|
React.createElement(Box, null,
|
|
@@ -56,8 +56,9 @@ export const renderScopeSummary = (scope, labels) => {
|
|
|
56
56
|
};
|
|
57
57
|
const DATA_TYPES_OPTIONS = Object.values(DATA_TYPES_MAP);
|
|
58
58
|
export const NewScopeComponent = (props) => {
|
|
59
|
+
var _a, _b;
|
|
59
60
|
const { api } = useAdaptable();
|
|
60
|
-
const { scopeApi, columnApi } = api;
|
|
61
|
+
const { columnScopeApi: scopeApi, columnApi } = api;
|
|
61
62
|
const [columnsSearchText, setColumnsSearchText] = useState('');
|
|
62
63
|
const scopeColumns = React.useMemo(() => {
|
|
63
64
|
const allColumns = props.scopeColumns || columnApi.getColumns();
|
|
@@ -79,6 +80,9 @@ export const NewScopeComponent = (props) => {
|
|
|
79
80
|
if (scopeApi.scopeHasDataType(props.scope)) {
|
|
80
81
|
return 'DataType';
|
|
81
82
|
}
|
|
83
|
+
if (scopeApi.scopeHasColumnType(props.scope)) {
|
|
84
|
+
return 'ColumnType';
|
|
85
|
+
}
|
|
82
86
|
return undefined;
|
|
83
87
|
};
|
|
84
88
|
const onScopeSelectChanged = (value) => {
|
|
@@ -93,6 +97,11 @@ export const NewScopeComponent = (props) => {
|
|
|
93
97
|
DataTypes: [],
|
|
94
98
|
};
|
|
95
99
|
}
|
|
100
|
+
else if (value == 'ColumnType') {
|
|
101
|
+
newScope = {
|
|
102
|
+
ColumnTypes: [],
|
|
103
|
+
};
|
|
104
|
+
}
|
|
96
105
|
else {
|
|
97
106
|
newScope = {
|
|
98
107
|
All: true,
|
|
@@ -128,6 +137,10 @@ export const NewScopeComponent = (props) => {
|
|
|
128
137
|
if (Array.isArray(props.availableDataTypes)) {
|
|
129
138
|
dataTypeOptions = props.availableDataTypes.map((dataType) => DATA_TYPES_MAP[dataType]);
|
|
130
139
|
}
|
|
140
|
+
const hasColumnTypes = React.useMemo(() => {
|
|
141
|
+
var _a;
|
|
142
|
+
return ((_a = api.columnApi.getColumnTypes()) === null || _a === void 0 ? void 0 : _a.length) > 0;
|
|
143
|
+
}, []);
|
|
131
144
|
return (React.createElement(Tabs, { "data-name": 'scope-component', className: "ab-ScopeComponent", value: scopeChoice, style: Object.assign({ height: '100%' }, props.style), onValueChange: onScopeSelectChanged },
|
|
132
145
|
props.hideWholeRow ? null : (React.createElement(Tabs.Tab, { value: "Row" },
|
|
133
146
|
React.createElement(Radio, { margin: 0, checked: scopeChoice == 'All', tabIndex: -1 }, "All Columns"))),
|
|
@@ -135,6 +148,8 @@ export const NewScopeComponent = (props) => {
|
|
|
135
148
|
React.createElement(Radio, { margin: 0, value: "Column", checked: scopeChoice == 'Column', tabIndex: -1 }, "Selected Columns"))),
|
|
136
149
|
!props.disableDataTypes && (React.createElement(Tabs.Tab, { value: "DataType" },
|
|
137
150
|
React.createElement(Radio, { margin: 0, value: "DataType", checked: scopeChoice == 'DataType', tabIndex: -1 }, "Data Types"))),
|
|
151
|
+
hasColumnTypes && (React.createElement(Tabs.Tab, { value: "ColumnType" },
|
|
152
|
+
React.createElement(Radio, { margin: 0, value: "ColumnType", checked: scopeChoice == 'ColumnType', tabIndex: -1 }, "Column Types"))),
|
|
138
153
|
props.hideWholeRow ? null : (React.createElement(Tabs.Content, { value: "Row", style: { flex: 'none' }, "data-name": "row-scope" },
|
|
139
154
|
React.createElement(Text, { padding: 2, pl: 0, fontSize: 2 }, props.descriptions.rowScope))),
|
|
140
155
|
!props.disableColumns && (React.createElement(Tabs.Content, { value: "Column", style: { flex: 1, overflow: 'auto' }, "data-name": "column-scope", padding: 0 },
|
|
@@ -147,5 +162,23 @@ export const NewScopeComponent = (props) => {
|
|
|
147
162
|
!props.disableDataTypes && (React.createElement(Tabs.Content, { value: "DataType", style: { flex: 'none' }, "data-name": "datatype-scope" },
|
|
148
163
|
React.createElement(Box, null,
|
|
149
164
|
props.descriptions.dataTypeScope && (React.createElement(Text, { p: 2, pl: 0, mb: 2, fontSize: 2 }, props.descriptions.dataTypeScope)),
|
|
150
|
-
React.createElement(Flex, { flexDirection: "column" }, dataTypeOptions.map((dataTypeOption) => (React.createElement(CheckBox, { "data-name": "scope", "data-value": dataTypeOption.value, key: dataTypeOption.value, checked: dataTypesInScope && dataTypesInScope.includes(dataTypeOption.value), onChange: (checked) => onCheckBoxDataTypeChecked(checked, dataTypeOption.value) }, dataTypeOption.label)))))))
|
|
165
|
+
React.createElement(Flex, { flexDirection: "column" }, dataTypeOptions.map((dataTypeOption) => (React.createElement(CheckBox, { "data-name": "scope", "data-value": dataTypeOption.value, key: dataTypeOption.value, checked: dataTypesInScope && dataTypesInScope.includes(dataTypeOption.value), onChange: (checked) => onCheckBoxDataTypeChecked(checked, dataTypeOption.value) }, dataTypeOption.label))))))),
|
|
166
|
+
hasColumnTypes && (React.createElement(Tabs.Content, { value: "ColumnType", style: { flex: 'none' }, "data-name": "column-type-scope" },
|
|
167
|
+
React.createElement(Box, null,
|
|
168
|
+
React.createElement(Flex, { flexDirection: "column" }, (_b = (_a = api.columnApi.getColumnTypes()) === null || _a === void 0 ? void 0 : _a.map) === null || _b === void 0 ? void 0 : _b.call(_a, (columnType) => {
|
|
169
|
+
var _a;
|
|
170
|
+
return (React.createElement(CheckBox, { "data-name": "scope", "data-value": columnType, key: columnType, checked: 'ColumnTypes' in props.scope && ((_a = props.scope.ColumnTypes) === null || _a === void 0 ? void 0 : _a.includes(columnType)), onChange: (checked) => {
|
|
171
|
+
let columnTypes = [].concat(props.scope.ColumnTypes);
|
|
172
|
+
if (checked) {
|
|
173
|
+
columnTypes.push(columnType);
|
|
174
|
+
}
|
|
175
|
+
else {
|
|
176
|
+
columnTypes = columnTypes.filter((ct) => ct !== columnType);
|
|
177
|
+
}
|
|
178
|
+
let newScope = {
|
|
179
|
+
ColumnTypes: columnTypes,
|
|
180
|
+
};
|
|
181
|
+
props.updateScope(newScope);
|
|
182
|
+
} }, columnType));
|
|
183
|
+
})))))));
|
|
151
184
|
};
|
|
@@ -35,7 +35,10 @@ export const AdaptablePopup = (props) => {
|
|
|
35
35
|
let componentName = props.componentName;
|
|
36
36
|
// ts forces to check for General, there is no menu item General
|
|
37
37
|
const useFirstItem = !props.componentName;
|
|
38
|
-
if (useFirstItem &&
|
|
38
|
+
if (useFirstItem &&
|
|
39
|
+
firstMenuModule !== 'General' &&
|
|
40
|
+
firstMenuModule !== 'CustomSettingsPanel' &&
|
|
41
|
+
firstMenuModule !== 'Group') {
|
|
39
42
|
componentModule = firstMenuModule;
|
|
40
43
|
}
|
|
41
44
|
const customSettingsPanel = (_c = settingsPanelOptions === null || settingsPanelOptions === void 0 ? void 0 : settingsPanelOptions.customSettingsPanels) === null || _c === void 0 ? void 0 : _c.find((customPanel) => useFirstItem ? customPanel.name === firstMenuItem.label : customPanel.name === componentName);
|
|
@@ -18,9 +18,10 @@ export const useMenuItems = () => {
|
|
|
18
18
|
}
|
|
19
19
|
const visibleItems = allMenuItems.filter((item) => item.module !== 'General' &&
|
|
20
20
|
item.module !== 'CustomSettingsPanel' &&
|
|
21
|
+
item.module !== 'Group' &&
|
|
21
22
|
!STANDALONE_MODULE_POPUPS.includes(item.module) &&
|
|
22
23
|
item.isVisible);
|
|
23
|
-
|
|
24
|
+
let navItems = navigationItems
|
|
24
25
|
.map((moduleName) => {
|
|
25
26
|
var _a, _b;
|
|
26
27
|
if (moduleName === '-') {
|
|
@@ -40,5 +41,13 @@ export const useMenuItems = () => {
|
|
|
40
41
|
return customPanelMenuItem || visibleItems.find((item) => item.module === moduleName);
|
|
41
42
|
})
|
|
42
43
|
.filter(Boolean);
|
|
44
|
+
// remove sequential '-' items
|
|
45
|
+
navItems = navItems.filter((item, index) => {
|
|
46
|
+
if (item === '-' && navItems[index - 1] === '-') {
|
|
47
|
+
return false;
|
|
48
|
+
}
|
|
49
|
+
return true;
|
|
50
|
+
});
|
|
51
|
+
return navItems;
|
|
43
52
|
}, [allMenuItems]);
|
|
44
53
|
};
|
|
@@ -1,28 +1,25 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { useSelector } from 'react-redux';
|
|
3
3
|
import { Flex } from 'rebass';
|
|
4
|
-
import {
|
|
4
|
+
import { GetNoteSelector } from '../../../../Redux/ActionsReducers/NoteRedux';
|
|
5
5
|
import { SystemCommentsAndNotesEditModeSelector, SystemCommentsAndNotesFocusedEntitySelector, SystemCommentsAndNotesSelector, } from '../../../../Redux/ActionsReducers/SystemRedux';
|
|
6
6
|
import { useAdaptable } from '../../../AdaptableContext';
|
|
7
7
|
import { CommentsEditor } from '../../../Comments/CommentsEditor';
|
|
8
|
-
import { NoteEditor } from '../../../
|
|
8
|
+
import { NoteEditor } from '../../../Note/NoteEditor';
|
|
9
9
|
import { CellPopup } from '../../CellPopup';
|
|
10
10
|
const ConnectedNoteEditor = ({ enableEditMode }) => {
|
|
11
11
|
const { api } = useAdaptable();
|
|
12
|
-
const isReadonly = api.entitlementApi.isModuleReadOnlyEntitlement('
|
|
12
|
+
const isReadonly = api.entitlementApi.isModuleReadOnlyEntitlement('Note');
|
|
13
13
|
const editMode = useSelector((state) => SystemCommentsAndNotesEditModeSelector(state.System));
|
|
14
14
|
const cellPopupService = api.internalApi.getCellPopupService();
|
|
15
15
|
const cellAddress = useSelector((state) => SystemCommentsAndNotesSelector(state.System));
|
|
16
|
-
const
|
|
17
|
-
|
|
18
|
-
// Later we can handle multiple notes
|
|
19
|
-
note,] = useSelector((state) => {
|
|
20
|
-
return cellAddress ? GetNotesSelector(state.Notes, cellAddress) : [];
|
|
16
|
+
const note = useSelector((state) => {
|
|
17
|
+
return cellAddress ? GetNoteSelector(state.Note, cellAddress) : null;
|
|
21
18
|
});
|
|
22
19
|
const handleNoteChange = React.useCallback((value) => {
|
|
23
|
-
api.
|
|
20
|
+
api.noteApi.updateNoteText(value, note);
|
|
24
21
|
}, [note]);
|
|
25
|
-
return (React.createElement(Flex, { onClick: () => enableEditMode(), flexDirection: "column", className: "ab-
|
|
22
|
+
return (React.createElement(Flex, { onClick: () => enableEditMode(), flexDirection: "column", className: "ab-NotePopup" },
|
|
26
23
|
React.createElement(NoteEditor, { isReadonly: isReadonly, editMode: editMode, key: note === null || note === void 0 ? void 0 : note.Uuid, onClose: () => cellPopupService.hidePopup(), note: note === null || note === void 0 ? void 0 : note.Text, onNoteChange: (value) => handleNoteChange(value) })));
|
|
27
24
|
};
|
|
28
25
|
export const GridCellPopup = (props) => {
|
|
@@ -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;
|
|
@@ -114,7 +114,7 @@ export class RangesComponent extends React.Component {
|
|
|
114
114
|
this.props.updateColumnComparison(columnComparison);
|
|
115
115
|
}
|
|
116
116
|
else {
|
|
117
|
-
const ranges = this.props.api.
|
|
117
|
+
const ranges = this.props.api.columnScopeApi.createCellColorRangesForScope(this.props.scope);
|
|
118
118
|
this.setState({
|
|
119
119
|
rangesType: 'Standard',
|
|
120
120
|
});
|
|
@@ -64,5 +64,5 @@ export const PermittedValuesSelector = function (props) {
|
|
|
64
64
|
handleSingleValueChange(value);
|
|
65
65
|
}
|
|
66
66
|
};
|
|
67
|
-
return (React.createElement(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,
|
|
67
|
+
return (React.createElement(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 }));
|
|
68
68
|
};
|
|
@@ -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 {
|
|
@@ -62,7 +62,7 @@ export function ValueSelector(props) {
|
|
|
62
62
|
const label = !allowReorder ? preparedToLabel(option) : null;
|
|
63
63
|
const reorderable = typeof allowReorder === 'function' ? allowReorder(option) : allowReorder;
|
|
64
64
|
const renderNode = (props, dragHandleProps) => {
|
|
65
|
-
return (React.createElement(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),
|
|
65
|
+
return (React.createElement(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),
|
|
66
66
|
React.createElement(Flex, { flex: 1, flexDirection: "row", alignItems: "center" },
|
|
67
67
|
reorderable ? (React.createElement(Box, Object.assign({ mr: 3 }, dragHandleProps),
|
|
68
68
|
React.createElement(Icon, { name: "drag", style: { cursor: 'grab' } }))) : null,
|
|
@@ -111,7 +111,7 @@ export function ValueSelector(props) {
|
|
|
111
111
|
};
|
|
112
112
|
const showOnlySelectedCheckbox = (React.createElement(CheckBox, { disabled: !value.length, checked: selectedOnly, onChange: setSelectedOnly }, showSelectedOnlyLabel !== null && showSelectedOnlyLabel !== void 0 ? showSelectedOnlyLabel : 'Show Selected Only'));
|
|
113
113
|
const showSelectedOnlyPosition = (_a = props.showSelectedOnlyPosition) !== null && _a !== void 0 ? _a : 'floating';
|
|
114
|
-
return (React.createElement(Flex, { className: baseClassName, flexDirection: "column", flex: 1 },
|
|
114
|
+
return (React.createElement(Flex, { style: props.style, className: baseClassName, flexDirection: "column", flex: 1 },
|
|
115
115
|
React.createElement(Flex, { mb: 1 },
|
|
116
116
|
showFilterInput && filter ? (React.createElement(AdaptableFormControlTextClear, { value: searchInputValue, OnTextChange: setSearchInputValue, placeholder: "Type to search", style: { flex: 1, border: 0, margin: 3 } })) : (React.createElement(Box, { flex: 1 })),
|
|
117
117
|
showSelectedOnlyPosition === 'top' && React.createElement(Box, { ml: 20 }, showOnlySelectedCheckbox)),
|
|
@@ -24,7 +24,7 @@ export const CustomSortColumnWizardSection = (props) => {
|
|
|
24
24
|
const columnSortComparers = api.optionsApi.getCustomSortOptions().customSortComparers || [];
|
|
25
25
|
const usedColumnIds = [
|
|
26
26
|
...customSorts.map((customSort) => customSort.ColumnId),
|
|
27
|
-
...columnSortComparers.map((comparer) => api.
|
|
27
|
+
...columnSortComparers.map((comparer) => api.columnScopeApi.getColumnIdsInScope(comparer.scope)),
|
|
28
28
|
];
|
|
29
29
|
// filter out used colum ids, but include the current one
|
|
30
30
|
return sortableColumns.filter((column) => {
|
|
@@ -94,7 +94,10 @@ const buildAdaptableOptions = (mainAdaptableInstance, gridOptions, adaptableCont
|
|
|
94
94
|
{
|
|
95
95
|
columnId: 'undoActionColumn',
|
|
96
96
|
friendlyName: ' ',
|
|
97
|
-
|
|
97
|
+
rowScope: {
|
|
98
|
+
ExcludeGroupRows: true,
|
|
99
|
+
ExcludeSummaryRows: true,
|
|
100
|
+
},
|
|
98
101
|
actionColumnSettings: { suppressMenu: true, suppressMovable: true },
|
|
99
102
|
actionColumnButton,
|
|
100
103
|
},
|
|
@@ -208,7 +211,6 @@ const buildGridOptions = (mainAdaptableInstance, changeHistoryLog) => {
|
|
|
208
211
|
},
|
|
209
212
|
autoGroupColumnDef: {
|
|
210
213
|
sortable: true,
|
|
211
|
-
// suppressMenu: true,
|
|
212
214
|
},
|
|
213
215
|
columnDefs: [
|
|
214
216
|
{
|
|
@@ -132,7 +132,7 @@ export const DataImportWizard = (props) => {
|
|
|
132
132
|
return [...userDefinedHandlers, ...systemFileHandlers];
|
|
133
133
|
}, []);
|
|
134
134
|
const supportedFileFormats = React.useMemo(() => {
|
|
135
|
-
return fileHandlers.map((h) => h.fileExtension).join(', ');
|
|
135
|
+
return [...new Set(fileHandlers.map((h) => h.fileExtension)).values()].join(', ');
|
|
136
136
|
}, [fileHandlers]);
|
|
137
137
|
const readFile = React.useCallback(async (file) => {
|
|
138
138
|
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;
|
|
@@ -143,6 +143,19 @@ export const getFormatDisplayTypeForScope = (scope, api) => {
|
|
|
143
143
|
if ('DataTypes' in scope && scope.DataTypes.length == 1 && scope.DataTypes[0] == 'String') {
|
|
144
144
|
return 'String';
|
|
145
145
|
}
|
|
146
|
+
if ('ColumnTypes' in scope && scope.ColumnTypes.length) {
|
|
147
|
+
// need to check if all column with this column type has the same data type and return that particular one
|
|
148
|
+
const columns = scope.ColumnTypes.flatMap((columnType) => {
|
|
149
|
+
return api.columnApi.getColumnsByColumnType(columnType);
|
|
150
|
+
});
|
|
151
|
+
// check if all have the same type
|
|
152
|
+
if (columns.length &&
|
|
153
|
+
columns.every((column) => column.dataType === columns[0].dataType) &&
|
|
154
|
+
// supported data types
|
|
155
|
+
['Number', 'Date', 'String'].includes(columns[0].dataType)) {
|
|
156
|
+
return columns[0].dataType;
|
|
157
|
+
}
|
|
158
|
+
}
|
|
146
159
|
return undefined;
|
|
147
160
|
};
|
|
148
161
|
const renderDateFormat = (data, _onChange, setFormatOption, scopedCustomFormatters) => {
|
|
@@ -189,7 +202,7 @@ const renderDateFormat = (data, _onChange, setFormatOption, scopedCustomFormatte
|
|
|
189
202
|
] })))))));
|
|
190
203
|
};
|
|
191
204
|
const renderNumberFormat = (data, onChange, setFormatOption, scopedCustomFormatters, formatColumnApi) => {
|
|
192
|
-
var _a, _b, _c;
|
|
205
|
+
var _a, _b, _c, _d, _e;
|
|
193
206
|
if (data.DisplayFormat.Formatter !== 'NumberFormatter') {
|
|
194
207
|
return null;
|
|
195
208
|
}
|
|
@@ -248,13 +261,13 @@ const renderNumberFormat = (data, onChange, setFormatOption, scopedCustomFormatt
|
|
|
248
261
|
React.createElement(Flex, { flexDirection: "row" },
|
|
249
262
|
React.createElement(FormLayout, { mr: 3 },
|
|
250
263
|
React.createElement(FormRow, { label: "Fraction Separator" },
|
|
251
|
-
React.createElement(Input, { "data-name": "fraction-separator", value: data.DisplayFormat.Options.FractionSeparator, onChange: (e) => setFormatOption('FractionSeparator', e.currentTarget.value) })),
|
|
264
|
+
React.createElement(Input, { "data-name": "fraction-separator", value: (_a = data.DisplayFormat.Options.FractionSeparator) !== null && _a !== void 0 ? _a : '', onChange: (e) => setFormatOption('FractionSeparator', e.currentTarget.value) })),
|
|
252
265
|
React.createElement(FormRow, { label: "Integer Separator" },
|
|
253
|
-
React.createElement(Input, { "data-name": "integer-separator", value: data.DisplayFormat.Options.IntegerSeparator, onChange: (e) => setFormatOption('IntegerSeparator', e.currentTarget.value) })),
|
|
266
|
+
React.createElement(Input, { "data-name": "integer-separator", value: (_b = data.DisplayFormat.Options.IntegerSeparator) !== null && _b !== void 0 ? _b : '', onChange: (e) => setFormatOption('IntegerSeparator', e.currentTarget.value) })),
|
|
254
267
|
React.createElement(FormRow, { label: "Prefix" },
|
|
255
|
-
React.createElement(Input, { "data-name": "prefix", value: (
|
|
268
|
+
React.createElement(Input, { "data-name": "prefix", value: (_c = data.DisplayFormat.Options.Prefix) !== null && _c !== void 0 ? _c : '', onChange: (e) => setFormatOption('Prefix', e.currentTarget.value) })),
|
|
256
269
|
React.createElement(FormRow, { label: "Suffix" },
|
|
257
|
-
React.createElement(Input, { "data-name": "suffix", value: (
|
|
270
|
+
React.createElement(Input, { "data-name": "suffix", value: (_d = data.DisplayFormat.Options.Suffix) !== null && _d !== void 0 ? _d : '', onChange: (e) => setFormatOption('Suffix', e.currentTarget.value) })),
|
|
258
271
|
React.createElement(FormRow, { label: "Truncate" },
|
|
259
272
|
React.createElement(CheckBox, { "data-name": "truncate-checkbox", checked: data.DisplayFormat.Options.Truncate, onChange: (checked) => setFormatOption('Truncate', checked) })),
|
|
260
273
|
React.createElement(FormRow, { label: "Ceiling" },
|
|
@@ -279,7 +292,7 @@ const renderNumberFormat = (data, onChange, setFormatOption, scopedCustomFormatt
|
|
|
279
292
|
React.createElement(Input, { "data-name": "multiplier", type: "number", value: data.DisplayFormat.Options.Multiplier, onChange: (e) => setFormatOption('Multiplier', Number(e.currentTarget.value)) })),
|
|
280
293
|
' ',
|
|
281
294
|
React.createElement(FormRow, { label: "Content" },
|
|
282
|
-
React.createElement(Input, { "data-name": "content", value: (
|
|
295
|
+
React.createElement(Input, { "data-name": "content", value: (_e = data.DisplayFormat.Options.Content) !== null && _e !== void 0 ? _e : '', onChange: (e) => setFormatOption('Content', e.currentTarget.value) })),
|
|
283
296
|
' ',
|
|
284
297
|
React.createElement(FormRow, { label: "Parentheses" },
|
|
285
298
|
React.createElement(CheckBox, { "data-name": "parentheses-checkbox", checked: data.DisplayFormat.Options.Parentheses, onChange: (checked) => setFormatOption('Parentheses', checked) })),
|
|
@@ -397,7 +410,7 @@ export const FormatColumnFormatWizardSection = (props) => {
|
|
|
397
410
|
update({ DisplayFormat });
|
|
398
411
|
};
|
|
399
412
|
const Type = data.DisplayFormat && data.DisplayFormat.Formatter;
|
|
400
|
-
const customScopedFormatters = customDisplayFormatters.filter((displayFormatter) => adaptable.api.
|
|
413
|
+
const customScopedFormatters = customDisplayFormatters.filter((displayFormatter) => adaptable.api.columnScopeApi.isScopeInScope(data.Scope, displayFormatter.scope));
|
|
401
414
|
if (Type === 'NumberFormatter') {
|
|
402
415
|
return renderNumberFormat(data, update, setFormatOption, customScopedFormatters, formatColumnApi);
|
|
403
416
|
}
|