@adaptabletools/adaptable 13.0.0-canary.1 → 13.0.0-canary.11
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 +1 -0
- package/bundle.cjs.js +169 -169
- package/index.css +1 -0
- package/package.json +3 -3
- package/publishTimestamp.d.ts +1 -1
- package/publishTimestamp.js +1 -1
- package/src/AdaptableInterfaces/IAdaptable.d.ts +8 -3
- package/src/AdaptableOptions/AdaptableOptions.d.ts +0 -2
- package/src/AdaptableOptions/AdaptableQLOptions.d.ts +118 -26
- package/src/AdaptableOptions/FinsemblePluginOptions.d.ts +32 -0
- package/src/AdaptableOptions/FinsemblePluginOptions.js +2 -0
- package/src/AdaptableOptions/GeneralOptions.d.ts +5 -0
- package/src/Api/ConditionalStyleApi.d.ts +20 -42
- package/src/Api/ConfigApi.d.ts +1 -2
- package/src/Api/FinsembleApi.d.ts +10 -0
- package/src/Api/FinsembleApi.js +2 -0
- package/src/Api/FormatColumnApi.d.ts +47 -3
- package/src/Api/Implementation/ColumnApiImpl.js +5 -7
- package/src/Api/Implementation/DashboardApiImpl.js +2 -3
- package/src/Api/Implementation/FormatColumnApiImpl.d.ts +18 -1
- package/src/Api/Implementation/FormatColumnApiImpl.js +98 -15
- package/src/Api/Implementation/InternalApiImpl.d.ts +1 -0
- package/src/Api/Implementation/InternalApiImpl.js +4 -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/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/ToolPanelApi.d.ts +10 -1
- package/src/PredefinedConfig/Common/AdaptablePredicate.d.ts +1 -1
- package/src/PredefinedConfig/Common/AdaptablePredicate.js +37 -37
- package/src/PredefinedConfig/ConditionalStyleState.d.ts +10 -19
- package/src/PredefinedConfig/FormatColumnState.d.ts +19 -6
- package/src/PredefinedConfig/PredefinedConfig.d.ts +1 -0
- package/src/Redux/ActionsReducers/FormatColumnRedux.d.ts +14 -0
- package/src/Redux/ActionsReducers/FormatColumnRedux.js +43 -1
- package/src/Redux/Store/AdaptableStore.js +2 -0
- package/src/Strategy/ConditionalStyleModule.d.ts +2 -0
- package/src/Strategy/ConditionalStyleModule.js +6 -0
- package/src/Strategy/DataChangeHistoryModule.d.ts +1 -0
- package/src/Strategy/DataChangeHistoryModule.js +12 -0
- package/src/Strategy/FormatColumnModule.d.ts +4 -9
- package/src/Strategy/FormatColumnModule.js +52 -2
- package/src/Strategy/Interface/IModule.d.ts +11 -10
- package/src/Strategy/Utilities/Alert/getAlertBehaviourViewItems.d.ts +2 -2
- package/src/Strategy/Utilities/FormatColumn/getFormatColumnSettingsViewItems.d.ts +1 -1
- package/src/Strategy/Utilities/FormatColumn/getFormatColumnSettingsViewItems.js +3 -4
- package/src/Utilities/Defaults/DefaultAdaptableOptions.js +6 -11
- 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 +1 -0
- 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.js +0 -1
- 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/QueryLanguageService.d.ts +3 -3
- package/src/Utilities/Services/QueryLanguageService.js +88 -39
- 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.d.ts +2 -2
- package/src/View/AdaptableView.d.ts +3 -3
- package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/Components/FormBox.d.ts +1 -1
- package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/FinanceForm/FinanceForm.d.ts +1 -1
- package/src/View/AdaptableWizardView/index.d.ts +1 -1
- package/src/View/Alert/Wizard/BaseAlertRulesWizardSection.js +3 -3
- package/src/View/Alert/Wizard/BaseAlertScopeWizardSection.js +3 -3
- package/src/View/ColorPicker.d.ts +1 -5
- package/src/View/Components/AdaptableDateInput/index.d.ts +1 -1
- package/src/View/Components/Buttons/ButtonEdit.d.ts +1 -1
- package/src/View/Components/EntityRulesEditor/index.d.ts +2 -1
- package/src/View/Components/EntityRulesEditor/index.js +29 -19
- package/src/View/Components/NewScopeComponent.js +2 -2
- package/src/View/Components/Popups/AdaptablePopup/AdaptablePopupBody.d.ts +1 -1
- package/src/View/Components/Popups/AdaptablePopup/AdaptablePopupDialog.d.ts +2 -2
- package/src/View/Components/Popups/AdaptablePopup/AdaptablePopupModuleView.d.ts +1 -1
- package/src/View/Components/Popups/AdaptablePopup/AdaptablePopupModuleView.js +1 -0
- package/src/View/Components/Popups/AdaptablePopup/Navigation.d.ts +1 -1
- package/src/View/Components/Popups/AdaptablePopup/PopupPanel.d.ts +1 -1
- package/src/View/Components/Popups/AdaptablePopup/TopBar.d.ts +1 -1
- package/src/View/Components/Popups/AdaptablePopupPrompt.d.ts +1 -1
- package/src/View/Components/RangesComponent.d.ts +6 -0
- package/src/View/Components/RangesComponent.js +54 -18
- package/src/View/Components/ScopeComponent.js +2 -2
- package/src/View/Components/ToolPanel/AdaptableToolPanel.d.ts +4 -0
- package/src/View/Components/ToolPanel/AdaptableToolPanel.js +5 -2
- package/src/View/ConditionalStyle/ConditionalStylePopupHeader.d.ts +2 -0
- package/src/View/ConditionalStyle/ConditionalStylePopupHeader.js +18 -0
- package/src/View/ConditionalStyle/Wizard/ConditionalStyleRuleWizardSection.js +3 -3
- package/src/View/FlashingCell/Wizard/FlashingCellRulesWizardSection.js +3 -3
- package/src/View/FormatColumn/MoveFormatColumn.d.ts +7 -0
- package/src/View/FormatColumn/MoveFormatColumn.js +27 -0
- package/src/View/FormatColumn/Wizard/FormatColumnFormatWizardSection.js +2 -2
- package/src/View/FormatColumn/Wizard/FormatColumnRuleWizardSection.d.ts +8 -0
- package/src/View/FormatColumn/Wizard/FormatColumnRuleWizardSection.js +29 -0
- package/src/View/FormatColumn/Wizard/FormatColumnScopeWizardSection.js +21 -3
- package/src/View/FormatColumn/Wizard/FormatColumnSettingsWizardSection.js +0 -22
- package/src/View/FormatColumn/Wizard/FormatColumnStyleWizardSection.js +18 -4
- package/src/View/FormatColumn/Wizard/FormatColumnWizard.js +15 -2
- package/src/View/FormatColumn/Wizard/constants.d.ts +1 -0
- package/src/View/FormatColumn/Wizard/constants.js +4 -0
- package/src/View/Layout/Wizard/sections/AggregationsSection.js +1 -1
- package/src/View/Layout/Wizard/sections/SettingsSection.d.ts +2 -2
- package/src/View/License/LicenseWatermark.d.ts +1 -1
- package/src/View/PlusMinus/Wizard/PlusMinusRuleWizardSection.js +1 -1
- package/src/View/StateManagement/components/ClearButton.d.ts +1 -1
- package/src/View/StateManagement/components/LoadButton.d.ts +1 -1
- package/src/View/StatusBar/StatusBarPanel.d.ts +4 -4
- package/src/View/Wizard/OnePageAdaptableWizard.d.ts +3 -3
- package/src/View/Wizard/OnePageAdaptableWizard.js +2 -2
- package/src/View/Wizard/OnePageWizards.d.ts +3 -3
- package/src/View/Wizard/OnePageWizards.js +2 -2
- package/src/agGrid/ActionColumnRenderer.d.ts +1 -0
- package/src/agGrid/ActionColumnRenderer.js +5 -5
- package/src/agGrid/Adaptable.d.ts +16 -2
- package/src/agGrid/Adaptable.js +167 -85
- package/src/agGrid/FilterWrapper.js +5 -5
- package/src/agGrid/FloatingFilterWrapper.js +3 -4
- package/src/agGrid/agGridHelper.js +12 -13
- package/src/agGrid/createAgStatusPanelComponent.d.ts +1 -0
- package/src/agGrid/createAgStatusPanelComponent.js +3 -3
- package/src/agGrid/editors/AdaptableDateEditor/index.d.ts +1 -0
- package/src/agGrid/editors/AdaptableDateEditor/index.js +3 -3
- package/src/agGrid/editors/AdaptableNumberEditor/index.d.ts +1 -0
- package/src/agGrid/editors/AdaptableNumberEditor/index.js +3 -3
- package/src/components/CheckBox/index.d.ts +1 -1
- package/src/components/Datepicker/index.d.ts +1 -1
- package/src/components/Dialog/index.d.ts +4 -2
- package/src/components/Dialog/index.js +2 -2
- package/src/components/DropdownButton/index.d.ts +21 -4
- package/src/components/DropdownButton/index.js +5 -6
- package/src/components/ExpressionEditor/BaseEditorInput.d.ts +1 -1
- package/src/components/ExpressionEditor/EditorInput.js +1 -1
- package/src/components/ExpressionEditor/EditorInputWithWhereClause.js +1 -1
- package/src/components/Input/index.d.ts +1 -1
- package/src/components/List/ListGroupItem/index.d.ts +4 -2
- package/src/components/Loader/Loader.d.ts +2 -2
- package/src/components/Logo/index.d.ts +1 -1
- package/src/components/Modal/index.d.ts +1 -1
- package/src/components/PopupWithFooter.d.ts +2 -2
- package/src/components/ProgressIndicator/ProgressIndicator.d.ts +1 -1
- package/src/components/SelectList.d.ts +1 -1
- package/src/components/SimpleButton/index.d.ts +4 -5
- package/src/components/SimpleButton/index.js +3 -2
- package/src/components/StylePreview.d.ts +1 -1
- package/src/components/Tag/Tag.d.ts +1 -1
- package/src/components/Textarea/index.d.ts +6 -4
- package/src/components/ToggleButton/index.d.ts +1 -1
- package/src/components/WindowModal/WindowModal.d.ts +1 -1
- package/src/components/icons/index.d.ts +3 -2
- package/src/components/icons/layout.d.ts +2 -1
- package/src/components/utils/useContainerScrollObserver/index.d.ts +1 -1
- package/src/metamodel/adaptable.metamodel.d.ts +112 -64
- package/src/metamodel/adaptable.metamodel.js +1 -1
- package/src/parser/src/types.d.ts +6 -3
- package/src/renderReactRoot.d.ts +3 -0
- package/src/renderReactRoot.js +54 -0
- package/src/types.d.ts +4 -2
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/src/Utilities/Services/LicenseService.js +0 -1
|
@@ -27,7 +27,7 @@ exports.SystemPredicateDefs = [
|
|
|
27
27
|
label: 'Values',
|
|
28
28
|
icon: { text: 'IN' },
|
|
29
29
|
columnScope: { DataTypes: ['String', 'Number', 'Date'] },
|
|
30
|
-
moduleScope: ['filter', 'conditionalstyle', 'alert'],
|
|
30
|
+
moduleScope: ['filter', 'conditionalstyle', 'formatColumn', 'alert'],
|
|
31
31
|
handler: ({ inputs, column, value }) => {
|
|
32
32
|
if (inputs.length === 0) {
|
|
33
33
|
return true;
|
|
@@ -53,7 +53,7 @@ exports.SystemPredicateDefs = [
|
|
|
53
53
|
label: 'Exclude Values',
|
|
54
54
|
icon: { text: '!IN' },
|
|
55
55
|
columnScope: { DataTypes: ['String', 'Number', 'Date'] },
|
|
56
|
-
moduleScope: ['filter', 'conditionalstyle', 'alert'],
|
|
56
|
+
moduleScope: ['filter', 'conditionalstyle', 'formatColumn', 'alert'],
|
|
57
57
|
handler: ({ inputs, column, value }) => {
|
|
58
58
|
// basically negation of IN
|
|
59
59
|
if (inputs.length === 0) {
|
|
@@ -79,7 +79,7 @@ exports.SystemPredicateDefs = [
|
|
|
79
79
|
label: 'Blanks',
|
|
80
80
|
icon: { name: 'blanks' },
|
|
81
81
|
columnScope: { All: true },
|
|
82
|
-
moduleScope: ['filter', 'alert', 'flashingcell', 'conditionalstyle'],
|
|
82
|
+
moduleScope: ['filter', 'alert', 'flashingcell', 'conditionalstyle', 'formatColumn'],
|
|
83
83
|
handler: ({ value }) => Helper_1.default.IsInputNullOrEmpty(value),
|
|
84
84
|
},
|
|
85
85
|
{
|
|
@@ -87,7 +87,7 @@ exports.SystemPredicateDefs = [
|
|
|
87
87
|
label: 'Non Blanks',
|
|
88
88
|
icon: { name: 'non-blanks' },
|
|
89
89
|
columnScope: { All: true },
|
|
90
|
-
moduleScope: ['filter', 'alert', 'flashingcell', 'conditionalstyle'],
|
|
90
|
+
moduleScope: ['filter', 'alert', 'flashingcell', 'conditionalstyle', 'formatColumn'],
|
|
91
91
|
handler: ({ value }) => Helper_1.default.IsInputNotNullOrEmpty(value),
|
|
92
92
|
},
|
|
93
93
|
// Numeric System Filters
|
|
@@ -96,7 +96,7 @@ exports.SystemPredicateDefs = [
|
|
|
96
96
|
label: 'Greater Than',
|
|
97
97
|
icon: { name: 'greater-than' },
|
|
98
98
|
columnScope: { DataTypes: ['Number'] },
|
|
99
|
-
moduleScope: ['filter', 'alert', 'flashingcell', 'conditionalstyle'],
|
|
99
|
+
moduleScope: ['filter', 'alert', 'flashingcell', 'conditionalstyle', 'formatColumn'],
|
|
100
100
|
inputs: [{ type: 'number' }],
|
|
101
101
|
handler: ({ value, inputs }) => Number(value) > Number(inputs[0]),
|
|
102
102
|
toString: ({ inputs }) => `> ${inputs[0]}`,
|
|
@@ -107,7 +107,7 @@ exports.SystemPredicateDefs = [
|
|
|
107
107
|
label: 'Less Than',
|
|
108
108
|
icon: { name: 'less-than' },
|
|
109
109
|
columnScope: { DataTypes: ['Number'] },
|
|
110
|
-
moduleScope: ['filter', 'alert', 'flashingcell', 'conditionalstyle'],
|
|
110
|
+
moduleScope: ['filter', 'alert', 'flashingcell', 'conditionalstyle', 'formatColumn'],
|
|
111
111
|
inputs: [{ type: 'number' }],
|
|
112
112
|
handler: ({ value, inputs }) => Number(value) < Number(inputs[0]),
|
|
113
113
|
toString: ({ inputs }) => `< ${inputs[0]}`,
|
|
@@ -118,7 +118,7 @@ exports.SystemPredicateDefs = [
|
|
|
118
118
|
label: 'Positive',
|
|
119
119
|
icon: { text: '>0' },
|
|
120
120
|
columnScope: { DataTypes: ['Number'] },
|
|
121
|
-
moduleScope: ['filter', 'alert', 'flashingcell', 'conditionalstyle'],
|
|
121
|
+
moduleScope: ['filter', 'alert', 'flashingcell', 'conditionalstyle', 'formatColumn'],
|
|
122
122
|
handler: ({ value }) => Number(value) > 0,
|
|
123
123
|
},
|
|
124
124
|
{
|
|
@@ -126,7 +126,7 @@ exports.SystemPredicateDefs = [
|
|
|
126
126
|
label: 'Negative',
|
|
127
127
|
icon: { text: '<0' },
|
|
128
128
|
columnScope: { DataTypes: ['Number'] },
|
|
129
|
-
moduleScope: ['filter', 'alert', 'flashingcell', 'conditionalstyle'],
|
|
129
|
+
moduleScope: ['filter', 'alert', 'flashingcell', 'conditionalstyle', 'formatColumn'],
|
|
130
130
|
handler: ({ value }) => Number(value) < 0,
|
|
131
131
|
},
|
|
132
132
|
{
|
|
@@ -134,7 +134,7 @@ exports.SystemPredicateDefs = [
|
|
|
134
134
|
label: 'Zero',
|
|
135
135
|
icon: { text: '=0' },
|
|
136
136
|
columnScope: { DataTypes: ['Number'] },
|
|
137
|
-
moduleScope: ['filter', 'alert', 'flashingcell', 'conditionalstyle'],
|
|
137
|
+
moduleScope: ['filter', 'alert', 'flashingcell', 'conditionalstyle', 'formatColumn'],
|
|
138
138
|
handler: ({ value }) => {
|
|
139
139
|
if (typeof value === 'string' && !StringExtensions_1.default.IsNumeric(value)) {
|
|
140
140
|
return false;
|
|
@@ -147,7 +147,7 @@ exports.SystemPredicateDefs = [
|
|
|
147
147
|
label: 'Equals',
|
|
148
148
|
icon: { name: 'equal' },
|
|
149
149
|
columnScope: { DataTypes: ['Number'] },
|
|
150
|
-
moduleScope: ['filter', 'alert', 'flashingcell', 'conditionalstyle'],
|
|
150
|
+
moduleScope: ['filter', 'alert', 'flashingcell', 'conditionalstyle', 'formatColumn'],
|
|
151
151
|
inputs: [{ type: 'number' }],
|
|
152
152
|
handler: ({ value, inputs }) => {
|
|
153
153
|
const input = inputs[0];
|
|
@@ -165,7 +165,7 @@ exports.SystemPredicateDefs = [
|
|
|
165
165
|
label: 'Not Equals',
|
|
166
166
|
icon: { name: 'not-equal' },
|
|
167
167
|
columnScope: { DataTypes: ['Number'] },
|
|
168
|
-
moduleScope: ['filter', 'alert', 'flashingcell', 'conditionalstyle'],
|
|
168
|
+
moduleScope: ['filter', 'alert', 'flashingcell', 'conditionalstyle', 'formatColumn'],
|
|
169
169
|
inputs: [{ type: 'number' }],
|
|
170
170
|
handler: ({ value, inputs }) => {
|
|
171
171
|
const input = inputs[0];
|
|
@@ -183,7 +183,7 @@ exports.SystemPredicateDefs = [
|
|
|
183
183
|
label: 'Between',
|
|
184
184
|
icon: { text: 'BE' },
|
|
185
185
|
columnScope: { DataTypes: ['Number'] },
|
|
186
|
-
moduleScope: ['filter', 'alert', 'flashingcell', 'conditionalstyle'],
|
|
186
|
+
moduleScope: ['filter', 'alert', 'flashingcell', 'conditionalstyle', 'formatColumn'],
|
|
187
187
|
inputs: [{ type: 'number' }, { type: 'number' }],
|
|
188
188
|
handler: ({ value, inputs }) => Number(value) >= Number(inputs[0]) && Number(value) <= Number(inputs[1]),
|
|
189
189
|
toString: ({ inputs }) => `Between ${inputs[0]}:${inputs[1]}`,
|
|
@@ -194,7 +194,7 @@ exports.SystemPredicateDefs = [
|
|
|
194
194
|
label: 'Not Between',
|
|
195
195
|
icon: { text: '!BE' },
|
|
196
196
|
columnScope: { DataTypes: ['Number'] },
|
|
197
|
-
moduleScope: ['filter', 'alert', 'flashingcell', 'conditionalstyle'],
|
|
197
|
+
moduleScope: ['filter', 'alert', 'flashingcell', 'conditionalstyle', 'formatColumn'],
|
|
198
198
|
inputs: [{ type: 'number' }, { type: 'number' }],
|
|
199
199
|
handler: ({ value, inputs }) => Number(value) < Number(inputs[0]) || Number(value) > Number(inputs[1]),
|
|
200
200
|
toString: ({ inputs }) => `Not Between ${inputs[0]}:${inputs[1]}`,
|
|
@@ -222,7 +222,7 @@ exports.SystemPredicateDefs = [
|
|
|
222
222
|
label: 'Equals',
|
|
223
223
|
icon: { name: 'equal' },
|
|
224
224
|
columnScope: { DataTypes: ['String'] },
|
|
225
|
-
moduleScope: ['filter', 'alert', 'flashingcell', 'conditionalstyle'],
|
|
225
|
+
moduleScope: ['filter', 'alert', 'flashingcell', 'conditionalstyle', 'formatColumn'],
|
|
226
226
|
inputs: [{ type: 'text' }],
|
|
227
227
|
handler: ({ value, inputs, api }) => {
|
|
228
228
|
if (!value) {
|
|
@@ -241,7 +241,7 @@ exports.SystemPredicateDefs = [
|
|
|
241
241
|
label: 'Not Equals',
|
|
242
242
|
icon: { name: 'not-equal' },
|
|
243
243
|
columnScope: { DataTypes: ['String'] },
|
|
244
|
-
moduleScope: ['filter', 'alert', 'flashingcell', 'conditionalstyle'],
|
|
244
|
+
moduleScope: ['filter', 'alert', 'flashingcell', 'conditionalstyle', 'formatColumn'],
|
|
245
245
|
inputs: [{ type: 'text' }],
|
|
246
246
|
handler: ({ value, inputs, api }) => {
|
|
247
247
|
if (!value) {
|
|
@@ -260,7 +260,7 @@ exports.SystemPredicateDefs = [
|
|
|
260
260
|
label: 'Contains',
|
|
261
261
|
icon: { name: 'contains' },
|
|
262
262
|
columnScope: { DataTypes: ['String'] },
|
|
263
|
-
moduleScope: ['filter', 'alert', 'flashingcell', 'conditionalstyle'],
|
|
263
|
+
moduleScope: ['filter', 'alert', 'flashingcell', 'conditionalstyle', 'formatColumn'],
|
|
264
264
|
inputs: [{ type: 'text' }],
|
|
265
265
|
handler: ({ value, inputs, api }) => {
|
|
266
266
|
if (!value) {
|
|
@@ -278,7 +278,7 @@ exports.SystemPredicateDefs = [
|
|
|
278
278
|
label: 'Not Contains',
|
|
279
279
|
icon: { name: 'not-contains' },
|
|
280
280
|
columnScope: { DataTypes: ['String'] },
|
|
281
|
-
moduleScope: ['filter', 'alert', 'flashingcell', 'conditionalstyle'],
|
|
281
|
+
moduleScope: ['filter', 'alert', 'flashingcell', 'conditionalstyle', 'formatColumn'],
|
|
282
282
|
inputs: [{ type: 'text' }],
|
|
283
283
|
handler: ({ value, inputs, api }) => {
|
|
284
284
|
if (!value) {
|
|
@@ -296,7 +296,7 @@ exports.SystemPredicateDefs = [
|
|
|
296
296
|
label: 'Starts With',
|
|
297
297
|
icon: { name: 'starts-with' },
|
|
298
298
|
columnScope: { DataTypes: ['String'] },
|
|
299
|
-
moduleScope: ['filter', 'alert', 'flashingcell', 'conditionalstyle'],
|
|
299
|
+
moduleScope: ['filter', 'alert', 'flashingcell', 'conditionalstyle', 'formatColumn'],
|
|
300
300
|
inputs: [{ type: 'text' }],
|
|
301
301
|
handler: ({ value, inputs, api }) => {
|
|
302
302
|
if (!value) {
|
|
@@ -314,7 +314,7 @@ exports.SystemPredicateDefs = [
|
|
|
314
314
|
label: 'Ends With',
|
|
315
315
|
icon: { name: 'ends-with' },
|
|
316
316
|
columnScope: { DataTypes: ['String'] },
|
|
317
|
-
moduleScope: ['filter', 'alert', 'flashingcell', 'conditionalstyle'],
|
|
317
|
+
moduleScope: ['filter', 'alert', 'flashingcell', 'conditionalstyle', 'formatColumn'],
|
|
318
318
|
inputs: [{ type: 'text' }],
|
|
319
319
|
handler: ({ value, inputs, api }) => {
|
|
320
320
|
if (!value) {
|
|
@@ -332,7 +332,7 @@ exports.SystemPredicateDefs = [
|
|
|
332
332
|
label: 'Regex',
|
|
333
333
|
icon: { name: 'regex' },
|
|
334
334
|
columnScope: { DataTypes: ['String'] },
|
|
335
|
-
moduleScope: ['filter', 'alert', 'flashingcell', 'conditionalstyle'],
|
|
335
|
+
moduleScope: ['filter', 'alert', 'flashingcell', 'conditionalstyle', 'formatColumn'],
|
|
336
336
|
inputs: [{ type: 'text' }],
|
|
337
337
|
handler: ({ value, inputs }) => new RegExp(inputs[0]).test(value),
|
|
338
338
|
toString: ({ inputs }) => `Regex ${inputs[0]}`,
|
|
@@ -343,7 +343,7 @@ exports.SystemPredicateDefs = [
|
|
|
343
343
|
label: 'Today',
|
|
344
344
|
icon: { name: 'calendar' },
|
|
345
345
|
columnScope: { DataTypes: ['Date'] },
|
|
346
|
-
moduleScope: ['filter', 'alert', 'flashingcell', 'conditionalstyle'],
|
|
346
|
+
moduleScope: ['filter', 'alert', 'flashingcell', 'conditionalstyle', 'formatColumn'],
|
|
347
347
|
handler: ({ value }) => (0, isToday_1.default)((0, DateHelper_1.parseDateValue)(value)),
|
|
348
348
|
},
|
|
349
349
|
{
|
|
@@ -351,7 +351,7 @@ exports.SystemPredicateDefs = [
|
|
|
351
351
|
label: 'Yesterday',
|
|
352
352
|
icon: { name: 'calendar' },
|
|
353
353
|
columnScope: { DataTypes: ['Date'] },
|
|
354
|
-
moduleScope: ['filter', 'alert', 'flashingcell', 'conditionalstyle'],
|
|
354
|
+
moduleScope: ['filter', 'alert', 'flashingcell', 'conditionalstyle', 'formatColumn'],
|
|
355
355
|
handler: ({ value }) => (0, isYesterday_1.default)((0, DateHelper_1.parseDateValue)(value)),
|
|
356
356
|
},
|
|
357
357
|
{
|
|
@@ -359,7 +359,7 @@ exports.SystemPredicateDefs = [
|
|
|
359
359
|
label: 'Tomorrow',
|
|
360
360
|
icon: { name: 'calendar' },
|
|
361
361
|
columnScope: { DataTypes: ['Date'] },
|
|
362
|
-
moduleScope: ['filter', 'alert', 'flashingcell', 'conditionalstyle'],
|
|
362
|
+
moduleScope: ['filter', 'alert', 'flashingcell', 'conditionalstyle', 'formatColumn'],
|
|
363
363
|
handler: ({ value }) => (0, isTomorrow_1.default)((0, DateHelper_1.parseDateValue)(value)),
|
|
364
364
|
},
|
|
365
365
|
{
|
|
@@ -367,7 +367,7 @@ exports.SystemPredicateDefs = [
|
|
|
367
367
|
label: 'This Week',
|
|
368
368
|
icon: { name: 'calendar' },
|
|
369
369
|
columnScope: { DataTypes: ['Date'] },
|
|
370
|
-
moduleScope: ['filter', 'alert', 'flashingcell', 'conditionalstyle'],
|
|
370
|
+
moduleScope: ['filter', 'alert', 'flashingcell', 'conditionalstyle', 'formatColumn'],
|
|
371
371
|
handler: ({ value }) => (0, isThisWeek_1.default)((0, DateHelper_1.parseDateValue)(value)),
|
|
372
372
|
},
|
|
373
373
|
{
|
|
@@ -375,7 +375,7 @@ exports.SystemPredicateDefs = [
|
|
|
375
375
|
label: 'This Month',
|
|
376
376
|
icon: { name: 'calendar' },
|
|
377
377
|
columnScope: { DataTypes: ['Date'] },
|
|
378
|
-
moduleScope: ['filter', 'alert', 'flashingcell', 'conditionalstyle'],
|
|
378
|
+
moduleScope: ['filter', 'alert', 'flashingcell', 'conditionalstyle', 'formatColumn'],
|
|
379
379
|
handler: ({ value }) => (0, isThisMonth_1.default)((0, DateHelper_1.parseDateValue)(value)),
|
|
380
380
|
},
|
|
381
381
|
{
|
|
@@ -383,7 +383,7 @@ exports.SystemPredicateDefs = [
|
|
|
383
383
|
label: 'This Quarter',
|
|
384
384
|
icon: { name: 'calendar' },
|
|
385
385
|
columnScope: { DataTypes: ['Date'] },
|
|
386
|
-
moduleScope: ['filter', 'alert', 'flashingcell', 'conditionalstyle'],
|
|
386
|
+
moduleScope: ['filter', 'alert', 'flashingcell', 'conditionalstyle', 'formatColumn'],
|
|
387
387
|
handler: ({ value }) => (0, isThisQuarter_1.default)((0, DateHelper_1.parseDateValue)(value)),
|
|
388
388
|
},
|
|
389
389
|
{
|
|
@@ -391,7 +391,7 @@ exports.SystemPredicateDefs = [
|
|
|
391
391
|
label: 'This Year',
|
|
392
392
|
icon: { name: 'calendar' },
|
|
393
393
|
columnScope: { DataTypes: ['Date'] },
|
|
394
|
-
moduleScope: ['filter', 'alert', 'flashingcell', 'conditionalstyle'],
|
|
394
|
+
moduleScope: ['filter', 'alert', 'flashingcell', 'conditionalstyle', 'formatColumn'],
|
|
395
395
|
handler: ({ value }) => (0, isThisYear_1.default)((0, DateHelper_1.parseDateValue)(value)),
|
|
396
396
|
},
|
|
397
397
|
{
|
|
@@ -399,7 +399,7 @@ exports.SystemPredicateDefs = [
|
|
|
399
399
|
label: 'In Past',
|
|
400
400
|
icon: { name: 'calendar' },
|
|
401
401
|
columnScope: { DataTypes: ['Date'] },
|
|
402
|
-
moduleScope: ['filter', 'alert', 'flashingcell', 'conditionalstyle'],
|
|
402
|
+
moduleScope: ['filter', 'alert', 'flashingcell', 'conditionalstyle', 'formatColumn'],
|
|
403
403
|
handler: ({ value }) => (0, isPast_1.default)((0, DateHelper_1.parseDateValue)(value)),
|
|
404
404
|
},
|
|
405
405
|
{
|
|
@@ -407,7 +407,7 @@ exports.SystemPredicateDefs = [
|
|
|
407
407
|
label: 'In Future',
|
|
408
408
|
icon: { name: 'calendar' },
|
|
409
409
|
columnScope: { DataTypes: ['Date'] },
|
|
410
|
-
moduleScope: ['filter', 'alert', 'flashingcell', 'conditionalstyle'],
|
|
410
|
+
moduleScope: ['filter', 'alert', 'flashingcell', 'conditionalstyle', 'formatColumn'],
|
|
411
411
|
handler: ({ value }) => (0, isFuture_1.default)((0, DateHelper_1.parseDateValue)(value)),
|
|
412
412
|
},
|
|
413
413
|
{
|
|
@@ -415,7 +415,7 @@ exports.SystemPredicateDefs = [
|
|
|
415
415
|
label: 'After',
|
|
416
416
|
icon: { name: 'greater-than' },
|
|
417
417
|
columnScope: { DataTypes: ['Date'] },
|
|
418
|
-
moduleScope: ['filter', 'alert', 'flashingcell', 'conditionalstyle'],
|
|
418
|
+
moduleScope: ['filter', 'alert', 'flashingcell', 'conditionalstyle', 'formatColumn'],
|
|
419
419
|
inputs: [{ type: 'date' }],
|
|
420
420
|
handler: ({ value, inputs }) => (0, isAfter_1.default)((0, DateHelper_1.parseDateValue)(value), (0, DateHelper_1.parseDateValue)(inputs[0])),
|
|
421
421
|
toString: ({ inputs }) => `> ${inputs[0]}`,
|
|
@@ -425,7 +425,7 @@ exports.SystemPredicateDefs = [
|
|
|
425
425
|
label: 'Before',
|
|
426
426
|
icon: { name: 'less-than' },
|
|
427
427
|
columnScope: { DataTypes: ['Date'] },
|
|
428
|
-
moduleScope: ['filter', 'alert', 'flashingcell', 'conditionalstyle'],
|
|
428
|
+
moduleScope: ['filter', 'alert', 'flashingcell', 'conditionalstyle', 'formatColumn'],
|
|
429
429
|
inputs: [{ type: 'date' }],
|
|
430
430
|
handler: ({ value, inputs }) => (0, isBefore_1.default)((0, DateHelper_1.parseDateValue)(value), (0, DateHelper_1.parseDateValue)(inputs[0])),
|
|
431
431
|
toString: ({ inputs }) => `< ${inputs[0]}`,
|
|
@@ -435,7 +435,7 @@ exports.SystemPredicateDefs = [
|
|
|
435
435
|
label: 'Equals',
|
|
436
436
|
icon: { name: 'equal' },
|
|
437
437
|
columnScope: { DataTypes: ['Date'] },
|
|
438
|
-
moduleScope: ['filter', 'alert', 'flashingcell', 'conditionalstyle'],
|
|
438
|
+
moduleScope: ['filter', 'alert', 'flashingcell', 'conditionalstyle', 'formatColumn'],
|
|
439
439
|
inputs: [{ type: 'date' }],
|
|
440
440
|
handler: ({ value, inputs }) => (0, isSameDay_1.default)((0, DateHelper_1.parseDateValue)(value), (0, DateHelper_1.parseDateValue)(inputs[0])),
|
|
441
441
|
toString: ({ inputs }) => `= ${inputs[0]}`,
|
|
@@ -445,7 +445,7 @@ exports.SystemPredicateDefs = [
|
|
|
445
445
|
label: 'NotEquals',
|
|
446
446
|
icon: { name: 'not-equal' },
|
|
447
447
|
columnScope: { DataTypes: ['Date'] },
|
|
448
|
-
moduleScope: ['filter', 'alert', 'flashingcell', 'conditionalstyle'],
|
|
448
|
+
moduleScope: ['filter', 'alert', 'flashingcell', 'conditionalstyle', 'formatColumn'],
|
|
449
449
|
inputs: [{ type: 'date' }],
|
|
450
450
|
handler: ({ value, inputs }) => !(0, isSameDay_1.default)((0, DateHelper_1.parseDateValue)(value), (0, DateHelper_1.parseDateValue)(inputs[0])),
|
|
451
451
|
toString: ({ inputs }) => `!= ${inputs[0]}`,
|
|
@@ -455,7 +455,7 @@ exports.SystemPredicateDefs = [
|
|
|
455
455
|
label: 'Next Work Day',
|
|
456
456
|
icon: { name: 'calendar' },
|
|
457
457
|
columnScope: { DataTypes: ['Date'] },
|
|
458
|
-
moduleScope: ['filter', 'alert', 'flashingcell', 'conditionalstyle'],
|
|
458
|
+
moduleScope: ['filter', 'alert', 'flashingcell', 'conditionalstyle', 'formatColumn'],
|
|
459
459
|
handler: ({ value, api }) => (0, isSameDay_1.default)((0, DateHelper_1.parseDateValue)(value), CalendarHelper_1.default.getNextWorkingDay()),
|
|
460
460
|
},
|
|
461
461
|
{
|
|
@@ -463,7 +463,7 @@ exports.SystemPredicateDefs = [
|
|
|
463
463
|
label: 'Last Work Day',
|
|
464
464
|
icon: { name: 'calendar' },
|
|
465
465
|
columnScope: { DataTypes: ['Date'] },
|
|
466
|
-
moduleScope: ['filter', 'alert', 'flashingcell', 'conditionalstyle'],
|
|
466
|
+
moduleScope: ['filter', 'alert', 'flashingcell', 'conditionalstyle', 'formatColumn'],
|
|
467
467
|
handler: ({ value, api }) => (0, isSameDay_1.default)((0, DateHelper_1.parseDateValue)(value), CalendarHelper_1.default.getPreviousWorkingDay()),
|
|
468
468
|
},
|
|
469
469
|
{
|
|
@@ -482,7 +482,7 @@ exports.SystemPredicateDefs = [
|
|
|
482
482
|
label: 'True',
|
|
483
483
|
icon: { text: 'T' },
|
|
484
484
|
columnScope: { DataTypes: ['Boolean'] },
|
|
485
|
-
moduleScope: ['filter', 'alert', 'flashingcell', 'conditionalstyle'],
|
|
485
|
+
moduleScope: ['filter', 'alert', 'flashingcell', 'conditionalstyle', 'formatColumn'],
|
|
486
486
|
handler: ({ value }) => Boolean(value) === true,
|
|
487
487
|
},
|
|
488
488
|
{
|
|
@@ -490,7 +490,7 @@ exports.SystemPredicateDefs = [
|
|
|
490
490
|
label: 'False',
|
|
491
491
|
icon: { text: 'F' },
|
|
492
492
|
columnScope: { DataTypes: ['Boolean'] },
|
|
493
|
-
moduleScope: ['filter', 'alert', 'flashingcell', 'conditionalstyle'],
|
|
493
|
+
moduleScope: ['filter', 'alert', 'flashingcell', 'conditionalstyle', 'formatColumn'],
|
|
494
494
|
handler: ({ value }) => Boolean(value) === false,
|
|
495
495
|
},
|
|
496
496
|
{
|
|
@@ -7,41 +7,32 @@ import { XOR } from '../Utilities/Extensions/TypeExtensions';
|
|
|
7
7
|
import { AdaptableBooleanQuery } from './Common/AdaptableQuery';
|
|
8
8
|
import { SuspendableObject } from './Common/SuspendableObject';
|
|
9
9
|
/**
|
|
10
|
-
*
|
|
10
|
+
* Deprecated section of Adaptable State - use `FormatColumnState` instead
|
|
11
|
+
* @deprecated use `FormatColumnState` instead
|
|
11
12
|
**/
|
|
12
13
|
export interface ConditionalStyleState extends ConfigState {
|
|
13
|
-
/**
|
|
14
|
-
* Array of Conditional Styles to ship with AdapTable
|
|
15
|
-
*/
|
|
16
14
|
ConditionalStyles?: ConditionalStyle[];
|
|
17
15
|
}
|
|
18
16
|
/**
|
|
19
|
-
*
|
|
17
|
+
* Deprecated Adaptable Object - use `FormatColumn` instead
|
|
18
|
+
* @deprecated use `FormatColumn` instead
|
|
20
19
|
*/
|
|
21
20
|
export interface ConditionalStyle extends SuspendableObject {
|
|
22
|
-
/**
|
|
23
|
-
* Where Style is applied - can be whole Row, some Columns or all Columns of given DataType
|
|
24
|
-
*/
|
|
25
21
|
Scope: AdaptableScope;
|
|
26
|
-
/**
|
|
27
|
-
* Predicate-based Rule to use for deciding if a style needs to be applied.
|
|
28
|
-
*/
|
|
29
22
|
Rule: ConditionalStyleRule;
|
|
30
|
-
/**
|
|
31
|
-
* Adaptable Style (e.g. font properties and colurs) to apply.
|
|
32
|
-
*/
|
|
33
23
|
Style: AdaptableStyle;
|
|
34
|
-
/**
|
|
35
|
-
* Whether to apply Style in Grouped Rows and when Pivoting
|
|
36
|
-
* @defaultValue false
|
|
37
|
-
*/
|
|
38
24
|
IncludeGroupedRows?: boolean;
|
|
39
25
|
}
|
|
26
|
+
/**
|
|
27
|
+
* Deprecated - use `FormatColumnPredicate` instead
|
|
28
|
+
* @deprecated use `FormatColumnPredicate` instead
|
|
29
|
+
*/
|
|
40
30
|
export interface ConditionalStylePredicate extends AdaptablePredicate {
|
|
41
31
|
PredicateId: TypeHint<string, SystemConditionalStylePredicateId>;
|
|
42
32
|
}
|
|
43
33
|
/**
|
|
44
|
-
*
|
|
34
|
+
* Deprecated - use `FormatColumnRule` instead
|
|
35
|
+
* @deprecated use `FormatColumnRule` instead
|
|
45
36
|
*/
|
|
46
37
|
export declare type ConditionalStyleRule = XOR<{
|
|
47
38
|
Predicate: ConditionalStylePredicate;
|
|
@@ -3,6 +3,9 @@ import { AdaptableStyle } from './Common/AdaptableStyle';
|
|
|
3
3
|
import { AdaptableFormat } from './Common/AdaptableFormat';
|
|
4
4
|
import { AdaptableScope } from './Common/AdaptableScope';
|
|
5
5
|
import { SuspendableObject } from './Common/SuspendableObject';
|
|
6
|
+
import { XOR } from '../Utilities/Extensions/TypeExtensions';
|
|
7
|
+
import { TypeHint } from './Common/Types';
|
|
8
|
+
import { AdaptableBooleanQuery, AdaptablePredicate } from '../types';
|
|
6
9
|
/**
|
|
7
10
|
* Predefined Configuration for Format Column Module
|
|
8
11
|
*/
|
|
@@ -20,6 +23,11 @@ export interface FormatColumn extends SuspendableObject {
|
|
|
20
23
|
* Where Format will be applied - whole Row, some Columns or all Columns of given DataType
|
|
21
24
|
*/
|
|
22
25
|
Scope: AdaptableScope;
|
|
26
|
+
/**
|
|
27
|
+
* Predicate-based Rule to use for deciding if a format column needs to be applied.
|
|
28
|
+
* When not defined the format column is always applied.
|
|
29
|
+
*/
|
|
30
|
+
Rule?: FormatColumnRule;
|
|
23
31
|
/**
|
|
24
32
|
* Style to apply
|
|
25
33
|
*/
|
|
@@ -36,18 +44,22 @@ export interface FormatColumn extends SuspendableObject {
|
|
|
36
44
|
* Aligns cells 'Left' or 'Right' or 'Center'
|
|
37
45
|
*/
|
|
38
46
|
CellAlignment?: 'Left' | 'Right' | 'Center';
|
|
39
|
-
/**
|
|
40
|
-
* Text to display in Column Header (doesn't change ColumnId)
|
|
41
|
-
*
|
|
42
|
-
* @deprecated use `Layout.ColumnHeadersMap` instead
|
|
43
|
-
*/
|
|
44
|
-
HeaderName?: string;
|
|
45
47
|
/**
|
|
46
48
|
* Whether to Format the Column in Grouped Rows
|
|
47
49
|
* @defaultValue false
|
|
48
50
|
*/
|
|
49
51
|
IncludeGroupedRows?: boolean;
|
|
50
52
|
}
|
|
53
|
+
/**
|
|
54
|
+
* The Format Column Rule - can be either a Predicate or an Expression
|
|
55
|
+
*/
|
|
56
|
+
export declare type FormatColumnRule = XOR<{
|
|
57
|
+
Predicate: FormatColumnPredicate;
|
|
58
|
+
}, AdaptableBooleanQuery>;
|
|
59
|
+
export interface FormatColumnPredicate extends AdaptablePredicate {
|
|
60
|
+
PredicateId: TypeHint<string, SystemFormatColumnPredicateId>;
|
|
61
|
+
}
|
|
62
|
+
declare type SystemFormatColumnPredicateId = 'Blanks' | 'NonBlanks' | 'Equals' | 'NotEquals' | 'GreaterThan' | 'LessThan' | 'Positive' | 'Negative' | 'Zero' | 'Between' | 'NotBetween' | 'Is' | 'IsNot' | 'Contains' | 'NotContains' | 'StartsWith' | 'EndsWith' | 'Regex' | 'Today' | 'Yesterday' | 'Tomorrow' | 'ThisWeek' | 'ThisMonth' | 'ThisQuarter' | 'ThisYear' | 'InPast' | 'InFuture' | 'Before' | 'After' | 'On' | 'NotOn' | 'NextWorkDay' | 'LastWorkDay' | 'True' | 'False';
|
|
51
63
|
/**
|
|
52
64
|
* Special Style used when Formatting Columns: Gradient, PercentBar or CheckBox
|
|
53
65
|
*/
|
|
@@ -150,3 +162,4 @@ export declare type CellTextOptions = CellTextOption[];
|
|
|
150
162
|
* Text optionally to show in a Format Column special style: 'CellValue' or 'PercentageValue'
|
|
151
163
|
*/
|
|
152
164
|
export declare type CellTextOption = 'CellValue' | 'PercentageValue';
|
|
165
|
+
export {};
|
|
@@ -36,6 +36,7 @@ export interface PredefinedConfig {
|
|
|
36
36
|
CalculatedColumn?: CalculatedColumnState;
|
|
37
37
|
/**
|
|
38
38
|
* Supplies a collection of *ConditionalStyle* objects to provides columns and rows with a particular style when the data matches a given rule
|
|
39
|
+
* @deprecated use `FormatColumn` instead
|
|
39
40
|
*/
|
|
40
41
|
ConditionalStyle?: ConditionalStyleState;
|
|
41
42
|
/**
|
|
@@ -4,6 +4,14 @@ import * as Redux from 'redux';
|
|
|
4
4
|
* @ReduxAction A Format Column has been added
|
|
5
5
|
*/
|
|
6
6
|
export declare const FORMAT_COLUMN_ADD = "FORMAT_COLUMN_ADD";
|
|
7
|
+
/**
|
|
8
|
+
* @ReduxAction Format column was moved up
|
|
9
|
+
*/
|
|
10
|
+
export declare const FORMAT_COLUMN_MOVE_UP = "FORMAT_COLUMN_MOVE_UP";
|
|
11
|
+
/**
|
|
12
|
+
* @ReduxAction Format column was moved down
|
|
13
|
+
*/
|
|
14
|
+
export declare const FORMAT_COLUMN_MOVE_DOWN = "FORMAT_COLUMN_MOVE_DOWN";
|
|
7
15
|
/**
|
|
8
16
|
* @ReduxAction A Format Column has been edited
|
|
9
17
|
*/
|
|
@@ -31,6 +39,10 @@ export interface FormatColumnAddAction extends FormatColumnAction {
|
|
|
31
39
|
}
|
|
32
40
|
export interface FormatColumnEditAction extends FormatColumnAction {
|
|
33
41
|
}
|
|
42
|
+
export interface FormatColumnMoveUpAction extends FormatColumnAction {
|
|
43
|
+
}
|
|
44
|
+
export interface FormatColumnMoveDownAction extends FormatColumnAction {
|
|
45
|
+
}
|
|
34
46
|
export interface FormatColumnDeleteAction extends FormatColumnAction {
|
|
35
47
|
}
|
|
36
48
|
export interface FormatColumnSuspendAction extends FormatColumnAction {
|
|
@@ -43,6 +55,8 @@ export interface FormatColumnReadyAction extends Redux.Action {
|
|
|
43
55
|
export declare const FormatColumnAdd: (formatColumn: FormatColumn) => FormatColumnAddAction;
|
|
44
56
|
export declare const FormatColumnEdit: (formatColumn: FormatColumn) => FormatColumnEditAction;
|
|
45
57
|
export declare const FormatColumnDelete: (formatColumn: FormatColumn) => FormatColumnDeleteAction;
|
|
58
|
+
export declare const FormatColumnMoveUp: (formatColumn: FormatColumn) => FormatColumnAddAction;
|
|
59
|
+
export declare const FormatColumnMoveDown: (formatColumn: FormatColumn) => FormatColumnAddAction;
|
|
46
60
|
export declare const FormatColumnSuspend: (formatColumn: FormatColumn) => FormatColumnSuspendAction;
|
|
47
61
|
export declare const FormatColumnUnSuspend: (formatColumn: FormatColumn) => FormatColumnSuspendAction;
|
|
48
62
|
export declare const FormatColumnReady: (formatColumnState: FormatColumnState) => FormatColumnReadyAction;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.FormatColumnReducer = exports.FormatColumnReady = exports.FormatColumnUnSuspend = exports.FormatColumnSuspend = exports.FormatColumnDelete = exports.FormatColumnEdit = exports.FormatColumnAdd = exports.FORMAT_COLUMN_UNSUSPEND = exports.FORMAT_COLUMN_SUSPEND = exports.FORMAT_COLUMN_READY = exports.FORMAT_COLUMN_DELETE = exports.FORMAT_COLUMN_EDIT = exports.FORMAT_COLUMN_ADD = void 0;
|
|
3
|
+
exports.FormatColumnReducer = exports.FormatColumnReady = exports.FormatColumnUnSuspend = exports.FormatColumnSuspend = exports.FormatColumnMoveDown = exports.FormatColumnMoveUp = exports.FormatColumnDelete = exports.FormatColumnEdit = exports.FormatColumnAdd = exports.FORMAT_COLUMN_UNSUSPEND = exports.FORMAT_COLUMN_SUSPEND = exports.FORMAT_COLUMN_READY = exports.FORMAT_COLUMN_DELETE = exports.FORMAT_COLUMN_EDIT = exports.FORMAT_COLUMN_MOVE_DOWN = exports.FORMAT_COLUMN_MOVE_UP = exports.FORMAT_COLUMN_ADD = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
const GeneralConstants_1 = require("../../Utilities/Constants/GeneralConstants");
|
|
6
6
|
const AdaptableHelper_1 = tslib_1.__importDefault(require("../../Utilities/Helpers/AdaptableHelper"));
|
|
@@ -9,6 +9,14 @@ const utils_1 = require("./utils");
|
|
|
9
9
|
* @ReduxAction A Format Column has been added
|
|
10
10
|
*/
|
|
11
11
|
exports.FORMAT_COLUMN_ADD = 'FORMAT_COLUMN_ADD';
|
|
12
|
+
/**
|
|
13
|
+
* @ReduxAction Format column was moved up
|
|
14
|
+
*/
|
|
15
|
+
exports.FORMAT_COLUMN_MOVE_UP = 'FORMAT_COLUMN_MOVE_UP';
|
|
16
|
+
/**
|
|
17
|
+
* @ReduxAction Format column was moved down
|
|
18
|
+
*/
|
|
19
|
+
exports.FORMAT_COLUMN_MOVE_DOWN = 'FORMAT_COLUMN_MOVE_DOWN';
|
|
12
20
|
/**
|
|
13
21
|
* @ReduxAction A Format Column has been edited
|
|
14
22
|
*/
|
|
@@ -44,6 +52,16 @@ const FormatColumnDelete = (formatColumn) => ({
|
|
|
44
52
|
formatColumn,
|
|
45
53
|
});
|
|
46
54
|
exports.FormatColumnDelete = FormatColumnDelete;
|
|
55
|
+
const FormatColumnMoveUp = (formatColumn) => ({
|
|
56
|
+
type: exports.FORMAT_COLUMN_MOVE_UP,
|
|
57
|
+
formatColumn,
|
|
58
|
+
});
|
|
59
|
+
exports.FormatColumnMoveUp = FormatColumnMoveUp;
|
|
60
|
+
const FormatColumnMoveDown = (formatColumn) => ({
|
|
61
|
+
type: exports.FORMAT_COLUMN_MOVE_DOWN,
|
|
62
|
+
formatColumn,
|
|
63
|
+
});
|
|
64
|
+
exports.FormatColumnMoveDown = FormatColumnMoveDown;
|
|
47
65
|
const FormatColumnSuspend = (formatColumn) => ({
|
|
48
66
|
type: exports.FORMAT_COLUMN_SUSPEND,
|
|
49
67
|
formatColumn,
|
|
@@ -85,6 +103,30 @@ const FormatColumnReducer = (state = initialState, action) => {
|
|
|
85
103
|
case exports.FORMAT_COLUMN_UNSUSPEND: {
|
|
86
104
|
return Object.assign(Object.assign({}, state), { FormatColumns: (0, utils_1.changeIsSuspendInList)(action.formatColumn, state.FormatColumns, false) });
|
|
87
105
|
}
|
|
106
|
+
case exports.FORMAT_COLUMN_MOVE_UP: {
|
|
107
|
+
const index = state.FormatColumns.findIndex((formatColumn) => formatColumn.Uuid === action.formatColumn.Uuid);
|
|
108
|
+
let swapIndex = index - 1;
|
|
109
|
+
if (swapIndex < 0) {
|
|
110
|
+
swapIndex = state.FormatColumns.length - 1;
|
|
111
|
+
}
|
|
112
|
+
const formatColumnToSwap = state.FormatColumns[swapIndex];
|
|
113
|
+
const newFormatColumns = [...state.FormatColumns];
|
|
114
|
+
newFormatColumns[swapIndex] = state.FormatColumns[index];
|
|
115
|
+
newFormatColumns[index] = formatColumnToSwap;
|
|
116
|
+
return Object.assign(Object.assign({}, state), { FormatColumns: newFormatColumns });
|
|
117
|
+
}
|
|
118
|
+
case exports.FORMAT_COLUMN_MOVE_DOWN: {
|
|
119
|
+
const index = state.FormatColumns.findIndex((formatColumn) => formatColumn.Uuid === action.formatColumn.Uuid);
|
|
120
|
+
let swapIndex = index + 1;
|
|
121
|
+
if (swapIndex > state.FormatColumns.length - 1) {
|
|
122
|
+
swapIndex = 0;
|
|
123
|
+
}
|
|
124
|
+
const formatColumnToSwap = state.FormatColumns[swapIndex];
|
|
125
|
+
const newFormatColumns = [...state.FormatColumns];
|
|
126
|
+
newFormatColumns[swapIndex] = state.FormatColumns[index];
|
|
127
|
+
newFormatColumns[index] = formatColumnToSwap;
|
|
128
|
+
return Object.assign(Object.assign({}, state), { FormatColumns: newFormatColumns });
|
|
129
|
+
}
|
|
88
130
|
default:
|
|
89
131
|
return state;
|
|
90
132
|
}
|
|
@@ -657,6 +657,8 @@ const adaptableMiddleware = (adaptable) => function (middlewareAPI) {
|
|
|
657
657
|
case FormatColumnRedux.FORMAT_COLUMN_ADD:
|
|
658
658
|
case FormatColumnRedux.FORMAT_COLUMN_EDIT:
|
|
659
659
|
case FormatColumnRedux.FORMAT_COLUMN_DELETE:
|
|
660
|
+
case FormatColumnRedux.FORMAT_COLUMN_MOVE_DOWN:
|
|
661
|
+
case FormatColumnRedux.FORMAT_COLUMN_MOVE_UP:
|
|
660
662
|
case FormatColumnRedux.FORMAT_COLUMN_SUSPEND:
|
|
661
663
|
case FormatColumnRedux.FORMAT_COLUMN_UNSUSPEND:
|
|
662
664
|
case CustomSortRedux.CUSTOM_SORT_ADD:
|
|
@@ -7,8 +7,10 @@ import { AdaptableModuleBase } from './AdaptableModuleBase';
|
|
|
7
7
|
import { IConditionalStyleModule } from './Interface/IConditionalStyleModule';
|
|
8
8
|
import { AdaptableObject } from '../PredefinedConfig/Common/AdaptableObject';
|
|
9
9
|
import { AdaptableModuleView, AdaptableObjectView } from './Interface/IModule';
|
|
10
|
+
import { AccessLevel } from '../types';
|
|
10
11
|
export declare class ConditionalStyleModule extends AdaptableModuleBase implements IConditionalStyleModule {
|
|
11
12
|
constructor(api: AdaptableApi);
|
|
13
|
+
getViewAccessLevel(): AccessLevel;
|
|
12
14
|
getModuleAdaptableObjects(config?: {
|
|
13
15
|
includeLayoutNotAssociatedObjects?: boolean;
|
|
14
16
|
}): AdaptableObject[];
|
|
@@ -13,10 +13,15 @@ const ConditionalStyleWizard_1 = require("../View/ConditionalStyle/Wizard/Condit
|
|
|
13
13
|
const getRuleViewItems_1 = require("./Utilities/getRuleViewItems");
|
|
14
14
|
const getStyleViewItems_1 = require("./Utilities/getStyleViewItems");
|
|
15
15
|
const getObjectTagsViewItems_1 = require("./Utilities/getObjectTagsViewItems");
|
|
16
|
+
const ConditionalStylePopupHeader_1 = require("../View/ConditionalStyle/ConditionalStylePopupHeader");
|
|
16
17
|
class ConditionalStyleModule extends AdaptableModuleBase_1.AdaptableModuleBase {
|
|
17
18
|
constructor(api) {
|
|
18
19
|
super(ModuleConstants.ConditionalStyleModuleId, ModuleConstants.ConditionalStyleFriendlyName, 'conditional-style', 'ConditionalStylePopup', 'Style columns and rows dynamically based on rules and cell values', api);
|
|
19
20
|
}
|
|
21
|
+
getViewAccessLevel() {
|
|
22
|
+
const keepDeprecatedConditionalStyles = this.api.internalApi.shouldKeepDeprecatedConditionalStyles();
|
|
23
|
+
return keepDeprecatedConditionalStyles ? super.getViewAccessLevel() : 'Hidden';
|
|
24
|
+
}
|
|
20
25
|
getModuleAdaptableObjects(config) {
|
|
21
26
|
return this.api.conditionalStyleApi.getAllConditionalStyle(config);
|
|
22
27
|
}
|
|
@@ -209,6 +214,7 @@ class ConditionalStyleModule extends AdaptableModuleBase_1.AdaptableModuleBase {
|
|
|
209
214
|
}
|
|
210
215
|
getViewProperties() {
|
|
211
216
|
return {
|
|
217
|
+
HeaderComponent: ConditionalStylePopupHeader_1.ConditionalStylePopupHeader,
|
|
212
218
|
getDeleteAction: (conditionalStyle) => ConditionalStyleRedux.ConditionalStyleDelete(conditionalStyle),
|
|
213
219
|
getSuspendAction: (conditionalStyle) => ConditionalStyleRedux.ConditionalStyleSuspend(conditionalStyle),
|
|
214
220
|
getUnSuspendAction: (conditionalStyle) => ConditionalStyleRedux.ConditionalStyleUnSuspend(conditionalStyle),
|
|
@@ -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
|
}
|