@adaptabletools/adaptable-cjs 18.0.0-canary.2 → 18.0.0-canary.21
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/agGrid.d.ts +4 -21
- package/agGrid.js +5 -21
- package/base.css +22 -8
- package/base.css.map +1 -1
- package/index.css +101 -75
- package/index.css.map +1 -1
- package/package.json +4 -5
- package/src/AdaptableInterfaces/IAdaptable.d.ts +59 -108
- package/src/AdaptableOptions/AdaptableOptions.d.ts +7 -7
- package/src/AdaptableOptions/ColumnFilterOptions.d.ts +11 -4
- package/src/AdaptableOptions/ColumnOptions.d.ts +9 -4
- package/src/AdaptableOptions/CommentOptions.d.ts +33 -0
- package/src/AdaptableOptions/GroupingOptions.d.ts +0 -7
- package/src/AdaptableOptions/MenuOptions.d.ts +6 -54
- package/src/AdaptableOptions/MenuOptions.js +72 -75
- package/src/AdaptableOptions/{NotesOptions.d.ts → NoteOptions.d.ts} +7 -4
- package/src/AdaptableOptions/StateOptions.d.ts +6 -0
- package/src/AdaptableOptions/UserInterfaceOptions.d.ts +17 -0
- package/src/Api/AdaptableApi.d.ts +9 -4
- package/src/Api/BulkUpdateApi.d.ts +0 -5
- package/src/Api/ColumnApi.d.ts +4 -0
- package/src/Api/CommentApi.d.ts +13 -14
- package/src/Api/ConfigApi.d.ts +4 -5
- package/src/Api/EventApi.d.ts +7 -9
- package/src/Api/Events/AdaptableReady.d.ts +3 -3
- package/src/Api/Events/CommentChanged.d.ts +11 -0
- package/src/Api/Events/GridDataChanged.d.ts +4 -4
- package/src/Api/GridApi.d.ts +23 -13
- package/src/Api/Implementation/ActionColumnApiImpl.d.ts +2 -0
- package/src/Api/Implementation/ActionColumnApiImpl.js +30 -0
- package/src/Api/Implementation/AdaptableApiImpl.d.ts +3 -2
- package/src/Api/Implementation/AdaptableApiImpl.js +5 -2
- package/src/Api/Implementation/ApiBase.d.ts +5 -3
- package/src/Api/Implementation/ApiBase.js +8 -2
- package/src/Api/Implementation/BulkUpdateApiImpl.d.ts +0 -1
- package/src/Api/Implementation/BulkUpdateApiImpl.js +0 -4
- package/src/Api/Implementation/CellSummaryApiImpl.d.ts +0 -5
- package/src/Api/Implementation/CellSummaryApiImpl.js +2 -23
- package/src/Api/Implementation/ColumnApiImpl.d.ts +1 -0
- package/src/Api/Implementation/ColumnApiImpl.js +10 -0
- package/src/Api/Implementation/CommentsApiImpl.d.ts +5 -2
- package/src/Api/Implementation/CommentsApiImpl.js +7 -1
- package/src/Api/Implementation/ConfigApiImpl.d.ts +2 -2
- package/src/Api/Implementation/ConfigApiImpl.js +24 -13
- package/src/Api/Implementation/GridApiImpl.d.ts +6 -3
- package/src/Api/Implementation/GridApiImpl.js +51 -14
- package/src/Api/Implementation/LayoutApiImpl.d.ts +3 -0
- package/src/Api/Implementation/LayoutApiImpl.js +18 -0
- package/src/Api/Implementation/NoteApiImpl.d.ts +18 -0
- package/src/Api/Implementation/NoteApiImpl.js +45 -0
- package/src/Api/Implementation/OptionsApiImpl.d.ts +4 -4
- package/src/Api/Implementation/OptionsApiImpl.js +4 -4
- package/src/Api/Implementation/ScopeApiImpl.d.ts +2 -0
- package/src/Api/Implementation/ScopeApiImpl.js +20 -7
- package/src/Api/Implementation/StatusBarApiImpl.d.ts +0 -1
- package/src/Api/Implementation/StatusBarApiImpl.js +0 -3
- package/src/Api/Implementation/ToolPanelApiImpl.js +6 -6
- package/src/Api/Implementation/UserInterfaceApiImpl.d.ts +0 -3
- package/src/Api/Implementation/UserInterfaceApiImpl.js +0 -8
- package/src/Api/Internal/ActionRowInternalApi.d.ts +6 -1
- package/src/Api/Internal/ActionRowInternalApi.js +119 -1
- package/src/Api/Internal/AdaptableInternalApi.d.ts +6 -7
- package/src/Api/Internal/AdaptableInternalApi.js +21 -19
- package/src/Api/Internal/CalculatedColumnInternalApi.d.ts +2 -0
- package/src/Api/Internal/CalculatedColumnInternalApi.js +72 -0
- package/src/Api/Internal/ColumnFilterInternalApi.d.ts +2 -0
- package/src/Api/Internal/ColumnFilterInternalApi.js +23 -1
- package/src/Api/Internal/ColumnInternalApi.d.ts +4 -1
- package/src/Api/Internal/ColumnInternalApi.js +12 -0
- package/src/Api/Internal/CommentsInternalApi.d.ts +4 -0
- package/src/Api/Internal/CommentsInternalApi.js +18 -0
- package/src/Api/Internal/CustomSortInternalApi.d.ts +3 -2
- package/src/Api/Internal/CustomSortInternalApi.js +32 -1
- package/src/Api/Internal/DataSetInternalApi.js +1 -1
- package/src/Api/Internal/ExportInternalApi.d.ts +2 -1
- package/src/Api/Internal/ExportInternalApi.js +4 -1
- package/src/Api/Internal/Fdc3InternalApi.js +2 -2
- package/src/Api/Internal/FormatColumnInternalApi.js +3 -2
- package/src/Api/Internal/FreeTextColumnInternalApi.d.ts +2 -0
- package/src/Api/Internal/FreeTextColumnInternalApi.js +61 -0
- package/src/Api/Internal/GridFilterInternalApi.d.ts +5 -0
- package/src/Api/Internal/GridFilterInternalApi.js +7 -1
- package/src/Api/Internal/GridInternalApi.d.ts +23 -3
- package/src/Api/Internal/GridInternalApi.js +141 -7
- package/src/Api/Internal/LayoutInternalApi.d.ts +1 -0
- package/src/Api/Internal/LayoutInternalApi.js +16 -0
- package/src/Api/Internal/NoteInternalApi.d.ts +4 -0
- package/src/Api/Internal/NoteInternalApi.js +18 -0
- package/src/Api/Internal/TeamSharingInternalApi.js +1 -1
- package/src/Api/InteropioPluginApi.d.ts +2 -2
- package/src/Api/LayoutApi.d.ts +15 -0
- package/src/Api/NoteApi.d.ts +48 -0
- package/src/Api/OptionsApi.d.ts +8 -8
- package/src/Api/ScopeApi.d.ts +10 -0
- package/src/Api/UserInterfaceApi.d.ts +0 -11
- package/src/EnvVars.d.ts +3 -0
- package/src/EnvVars.js +8 -0
- package/src/PredefinedConfig/AdaptableState.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/AdaptableScope.d.ts +4 -1
- package/src/PredefinedConfig/Common/AggregationColumns.d.ts +1 -0
- package/src/PredefinedConfig/Common/AggregationColumns.js +5 -1
- package/src/PredefinedConfig/Common/DataUpdateConfig.d.ts +4 -0
- package/src/PredefinedConfig/Common/Enums.d.ts +2 -1
- package/src/PredefinedConfig/Common/Enums.js +1 -0
- package/src/PredefinedConfig/Common/Menu.d.ts +15 -1
- package/src/PredefinedConfig/Common/Menu.js +98 -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/Types.d.ts +4 -4
- package/src/PredefinedConfig/Common/Types.js +4 -1
- package/src/PredefinedConfig/LayoutState.d.ts +5 -0
- package/src/PredefinedConfig/{NotesState.d.ts → NoteState.d.ts} +12 -22
- package/src/PredefinedConfig/PredefinedConfig.d.ts +3 -3
- package/src/PredefinedConfig/Selection/GridCell.d.ts +13 -0
- package/src/PredefinedConfig/SystemState.d.ts +9 -3
- 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/NoteRedux.js +89 -0
- package/src/Redux/ActionsReducers/SystemRedux.d.ts +6 -1
- package/src/Redux/ActionsReducers/SystemRedux.js +19 -6
- package/src/Redux/Store/AdaptableStore.d.ts +4 -6
- package/src/Redux/Store/AdaptableStore.js +66 -76
- package/src/Redux/Store/Interface/IAdaptableStore.d.ts +8 -2
- package/src/Strategy/AdaptableModuleBase.d.ts +8 -8
- package/src/Strategy/AdaptableModuleBase.js +13 -15
- package/src/Strategy/AlertModule.d.ts +1 -2
- package/src/Strategy/AlertModule.js +3 -56
- package/src/Strategy/BulkUpdateModule.js +1 -1
- package/src/Strategy/CalculatedColumnModule.d.ts +2 -3
- package/src/Strategy/CalculatedColumnModule.js +6 -26
- package/src/Strategy/CellSummaryModule.d.ts +8 -6
- package/src/Strategy/CellSummaryModule.js +78 -23
- package/src/Strategy/ChartingModule.d.ts +0 -1
- package/src/Strategy/ChartingModule.js +2 -22
- package/src/Strategy/ColumnFilterModule.d.ts +2 -3
- package/src/Strategy/ColumnFilterModule.js +44 -103
- package/src/Strategy/ColumnInfoModule.js +2 -0
- package/src/Strategy/{CommentsModule.d.ts → CommentModule.d.ts} +2 -5
- package/src/Strategy/{CommentsModule.js → CommentModule.js} +19 -25
- package/src/Strategy/CustomSortModule.js +3 -2
- package/src/Strategy/DashboardModule.d.ts +1 -2
- package/src/Strategy/DashboardModule.js +9 -15
- package/src/Strategy/DataChangeHistoryModule.d.ts +1 -0
- package/src/Strategy/DataChangeHistoryModule.js +3 -1
- package/src/Strategy/DataImportModule.d.ts +1 -1
- package/src/Strategy/DataImportModule.js +5 -5
- package/src/Strategy/DataSetModule.d.ts +1 -1
- package/src/Strategy/DataSetModule.js +1 -1
- package/src/Strategy/ExportModule.d.ts +1 -0
- package/src/Strategy/ExportModule.js +17 -2
- package/src/Strategy/Fdc3Module.js +3 -0
- package/src/Strategy/FlashingCellModule.d.ts +1 -2
- package/src/Strategy/FlashingCellModule.js +6 -19
- package/src/Strategy/FormatColumnModule.d.ts +0 -2
- package/src/Strategy/FormatColumnModule.js +6 -51
- package/src/Strategy/FreeTextColumnModule.d.ts +0 -1
- package/src/Strategy/FreeTextColumnModule.js +1 -31
- package/src/Strategy/GridFilterModule.d.ts +0 -1
- package/src/Strategy/GridFilterModule.js +0 -37
- package/src/Strategy/GridInfoModule.js +2 -0
- package/src/Strategy/Interface/IModule.d.ts +0 -1
- package/src/Strategy/LayoutModule.d.ts +9 -3
- package/src/Strategy/LayoutModule.js +148 -62
- package/src/Strategy/NamedQueryModule.d.ts +0 -1
- package/src/Strategy/NamedQueryModule.js +0 -19
- package/src/Strategy/{NotesModule.d.ts → NoteModule.d.ts} +2 -1
- package/src/Strategy/NoteModule.js +62 -0
- package/src/Strategy/PlusMinusModule.d.ts +1 -1
- package/src/Strategy/PlusMinusModule.js +2 -2
- package/src/Strategy/ScheduleModule.d.ts +1 -1
- package/src/Strategy/ScheduleModule.js +1 -1
- package/src/Strategy/SettingsPanelModule.js +3 -3
- package/src/Strategy/ShortcutModule.d.ts +1 -1
- package/src/Strategy/ShortcutModule.js +1 -1
- package/src/Strategy/SmartEditModule.js +1 -1
- package/src/Strategy/StyledColumnModule.d.ts +1 -1
- package/src/Strategy/StyledColumnModule.js +26 -26
- package/src/Strategy/SystemStatusModule.js +2 -2
- package/src/Strategy/TeamSharingModule.d.ts +1 -0
- package/src/Strategy/TeamSharingModule.js +5 -5
- package/src/Strategy/ToolPanelModule.d.ts +0 -1
- package/src/Strategy/ToolPanelModule.js +0 -23
- package/src/Strategy/Utilities/getScopeViewItems.js +3 -0
- package/src/Utilities/Constants/DocumentationLinkConstants.js +1 -1
- 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 +7 -6
- package/src/Utilities/ExpressionFunctions/aggregatedScalarExpressionFunctions.d.ts +3 -2
- package/src/Utilities/ExpressionFunctions/aggregatedScalarExpressionFunctions.js +430 -1
- 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 -4
- package/src/Utilities/Helpers/AdaptableHelper.js +20 -60
- package/src/Utilities/Helpers/Helper.d.ts +2 -0
- package/src/Utilities/Helpers/Helper.js +6 -1
- package/src/Utilities/MenuItem.d.ts +7 -4
- package/src/Utilities/MenuItem.js +6 -3
- package/src/Utilities/ObjectFactory.d.ts +3 -3
- package/src/Utilities/ObjectFactory.js +4 -24
- package/src/Utilities/Services/AggregatedScalarLiveValue.d.ts +4 -2
- package/src/Utilities/Services/AggregatedScalarLiveValue.js +26 -19
- package/src/Utilities/Services/CellPopupService.js +2 -3
- 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.d.ts +3 -0
- package/src/Utilities/Services/LicenseService/index.js +1 -186
- package/src/Utilities/Services/MetamodelService.d.ts +1 -1
- package/src/Utilities/Services/MetamodelService.js +6 -3
- package/src/Utilities/Services/ModuleService.js +4 -0
- 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 +238 -22
- package/src/Utilities/Services/RowEditService.d.ts +3 -2
- package/src/Utilities/Services/RowEditService.js +3 -1
- 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/AdaptableView.js +1 -3
- package/src/View/AdaptableViewFactory.js +2 -2
- package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/ConfigurationWizard.js +2 -2
- package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/UIOptions/UIOptionsStatusbarForm.js +1 -1
- package/src/View/BulkUpdate/BulkUpdatePopup.js +1 -1
- package/src/View/CalculatedColumn/Wizard/CalculatedColumnWizard.js +3 -3
- package/src/View/CalculatedColumn/utils.d.ts +1 -1
- package/src/View/CellSummary/CellSummaryPopup.js +1 -1
- package/src/View/Comments/CommentsEditor.js +24 -11
- package/src/View/Comments/CommentsPopup.js +20 -11
- 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 +5 -2
- 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.js +34 -1
- package/src/View/Components/Popups/AdaptableLoadingScreen.d.ts +6 -5
- package/src/View/Components/Popups/AdaptableLoadingScreen.js +19 -9
- package/src/View/Components/Popups/AdaptableToaster.js +1 -1
- package/src/View/Components/Popups/GridCellPopup/GridCellPopup.js +7 -7
- package/src/View/Components/Popups/WindowPopups/windowFactory.d.ts +1 -0
- package/src/View/Components/Popups/WindowPopups/windowFactory.js +4 -1
- package/src/View/Components/Selectors/PermittedValuesSelector.js +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/CustomSortSummary.js +1 -1
- package/src/View/DataChangeHistory/DataChangeHistoryGrid.js +8 -9
- package/src/View/FreeTextColumn/FreeTextColumnSummary.js +1 -1
- package/src/View/FreeTextColumn/Wizard/FreeTextColumnWizard.js +3 -1
- package/src/View/GridFilter/GridFilterViewPanel.js +9 -5
- package/src/View/GridFilter/useGridFilterExpressionEditor.js +1 -1
- package/src/View/GridInfo/GridInfoPopup/GridInfoPopup.js +2 -3
- package/src/View/Layout/LayoutViewPanel.js +2 -1
- package/src/View/Layout/TransposedPopup.d.ts +3 -0
- package/src/View/Layout/TransposedPopup.js +200 -0
- package/src/View/Layout/Wizard/LayoutWizard.js +36 -3
- package/src/View/Layout/Wizard/sections/ColumnsSection.js +1 -1
- 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} +19 -19
- package/src/View/SpecialColumnSettingsWizardStep.js +4 -4
- package/src/View/Theme/ThemeSelector.js +2 -2
- package/src/agGrid/ActionColumnRenderer.js +7 -6
- package/src/agGrid/Adaptable.d.ts +3 -455
- package/src/agGrid/Adaptable.js +7 -5291
- package/src/agGrid/AdaptableAgGrid.d.ts +354 -0
- package/src/agGrid/AdaptableAgGrid.js +3972 -0
- package/src/agGrid/AdaptableLogger.js +78 -13
- package/src/agGrid/AgGridAdapter.d.ts +64 -0
- package/src/agGrid/AgGridAdapter.js +590 -0
- package/src/agGrid/AgGridColumnAdapter.d.ts +56 -0
- package/src/agGrid/AgGridColumnAdapter.js +836 -0
- package/src/agGrid/AgGridMenuAdapter.d.ts +28 -0
- package/src/agGrid/AgGridMenuAdapter.js +282 -0
- package/src/agGrid/AgGridOptionsService.d.ts +15 -0
- package/src/agGrid/AgGridOptionsService.js +80 -0
- package/src/agGrid/BadgeRenderer.js +1 -1
- package/src/agGrid/CheckboxRenderer.js +1 -1
- package/src/agGrid/FilterWrapper.d.ts +2 -2
- package/src/agGrid/FilterWrapper.js +1 -1
- package/src/agGrid/attachAddaptableColumnTypes.d.ts +12 -12
- package/src/agGrid/defaultAdaptableOptions.d.ts +3 -0
- package/src/{Utilities/Defaults/DefaultAdaptableOptions.js → agGrid/defaultAdaptableOptions.js} +74 -18
- package/src/agGrid/editors/AdaptableDateEditor/index.d.ts +1 -1
- package/src/agGrid/editors/AdaptableDateEditor/index.js +3 -3
- package/src/agGrid/editors/AdaptableNumberEditor/index.d.ts +2 -2
- package/src/agGrid/editors/AdaptableNumberEditor/index.js +2 -2
- package/src/agGrid/weightedAverage.d.ts +0 -2
- package/src/agGrid/weightedAverage.js +1 -56
- 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/InfiniteTable/index.js +2 -2
- package/src/components/Input/index.d.ts +1 -2
- package/src/components/List/ListGroupItem/index.d.ts +1 -1
- package/src/components/Modal/index.d.ts +1 -0
- package/src/components/Modal/index.js +6 -4
- package/src/components/Select/Select.d.ts +3 -1
- package/src/components/Select/Select.js +4 -2
- package/src/components/Textarea/index.d.ts +2 -2
- package/src/components/icons/index.js +2 -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/env.js +2 -2
- package/src/metamodel/adaptable.metamodel.d.ts +179 -25
- package/src/metamodel/adaptable.metamodel.js +1 -9316
- package/src/migration/AdaptableUpgradeHelper.d.ts +38 -0
- package/src/migration/AdaptableUpgradeHelper.js +52 -0
- package/src/migration/VersionUpgrade.d.ts +8 -0
- package/src/migration/VersionUpgrade.js +15 -0
- package/src/migration/VersionUpgrade17.d.ts +18 -0
- package/src/migration/VersionUpgrade17.js +347 -0
- package/src/migration/VersionUpgrade18.d.ts +5 -0
- package/src/migration/VersionUpgrade18.js +10 -0
- package/src/parser/src/parser.js +117 -1257
- package/src/parser/src/predicate/mapExpressionToQlPredicate.js +1 -1
- package/src/parser/src/predicate/mapQlPredicateToExpression.js +2 -1
- package/src/parser/src/types.d.ts +7 -2
- package/src/types.d.ts +26 -19
- package/tsconfig.cjs.tsbuildinfo +1 -1
- package/src/AdaptableOptions/CommentsOptions.d.ts +0 -28
- package/src/Api/Events/CommentsChangedInfo.d.ts +0 -5
- package/src/Api/Implementation/NotesApiImpl.d.ts +0 -16
- package/src/Api/Implementation/NotesApiImpl.js +0 -44
- 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 -39
- package/src/Redux/ActionsReducers/NotesRedux.js +0 -87
- package/src/Strategy/NotesModule.js +0 -62
- package/src/Utilities/Defaults/DefaultAdaptableOptions.d.ts +0 -2
- package/src/Utilities/Services/Interface/IRowEditService.d.ts +0 -3
- 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/agGrid/agGridHelper.d.ts +0 -57
- package/src/agGrid/agGridHelper.js +0 -691
- package/src/agGrid/agGridMenuHelper.d.ts +0 -46
- package/src/agGrid/agGridMenuHelper.js +0 -673
- /package/src/AdaptableOptions/{CommentsOptions.js → CommentOptions.js} +0 -0
- /package/src/AdaptableOptions/{NotesOptions.js → NoteOptions.js} +0 -0
- /package/src/Api/Events/{CommentsChangedInfo.js → CommentChanged.js} +0 -0
- /package/src/Api/{NotesApi.js → NoteApi.js} +0 -0
- /package/src/PredefinedConfig/{NotesState.js → Common/TransposeConfig.js} +0 -0
- /package/src/{Utilities/Services/Interface/IRowEditService.js → PredefinedConfig/NoteState.js} +0 -0
- /package/src/View/{Notes → Note}/NoteEditor.d.ts +0 -0
- /package/src/View/{Notes → Note}/NoteEditor.js +0 -0
|
@@ -1,186 +1 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.LicenseService = exports.LicenseValidityType = void 0;
|
|
4
|
-
const tslib_1 = require("tslib");
|
|
5
|
-
const SystemRedux_1 = require("../../../Redux/ActionsReducers/SystemRedux");
|
|
6
|
-
const PopupRedux_1 = require("../../../Redux/ActionsReducers/PopupRedux");
|
|
7
|
-
const ObjectFactory_1 = tslib_1.__importDefault(require("../../ObjectFactory"));
|
|
8
|
-
const clamp_1 = tslib_1.__importDefault(require("lodash/clamp"));
|
|
9
|
-
const DocumentationLinkConstants_1 = require("../../Constants/DocumentationLinkConstants");
|
|
10
|
-
const decode_1 = require("../../license/decode");
|
|
11
|
-
const shouldLogThankYouMessage_1 = require("./shouldLogThankYouMessage");
|
|
12
|
-
const EMAIL = 'sales@adaptabletools.com';
|
|
13
|
-
const COMMERCIAL_LICENSE_SHOW_INFO_DAYS_BEFORE_EXPIRE = 10;
|
|
14
|
-
const DAY_IN_MS = 1000 * 60 * 60 * 24;
|
|
15
|
-
var LicenseValidityType;
|
|
16
|
-
(function (LicenseValidityType) {
|
|
17
|
-
LicenseValidityType["INVALID_LICENSE"] = "INVALID_LICENSE";
|
|
18
|
-
LicenseValidityType["NO_LICENSE"] = "NO_LICENSE";
|
|
19
|
-
LicenseValidityType["NON_PRODUCTION_VALID"] = "NON_PRODUCTION_VALID";
|
|
20
|
-
LicenseValidityType["NON_PRODUCTION_EXPIRED_IN_SCOPE"] = "NON_PRODUCTION_EXPIRED_IN_SCOPE";
|
|
21
|
-
LicenseValidityType["NON_PRODUCTION_EXPIRED_OUT_OF_SCOPE"] = "NON_PRODUCTION_EXPIRED_OUT_OF_SCOPE";
|
|
22
|
-
LicenseValidityType["COMMERCIAL_VALID"] = "COMMERCIAL_VALID";
|
|
23
|
-
LicenseValidityType["COMMERCIAL_EXPIRED_IN_SCOPE"] = "COMMERCIAL_EXPIRED_IN_SCOPE";
|
|
24
|
-
LicenseValidityType["COMMERCIAL_EXPIRED_OUT_OF_SCOPE"] = "COMMERCIAL_EXPIRED_OUT_OF_SCOPE";
|
|
25
|
-
})(LicenseValidityType = exports.LicenseValidityType || (exports.LicenseValidityType = {}));
|
|
26
|
-
const SANDPACK_REGEX = /(https):\/\/\d+\-\d+\-\d+\-(sandpack\.codesandbox\.io)/g;
|
|
27
|
-
const SANDBOX_REGEX = /(https):\/\/\S+(\.csb\.app)/g;
|
|
28
|
-
const DEMO_REGEX = /(https):\/\/\S+(\.adaptabletools\.com)/g;
|
|
29
|
-
const origin = typeof window !== 'undefined' ? window.location.origin : '';
|
|
30
|
-
const isInsideSandpack = () => {
|
|
31
|
-
const [_fullUrl, protocol, sandpackUrl] = Array.from(SANDPACK_REGEX.exec(origin) || []);
|
|
32
|
-
return protocol === 'https' && sandpackUrl === 'sandpack.codesandbox.io';
|
|
33
|
-
};
|
|
34
|
-
const isInsideSandbox = () => {
|
|
35
|
-
const [_fullUrl, protocol, sandboxUrl] = Array.from(SANDBOX_REGEX.exec(origin) || []);
|
|
36
|
-
return protocol === 'https' && sandboxUrl === '.csb.app';
|
|
37
|
-
};
|
|
38
|
-
const isDemoApp = () => {
|
|
39
|
-
const [_fullUrl, protocol, demoAppUrl] = Array.from(DEMO_REGEX.exec(origin) || []);
|
|
40
|
-
return protocol === 'https' && demoAppUrl === '.adaptabletools.com';
|
|
41
|
-
};
|
|
42
|
-
class LicenseService {
|
|
43
|
-
constructor(adaptable, licenseKey, packageDetails) {
|
|
44
|
-
this.adaptable = adaptable;
|
|
45
|
-
this.adaptable = adaptable;
|
|
46
|
-
let details = null;
|
|
47
|
-
if (licenseKey) {
|
|
48
|
-
try {
|
|
49
|
-
details = (0, decode_1.decode)(licenseKey);
|
|
50
|
-
}
|
|
51
|
-
catch (error) {
|
|
52
|
-
details = error;
|
|
53
|
-
}
|
|
54
|
-
}
|
|
55
|
-
if (!isInsideSandpack() && !isInsideSandbox() && !isDemoApp()) {
|
|
56
|
-
this.handleLicenseValidation(details, this.getValidityType(details, packageDetails));
|
|
57
|
-
}
|
|
58
|
-
}
|
|
59
|
-
getValidityType(details, packageDetails) {
|
|
60
|
-
if (!details) {
|
|
61
|
-
return LicenseValidityType.NO_LICENSE;
|
|
62
|
-
}
|
|
63
|
-
if (details instanceof Error) {
|
|
64
|
-
return LicenseValidityType.INVALID_LICENSE;
|
|
65
|
-
}
|
|
66
|
-
const currentVersionReleaseDate = new Date(packageDetails.publishedAt);
|
|
67
|
-
const licenseEndDate = new Date(details.end);
|
|
68
|
-
const currentDate = new Date();
|
|
69
|
-
const isExpired = licenseEndDate < currentDate;
|
|
70
|
-
const isTrial = details.trial;
|
|
71
|
-
const isScope = licenseEndDate > currentVersionReleaseDate;
|
|
72
|
-
let validityType = null;
|
|
73
|
-
if (isExpired) {
|
|
74
|
-
if (isScope) {
|
|
75
|
-
if (isTrial) {
|
|
76
|
-
validityType = LicenseValidityType.NON_PRODUCTION_EXPIRED_IN_SCOPE;
|
|
77
|
-
}
|
|
78
|
-
else {
|
|
79
|
-
validityType = LicenseValidityType.COMMERCIAL_EXPIRED_IN_SCOPE;
|
|
80
|
-
}
|
|
81
|
-
}
|
|
82
|
-
else {
|
|
83
|
-
if (isTrial) {
|
|
84
|
-
validityType = LicenseValidityType.NON_PRODUCTION_EXPIRED_OUT_OF_SCOPE;
|
|
85
|
-
}
|
|
86
|
-
else {
|
|
87
|
-
validityType = LicenseValidityType.COMMERCIAL_EXPIRED_OUT_OF_SCOPE;
|
|
88
|
-
}
|
|
89
|
-
}
|
|
90
|
-
}
|
|
91
|
-
else {
|
|
92
|
-
if (isTrial) {
|
|
93
|
-
validityType = LicenseValidityType.NON_PRODUCTION_VALID;
|
|
94
|
-
}
|
|
95
|
-
else {
|
|
96
|
-
validityType = LicenseValidityType.COMMERCIAL_VALID;
|
|
97
|
-
}
|
|
98
|
-
}
|
|
99
|
-
return validityType;
|
|
100
|
-
}
|
|
101
|
-
handleLicenseValidation(details, validityType) {
|
|
102
|
-
var _a;
|
|
103
|
-
const nowAtMidnight = new Date();
|
|
104
|
-
nowAtMidnight.setHours(0, 0, 0, 0);
|
|
105
|
-
let daysLeft = 0;
|
|
106
|
-
if (!(details instanceof Error) && (details === null || details === void 0 ? void 0 : details.end)) {
|
|
107
|
-
daysLeft = Math.floor((((_a = details === null || details === void 0 ? void 0 : details.end) === null || _a === void 0 ? void 0 : _a.getTime()) - nowAtMidnight.getTime()) / DAY_IN_MS);
|
|
108
|
-
daysLeft = (0, clamp_1.default)(daysLeft, 0, Infinity);
|
|
109
|
-
}
|
|
110
|
-
let APP_NAME = '';
|
|
111
|
-
let forApp = '';
|
|
112
|
-
if (details &&
|
|
113
|
-
!(details instanceof Error) &&
|
|
114
|
-
details.appName &&
|
|
115
|
-
details.appName != decode_1.GENERIC_APP_NAME) {
|
|
116
|
-
APP_NAME = details.appName;
|
|
117
|
-
forApp = ` for application [APP_NAME]`;
|
|
118
|
-
}
|
|
119
|
-
const annotateMessage = (message, link = DocumentationLinkConstants_1.LicenseDocsLink, email = EMAIL, days = daysLeft, appName = APP_NAME) => {
|
|
120
|
-
return message
|
|
121
|
-
.replace('[LINK]', link)
|
|
122
|
-
.replace('[EMAIL]', email)
|
|
123
|
-
.replace('[APP_NAME]', appName)
|
|
124
|
-
.replace('[DAYS]', `${days}`);
|
|
125
|
-
};
|
|
126
|
-
switch (validityType) {
|
|
127
|
-
case 'NO_LICENSE':
|
|
128
|
-
case 'NON_PRODUCTION_EXPIRED_OUT_OF_SCOPE':
|
|
129
|
-
this.adaptable.logger.consoleLogByMessageType(annotateMessage('This instance of AdapTable does not have a license, and some functionality has therefore been removed. In order to use a fully-featured version of AdapTable, please contact [EMAIL]. You can learn more about the different AdapTable license options at [LINK].'), 'Error');
|
|
130
|
-
this.showNotification('No AdapTable License found.');
|
|
131
|
-
this.showWatermark('This instance of AdapTable does not have a license, and some functionality has therefore been removed.');
|
|
132
|
-
this.disableStatePersistence();
|
|
133
|
-
break;
|
|
134
|
-
case 'INVALID_LICENSE':
|
|
135
|
-
this.adaptable.logger.consoleLogByMessageType(annotateMessage('This instance of AdapTable seems to use a corrupted License, and some functionality has therefore been removed. In order to use a fully-featured version of AdapTable, please contact [EMAIL]. You can learn more about the different AdapTable license options at [LINK].'), 'Error');
|
|
136
|
-
this.showNotification('Corrupted AdapTable License found.');
|
|
137
|
-
this.showWatermark(`This instance of AdapTable has a corrupted License, and some functionality has therefore been removed.`);
|
|
138
|
-
this.disableStatePersistence();
|
|
139
|
-
break;
|
|
140
|
-
case 'NON_PRODUCTION_VALID':
|
|
141
|
-
this.adaptable.logger.consoleLogByMessageType(annotateMessage('This AdapTable trial license expires in [DAYS] days. Please contact [EMAIL] to upgrade to a commercial version of AdapTable. You can learn more about the different AdapTable license options at [LINK].'), 'Info');
|
|
142
|
-
break;
|
|
143
|
-
case 'NON_PRODUCTION_EXPIRED_IN_SCOPE':
|
|
144
|
-
this.adaptable.logger.consoleLogByMessageType(annotateMessage('This AdapTable trial license has now expired. Please contact [EMAIL] to upgrade to a commercial version of AdapTable. You can learn more about the different AdapTable license options at [LINK].'), 'Warning');
|
|
145
|
-
this.showWatermark('AdapTable License has expired');
|
|
146
|
-
break;
|
|
147
|
-
case 'COMMERCIAL_VALID':
|
|
148
|
-
if (daysLeft <= COMMERCIAL_LICENSE_SHOW_INFO_DAYS_BEFORE_EXPIRE) {
|
|
149
|
-
this.adaptable.logger.consoleLogByMessageType(annotateMessage(`This AdapTable license${forApp} expires in [DAYS] days. Please contact [EMAIL] to renew (giving you access to Support and Updates)`), 'Info');
|
|
150
|
-
}
|
|
151
|
-
else {
|
|
152
|
-
try {
|
|
153
|
-
if ((0, shouldLogThankYouMessage_1.shouldLogThankYouMessage)()) {
|
|
154
|
-
this.adaptable.logger.consoleLogByMessageType(annotateMessage(`Thank you for using a valid AdapTable license${forApp}. Your license will expire in [DAYS] days.`), 'Info');
|
|
155
|
-
}
|
|
156
|
-
}
|
|
157
|
-
catch (ex) { }
|
|
158
|
-
}
|
|
159
|
-
break;
|
|
160
|
-
case 'COMMERCIAL_EXPIRED_IN_SCOPE':
|
|
161
|
-
this.adaptable.logger.consoleLogByMessageType(annotateMessage(`This AdapTable license${forApp} has expired. Please contact [EMAIL] if you wish to renew (giving you access to Support and Updates)`), 'Warning');
|
|
162
|
-
break;
|
|
163
|
-
case 'COMMERCIAL_EXPIRED_OUT_OF_SCOPE':
|
|
164
|
-
this.adaptable.logger.consoleLogByMessageType(annotateMessage(`This AdapTable license${forApp} has expired. Adaptable version was published after the license expired. Please contact [EMAIL] if you wish to renew your license.`), 'Error');
|
|
165
|
-
this.showNotification('Adaptable License has expired');
|
|
166
|
-
this.showWatermark('Adaptable License has expired');
|
|
167
|
-
break;
|
|
168
|
-
}
|
|
169
|
-
}
|
|
170
|
-
showNotification(text) {
|
|
171
|
-
this.adaptable.api.internalApi.dispatchReduxAction((0, PopupRedux_1.PopupShowAlert)({
|
|
172
|
-
alertType: 'generic',
|
|
173
|
-
header: 'License Error',
|
|
174
|
-
message: text,
|
|
175
|
-
alertDefinition: ObjectFactory_1.default.CreateInternalAlertDefinitionForMessages('Error'),
|
|
176
|
-
}));
|
|
177
|
-
}
|
|
178
|
-
showWatermark(text) {
|
|
179
|
-
this.adaptable.api.internalApi.dispatchReduxAction((0, SystemRedux_1.SystemLicenseShowWatermark)(text));
|
|
180
|
-
}
|
|
181
|
-
disableStatePersistence() {
|
|
182
|
-
this.adaptable.api.internalApi.dispatchReduxAction((0, SystemRedux_1.SystemLicenseDisablePersistence)());
|
|
183
|
-
}
|
|
184
|
-
destroy() { }
|
|
185
|
-
}
|
|
186
|
-
exports.LicenseService = LicenseService;
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.LicenseService=exports.LicenseValidityType=void 0;const e=require("tslib"),a=require("../../../Redux/ActionsReducers/SystemRedux"),t=require("../../../Redux/ActionsReducers/PopupRedux"),s=e.__importDefault(require("../../ObjectFactory")),i=e.__importDefault(require("lodash/clamp")),o=require("../../Constants/DocumentationLinkConstants"),n=require("../../license/decode"),r=require("./shouldLogThankYouMessage"),l="sales@adaptabletools.com",c=10,d=864e5;var p;!function(e){e.INVALID_LICENSE="INVALID_LICENSE",e.NO_LICENSE="NO_LICENSE",e.NON_PRODUCTION_VALID="NON_PRODUCTION_VALID",e.NON_PRODUCTION_EXPIRED_IN_SCOPE="NON_PRODUCTION_EXPIRED_IN_SCOPE",e.NON_PRODUCTION_EXPIRED_OUT_OF_SCOPE="NON_PRODUCTION_EXPIRED_OUT_OF_SCOPE",e.COMMERCIAL_VALID="COMMERCIAL_VALID",e.COMMERCIAL_EXPIRED_IN_SCOPE="COMMERCIAL_EXPIRED_IN_SCOPE",e.COMMERCIAL_EXPIRED_OUT_OF_SCOPE="COMMERCIAL_EXPIRED_OUT_OF_SCOPE"}(p=exports.LicenseValidityType||(exports.LicenseValidityType={}));const h=()=>"undefined"!=typeof window?window.location.origin:"",E=()=>{const e=h(),[a,t,s]=Array.from(/(https):\/\/\d+\-\d+\-\d+\-(sandpack\.codesandbox\.io)/g.exec(e)||[]);return"https"===t&&"sandpack.codesandbox.io"===s},_=()=>{const e=h(),[a,t,s]=Array.from(/(https):\/\/\S+(\.csb\.app)/g.exec(e)||[]);return"https"===t&&".csb.app"===s},I=()=>{const e=h(),[a,t,s]=Array.from(/(https):\/\/\S+(\.adaptabletools\.com)/g.exec(e)||[]);return"https"===t&&".adaptabletools.com"===s};class O{constructor(e,a,t){this.adaptable=e,this.licenseKey=a,this.packageDetails=t,this.adaptable=e,this.adaptable.api.eventApi.on("AdaptableReady",(()=>{requestAnimationFrame((()=>{this.init()}))}))}init(){let e=null;if(this.licenseKey)try{e=(0,n.decode)(this.licenseKey)}catch(a){e=a}E()||_()||I()||this.handleLicenseValidation(e,this.getValidityType(e,this.packageDetails))}getValidityType(e,a){if(!e)return p.NO_LICENSE;if(e instanceof Error)return p.INVALID_LICENSE;const t=new Date(a.publishedAt),s=new Date(e.end),i=s<new Date,o=e.trial;let n=null;return n=i?s>t?o?p.NON_PRODUCTION_EXPIRED_IN_SCOPE:p.COMMERCIAL_EXPIRED_IN_SCOPE:o?p.NON_PRODUCTION_EXPIRED_OUT_OF_SCOPE:p.COMMERCIAL_EXPIRED_OUT_OF_SCOPE:o?p.NON_PRODUCTION_VALID:p.COMMERCIAL_VALID,n}handleLicenseValidation(e,a){var t;const s=new Date;s.setHours(0,0,0,0);let p=0;e instanceof Error||!(null==e?void 0:e.end)||(p=Math.floor(((null===(t=null==e?void 0:e.end)||void 0===t?void 0:t.getTime())-s.getTime())/d),p=(0,i.default)(p,0,1/0));let h="",E="";!e||e instanceof Error||!e.appName||e.appName==n.GENERIC_APP_NAME||(h=e.appName,E=" for application [APP_NAME]");const _=(e,a=o.LicenseDocsLink,t=l,s=p,i=h)=>e.replace("[LINK]",a).replace("[EMAIL]",t).replace("[APP_NAME]",i).replace("[DAYS]",`${s}`);switch(a){case"NO_LICENSE":case"NON_PRODUCTION_EXPIRED_OUT_OF_SCOPE":this.adaptable.logger.consoleLogByMessageType(_("This instance of AdapTable does not have a license, and some functionality has therefore been removed. In order to use a fully-featured version of AdapTable, please contact [EMAIL]. You can learn more about the different AdapTable license options at [LINK]."),"Error"),this.showNotification("No AdapTable License found."),this.showWatermark("This instance of AdapTable does not have a license, and some functionality has therefore been removed."),this.disableStatePersistence();break;case"INVALID_LICENSE":this.adaptable.logger.consoleLogByMessageType(_("This instance of AdapTable seems to use a corrupted License, and some functionality has therefore been removed. In order to use a fully-featured version of AdapTable, please contact [EMAIL]. You can learn more about the different AdapTable license options at [LINK]."),"Error"),this.showNotification("Corrupted AdapTable License found."),this.showWatermark("This instance of AdapTable has a corrupted License, and some functionality has therefore been removed."),this.disableStatePersistence();break;case"NON_PRODUCTION_VALID":this.adaptable.logger.consoleLogByMessageType(_("This AdapTable trial license expires in [DAYS] days. Please contact [EMAIL] to upgrade to a commercial version of AdapTable. You can learn more about the different AdapTable license options at [LINK]."),"Info");break;case"NON_PRODUCTION_EXPIRED_IN_SCOPE":this.adaptable.logger.consoleLogByMessageType(_("This AdapTable trial license has now expired. Please contact [EMAIL] to upgrade to a commercial version of AdapTable. You can learn more about the different AdapTable license options at [LINK]."),"Warning"),this.showWatermark("AdapTable License has expired");break;case"COMMERCIAL_VALID":if(p<=c)this.adaptable.logger.consoleLogByMessageType(_(`This AdapTable license${E} expires in [DAYS] days. Please contact [EMAIL] to renew (giving you access to Support and Updates)`),"Info");else try{(0,r.shouldLogThankYouMessage)()&&this.adaptable.logger.consoleLogByMessageType(_(`Thank you for using a valid AdapTable license${E}. Your license will expire in [DAYS] days.`),"Info")}catch(e){}break;case"COMMERCIAL_EXPIRED_IN_SCOPE":this.adaptable.logger.consoleLogByMessageType(_(`This AdapTable license${E} has expired. Please contact [EMAIL] if you wish to renew (giving you access to Support and Updates)`),"Warning");break;case"COMMERCIAL_EXPIRED_OUT_OF_SCOPE":this.adaptable.logger.consoleLogByMessageType(_(`This AdapTable license${E} has expired. Adaptable version was published after the license expired. Please contact [EMAIL] if you wish to renew your license.`),"Error"),this.showNotification("Adaptable License has expired"),this.showWatermark("Adaptable License has expired")}}showNotification(e){this.adaptable.api.internalApi.dispatchReduxAction((0,t.PopupShowAlert)({alertType:"generic",header:"License Error",message:e,alertDefinition:s.default.CreateInternalAlertDefinitionForMessages("Error")}))}showWatermark(e){this.adaptable.api.internalApi.dispatchReduxAction((0,a.SystemLicenseShowWatermark)(e))}disableStatePersistence(){this.adaptable.api.internalApi.dispatchReduxAction((0,a.SystemLicenseDisablePersistence)())}destroy(){}}exports.LicenseService=O;
|
|
@@ -3,7 +3,7 @@ import { AdaptableOptions } from '../../../types';
|
|
|
3
3
|
export declare class MetamodelService implements IMetamodelService {
|
|
4
4
|
private gridInfoOptions;
|
|
5
5
|
getAdaptableOptions: () => AdaptableOptions;
|
|
6
|
-
constructor(getAdaptableOptions: () => AdaptableOptions);
|
|
6
|
+
constructor(getAdaptableOptions: () => AdaptableOptions, validateOptions?: boolean);
|
|
7
7
|
getGridInfoOptions(): GridInfoOptions;
|
|
8
8
|
getGridInfoNoCodeOptions(): GridInfoOptions;
|
|
9
9
|
validateAdaptableOptionsValues(): void;
|
|
@@ -3,17 +3,20 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.MetamodelService = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
const adaptable_metamodel_1 = require("../../metamodel/adaptable.metamodel");
|
|
6
|
-
const DefaultAdaptableOptions_1 = require("../Defaults/DefaultAdaptableOptions");
|
|
7
6
|
const DocumentationLinkConstants_1 = require("../Constants/DocumentationLinkConstants");
|
|
8
7
|
const StringExtensions_1 = tslib_1.__importDefault(require("../Extensions/StringExtensions"));
|
|
9
8
|
const AdaptableLogger_1 = require("../../agGrid/AdaptableLogger");
|
|
9
|
+
const defaultAdaptableOptions_1 = require("../../agGrid/defaultAdaptableOptions");
|
|
10
10
|
const supportedMetamodelTypes = ['s', 'n', 'b', 'a', 'f', 'R'];
|
|
11
11
|
class MetamodelService {
|
|
12
|
-
constructor(getAdaptableOptions) {
|
|
12
|
+
constructor(getAdaptableOptions, validateOptions) {
|
|
13
13
|
this.gridInfoOptions = new Map();
|
|
14
14
|
this.getAdaptableOptions = () => null;
|
|
15
15
|
this.getAdaptableOptions = getAdaptableOptions;
|
|
16
16
|
this.gridInfoOptions = this.buildGridInfoOptions();
|
|
17
|
+
if (validateOptions) {
|
|
18
|
+
this.validateAdaptableOptionsValues();
|
|
19
|
+
}
|
|
17
20
|
}
|
|
18
21
|
getGridInfoOptions() {
|
|
19
22
|
return this.gridInfoOptions;
|
|
@@ -144,7 +147,7 @@ class MetamodelService {
|
|
|
144
147
|
});
|
|
145
148
|
}
|
|
146
149
|
getAdaptableOptionsDefaultValues() {
|
|
147
|
-
return
|
|
150
|
+
return (0, defaultAdaptableOptions_1.getDefaultAdaptableOptions)();
|
|
148
151
|
}
|
|
149
152
|
getAdaptableMetamodel() {
|
|
150
153
|
return adaptable_metamodel_1.ADAPTABLE_METAMODEL;
|
|
@@ -105,6 +105,8 @@ class ModuleService {
|
|
|
105
105
|
return learnUrl + 'handbook-exporting';
|
|
106
106
|
case 'ColumnFilter':
|
|
107
107
|
return learnUrl + 'handbook-column-filter';
|
|
108
|
+
case 'Comment':
|
|
109
|
+
return learnUrl + 'handbook-comments';
|
|
108
110
|
case 'GridFilter':
|
|
109
111
|
return learnUrl + 'handbook-grid-filter';
|
|
110
112
|
case 'FlashingCell':
|
|
@@ -117,6 +119,8 @@ class ModuleService {
|
|
|
117
119
|
return learnUrl + 'handbook-monitoring-grid-info';
|
|
118
120
|
case 'Layout':
|
|
119
121
|
return learnUrl + 'handbook-layouts';
|
|
122
|
+
case 'Note':
|
|
123
|
+
return learnUrl + 'handbook-notes';
|
|
120
124
|
case 'PlusMinus':
|
|
121
125
|
return learnUrl + 'handbook-editing-plus-minus';
|
|
122
126
|
case 'NamedQuery':
|
|
@@ -16,7 +16,7 @@ export declare class QueryLanguageService implements IQueryLanguageService {
|
|
|
16
16
|
constructor(adaptableApi: AdaptableApi);
|
|
17
17
|
evaluateBooleanExpression(expression: string, module: AdaptableModule, rowNode: any): any;
|
|
18
18
|
evaluateScalarExpression(expression: string, module: AdaptableModule, rowNode: IRowNode): any;
|
|
19
|
-
evaluateAggregatedScalarExpression(expression: string, module: AdaptableModule): ScalarAggregationParameter;
|
|
19
|
+
evaluateAggregatedScalarExpression(expression: string, module: AdaptableModule, getRowNodes?: () => IRowNode[]): ScalarAggregationParameter;
|
|
20
20
|
evaluateObservableExpression(reactiveExpression: string, module: AdaptableModule): Observable<CellDataChangedInfo | GridDataChangedInfo>;
|
|
21
21
|
evaluateAggregatedBooleanExpression(aggregationExpression: string, module: AdaptableModule): BooleanAggregationParameter;
|
|
22
22
|
validateBoolean(expressionInput: string, module: AdaptableModule, config?: {
|
|
@@ -36,7 +36,7 @@ class QueryLanguageService {
|
|
|
36
36
|
// currently scalar and boolean expressions are evaluated the same
|
|
37
37
|
return this.evaluateBooleanExpression(expression, module, rowNode);
|
|
38
38
|
}
|
|
39
|
-
evaluateAggregatedScalarExpression(expression, module) {
|
|
39
|
+
evaluateAggregatedScalarExpression(expression, module, getRowNodes) {
|
|
40
40
|
const aggregatedScalarFunctions = this.getModuleExpressionFunctionsMap(module).aggregatedScalarFunctions;
|
|
41
41
|
return parser.evaluate(expression, {
|
|
42
42
|
node: null,
|
|
@@ -45,13 +45,14 @@ class QueryLanguageService {
|
|
|
45
45
|
adaptableId: this.adaptableApi.optionsApi.getAdaptableId(),
|
|
46
46
|
functions: aggregatedScalarFunctions,
|
|
47
47
|
evaluateCustomQueryVariable: this.evaluateCustomQueryVariable,
|
|
48
|
+
getRowNodes,
|
|
48
49
|
});
|
|
49
50
|
}
|
|
50
51
|
evaluateObservableExpression(reactiveExpression, module) {
|
|
51
52
|
const moduleExpressionFunctions = this.getModuleExpressionFunctionsMap(module);
|
|
52
53
|
const booleanAndScalarFunctions = this.getBooleanAndScalarFunctions(moduleExpressionFunctions);
|
|
53
54
|
const reactiveExpression$ = parser.evaluate(reactiveExpression, {
|
|
54
|
-
node:
|
|
55
|
+
node: this.adaptableApi.gridApi.getFirstRowNode(),
|
|
55
56
|
adaptableApi: this.adaptableApi,
|
|
56
57
|
userName: this.adaptableApi.optionsApi.getUserName(),
|
|
57
58
|
adaptableId: this.adaptableApi.optionsApi.getAdaptableId(),
|
|
@@ -65,7 +66,7 @@ class QueryLanguageService {
|
|
|
65
66
|
const moduleExpressionFunctionsMap = this.getModuleExpressionFunctionsMap(module);
|
|
66
67
|
const booleanAndScalarFunctions = this.getBooleanAndScalarFunctions(moduleExpressionFunctionsMap);
|
|
67
68
|
const aggregationEvaluation = parser.evaluate(aggregationExpression, {
|
|
68
|
-
node:
|
|
69
|
+
node: this.adaptableApi.gridApi.getFirstRowNode(),
|
|
69
70
|
adaptableApi: this.adaptableApi,
|
|
70
71
|
userName: this.adaptableApi.optionsApi.getUserName(),
|
|
71
72
|
adaptableId: this.adaptableApi.optionsApi.getAdaptableId(),
|
|
@@ -10,11 +10,8 @@ export declare class ReportService implements IReportService {
|
|
|
10
10
|
private cellClassKey2excelStyleIdMap;
|
|
11
11
|
private excelStylesWithFormattedDate;
|
|
12
12
|
constructor(adaptableApi: AdaptableApi);
|
|
13
|
-
|
|
14
|
-
registerExcelStyle(excelStyle: Partial<ExcelStyle>, cellClassKey: string): void;
|
|
15
|
-
getRegisteredExcelStyles(): ExcelStyle[];
|
|
13
|
+
destroy(): void;
|
|
16
14
|
getExcelStyleIdForCellClassKey(cellClassKey: string): string;
|
|
17
|
-
registerExcelStyleWithFormattedDate(cellClassId: string, isoFormattedValue: string): void;
|
|
18
15
|
getExcelStyleWithFormattedDate(cellClassId: string): string;
|
|
19
16
|
CreateSystemReport(systemReportName: SystemReportName): Report;
|
|
20
17
|
IsSystemReport(reportName: string): boolean;
|
|
@@ -33,7 +30,12 @@ export declare class ReportService implements IReportService {
|
|
|
33
30
|
getCellExportValueFromRowNode(rowNode: IRowNode, columnId: string): any;
|
|
34
31
|
getCellExportValueFromRawValue(rowNode: IRowNode, cellRawValue: any, columnId: string): any;
|
|
35
32
|
getReportFileName(reportName: string, destination: SystemExportDestination | CustomDestination): string;
|
|
36
|
-
destroy(): void;
|
|
37
33
|
private getCustomExportDateFormat;
|
|
38
34
|
private getCellExportValueFromRawValueByType;
|
|
35
|
+
buildExcelStylesForVisualReports(): ExcelStyle[];
|
|
36
|
+
createExcelStyleMemoization(): void;
|
|
37
|
+
private convertCSSToExcelStyle;
|
|
38
|
+
private resetExcelStyleMemoization;
|
|
39
|
+
private registerExcelStyle;
|
|
40
|
+
private registerExcelStyleWithFormattedDate;
|
|
39
41
|
}
|
|
@@ -11,6 +11,8 @@ const StringExtensions_1 = tslib_1.__importDefault(require("../Extensions/String
|
|
|
11
11
|
const ModuleConstants_1 = require("../Constants/ModuleConstants");
|
|
12
12
|
const uuid_1 = require("../../components/utils/uuid");
|
|
13
13
|
const ObjectFactory_1 = require("../ObjectFactory");
|
|
14
|
+
const StyleHelper_1 = require("../Helpers/StyleHelper");
|
|
15
|
+
const tinycolor2_1 = tslib_1.__importDefault(require("tinycolor2"));
|
|
14
16
|
class ReportService {
|
|
15
17
|
constructor(adaptableApi) {
|
|
16
18
|
this.adaptableApi = adaptableApi;
|
|
@@ -19,29 +21,12 @@ class ReportService {
|
|
|
19
21
|
this.excelStylesWithFormattedDate = {};
|
|
20
22
|
this.adaptableApi = adaptableApi;
|
|
21
23
|
}
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
this.cellClassKey2excelStyleIdMap = {};
|
|
25
|
-
this.excelStylesWithFormattedDate = {};
|
|
26
|
-
}
|
|
27
|
-
registerExcelStyle(excelStyle, cellClassKey) {
|
|
28
|
-
const excelStyleKey = JSON.stringify(excelStyle);
|
|
29
|
-
if (!this.excelStylesCache[excelStyleKey]) {
|
|
30
|
-
const excelStyleId = (0, uuid_1.createUuid)();
|
|
31
|
-
const excelStyleWithId = Object.assign(Object.assign({}, excelStyle), { id: excelStyleId });
|
|
32
|
-
this.excelStylesCache[excelStyleKey] = excelStyleWithId;
|
|
33
|
-
}
|
|
34
|
-
this.cellClassKey2excelStyleIdMap[cellClassKey] = this.excelStylesCache[excelStyleKey].id;
|
|
35
|
-
}
|
|
36
|
-
getRegisteredExcelStyles() {
|
|
37
|
-
return Object.values(this.excelStylesCache);
|
|
24
|
+
destroy() {
|
|
25
|
+
// TO DO
|
|
38
26
|
}
|
|
39
27
|
getExcelStyleIdForCellClassKey(cellClassKey) {
|
|
40
28
|
return this.cellClassKey2excelStyleIdMap[cellClassKey];
|
|
41
29
|
}
|
|
42
|
-
registerExcelStyleWithFormattedDate(cellClassId, isoFormattedValue) {
|
|
43
|
-
this.excelStylesWithFormattedDate[cellClassId] = isoFormattedValue;
|
|
44
|
-
}
|
|
45
30
|
getExcelStyleWithFormattedDate(cellClassId) {
|
|
46
31
|
return this.excelStylesWithFormattedDate[cellClassId];
|
|
47
32
|
}
|
|
@@ -369,9 +354,6 @@ class ReportService {
|
|
|
369
354
|
}
|
|
370
355
|
return fileName;
|
|
371
356
|
}
|
|
372
|
-
destroy() {
|
|
373
|
-
// TO DO
|
|
374
|
-
}
|
|
375
357
|
getCustomExportDateFormat() {
|
|
376
358
|
return this.adaptableApi.optionsApi.getExportOptions().exportDateFormat;
|
|
377
359
|
}
|
|
@@ -383,5 +365,239 @@ class ReportService {
|
|
|
383
365
|
: // type === formattedValue
|
|
384
366
|
this.adaptableApi.gridApi.getDisplayValueFromRawValue(rowNode, columnId, cellRawValue);
|
|
385
367
|
}
|
|
368
|
+
// aggregate and merge all acive Adaptable styles with the user proviided ExcelStyles
|
|
369
|
+
buildExcelStylesForVisualReports() {
|
|
370
|
+
// for historical reasons, the styles are merged as class variables
|
|
371
|
+
// we could/should refactor this to be more functional
|
|
372
|
+
this.createExcelStyleMemoization();
|
|
373
|
+
return Object.values(this.excelStylesCache);
|
|
374
|
+
}
|
|
375
|
+
createExcelStyleMemoization() {
|
|
376
|
+
this.resetExcelStyleMemoization();
|
|
377
|
+
// we memoize as much as possible, as this is called quite A LOT
|
|
378
|
+
const adaptableColumnMap = {};
|
|
379
|
+
const getAdaptableColumnWithColumnId = (columnId) => {
|
|
380
|
+
const memoizedColumn = adaptableColumnMap[columnId];
|
|
381
|
+
if (memoizedColumn) {
|
|
382
|
+
return memoizedColumn;
|
|
383
|
+
}
|
|
384
|
+
const abColumn = this.adaptableApi.columnApi.getColumnWithColumnId(columnId);
|
|
385
|
+
adaptableColumnMap[columnId] = abColumn;
|
|
386
|
+
return abColumn;
|
|
387
|
+
};
|
|
388
|
+
const formatColumnsWithDisplayFormatForColumn = {};
|
|
389
|
+
const getFormatColumnsWithDisplayFormatForColumn = (columnId) => {
|
|
390
|
+
const memoizedFormatColumns = formatColumnsWithDisplayFormatForColumn[columnId];
|
|
391
|
+
if (memoizedFormatColumns) {
|
|
392
|
+
return memoizedFormatColumns;
|
|
393
|
+
}
|
|
394
|
+
const abColumn = getAdaptableColumnWithColumnId(columnId);
|
|
395
|
+
const formatColumns = this.adaptableApi.formatColumnApi.internalApi.getFormatColumnsWithDisplayFormatForColumn(abColumn);
|
|
396
|
+
formatColumnsWithDisplayFormatForColumn[columnId] = formatColumns;
|
|
397
|
+
return formatColumns;
|
|
398
|
+
};
|
|
399
|
+
const isDateCellExportedAsFormattedValue = this.adaptableApi.exportApi.internalApi.isDateCellExportedAsFormattedValue();
|
|
400
|
+
const displayedColumns = this.adaptableApi.agGridApi.getAllDisplayedColumns();
|
|
401
|
+
const colDefs = displayedColumns.map((column) => {
|
|
402
|
+
return column.getColDef();
|
|
403
|
+
});
|
|
404
|
+
const forAllVisibleRowNodesDoConfig = { includeGroupRows: true };
|
|
405
|
+
const agGridApi = this.adaptableApi.agGridApi;
|
|
406
|
+
const userExcelStyles = this.adaptableApi.internalApi
|
|
407
|
+
.getAdaptableInstance()
|
|
408
|
+
.agGridAdapter.getUserGridOptionsProperty('excelStyles') || [];
|
|
409
|
+
this.adaptableApi.internalApi.forAllVisibleRowNodesDo((node, rowIndex) => {
|
|
410
|
+
var _a;
|
|
411
|
+
const rowParams = {
|
|
412
|
+
node,
|
|
413
|
+
data: node.data,
|
|
414
|
+
rowIndex,
|
|
415
|
+
api: agGridApi,
|
|
416
|
+
columnApi: null,
|
|
417
|
+
context: ((_a = agGridApi.__getContext) === null || _a === void 0 ? void 0 : _a.call(agGridApi)) || {},
|
|
418
|
+
};
|
|
419
|
+
const getRowStyleFn = agGridApi.getGridOption('getRowStyle');
|
|
420
|
+
const rowStyle = getRowStyleFn ? getRowStyleFn(rowParams) : {};
|
|
421
|
+
displayedColumns.forEach((column, columnIndex) => {
|
|
422
|
+
var _a, _b, _c;
|
|
423
|
+
const colDef = colDefs[columnIndex];
|
|
424
|
+
let cellClassParams;
|
|
425
|
+
const getLazyCellClassParams = () => {
|
|
426
|
+
if (!cellClassParams) {
|
|
427
|
+
cellClassParams = {
|
|
428
|
+
colDef,
|
|
429
|
+
node,
|
|
430
|
+
column,
|
|
431
|
+
data: node.data,
|
|
432
|
+
value: this.adaptableApi.gridApi.getRawValueFromRowNode(node, column.getId()),
|
|
433
|
+
rowIndex,
|
|
434
|
+
api: agGridApi,
|
|
435
|
+
columnApi: null,
|
|
436
|
+
context: {},
|
|
437
|
+
};
|
|
438
|
+
}
|
|
439
|
+
return cellClassParams;
|
|
440
|
+
};
|
|
441
|
+
const cellStyle = typeof colDef.cellStyle === 'function' ? colDef.cellStyle(getLazyCellClassParams()) : {};
|
|
442
|
+
const excelStyles = [];
|
|
443
|
+
// add user defined excel styles
|
|
444
|
+
let userColDefCellClass = this.adaptableApi.internalApi
|
|
445
|
+
.getAdaptableInstance()
|
|
446
|
+
.agGridColumnAdapter.getUserColDefProperty(column.getColId(), 'cellClass');
|
|
447
|
+
const userDefinedCellClass = typeof userColDefCellClass === 'function'
|
|
448
|
+
? userColDefCellClass(getLazyCellClassParams())
|
|
449
|
+
: userColDefCellClass;
|
|
450
|
+
const userDefinedExcelStyle = userDefinedCellClass &&
|
|
451
|
+
userExcelStyles.find((excelStyle) => {
|
|
452
|
+
var _a;
|
|
453
|
+
return typeof userDefinedCellClass === 'string'
|
|
454
|
+
? userDefinedCellClass === excelStyle.id
|
|
455
|
+
: (_a = userDefinedCellClass === null || userDefinedCellClass === void 0 ? void 0 : userDefinedCellClass.includes) === null || _a === void 0 ? void 0 : _a.call(userDefinedCellClass, excelStyle.id);
|
|
456
|
+
});
|
|
457
|
+
if (userDefinedExcelStyle) {
|
|
458
|
+
excelStyles.push(userDefinedExcelStyle);
|
|
459
|
+
}
|
|
460
|
+
// add adaptable derived styles (format column etc.)
|
|
461
|
+
const adaptableStyle = Object.assign(Object.assign({}, rowStyle), Object.keys(cellStyle).reduce((result, key) => {
|
|
462
|
+
if (cellStyle[key] !== null) {
|
|
463
|
+
result[key] = cellStyle[key];
|
|
464
|
+
}
|
|
465
|
+
return result;
|
|
466
|
+
}, {}));
|
|
467
|
+
const sanitizedAdaptableStyle = (0, StyleHelper_1.sanitizeStyle)(adaptableStyle);
|
|
468
|
+
if (Object.values(sanitizedAdaptableStyle).some((style) => style != null)) {
|
|
469
|
+
excelStyles.push(this.convertCSSToExcelStyle(sanitizedAdaptableStyle));
|
|
470
|
+
}
|
|
471
|
+
const excelDataType = this.adaptableApi.exportApi.internalApi.getExcelDataType(colDef === null || colDef === void 0 ? void 0 : colDef.type);
|
|
472
|
+
const rawValue = this.adaptableApi.gridApi.getRawValueFromRowNode(node, column.getId());
|
|
473
|
+
// don't add the cell style if it has no adaptable custom styles
|
|
474
|
+
if (!excelStyles.length &&
|
|
475
|
+
// if this is a formatted Date value, we still need to add the AG GRID specific type & numberFormat below
|
|
476
|
+
!(excelDataType === 'DateTime' && isDateCellExportedAsFormattedValue)) {
|
|
477
|
+
return;
|
|
478
|
+
}
|
|
479
|
+
const cellClassId = this.adaptableApi.internalApi
|
|
480
|
+
.getAdaptableInstance()
|
|
481
|
+
.agGridColumnAdapter.getExcelClassNameForCell(column.getId(), this.adaptableApi.internalApi
|
|
482
|
+
.getAdaptableInstance()
|
|
483
|
+
.getPrimaryKeyValueFromRowNode(node), userDefinedCellClass);
|
|
484
|
+
const finalCellExcelStyle = Object.assign({}, ...excelStyles);
|
|
485
|
+
if (excelDataType === 'DateTime' && isDateCellExportedAsFormattedValue) {
|
|
486
|
+
let dateFormatPattern = this.adaptableApi.optionsApi.getExportOptions().exportDateFormat;
|
|
487
|
+
const abColumn = getAdaptableColumnWithColumnId(column.getColId());
|
|
488
|
+
if (!dateFormatPattern) {
|
|
489
|
+
const mostRelevantFormatColumn = this.adaptableApi.formatColumnApi.internalApi.getMostRelevantFormatColumnForColumn(getFormatColumnsWithDisplayFormatForColumn(column.getColId()), abColumn, { node, value: rawValue });
|
|
490
|
+
dateFormatPattern =
|
|
491
|
+
((_a = mostRelevantFormatColumn === null || mostRelevantFormatColumn === void 0 ? void 0 : mostRelevantFormatColumn.DisplayFormat) === null || _a === void 0 ? void 0 : _a.Formatter) === 'DateFormatter' &&
|
|
492
|
+
((_c = (_b = mostRelevantFormatColumn === null || mostRelevantFormatColumn === void 0 ? void 0 : mostRelevantFormatColumn.DisplayFormat) === null || _b === void 0 ? void 0 : _b.Options) === null || _c === void 0 ? void 0 : _c.Pattern);
|
|
493
|
+
}
|
|
494
|
+
if (dateFormatPattern) {
|
|
495
|
+
const normalisedValue = this.adaptableApi.internalApi
|
|
496
|
+
.getAdaptableInstance()
|
|
497
|
+
.getNormalisedValueFromRawValue(rawValue, abColumn);
|
|
498
|
+
if (normalisedValue) {
|
|
499
|
+
// we have to pass the date in the ISO format to Excel
|
|
500
|
+
// see https://www.ag-grid.com/javascript-data-grid/excel-export-data-types/#dates
|
|
501
|
+
// we can NOT use Date.toISOString() because we don't want the timezone corrections to kick in
|
|
502
|
+
const isoFormattedValue = (0, FormatHelper_1.DateFormatter)(normalisedValue, {
|
|
503
|
+
Pattern: `yyyy-MM-dd'T'HH:mm:ss.SSS`,
|
|
504
|
+
});
|
|
505
|
+
if (isoFormattedValue) {
|
|
506
|
+
finalCellExcelStyle.dataType = 'DateTime';
|
|
507
|
+
finalCellExcelStyle.numberFormat = { format: dateFormatPattern };
|
|
508
|
+
// create a new cell key to ensure any user provided className does not interfere
|
|
509
|
+
const cellKey = this.adaptableApi.internalApi
|
|
510
|
+
.getAdaptableInstance()
|
|
511
|
+
.agGridColumnAdapter.getExcelClassNameForCell(column.getColId(), this.adaptableApi.internalApi
|
|
512
|
+
.getAdaptableInstance()
|
|
513
|
+
.getPrimaryKeyValueFromRowNode(node));
|
|
514
|
+
// we need to register so that later the cellProcessor will put the isoFormattedValue through (thus giving the formatting responsability to Excel)
|
|
515
|
+
this.registerExcelStyleWithFormattedDate(cellKey, isoFormattedValue);
|
|
516
|
+
}
|
|
517
|
+
}
|
|
518
|
+
}
|
|
519
|
+
}
|
|
520
|
+
this.registerExcelStyle(finalCellExcelStyle, cellClassId);
|
|
521
|
+
});
|
|
522
|
+
}, forAllVisibleRowNodesDoConfig);
|
|
523
|
+
}
|
|
524
|
+
convertCSSToExcelStyle(style) {
|
|
525
|
+
const getHexColor = (color) => {
|
|
526
|
+
const preparedColor = (0, StyleHelper_1.getVariableColor)(color);
|
|
527
|
+
const t = (0, tinycolor2_1.default)(preparedColor);
|
|
528
|
+
const a = t.getAlpha();
|
|
529
|
+
return tinycolor2_1.default.mix((0, tinycolor2_1.default)('white'), t, a * 100).toHexString();
|
|
530
|
+
};
|
|
531
|
+
let result = {};
|
|
532
|
+
if (style.backgroundColor != null) {
|
|
533
|
+
result.interior = {
|
|
534
|
+
color: getHexColor(style.backgroundColor),
|
|
535
|
+
pattern: 'Solid',
|
|
536
|
+
};
|
|
537
|
+
}
|
|
538
|
+
if (style.borderColor != null) {
|
|
539
|
+
const excelBorder = {
|
|
540
|
+
color: style.borderColor,
|
|
541
|
+
lineStyle: 'Continuous',
|
|
542
|
+
weight: 1,
|
|
543
|
+
};
|
|
544
|
+
result.borders = {
|
|
545
|
+
borderBottom: excelBorder,
|
|
546
|
+
borderLeft: excelBorder,
|
|
547
|
+
borderRight: excelBorder,
|
|
548
|
+
borderTop: excelBorder,
|
|
549
|
+
};
|
|
550
|
+
}
|
|
551
|
+
if (style.textAlign) {
|
|
552
|
+
result.alignment = {
|
|
553
|
+
horizontal: StringExtensions_1.default.CapitaliseFirstLetter(style.textAlign),
|
|
554
|
+
};
|
|
555
|
+
}
|
|
556
|
+
if (style.color != null) {
|
|
557
|
+
if (!result.font) {
|
|
558
|
+
result.font = {};
|
|
559
|
+
}
|
|
560
|
+
result.font = {
|
|
561
|
+
color: getHexColor(style.color),
|
|
562
|
+
};
|
|
563
|
+
}
|
|
564
|
+
if (style.fontStyle === 'italic') {
|
|
565
|
+
if (!result.font) {
|
|
566
|
+
result.font = {};
|
|
567
|
+
}
|
|
568
|
+
result.font.italic = true;
|
|
569
|
+
}
|
|
570
|
+
if (style.fontWeight != null &&
|
|
571
|
+
(style.fontWeight === 'bold' || Number(style.fontWeight) >= 600)) {
|
|
572
|
+
if (!result.font) {
|
|
573
|
+
result.font = {};
|
|
574
|
+
}
|
|
575
|
+
result.font.bold = true;
|
|
576
|
+
}
|
|
577
|
+
if (style.fontSize != null) {
|
|
578
|
+
if (!result.font) {
|
|
579
|
+
result.font = {};
|
|
580
|
+
}
|
|
581
|
+
result.font.size = (0, StyleHelper_1.convertCSSAbsoluteFontSizeToPt)(style.fontSize);
|
|
582
|
+
}
|
|
583
|
+
return result;
|
|
584
|
+
}
|
|
585
|
+
resetExcelStyleMemoization() {
|
|
586
|
+
this.excelStylesCache = {};
|
|
587
|
+
this.cellClassKey2excelStyleIdMap = {};
|
|
588
|
+
this.excelStylesWithFormattedDate = {};
|
|
589
|
+
}
|
|
590
|
+
registerExcelStyle(excelStyle, cellClassKey) {
|
|
591
|
+
const excelStyleKey = JSON.stringify(excelStyle);
|
|
592
|
+
if (!this.excelStylesCache[excelStyleKey]) {
|
|
593
|
+
const excelStyleId = (0, uuid_1.createUuid)();
|
|
594
|
+
const excelStyleWithId = Object.assign(Object.assign({}, excelStyle), { id: excelStyleId });
|
|
595
|
+
this.excelStylesCache[excelStyleKey] = excelStyleWithId;
|
|
596
|
+
}
|
|
597
|
+
this.cellClassKey2excelStyleIdMap[cellClassKey] = this.excelStylesCache[excelStyleKey].id;
|
|
598
|
+
}
|
|
599
|
+
registerExcelStyleWithFormattedDate(cellClassId, isoFormattedValue) {
|
|
600
|
+
this.excelStylesWithFormattedDate[cellClassId] = isoFormattedValue;
|
|
601
|
+
}
|
|
386
602
|
}
|
|
387
603
|
exports.ReportService = ReportService;
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import { IRowEditService } from './Interface/IRowEditService';
|
|
2
1
|
import { AdaptableApi } from '../../Api/AdaptableApi';
|
|
3
|
-
|
|
2
|
+
import { IAdaptableService } from './Interface/IAdaptableService';
|
|
3
|
+
export declare class RowEditService implements IAdaptableService {
|
|
4
4
|
private adaptableApi;
|
|
5
5
|
constructor(adaptableApi: AdaptableApi);
|
|
6
6
|
private autoHandleActionRowButtons;
|
|
7
|
+
destroy(): void;
|
|
7
8
|
}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.RowEditService = void 0;
|
|
4
|
-
// @ts-ignore
|
|
5
4
|
class RowEditService {
|
|
6
5
|
constructor(adaptableApi) {
|
|
7
6
|
this.adaptableApi = adaptableApi;
|
|
@@ -40,5 +39,8 @@ class RowEditService {
|
|
|
40
39
|
adaptableApi.gridApi.addGridData([newRowData], config);
|
|
41
40
|
}
|
|
42
41
|
}
|
|
42
|
+
destroy() {
|
|
43
|
+
// nothing yet
|
|
44
|
+
}
|
|
43
45
|
}
|
|
44
46
|
exports.RowEditService = RowEditService;
|