@adaptabletools/adaptable 13.0.0-canary.9 → 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/base.css +1231 -733
- package/base.css.map +1 -0
- package/bundle.cjs.js +236 -219
- 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 +3 -0
- package/src/AdaptableOptions/AdaptableQLOptions.d.ts +30 -6
- package/src/AdaptableOptions/ExportOptions.d.ts +2 -2
- package/src/AdaptableOptions/GeneralOptions.d.ts +0 -5
- 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 -5
- package/src/Api/ExportApi.d.ts +6 -6
- 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/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/QueryLanguageApi.d.ts +3 -2
- package/src/Api/ScopeApi.d.ts +1 -1
- package/src/Api/StyledColumnApi.d.ts +106 -0
- package/src/Api/{ConditionalStyleApi.js → StyledColumnApi.js} +0 -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/FormatColumnState.d.ts +6 -90
- package/src/PredefinedConfig/PredefinedConfig.d.ts +5 -0
- package/src/PredefinedConfig/StyledColumnState.d.ts +119 -0
- package/src/{Strategy/Interface/IConditionalStyleModule.js → PredefinedConfig/StyledColumnState.js} +0 -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/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/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 +1 -3
- package/src/Utilities/Defaults/DefaultSettingsPanel.js +1 -1
- package/src/Utilities/ExpressionFunctions/observableExpressionFunctions.d.ts +1 -4
- package/src/Utilities/ObjectFactory.d.ts +5 -2
- package/src/Utilities/ObjectFactory.js +14 -6
- package/src/Utilities/Services/ModuleService.js +2 -2
- package/src/Utilities/Services/QueryLanguageService.js +1 -1
- 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 -6
- package/src/View/FormatColumn/Wizard/FormatColumnStyleWizardSection.d.ts +3 -3
- package/src/View/FormatColumn/Wizard/FormatColumnStyleWizardSection.js +6 -300
- 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 +10 -11
- package/src/agGrid/Adaptable.js +161 -222
- 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 +113 -57
- 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 +5 -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 -86
- 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
|
@@ -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
|
+
}
|
|
@@ -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;
|
|
@@ -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,
|
|
@@ -65,7 +65,6 @@ exports.DefaultAdaptableOptions = {
|
|
|
65
65
|
systemAggregatedBooleanFunctions: undefined,
|
|
66
66
|
systemAggregatedScalarFunctions: undefined,
|
|
67
67
|
moduleExpressionFunctions: undefined,
|
|
68
|
-
queryableColumns: undefined,
|
|
69
68
|
performExpressionValidation: true,
|
|
70
69
|
maxTimeframeSize: 28800000, // 8 hours
|
|
71
70
|
},
|
|
@@ -120,7 +119,7 @@ exports.DefaultAdaptableOptions = {
|
|
|
120
119
|
exportFormatType: 'rawValue',
|
|
121
120
|
exportDateFormat: undefined,
|
|
122
121
|
customDestinations: undefined,
|
|
123
|
-
|
|
122
|
+
serverReports: undefined,
|
|
124
123
|
appendFileTimestamp: false,
|
|
125
124
|
systemExportDestinations: [
|
|
126
125
|
Enums_1.ExportDestination.Excel,
|
|
@@ -147,7 +146,6 @@ exports.DefaultAdaptableOptions = {
|
|
|
147
146
|
customSortComparers: undefined,
|
|
148
147
|
englishVariant: 'GB',
|
|
149
148
|
unbalancedGroupsKey: undefined,
|
|
150
|
-
keepDeprecatedConditionalStyles: false,
|
|
151
149
|
},
|
|
152
150
|
layoutOptions: {
|
|
153
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',
|
|
@@ -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
7
|
export declare const observableExpressionFunctionNames: ObservableFunctionName[];
|
|
10
|
-
export {};
|