@adaptabletools/adaptable 13.0.0-canary.8 → 13.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/agGrid.d.ts +10 -10
- package/agGrid.js +10 -10
- package/base.css +1231 -733
- package/base.css.map +1 -0
- package/bundle.cjs.js +237 -220
- package/index.css +1249 -734
- package/index.css.map +1 -0
- package/package.json +5 -5
- package/publishTimestamp.d.ts +1 -1
- package/publishTimestamp.js +1 -1
- package/src/AdaptableInterfaces/IAdaptable.d.ts +7 -3
- package/src/AdaptableOptions/AdaptableOptions.d.ts +0 -2
- package/src/AdaptableOptions/AdaptableQLOptions.d.ts +116 -35
- package/src/AdaptableOptions/ExportOptions.d.ts +2 -2
- package/src/AdaptableOptions/FinsemblePluginOptions.d.ts +32 -0
- package/src/{Api/ConditionalStyleApi.js → AdaptableOptions/FinsemblePluginOptions.js} +0 -0
- package/src/AdaptableOptions/GeneralOptions.d.ts +0 -6
- package/src/AdaptableOptions/LayoutOptions.d.ts +2 -1
- package/src/AdaptableOptions/UserInterfaceOptions.d.ts +2 -2
- package/src/Api/AdaptableApi.d.ts +2 -5
- package/src/Api/ColumnApi.d.ts +8 -2
- package/src/Api/ConfigApi.d.ts +0 -6
- package/src/Api/ExportApi.d.ts +6 -6
- package/src/Api/FinsembleApi.d.ts +10 -0
- package/src/{Strategy/Interface/IConditionalStyleModule.js → Api/FinsembleApi.js} +0 -0
- package/src/Api/FormatColumnApi.d.ts +46 -73
- package/src/Api/Implementation/AdaptableApiImpl.d.ts +2 -2
- package/src/Api/Implementation/AdaptableApiImpl.js +2 -3
- package/src/Api/Implementation/AlertApiImpl.js +9 -4
- package/src/Api/Implementation/ColumnApiImpl.d.ts +2 -1
- package/src/Api/Implementation/ColumnApiImpl.js +15 -11
- package/src/Api/Implementation/ConfigApiImpl.d.ts +0 -2
- package/src/Api/Implementation/ConfigApiImpl.js +0 -11
- package/src/Api/Implementation/ExportApiImpl.d.ts +4 -4
- package/src/Api/Implementation/ExportApiImpl.js +14 -14
- package/src/Api/Implementation/FlashingCellApiImpl.js +4 -1
- package/src/Api/Implementation/FormatColumnApiImpl.d.ts +24 -22
- package/src/Api/Implementation/FormatColumnApiImpl.js +57 -224
- package/src/Api/Implementation/InternalApiImpl.d.ts +1 -1
- package/src/Api/Implementation/InternalApiImpl.js +4 -3
- package/src/Api/Implementation/PluginsApiImpl.d.ts +2 -0
- package/src/Api/Implementation/PluginsApiImpl.js +6 -0
- package/src/Api/Implementation/QueryLanguageApiImpl.d.ts +2 -1
- package/src/Api/Implementation/QueryLanguageApiImpl.js +9 -15
- package/src/Api/Implementation/ScopeApiImpl.d.ts +1 -1
- package/src/Api/Implementation/StyledColumnApiImpl.d.ts +25 -0
- package/src/Api/Implementation/StyledColumnApiImpl.js +193 -0
- package/src/Api/InternalApi.d.ts +1 -1
- package/src/Api/PluginsApi.d.ts +5 -0
- package/src/Api/QueryLanguageApi.d.ts +3 -2
- package/src/Api/ScopeApi.d.ts +1 -1
- package/src/Api/StyledColumnApi.d.ts +106 -0
- package/src/Api/StyledColumnApi.js +2 -0
- package/src/PredefinedConfig/AdaptableState.d.ts +2 -0
- package/src/PredefinedConfig/Common/AdaptableIcon.d.ts +1 -1
- package/src/PredefinedConfig/Common/Types.d.ts +3 -3
- package/src/PredefinedConfig/Common/Types.js +1 -0
- package/src/PredefinedConfig/ConditionalStyleState.d.ts +10 -19
- package/src/PredefinedConfig/FormatColumnState.d.ts +6 -96
- package/src/PredefinedConfig/PredefinedConfig.d.ts +5 -0
- package/src/PredefinedConfig/StyledColumnState.d.ts +119 -0
- package/src/PredefinedConfig/StyledColumnState.js +2 -0
- package/src/Redux/ActionsReducers/PluginsRedux.d.ts +4 -4
- package/src/Redux/ActionsReducers/PluginsRedux.js +5 -5
- package/src/Redux/ActionsReducers/StyledColumnRedux.d.ts +49 -0
- package/src/Redux/ActionsReducers/StyledColumnRedux.js +92 -0
- package/src/Redux/DeadRedux.d.ts +6 -0
- package/src/Redux/DeadRedux.js +19 -1
- package/src/Redux/Store/AdaptableStore.js +9 -8
- package/src/Strategy/ConditionalStyleModule.d.ts +2 -27
- package/src/Strategy/ConditionalStyleModule.js +0 -219
- package/src/Strategy/DataChangeHistoryModule.d.ts +1 -0
- package/src/Strategy/DataChangeHistoryModule.js +12 -0
- package/src/Strategy/FormatColumnModule.d.ts +0 -2
- package/src/Strategy/FormatColumnModule.js +30 -221
- package/src/Strategy/LayoutModule.js +0 -4
- package/src/Strategy/StyledColumnModule.d.ts +24 -0
- package/src/Strategy/StyledColumnModule.js +165 -0
- package/src/Strategy/Utilities/FormatColumn/getFormatColumnSettingsViewItems.d.ts +1 -1
- package/src/Strategy/Utilities/FormatColumn/getFormatColumnSettingsViewItems.js +3 -4
- package/src/Strategy/Utilities/FormatColumn/getFormatColumnStyleViewItems.js +1 -16
- package/src/Strategy/Utilities/getScopeViewItems.js +1 -1
- package/src/Utilities/Constants/ModuleConstants.d.ts +3 -0
- package/src/Utilities/Constants/ModuleConstants.js +4 -1
- package/src/Utilities/Defaults/DefaultAdaptableOptions.js +6 -13
- package/src/Utilities/Defaults/DefaultSettingsPanel.js +1 -1
- package/src/Utilities/ExpressionFunctions/aggregatedBooleanExpressionFunctions.d.ts +1 -1
- package/src/Utilities/ExpressionFunctions/aggregatedBooleanExpressionFunctions.js +3 -4
- package/src/Utilities/ExpressionFunctions/aggregatedScalarExpressionFunctions.d.ts +1 -1
- package/src/Utilities/ExpressionFunctions/aggregatedScalarExpressionFunctions.js +3 -4
- package/src/Utilities/ExpressionFunctions/booleanExpressionFunctions.d.ts +1 -1
- package/src/Utilities/ExpressionFunctions/booleanExpressionFunctions.js +3 -4
- package/src/Utilities/ExpressionFunctions/observableExpressionFunctions.d.ts +2 -5
- package/src/Utilities/ExpressionFunctions/observableExpressionFunctions.js +3 -4
- package/src/Utilities/ExpressionFunctions/scalarExpressionFunctions.d.ts +1 -1
- package/src/Utilities/ExpressionFunctions/scalarExpressionFunctions.js +3 -4
- package/src/Utilities/ObjectFactory.d.ts +5 -2
- package/src/Utilities/ObjectFactory.js +14 -7
- package/src/Utilities/Services/ModuleService.js +2 -2
- package/src/Utilities/Services/QueryLanguageService.d.ts +1 -3
- package/src/Utilities/Services/QueryLanguageService.js +49 -53
- package/src/Utilities/Services/ReportService.js +6 -6
- package/src/View/AdaptablePopover/index.js +1 -1
- package/src/View/Alert/Wizard/AlertBehaviourWizardSection.js +15 -14
- package/src/View/Alert/Wizard/AlertButtonsEditor.js +24 -1
- package/src/View/Alert/Wizard/AlertDisplayWizardSection.js +6 -5
- package/src/View/Alert/Wizard/BaseAlertRulesWizardSection.js +3 -3
- package/src/View/Alert/Wizard/BaseAlertScopeWizardSection.js +3 -3
- package/src/View/Alert/Wizard/isValidAlertRules.js +1 -1
- package/src/View/BulkUpdate/BulkUpdatePopup.js +1 -1
- package/src/View/CalculatedColumn/CalculatedColumnSummary.d.ts +1 -1
- package/src/View/Components/AdaptableObjectList/AdaptableObjectList.js +1 -1
- package/src/View/Components/AdaptableObjectRow/index.js +1 -6
- package/src/View/Components/Buttons/ButtonInfo.d.ts +1 -3
- package/src/View/Components/Buttons/ButtonInfo.js +3 -5
- package/src/View/Components/EntityRulesEditor/index.js +8 -17
- package/src/View/Components/FilterForm/FilterForm.js +11 -16
- package/src/View/Components/FilterForm/ListBoxFilterForm.js +2 -1
- package/src/View/Components/FilterForm/QuickFilterForm.js +7 -13
- package/src/View/Components/NewScopeComponent.js +3 -3
- package/src/View/Components/Panels/PanelWithButton.js +1 -5
- package/src/View/Components/Panels/PanelWithImage.js +1 -5
- package/src/View/Components/Popups/AdaptablePopup/AdaptablePopup.js +2 -2
- package/src/View/Components/Popups/AdaptablePopup/AdaptablePopupDialog.d.ts +1 -0
- package/src/View/Components/Popups/AdaptablePopup/AdaptablePopupDialog.js +3 -16
- package/src/View/Components/Popups/AdaptablePopup/PopupPanel.js +1 -1
- package/src/View/Components/Popups/AdaptablePopupTeamSharing.js +5 -5
- package/src/View/Components/RangesComponent.d.ts +8 -1
- package/src/View/Components/RangesComponent.js +60 -24
- package/src/View/Components/ScopeComponent.js +6 -6
- package/src/View/Components/Selectors/ColumnSelector.d.ts +1 -0
- package/src/View/Components/Selectors/ColumnSelector.js +2 -1
- package/src/View/Components/Selectors/ColumnValueSelector.js +2 -2
- package/src/View/Components/StyleComponent.js +14 -19
- package/src/View/Components/ToolPanel/AdaptableToolPanel.d.ts +1 -11
- package/src/View/Components/ToolPanel/AdaptableToolPanel.js +21 -9
- package/src/View/Components/ToolPanel/CustomToolPanelContent.js +1 -1
- package/src/View/Components/ToolPanel/ToolPanelPopup.d.ts +1 -1
- package/src/View/DataSet/DataSetSelector.js +1 -1
- package/src/View/DataSet/DataSetViewPanel.d.ts +1 -1
- package/src/View/Export/ExportViewPanel.d.ts +1 -1
- package/src/View/Export/ExportViewPanel.js +4 -4
- package/src/View/Export/ReportExportDropdown.js +1 -1
- package/src/View/Export/Wizard/ReportNameWizardSection.js +10 -11
- package/src/View/Filter/FilterSummary.d.ts +1 -1
- package/src/View/Filter/FilterViewPanel.d.ts +1 -1
- package/src/View/FlashingCell/FlashingCellStyle.js +3 -3
- package/src/View/FlashingCell/Wizard/FlashingCellRulesWizardSection.js +3 -3
- package/src/View/FlashingCell/Wizard/FlashingCellSettingsWizardSection.js +6 -6
- package/src/View/FlashingCell/Wizard/FlashingCellWizard.js +4 -4
- package/src/View/FormatColumn/FormatColumnSummary.js +1 -1
- package/src/View/FormatColumn/Wizard/FormatColumnFormatWizardSection.js +27 -27
- package/src/View/FormatColumn/Wizard/FormatColumnRuleWizardSection.js +4 -5
- package/src/View/FormatColumn/Wizard/FormatColumnScopeWizardSection.js +1 -1
- package/src/View/FormatColumn/Wizard/FormatColumnSettingsWizardSection.js +2 -28
- package/src/View/FormatColumn/Wizard/FormatColumnStyleWizardSection.d.ts +3 -3
- package/src/View/FormatColumn/Wizard/FormatColumnStyleWizardSection.js +6 -301
- package/src/View/FormatColumn/Wizard/FormatColumnWizard.js +3 -10
- package/src/View/FreeTextColumn/Wizard/FreeTextColumnSettingsWizardSection.js +7 -7
- package/src/View/GridInfo/ColumnInfoComponent.js +0 -7
- package/src/View/Layout/LayoutRadioSelector.js +1 -1
- package/src/View/Layout/LayoutViewPanel.d.ts +1 -1
- package/src/View/Layout/Wizard/Components/ColumnLabels.js +1 -1
- package/src/View/Layout/Wizard/sections/AggregationsSection.js +1 -1
- package/src/View/Layout/Wizard/sections/ColumnsSection.js +7 -6
- package/src/View/Layout/Wizard/sections/SettingsSection.js +2 -2
- package/src/View/PlusMinus/Wizard/PlusMinusRuleWizardSection.js +1 -1
- package/src/View/PlusMinus/Wizard/PlusMinusSettingsWizardSection.js +3 -3
- package/src/View/Query/QueryViewPanel.d.ts +1 -1
- package/src/View/Query/Wizard/NamedQuerySettingsWizardSection.js +1 -1
- package/src/View/QuickSearch/QuickSearchPopup.js +2 -2
- package/src/View/QuickSearch/QuickSearchViewPanel.d.ts +1 -1
- package/src/View/Schedule/Wizard/ScheduleScheduleWizard.js +5 -5
- package/src/View/Schedule/Wizard/ScheduleSettingsWizard/ScheduleSettingsGlue42.js +1 -1
- package/src/View/Schedule/Wizard/ScheduleSettingsWizard/ScheduleSettingsIPushPull.js +5 -5
- package/src/View/Schedule/Wizard/ScheduleSettingsWizard/ScheduleSettingsOpenFin.js +1 -1
- package/src/View/Schedule/Wizard/ScheduleSettingsWizard/ScheduleSettingsReminder.js +5 -5
- package/src/View/Schedule/Wizard/ScheduleSettingsWizard/ScheduleSettingsReport.js +2 -2
- package/src/View/Shortcut/Wizard/ShortcutSettingsWizard.js +3 -3
- package/src/View/SmartEdit/SmartEditPopup.js +3 -3
- package/src/View/SpecialColumnSettingsWizardStep.js +10 -10
- package/src/View/StateManagement/StateManagementPopup.js +4 -4
- package/src/View/StyledColumn/Wizard/StyledColumnWizard.d.ts +7 -0
- package/src/View/StyledColumn/Wizard/StyledColumnWizard.js +77 -0
- package/src/View/StyledColumn/Wizard/StyledColumnWizardColumnSection.d.ts +9 -0
- package/src/View/StyledColumn/Wizard/StyledColumnWizardColumnSection.js +65 -0
- package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection.d.ts +9 -0
- package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection.js +234 -0
- package/src/View/StyledColumn/Wizard/StyledColumnWizardTypeSection.d.ts +7 -0
- package/src/View/StyledColumn/Wizard/StyledColumnWizardTypeSection.js +59 -0
- package/src/View/SystemStatus/SystemStatusEntityRow.js +4 -6
- package/src/View/SystemStatus/SystemStatusViewPanel.d.ts +1 -1
- package/src/View/TeamSharing/SharedEntityObjectView.js +1 -1
- package/src/View/TeamSharing/TeamSharingApplyButton.js +1 -1
- package/src/View/Theme/ThemePopup.js +1 -1
- package/src/View/Wizard/OnePageAdaptableWizard.d.ts +1 -1
- package/src/View/Wizard/OnePageAdaptableWizard.js +1 -2
- package/src/agGrid/ActionColumnRenderer.d.ts +2 -0
- package/src/agGrid/ActionColumnRenderer.js +94 -62
- package/src/agGrid/Adaptable.d.ts +12 -13
- package/src/agGrid/Adaptable.js +162 -236
- package/src/agGrid/CheckboxRenderer.js +1 -1
- package/src/agGrid/FilterWrapper.js +60 -16
- package/src/agGrid/FloatingFilterWrapper.d.ts +2 -2
- package/src/agGrid/FloatingFilterWrapper.js +71 -32
- package/src/agGrid/PercentBarRenderer.d.ts +6 -2
- package/src/agGrid/PercentBarRenderer.js +19 -17
- package/src/agGrid/agGridHelper.d.ts +6 -2
- package/src/agGrid/agGridHelper.js +17 -17
- package/src/agGrid/createAgStatusPanelComponent.d.ts +1 -1
- package/src/agGrid/createAgStatusPanelComponent.js +17 -0
- package/src/agGrid/editors/AdaptableDateEditor/index.d.ts +4 -1
- package/src/agGrid/editors/AdaptableDateEditor/index.js +84 -17
- package/src/agGrid/editors/AdaptableNumberEditor/InternalAdaptableNumberEditor.js +1 -1
- package/src/agGrid/editors/AdaptableNumberEditor/index.d.ts +2 -3
- package/src/agGrid/editors/AdaptableNumberEditor/index.js +78 -27
- package/src/agGrid/weightedAverage.js +19 -11
- package/src/components/CheckBox/index.js +7 -2
- package/src/components/Datepicker/index.d.ts +1 -1
- package/src/components/ExpressionEditor/BaseEditorInput.js +13 -32
- package/src/components/ExpressionEditor/index.js +9 -17
- package/src/components/FormLayout/index.js +1 -1
- package/src/components/StylePreview.js +2 -1
- package/src/components/icons/brush.d.ts +3 -0
- package/src/components/icons/brush.js +7 -0
- package/src/components/icons/index.js +2 -0
- package/src/metamodel/adaptable.metamodel.d.ts +178 -104
- package/src/metamodel/adaptable.metamodel.js +1 -1
- package/src/renderReactRoot.d.ts +2 -0
- package/src/renderReactRoot.js +11 -9
- package/src/types.d.ts +7 -5
- package/themes/dark.css +8 -4
- package/themes/dark.css.map +1 -0
- package/themes/light.css +4 -1
- package/themes/light.css.map +1 -0
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/src/AdaptableComponents.d.ts +0 -1
- package/src/AdaptableComponents.js +0 -5
- package/src/Api/ConditionalStyleApi.d.ts +0 -128
- package/src/Api/Implementation/ConditionalStyleApiImpl.d.ts +0 -29
- package/src/Api/Implementation/ConditionalStyleApiImpl.js +0 -98
- package/src/Redux/ActionsReducers/ConditionalStyleRedux.d.ts +0 -49
- package/src/Redux/ActionsReducers/ConditionalStyleRedux.js +0 -95
- package/src/Strategy/Interface/IConditionalStyleModule.d.ts +0 -6
- package/src/Strategy/Utilities/getStyleViewItems.d.ts +0 -2
- package/src/Strategy/Utilities/getStyleViewItems.js +0 -16
- package/src/View/ConditionalStyle/ConditionalStylePopupHeader.d.ts +0 -2
- package/src/View/ConditionalStyle/ConditionalStylePopupHeader.js +0 -18
- package/src/View/ConditionalStyle/ConditionalStyleSummary.d.ts +0 -25
- package/src/View/ConditionalStyle/ConditionalStyleSummary.js +0 -108
- package/src/View/ConditionalStyle/Wizard/ConditionalStyleRuleWizardSection.d.ts +0 -9
- package/src/View/ConditionalStyle/Wizard/ConditionalStyleRuleWizardSection.js +0 -42
- package/src/View/ConditionalStyle/Wizard/ConditionalStyleScopeWizardSection.d.ts +0 -8
- package/src/View/ConditionalStyle/Wizard/ConditionalStyleScopeWizardSection.js +0 -43
- package/src/View/ConditionalStyle/Wizard/ConditionalStyleSettingsWizardSettings.d.ts +0 -8
- package/src/View/ConditionalStyle/Wizard/ConditionalStyleSettingsWizardSettings.js +0 -29
- package/src/View/ConditionalStyle/Wizard/ConditionalStyleStyleWizardSection.d.ts +0 -8
- package/src/View/ConditionalStyle/Wizard/ConditionalStyleStyleWizardSection.js +0 -23
- package/src/View/ConditionalStyle/Wizard/ConditionalStyleWizard.d.ts +0 -6
- package/src/View/ConditionalStyle/Wizard/ConditionalStyleWizard.js +0 -114
- package/src/View/ConditionalStyle/Wizard/DEFAULT_PREDICATE_ID_FOR_CONDITIONAL_STYLE.d.ts +0 -1
- package/src/View/ConditionalStyle/Wizard/DEFAULT_PREDICATE_ID_FOR_CONDITIONAL_STYLE.js +0 -4
|
@@ -0,0 +1,165 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.StyledColumnModule = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const AdaptableModuleBase_1 = require("./AdaptableModuleBase");
|
|
6
|
+
const ModuleConstants = tslib_1.__importStar(require("../Utilities/Constants/ModuleConstants"));
|
|
7
|
+
const StyledColumnRedux = tslib_1.__importStar(require("../Redux/ActionsReducers/StyledColumnRedux"));
|
|
8
|
+
const StyledColumnWizard_1 = require("../View/StyledColumn/Wizard/StyledColumnWizard");
|
|
9
|
+
const StyledColumnWizardStyleSection_1 = require("../View/StyledColumn/Wizard/StyledColumnWizardStyleSection");
|
|
10
|
+
const ObjectFactory_1 = tslib_1.__importDefault(require("../Utilities/ObjectFactory"));
|
|
11
|
+
const LoggingHelper_1 = require("../Utilities/Helpers/LoggingHelper");
|
|
12
|
+
class StyledColumnModule extends AdaptableModuleBase_1.AdaptableModuleBase {
|
|
13
|
+
constructor(api) {
|
|
14
|
+
super(ModuleConstants.StyledColumnModuleId, ModuleConstants.StyledColumnFriendlyName, 'brush', 'StyledColumnPopup', // to change
|
|
15
|
+
'Create a Special Column Style e.g Gradient or Percent Bar', api);
|
|
16
|
+
/**
|
|
17
|
+
* Use Case: Data (cell/row) has changed
|
|
18
|
+
* Action: Any CheckboxColumns need to be updated, as their disabled state may have changed
|
|
19
|
+
*/
|
|
20
|
+
this.api.internalApi
|
|
21
|
+
.getDataService()
|
|
22
|
+
.on('CellDataChanged', (cellDataChangedInfo) => {
|
|
23
|
+
const activeCheckboxColumnIds = this.api.columnApi
|
|
24
|
+
.getColumns()
|
|
25
|
+
.filter((aColumn) => {
|
|
26
|
+
const checkboxColumn = this.api.styledColumnApi.getCheckBoxStyleStyledColumn(aColumn);
|
|
27
|
+
return checkboxColumn && !checkboxColumn.IsSuspended;
|
|
28
|
+
})
|
|
29
|
+
.map((aColumn) => aColumn.columnId);
|
|
30
|
+
// no need to refresh the CheckboxColumns if the change was triggered by one of them
|
|
31
|
+
if (!activeCheckboxColumnIds.includes(cellDataChangedInfo.column.columnId)) {
|
|
32
|
+
this.api.internalApi
|
|
33
|
+
.getAdaptableInstance()
|
|
34
|
+
.refreshCells(null, activeCheckboxColumnIds, true, true);
|
|
35
|
+
}
|
|
36
|
+
});
|
|
37
|
+
}
|
|
38
|
+
updateOldConfig() {
|
|
39
|
+
const formatColumnsWithColumnStyles = this.api.formatColumnApi
|
|
40
|
+
.getAllFormatColumn()
|
|
41
|
+
.filter((formatColumn) => formatColumn.ColumnStyle);
|
|
42
|
+
if (!formatColumnsWithColumnStyles.length) {
|
|
43
|
+
return;
|
|
44
|
+
}
|
|
45
|
+
(0, LoggingHelper_1.ConsoleLogInfo)(`Converting ${formatColumnsWithColumnStyles.length} FormatColumns Styles to Styled Columns`, formatColumnsWithColumnStyles);
|
|
46
|
+
formatColumnsWithColumnStyles.forEach((formatColumn) => {
|
|
47
|
+
this.api.formatColumnApi.deleteFormatColumn(formatColumn);
|
|
48
|
+
});
|
|
49
|
+
const styledColumns = formatColumnsWithColumnStyles
|
|
50
|
+
.map((formatColumn) => {
|
|
51
|
+
if (!('ColumnIds' in formatColumn.Scope)) {
|
|
52
|
+
return null;
|
|
53
|
+
}
|
|
54
|
+
return Object.assign(Object.assign(Object.assign({}, ObjectFactory_1.default.CreateEmptyStyledColumn()), { ColumnId: formatColumn.Scope.ColumnIds[0] }), formatColumn.ColumnStyle);
|
|
55
|
+
})
|
|
56
|
+
.filter(Boolean);
|
|
57
|
+
styledColumns.forEach((styledColumn) => this.api.styledColumnApi.addStyledColumn(styledColumn));
|
|
58
|
+
}
|
|
59
|
+
getModuleAdaptableObjects(config) {
|
|
60
|
+
return this.api.styledColumnApi.getAllStyledColumn(config);
|
|
61
|
+
}
|
|
62
|
+
getExplicitlyReferencedColumnIds(formatColumn) {
|
|
63
|
+
if (this.api.scopeApi.scopeHasColumns(formatColumn.Scope)) {
|
|
64
|
+
return this.api.scopeApi
|
|
65
|
+
.getColumnsForScope(formatColumn.Scope)
|
|
66
|
+
.map((adaptableColumn) => adaptableColumn.columnId);
|
|
67
|
+
}
|
|
68
|
+
return [];
|
|
69
|
+
}
|
|
70
|
+
hasNamedQueryReferences() {
|
|
71
|
+
return false;
|
|
72
|
+
}
|
|
73
|
+
addColumnMenuItems(column) {
|
|
74
|
+
let returnColumnMenuItems = [];
|
|
75
|
+
if (column && this.isModuleEditable() && !column.isSparkline) {
|
|
76
|
+
if (column.dataType === 'Number') {
|
|
77
|
+
let styledColumn = this.api.styledColumnApi.getStyledColumnByColumnId(column.columnId);
|
|
78
|
+
let styledColumnExists = Boolean(styledColumn);
|
|
79
|
+
if (styledColumn && styledColumn.IsReadOnly && styledColumn.IsReadOnly == true) {
|
|
80
|
+
styledColumnExists = false;
|
|
81
|
+
}
|
|
82
|
+
let label = styledColumnExists ? 'Edit ' : 'Create ';
|
|
83
|
+
let popupParam = {
|
|
84
|
+
action: styledColumnExists ? 'Edit' : 'New',
|
|
85
|
+
source: 'ColumnMenu',
|
|
86
|
+
value: styledColumn,
|
|
87
|
+
};
|
|
88
|
+
returnColumnMenuItems.push(this.createColumnMenuItemShowPopup(label + 'Styled Column', this.moduleInfo.Popup, this.moduleInfo.Glyph, popupParam));
|
|
89
|
+
}
|
|
90
|
+
if (column.dataType == 'Boolean' && !this.api.columnApi.isFreeTextColumn(column.columnId)) {
|
|
91
|
+
const styledColumn = this.api.styledColumnApi.getStyledColumnByColumnId(column.columnId);
|
|
92
|
+
const hasCheckBox = styledColumn && (styledColumn === null || styledColumn === void 0 ? void 0 : styledColumn.CheckBoxStyle);
|
|
93
|
+
if (hasCheckBox) {
|
|
94
|
+
returnColumnMenuItems.push(this.createColumnMenuItemClickFunction('Remove Checkbox', 'unchecked', () => {
|
|
95
|
+
this.api.styledColumnApi.deleteStyledColumn(styledColumn);
|
|
96
|
+
}));
|
|
97
|
+
}
|
|
98
|
+
else {
|
|
99
|
+
returnColumnMenuItems.push(this.createColumnMenuItemClickFunction('Show as Checkbox', 'checked', () => {
|
|
100
|
+
const styledColumn = ObjectFactory_1.default.CreateEmptyStyledColumn();
|
|
101
|
+
this.api.styledColumnApi.addStyledColumn(Object.assign(Object.assign({}, styledColumn), { ColumnId: column.columnId, CheckBoxStyle: true }));
|
|
102
|
+
}));
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
return returnColumnMenuItems;
|
|
107
|
+
}
|
|
108
|
+
getTeamSharingAction() {
|
|
109
|
+
return {
|
|
110
|
+
ModuleEntities: this.api.styledColumnApi.getAllStyledColumn(),
|
|
111
|
+
AddAction: StyledColumnRedux.StyledColumnAdd,
|
|
112
|
+
EditAction: StyledColumnRedux.StyledColumnEdit,
|
|
113
|
+
};
|
|
114
|
+
}
|
|
115
|
+
toView(styledColumn) {
|
|
116
|
+
let type = null;
|
|
117
|
+
if (styledColumn.GradientStyle) {
|
|
118
|
+
type = 'Gradient';
|
|
119
|
+
}
|
|
120
|
+
else if (styledColumn.PercentBarStyle) {
|
|
121
|
+
type = 'Percent Bar';
|
|
122
|
+
}
|
|
123
|
+
else {
|
|
124
|
+
type = 'Check Box';
|
|
125
|
+
}
|
|
126
|
+
return {
|
|
127
|
+
abObject: styledColumn,
|
|
128
|
+
items: [
|
|
129
|
+
{
|
|
130
|
+
name: 'Type',
|
|
131
|
+
values: [type],
|
|
132
|
+
},
|
|
133
|
+
{
|
|
134
|
+
name: 'Column',
|
|
135
|
+
values: [this.api.columnApi.getFriendlyNameFromColumnId(styledColumn.ColumnId)],
|
|
136
|
+
},
|
|
137
|
+
{
|
|
138
|
+
name: 'Style',
|
|
139
|
+
view: () => {
|
|
140
|
+
return (0, StyledColumnWizardStyleSection_1.renderStyledColumnStyleSummary)(styledColumn, this.api);
|
|
141
|
+
},
|
|
142
|
+
},
|
|
143
|
+
].filter(Boolean),
|
|
144
|
+
};
|
|
145
|
+
}
|
|
146
|
+
toViewAll() {
|
|
147
|
+
return this.getModuleAdaptableObjects({
|
|
148
|
+
includeLayoutNotAssociatedObjects: this.showLayoutNotAssociatedObjects(),
|
|
149
|
+
}).map((styledColumn) => this.toView(styledColumn));
|
|
150
|
+
}
|
|
151
|
+
getViewProperties() {
|
|
152
|
+
return {
|
|
153
|
+
getDeleteAction: StyledColumnRedux.StyledColumnDelete,
|
|
154
|
+
getSuspendAction: StyledColumnRedux.StyledColumnSuspend,
|
|
155
|
+
getUnSuspendAction: StyledColumnRedux.StyledColumnUnSuspend,
|
|
156
|
+
getEditWizard() {
|
|
157
|
+
return StyledColumnWizard_1.StyledColumnWizard;
|
|
158
|
+
},
|
|
159
|
+
};
|
|
160
|
+
}
|
|
161
|
+
canBeAssociatedWithLayouts() {
|
|
162
|
+
return true;
|
|
163
|
+
}
|
|
164
|
+
}
|
|
165
|
+
exports.StyledColumnModule = StyledColumnModule;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { FormatColumn } from '../../../../types';
|
|
2
|
-
export declare const getFormatColumnSettingsViewItems: (
|
|
2
|
+
export declare const getFormatColumnSettingsViewItems: (formatColumn: FormatColumn) => {
|
|
3
3
|
name: string;
|
|
4
4
|
values: string[];
|
|
5
5
|
};
|
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.getFormatColumnSettingsViewItems = void 0;
|
|
4
|
-
const getFormatColumnSettingsViewItems = (
|
|
4
|
+
const getFormatColumnSettingsViewItems = (formatColumn) => {
|
|
5
5
|
var _a;
|
|
6
6
|
const values = [
|
|
7
|
-
`Cell alignment: ${(_a =
|
|
8
|
-
|
|
9
|
-
`Include grouped rows: ${calculatedColumn.IncludeGroupedRows ? 'Yes' : 'No'}`,
|
|
7
|
+
`Cell alignment: ${(_a = formatColumn.CellAlignment) !== null && _a !== void 0 ? _a : 'default'}`,
|
|
8
|
+
`Include grouped rows: ${formatColumn.IncludeGroupedRows ? 'Yes' : 'No'}`,
|
|
10
9
|
].filter(Boolean);
|
|
11
10
|
return {
|
|
12
11
|
name: 'Settings',
|
|
@@ -6,21 +6,6 @@ const React = tslib_1.__importStar(require("react"));
|
|
|
6
6
|
const rebass_1 = require("rebass");
|
|
7
7
|
const FormatColumnStyleWizardSection_1 = require("../../../View/FormatColumn/Wizard/FormatColumnStyleWizardSection");
|
|
8
8
|
const getFormatColumnStyleViewItems = (formatColumn, api) => {
|
|
9
|
-
|
|
10
|
-
let styleType = '';
|
|
11
|
-
if ((_a = formatColumn === null || formatColumn === void 0 ? void 0 : formatColumn.ColumnStyle) === null || _a === void 0 ? void 0 : _a.GradientStyle) {
|
|
12
|
-
styleType = 'Gradient';
|
|
13
|
-
}
|
|
14
|
-
else if ((_b = formatColumn === null || formatColumn === void 0 ? void 0 : formatColumn.ColumnStyle) === null || _b === void 0 ? void 0 : _b.PercentBarStyle) {
|
|
15
|
-
styleType = 'Percent Bar';
|
|
16
|
-
}
|
|
17
|
-
else {
|
|
18
|
-
styleType = 'Standard';
|
|
19
|
-
}
|
|
20
|
-
return (React.createElement(rebass_1.Box, { mt: 2 },
|
|
21
|
-
React.createElement(rebass_1.Box, { mb: 1 },
|
|
22
|
-
"Type: ",
|
|
23
|
-
styleType),
|
|
24
|
-
(0, FormatColumnStyleWizardSection_1.renderFormatColumnStyleSummary)(formatColumn, api)));
|
|
9
|
+
return React.createElement(rebass_1.Box, { mt: 2 }, (0, FormatColumnStyleWizardSection_1.renderFormatColumnStyleSummary)(formatColumn, api));
|
|
25
10
|
};
|
|
26
11
|
exports.getFormatColumnStyleViewItems = getFormatColumnStyleViewItems;
|
|
@@ -51,6 +51,8 @@ export declare const ShortcutModuleId: ModuleConstants;
|
|
|
51
51
|
export declare const ShortcutFriendlyName = "Shortcut";
|
|
52
52
|
export declare const SmartEditModuleId: ModuleConstants;
|
|
53
53
|
export declare const SmartEditFriendlyName = "Smart Edit";
|
|
54
|
+
export declare const StyledColumnModuleId: ModuleConstants;
|
|
55
|
+
export declare const StyledColumnFriendlyName = "Styled Column";
|
|
54
56
|
export declare const StateManagementModuleId: ModuleConstants;
|
|
55
57
|
export declare const StateManagementFriendlyName = "Manage State";
|
|
56
58
|
export declare const SystemStatusModuleId: ModuleConstants;
|
|
@@ -92,6 +94,7 @@ export declare const ADAPTABLE_MODULE_MAP: {
|
|
|
92
94
|
Schedule: string;
|
|
93
95
|
Shortcut: string;
|
|
94
96
|
SmartEdit: string;
|
|
97
|
+
StyledColumn: string;
|
|
95
98
|
StateManagement: string;
|
|
96
99
|
SystemStatus: string;
|
|
97
100
|
TeamSharing: string;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.ShortcutFriendlyName = exports.ShortcutModuleId = exports.ScheduleFriendlyName = exports.ScheduleModuleId = exports.QuickSearchFriendlyName = exports.QuickSearchModuleId = exports.QueryFriendlyName = exports.QueryModuleId = exports.PlusMinusFriendlyName = exports.PlusMinusModuleId = exports.OpenFinFriendlyName = exports.OpenFinModuleId = exports.LayoutFriendlyName = exports.LayoutModuleId = exports.IPushPullFriendlyName = exports.IPushPullModuleId = exports.GridInfoFriendlyName = exports.GridInfoModuleId = exports.Glue42FriendlyName = exports.Glue42ModuleId = exports.FreeTextColumnFriendlyName = exports.FreeTextColumnModuleId = exports.FormatColumnFriendlyName = exports.FormatColumnModuleId = exports.FilterFriendlyName = exports.FilterModuleId = exports.ExportFriendlyName = exports.ExportModuleId = exports.DataSetFriendlyName = exports.DataSetModuleId = exports.DataChangeHistoryFriendlyName = exports.DataChangeHistoryModuleId = exports.DashboardFriendlyName = exports.DashboardModuleId = exports.CustomSortFriendlyName = exports.CustomSortModuleId = exports.ConditionalStyleFriendlyName = exports.ConditionalStyleModuleId = exports.ChartingFriendlyName = exports.ChartingModuleId = exports.CellSummaryFriendlyName = exports.CellSummaryModuleId = exports.CalculatedColumnFriendlyName = exports.CalculatedColumnModuleId = exports.BulkUpdateFriendlyName = exports.BulkUpdateModuleId = exports.FlashingCellFriendlyName = exports.FlashingCellModuleId = exports.AlertModuleFriendlyName = exports.AlertModuleId = void 0;
|
|
4
|
-
exports.ADAPTABLE_MODULE_MAP = exports.StatusBarFriendlyName = exports.StatusBarModuleId = exports.SettingsPanelFriendlyName = exports.SettingsPanelModuleId = exports.ToolPanelFriendlyName = exports.ToolPanelModuleId = exports.ThemeFriendlyName = exports.ThemeModuleId = exports.TeamSharingFriendlyName = exports.TeamSharingModuleId = exports.SystemStatusFriendlyName = exports.SystemStatusModuleId = exports.StateManagementFriendlyName = exports.StateManagementModuleId = exports.SmartEditFriendlyName = exports.SmartEditModuleId = void 0;
|
|
4
|
+
exports.ADAPTABLE_MODULE_MAP = exports.StatusBarFriendlyName = exports.StatusBarModuleId = exports.SettingsPanelFriendlyName = exports.SettingsPanelModuleId = exports.ToolPanelFriendlyName = exports.ToolPanelModuleId = exports.ThemeFriendlyName = exports.ThemeModuleId = exports.TeamSharingFriendlyName = exports.TeamSharingModuleId = exports.SystemStatusFriendlyName = exports.SystemStatusModuleId = exports.StateManagementFriendlyName = exports.StateManagementModuleId = exports.StyledColumnFriendlyName = exports.StyledColumnModuleId = exports.SmartEditFriendlyName = exports.SmartEditModuleId = void 0;
|
|
5
5
|
exports.AlertModuleId = 'Alert';
|
|
6
6
|
exports.AlertModuleFriendlyName = 'Alert';
|
|
7
7
|
exports.FlashingCellModuleId = 'FlashingCell';
|
|
@@ -54,6 +54,8 @@ exports.ShortcutModuleId = 'Shortcut';
|
|
|
54
54
|
exports.ShortcutFriendlyName = 'Shortcut';
|
|
55
55
|
exports.SmartEditModuleId = 'SmartEdit';
|
|
56
56
|
exports.SmartEditFriendlyName = 'Smart Edit';
|
|
57
|
+
exports.StyledColumnModuleId = 'StyledColumn';
|
|
58
|
+
exports.StyledColumnFriendlyName = 'Styled Column';
|
|
57
59
|
exports.StateManagementModuleId = 'StateManagement';
|
|
58
60
|
exports.StateManagementFriendlyName = 'Manage State';
|
|
59
61
|
exports.SystemStatusModuleId = 'SystemStatus';
|
|
@@ -95,6 +97,7 @@ exports.ADAPTABLE_MODULE_MAP = {
|
|
|
95
97
|
[exports.ScheduleModuleId]: exports.ScheduleFriendlyName,
|
|
96
98
|
[exports.ShortcutModuleId]: exports.ShortcutFriendlyName,
|
|
97
99
|
[exports.SmartEditModuleId]: exports.SmartEditFriendlyName,
|
|
100
|
+
[exports.StyledColumnModuleId]: exports.StyledColumnFriendlyName,
|
|
98
101
|
[exports.StateManagementModuleId]: exports.StateManagementFriendlyName,
|
|
99
102
|
[exports.SystemStatusModuleId]: exports.SystemStatusFriendlyName,
|
|
100
103
|
[exports.TeamSharingModuleId]: exports.TeamSharingFriendlyName,
|
|
@@ -5,13 +5,8 @@ const tslib_1 = require("tslib");
|
|
|
5
5
|
const GeneralConstants = tslib_1.__importStar(require("../Constants/GeneralConstants"));
|
|
6
6
|
const GeneralConstants_1 = require("../Constants/GeneralConstants");
|
|
7
7
|
const UIHelper_1 = tslib_1.__importStar(require("../../View/UIHelper"));
|
|
8
|
-
const booleanExpressionFunctions_1 = require("../ExpressionFunctions/booleanExpressionFunctions");
|
|
9
|
-
const scalarExpressionFunctions_1 = require("../ExpressionFunctions/scalarExpressionFunctions");
|
|
10
|
-
const observableExpressionFunctions_1 = require("../ExpressionFunctions/observableExpressionFunctions");
|
|
11
|
-
const aggregatedBooleanExpressionFunctions_1 = require("../ExpressionFunctions/aggregatedBooleanExpressionFunctions");
|
|
12
8
|
const AdaptablePredicate_1 = require("../../PredefinedConfig/Common/AdaptablePredicate");
|
|
13
9
|
const Enums_1 = require("../../PredefinedConfig/Common/Enums");
|
|
14
|
-
const aggregatedScalarExpressionFunctions_1 = require("../ExpressionFunctions/aggregatedScalarExpressionFunctions");
|
|
15
10
|
const ModuleConstants = tslib_1.__importStar(require("../../Utilities/Constants/ModuleConstants"));
|
|
16
11
|
// change type to DeepRequired<AdaptableOptions> to check which properties have no default values defined
|
|
17
12
|
exports.DefaultAdaptableOptions = {
|
|
@@ -64,13 +59,12 @@ exports.DefaultAdaptableOptions = {
|
|
|
64
59
|
customPredicateDefs: [],
|
|
65
60
|
displayColumnFriendlyNamesForExpressions: true,
|
|
66
61
|
expressionOptions: {
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
62
|
+
systemBooleanFunctions: undefined,
|
|
63
|
+
systemScalarFunctions: undefined,
|
|
64
|
+
systemObservableFunctions: undefined,
|
|
65
|
+
systemAggregatedBooleanFunctions: undefined,
|
|
66
|
+
systemAggregatedScalarFunctions: undefined,
|
|
72
67
|
moduleExpressionFunctions: undefined,
|
|
73
|
-
queryableColumns: undefined,
|
|
74
68
|
performExpressionValidation: true,
|
|
75
69
|
maxTimeframeSize: 28800000, // 8 hours
|
|
76
70
|
},
|
|
@@ -125,7 +119,7 @@ exports.DefaultAdaptableOptions = {
|
|
|
125
119
|
exportFormatType: 'rawValue',
|
|
126
120
|
exportDateFormat: undefined,
|
|
127
121
|
customDestinations: undefined,
|
|
128
|
-
|
|
122
|
+
serverReports: undefined,
|
|
129
123
|
appendFileTimestamp: false,
|
|
130
124
|
systemExportDestinations: [
|
|
131
125
|
Enums_1.ExportDestination.Excel,
|
|
@@ -152,7 +146,6 @@ exports.DefaultAdaptableOptions = {
|
|
|
152
146
|
customSortComparers: undefined,
|
|
153
147
|
englishVariant: 'GB',
|
|
154
148
|
unbalancedGroupsKey: undefined,
|
|
155
|
-
keepDeprecatedConditionalStyles: false,
|
|
156
149
|
},
|
|
157
150
|
layoutOptions: {
|
|
158
151
|
includeExpandedRowGroups: false,
|
|
@@ -18,7 +18,6 @@ exports.DEFAULT_NAVIGATION_ITEMS = [
|
|
|
18
18
|
'-',
|
|
19
19
|
'Alert',
|
|
20
20
|
'CalculatedColumn',
|
|
21
|
-
'ConditionalStyle',
|
|
22
21
|
'CustomSort',
|
|
23
22
|
'DataSet',
|
|
24
23
|
'Export',
|
|
@@ -32,6 +31,7 @@ exports.DEFAULT_NAVIGATION_ITEMS = [
|
|
|
32
31
|
'QuickSearch',
|
|
33
32
|
'Schedule',
|
|
34
33
|
'Shortcut',
|
|
34
|
+
'StyledColumn',
|
|
35
35
|
'-',
|
|
36
36
|
'SystemStatus',
|
|
37
37
|
'DataChangeHistory',
|
|
@@ -16,5 +16,5 @@ export interface ScalarAggregationOperand extends BaseParameter<'aggregationScal
|
|
|
16
16
|
value: AggregatedScalarExpressionEvaluation;
|
|
17
17
|
}
|
|
18
18
|
export declare const aggregatedBooleanExpressionFunctions: Record<AggregatedBooleanFunctionName, ExpressionFunction>;
|
|
19
|
-
export declare const
|
|
19
|
+
export declare const aggregatedBooleanExpressionFunctionNames: AggregatedBooleanFunctionName[];
|
|
20
20
|
export {};
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.aggregatedBooleanExpressionFunctionNames = exports.aggregatedBooleanExpressionFunctions = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
const parseInt_1 = tslib_1.__importDefault(require("lodash/parseInt"));
|
|
6
6
|
const ExpressionEvaluationError_1 = require("../../parser/src/ExpressionEvaluationError");
|
|
7
7
|
const expressionFunctionUtils_1 = require("./expressionFunctionUtils");
|
|
8
8
|
const aggregatedScalarExpressionFunctions_1 = require("./aggregatedScalarExpressionFunctions");
|
|
9
|
+
const TypeExtensions_1 = require("../Extensions/TypeExtensions");
|
|
9
10
|
const SUPPORTED_AGGREGATION_FNS = ['SUM', 'MIN', 'MAX', 'AVG'];
|
|
10
11
|
const aggregationScalarOperandMap = {
|
|
11
12
|
SUM: ['string', 'number'],
|
|
@@ -174,6 +175,4 @@ const extractScalarOperand = (consumingFunctionName, value, allowedTypes) => {
|
|
|
174
175
|
// numeric value
|
|
175
176
|
return (0, parseInt_1.default)(numericString) * numberUnitRatios[largeNumberUnit.toLowerCase()];
|
|
176
177
|
};
|
|
177
|
-
exports.
|
|
178
|
-
[functionName]: expressionImplementation,
|
|
179
|
-
}));
|
|
178
|
+
exports.aggregatedBooleanExpressionFunctionNames = (0, TypeExtensions_1.getTypedKeys)(exports.aggregatedBooleanExpressionFunctions);
|
|
@@ -42,5 +42,5 @@ export interface CumulatedAggregationValue {
|
|
|
42
42
|
export declare const cumulativeAggregatedExpressionFunctions: AggregatedScalarFunctionName[];
|
|
43
43
|
export declare const aggregatedExpressionFunctions: AggregatedScalarFunctionName[];
|
|
44
44
|
export declare const aggregatedScalarExpressionFunctions: Record<AggregatedScalarFunctionName, ExpressionFunction>;
|
|
45
|
-
export declare const
|
|
45
|
+
export declare const aggregatedScalarExpressionFunctionNames: AggregatedScalarFunctionName[];
|
|
46
46
|
export {};
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.aggregatedScalarExpressionFunctionNames = exports.aggregatedScalarExpressionFunctions = exports.aggregatedExpressionFunctions = exports.cumulativeAggregatedExpressionFunctions = void 0;
|
|
4
4
|
const expressionFunctionUtils_1 = require("./expressionFunctionUtils");
|
|
5
5
|
const ExpressionEvaluationError_1 = require("../../parser/src/ExpressionEvaluationError");
|
|
6
|
+
const TypeExtensions_1 = require("../Extensions/TypeExtensions");
|
|
6
7
|
exports.cumulativeAggregatedExpressionFunctions = [
|
|
7
8
|
'CUMUL',
|
|
8
9
|
'OVER',
|
|
@@ -649,9 +650,7 @@ const mapAggregationToCumulation = (aggregationParameter, overColumnParameter, c
|
|
|
649
650
|
};
|
|
650
651
|
return cumulationExpressionEvaluation;
|
|
651
652
|
};
|
|
652
|
-
exports.
|
|
653
|
-
[functionName]: expressionImplementation,
|
|
654
|
-
}));
|
|
653
|
+
exports.aggregatedScalarExpressionFunctionNames = (0, TypeExtensions_1.getTypedKeys)(exports.aggregatedScalarExpressionFunctions);
|
|
655
654
|
// !! mutates expressionEvaluation
|
|
656
655
|
const addGroupByParams = (groupByColumnNames, expressionEvaluation) => {
|
|
657
656
|
if (groupByColumnNames === null || groupByColumnNames === void 0 ? void 0 : groupByColumnNames.length) {
|
|
@@ -4,4 +4,4 @@ import { ExpressionFunction } from '../../parser/src/types';
|
|
|
4
4
|
*/
|
|
5
5
|
export declare type BooleanFunctionName = 'EQ' | 'NEQ' | 'GT' | 'LT' | 'GTE' | 'LTE' | 'AND' | 'OR' | 'NOT' | 'BETWEEN' | 'IN' | 'IS_BLANK' | 'CONTAINS' | 'STARTS_WITH' | 'ENDS_WITH' | 'ANY_CONTAINS' | 'QUERY';
|
|
6
6
|
export declare const booleanExpressionFunctions: Record<BooleanFunctionName, ExpressionFunction>;
|
|
7
|
-
export declare const
|
|
7
|
+
export declare const booleanExpressionFunctionsNames: BooleanFunctionName[];
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.booleanExpressionFunctionsNames = exports.booleanExpressionFunctions = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
const isAfter_1 = tslib_1.__importDefault(require("date-fns/isAfter"));
|
|
6
6
|
const isBefore_1 = tslib_1.__importDefault(require("date-fns/isBefore"));
|
|
@@ -9,6 +9,7 @@ const StringExtensions_1 = tslib_1.__importDefault(require("../Extensions/String
|
|
|
9
9
|
const src_1 = require("../../parser/src");
|
|
10
10
|
const ExpressionEvaluationError_1 = require("../../parser/src/ExpressionEvaluationError");
|
|
11
11
|
const expressionFunctionUtils_1 = require("./expressionFunctionUtils");
|
|
12
|
+
const TypeExtensions_1 = require("../Extensions/TypeExtensions");
|
|
12
13
|
exports.booleanExpressionFunctions = {
|
|
13
14
|
OR: {
|
|
14
15
|
handler(args) {
|
|
@@ -293,6 +294,4 @@ exports.booleanExpressionFunctions = {
|
|
|
293
294
|
examples: ['QUERY("anyNamedQuery")'],
|
|
294
295
|
},
|
|
295
296
|
};
|
|
296
|
-
exports.
|
|
297
|
-
[functionName]: expressionImplementation,
|
|
298
|
-
}));
|
|
297
|
+
exports.booleanExpressionFunctionsNames = (0, TypeExtensions_1.getTypedKeys)(exports.booleanExpressionFunctions);
|
|
@@ -2,9 +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 declare type ObservableFunctionName = 'WHERE' | 'COL' | 'TIMEFRAME' |
|
|
6
|
-
declare type ObservableFunction = 'ROW_CHANGE' | 'GRID_CHANGE';
|
|
7
|
-
declare type ChangeFunction = 'MAX' | 'MIN' | 'NONE' | 'COUNT';
|
|
5
|
+
export declare type ObservableFunctionName = 'WHERE' | 'COL' | 'TIMEFRAME' | 'ROW_CHANGE' | 'GRID_CHANGE' | 'MAX' | 'MIN' | 'NONE' | 'COUNT';
|
|
8
6
|
export declare const observableExpressionFunctions: Record<ObservableFunctionName, ExpressionFunction>;
|
|
9
|
-
export declare const
|
|
10
|
-
export {};
|
|
7
|
+
export declare const observableExpressionFunctionNames: ObservableFunctionName[];
|
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.observableExpressionFunctionNames = exports.observableExpressionFunctions = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
const rxjs_1 = require("rxjs");
|
|
6
6
|
const operators_1 = require("rxjs/operators");
|
|
7
7
|
const parseInt_1 = tslib_1.__importDefault(require("lodash/parseInt"));
|
|
8
8
|
const ExpressionEvaluationError_1 = require("../../parser/src/ExpressionEvaluationError");
|
|
9
9
|
const expressionFunctionUtils_1 = require("./expressionFunctionUtils");
|
|
10
|
+
const TypeExtensions_1 = require("../Extensions/TypeExtensions");
|
|
10
11
|
// numeric value(digits) followed by a single 's', 'm' or 'h' letter (case insensitive)
|
|
11
12
|
const TIMEFRAME_REGEX = /^(\d+)(s|m|h)$/i;
|
|
12
13
|
const SYSTEM_MAX_TIMEFRAME_SIZE = 86400000; // 24h
|
|
@@ -212,9 +213,7 @@ exports.observableExpressionFunctions = {
|
|
|
212
213
|
examples: ["TIMEFRAME('20s')", "TIMEFRAME('5m')", "TIMEFRAME('1h')"],
|
|
213
214
|
},
|
|
214
215
|
};
|
|
215
|
-
exports.
|
|
216
|
-
[functionName]: expressionImplementation,
|
|
217
|
-
}));
|
|
216
|
+
exports.observableExpressionFunctionNames = (0, TypeExtensions_1.getTypedKeys)(exports.observableExpressionFunctions);
|
|
218
217
|
// return TRUE if the last(tail) element has the greatest value
|
|
219
218
|
const isLastElementMaxValue = (values) => {
|
|
220
219
|
const [tailValue] = values.slice(-1);
|
|
@@ -4,4 +4,4 @@ import { ExpressionFunction } from '../../parser/src/types';
|
|
|
4
4
|
*/
|
|
5
5
|
export declare type ScalarFunctionName = 'ADD' | 'SUB' | 'MUL' | 'DIV' | 'MOD' | 'POW' | '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' | 'LEN' | 'UPPER' | 'LOWER' | 'CONCAT' | 'IF' | 'COL' | 'VAR';
|
|
6
6
|
export declare const scalarExpressionFunctions: Record<ScalarFunctionName, ExpressionFunction>;
|
|
7
|
-
export declare const
|
|
7
|
+
export declare const scalarExpressionFunctionNames: ScalarFunctionName[];
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.scalarExpressionFunctionNames = exports.scalarExpressionFunctions = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
const ExpressionEvaluationError_1 = require("../../parser/src/ExpressionEvaluationError");
|
|
6
6
|
const parseISO_1 = tslib_1.__importDefault(require("date-fns/parseISO"));
|
|
@@ -19,6 +19,7 @@ const differenceInYears_1 = tslib_1.__importDefault(require("date-fns/difference
|
|
|
19
19
|
const expressionFunctionUtils_1 = require("./expressionFunctionUtils");
|
|
20
20
|
const dateUtils_1 = require("./dateUtils");
|
|
21
21
|
const StringExtensions_1 = tslib_1.__importDefault(require("../Extensions/StringExtensions"));
|
|
22
|
+
const TypeExtensions_1 = require("../Extensions/TypeExtensions");
|
|
22
23
|
const sanitizeArguments = (values, allowNaN) => {
|
|
23
24
|
return values.filter((value) => value != undefined && value != null && value !== '' && (allowNaN || !isNaN(value)));
|
|
24
25
|
};
|
|
@@ -356,6 +357,4 @@ exports.scalarExpressionFunctions = {
|
|
|
356
357
|
examples: ['VAR(CURRENT_USER)', 'VAR(IS_VALID_VALUE, IS_BLANK([col1]), [col2] < [col3])'],
|
|
357
358
|
},
|
|
358
359
|
};
|
|
359
|
-
exports.
|
|
360
|
-
[functionName]: expressionImplementation,
|
|
361
|
-
}));
|
|
360
|
+
exports.scalarExpressionFunctionNames = (0, TypeExtensions_1.getTypedKeys)(exports.scalarExpressionFunctions);
|
|
@@ -28,6 +28,7 @@ import { ColumnFilter, CustomDisplayFormatterContext, FlashingCellDefinition, Gr
|
|
|
28
28
|
import { RowNode } from '@ag-grid-community/core';
|
|
29
29
|
import { AdaptableApi } from '../../types';
|
|
30
30
|
import { ToastOptions } from '../components/Toastify';
|
|
31
|
+
import { StyledColumn } from '../PredefinedConfig/StyledColumnState';
|
|
31
32
|
export declare function CreateEmptyCustomSort(): CustomSort;
|
|
32
33
|
export declare function CreateEmptyCalculatedColumn(): CalculatedColumn;
|
|
33
34
|
export declare function CreateEmptyNamedQuery(expression?: string): NamedQuery;
|
|
@@ -39,7 +40,7 @@ export declare function CreateEmptyAlertDefinition(): AlertDefinition;
|
|
|
39
40
|
export declare function CreateEmptyFlashingCellDefinition(): FlashingCellDefinition;
|
|
40
41
|
export declare function CreateInternalAlertDefinitionForMessages(messageType: AdaptableMessageType, alertProperties?: AlertProperties): AlertDefinition;
|
|
41
42
|
export declare function CreateEmptyReport(): Report;
|
|
42
|
-
export declare function
|
|
43
|
+
export declare function CreateServerReport(reportName: string): Report;
|
|
43
44
|
export declare function CreateEmptyBaseSchedule(scheduleType: ScheduleType): BaseSchedule;
|
|
44
45
|
export declare function CreateEmptyReminderSchedule(): ReminderSchedule;
|
|
45
46
|
export declare function CreateEmptyReportSchedule(): ReportSchedule;
|
|
@@ -64,6 +65,7 @@ export declare function CreateEmptyStyle(): AdaptableStyle;
|
|
|
64
65
|
export declare function CreateSystemStatusMessageInfo(message: string, type: AdaptableMessageType, furtherInfo?: string): SystemStatusMessageInfo;
|
|
65
66
|
export declare function CreateEmptyCellSummmary(): CellSummmary;
|
|
66
67
|
export declare function CreateColumnFilter(ColumnId: string, PredicateId: SystemFilterPredicateId, Inputs: any[]): ColumnFilter;
|
|
68
|
+
export declare function CreateEmptyStyledColumn(): StyledColumn;
|
|
67
69
|
export declare function CreateCustomDisplayFormatterContext(value: any, node: RowNode, abColumn: AdaptableColumn, api: AdaptableApi): CustomDisplayFormatterContext;
|
|
68
70
|
export declare function CreateToastOptions(notificationsOptions: NotificationsOptions, { onClose, containerId }: {
|
|
69
71
|
onClose?: VoidFunction;
|
|
@@ -80,7 +82,7 @@ export declare const ObjectFactory: {
|
|
|
80
82
|
CreateEmptyAlertDefinition: typeof CreateEmptyAlertDefinition;
|
|
81
83
|
CreateEmptyFlashingCellDefinition: typeof CreateEmptyFlashingCellDefinition;
|
|
82
84
|
CreateInternalAlertDefinitionForMessages: typeof CreateInternalAlertDefinitionForMessages;
|
|
83
|
-
|
|
85
|
+
CreateServerReport: typeof CreateServerReport;
|
|
84
86
|
CreateEmptyReport: typeof CreateEmptyReport;
|
|
85
87
|
CreateEmptyBaseSchedule: typeof CreateEmptyBaseSchedule;
|
|
86
88
|
CreateEmptyReminderSchedule: typeof CreateEmptyReminderSchedule;
|
|
@@ -106,5 +108,6 @@ export declare const ObjectFactory: {
|
|
|
106
108
|
CreateSystemStatusMessageInfo: typeof CreateSystemStatusMessageInfo;
|
|
107
109
|
CreateToastOptions: typeof CreateToastOptions;
|
|
108
110
|
CreateCustomDisplayFormatterContext: typeof CreateCustomDisplayFormatterContext;
|
|
111
|
+
CreateEmptyStyledColumn: typeof CreateEmptyStyledColumn;
|
|
109
112
|
};
|
|
110
113
|
export default ObjectFactory;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.ObjectFactory = exports.CreateToastOptions = exports.CreateCustomDisplayFormatterContext = exports.CreateColumnFilter = exports.CreateEmptyCellSummmary = exports.CreateSystemStatusMessageInfo = exports.CreateEmptyStyle = exports.CreateEmptyLayout = exports.CreateEmptyFreeTextColumn = exports.CreateEmptyFormatColumn = exports.CreateEmptyConditionalStyle = exports.CreateEmptyShortcut = exports.CreateEmptySchedule = exports.CreateReportSchedule = exports.CreateGlue42Schedule = exports.CreateIPushPullSchedule = exports.CreateEmptyOpenFinSchedule = exports.CreateEmptyGlue42Schedule = exports.CreateEmptyIPushPullSchedule = exports.CreateEmptyOpenFinReport = exports.CreateEmptyGlue42Report = exports.CreateEmptyIPushPullReport = exports.CreateEmptyReportSchedule = exports.CreateEmptyReminderSchedule = exports.CreateEmptyBaseSchedule = exports.
|
|
3
|
+
exports.ObjectFactory = exports.CreateToastOptions = exports.CreateCustomDisplayFormatterContext = exports.CreateEmptyStyledColumn = exports.CreateColumnFilter = exports.CreateEmptyCellSummmary = exports.CreateSystemStatusMessageInfo = exports.CreateEmptyStyle = exports.CreateEmptyLayout = exports.CreateEmptyFreeTextColumn = exports.CreateEmptyFormatColumn = exports.CreateEmptyConditionalStyle = exports.CreateEmptyShortcut = exports.CreateEmptySchedule = exports.CreateReportSchedule = exports.CreateGlue42Schedule = exports.CreateIPushPullSchedule = exports.CreateEmptyOpenFinSchedule = exports.CreateEmptyGlue42Schedule = exports.CreateEmptyIPushPullSchedule = exports.CreateEmptyOpenFinReport = exports.CreateEmptyGlue42Report = exports.CreateEmptyIPushPullReport = exports.CreateEmptyReportSchedule = exports.CreateEmptyReminderSchedule = exports.CreateEmptyBaseSchedule = exports.CreateServerReport = exports.CreateEmptyReport = exports.CreateInternalAlertDefinitionForMessages = exports.CreateEmptyFlashingCellDefinition = exports.CreateEmptyAlertDefinition = exports.CreateRowChangedAlert = exports.CreateCellChangedAlert = exports.CreateGenericAlert = exports.CreateEmptyPlusMinusNudge = exports.CreateEmptyNamedQuery = exports.CreateEmptyCalculatedColumn = exports.CreateEmptyCustomSort = void 0;
|
|
4
4
|
const Enums_1 = require("../PredefinedConfig/Common/Enums");
|
|
5
5
|
const GeneralConstants_1 = require("./Constants/GeneralConstants");
|
|
6
6
|
const Uuid_1 = require("../PredefinedConfig/Uuid");
|
|
@@ -130,7 +130,7 @@ function CreateEmptyReport() {
|
|
|
130
130
|
};
|
|
131
131
|
}
|
|
132
132
|
exports.CreateEmptyReport = CreateEmptyReport;
|
|
133
|
-
function
|
|
133
|
+
function CreateServerReport(reportName) {
|
|
134
134
|
return {
|
|
135
135
|
Uuid: (0, Uuid_1.createUuid)(),
|
|
136
136
|
Name: reportName,
|
|
@@ -140,7 +140,7 @@ function CreateCustomReport(reportName) {
|
|
|
140
140
|
Query: undefined,
|
|
141
141
|
};
|
|
142
142
|
}
|
|
143
|
-
exports.
|
|
143
|
+
exports.CreateServerReport = CreateServerReport;
|
|
144
144
|
function CreateEmptyBaseSchedule(scheduleType) {
|
|
145
145
|
return {
|
|
146
146
|
Uuid: (0, Uuid_1.createUuid)(),
|
|
@@ -291,7 +291,6 @@ function CreateEmptyFormatColumn() {
|
|
|
291
291
|
Style: CreateEmptyStyle(),
|
|
292
292
|
DisplayFormat: undefined,
|
|
293
293
|
CellAlignment: undefined,
|
|
294
|
-
HeaderName: undefined,
|
|
295
294
|
};
|
|
296
295
|
}
|
|
297
296
|
exports.CreateEmptyFormatColumn = CreateEmptyFormatColumn;
|
|
@@ -328,8 +327,8 @@ function CreateEmptyStyle() {
|
|
|
328
327
|
BackColor: undefined,
|
|
329
328
|
ForeColor: undefined,
|
|
330
329
|
BorderColor: undefined,
|
|
331
|
-
FontWeight:
|
|
332
|
-
FontStyle:
|
|
330
|
+
FontWeight: undefined,
|
|
331
|
+
FontStyle: undefined,
|
|
333
332
|
FontSize: undefined,
|
|
334
333
|
ClassName: GeneralConstants_1.EMPTY_STRING,
|
|
335
334
|
};
|
|
@@ -368,6 +367,13 @@ function CreateColumnFilter(ColumnId, PredicateId, Inputs) {
|
|
|
368
367
|
};
|
|
369
368
|
}
|
|
370
369
|
exports.CreateColumnFilter = CreateColumnFilter;
|
|
370
|
+
function CreateEmptyStyledColumn() {
|
|
371
|
+
return {
|
|
372
|
+
Uuid: (0, Uuid_1.createUuid)(),
|
|
373
|
+
ColumnId: GeneralConstants_1.EMPTY_STRING,
|
|
374
|
+
};
|
|
375
|
+
}
|
|
376
|
+
exports.CreateEmptyStyledColumn = CreateEmptyStyledColumn;
|
|
371
377
|
function CreateCustomDisplayFormatterContext(value, node, abColumn, api) {
|
|
372
378
|
return {
|
|
373
379
|
adaptableColumn: abColumn,
|
|
@@ -441,7 +447,7 @@ exports.ObjectFactory = {
|
|
|
441
447
|
CreateEmptyAlertDefinition,
|
|
442
448
|
CreateEmptyFlashingCellDefinition,
|
|
443
449
|
CreateInternalAlertDefinitionForMessages,
|
|
444
|
-
|
|
450
|
+
CreateServerReport,
|
|
445
451
|
CreateEmptyReport,
|
|
446
452
|
CreateEmptyBaseSchedule,
|
|
447
453
|
CreateEmptyReminderSchedule,
|
|
@@ -467,5 +473,6 @@ exports.ObjectFactory = {
|
|
|
467
473
|
CreateSystemStatusMessageInfo,
|
|
468
474
|
CreateToastOptions,
|
|
469
475
|
CreateCustomDisplayFormatterContext,
|
|
476
|
+
CreateEmptyStyledColumn,
|
|
470
477
|
};
|
|
471
478
|
exports.default = exports.ObjectFactory;
|