@adaptabletools/adaptable 13.0.0-canary.2 → 13.0.0-canary.21
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/agGrid.d.ts +23 -1
- package/agGrid.js +23 -1
- package/base.css +1232 -733
- package/base.css.map +1 -0
- package/bundle.cjs.js +237 -220
- package/index.css +1250 -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 +136 -27
- 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/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 +76 -59
- package/src/Api/Implementation/AdaptableApiImpl.d.ts +2 -2
- package/src/Api/Implementation/AdaptableApiImpl.js +2 -3
- package/src/Api/Implementation/ColumnApiImpl.d.ts +2 -1
- package/src/Api/Implementation/ColumnApiImpl.js +18 -14
- 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 +36 -17
- package/src/Api/Implementation/FormatColumnApiImpl.js +101 -185
- package/src/Api/Implementation/InternalApiImpl.d.ts +1 -0
- package/src/Api/Implementation/InternalApiImpl.js +5 -0
- 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 -3
- package/src/Api/Implementation/QueryLanguageApiImpl.js +9 -18
- 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/Implementation/SystemStatusApiImpl.js +1 -2
- package/src/Api/Implementation/ToolPanelApiImpl.d.ts +3 -1
- package/src/Api/Implementation/ToolPanelApiImpl.js +8 -0
- package/src/Api/InternalApi.d.ts +1 -0
- package/src/Api/PluginsApi.d.ts +5 -0
- package/src/Api/QueryLanguageApi.d.ts +3 -7
- 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/Api/ToolPanelApi.d.ts +10 -1
- package/src/PredefinedConfig/AdaptableState.d.ts +2 -0
- package/src/PredefinedConfig/Common/AdaptableIcon.d.ts +1 -1
- package/src/PredefinedConfig/Common/AdaptablePredicate.d.ts +1 -1
- package/src/PredefinedConfig/Common/AdaptablePredicate.js +37 -37
- 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 +21 -92
- package/src/PredefinedConfig/PredefinedConfig.d.ts +6 -0
- package/src/PredefinedConfig/StyledColumnState.d.ts +119 -0
- package/src/PredefinedConfig/StyledColumnState.js +2 -0
- package/src/Redux/ActionsReducers/FormatColumnRedux.d.ts +14 -0
- package/src/Redux/ActionsReducers/FormatColumnRedux.js +43 -1
- 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 +11 -8
- package/src/Strategy/ConditionalStyleModule.d.ts +2 -25
- package/src/Strategy/ConditionalStyleModule.js +0 -213
- package/src/Strategy/DataChangeHistoryModule.d.ts +1 -0
- package/src/Strategy/DataChangeHistoryModule.js +12 -0
- package/src/Strategy/FormatColumnModule.d.ts +3 -10
- package/src/Strategy/FormatColumnModule.js +42 -183
- package/src/Strategy/Interface/IModule.d.ts +1 -0
- 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 -12
- package/src/Utilities/Defaults/DefaultSettingsPanel.js +1 -1
- package/src/Utilities/ExpressionFunctions/aggregatedBooleanExpressionFunctions.d.ts +3 -2
- package/src/Utilities/ExpressionFunctions/aggregatedBooleanExpressionFunctions.js +3 -1
- package/src/Utilities/ExpressionFunctions/aggregatedScalarExpressionFunctions.d.ts +1 -0
- package/src/Utilities/ExpressionFunctions/aggregatedScalarExpressionFunctions.js +3 -1
- package/src/Utilities/ExpressionFunctions/booleanExpressionFunctions.d.ts +1 -0
- package/src/Utilities/ExpressionFunctions/booleanExpressionFunctions.js +3 -1
- package/src/Utilities/ExpressionFunctions/observableExpressionFunctions.d.ts +2 -4
- package/src/Utilities/ExpressionFunctions/observableExpressionFunctions.js +3 -1
- package/src/Utilities/ExpressionFunctions/scalarExpressionFunctions.d.ts +1 -0
- package/src/Utilities/ExpressionFunctions/scalarExpressionFunctions.js +3 -1
- package/src/Utilities/Extensions/TypeExtensions.d.ts +1 -0
- package/src/Utilities/Extensions/TypeExtensions.js +5 -0
- package/src/Utilities/ObjectFactory.d.ts +5 -2
- package/src/Utilities/ObjectFactory.js +14 -7
- package/src/Utilities/Services/Interface/IQueryLanguageService.d.ts +14 -4
- package/src/Utilities/Services/{LicenseService.d.ts → LicenseService/index.d.ts} +3 -3
- package/src/Utilities/Services/LicenseService/index.js +1 -0
- package/src/Utilities/Services/LicenseService/shouldLogThankYouMessage.d.ts +1 -0
- package/src/Utilities/Services/LicenseService/shouldLogThankYouMessage.js +15 -0
- package/src/Utilities/Services/ModuleService.js +2 -2
- package/src/Utilities/Services/QueryLanguageService.d.ts +3 -3
- package/src/Utilities/Services/QueryLanguageService.js +89 -40
- package/src/Utilities/Services/ReportService.js +6 -6
- package/src/Utilities/license/LicenseDetails.d.ts +1 -1
- package/src/Utilities/license/decode.d.ts +1 -0
- package/src/Utilities/license/decode.js +1 -1
- package/src/View/AdaptablePopover/index.js +1 -1
- package/src/View/Alert/Wizard/AlertBehaviourWizardSection.js +11 -12
- 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.d.ts +2 -1
- package/src/View/Components/EntityRulesEditor/index.js +36 -35
- 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/AdaptablePopupModuleView.js +1 -0
- 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 +3 -9
- package/src/View/Components/ToolPanel/AdaptableToolPanel.js +25 -10
- 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/MoveFormatColumn.d.ts +7 -0
- package/src/View/FormatColumn/MoveFormatColumn.js +27 -0
- package/src/View/FormatColumn/Wizard/FormatColumnFormatWizardSection.js +28 -28
- package/src/View/FormatColumn/Wizard/FormatColumnRuleWizardSection.d.ts +8 -0
- package/src/View/FormatColumn/Wizard/FormatColumnRuleWizardSection.js +28 -0
- package/src/View/FormatColumn/Wizard/FormatColumnScopeWizardSection.js +21 -3
- 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 -300
- package/src/View/FormatColumn/Wizard/FormatColumnWizard.js +15 -9
- package/src/View/FormatColumn/Wizard/constants.d.ts +1 -0
- package/src/View/FormatColumn/Wizard/constants.js +4 -0
- 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 +3 -0
- package/src/agGrid/ActionColumnRenderer.js +96 -64
- package/src/agGrid/Adaptable.d.ts +13 -9
- package/src/agGrid/Adaptable.js +207 -221
- 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 +5 -1
- package/src/agGrid/editors/AdaptableDateEditor/index.js +87 -20
- package/src/agGrid/editors/AdaptableNumberEditor/InternalAdaptableNumberEditor.js +1 -1
- package/src/agGrid/editors/AdaptableNumberEditor/index.d.ts +3 -3
- package/src/agGrid/editors/AdaptableNumberEditor/index.js +81 -30
- 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.d.ts +1 -1
- package/src/components/ExpressionEditor/BaseEditorInput.js +13 -32
- package/src/components/ExpressionEditor/EditorInput.js +1 -1
- package/src/components/ExpressionEditor/EditorInputWithWhereClause.js +1 -1
- 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 +213 -121
- package/src/metamodel/adaptable.metamodel.js +1 -1
- package/src/parser/src/types.d.ts +6 -3
- package/src/renderReactRoot.d.ts +2 -0
- package/src/renderReactRoot.js +11 -9
- package/src/types.d.ts +8 -6
- 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 -108
- 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/Utilities/Services/LicenseService.js +0 -1
- 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,224 +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
7
|
class ConditionalStyleModule extends AdaptableModuleBase_1.AdaptableModuleBase {
|
|
17
8
|
constructor(api) {
|
|
18
9
|
super(ModuleConstants.ConditionalStyleModuleId, ModuleConstants.ConditionalStyleFriendlyName, 'conditional-style', 'ConditionalStylePopup', 'Style columns and rows dynamically based on rules and cell values', api);
|
|
19
10
|
}
|
|
20
|
-
getModuleAdaptableObjects(config) {
|
|
21
|
-
return this.api.conditionalStyleApi.getAllConditionalStyle(config);
|
|
22
|
-
}
|
|
23
|
-
getExplicitlyReferencedColumnIds(conditionalStyle) {
|
|
24
|
-
if (conditionalStyle.Rule.BooleanExpression) {
|
|
25
|
-
return this.api.queryLanguageApi.getColumnsFromExpression(conditionalStyle.Rule.BooleanExpression);
|
|
26
|
-
}
|
|
27
|
-
else if (this.api.scopeApi.scopeHasColumns(conditionalStyle.Scope)) {
|
|
28
|
-
return this.api.scopeApi
|
|
29
|
-
.getColumnsForScope(conditionalStyle.Scope)
|
|
30
|
-
.map((adaptableColumn) => adaptableColumn.columnId);
|
|
31
|
-
}
|
|
32
|
-
return [];
|
|
33
|
-
}
|
|
34
|
-
getReferencedNamedQueryNames(conditionalStyle) {
|
|
35
|
-
if (!conditionalStyle.Rule.BooleanExpression) {
|
|
36
|
-
return [];
|
|
37
|
-
}
|
|
38
|
-
return this.api.queryApi.getReferencedNamedQueryNames(conditionalStyle.Rule.BooleanExpression);
|
|
39
|
-
}
|
|
40
|
-
updateOldConfig() {
|
|
41
|
-
var _a;
|
|
42
|
-
const conditionalStyles = (_a = this.api.conditionalStyleApi.getConditionalStyleState().ConditionalStyles) !== null && _a !== void 0 ? _a : [];
|
|
43
|
-
let oldConditionalStyles = [];
|
|
44
|
-
conditionalStyles.forEach((cs) => {
|
|
45
|
-
if (cs) {
|
|
46
|
-
const scopedColumnIds = this.api.scopeApi.getColumnIdsInScope(cs.Scope);
|
|
47
|
-
if (ArrayExtensions_1.default.IsNotNullOrEmpty(scopedColumnIds)) {
|
|
48
|
-
scopedColumnIds.forEach((colId) => {
|
|
49
|
-
if (!this.api.columnApi.doesColumnExist(colId)) {
|
|
50
|
-
(0, LoggingHelper_1.LogAdaptableError)('Conditional Style contains missing column: ' + colId);
|
|
51
|
-
}
|
|
52
|
-
});
|
|
53
|
-
}
|
|
54
|
-
if (cs.ExcludeGroupedRows === false) {
|
|
55
|
-
cs.ExcludeGroupedRows = undefined;
|
|
56
|
-
cs.IncludeGroupedRows = true;
|
|
57
|
-
oldConditionalStyles.push(cs);
|
|
58
|
-
(0, LoggingHelper_1.LogAdaptableWarning)(`Updating incorrect Predefined Config for Conditional Style with "ExcludeGroupedRows" set}`);
|
|
59
|
-
}
|
|
60
|
-
if (cs.Predicate) {
|
|
61
|
-
cs.Rule = {
|
|
62
|
-
Predicate: cs.Predicate,
|
|
63
|
-
};
|
|
64
|
-
(0, LoggingHelper_1.LogAdaptableWarning)(`Updating incorrect Predefined Config for Conditional Style: ${cs.Predicate}`);
|
|
65
|
-
cs.Predicate = undefined;
|
|
66
|
-
oldConditionalStyles.push(cs);
|
|
67
|
-
}
|
|
68
|
-
if (cs.Expression) {
|
|
69
|
-
let rule = {
|
|
70
|
-
BooleanExpression: cs.Expression,
|
|
71
|
-
};
|
|
72
|
-
cs.Rule = rule;
|
|
73
|
-
(0, LoggingHelper_1.LogAdaptableWarning)(`Updating incorrect Predefined Config for Conditional Style: ${cs.Expression}`);
|
|
74
|
-
cs.Expression = undefined;
|
|
75
|
-
oldConditionalStyles.push(cs);
|
|
76
|
-
}
|
|
77
|
-
}
|
|
78
|
-
});
|
|
79
|
-
this.api.conditionalStyleApi.editConditionalStyles(oldConditionalStyles);
|
|
80
|
-
}
|
|
81
|
-
addColumnMenuItems(column) {
|
|
82
|
-
if (column && this.isModuleEditable() && !column.isSparkline) {
|
|
83
|
-
let conditionalStyles = this.api.conditionalStyleApi.getConditionalStylesForColumn(column);
|
|
84
|
-
let firstConditionalStyle = ArrayExtensions_1.default.IsNotNullOrEmpty(conditionalStyles)
|
|
85
|
-
? conditionalStyles.find((cs) => this.api.scopeApi.isColumnInScopeColumns(column, cs.Scope))
|
|
86
|
-
: undefined;
|
|
87
|
-
let conditionalStyleExists = firstConditionalStyle != undefined;
|
|
88
|
-
let label = conditionalStyleExists ? 'Edit ' : 'Create ';
|
|
89
|
-
let popupParam = {
|
|
90
|
-
column: column,
|
|
91
|
-
action: conditionalStyleExists ? 'Edit' : 'New',
|
|
92
|
-
source: 'ColumnMenu',
|
|
93
|
-
value: firstConditionalStyle,
|
|
94
|
-
};
|
|
95
|
-
return [
|
|
96
|
-
this.createColumnMenuItemShowPopup(label + this.moduleInfo.FriendlyName, this.moduleInfo.Popup, this.moduleInfo.Glyph, popupParam),
|
|
97
|
-
];
|
|
98
|
-
}
|
|
99
|
-
}
|
|
100
|
-
getTeamSharingAction() {
|
|
101
|
-
return {
|
|
102
|
-
ModuleEntities: this.api.conditionalStyleApi.getAllConditionalStyle(),
|
|
103
|
-
AddAction: ConditionalStyleRedux.ConditionalStyleAdd,
|
|
104
|
-
EditAction: ConditionalStyleRedux.ConditionalStyleEdit,
|
|
105
|
-
};
|
|
106
|
-
}
|
|
107
|
-
isConditionalStyleActiveForColumn(conditionalStyleForColumn, column, params) {
|
|
108
|
-
if (!conditionalStyleForColumn.Rule) {
|
|
109
|
-
return false;
|
|
110
|
-
}
|
|
111
|
-
if (conditionalStyleForColumn.IsSuspended) {
|
|
112
|
-
return false;
|
|
113
|
-
}
|
|
114
|
-
if (this.shouldRunStyle(conditionalStyleForColumn, params.node)) {
|
|
115
|
-
// first run the predicate
|
|
116
|
-
if (conditionalStyleForColumn.Rule.Predicate &&
|
|
117
|
-
conditionalStyleForColumn.Rule.Predicate.PredicateId) {
|
|
118
|
-
if (this.evaluatePredicate({
|
|
119
|
-
conditionalStyle: conditionalStyleForColumn,
|
|
120
|
-
column,
|
|
121
|
-
value: params.value,
|
|
122
|
-
node: params.node,
|
|
123
|
-
})) {
|
|
124
|
-
return true;
|
|
125
|
-
}
|
|
126
|
-
}
|
|
127
|
-
else if (conditionalStyleForColumn.Rule.BooleanExpression) {
|
|
128
|
-
if (this.evaluateExpression(conditionalStyleForColumn, params.node)) {
|
|
129
|
-
return true;
|
|
130
|
-
}
|
|
131
|
-
}
|
|
132
|
-
// nothing has passed then return false
|
|
133
|
-
return false;
|
|
134
|
-
}
|
|
135
|
-
}
|
|
136
|
-
isConditionalStyleActiveForRow(conditionalStyleForRow, params) {
|
|
137
|
-
if (!conditionalStyleForRow.Rule) {
|
|
138
|
-
return false;
|
|
139
|
-
}
|
|
140
|
-
if (conditionalStyleForRow.IsSuspended) {
|
|
141
|
-
return false;
|
|
142
|
-
}
|
|
143
|
-
if (this.shouldRunStyle(conditionalStyleForRow, params.node)) {
|
|
144
|
-
if (conditionalStyleForRow.Rule.Predicate &&
|
|
145
|
-
conditionalStyleForRow.Rule.Predicate.PredicateId) {
|
|
146
|
-
if (this.evaluatePredicate({
|
|
147
|
-
conditionalStyle: conditionalStyleForRow,
|
|
148
|
-
column: null,
|
|
149
|
-
value: params.value,
|
|
150
|
-
node: params.node,
|
|
151
|
-
})) {
|
|
152
|
-
return true;
|
|
153
|
-
}
|
|
154
|
-
}
|
|
155
|
-
else if (conditionalStyleForRow.Rule.BooleanExpression) {
|
|
156
|
-
if (this.evaluateExpression(conditionalStyleForRow, params.node)) {
|
|
157
|
-
return true;
|
|
158
|
-
}
|
|
159
|
-
}
|
|
160
|
-
// nothing has passed then return false
|
|
161
|
-
return false;
|
|
162
|
-
}
|
|
163
|
-
}
|
|
164
|
-
evaluatePredicate({ conditionalStyle, column, value, node, }) {
|
|
165
|
-
const params = {
|
|
166
|
-
value: value,
|
|
167
|
-
oldValue: null,
|
|
168
|
-
displayValue: column
|
|
169
|
-
? this.api.gridApi.getDisplayValueFromRowNode(node, column.columnId)
|
|
170
|
-
: value,
|
|
171
|
-
node: node,
|
|
172
|
-
column: column,
|
|
173
|
-
};
|
|
174
|
-
const result = this.api.predicateApi.handlePredicate(conditionalStyle.Rule.Predicate, params, false);
|
|
175
|
-
return result;
|
|
176
|
-
}
|
|
177
|
-
evaluateExpression(conditionalStyle, node) {
|
|
178
|
-
const isValidExpression = this.api.queryLanguageApi.isValidBooleanExpression(conditionalStyle.Rule.BooleanExpression, ModuleConstants_1.ConditionalStyleModuleId, `Invalid conditional style rule '${conditionalStyle.Rule.BooleanExpression}'`);
|
|
179
|
-
return (isValidExpression &&
|
|
180
|
-
this.api.internalApi
|
|
181
|
-
.getQueryLanguageService()
|
|
182
|
-
.evaluateBooleanExpression(conditionalStyle.Rule.BooleanExpression, ModuleConstants_1.ConditionalStyleModuleId, node));
|
|
183
|
-
}
|
|
184
|
-
shouldRunStyle(conditionalStyle, node) {
|
|
185
|
-
if (!conditionalStyle.IncludeGroupedRows && this.api.gridApi.isGroupRowNode(node)) {
|
|
186
|
-
return false;
|
|
187
|
-
}
|
|
188
|
-
return true;
|
|
189
|
-
}
|
|
190
|
-
toView(conditionalStyle) {
|
|
191
|
-
return {
|
|
192
|
-
items: [
|
|
193
|
-
(0, getScopeViewItems_1.getScopeViewItems)(conditionalStyle.Scope, this.api),
|
|
194
|
-
(0, getStyleViewItems_1.getStyleViewItems)(),
|
|
195
|
-
(0, getRuleViewItems_1.getRuleViewItems)(conditionalStyle.Rule, this.api),
|
|
196
|
-
{
|
|
197
|
-
name: 'Settings',
|
|
198
|
-
values: [`Include grouped rows: ${conditionalStyle.IncludeGroupedRows ? 'Yes' : 'No'}`],
|
|
199
|
-
},
|
|
200
|
-
(0, getObjectTagsViewItems_1.getObjectTagsViewItems)(conditionalStyle, this.api),
|
|
201
|
-
],
|
|
202
|
-
abObject: conditionalStyle,
|
|
203
|
-
};
|
|
204
|
-
}
|
|
205
|
-
toViewAll() {
|
|
206
|
-
return this.getModuleAdaptableObjects({
|
|
207
|
-
includeLayoutNotAssociatedObjects: this.showLayoutNotAssociatedObjects(),
|
|
208
|
-
}).map((conditionalStyle) => this.toView(conditionalStyle));
|
|
209
|
-
}
|
|
210
|
-
getViewProperties() {
|
|
211
|
-
return {
|
|
212
|
-
getDeleteAction: (conditionalStyle) => ConditionalStyleRedux.ConditionalStyleDelete(conditionalStyle),
|
|
213
|
-
getSuspendAction: (conditionalStyle) => ConditionalStyleRedux.ConditionalStyleSuspend(conditionalStyle),
|
|
214
|
-
getUnSuspendAction: (conditionalStyle) => ConditionalStyleRedux.ConditionalStyleUnSuspend(conditionalStyle),
|
|
215
|
-
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.",
|
|
216
|
-
getEditWizard() {
|
|
217
|
-
return ConditionalStyleWizard_1.ConditionalStyleWizard;
|
|
218
|
-
},
|
|
219
|
-
};
|
|
220
|
-
}
|
|
221
|
-
canBeAssociatedWithLayouts() {
|
|
222
|
-
return true;
|
|
223
|
-
}
|
|
224
11
|
}
|
|
225
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
|
}
|
|
@@ -2,12 +2,10 @@ import { AdaptableModuleBase } from './AdaptableModuleBase';
|
|
|
2
2
|
import { AdaptableColumn } from '../PredefinedConfig/Common/AdaptableColumn';
|
|
3
3
|
import { AdaptableMenuItem } from '../PredefinedConfig/Common/Menu';
|
|
4
4
|
import { TeamSharingImportInfo } from '../PredefinedConfig/TeamSharingState';
|
|
5
|
-
import * as FormatColumnRedux from '../Redux/ActionsReducers/FormatColumnRedux';
|
|
6
5
|
import { FormatColumn } from '../PredefinedConfig/FormatColumnState';
|
|
7
|
-
import { AdaptableObjectView, IModule } from './Interface/IModule';
|
|
6
|
+
import { AdaptableModuleView, AdaptableObjectView, IModule } from './Interface/IModule';
|
|
8
7
|
import { AdaptableApi } from '../Api/AdaptableApi';
|
|
9
8
|
import { AdaptableObject } from '../PredefinedConfig/Common/AdaptableObject';
|
|
10
|
-
import { FormatColumnWizard } from '../View/FormatColumn/Wizard/FormatColumnWizard';
|
|
11
9
|
export declare class FormatColumnModule extends AdaptableModuleBase implements IModule {
|
|
12
10
|
constructor(api: AdaptableApi);
|
|
13
11
|
getModuleAdaptableObjects(config?: {
|
|
@@ -16,16 +14,11 @@ export declare class FormatColumnModule extends AdaptableModuleBase implements I
|
|
|
16
14
|
getExplicitlyReferencedColumnIds(formatColumn: FormatColumn): string[];
|
|
17
15
|
hasNamedQueryReferences(): boolean;
|
|
18
16
|
updateOldConfig(): void;
|
|
19
|
-
private
|
|
17
|
+
private updateConditionalStylesColumnsOldConfig;
|
|
20
18
|
addColumnMenuItems(column: AdaptableColumn): AdaptableMenuItem[] | undefined;
|
|
21
19
|
getTeamSharingAction(): TeamSharingImportInfo<FormatColumn>;
|
|
22
20
|
toView(formatColumn: FormatColumn): AdaptableObjectView;
|
|
23
21
|
toViewAll(): AdaptableObjectView[];
|
|
24
|
-
getViewProperties():
|
|
25
|
-
getDeleteAction: (formatColumn: FormatColumn) => FormatColumnRedux.FormatColumnDeleteAction;
|
|
26
|
-
getSuspendAction: (formatColumn: FormatColumn) => FormatColumnRedux.FormatColumnSuspendAction;
|
|
27
|
-
getUnSuspendAction: (formatColumn: FormatColumn) => FormatColumnRedux.FormatColumnSuspendAction;
|
|
28
|
-
getEditWizard(): typeof FormatColumnWizard;
|
|
29
|
-
};
|
|
22
|
+
getViewProperties(): AdaptableModuleView;
|
|
30
23
|
canBeAssociatedWithLayouts(): boolean;
|
|
31
24
|
}
|
|
@@ -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");
|
|
@@ -13,30 +12,11 @@ const FormatColumnFormatWizardSection_1 = require("../View/FormatColumn/Wizard/F
|
|
|
13
12
|
const getFormatColumnSettingsViewItems_1 = require("./Utilities/FormatColumn/getFormatColumnSettingsViewItems");
|
|
14
13
|
const getFormatColumnStyleViewItems_1 = require("./Utilities/FormatColumn/getFormatColumnStyleViewItems");
|
|
15
14
|
const getObjectTagsViewItems_1 = require("./Utilities/getObjectTagsViewItems");
|
|
15
|
+
const getRuleViewItems_1 = require("./Utilities/getRuleViewItems");
|
|
16
|
+
const MoveFormatColumn_1 = require("../View/FormatColumn/MoveFormatColumn");
|
|
16
17
|
class FormatColumnModule extends AdaptableModuleBase_1.AdaptableModuleBase {
|
|
17
18
|
constructor(api) {
|
|
18
19
|
super(ModuleConstants.FormatColumnModuleId, ModuleConstants.FormatColumnFriendlyName, 'format-column', 'FormatColumnPopup', 'Create a column style, display format or cell alignment', api);
|
|
19
|
-
/**
|
|
20
|
-
* Use Case: Data (cell/row) has changed
|
|
21
|
-
* Action: Any CheckboxFormatColumns need to be updated, as their disabled state may have changed
|
|
22
|
-
*/
|
|
23
|
-
this.api.internalApi
|
|
24
|
-
.getDataService()
|
|
25
|
-
.on('CellDataChanged', (cellDataChangedInfo) => {
|
|
26
|
-
const activeCheckboxColumnIds = this.api.columnApi
|
|
27
|
-
.getColumns()
|
|
28
|
-
.filter((aColumn) => {
|
|
29
|
-
const checkboxFormatColumn = this.api.formatColumnApi.getCheckBoxStyleFormatColumn(aColumn);
|
|
30
|
-
return checkboxFormatColumn && !checkboxFormatColumn.IsSuspended;
|
|
31
|
-
})
|
|
32
|
-
.map((aColumn) => aColumn.columnId);
|
|
33
|
-
// no need to refresh the CheckboxColumns if the change was triggered by one of them
|
|
34
|
-
if (!activeCheckboxColumnIds.includes(cellDataChangedInfo.column.columnId)) {
|
|
35
|
-
this.api.internalApi
|
|
36
|
-
.getAdaptableInstance()
|
|
37
|
-
.refreshCells(null, activeCheckboxColumnIds, true, true);
|
|
38
|
-
}
|
|
39
|
-
});
|
|
40
20
|
}
|
|
41
21
|
getModuleAdaptableObjects(config) {
|
|
42
22
|
return this.api.formatColumnApi.getAllFormatColumn(config);
|
|
@@ -53,179 +33,56 @@ class FormatColumnModule extends AdaptableModuleBase_1.AdaptableModuleBase {
|
|
|
53
33
|
return false;
|
|
54
34
|
}
|
|
55
35
|
updateOldConfig() {
|
|
56
|
-
|
|
57
|
-
//
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
let existingFormatColumn = this.getExistingFormatColumn(columnId);
|
|
72
|
-
let gradientStyle = {
|
|
73
|
-
GradientStyle: {
|
|
74
|
-
CellRanges: [
|
|
75
|
-
{
|
|
76
|
-
Min: gradientColumn.BaseValue,
|
|
77
|
-
Max: gradientColumn.PositiveValue,
|
|
78
|
-
Color: gradientColumn.PositiveColor,
|
|
79
|
-
},
|
|
80
|
-
],
|
|
81
|
-
},
|
|
82
|
-
};
|
|
83
|
-
if (!existingFormatColumn) {
|
|
84
|
-
let formatColumn = {
|
|
85
|
-
Scope: {
|
|
86
|
-
ColumnIds: [gradientColumn.ColumnId],
|
|
87
|
-
},
|
|
88
|
-
ColumnStyle: gradientStyle,
|
|
89
|
-
};
|
|
90
|
-
newFormatColumns.push(formatColumn);
|
|
91
|
-
}
|
|
92
|
-
else {
|
|
93
|
-
existingFormatColumn.ColumnStyle = gradientStyle;
|
|
94
|
-
existingFormatColumns.push(existingFormatColumn);
|
|
95
|
-
}
|
|
96
|
-
});
|
|
97
|
-
}
|
|
98
|
-
// 2. Convert Percent Bars to Format Columns
|
|
99
|
-
let percentBarState = this.api.internalApi.getState().PercentBar;
|
|
100
|
-
if (percentBarState === null || percentBarState === void 0 ? void 0 : percentBarState.PercentBars) {
|
|
101
|
-
percentBarState === null || percentBarState === void 0 ? void 0 : percentBarState.PercentBars.forEach((percentBar) => {
|
|
102
|
-
const columnId = percentBar.ColumnId;
|
|
103
|
-
(0, LoggingHelper_1.LogAdaptableWarning)(`Merging Percent Bar Style into Format Column for Column: ${columnId}`);
|
|
104
|
-
let existingFormatColumn = this.getExistingFormatColumn(columnId);
|
|
105
|
-
const ranges = percentBar.Ranges;
|
|
106
|
-
const columnComparison = percentBar.ColumnComparison;
|
|
107
|
-
let cellText = [];
|
|
108
|
-
if (percentBar.ShowValue && percentBar.DisplayRawValue) {
|
|
109
|
-
cellText.push('CellValue');
|
|
110
|
-
}
|
|
111
|
-
if (percentBar.ShowValue && percentBar.DisplayPercentageValue) {
|
|
112
|
-
cellText.push('PercentageValue');
|
|
113
|
-
}
|
|
114
|
-
const tooltipText = [];
|
|
115
|
-
if (percentBar.ShowToolTip && percentBar.DisplayRawValue) {
|
|
116
|
-
tooltipText.push('CellValue');
|
|
117
|
-
}
|
|
118
|
-
if (percentBar.ShowToolTip && percentBar.DisplayPercentageValue) {
|
|
119
|
-
tooltipText.push('PercentageValue');
|
|
120
|
-
}
|
|
121
|
-
const percentBarStyle = {
|
|
122
|
-
PercentBarStyle: {
|
|
123
|
-
CellRanges: ranges,
|
|
124
|
-
ColumnComparison: columnComparison,
|
|
125
|
-
CellText: cellText,
|
|
126
|
-
ToolTipText: tooltipText,
|
|
127
|
-
BackColor: percentBar.BackColor,
|
|
128
|
-
},
|
|
129
|
-
};
|
|
130
|
-
if (!existingFormatColumn) {
|
|
131
|
-
const formatColumn = {
|
|
132
|
-
Scope: {
|
|
133
|
-
ColumnIds: [percentBar.ColumnId],
|
|
134
|
-
},
|
|
135
|
-
ColumnStyle: percentBarStyle,
|
|
136
|
-
};
|
|
137
|
-
newFormatColumns.push(formatColumn);
|
|
138
|
-
}
|
|
139
|
-
else {
|
|
140
|
-
existingFormatColumn.ColumnStyle = percentBarStyle;
|
|
141
|
-
existingFormatColumns.push(existingFormatColumn);
|
|
142
|
-
}
|
|
143
|
-
});
|
|
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);
|
|
144
51
|
}
|
|
145
|
-
// update
|
|
146
|
-
this.api.
|
|
147
|
-
if (
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
});
|
|
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)]);
|
|
151
57
|
}
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
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)]);
|
|
156
63
|
}
|
|
157
64
|
}
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
// special columns (Calculated, FreeText, Action) are not yet part of AG-GridS colDefs
|
|
164
|
-
// so we have to check if the given columnId is a special column
|
|
165
|
-
const isSpecialColumn = !!this.api.calculatedColumnApi.getCalculatedColumnForColumnId(columnId) ||
|
|
166
|
-
!!this.api.freeTextColumnApi.getFreeTextColumnById(columnId);
|
|
167
|
-
if (isSpecialColumn) {
|
|
168
|
-
return this.api.formatColumnApi
|
|
169
|
-
.getAllFormatColumn()
|
|
170
|
-
.find((formatColumn) => 'ColumnIds' in formatColumn.Scope &&
|
|
171
|
-
formatColumn.Scope.ColumnIds.length == 1 &&
|
|
172
|
-
formatColumn.Scope.ColumnIds.includes(columnId));
|
|
65
|
+
updateConditionalStylesColumnsOldConfig() {
|
|
66
|
+
var _a;
|
|
67
|
+
const oldConditionalStyles = (_a = this.api.internalApi.getState().ConditionalStyle) === null || _a === void 0 ? void 0 : _a.ConditionalStyles;
|
|
68
|
+
if (!(oldConditionalStyles === null || oldConditionalStyles === void 0 ? void 0 : oldConditionalStyles.length)) {
|
|
69
|
+
return;
|
|
173
70
|
}
|
|
71
|
+
(0, LoggingHelper_1.ConsoleLogWarning)(`DEPRECATED: Conditional Styles have been merged into 'Format Columns'`);
|
|
72
|
+
// remove conditional styles
|
|
73
|
+
this.api.internalApi.deleteConditionalStyles(oldConditionalStyles);
|
|
74
|
+
// add as format column
|
|
75
|
+
this.api.formatColumnApi.addFormatColumns(oldConditionalStyles);
|
|
174
76
|
}
|
|
175
77
|
addColumnMenuItems(column) {
|
|
176
|
-
var _a;
|
|
177
78
|
let returnColumnMenuItems = [];
|
|
178
79
|
if (column && this.isModuleEditable() && !column.isSparkline) {
|
|
179
|
-
// not fullproof as might be an All but its generally pretty good
|
|
180
|
-
let formatColumn = this.api.formatColumnApi.getFormatColumnForColumn(column);
|
|
181
|
-
let formatExists = formatColumn
|
|
182
|
-
? this.api.scopeApi.isColumnInScopeColumns(column, formatColumn.Scope)
|
|
183
|
-
: false;
|
|
184
|
-
if (formatColumn && formatColumn.IsReadOnly && formatColumn.IsReadOnly == true) {
|
|
185
|
-
formatExists = false;
|
|
186
|
-
}
|
|
187
|
-
let label = formatExists ? 'Edit ' : 'Create ';
|
|
188
80
|
let popupParam = {
|
|
189
81
|
column: column,
|
|
190
|
-
action:
|
|
82
|
+
action: 'New',
|
|
191
83
|
source: 'ColumnMenu',
|
|
192
|
-
value: formatColumn,
|
|
193
84
|
};
|
|
194
|
-
returnColumnMenuItems.push(this.createColumnMenuItemShowPopup(
|
|
195
|
-
if (column.dataType == 'Boolean' && !this.api.columnApi.isFreeTextColumn(column.columnId)) {
|
|
196
|
-
let formatColumn = this.api.formatColumnApi.getFormatColumnForColumnId(column.columnId);
|
|
197
|
-
let hasCheckBox = formatColumn && ((_a = formatColumn.ColumnStyle) === null || _a === void 0 ? void 0 : _a.CheckBoxStyle);
|
|
198
|
-
if (hasCheckBox) {
|
|
199
|
-
returnColumnMenuItems.push(this.createColumnMenuItemClickFunction('Remove Checkbox', 'unchecked', () => {
|
|
200
|
-
this.api.formatColumnApi.deleteFormatColumn(formatColumn);
|
|
201
|
-
}));
|
|
202
|
-
}
|
|
203
|
-
else {
|
|
204
|
-
// const test = this.api.formatColumnApi.getCheckBoxStyleFormatColumn(column);
|
|
205
|
-
if (formatColumn) {
|
|
206
|
-
returnColumnMenuItems.push(this.createColumnMenuItemClickFunction('Show as Checkbox', 'checked', () => {
|
|
207
|
-
formatColumn.ColumnStyle = {
|
|
208
|
-
CheckBoxStyle: true,
|
|
209
|
-
};
|
|
210
|
-
formatColumn.Style = undefined;
|
|
211
|
-
this.api.formatColumnApi.editFormatColumn(formatColumn);
|
|
212
|
-
}));
|
|
213
|
-
}
|
|
214
|
-
else {
|
|
215
|
-
returnColumnMenuItems.push(this.createColumnMenuItemClickFunction('Show as Checkbox', 'checked', () => {
|
|
216
|
-
let newFormatColumn = {
|
|
217
|
-
Scope: {
|
|
218
|
-
ColumnIds: [column.columnId],
|
|
219
|
-
},
|
|
220
|
-
ColumnStyle: {
|
|
221
|
-
CheckBoxStyle: true,
|
|
222
|
-
},
|
|
223
|
-
};
|
|
224
|
-
this.api.formatColumnApi.addFormatColumn(newFormatColumn);
|
|
225
|
-
}));
|
|
226
|
-
}
|
|
227
|
-
}
|
|
228
|
-
}
|
|
85
|
+
returnColumnMenuItems.push(this.createColumnMenuItemShowPopup('Create Format Column', this.moduleInfo.Popup, this.moduleInfo.Glyph, popupParam));
|
|
229
86
|
}
|
|
230
87
|
return returnColumnMenuItems;
|
|
231
88
|
}
|
|
@@ -241,6 +98,7 @@ class FormatColumnModule extends AdaptableModuleBase_1.AdaptableModuleBase {
|
|
|
241
98
|
abObject: formatColumn,
|
|
242
99
|
items: [
|
|
243
100
|
(0, getScopeViewItems_1.getScopeViewItems)(formatColumn.Scope, this.api),
|
|
101
|
+
formatColumn.Rule && (0, getRuleViewItems_1.getRuleViewItems)(formatColumn.Rule, this.api),
|
|
244
102
|
{
|
|
245
103
|
name: 'Style',
|
|
246
104
|
view: () => (0, getFormatColumnStyleViewItems_1.getFormatColumnStyleViewItems)(formatColumn, this.api),
|
|
@@ -251,7 +109,7 @@ class FormatColumnModule extends AdaptableModuleBase_1.AdaptableModuleBase {
|
|
|
251
109
|
},
|
|
252
110
|
(0, getFormatColumnSettingsViewItems_1.getFormatColumnSettingsViewItems)(formatColumn),
|
|
253
111
|
(0, getObjectTagsViewItems_1.getObjectTagsViewItems)(formatColumn, this.api),
|
|
254
|
-
],
|
|
112
|
+
].filter(Boolean),
|
|
255
113
|
};
|
|
256
114
|
}
|
|
257
115
|
toViewAll() {
|
|
@@ -261,6 +119,7 @@ class FormatColumnModule extends AdaptableModuleBase_1.AdaptableModuleBase {
|
|
|
261
119
|
}
|
|
262
120
|
getViewProperties() {
|
|
263
121
|
return {
|
|
122
|
+
actions: [MoveFormatColumn_1.MoveFormatColumn],
|
|
264
123
|
getDeleteAction: FormatColumnRedux.FormatColumnDelete,
|
|
265
124
|
getSuspendAction: FormatColumnRedux.FormatColumnSuspend,
|
|
266
125
|
getUnSuspendAction: FormatColumnRedux.FormatColumnUnSuspend,
|
|
@@ -88,6 +88,7 @@ export interface AdaptableModuleView {
|
|
|
88
88
|
*/
|
|
89
89
|
actions?: AdaptableModuleViewAction[];
|
|
90
90
|
onMount?: () => void;
|
|
91
|
+
HeaderComponent?: React.FunctionComponent;
|
|
91
92
|
onOpenEditPopup?: (abObject?: AdaptableObject) => void;
|
|
92
93
|
getDeleteAction?: (abObject: AdaptableObject) => Redux.Action;
|
|
93
94
|
getCompactDeleteAction?: (abObject: AdaptableObject) => Redux.Action;
|
|
@@ -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
|
+
}
|