@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
|
@@ -2,230 +2,11 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.ConditionalStyleModule = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
|
-
const ConditionalStyleRedux = tslib_1.__importStar(require("../Redux/ActionsReducers/ConditionalStyleRedux"));
|
|
6
5
|
const ModuleConstants = tslib_1.__importStar(require("../Utilities/Constants/ModuleConstants"));
|
|
7
|
-
const ArrayExtensions_1 = tslib_1.__importDefault(require("../Utilities/Extensions/ArrayExtensions"));
|
|
8
|
-
const LoggingHelper_1 = require("../Utilities/Helpers/LoggingHelper");
|
|
9
6
|
const AdaptableModuleBase_1 = require("./AdaptableModuleBase");
|
|
10
|
-
const ModuleConstants_1 = require("../Utilities/Constants/ModuleConstants");
|
|
11
|
-
const getScopeViewItems_1 = require("./Utilities/getScopeViewItems");
|
|
12
|
-
const ConditionalStyleWizard_1 = require("../View/ConditionalStyle/Wizard/ConditionalStyleWizard");
|
|
13
|
-
const getRuleViewItems_1 = require("./Utilities/getRuleViewItems");
|
|
14
|
-
const getStyleViewItems_1 = require("./Utilities/getStyleViewItems");
|
|
15
|
-
const getObjectTagsViewItems_1 = require("./Utilities/getObjectTagsViewItems");
|
|
16
|
-
const ConditionalStylePopupHeader_1 = require("../View/ConditionalStyle/ConditionalStylePopupHeader");
|
|
17
7
|
class ConditionalStyleModule extends AdaptableModuleBase_1.AdaptableModuleBase {
|
|
18
8
|
constructor(api) {
|
|
19
9
|
super(ModuleConstants.ConditionalStyleModuleId, ModuleConstants.ConditionalStyleFriendlyName, 'conditional-style', 'ConditionalStylePopup', 'Style columns and rows dynamically based on rules and cell values', api);
|
|
20
10
|
}
|
|
21
|
-
getViewAccessLevel() {
|
|
22
|
-
const keepDeprecatedConditionalStyles = this.api.internalApi.shouldKeepDeprecatedConditionalStyles();
|
|
23
|
-
return keepDeprecatedConditionalStyles ? super.getViewAccessLevel() : 'Hidden';
|
|
24
|
-
}
|
|
25
|
-
getModuleAdaptableObjects(config) {
|
|
26
|
-
return this.api.conditionalStyleApi.getAllConditionalStyle(config);
|
|
27
|
-
}
|
|
28
|
-
getExplicitlyReferencedColumnIds(conditionalStyle) {
|
|
29
|
-
if (conditionalStyle.Rule.BooleanExpression) {
|
|
30
|
-
return this.api.queryLanguageApi.getColumnsFromExpression(conditionalStyle.Rule.BooleanExpression);
|
|
31
|
-
}
|
|
32
|
-
else if (this.api.scopeApi.scopeHasColumns(conditionalStyle.Scope)) {
|
|
33
|
-
return this.api.scopeApi
|
|
34
|
-
.getColumnsForScope(conditionalStyle.Scope)
|
|
35
|
-
.map((adaptableColumn) => adaptableColumn.columnId);
|
|
36
|
-
}
|
|
37
|
-
return [];
|
|
38
|
-
}
|
|
39
|
-
getReferencedNamedQueryNames(conditionalStyle) {
|
|
40
|
-
if (!conditionalStyle.Rule.BooleanExpression) {
|
|
41
|
-
return [];
|
|
42
|
-
}
|
|
43
|
-
return this.api.queryApi.getReferencedNamedQueryNames(conditionalStyle.Rule.BooleanExpression);
|
|
44
|
-
}
|
|
45
|
-
updateOldConfig() {
|
|
46
|
-
var _a;
|
|
47
|
-
const conditionalStyles = (_a = this.api.conditionalStyleApi.getConditionalStyleState().ConditionalStyles) !== null && _a !== void 0 ? _a : [];
|
|
48
|
-
let oldConditionalStyles = [];
|
|
49
|
-
conditionalStyles.forEach((cs) => {
|
|
50
|
-
if (cs) {
|
|
51
|
-
const scopedColumnIds = this.api.scopeApi.getColumnIdsInScope(cs.Scope);
|
|
52
|
-
if (ArrayExtensions_1.default.IsNotNullOrEmpty(scopedColumnIds)) {
|
|
53
|
-
scopedColumnIds.forEach((colId) => {
|
|
54
|
-
if (!this.api.columnApi.doesColumnExist(colId)) {
|
|
55
|
-
(0, LoggingHelper_1.LogAdaptableError)('Conditional Style contains missing column: ' + colId);
|
|
56
|
-
}
|
|
57
|
-
});
|
|
58
|
-
}
|
|
59
|
-
if (cs.ExcludeGroupedRows === false) {
|
|
60
|
-
cs.ExcludeGroupedRows = undefined;
|
|
61
|
-
cs.IncludeGroupedRows = true;
|
|
62
|
-
oldConditionalStyles.push(cs);
|
|
63
|
-
(0, LoggingHelper_1.LogAdaptableWarning)(`Updating incorrect Predefined Config for Conditional Style with "ExcludeGroupedRows" set}`);
|
|
64
|
-
}
|
|
65
|
-
if (cs.Predicate) {
|
|
66
|
-
cs.Rule = {
|
|
67
|
-
Predicate: cs.Predicate,
|
|
68
|
-
};
|
|
69
|
-
(0, LoggingHelper_1.LogAdaptableWarning)(`Updating incorrect Predefined Config for Conditional Style: ${cs.Predicate}`);
|
|
70
|
-
cs.Predicate = undefined;
|
|
71
|
-
oldConditionalStyles.push(cs);
|
|
72
|
-
}
|
|
73
|
-
if (cs.Expression) {
|
|
74
|
-
let rule = {
|
|
75
|
-
BooleanExpression: cs.Expression,
|
|
76
|
-
};
|
|
77
|
-
cs.Rule = rule;
|
|
78
|
-
(0, LoggingHelper_1.LogAdaptableWarning)(`Updating incorrect Predefined Config for Conditional Style: ${cs.Expression}`);
|
|
79
|
-
cs.Expression = undefined;
|
|
80
|
-
oldConditionalStyles.push(cs);
|
|
81
|
-
}
|
|
82
|
-
}
|
|
83
|
-
});
|
|
84
|
-
this.api.conditionalStyleApi.editConditionalStyles(oldConditionalStyles);
|
|
85
|
-
}
|
|
86
|
-
addColumnMenuItems(column) {
|
|
87
|
-
if (column && this.isModuleEditable() && !column.isSparkline) {
|
|
88
|
-
let conditionalStyles = this.api.conditionalStyleApi.getConditionalStylesForColumn(column);
|
|
89
|
-
let firstConditionalStyle = ArrayExtensions_1.default.IsNotNullOrEmpty(conditionalStyles)
|
|
90
|
-
? conditionalStyles.find((cs) => this.api.scopeApi.isColumnInScopeColumns(column, cs.Scope))
|
|
91
|
-
: undefined;
|
|
92
|
-
let conditionalStyleExists = firstConditionalStyle != undefined;
|
|
93
|
-
let label = conditionalStyleExists ? 'Edit ' : 'Create ';
|
|
94
|
-
let popupParam = {
|
|
95
|
-
column: column,
|
|
96
|
-
action: conditionalStyleExists ? 'Edit' : 'New',
|
|
97
|
-
source: 'ColumnMenu',
|
|
98
|
-
value: firstConditionalStyle,
|
|
99
|
-
};
|
|
100
|
-
return [
|
|
101
|
-
this.createColumnMenuItemShowPopup(label + this.moduleInfo.FriendlyName, this.moduleInfo.Popup, this.moduleInfo.Glyph, popupParam),
|
|
102
|
-
];
|
|
103
|
-
}
|
|
104
|
-
}
|
|
105
|
-
getTeamSharingAction() {
|
|
106
|
-
return {
|
|
107
|
-
ModuleEntities: this.api.conditionalStyleApi.getAllConditionalStyle(),
|
|
108
|
-
AddAction: ConditionalStyleRedux.ConditionalStyleAdd,
|
|
109
|
-
EditAction: ConditionalStyleRedux.ConditionalStyleEdit,
|
|
110
|
-
};
|
|
111
|
-
}
|
|
112
|
-
isConditionalStyleActiveForColumn(conditionalStyleForColumn, column, params) {
|
|
113
|
-
if (!conditionalStyleForColumn.Rule) {
|
|
114
|
-
return false;
|
|
115
|
-
}
|
|
116
|
-
if (conditionalStyleForColumn.IsSuspended) {
|
|
117
|
-
return false;
|
|
118
|
-
}
|
|
119
|
-
if (this.shouldRunStyle(conditionalStyleForColumn, params.node)) {
|
|
120
|
-
// first run the predicate
|
|
121
|
-
if (conditionalStyleForColumn.Rule.Predicate &&
|
|
122
|
-
conditionalStyleForColumn.Rule.Predicate.PredicateId) {
|
|
123
|
-
if (this.evaluatePredicate({
|
|
124
|
-
conditionalStyle: conditionalStyleForColumn,
|
|
125
|
-
column,
|
|
126
|
-
value: params.value,
|
|
127
|
-
node: params.node,
|
|
128
|
-
})) {
|
|
129
|
-
return true;
|
|
130
|
-
}
|
|
131
|
-
}
|
|
132
|
-
else if (conditionalStyleForColumn.Rule.BooleanExpression) {
|
|
133
|
-
if (this.evaluateExpression(conditionalStyleForColumn, params.node)) {
|
|
134
|
-
return true;
|
|
135
|
-
}
|
|
136
|
-
}
|
|
137
|
-
// nothing has passed then return false
|
|
138
|
-
return false;
|
|
139
|
-
}
|
|
140
|
-
}
|
|
141
|
-
isConditionalStyleActiveForRow(conditionalStyleForRow, params) {
|
|
142
|
-
if (!conditionalStyleForRow.Rule) {
|
|
143
|
-
return false;
|
|
144
|
-
}
|
|
145
|
-
if (conditionalStyleForRow.IsSuspended) {
|
|
146
|
-
return false;
|
|
147
|
-
}
|
|
148
|
-
if (this.shouldRunStyle(conditionalStyleForRow, params.node)) {
|
|
149
|
-
if (conditionalStyleForRow.Rule.Predicate &&
|
|
150
|
-
conditionalStyleForRow.Rule.Predicate.PredicateId) {
|
|
151
|
-
if (this.evaluatePredicate({
|
|
152
|
-
conditionalStyle: conditionalStyleForRow,
|
|
153
|
-
column: null,
|
|
154
|
-
value: params.value,
|
|
155
|
-
node: params.node,
|
|
156
|
-
})) {
|
|
157
|
-
return true;
|
|
158
|
-
}
|
|
159
|
-
}
|
|
160
|
-
else if (conditionalStyleForRow.Rule.BooleanExpression) {
|
|
161
|
-
if (this.evaluateExpression(conditionalStyleForRow, params.node)) {
|
|
162
|
-
return true;
|
|
163
|
-
}
|
|
164
|
-
}
|
|
165
|
-
// nothing has passed then return false
|
|
166
|
-
return false;
|
|
167
|
-
}
|
|
168
|
-
}
|
|
169
|
-
evaluatePredicate({ conditionalStyle, column, value, node, }) {
|
|
170
|
-
const params = {
|
|
171
|
-
value: value,
|
|
172
|
-
oldValue: null,
|
|
173
|
-
displayValue: column
|
|
174
|
-
? this.api.gridApi.getDisplayValueFromRowNode(node, column.columnId)
|
|
175
|
-
: value,
|
|
176
|
-
node: node,
|
|
177
|
-
column: column,
|
|
178
|
-
};
|
|
179
|
-
const result = this.api.predicateApi.handlePredicate(conditionalStyle.Rule.Predicate, params, false);
|
|
180
|
-
return result;
|
|
181
|
-
}
|
|
182
|
-
evaluateExpression(conditionalStyle, node) {
|
|
183
|
-
const isValidExpression = this.api.queryLanguageApi.isValidBooleanExpression(conditionalStyle.Rule.BooleanExpression, ModuleConstants_1.ConditionalStyleModuleId, `Invalid conditional style rule '${conditionalStyle.Rule.BooleanExpression}'`);
|
|
184
|
-
return (isValidExpression &&
|
|
185
|
-
this.api.internalApi
|
|
186
|
-
.getQueryLanguageService()
|
|
187
|
-
.evaluateBooleanExpression(conditionalStyle.Rule.BooleanExpression, ModuleConstants_1.ConditionalStyleModuleId, node));
|
|
188
|
-
}
|
|
189
|
-
shouldRunStyle(conditionalStyle, node) {
|
|
190
|
-
if (!conditionalStyle.IncludeGroupedRows && this.api.gridApi.isGroupRowNode(node)) {
|
|
191
|
-
return false;
|
|
192
|
-
}
|
|
193
|
-
return true;
|
|
194
|
-
}
|
|
195
|
-
toView(conditionalStyle) {
|
|
196
|
-
return {
|
|
197
|
-
items: [
|
|
198
|
-
(0, getScopeViewItems_1.getScopeViewItems)(conditionalStyle.Scope, this.api),
|
|
199
|
-
(0, getStyleViewItems_1.getStyleViewItems)(),
|
|
200
|
-
(0, getRuleViewItems_1.getRuleViewItems)(conditionalStyle.Rule, this.api),
|
|
201
|
-
{
|
|
202
|
-
name: 'Settings',
|
|
203
|
-
values: [`Include grouped rows: ${conditionalStyle.IncludeGroupedRows ? 'Yes' : 'No'}`],
|
|
204
|
-
},
|
|
205
|
-
(0, getObjectTagsViewItems_1.getObjectTagsViewItems)(conditionalStyle, this.api),
|
|
206
|
-
],
|
|
207
|
-
abObject: conditionalStyle,
|
|
208
|
-
};
|
|
209
|
-
}
|
|
210
|
-
toViewAll() {
|
|
211
|
-
return this.getModuleAdaptableObjects({
|
|
212
|
-
includeLayoutNotAssociatedObjects: this.showLayoutNotAssociatedObjects(),
|
|
213
|
-
}).map((conditionalStyle) => this.toView(conditionalStyle));
|
|
214
|
-
}
|
|
215
|
-
getViewProperties() {
|
|
216
|
-
return {
|
|
217
|
-
HeaderComponent: ConditionalStylePopupHeader_1.ConditionalStylePopupHeader,
|
|
218
|
-
getDeleteAction: (conditionalStyle) => ConditionalStyleRedux.ConditionalStyleDelete(conditionalStyle),
|
|
219
|
-
getSuspendAction: (conditionalStyle) => ConditionalStyleRedux.ConditionalStyleSuspend(conditionalStyle),
|
|
220
|
-
getUnSuspendAction: (conditionalStyle) => ConditionalStyleRedux.ConditionalStyleUnSuspend(conditionalStyle),
|
|
221
|
-
emptyView: "Click 'New' to create a new Conditional Style Rule. When this is met, row or cells in the Conditional Style's scope will be styled appropriately.",
|
|
222
|
-
getEditWizard() {
|
|
223
|
-
return ConditionalStyleWizard_1.ConditionalStyleWizard;
|
|
224
|
-
},
|
|
225
|
-
};
|
|
226
|
-
}
|
|
227
|
-
canBeAssociatedWithLayouts() {
|
|
228
|
-
return true;
|
|
229
|
-
}
|
|
230
11
|
}
|
|
231
12
|
exports.ConditionalStyleModule = ConditionalStyleModule;
|
|
@@ -3,6 +3,7 @@ import { AdaptableModuleView, IModule } from './Interface/IModule';
|
|
|
3
3
|
import { AdaptableApi } from '../Api/AdaptableApi';
|
|
4
4
|
export declare class DataChangeHistoryModule extends AdaptableModuleBase implements IModule {
|
|
5
5
|
constructor(api: AdaptableApi);
|
|
6
|
+
isModuleAvailable(): boolean;
|
|
6
7
|
getPopupMaxWidth(): number;
|
|
7
8
|
hasNamedQueryReferences(): boolean;
|
|
8
9
|
private shouldLogDataChange;
|
|
@@ -6,6 +6,8 @@ const AdaptableModuleBase_1 = require("./AdaptableModuleBase");
|
|
|
6
6
|
const ModuleConstants = tslib_1.__importStar(require("../Utilities/Constants/ModuleConstants"));
|
|
7
7
|
const SystemRedux_1 = require("../Redux/ActionsReducers/SystemRedux");
|
|
8
8
|
const DataChangeHistoryStatusBarContent_1 = require("../View/DataChangeHistory/DataChangeHistoryStatusBarContent");
|
|
9
|
+
const core_1 = require("@ag-grid-community/core");
|
|
10
|
+
const LoggingHelper_1 = require("../Utilities/Helpers/LoggingHelper");
|
|
9
11
|
class DataChangeHistoryModule extends AdaptableModuleBase_1.AdaptableModuleBase {
|
|
10
12
|
constructor(api) {
|
|
11
13
|
super(ModuleConstants.DataChangeHistoryModuleId, ModuleConstants.DataChangeHistoryFriendlyName, 'track-changes', 'DataChangeHistoryPopup', 'Provides an overview of all previous changes, giving the possibility to undo specific changes', api);
|
|
@@ -19,6 +21,16 @@ class DataChangeHistoryModule extends AdaptableModuleBase_1.AdaptableModuleBase
|
|
|
19
21
|
}
|
|
20
22
|
});
|
|
21
23
|
}
|
|
24
|
+
isModuleAvailable() {
|
|
25
|
+
const isAdaptableModuleAvailable = super.isModuleAvailable();
|
|
26
|
+
const isAgGridModuleAvailable = this.api.internalApi
|
|
27
|
+
.getAdaptableInstance()
|
|
28
|
+
.isAgGridModulePresent(core_1.ModuleNames.ClientSideRowModelModule);
|
|
29
|
+
if (isAdaptableModuleAvailable && !isAgGridModuleAvailable) {
|
|
30
|
+
(0, LoggingHelper_1.LogAdaptableWarning)(`Data Change History is NOT available due to missing required AG Grid module: ${core_1.ModuleNames.ClientSideRowModelModule}`);
|
|
31
|
+
}
|
|
32
|
+
return isAdaptableModuleAvailable && isAgGridModuleAvailable;
|
|
33
|
+
}
|
|
22
34
|
getPopupMaxWidth() {
|
|
23
35
|
return 1000;
|
|
24
36
|
}
|
|
@@ -15,8 +15,6 @@ export declare class FormatColumnModule extends AdaptableModuleBase implements I
|
|
|
15
15
|
hasNamedQueryReferences(): boolean;
|
|
16
16
|
updateOldConfig(): void;
|
|
17
17
|
private updateConditionalStylesColumnsOldConfig;
|
|
18
|
-
private updateGradientColumnsOldConfig;
|
|
19
|
-
private getExistingFormatColumn;
|
|
20
18
|
addColumnMenuItems(column: AdaptableColumn): AdaptableMenuItem[] | undefined;
|
|
21
19
|
getTeamSharingAction(): TeamSharingImportInfo<FormatColumn>;
|
|
22
20
|
toView(formatColumn: FormatColumn): AdaptableObjectView;
|
|
@@ -4,7 +4,6 @@ exports.FormatColumnModule = void 0;
|
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
const AdaptableModuleBase_1 = require("./AdaptableModuleBase");
|
|
6
6
|
const ModuleConstants = tslib_1.__importStar(require("../Utilities/Constants/ModuleConstants"));
|
|
7
|
-
const ArrayExtensions_1 = require("../Utilities/Extensions/ArrayExtensions");
|
|
8
7
|
const FormatColumnRedux = tslib_1.__importStar(require("../Redux/ActionsReducers/FormatColumnRedux"));
|
|
9
8
|
const LoggingHelper_1 = require("../Utilities/Helpers/LoggingHelper");
|
|
10
9
|
const FormatColumnWizard_1 = require("../View/FormatColumn/Wizard/FormatColumnWizard");
|
|
@@ -18,27 +17,6 @@ const MoveFormatColumn_1 = require("../View/FormatColumn/MoveFormatColumn");
|
|
|
18
17
|
class FormatColumnModule extends AdaptableModuleBase_1.AdaptableModuleBase {
|
|
19
18
|
constructor(api) {
|
|
20
19
|
super(ModuleConstants.FormatColumnModuleId, ModuleConstants.FormatColumnFriendlyName, 'format-column', 'FormatColumnPopup', 'Create a column style, display format or cell alignment', api);
|
|
21
|
-
/**
|
|
22
|
-
* Use Case: Data (cell/row) has changed
|
|
23
|
-
* Action: Any CheckboxFormatColumns need to be updated, as their disabled state may have changed
|
|
24
|
-
*/
|
|
25
|
-
this.api.internalApi
|
|
26
|
-
.getDataService()
|
|
27
|
-
.on('CellDataChanged', (cellDataChangedInfo) => {
|
|
28
|
-
const activeCheckboxColumnIds = this.api.columnApi
|
|
29
|
-
.getColumns()
|
|
30
|
-
.filter((aColumn) => {
|
|
31
|
-
const checkboxFormatColumn = this.api.formatColumnApi.getCheckBoxStyleFormatColumn(aColumn);
|
|
32
|
-
return checkboxFormatColumn && !checkboxFormatColumn.IsSuspended;
|
|
33
|
-
})
|
|
34
|
-
.map((aColumn) => aColumn.columnId);
|
|
35
|
-
// no need to refresh the CheckboxColumns if the change was triggered by one of them
|
|
36
|
-
if (!activeCheckboxColumnIds.includes(cellDataChangedInfo.column.columnId)) {
|
|
37
|
-
this.api.internalApi
|
|
38
|
-
.getAdaptableInstance()
|
|
39
|
-
.refreshCells(null, activeCheckboxColumnIds, true, true);
|
|
40
|
-
}
|
|
41
|
-
});
|
|
42
20
|
}
|
|
43
21
|
getModuleAdaptableObjects(config) {
|
|
44
22
|
return this.api.formatColumnApi.getAllFormatColumn(config);
|
|
@@ -55,44 +33,33 @@ class FormatColumnModule extends AdaptableModuleBase_1.AdaptableModuleBase {
|
|
|
55
33
|
return false;
|
|
56
34
|
}
|
|
57
35
|
updateOldConfig() {
|
|
58
|
-
|
|
59
|
-
//
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
36
|
+
this.updateConditionalStylesColumnsOldConfig();
|
|
37
|
+
// update ConditionalStyle StatusBarPanel
|
|
38
|
+
const oldStatusBars = this.api.internalApi.getState().StatusBar.StatusBars;
|
|
39
|
+
let replaceConditionalStyleStatusBar = false;
|
|
40
|
+
const newStatusBars = oldStatusBars.map((statusBar) => (Object.assign(Object.assign({}, statusBar), { StatusBarPanels: [
|
|
41
|
+
...new Set(statusBar.StatusBarPanels.map((statusBarPanel) => {
|
|
42
|
+
if (statusBarPanel === 'ConditionalStyle') {
|
|
43
|
+
replaceConditionalStyleStatusBar = true;
|
|
44
|
+
return 'FormatColumn';
|
|
45
|
+
}
|
|
46
|
+
return statusBarPanel;
|
|
47
|
+
})),
|
|
48
|
+
] })));
|
|
49
|
+
if (replaceConditionalStyleStatusBar) {
|
|
50
|
+
this.api.statusBarApi.setStatusBarPanels(newStatusBars);
|
|
51
|
+
}
|
|
52
|
+
// update ConditionalStyle dashboard buttons
|
|
53
|
+
const dashboardModuleButtons = this.api.internalApi.getState().Dashboard.ModuleButtons;
|
|
54
|
+
if (dashboardModuleButtons.includes('ConditionalStyle')) {
|
|
55
|
+
dashboardModuleButtons[dashboardModuleButtons.indexOf('ConditionalStyle')] = 'FormatColumn';
|
|
56
|
+
this.api.dashboardApi.setModuleButtons([...new Set(dashboardModuleButtons)]);
|
|
64
57
|
}
|
|
65
|
-
|
|
66
|
-
const
|
|
67
|
-
if (
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
const oldStatusBars = this.api.internalApi.getState().StatusBar.StatusBars;
|
|
71
|
-
let replaceConditionalStyleStatusBar = false;
|
|
72
|
-
const newStatusBars = oldStatusBars.map((statusBar) => (Object.assign(Object.assign({}, statusBar), { StatusBarPanels: [
|
|
73
|
-
...new Set(statusBar.StatusBarPanels.map((statusBarPanel) => {
|
|
74
|
-
if (statusBarPanel === 'ConditionalStyle') {
|
|
75
|
-
replaceConditionalStyleStatusBar = true;
|
|
76
|
-
return 'FormatColumn';
|
|
77
|
-
}
|
|
78
|
-
return statusBarPanel;
|
|
79
|
-
})),
|
|
80
|
-
] })));
|
|
81
|
-
if (replaceConditionalStyleStatusBar) {
|
|
82
|
-
this.api.statusBarApi.setStatusBarPanels(newStatusBars);
|
|
83
|
-
}
|
|
84
|
-
// update ConditionalStyle dashboard buttons
|
|
85
|
-
const dashboardModuleButtons = this.api.internalApi.getState().Dashboard.ModuleButtons;
|
|
86
|
-
if (dashboardModuleButtons.includes('ConditionalStyle')) {
|
|
87
|
-
dashboardModuleButtons[dashboardModuleButtons.indexOf('ConditionalStyle')] = 'FormatColumn';
|
|
88
|
-
this.api.dashboardApi.setModuleButtons([...new Set(dashboardModuleButtons)]);
|
|
89
|
-
}
|
|
90
|
-
// update ConditionalStyle toolPanel buttons
|
|
91
|
-
const toolPanelModuleButtons = this.api.internalApi.getState().ToolPanel.ModuleButtons;
|
|
92
|
-
if (toolPanelModuleButtons.includes('ConditionalStyle')) {
|
|
93
|
-
toolPanelModuleButtons[toolPanelModuleButtons.indexOf('ConditionalStyle')] = 'FormatColumn';
|
|
94
|
-
this.api.toolPanelApi.setModuleButtons([...new Set(dashboardModuleButtons)]);
|
|
95
|
-
}
|
|
58
|
+
// update ConditionalStyle toolPanel buttons
|
|
59
|
+
const toolPanelModuleButtons = this.api.internalApi.getState().ToolPanel.ModuleButtons;
|
|
60
|
+
if (toolPanelModuleButtons.includes('ConditionalStyle')) {
|
|
61
|
+
toolPanelModuleButtons[toolPanelModuleButtons.indexOf('ConditionalStyle')] = 'FormatColumn';
|
|
62
|
+
this.api.toolPanelApi.setModuleButtons([...new Set(dashboardModuleButtons)]);
|
|
96
63
|
}
|
|
97
64
|
}
|
|
98
65
|
updateConditionalStylesColumnsOldConfig() {
|
|
@@ -101,179 +68,21 @@ class FormatColumnModule extends AdaptableModuleBase_1.AdaptableModuleBase {
|
|
|
101
68
|
if (!(oldConditionalStyles === null || oldConditionalStyles === void 0 ? void 0 : oldConditionalStyles.length)) {
|
|
102
69
|
return;
|
|
103
70
|
}
|
|
104
|
-
(0, LoggingHelper_1.ConsoleLogWarning)(`DEPRECATED:
|
|
71
|
+
(0, LoggingHelper_1.ConsoleLogWarning)(`DEPRECATED: Conditional Styles have been merged into 'Format Columns'`);
|
|
105
72
|
// remove conditional styles
|
|
106
|
-
this.api.
|
|
73
|
+
this.api.internalApi.deleteConditionalStyles(oldConditionalStyles);
|
|
107
74
|
// add as format column
|
|
108
75
|
this.api.formatColumnApi.addFormatColumns(oldConditionalStyles);
|
|
109
76
|
}
|
|
110
|
-
updateGradientColumnsOldConfig() {
|
|
111
|
-
let newFormatColumns = [];
|
|
112
|
-
let existingFormatColumns = [];
|
|
113
|
-
// 1. Convert Gradient Columns to Format Columns
|
|
114
|
-
let gradientColumnState = this.api.internalApi.getState().GradientColumn;
|
|
115
|
-
if (gradientColumnState === null || gradientColumnState === void 0 ? void 0 : gradientColumnState.GradientColumns) {
|
|
116
|
-
gradientColumnState.GradientColumns.forEach((gradientColumn) => {
|
|
117
|
-
const columnId = gradientColumn.ColumnId;
|
|
118
|
-
(0, LoggingHelper_1.LogAdaptableWarning)(`Merging Gradient Style into Format Column for Column: ${columnId}`);
|
|
119
|
-
let existingFormatColumn = this.getExistingFormatColumn(columnId);
|
|
120
|
-
let gradientStyle = {
|
|
121
|
-
GradientStyle: {
|
|
122
|
-
CellRanges: [
|
|
123
|
-
{
|
|
124
|
-
Min: gradientColumn.BaseValue,
|
|
125
|
-
Max: gradientColumn.PositiveValue,
|
|
126
|
-
Color: gradientColumn.PositiveColor,
|
|
127
|
-
},
|
|
128
|
-
],
|
|
129
|
-
},
|
|
130
|
-
};
|
|
131
|
-
if (!existingFormatColumn) {
|
|
132
|
-
let formatColumn = {
|
|
133
|
-
Scope: {
|
|
134
|
-
ColumnIds: [gradientColumn.ColumnId],
|
|
135
|
-
},
|
|
136
|
-
ColumnStyle: gradientStyle,
|
|
137
|
-
};
|
|
138
|
-
newFormatColumns.push(formatColumn);
|
|
139
|
-
}
|
|
140
|
-
else {
|
|
141
|
-
existingFormatColumn.ColumnStyle = gradientStyle;
|
|
142
|
-
existingFormatColumns.push(existingFormatColumn);
|
|
143
|
-
}
|
|
144
|
-
});
|
|
145
|
-
}
|
|
146
|
-
// 2. Convert Percent Bars to Format Columns
|
|
147
|
-
let percentBarState = this.api.internalApi.getState().PercentBar;
|
|
148
|
-
if (percentBarState === null || percentBarState === void 0 ? void 0 : percentBarState.PercentBars) {
|
|
149
|
-
percentBarState === null || percentBarState === void 0 ? void 0 : percentBarState.PercentBars.forEach((percentBar) => {
|
|
150
|
-
const columnId = percentBar.ColumnId;
|
|
151
|
-
(0, LoggingHelper_1.LogAdaptableWarning)(`Merging Percent Bar Style into Format Column for Column: ${columnId}`);
|
|
152
|
-
let existingFormatColumn = this.getExistingFormatColumn(columnId);
|
|
153
|
-
const ranges = percentBar.Ranges;
|
|
154
|
-
const columnComparison = percentBar.ColumnComparison;
|
|
155
|
-
let cellText = [];
|
|
156
|
-
if (percentBar.ShowValue && percentBar.DisplayRawValue) {
|
|
157
|
-
cellText.push('CellValue');
|
|
158
|
-
}
|
|
159
|
-
if (percentBar.ShowValue && percentBar.DisplayPercentageValue) {
|
|
160
|
-
cellText.push('PercentageValue');
|
|
161
|
-
}
|
|
162
|
-
const tooltipText = [];
|
|
163
|
-
if (percentBar.ShowToolTip && percentBar.DisplayRawValue) {
|
|
164
|
-
tooltipText.push('CellValue');
|
|
165
|
-
}
|
|
166
|
-
if (percentBar.ShowToolTip && percentBar.DisplayPercentageValue) {
|
|
167
|
-
tooltipText.push('PercentageValue');
|
|
168
|
-
}
|
|
169
|
-
const percentBarStyle = {
|
|
170
|
-
PercentBarStyle: {
|
|
171
|
-
CellRanges: ranges,
|
|
172
|
-
ColumnComparison: columnComparison,
|
|
173
|
-
CellText: cellText,
|
|
174
|
-
ToolTipText: tooltipText,
|
|
175
|
-
BackColor: percentBar.BackColor,
|
|
176
|
-
},
|
|
177
|
-
};
|
|
178
|
-
if (!existingFormatColumn) {
|
|
179
|
-
const formatColumn = {
|
|
180
|
-
Scope: {
|
|
181
|
-
ColumnIds: [percentBar.ColumnId],
|
|
182
|
-
},
|
|
183
|
-
ColumnStyle: percentBarStyle,
|
|
184
|
-
};
|
|
185
|
-
newFormatColumns.push(formatColumn);
|
|
186
|
-
}
|
|
187
|
-
else {
|
|
188
|
-
existingFormatColumn.ColumnStyle = percentBarStyle;
|
|
189
|
-
existingFormatColumns.push(existingFormatColumn);
|
|
190
|
-
}
|
|
191
|
-
});
|
|
192
|
-
}
|
|
193
|
-
// update Redux
|
|
194
|
-
this.api.formatColumnApi.addFormatColumns(newFormatColumns);
|
|
195
|
-
if (ArrayExtensions_1.ArrayExtensions.IsNotNullOrEmpty(existingFormatColumns)) {
|
|
196
|
-
existingFormatColumns.forEach((fc) => {
|
|
197
|
-
this.api.formatColumnApi.editFormatColumn(fc);
|
|
198
|
-
});
|
|
199
|
-
}
|
|
200
|
-
if (ArrayExtensions_1.ArrayExtensions.IsNotNullOrEmpty(newFormatColumns) ||
|
|
201
|
-
ArrayExtensions_1.ArrayExtensions.IsNotNullOrEmpty(existingFormatColumns)) {
|
|
202
|
-
this.api.internalApi.clearGradientColumnState();
|
|
203
|
-
this.api.internalApi.clearPercentBarState();
|
|
204
|
-
}
|
|
205
|
-
}
|
|
206
|
-
getExistingFormatColumn(columnId) {
|
|
207
|
-
let formatColumn = this.api.formatColumnApi.getFormatColumnWithSingleColumnScope(columnId);
|
|
208
|
-
if (formatColumn) {
|
|
209
|
-
return formatColumn;
|
|
210
|
-
}
|
|
211
|
-
// special columns (Calculated, FreeText, Action) are not yet part of AG-GridS colDefs
|
|
212
|
-
// so we have to check if the given columnId is a special column
|
|
213
|
-
const isSpecialColumn = !!this.api.calculatedColumnApi.getCalculatedColumnForColumnId(columnId) ||
|
|
214
|
-
!!this.api.freeTextColumnApi.getFreeTextColumnById(columnId);
|
|
215
|
-
if (isSpecialColumn) {
|
|
216
|
-
return this.api.formatColumnApi
|
|
217
|
-
.getAllFormatColumn()
|
|
218
|
-
.find((formatColumn) => 'ColumnIds' in formatColumn.Scope &&
|
|
219
|
-
formatColumn.Scope.ColumnIds.length == 1 &&
|
|
220
|
-
formatColumn.Scope.ColumnIds.includes(columnId));
|
|
221
|
-
}
|
|
222
|
-
}
|
|
223
77
|
addColumnMenuItems(column) {
|
|
224
|
-
var _a;
|
|
225
78
|
let returnColumnMenuItems = [];
|
|
226
79
|
if (column && this.isModuleEditable() && !column.isSparkline) {
|
|
227
|
-
// not fullproof as might be an All but its generally pretty good
|
|
228
|
-
let formatColumn = this.api.formatColumnApi.getFormatColumnForColumn(column);
|
|
229
|
-
let formatExists = formatColumn
|
|
230
|
-
? this.api.scopeApi.isColumnInScopeColumns(column, formatColumn.Scope)
|
|
231
|
-
: false;
|
|
232
|
-
if (formatColumn && formatColumn.IsReadOnly && formatColumn.IsReadOnly == true) {
|
|
233
|
-
formatExists = false;
|
|
234
|
-
}
|
|
235
|
-
let label = formatExists ? 'Edit ' : 'Create ';
|
|
236
80
|
let popupParam = {
|
|
237
81
|
column: column,
|
|
238
|
-
action:
|
|
82
|
+
action: 'New',
|
|
239
83
|
source: 'ColumnMenu',
|
|
240
|
-
value: formatColumn,
|
|
241
84
|
};
|
|
242
|
-
returnColumnMenuItems.push(this.createColumnMenuItemShowPopup(
|
|
243
|
-
if (column.dataType == 'Boolean' && !this.api.columnApi.isFreeTextColumn(column.columnId)) {
|
|
244
|
-
let formatColumn = this.api.formatColumnApi.getFormatColumnForColumnId(column.columnId);
|
|
245
|
-
let hasCheckBox = formatColumn && ((_a = formatColumn.ColumnStyle) === null || _a === void 0 ? void 0 : _a.CheckBoxStyle);
|
|
246
|
-
if (hasCheckBox) {
|
|
247
|
-
returnColumnMenuItems.push(this.createColumnMenuItemClickFunction('Remove Checkbox', 'unchecked', () => {
|
|
248
|
-
this.api.formatColumnApi.deleteFormatColumn(formatColumn);
|
|
249
|
-
}));
|
|
250
|
-
}
|
|
251
|
-
else {
|
|
252
|
-
// const test = this.api.formatColumnApi.getCheckBoxStyleFormatColumn(column);
|
|
253
|
-
if (formatColumn) {
|
|
254
|
-
returnColumnMenuItems.push(this.createColumnMenuItemClickFunction('Show as Checkbox', 'checked', () => {
|
|
255
|
-
formatColumn.ColumnStyle = {
|
|
256
|
-
CheckBoxStyle: true,
|
|
257
|
-
};
|
|
258
|
-
formatColumn.Style = undefined;
|
|
259
|
-
this.api.formatColumnApi.editFormatColumn(formatColumn);
|
|
260
|
-
}));
|
|
261
|
-
}
|
|
262
|
-
else {
|
|
263
|
-
returnColumnMenuItems.push(this.createColumnMenuItemClickFunction('Show as Checkbox', 'checked', () => {
|
|
264
|
-
let newFormatColumn = {
|
|
265
|
-
Scope: {
|
|
266
|
-
ColumnIds: [column.columnId],
|
|
267
|
-
},
|
|
268
|
-
ColumnStyle: {
|
|
269
|
-
CheckBoxStyle: true,
|
|
270
|
-
},
|
|
271
|
-
};
|
|
272
|
-
this.api.formatColumnApi.addFormatColumn(newFormatColumn);
|
|
273
|
-
}));
|
|
274
|
-
}
|
|
275
|
-
}
|
|
276
|
-
}
|
|
85
|
+
returnColumnMenuItems.push(this.createColumnMenuItemShowPopup('Create Format Column', this.moduleInfo.Popup, this.moduleInfo.Glyph, popupParam));
|
|
277
86
|
}
|
|
278
87
|
return returnColumnMenuItems;
|
|
279
88
|
}
|
|
@@ -57,10 +57,6 @@ class LayoutModule extends AdaptableModuleBase_1.AdaptableModuleBase {
|
|
|
57
57
|
Reference: alertDefinition,
|
|
58
58
|
Module: 'Alert',
|
|
59
59
|
}));
|
|
60
|
-
this.api.conditionalStyleApi.getAllConditionalStyle(loadConfig).forEach((conditionalStyle) => layoutAssociatedObjectReferences.push({
|
|
61
|
-
Reference: conditionalStyle,
|
|
62
|
-
Module: 'ConditionalStyle',
|
|
63
|
-
}));
|
|
64
60
|
this.api.customSortApi.getAllCustomSort(loadConfig).forEach((customSort) => layoutAssociatedObjectReferences.push({
|
|
65
61
|
Reference: customSort,
|
|
66
62
|
Module: 'CustomSort',
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { AdaptableModuleBase } from './AdaptableModuleBase';
|
|
2
|
+
import { AdaptableColumn } from '../PredefinedConfig/Common/AdaptableColumn';
|
|
3
|
+
import { AdaptableMenuItem } from '../PredefinedConfig/Common/Menu';
|
|
4
|
+
import { TeamSharingImportInfo } from '../PredefinedConfig/TeamSharingState';
|
|
5
|
+
import { FormatColumn } from '../PredefinedConfig/FormatColumnState';
|
|
6
|
+
import { AdaptableModuleView, AdaptableObjectView, IModule } from './Interface/IModule';
|
|
7
|
+
import { AdaptableApi } from '../Api/AdaptableApi';
|
|
8
|
+
import { AdaptableObject } from '../PredefinedConfig/Common/AdaptableObject';
|
|
9
|
+
import { StyledColumn } from '../PredefinedConfig/StyledColumnState';
|
|
10
|
+
export declare class StyledColumnModule extends AdaptableModuleBase implements IModule {
|
|
11
|
+
constructor(api: AdaptableApi);
|
|
12
|
+
updateOldConfig(): void;
|
|
13
|
+
getModuleAdaptableObjects(config?: {
|
|
14
|
+
includeLayoutNotAssociatedObjects?: boolean;
|
|
15
|
+
}): AdaptableObject[];
|
|
16
|
+
getExplicitlyReferencedColumnIds(formatColumn: FormatColumn): string[];
|
|
17
|
+
hasNamedQueryReferences(): boolean;
|
|
18
|
+
addColumnMenuItems(column: AdaptableColumn): AdaptableMenuItem[] | undefined;
|
|
19
|
+
getTeamSharingAction(): TeamSharingImportInfo<StyledColumn>;
|
|
20
|
+
toView(styledColumn: StyledColumn): AdaptableObjectView;
|
|
21
|
+
toViewAll(): AdaptableObjectView[];
|
|
22
|
+
getViewProperties(): AdaptableModuleView;
|
|
23
|
+
canBeAssociatedWithLayouts(): boolean;
|
|
24
|
+
}
|