@adaptabletools/adaptable 17.0.0-canary.0 → 17.0.0-canary.2
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 +1203 -1207
- package/base.css.map +1 -1
- package/index.css +28 -1989
- package/index.css.map +1 -1
- package/package.json +9 -110
- package/src/AdaptableInterfaces/AdaptableNoCodeWizard.d.ts +2 -2
- package/src/AdaptableInterfaces/IAdaptable.d.ts +16 -11
- package/src/AdaptableOptions/ActionRowOptions.d.ts +25 -3
- package/src/AdaptableOptions/AdaptableFrameworkComponent.d.ts +3 -3
- package/src/AdaptableOptions/AdaptableOptions.d.ts +10 -1
- package/src/AdaptableOptions/AdaptablePlugin.d.ts +1 -1
- package/src/AdaptableOptions/AlertOptions.d.ts +2 -2
- package/src/AdaptableOptions/ColumnFilterOptions.d.ts +110 -91
- package/src/AdaptableOptions/DataChangeHistoryOptions.d.ts +1 -1
- package/src/AdaptableOptions/DateInputOptions.d.ts +1 -1
- package/src/AdaptableOptions/EditOptions.d.ts +2 -2
- package/src/AdaptableOptions/ExportOptions.d.ts +3 -3
- package/src/AdaptableOptions/ExpressionOptions.d.ts +2 -2
- package/src/AdaptableOptions/Fdc3Options.d.ts +10 -4
- package/src/AdaptableOptions/GridFilterOptions.d.ts +18 -0
- package/src/AdaptableOptions/LayoutOptions.d.ts +1 -1
- package/src/AdaptableOptions/MenuOptions.d.ts +10 -4
- package/src/AdaptableOptions/NotificationsOptions.d.ts +1 -1
- package/src/AdaptableOptions/QuickSearchOptions.d.ts +4 -4
- package/src/AdaptableOptions/UserInterfaceOptions.d.ts +1 -16
- package/src/Api/ColumnApi.d.ts +4 -0
- package/src/Api/ColumnFilterApi.d.ts +2 -5
- package/src/Api/DashboardApi.d.ts +0 -11
- package/src/Api/EventApi.d.ts +2 -30
- package/src/Api/Events/ActionRowSubmitted.d.ts +1 -5
- package/src/Api/Events/AdaptableSearchState.d.ts +2 -7
- package/src/Api/Events/Fdc3MessageInfo.d.ts +1 -1
- package/src/Api/Events/GridFilterApplied.d.ts +2 -1
- package/src/Api/ExportApi.d.ts +0 -4
- package/src/Api/GridFilterApi.d.ts +26 -8
- package/src/Api/Implementation/ColumnApiImpl.d.ts +1 -0
- package/src/Api/Implementation/ColumnApiImpl.js +4 -0
- package/src/Api/Implementation/ColumnFilterApiImpl.d.ts +1 -1
- package/src/Api/Implementation/ColumnFilterApiImpl.js +3 -3
- package/src/Api/Implementation/ConfigApiImpl.js +1 -2
- package/src/Api/Implementation/DashboardApiImpl.d.ts +0 -2
- package/src/Api/Implementation/DashboardApiImpl.js +0 -14
- package/src/Api/Implementation/ExportApiImpl.d.ts +0 -1
- package/src/Api/Implementation/ExportApiImpl.js +0 -3
- package/src/Api/Implementation/GridApiImpl.js +2 -2
- package/src/Api/Implementation/GridFilterApiImpl.d.ts +6 -1
- package/src/Api/Implementation/GridFilterApiImpl.js +22 -3
- package/src/Api/Implementation/NamedQueryApiImpl.d.ts +2 -5
- package/src/Api/Implementation/NamedQueryApiImpl.js +2 -2
- package/src/Api/Implementation/OptionsApiImpl.d.ts +2 -1
- package/src/Api/Implementation/OptionsApiImpl.js +3 -0
- package/src/Api/Implementation/UserInterfaceApiImpl.js +2 -2
- package/src/Api/Internal/ActionRowInternalApi.d.ts +1 -0
- package/src/Api/Internal/ActionRowInternalApi.js +17 -3
- package/src/Api/Internal/AlertInternalApi.d.ts +1 -7
- package/src/Api/Internal/ColumnFilterInternalApi.d.ts +2 -2
- package/src/Api/Internal/ColumnFilterInternalApi.js +9 -9
- package/src/Api/Internal/ColumnInternalApi.d.ts +0 -10
- package/src/Api/Internal/ColumnInternalApi.js +0 -28
- package/src/Api/Internal/Fdc3InternalApi.d.ts +2 -2
- package/src/Api/Internal/FormatColumnInternalApi.js +6 -6
- package/src/Api/Internal/GridFilterInternalApi.d.ts +1 -1
- package/src/Api/Internal/GridFilterInternalApi.js +5 -5
- package/src/Api/Internal/GridInternalApi.js +31 -9
- package/src/Api/Internal/LayoutInternalApi.js +8 -0
- package/src/Api/Internal/PredicateInternalApi.js +3 -3
- package/src/Api/Internal/StyledColumnInternalApi.d.ts +0 -3
- package/src/Api/Internal/StyledColumnInternalApi.js +0 -27
- package/src/Api/NamedQueryApi.d.ts +6 -5
- package/src/Api/OptionsApi.d.ts +5 -1
- package/src/PredefinedConfig/AlertState.d.ts +6 -6
- package/src/PredefinedConfig/CalculatedColumnState.d.ts +1 -1
- package/src/PredefinedConfig/ChartingState.d.ts +4 -1
- package/src/PredefinedConfig/Common/AdaptableAlert.d.ts +2 -2
- package/src/PredefinedConfig/Common/AdaptableColumn.d.ts +1 -1
- package/src/PredefinedConfig/Common/AdaptableComparerFunction.d.ts +2 -2
- package/src/PredefinedConfig/Common/AdaptableForm.d.ts +2 -2
- package/src/PredefinedConfig/Common/AdaptableFormat.d.ts +1 -1
- package/src/PredefinedConfig/Common/AdaptableIcon.d.ts +2 -2
- package/src/PredefinedConfig/Common/AdaptableMessageType.d.ts +1 -1
- package/src/PredefinedConfig/Common/AdaptableObject.d.ts +1 -1
- package/src/PredefinedConfig/Common/AdaptablePredicate.d.ts +3 -3
- package/src/PredefinedConfig/Common/AdaptablePredicate.js +45 -58
- package/src/PredefinedConfig/Common/AdaptableQuery.d.ts +1 -1
- package/src/PredefinedConfig/Common/AdaptableScope.d.ts +5 -5
- package/src/PredefinedConfig/Common/AggregationColumns.d.ts +1 -1
- package/src/PredefinedConfig/Common/ColumnFilter.d.ts +2 -2
- package/src/PredefinedConfig/Common/Entitlement.d.ts +1 -1
- package/src/PredefinedConfig/Common/Fdc3Context.d.ts +133 -37
- package/src/PredefinedConfig/Common/Fdc3Intent.d.ts +4 -4
- package/src/PredefinedConfig/Common/Schedule.d.ts +2 -2
- package/src/PredefinedConfig/Common/Types.d.ts +15 -15
- package/src/PredefinedConfig/ExportState.d.ts +4 -4
- package/src/PredefinedConfig/FlashingCellState.d.ts +4 -4
- package/src/PredefinedConfig/FormatColumnState.d.ts +4 -27
- package/src/PredefinedConfig/NotesState.d.ts +2 -2
- package/src/PredefinedConfig/PredefinedConfig.d.ts +0 -5
- package/src/PredefinedConfig/ShortcutState.d.ts +1 -1
- package/src/PredefinedConfig/StyledColumnState.d.ts +8 -13
- package/src/PredefinedConfig/SystemState.d.ts +3 -3
- package/src/PredefinedConfig/TeamSharingState.d.ts +3 -3
- package/src/PredefinedConfig/ToolPanelState.d.ts +1 -1
- package/src/PredefinedConfig/Uuid.d.ts +1 -1
- package/src/Redux/ActionsReducers/GridRedux.d.ts +6 -1
- package/src/Redux/ActionsReducers/GridRedux.js +18 -0
- package/src/Redux/ActionsReducers/LayoutRedux.d.ts +37 -16
- package/src/Redux/ActionsReducers/LayoutRedux.js +69 -16
- package/src/Redux/Store/AdaptableReduxMerger.d.ts +1 -1
- package/src/Redux/Store/AdaptableStore.d.ts +2 -2
- package/src/Redux/Store/AdaptableStore.js +46 -19
- package/src/Strategy/AdaptableModuleBase.d.ts +0 -1
- package/src/Strategy/AdaptableModuleBase.js +0 -30
- package/src/Strategy/AlertModule.js +1 -1
- package/src/Strategy/ChartingModule.js +8 -5
- package/src/Strategy/ColumnFilterModule.d.ts +2 -0
- package/src/Strategy/ColumnFilterModule.js +78 -40
- package/src/Strategy/CustomSortModule.js +1 -1
- package/src/Strategy/FlashingCellModule.js +1 -1
- package/src/Strategy/Interface/IModule.d.ts +3 -3
- package/src/Strategy/LayoutModule.js +5 -0
- package/src/Strategy/StyledColumnModule.js +2 -53
- package/src/Utilities/Constants/GeneralConstants.d.ts +3 -0
- package/src/Utilities/Constants/GeneralConstants.js +3 -0
- package/src/Utilities/Defaults/DefaultAdaptableOptions.js +31 -23
- package/src/Utilities/Defaults/DefaultSettingsPanel.d.ts +1 -1
- package/src/Utilities/Defaults/DefaultSettingsPanel.js +2 -2
- package/src/Utilities/Emitter.d.ts +2 -2
- package/src/Utilities/Emitter.js +2 -2
- package/src/Utilities/ExpressionFunctions/aggregatedBooleanExpressionFunctions.d.ts +3 -3
- package/src/Utilities/ExpressionFunctions/aggregatedScalarExpressionFunctions.d.ts +3 -3
- package/src/Utilities/ExpressionFunctions/booleanExpressionFunctions.d.ts +1 -1
- package/src/Utilities/ExpressionFunctions/booleanExpressionFunctions.js +55 -5
- package/src/Utilities/ExpressionFunctions/dateUtils.d.ts +1 -0
- package/src/Utilities/ExpressionFunctions/dateUtils.js +9 -0
- package/src/Utilities/ExpressionFunctions/deepMap.d.ts +3 -3
- package/src/Utilities/ExpressionFunctions/deepMap.js +7 -7
- package/src/Utilities/ExpressionFunctions/expressionFunctionUtils.d.ts +1 -1
- package/src/Utilities/ExpressionFunctions/groupingMap.d.ts +7 -7
- package/src/Utilities/ExpressionFunctions/observableExpressionFunctions.d.ts +1 -1
- package/src/Utilities/ExpressionFunctions/scalarAggregationHelper.d.ts +7 -7
- package/src/Utilities/ExpressionFunctions/scalarExpressionFunctions.d.ts +1 -1
- package/src/Utilities/ExpressionFunctions/scalarExpressionFunctions.js +11 -1
- package/src/Utilities/Extensions/TypeExtensions.d.ts +8 -8
- package/src/Utilities/Helpers/AdaptableHelper.js +4 -0
- package/src/Utilities/ObjectFactory.js +1 -1
- package/src/Utilities/Services/EntitlementService.d.ts +0 -1
- package/src/Utilities/Services/EntitlementService.js +0 -8
- package/src/Utilities/Services/Interface/IAlertService.d.ts +3 -3
- package/src/Utilities/Services/Interface/IEntitlementService.d.ts +0 -6
- package/src/Utilities/Services/Interface/IMetamodelService.d.ts +1 -1
- package/src/Utilities/Services/LicenseService/index.js +181 -1
- package/src/Utilities/Services/MetamodelService.js +1 -1
- package/src/Utilities/Services/ModuleService.js +1 -1
- package/src/Utilities/license/LicenseDetails.d.ts +1 -1
- package/src/Utilities/license/decode.js +65 -1
- package/src/Utilities/license/hashing.js +43 -1
- package/src/Utilities/logDeprecation.d.ts +5 -3
- package/src/View/AdaptablePopover/index.d.ts +1 -0
- package/src/View/AdaptablePopover/index.js +1 -1
- package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/GridOptionsForm.js +1 -1
- package/src/View/Alert/AlertEmptyView.js +1 -1
- package/src/View/Alert/Utilities/getAvailablePredicates.js +1 -1
- package/src/View/Alert/Wizard/AlertBehaviourWizardSection.d.ts +1 -1
- package/src/View/Alert/Wizard/AlertBehaviourWizardSection.js +20 -4
- package/src/View/Alert/Wizard/AlertButtonsEditor.d.ts +1 -1
- package/src/View/Alert/Wizard/AlertButtonsEditor.js +21 -24
- package/src/View/Alert/Wizard/AlertMessageWizardSection.d.ts +1 -1
- package/src/View/Alert/Wizard/AlertNotificationWizardSection.d.ts +1 -1
- package/src/View/Alert/Wizard/AlertNotificationWizardSection.js +1 -1
- package/src/View/Alert/Wizard/AlertRulesWizardSection.js +1 -1
- package/src/View/Alert/Wizard/AlertScopeWizardSection.d.ts +1 -1
- package/src/View/Alert/Wizard/AlertScopeWizardSection.js +1 -1
- package/src/View/Alert/Wizard/AlertTypeWizardSection.d.ts +1 -1
- package/src/View/Alert/Wizard/AlertWizard.js +1 -1
- package/src/View/Alert/Wizard/isValidAlertRules.js +1 -1
- package/src/View/BulkUpdate/BulkUpdatePopup.js +3 -9
- package/src/View/BulkUpdate/BulkUpdateViewPanel.js +2 -2
- package/src/View/CalculatedColumn/Wizard/CalculatedColumnDefinitionWizardSection.d.ts +1 -1
- package/src/View/CalculatedColumn/Wizard/CalculatedColumnExpressionWizardSection.d.ts +1 -1
- package/src/View/CalculatedColumn/Wizard/CalculatedColumnSettingsWizardSection.d.ts +1 -1
- package/src/View/CalculatedColumn/Wizard/CalculatedColumnSettingsWizardSection.js +9 -18
- package/src/View/CalculatedColumn/Wizard/CalculatedColumnTypeSection.d.ts +1 -1
- package/src/View/CalculatedColumn/Wizard/CalculatedColumnWizard.d.ts +1 -1
- package/src/View/CalculatedColumn/Wizard/CalculatedColumnWizard.js +2 -2
- package/src/View/CellSummary/CellSummaryStatusBarSubPanelPopover.js +5 -1
- package/src/View/CellSummary/CellSummaryViewPanel.js +5 -5
- package/src/View/ColumnInfo/ColumnInfo.js +7 -8
- package/src/View/Components/AdaptableDateInput/index.d.ts +2 -2
- package/src/View/Components/AdaptableInput/index.d.ts +1 -1
- package/src/View/Components/AdaptableObjectList/AdaptableObjectCompactList.js +2 -2
- package/src/View/Components/Buttons/ButtonBase/index.d.ts +1 -1
- package/src/View/Components/Buttons/ButtonOpen.d.ts +5 -0
- package/src/View/Components/Buttons/ButtonOpen.js +7 -0
- package/src/View/Components/Buttons/ButtonUnsuspend.d.ts +8 -0
- package/src/View/Components/Buttons/ButtonUnsuspend.js +17 -0
- package/src/View/Components/CellPopup/index.d.ts +1 -1
- package/src/View/Components/ColumnSelector/index.d.ts +1 -1
- package/src/View/Components/EntityRulesEditor/index.d.ts +2 -2
- package/src/View/Components/EntityRulesEditor/index.js +11 -3
- package/src/View/Components/ExternalRenderer.d.ts +1 -1
- package/src/View/Components/FilterForm/FilterForm.js +24 -24
- package/src/View/Components/FilterForm/QuickFilterForm.js +3 -3
- package/src/View/Components/FilterForm/QuickFilterValues.d.ts +2 -2
- package/src/View/Components/FilterForm/QuickFilterValues.js +2 -2
- package/src/View/Components/FilterForm/Waiting.d.ts +1 -1
- package/src/View/Components/Forms/AdaptableFormControlTextClear.d.ts +1 -1
- package/src/View/Components/Popups/AdaptablePopup/AdaptablePopupModuleView.js +1 -1
- package/src/View/Components/Popups/AdaptablePopup/useMenuItems.js +2 -2
- package/src/View/Components/PredicateEditor/PredicateEditor.js +10 -10
- package/src/View/Components/RangesComponent.js +11 -8
- package/src/View/Components/Selectors/ColumnSelector.d.ts +12 -17
- package/src/View/Components/Selectors/ColumnSelector.js +23 -42
- package/src/View/Components/Selectors/ColumnSelectorOld.d.ts +18 -0
- package/src/View/Components/Selectors/ColumnSelectorOld.js +46 -0
- package/src/View/Components/Selectors/ColumnValueSelector.d.ts +4 -23
- package/src/View/Components/Selectors/ColumnValueSelector.js +34 -126
- package/src/View/Components/Selectors/PermittedValuesSelector.d.ts +13 -0
- package/src/View/Components/Selectors/PermittedValuesSelector.js +46 -0
- package/src/View/Components/StyleComponent.d.ts +2 -3
- package/src/View/Components/StyleComponent.js +37 -40
- package/src/View/Components/ToolPanel/ToolPanelPopup.js +2 -2
- package/src/View/Components/ToolPanel/ToolPanelWrapper.d.ts +1 -1
- package/src/View/Components/ValueSelector/index.d.ts +2 -2
- package/src/View/CustomSort/Wizard/CustomSortColumnWizardSection.d.ts +1 -1
- package/src/View/CustomSort/Wizard/CustomSortValuesWizardSection.d.ts +1 -1
- package/src/View/CustomSort/Wizard/CustomSortWizard.js +1 -1
- package/src/View/Dashboard/DashboardPopup.js +4 -4
- package/src/View/Dashboard/DashboardToolbarFactory.js +0 -1
- package/src/View/Dashboard/PinnedDashboard.js +6 -3
- package/src/View/Dashboard/PinnedToolbarsSelector.js +1 -1
- package/src/View/DataChangeHistory/DataChangeHistoryGrid.js +3 -1
- package/src/View/DataImport/DataImportPopup.js +1 -1
- package/src/View/DataImport/DataImportWizard/DataImportWizard.d.ts +1 -1
- package/src/View/DataImport/DataImportWizard/sections/UploadSection/UploadSection.d.ts +1 -1
- package/src/View/DataSet/DataSetViewPanel.js +3 -2
- package/src/View/Export/ExportViewPanel.js +12 -9
- package/src/View/Export/Wizard/ReportColumnsWizardSection.d.ts +1 -1
- package/src/View/Export/Wizard/ReportNameWizardSection.d.ts +1 -1
- package/src/View/Export/Wizard/ReportRowsWizardSection.d.ts +1 -1
- package/src/View/Filter/FilterViewPanel.js +1 -1
- package/src/View/FlashingCell/Wizard/FlashingCellRulesWizardSection.js +1 -1
- package/src/View/FlashingCell/Wizard/FlashingCellScopeWizardSection.d.ts +1 -1
- package/src/View/FlashingCell/Wizard/FlashingCellScopeWizardSection.js +2 -2
- package/src/View/FlashingCell/Wizard/FlashingCellSettingsWizardSection.d.ts +1 -1
- package/src/View/FlashingCell/Wizard/FlashingCellStyleWizardSection.d.ts +1 -1
- package/src/View/FlashingCell/Wizard/FlashingCellWizard.js +8 -8
- package/src/View/FlashingCell/Wizard/isValidFlashingCellRules.js +1 -1
- package/src/View/FormatColumn/Wizard/FormatColumnFormatWizardSection.d.ts +1 -1
- package/src/View/FormatColumn/Wizard/FormatColumnFormatWizardSection.js +10 -9
- package/src/View/FormatColumn/Wizard/FormatColumnRuleWizardSection.d.ts +1 -1
- package/src/View/FormatColumn/Wizard/FormatColumnScopeWizardSection.d.ts +1 -1
- package/src/View/FormatColumn/Wizard/FormatColumnSettingsWizardSection.d.ts +1 -1
- package/src/View/FormatColumn/Wizard/FormatColumnStyleWizardSection.d.ts +1 -1
- package/src/View/FormatColumn/Wizard/FormatColumnWizard.js +3 -1
- package/src/View/FreeTextColumn/Wizard/FreeTextColumnSettingsWizardSection.d.ts +1 -1
- package/src/View/FreeTextColumn/Wizard/FreeTextColumnSettingsWizardSection.js +7 -17
- package/src/View/GridFilter/GridFilterExpressionEditor.js +62 -9
- package/src/View/GridFilter/GridFilterPopup.js +36 -6
- package/src/View/GridFilter/GridFilterStatusbar.js +0 -1
- package/src/View/GridFilter/GridFilterViewPanel.d.ts +2 -26
- package/src/View/GridFilter/GridFilterViewPanel.js +49 -150
- package/src/View/GridFilter/NamedQuerySelector.d.ts +16 -0
- package/src/View/GridFilter/NamedQuerySelector.js +50 -0
- package/src/View/GridFilter/useGridFilterExpressionEditor.d.ts +24 -0
- package/src/View/GridFilter/useGridFilterExpressionEditor.js +123 -0
- package/src/View/GridFilter/useGridFilterOptionsForExpressionEditor.d.ts +4 -0
- package/src/View/GridFilter/useGridFilterOptionsForExpressionEditor.js +27 -0
- package/src/View/GridInfo/GridInfoPopup/GridInfoPopup.js +5 -3
- package/src/View/Layout/LayoutViewPanel.js +4 -3
- package/src/View/Layout/SaveLayoutButton.js +2 -1
- package/src/View/Layout/Wizard/LayoutWizard.js +10 -0
- package/src/View/Layout/Wizard/sections/FilterSection.js +15 -17
- package/src/View/Layout/Wizard/sections/GridFilterSection.d.ts +9 -0
- package/src/View/Layout/Wizard/sections/GridFilterSection.js +37 -0
- package/src/View/License/LicenseWatermark.js +61 -1
- package/src/View/NamedQuery/EditCurrentQueryButton.js +1 -1
- package/src/View/NamedQuery/Wizard/NamedQuerySettingsWizardSection.js +1 -1
- package/src/View/NamedQuery/Wizard/NamedQueryWizard.js +2 -2
- package/src/View/QuickSearch/QuickSearchPopup.js +1 -1
- package/src/View/QuickSearch/useQuickSearchDebounced.d.ts +1 -1
- package/src/View/Schedule/Wizard/ScheduleSettingsWizard/ScheduleSettingsReminder.js +5 -2
- package/src/View/Schedule/Wizard/ScheduleSettingsWizard/ScheduleSettingsReport.d.ts +1 -1
- package/src/View/Schedule/Wizard/ScheduleSettingsWizard/ScheduleSettingsReport.js +6 -5
- package/src/View/Shortcut/Wizard/ShortcutSettingsWizard.js +6 -7
- package/src/View/Shortcut/Wizard/ShortcutWizard.js +4 -3
- package/src/View/SmartEdit/SmartEditViewPanel.js +7 -5
- package/src/View/SpecialColumnSettingsWizardStep.js +4 -1
- package/src/View/StateManagement/StateManagementPopup.js +6 -6
- package/src/View/StatusBar/StatusBarPopup.js +1 -1
- package/src/View/StyledColumn/Wizard/StyledColumnBadgeSection.js +16 -8
- package/src/View/StyledColumn/Wizard/StyledColumnSparklineSettingsSection.js +20 -23
- package/src/View/StyledColumn/Wizard/StyledColumnWizard.js +2 -3
- package/src/View/StyledColumn/Wizard/StyledColumnWizardColumnSection.d.ts +1 -1
- package/src/View/StyledColumn/Wizard/StyledColumnWizardColumnSection.js +7 -5
- package/src/View/StyledColumn/Wizard/StyledColumnWizardSettingsSection.d.ts +1 -1
- package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/StyledColumnBadgePreview.js +4 -4
- package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/StyledColumnWizardStyleSection.js +0 -8
- package/src/View/StyledColumn/Wizard/StyledColumnWizardTypeSection.js +2 -9
- package/src/View/SystemStatus/SystemStatusViewPanel.js +1 -1
- package/src/View/SystemStatus/Utilities/getStatusItemStyle.js +1 -1
- package/src/View/Theme/ThemeEditor.d.ts +1 -1
- package/src/View/Theme/ThemeViewPanel.js +4 -3
- package/src/View/UIHelper.d.ts +1 -1
- package/src/View/Wizard/ObjectTagsWizardSection.d.ts +1 -1
- package/src/View/Wizard/OnePageAdaptableWizard.d.ts +1 -1
- package/src/View/Wizard/OnePageWizards.d.ts +2 -2
- package/src/agGrid/Adaptable.d.ts +20 -17
- package/src/agGrid/Adaptable.js +193 -190
- package/src/agGrid/AdaptableLogger.js +15 -15
- package/src/agGrid/CheckboxRenderer.d.ts +5 -0
- package/src/agGrid/CheckboxRenderer.js +5 -1
- package/src/agGrid/ColumnSetupInfo.d.ts +1 -1
- package/src/agGrid/agGridHelper.d.ts +0 -1
- package/src/agGrid/agGridHelper.js +16 -14
- package/src/agGrid/editors/AdaptableDateEditor/InternalAdaptableDateEditor.d.ts +2 -2
- package/src/agGrid/editors/AdaptableNumberEditor/InternalAdaptableNumberEditor.d.ts +2 -2
- package/src/components/CheckBox/index.d.ts +1 -1
- package/src/components/ColorPicker/ColorPicker.d.ts +2 -2
- package/src/components/ColorPicker/ColorPicker.js +1 -1
- package/src/components/ContainerProps.d.ts +2 -2
- package/src/components/Dashboard/Dashboard.d.ts +2 -2
- package/src/components/Dashboard/DashboardTab.d.ts +1 -1
- package/src/components/Dashboard/DashboardToolbar.d.ts +1 -1
- package/src/components/Datepicker/index.d.ts +2 -2
- package/src/components/Dialog/index.d.ts +2 -2
- package/src/components/Dropdown/index.d.ts +2 -2
- package/src/components/DropdownButton/DropdownButtonItem.d.ts +1 -1
- package/src/components/DropdownButton/index.d.ts +1 -1
- package/src/components/DropdownButton/renderItem.d.ts +1 -1
- package/src/components/DropdownButton/useExpanded.d.ts +1 -1
- package/src/components/EllipsisContainer/index.d.ts +1 -1
- package/src/components/EmptyContent/index.d.ts +1 -1
- package/src/components/ExpressionEditor/BaseEditorInput.js +1 -1
- package/src/components/ExpressionEditor/NamedQueryContext.d.ts +1 -1
- package/src/components/ExpressionEditor/QueryBuilder/QueryBuilder.js +45 -15
- package/src/components/ExpressionEditor/QueryBuilder/QueryBuilderInputs.d.ts +7 -2
- package/src/components/ExpressionEditor/QueryBuilder/QueryBuilderInputs.js +48 -33
- package/src/components/ExpressionEditor/QueryBuilder/QueryPredicateBuilder.d.ts +1 -1
- package/src/components/ExpressionEditor/QueryBuilder/QueryPredicateBuilder.js +6 -6
- package/src/components/ExpressionEditor/QueryBuilder/booleanExpressions.js +2 -0
- package/src/components/ExpressionEditor/QueryBuilder/utils.d.ts +2 -1
- package/src/components/ExpressionEditor/QueryBuilder/utils.js +30 -0
- package/src/components/ExpressionEditor/index.d.ts +2 -1
- package/src/components/ExpressionEditor/index.js +81 -59
- package/src/components/FormLayout/index.d.ts +4 -4
- package/src/components/Input/NumberInput.d.ts +1 -1
- package/src/components/Input/index.d.ts +2 -2
- package/src/components/List/ListGroupItem/index.d.ts +2 -2
- package/src/components/Modal/Backdrop.d.ts +2 -2
- package/src/components/OverlayTrigger/index.d.ts +1 -1
- package/src/components/Panel/index.d.ts +1 -1
- package/src/components/Radio/index.d.ts +1 -1
- package/src/components/ResizeObserver/index.d.ts +1 -1
- package/src/components/Select/Select.d.ts +30 -0
- package/src/components/Select/Select.js +128 -0
- package/src/components/Select/index.d.ts +1 -0
- package/src/components/Select/index.js +1 -0
- package/src/components/SelectableList/index.d.ts +1 -1
- package/src/components/Tabs/index.d.ts +3 -3
- package/src/components/Textarea/index.d.ts +1 -1
- package/src/components/Toggle/Toggle.d.ts +1 -1
- package/src/components/WarningBox/index.d.ts +4 -0
- package/src/components/WarningBox/index.js +7 -0
- package/src/components/WindowModal/WindowModal.d.ts +2 -2
- package/src/components/icons/DefaultIcon.d.ts +1 -1
- package/src/components/icons/index.js +2 -0
- package/src/components/icons/resume.d.ts +3 -0
- package/src/components/icons/resume.js +4 -0
- package/src/components/utils/useContainerScrollObserver/index.d.ts +1 -1
- package/src/components/utils/uuid.d.ts +1 -1
- package/src/metamodel/adaptable-metamodel-model.d.ts +2 -2
- package/src/metamodel/adaptable.metamodel.d.ts +330 -27
- package/src/metamodel/adaptable.metamodel.js +9435 -1
- package/src/parser/src/predicate/mapExpressionToQlPredicate.js +1 -1
- package/src/parser/src/predicate/mapQlPredicateToExpression.js +3 -0
- package/src/parser/src/predicate/types.d.ts +2 -2
- package/src/parser/src/types.d.ts +23 -11
- package/src/renderReactRoot.d.ts +2 -4
- package/src/renderReactRoot.js +5 -46
- package/src/types.d.ts +6 -6
- package/themes/dark.css +1 -1
- package/themes/dark.css.map +1 -1
- package/themes/light.css +1 -1
- package/themes/light.css.map +1 -1
- package/tsconfig.esm.tsbuildinfo +1 -0
- package/publishTimestamp.d.ts +0 -2
- package/publishTimestamp.js +0 -1
- package/src/AdaptableOptions/FilterOptions.d.ts +0 -216
- package/src/AdaptableOptions/FinancePluginOptions.d.ts +0 -6
- package/src/AdaptableOptions/FinancePluginOptions.js +0 -1
- package/src/Api/Events/ChexboxColumnClicked.d.ts +0 -24
- package/src/Api/Events/ChexboxColumnClicked.js +0 -1
- package/src/Api/Events/QueryRun.d.ts +0 -15
- package/src/Api/Events/QueryRun.js +0 -1
- package/src/PredefinedConfig/ConditionalStyleState.d.ts +0 -41
- package/src/PredefinedConfig/ConditionalStyleState.js +0 -1
- package/version.d.ts +0 -2
- package/version.js +0 -1
- /package/src/AdaptableOptions/{FilterOptions.js → GridFilterOptions.js} +0 -0
|
@@ -8,3 +8,12 @@ export const normalizeDateParams = (args) => {
|
|
|
8
8
|
}
|
|
9
9
|
return [first, second];
|
|
10
10
|
};
|
|
11
|
+
export const normalizeDateParam = (args) => {
|
|
12
|
+
if (typeof args === 'string') {
|
|
13
|
+
args = new Date(args);
|
|
14
|
+
}
|
|
15
|
+
if (typeof args === 'number') {
|
|
16
|
+
args = new Date(args);
|
|
17
|
+
}
|
|
18
|
+
return args;
|
|
19
|
+
};
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
type VoidFn = () => void;
|
|
2
|
+
type Pair<KeyType, ValueType> = {
|
|
3
3
|
value?: ValueType;
|
|
4
4
|
map?: Map<KeyType, Pair<KeyType, ValueType>>;
|
|
5
5
|
revision?: number;
|
|
6
6
|
};
|
|
7
|
-
export
|
|
7
|
+
export type DeepMapVisitFn<KeyType, ValueType> = (pair: Pair<KeyType, ValueType>, keys: KeyType[], next: VoidFn) => void;
|
|
8
8
|
export declare class DeepMap<KeyType, ValueType> {
|
|
9
9
|
private map;
|
|
10
10
|
private length;
|
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
const SORT_ASC_REVISION = (p1, p2) => sortAscending(p1.revision, p2.revision);
|
|
2
2
|
export class DeepMap {
|
|
3
|
+
static clone(map) {
|
|
4
|
+
const clone = new DeepMap();
|
|
5
|
+
map.visit((pair, keys) => {
|
|
6
|
+
clone.set(keys, pair.value);
|
|
7
|
+
});
|
|
8
|
+
return clone;
|
|
9
|
+
}
|
|
3
10
|
constructor(initial) {
|
|
4
11
|
this.map = new Map();
|
|
5
12
|
this.length = 0;
|
|
@@ -39,13 +46,6 @@ export class DeepMap {
|
|
|
39
46
|
});
|
|
40
47
|
}
|
|
41
48
|
}
|
|
42
|
-
static clone(map) {
|
|
43
|
-
const clone = new DeepMap();
|
|
44
|
-
map.visit((pair, keys) => {
|
|
45
|
-
clone.set(keys, pair.value);
|
|
46
|
-
});
|
|
47
|
-
return clone;
|
|
48
|
-
}
|
|
49
49
|
set(keys, value) {
|
|
50
50
|
let currentMap = this.map;
|
|
51
51
|
if (!keys.length) {
|
|
@@ -16,7 +16,7 @@ export declare const isTextSearchCaseInsensitive: (context: ExpressionContext) =
|
|
|
16
16
|
export declare const getDataChangeLog$: (context: ExpressionContext, columnNameFilter: string) => Observable<CellDataChangedInfo>;
|
|
17
17
|
export declare const getGridChangeLog$: (context: ExpressionContext, gridChangeType: GridDataChangedInfo['rowTrigger']) => Observable<GridDataChangedInfo>;
|
|
18
18
|
export declare const handleWhereFunction: (args: ExpressionNode[], context: ExpressionContext) => any;
|
|
19
|
-
export
|
|
19
|
+
export type ExpressionNode = any;
|
|
20
20
|
export declare const evaluateExpressionNode: (expressionNode: ExpressionNode, context: ExpressionContext, filterFn?: (item: any) => boolean) => any;
|
|
21
21
|
export declare const extractColumnParameter: (consumingFunctionName: string, args: BaseParameter[]) => ColumnParameter;
|
|
22
22
|
export declare const extractColumnParameters: (consumingFunctionName: string, args: BaseParameter[]) => ColumnParameter[];
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import { DeepMap } from './deepMap';
|
|
2
|
-
export
|
|
3
|
-
export
|
|
2
|
+
export type GroupKeyType<T extends any = any> = T;
|
|
3
|
+
export type GroupBy<DataType, KeyType> = {
|
|
4
4
|
field: keyof DataType;
|
|
5
5
|
toKey?: (value: any, data: DataType) => GroupKeyType<KeyType>;
|
|
6
6
|
};
|
|
7
|
-
export
|
|
7
|
+
export type GroupParams<DataType, KeyType> = {
|
|
8
8
|
groupBy: GroupBy<DataType, KeyType>[];
|
|
9
9
|
defaultToKey?: (value: any, item: DataType) => GroupKeyType<KeyType>;
|
|
10
10
|
reducers?: Record<string, DataSourceAggregationReducer<DataType, any>>;
|
|
11
11
|
};
|
|
12
|
-
export
|
|
12
|
+
export type DataSourceAggregationReducer<T, AggregationResultType> = {
|
|
13
13
|
name?: string;
|
|
14
14
|
field?: keyof T;
|
|
15
15
|
initialValue?: AggregationResultType;
|
|
@@ -17,18 +17,18 @@ export declare type DataSourceAggregationReducer<T, AggregationResultType> = {
|
|
|
17
17
|
reducer: string | ((accumulator: any, value: any, data: T) => AggregationResultType | any);
|
|
18
18
|
done?: (accumulatedValue: AggregationResultType | any, array: T[]) => AggregationResultType;
|
|
19
19
|
};
|
|
20
|
-
export
|
|
20
|
+
export type DataGroupResult<DataType, KeyType extends any> = {
|
|
21
21
|
deepMap: DeepMap<GroupKeyType<KeyType>, DeepMapGroupValueType<DataType, KeyType>>;
|
|
22
22
|
groupParams: GroupParams<DataType, KeyType>;
|
|
23
23
|
initialData: DataType[];
|
|
24
24
|
reducerResults?: Record<string, any>;
|
|
25
25
|
};
|
|
26
|
-
export
|
|
26
|
+
export type DeepMapGroupValueType<DataType, KeyType> = {
|
|
27
27
|
items: DataType[];
|
|
28
28
|
commonData?: Partial<DataType>;
|
|
29
29
|
reducerResults: Record<string, any>;
|
|
30
30
|
};
|
|
31
|
-
export
|
|
31
|
+
export type AggregationReducerResult<AggregationResultType extends any = any> = {
|
|
32
32
|
value: AggregationResultType;
|
|
33
33
|
id: string;
|
|
34
34
|
};
|
|
@@ -2,6 +2,6 @@ import { ExpressionFunction } from '../../parser/src/types';
|
|
|
2
2
|
/**
|
|
3
3
|
* List of all the Observable Functions available in AdaptableQL
|
|
4
4
|
*/
|
|
5
|
-
export
|
|
5
|
+
export type ObservableFunctionName = 'WHERE' | 'COL' | 'TIMEFRAME' | 'ROW_CHANGE' | 'ROW_ADDED' | 'GRID_CHANGE' | 'ROW_REMOVED' | 'MAX' | 'MIN' | 'NONE' | 'COUNT';
|
|
6
6
|
export declare const observableExpressionFunctions: Record<ObservableFunctionName, ExpressionFunction>;
|
|
7
7
|
export declare const observableExpressionFunctionNames: ObservableFunctionName[];
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import { DeepMap } from './deepMap';
|
|
2
|
-
export
|
|
3
|
-
export
|
|
2
|
+
export type GroupKeyType<T extends any = any> = T;
|
|
3
|
+
export type GroupBy<DataType, KeyType> = {
|
|
4
4
|
field: keyof DataType & string;
|
|
5
5
|
toKey?: (value: any, data: DataType) => GroupKeyType<KeyType>;
|
|
6
6
|
};
|
|
7
|
-
export
|
|
7
|
+
export type AggregateParams<DataType, KeyType> = {
|
|
8
8
|
reducers: Record<string, DataAggregationReducer<DataType, any>>;
|
|
9
9
|
groupBy?: GroupBy<DataType, KeyType>[];
|
|
10
10
|
defaultToKey?: (value: any, item: DataType) => GroupKeyType<KeyType>;
|
|
11
11
|
};
|
|
12
|
-
export
|
|
12
|
+
export type DataAggregationReducer<T, AggregationResultType> = {
|
|
13
13
|
name?: string;
|
|
14
14
|
field?: keyof T & string;
|
|
15
15
|
initialValue?: AggregationResultType;
|
|
@@ -17,16 +17,16 @@ export declare type DataAggregationReducer<T, AggregationResultType> = {
|
|
|
17
17
|
reducer: string | ((accumulator: any, value: any, data: T, dataIndex: number) => AggregationResultType | any);
|
|
18
18
|
done?: (accumulatedValue: AggregationResultType | any, array: T[]) => AggregationResultType;
|
|
19
19
|
};
|
|
20
|
-
export
|
|
20
|
+
export type DataAggregationResult<DataType, KeyType extends any> = {
|
|
21
21
|
deepMap: DeepMap<GroupKeyType<KeyType>, DeepMapAggregationValueType<DataType, KeyType>>;
|
|
22
22
|
aggregateParams: AggregateParams<DataType, KeyType>;
|
|
23
23
|
initialData: DataType[];
|
|
24
24
|
reducerResults?: Record<string, AggregationReducerResult>;
|
|
25
25
|
};
|
|
26
|
-
export
|
|
26
|
+
export type DeepMapAggregationValueType<DataType, KeyType> = {
|
|
27
27
|
items: DataType[];
|
|
28
28
|
commonData?: Partial<DataType>;
|
|
29
29
|
reducerResults: Record<string, AggregationReducerResult>;
|
|
30
30
|
};
|
|
31
|
-
export
|
|
31
|
+
export type AggregationReducerResult = number;
|
|
32
32
|
export declare function aggregate<DataType, KeyType = any>(aggregateParams: AggregateParams<DataType, KeyType>, data: DataType[]): DataAggregationResult<DataType, KeyType>;
|
|
@@ -2,6 +2,6 @@ import { ExpressionFunction } from '../../parser/src/types';
|
|
|
2
2
|
/**
|
|
3
3
|
* List of all the Scalar Functions available in AdaptableQL
|
|
4
4
|
*/
|
|
5
|
-
export
|
|
5
|
+
export type ScalarFunctionName = 'ADD' | 'SUB' | 'MUL' | 'DIV' | 'MOD' | 'POW' | 'ABS' | 'CEILING' | 'FLOOR' | 'ROUND' | 'MIN' | 'MAX' | 'AVG' | 'DATE' | 'NOW' | 'TODAY' | 'DAY' | 'WEEK' | 'MONTH' | 'YEAR' | 'ADD_DAYS' | 'ADD_WEEKS' | 'ADD_MONTHS' | 'ADD_YEARS' | 'DIFF_DAYS' | 'DIFF_WEEKS' | 'DIFF_MONTHS' | 'DIFF_YEARS' | 'SUB_STRING' | 'REPLACE' | 'COALESCE' | 'NULL' | 'LEN' | 'UPPER' | 'LOWER' | 'CONCAT' | 'IF' | 'CASE' | 'COL' | 'VAR' | 'TO_ARRAY' | 'QUERY' | 'IS_BLANK' | 'IS_NOT_BLANK';
|
|
6
6
|
export declare const scalarExpressionFunctions: Record<ScalarFunctionName, ExpressionFunction>;
|
|
7
7
|
export declare const scalarExpressionFunctionNames: ScalarFunctionName[];
|
|
@@ -140,11 +140,21 @@ export const scalarExpressionFunctions = {
|
|
|
140
140
|
return args[0] === undefined || args[0] === null || args[0] === '';
|
|
141
141
|
},
|
|
142
142
|
category: 'special',
|
|
143
|
-
description: 'Returns true
|
|
143
|
+
description: 'Returns true if input value is undefined, null, or an empty string',
|
|
144
144
|
signatures: ['IS_BLANK(input: any)'],
|
|
145
145
|
examples: ['IS_BLANK([col1])'],
|
|
146
146
|
returnType: 'boolean',
|
|
147
147
|
},
|
|
148
|
+
IS_NOT_BLANK: {
|
|
149
|
+
handler(args) {
|
|
150
|
+
return args[0] !== undefined && args[0] !== null && (String)(args[0]).trim() !== '';
|
|
151
|
+
},
|
|
152
|
+
category: 'special',
|
|
153
|
+
description: 'Returns true if input value is not empty',
|
|
154
|
+
signatures: ['IS_NOT_BLANK(input: any)'],
|
|
155
|
+
examples: ['IS_NOT_BLANK([col1])'],
|
|
156
|
+
returnType: 'boolean',
|
|
157
|
+
},
|
|
148
158
|
ABS: {
|
|
149
159
|
handler(args) {
|
|
150
160
|
return sanitizeNumericResult(Math.abs(args[0]));
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Get the keys of FirstType without any keys of SecondType.
|
|
3
3
|
*/
|
|
4
|
-
|
|
4
|
+
type Without<FirstType, SecondType> = {
|
|
5
5
|
[KeyType in Exclude<keyof FirstType, keyof SecondType>]?: never;
|
|
6
6
|
};
|
|
7
7
|
/**
|
|
@@ -13,7 +13,7 @@ declare type Without<FirstType, SecondType> = {
|
|
|
13
13
|
*
|
|
14
14
|
* @see https://github.com/maninak/ts-xor/tree/master#description
|
|
15
15
|
*/
|
|
16
|
-
export
|
|
16
|
+
export type XOR<FirstType, SecondType> = FirstType | SecondType extends object ? (Without<FirstType, SecondType> & SecondType) | (Without<SecondType, FirstType> & FirstType) : FirstType | SecondType;
|
|
17
17
|
/**
|
|
18
18
|
* Create a type where at least one of the properties of a type(can be any property) is required to exist.
|
|
19
19
|
* Optionally the set of required properties may be restricted with the second generic type.
|
|
@@ -38,11 +38,11 @@ export declare type XOR<FirstType, SecondType> = FirstType | SecondType extends
|
|
|
38
38
|
*
|
|
39
39
|
* @see https://stackoverflow.com/a/49725198
|
|
40
40
|
*/
|
|
41
|
-
export
|
|
41
|
+
export type RequireAtLeastOne<T, Keys extends keyof T = keyof T> = Pick<T, Exclude<keyof T, Keys>> & {
|
|
42
42
|
[K in Keys]-?: Required<Pick<T, K>> & Partial<Pick<T, Exclude<Keys, K>>>;
|
|
43
43
|
}[Keys];
|
|
44
44
|
/** Similar to the builtin Extract, but checks the filter strictly */
|
|
45
|
-
export
|
|
45
|
+
export type StrictExtract<T, U extends Partial<T>> = Extract<T, U>;
|
|
46
46
|
/**
|
|
47
47
|
* DeepRequired
|
|
48
48
|
*
|
|
@@ -66,13 +66,13 @@ export declare type StrictExtract<T, U extends Partial<T>> = Extract<T, U>;
|
|
|
66
66
|
* };
|
|
67
67
|
* type RequiredNestedProps = DeepRequired<NestedProps>;
|
|
68
68
|
*/
|
|
69
|
-
export
|
|
69
|
+
export type DeepRequired<T> = T extends (...args: any[]) => any ? T : T extends any[] ? _DeepRequiredArray<T[number]> : T extends object ? _DeepRequiredObject<T> : T;
|
|
70
70
|
export interface _DeepRequiredArray<T> extends Array<DeepRequired<NonUndefined<T>>> {
|
|
71
71
|
}
|
|
72
|
-
export
|
|
72
|
+
export type _DeepRequiredObject<T> = {
|
|
73
73
|
[P in keyof T]-?: DeepRequired<NonUndefined<T[P]>>;
|
|
74
74
|
};
|
|
75
|
-
export
|
|
75
|
+
export type NonUndefined<A> = A extends undefined ? never : A;
|
|
76
76
|
export declare const getTypedKeys: <T extends string>(input: Record<T, any>) => T[];
|
|
77
|
-
export
|
|
77
|
+
export type OneOf<T extends any[]> = T extends [infer Only] ? Only : T extends [infer A, infer B, ...infer Rest] ? OneOf<[XOR<A, B>, ...Rest]> : never;
|
|
78
78
|
export {};
|
|
@@ -31,6 +31,10 @@ export function assignAdaptableOptions(adaptableOptions) {
|
|
|
31
31
|
returnedAdaptableOptions.groupingOptions = Object.assign({}, DefaultAdaptableOptions.groupingOptions, adaptableOptions.groupingOptions);
|
|
32
32
|
returnedAdaptableOptions.quickSearchOptions = Object.assign({}, DefaultAdaptableOptions.quickSearchOptions, adaptableOptions.quickSearchOptions);
|
|
33
33
|
returnedAdaptableOptions.columnFilterOptions = Object.assign({}, DefaultAdaptableOptions.columnFilterOptions, adaptableOptions.columnFilterOptions);
|
|
34
|
+
returnedAdaptableOptions.columnFilterOptions.quickFilterOptions = Object.assign({}, DefaultAdaptableOptions.columnFilterOptions.quickFilterOptions, returnedAdaptableOptions.columnFilterOptions.quickFilterOptions);
|
|
35
|
+
returnedAdaptableOptions.columnFilterOptions.filterFormOptions = Object.assign({}, DefaultAdaptableOptions.columnFilterOptions.filterFormOptions, returnedAdaptableOptions.columnFilterOptions.filterFormOptions);
|
|
36
|
+
returnedAdaptableOptions.columnFilterOptions.valuesFilterOptions = Object.assign({}, DefaultAdaptableOptions.columnFilterOptions.valuesFilterOptions, returnedAdaptableOptions.columnFilterOptions.valuesFilterOptions);
|
|
37
|
+
returnedAdaptableOptions.gridFilterOptions = Object.assign({}, DefaultAdaptableOptions.gridFilterOptions, adaptableOptions.gridFilterOptions);
|
|
34
38
|
returnedAdaptableOptions.userInterfaceOptions = Object.assign({}, DefaultAdaptableOptions.userInterfaceOptions, adaptableOptions.userInterfaceOptions);
|
|
35
39
|
returnedAdaptableOptions.userInterfaceOptions.dateInputOptions = Object.assign({}, DefaultAdaptableOptions.userInterfaceOptions.dateInputOptions, returnedAdaptableOptions.userInterfaceOptions.dateInputOptions);
|
|
36
40
|
returnedAdaptableOptions.menuOptions = Object.assign({}, DefaultAdaptableOptions.menuOptions, adaptableOptions.menuOptions);
|
|
@@ -10,6 +10,5 @@ export declare class EntitlementService implements IEntitlementService {
|
|
|
10
10
|
isModuleFullEntitlement(adaptableModule: AdaptableModule): boolean;
|
|
11
11
|
isModuleReadOnlyEntitlement(adaptableModule: AdaptableModule): boolean;
|
|
12
12
|
getEntitlementAccessLevelForModule(adaptableModule: AdaptableModule): AccessLevel;
|
|
13
|
-
isGridInfoSectionVisible(section: 'GridSummary' | 'AdaptableOptions' | 'ColumnInfo'): boolean;
|
|
14
13
|
destroy(): void;
|
|
15
14
|
}
|
|
@@ -57,14 +57,6 @@ export class EntitlementService {
|
|
|
57
57
|
}
|
|
58
58
|
return 'Full';
|
|
59
59
|
}
|
|
60
|
-
isGridInfoSectionVisible(section) {
|
|
61
|
-
if (this.isModuleHiddenEntitlement('GridInfo')) {
|
|
62
|
-
return false;
|
|
63
|
-
}
|
|
64
|
-
return this.adaptableApi.optionsApi
|
|
65
|
-
.getUserInterfaceOptions()
|
|
66
|
-
.gridInfoSections.includes(section);
|
|
67
|
-
}
|
|
68
60
|
destroy() {
|
|
69
61
|
// TO DO
|
|
70
62
|
}
|
|
@@ -2,13 +2,13 @@ import { AlertDefinition } from '../../../PredefinedConfig/AlertState';
|
|
|
2
2
|
import { CellDataChangedInfo } from '../../../PredefinedConfig/Common/CellDataChangedInfo';
|
|
3
3
|
import { GridDataChangedInfo } from '../../../types';
|
|
4
4
|
import { IAdaptableService } from './IAdaptableService';
|
|
5
|
-
export
|
|
6
|
-
export
|
|
5
|
+
export type ReactiveAlertInfo = ReactiveGridDataChangedAlertInfo | ReactiveCellDataChangedAlertInfo;
|
|
6
|
+
export type ReactiveGridDataChangedAlertInfo = {
|
|
7
7
|
type: 'gridDataChangedAlert';
|
|
8
8
|
alertDefinition: AlertDefinition;
|
|
9
9
|
gridChangeLogEntry: GridDataChangedInfo;
|
|
10
10
|
};
|
|
11
|
-
export
|
|
11
|
+
export type ReactiveCellDataChangedAlertInfo = {
|
|
12
12
|
type: 'cellDataChangedAlert';
|
|
13
13
|
alertDefinition: AlertDefinition;
|
|
14
14
|
cellChangeLogEntry: CellDataChangedInfo;
|
|
@@ -1,16 +1,10 @@
|
|
|
1
1
|
import { IAdaptableService } from './IAdaptableService';
|
|
2
2
|
import { AdaptableModule } from '../../../PredefinedConfig/Common/Types';
|
|
3
3
|
import { AccessLevel } from '../../../PredefinedConfig/Common/Entitlement';
|
|
4
|
-
import { GridInfoSection } from '../../../types';
|
|
5
4
|
export interface IEntitlementService extends IAdaptableService {
|
|
6
5
|
setModulesEntitlements(): void;
|
|
7
6
|
isModuleHiddenEntitlement(adaptableModule: AdaptableModule): boolean;
|
|
8
7
|
isModuleFullEntitlement(adaptableModule: AdaptableModule): boolean;
|
|
9
8
|
isModuleReadOnlyEntitlement(adaptableModule: AdaptableModule): boolean;
|
|
10
9
|
getEntitlementAccessLevelForModule(adaptableModule: AdaptableModule): AccessLevel;
|
|
11
|
-
/**
|
|
12
|
-
* No longer used
|
|
13
|
-
* @deprecated
|
|
14
|
-
*/
|
|
15
|
-
isGridInfoSectionVisible(section: GridInfoSection): boolean;
|
|
16
10
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { AdaptableOptions } from '../../../../types';
|
|
2
2
|
import { MetamodelItemPropertyKind } from '../../../metamodel/adaptable-metamodel-model';
|
|
3
3
|
import { IAdaptableService } from './IAdaptableService';
|
|
4
|
-
export
|
|
4
|
+
export type GridInfoOptions = Map<string, {
|
|
5
5
|
containerLabel: string;
|
|
6
6
|
items: GridInfoOption[];
|
|
7
7
|
}>;
|
|
@@ -1 +1,181 @@
|
|
|
1
|
-
import{SystemLicenseDisablePersistence
|
|
1
|
+
import { SystemLicenseDisablePersistence, SystemLicenseShowWatermark, } from '../../../Redux/ActionsReducers/SystemRedux';
|
|
2
|
+
import { PopupShowAlert } from '../../../Redux/ActionsReducers/PopupRedux';
|
|
3
|
+
import ObjectFactory from '../../ObjectFactory';
|
|
4
|
+
import clamp from 'lodash/clamp';
|
|
5
|
+
import { LicenseDocsLink } from '../../Constants/DocumentationLinkConstants';
|
|
6
|
+
import { decode as decodeLicense, GENERIC_APP_NAME } from '../../license/decode';
|
|
7
|
+
import { shouldLogThankYouMessage } from './shouldLogThankYouMessage';
|
|
8
|
+
const EMAIL = 'sales@adaptabletools.com';
|
|
9
|
+
const COMMERCIAL_LICENSE_SHOW_INFO_DAYS_BEFORE_EXPIRE = 10;
|
|
10
|
+
const DAY_IN_MS = 1000 * 60 * 60 * 24;
|
|
11
|
+
export var LicenseValidityType;
|
|
12
|
+
(function (LicenseValidityType) {
|
|
13
|
+
LicenseValidityType["INVALID_LICENSE"] = "INVALID_LICENSE";
|
|
14
|
+
LicenseValidityType["NO_LICENSE"] = "NO_LICENSE";
|
|
15
|
+
LicenseValidityType["NON_PRODUCTION_VALID"] = "NON_PRODUCTION_VALID";
|
|
16
|
+
LicenseValidityType["NON_PRODUCTION_EXPIRED_IN_SCOPE"] = "NON_PRODUCTION_EXPIRED_IN_SCOPE";
|
|
17
|
+
LicenseValidityType["NON_PRODUCTION_EXPIRED_OUT_OF_SCOPE"] = "NON_PRODUCTION_EXPIRED_OUT_OF_SCOPE";
|
|
18
|
+
LicenseValidityType["COMMERCIAL_VALID"] = "COMMERCIAL_VALID";
|
|
19
|
+
LicenseValidityType["COMMERCIAL_EXPIRED_IN_SCOPE"] = "COMMERCIAL_EXPIRED_IN_SCOPE";
|
|
20
|
+
LicenseValidityType["COMMERCIAL_EXPIRED_OUT_OF_SCOPE"] = "COMMERCIAL_EXPIRED_OUT_OF_SCOPE";
|
|
21
|
+
})(LicenseValidityType || (LicenseValidityType = {}));
|
|
22
|
+
const SANDPACK_REGEX = /(https):\/\/\d+\-\d+\-\d+\-(sandpack\.codesandbox\.io)/g;
|
|
23
|
+
const SANDBOX_REGEX = /(https):\/\/\S+(\.csb\.app)/g;
|
|
24
|
+
const DEMO_REGEX = /(https):\/\/\S+(\.adaptabletools\.com)/g;
|
|
25
|
+
const origin = typeof window !== 'undefined' ? window.location.origin : '';
|
|
26
|
+
const isInsideSandpack = () => {
|
|
27
|
+
const [_fullUrl, protocol, sandpackUrl] = Array.from(SANDPACK_REGEX.exec(origin) || []);
|
|
28
|
+
return protocol === 'https' && sandpackUrl === 'sandpack.codesandbox.io';
|
|
29
|
+
};
|
|
30
|
+
const isInsideSandbox = () => {
|
|
31
|
+
const [_fullUrl, protocol, sandboxUrl] = Array.from(SANDBOX_REGEX.exec(origin) || []);
|
|
32
|
+
return protocol === 'https' && sandboxUrl === '.csb.app';
|
|
33
|
+
};
|
|
34
|
+
const isDemoApp = () => {
|
|
35
|
+
const [_fullUrl, protocol, demoAppUrl] = Array.from(DEMO_REGEX.exec(origin) || []);
|
|
36
|
+
return protocol === 'https' && demoAppUrl === '.adaptabletools.com';
|
|
37
|
+
};
|
|
38
|
+
export class LicenseService {
|
|
39
|
+
constructor(adaptable, licenseKey, packageDetails) {
|
|
40
|
+
this.adaptable = adaptable;
|
|
41
|
+
this.adaptable = adaptable;
|
|
42
|
+
let details = null;
|
|
43
|
+
if (licenseKey) {
|
|
44
|
+
try {
|
|
45
|
+
details = decodeLicense(licenseKey);
|
|
46
|
+
}
|
|
47
|
+
catch (error) {
|
|
48
|
+
details = error;
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
if (!isInsideSandpack() && !isInsideSandbox() && !isDemoApp()) {
|
|
52
|
+
this.handleLicenseValidation(details, this.getValidityType(details, packageDetails));
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
getValidityType(details, packageDetails) {
|
|
56
|
+
if (!details) {
|
|
57
|
+
return LicenseValidityType.NO_LICENSE;
|
|
58
|
+
}
|
|
59
|
+
if (details instanceof Error) {
|
|
60
|
+
return LicenseValidityType.INVALID_LICENSE;
|
|
61
|
+
}
|
|
62
|
+
const currentVersionReleaseDate = new Date(packageDetails.publishedAt);
|
|
63
|
+
const licenseEndDate = new Date(details.end);
|
|
64
|
+
const currentDate = new Date();
|
|
65
|
+
const isExpired = licenseEndDate < currentDate;
|
|
66
|
+
const isTrial = details.trial;
|
|
67
|
+
const isScope = licenseEndDate > currentVersionReleaseDate;
|
|
68
|
+
let validityType = null;
|
|
69
|
+
if (isExpired) {
|
|
70
|
+
if (isScope) {
|
|
71
|
+
if (isTrial) {
|
|
72
|
+
validityType = LicenseValidityType.NON_PRODUCTION_EXPIRED_IN_SCOPE;
|
|
73
|
+
}
|
|
74
|
+
else {
|
|
75
|
+
validityType = LicenseValidityType.COMMERCIAL_EXPIRED_IN_SCOPE;
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
else {
|
|
79
|
+
if (isTrial) {
|
|
80
|
+
validityType = LicenseValidityType.NON_PRODUCTION_EXPIRED_OUT_OF_SCOPE;
|
|
81
|
+
}
|
|
82
|
+
else {
|
|
83
|
+
validityType = LicenseValidityType.COMMERCIAL_EXPIRED_OUT_OF_SCOPE;
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
else {
|
|
88
|
+
if (isTrial) {
|
|
89
|
+
validityType = LicenseValidityType.NON_PRODUCTION_VALID;
|
|
90
|
+
}
|
|
91
|
+
else {
|
|
92
|
+
validityType = LicenseValidityType.COMMERCIAL_VALID;
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
return validityType;
|
|
96
|
+
}
|
|
97
|
+
handleLicenseValidation(details, validityType) {
|
|
98
|
+
var _a;
|
|
99
|
+
const nowAtMidnight = new Date();
|
|
100
|
+
nowAtMidnight.setHours(0, 0, 0, 0);
|
|
101
|
+
let daysLeft = 0;
|
|
102
|
+
if (!(details instanceof Error) && (details === null || details === void 0 ? void 0 : details.end)) {
|
|
103
|
+
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);
|
|
104
|
+
daysLeft = clamp(daysLeft, 0, Infinity);
|
|
105
|
+
}
|
|
106
|
+
let APP_NAME = '';
|
|
107
|
+
let forApp = '';
|
|
108
|
+
if (details &&
|
|
109
|
+
!(details instanceof Error) &&
|
|
110
|
+
details.appName &&
|
|
111
|
+
details.appName != GENERIC_APP_NAME) {
|
|
112
|
+
APP_NAME = details.appName;
|
|
113
|
+
forApp = ` for application [APP_NAME]`;
|
|
114
|
+
}
|
|
115
|
+
const annotateMessage = (message, link = LicenseDocsLink, email = EMAIL, days = daysLeft, appName = APP_NAME) => {
|
|
116
|
+
return message
|
|
117
|
+
.replace('[LINK]', link)
|
|
118
|
+
.replace('[EMAIL]', email)
|
|
119
|
+
.replace('[APP_NAME]', appName)
|
|
120
|
+
.replace('[DAYS]', `${days}`);
|
|
121
|
+
};
|
|
122
|
+
switch (validityType) {
|
|
123
|
+
case 'NO_LICENSE':
|
|
124
|
+
case 'NON_PRODUCTION_EXPIRED_OUT_OF_SCOPE':
|
|
125
|
+
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');
|
|
126
|
+
this.showNotification('No AdapTable License found.');
|
|
127
|
+
this.showWatermark('This instance of AdapTable does not have a license, and some functionality has therefore been removed.');
|
|
128
|
+
this.disableStatePersistence();
|
|
129
|
+
break;
|
|
130
|
+
case 'INVALID_LICENSE':
|
|
131
|
+
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');
|
|
132
|
+
this.showNotification('Corrupted AdapTable License found.');
|
|
133
|
+
this.showWatermark(`This instance of AdapTable has a corrupted License, and some functionality has therefore been removed.`);
|
|
134
|
+
this.disableStatePersistence();
|
|
135
|
+
break;
|
|
136
|
+
case 'NON_PRODUCTION_VALID':
|
|
137
|
+
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');
|
|
138
|
+
break;
|
|
139
|
+
case 'NON_PRODUCTION_EXPIRED_IN_SCOPE':
|
|
140
|
+
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');
|
|
141
|
+
this.showWatermark('AdapTable License has expired');
|
|
142
|
+
break;
|
|
143
|
+
case 'COMMERCIAL_VALID':
|
|
144
|
+
if (daysLeft <= COMMERCIAL_LICENSE_SHOW_INFO_DAYS_BEFORE_EXPIRE) {
|
|
145
|
+
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');
|
|
146
|
+
}
|
|
147
|
+
else {
|
|
148
|
+
try {
|
|
149
|
+
if (shouldLogThankYouMessage()) {
|
|
150
|
+
this.adaptable.logger.consoleLogByMessageType(annotateMessage(`Thank you for using a valid AdapTable license${forApp}. Your license will expire in [DAYS] days.`), 'Info');
|
|
151
|
+
}
|
|
152
|
+
}
|
|
153
|
+
catch (ex) { }
|
|
154
|
+
}
|
|
155
|
+
break;
|
|
156
|
+
case 'COMMERCIAL_EXPIRED_IN_SCOPE':
|
|
157
|
+
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');
|
|
158
|
+
break;
|
|
159
|
+
case 'COMMERCIAL_EXPIRED_OUT_OF_SCOPE':
|
|
160
|
+
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');
|
|
161
|
+
this.showNotification('Adaptable License has expired');
|
|
162
|
+
this.showWatermark('Adaptable License has expired');
|
|
163
|
+
break;
|
|
164
|
+
}
|
|
165
|
+
}
|
|
166
|
+
showNotification(text) {
|
|
167
|
+
this.adaptable.api.internalApi.dispatchReduxAction(PopupShowAlert({
|
|
168
|
+
alertType: 'generic',
|
|
169
|
+
header: 'License Error',
|
|
170
|
+
message: text,
|
|
171
|
+
alertDefinition: ObjectFactory.CreateInternalAlertDefinitionForMessages('Error'),
|
|
172
|
+
}));
|
|
173
|
+
}
|
|
174
|
+
showWatermark(text) {
|
|
175
|
+
this.adaptable.api.internalApi.dispatchReduxAction(SystemLicenseShowWatermark(text));
|
|
176
|
+
}
|
|
177
|
+
disableStatePersistence() {
|
|
178
|
+
this.adaptable.api.internalApi.dispatchReduxAction(SystemLicenseDisablePersistence());
|
|
179
|
+
}
|
|
180
|
+
destroy() { }
|
|
181
|
+
}
|
|
@@ -46,7 +46,7 @@ export class MetamodelService {
|
|
|
46
46
|
Object.entries(optionsObject).forEach(([optionKey, optionValue]) => {
|
|
47
47
|
var _a;
|
|
48
48
|
if (optionKey === 'gridOptions') {
|
|
49
|
-
validationErrors.push('gridOptions was removed from
|
|
49
|
+
validationErrors.push('gridOptions was removed from Adaptable Options in Version 16 and is no longer used');
|
|
50
50
|
return;
|
|
51
51
|
}
|
|
52
52
|
if (optionKey === '_gridOptions' || optionKey === 'fdc3Options') {
|
|
@@ -116,7 +116,7 @@ export class ModuleService {
|
|
|
116
116
|
case 'PlusMinus':
|
|
117
117
|
return learnUrl + 'handbook-editing-plus-minus';
|
|
118
118
|
case 'NamedQuery':
|
|
119
|
-
return learnUrl + 'handbook-
|
|
119
|
+
return learnUrl + 'handbook-named-queries';
|
|
120
120
|
case 'QuickSearch':
|
|
121
121
|
return learnUrl + 'handbook-quick-search';
|
|
122
122
|
case 'Schedule':
|
|
@@ -1 +1,65 @@
|
|
|
1
|
-
import{compute_string
|
|
1
|
+
import { compute_string } from './hashing';
|
|
2
|
+
const getGenericError = () => new Error('Invalid License');
|
|
3
|
+
export const GENERIC_APP_NAME = 'GenericAdaptableApp';
|
|
4
|
+
export const fieldsToLicenseDetails = (fields) => {
|
|
5
|
+
var _a;
|
|
6
|
+
const fieldsMap = fields.reduce((acc, field) => {
|
|
7
|
+
acc.set(field.name, field.value);
|
|
8
|
+
return acc;
|
|
9
|
+
}, new Map());
|
|
10
|
+
const details = {
|
|
11
|
+
start: new Date(fieldsMap.get('StartDate')),
|
|
12
|
+
end: new Date(fieldsMap.get('EndDate')),
|
|
13
|
+
owner: fieldsMap.get('Owner'),
|
|
14
|
+
appName: fieldsMap.get('AppName') || GENERIC_APP_NAME,
|
|
15
|
+
timestamp: fieldsMap.get('TS') ? Number(fieldsMap.get('TS')) : 0,
|
|
16
|
+
trial: fieldsMap.get('Trial') === 'true' ? true : false,
|
|
17
|
+
ref: (_a = fieldsMap.get('Ref')) !== null && _a !== void 0 ? _a : '',
|
|
18
|
+
};
|
|
19
|
+
if (!details.start ||
|
|
20
|
+
!details.end ||
|
|
21
|
+
!details.owner ||
|
|
22
|
+
typeof details.trial !== 'boolean' ||
|
|
23
|
+
!details.ref) {
|
|
24
|
+
throw getGenericError();
|
|
25
|
+
}
|
|
26
|
+
return details;
|
|
27
|
+
};
|
|
28
|
+
export const decode = (licenseKey) => {
|
|
29
|
+
let crc = '';
|
|
30
|
+
let fields = licenseKey.split('|').map((part) => {
|
|
31
|
+
let [name, value] = part.split('=');
|
|
32
|
+
if (name === 'C') {
|
|
33
|
+
crc = value;
|
|
34
|
+
}
|
|
35
|
+
return {
|
|
36
|
+
name,
|
|
37
|
+
value,
|
|
38
|
+
};
|
|
39
|
+
});
|
|
40
|
+
if (!crc) {
|
|
41
|
+
throw getGenericError();
|
|
42
|
+
}
|
|
43
|
+
const crcParts = crc.split(',').reverse();
|
|
44
|
+
const overallCrc = crcParts.pop();
|
|
45
|
+
crcParts.forEach((fieldCrc, index) => {
|
|
46
|
+
const field = fields[index];
|
|
47
|
+
if (compute_string(field.value) !== fieldCrc) {
|
|
48
|
+
throw getGenericError();
|
|
49
|
+
}
|
|
50
|
+
});
|
|
51
|
+
const fieldsWithoutC = [...fields];
|
|
52
|
+
fieldsWithoutC.pop();
|
|
53
|
+
const fieldsWithoutCString = fieldsWithoutC
|
|
54
|
+
.map((field) => {
|
|
55
|
+
return `${field.name}=${field.value}`;
|
|
56
|
+
})
|
|
57
|
+
.join('|');
|
|
58
|
+
if (compute_string(fieldsWithoutCString) !== overallCrc) {
|
|
59
|
+
throw getGenericError();
|
|
60
|
+
}
|
|
61
|
+
fields = fields.map((f) => {
|
|
62
|
+
return Object.assign(Object.assign({}, f), { value: decodeURI(f.value) });
|
|
63
|
+
});
|
|
64
|
+
return fieldsToLicenseDetails(fields);
|
|
65
|
+
};
|