@adaptabletools/adaptable 11.0.0-canary.7 → 11.0.2-canary.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +4 -4
- package/base.css +1 -2
- package/bundle.cjs.js +75 -75
- package/index.css +1 -2
- package/package.json +1 -1
- package/publishTimestamp.d.ts +1 -1
- package/publishTimestamp.js +1 -1
- package/src/AdaptableInterfaces/IAdaptable.d.ts +3 -2
- package/src/AdaptableOptions/AdaptableQLOptions.d.ts +3 -0
- package/src/AdaptableOptions/FilterOptions.d.ts +4 -0
- package/src/AdaptableOptions/SettingsPanelOptions.d.ts +7 -6
- package/src/AdaptableOptions/ToolPanelOptions.d.ts +2 -2
- package/src/Api/GridApi.d.ts +1 -2
- package/src/Api/Implementation/AlertApiImpl.js +1 -2
- package/src/Api/Implementation/ColumnApiImpl.js +1 -1
- package/src/Api/Implementation/GridApiImpl.js +14 -17
- package/src/Api/Implementation/SettingsPanelApiImpl.js +1 -1
- package/src/Api/Implementation/ToolPanelApiImpl.js +1 -1
- package/src/PredefinedConfig/Common/AdaptableColumn.d.ts +1 -1
- package/src/PredefinedConfig/Common/AdaptableFormat.d.ts +3 -0
- package/src/PredefinedConfig/Common/Types.d.ts +4 -1
- package/src/PredefinedConfig/ConditionalStyleState.d.ts +2 -2
- package/src/PredefinedConfig/FormatColumnState.d.ts +15 -0
- package/src/PredefinedConfig/PlusMinusState.d.ts +1 -1
- package/src/PredefinedConfig/ToolPanelState.d.ts +3 -0
- package/src/Redux/ActionsReducers/AlertRedux.d.ts +1 -1
- package/src/Redux/ActionsReducers/AlertRedux.js +4 -4
- package/src/Redux/ActionsReducers/ConditionalStyleRedux.d.ts +1 -1
- package/src/Redux/ActionsReducers/ConditionalStyleRedux.js +4 -4
- package/src/Redux/ActionsReducers/CustomSortRedux.d.ts +1 -1
- package/src/Redux/ActionsReducers/CustomSortRedux.js +4 -4
- package/src/Redux/ActionsReducers/FlashingCellRedux.d.ts +12 -12
- package/src/Redux/ActionsReducers/FlashingCellRedux.js +33 -29
- package/src/Redux/ActionsReducers/FormatColumnRedux.d.ts +1 -1
- package/src/Redux/ActionsReducers/FormatColumnRedux.js +4 -4
- package/src/Redux/ActionsReducers/PlusMinusRedux.d.ts +1 -1
- package/src/Redux/ActionsReducers/PlusMinusRedux.js +4 -4
- package/src/Redux/ActionsReducers/ScheduleRedux.d.ts +5 -5
- package/src/Redux/ActionsReducers/ScheduleRedux.js +16 -16
- package/src/Redux/ActionsReducers/ShortcutRedux.d.ts +1 -1
- package/src/Redux/ActionsReducers/ShortcutRedux.js +4 -4
- package/src/Redux/ActionsReducers/SystemRedux.js +1 -1
- package/src/Redux/Store/AdaptableStore.js +20 -20
- package/src/Strategy/AlertModule.js +1 -1
- package/src/Strategy/FlashingCellModule.js +2 -2
- package/src/Utilities/Constants/DocumentationLinkConstants.d.ts +1 -1
- package/src/Utilities/Constants/DocumentationLinkConstants.js +11 -10
- package/src/Utilities/Defaults/DefaultAdaptableOptions.js +2 -1
- package/src/Utilities/Services/ModuleService.js +33 -40
- package/src/View/Alert/Wizard/isValidAlertRules.js +3 -3
- package/src/View/Components/EntityRulesEditor/index.d.ts +1 -1
- package/src/View/Components/EntityRulesEditor/index.js +1 -1
- package/src/View/Components/Popups/AdaptablePopup/AdaptablePopup.js +4 -8
- package/src/View/Components/Popups/AdaptablePopup/useMenuItems.js +1 -2
- package/src/View/Components/ToolPanel/CustomToolPanelContent.js +1 -1
- package/src/View/Dashboard/DashboardPopup.js +1 -1
- package/src/View/FlashingCell/Wizard/isValidFlashingCellRules.js +1 -1
- package/src/View/PlusMinus/Wizard/PlusMinusSettingsWizardSection.d.ts +1 -1
- package/src/View/Query/Wizard/NamedQueryExpressionWizardSection.js +2 -2
- package/src/View/Schedule/Wizard/ScheduleWizard.js +3 -3
- package/src/agGrid/Adaptable.d.ts +4 -2
- package/src/agGrid/Adaptable.js +83 -42
- package/src/agGrid/CheckboxRenderer.d.ts +8 -1
- package/src/agGrid/CheckboxRenderer.js +25 -4
- package/src/agGrid/agGridHelper.d.ts +1 -1
- package/src/agGrid/agGridHelper.js +7 -8
- package/src/components/ExpressionEditor/index.js +1 -1
- package/src/components/icons/calculated-column.js +2 -1
- package/src/metamodel/adaptable.metamodel.d.ts +194 -4
- package/src/metamodel/adaptable.metamodel.js +280 -17
- package/version.d.ts +1 -1
- package/version.js +1 -1
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.LicenseDocsLink = exports.PrimaryKeyDocsLink = exports.PredicateDocsLink = exports.AggregatedScalarQueryDocsLink = exports.AggregatedBooleanQueryDocsLink = exports.ObservableQueryDocsLink = exports.ScalarQueryDocsLink = exports.BooleanQueryDocsLink = exports.ExpressionEditorDocsLink = exports.HOST_URL_DOCS = void 0;
|
|
4
|
-
exports.HOST_URL_DOCS = 'https://docs.adaptabletools.com
|
|
5
|
-
|
|
6
|
-
exports.
|
|
7
|
-
exports.
|
|
8
|
-
exports.
|
|
9
|
-
exports.
|
|
10
|
-
exports.
|
|
11
|
-
exports.
|
|
12
|
-
exports.
|
|
13
|
-
exports.
|
|
4
|
+
exports.HOST_URL_DOCS = 'https://docs.adaptabletools.com';
|
|
5
|
+
//export const HOST_URL_DOCS = 'http://localhost:3000';
|
|
6
|
+
exports.ExpressionEditorDocsLink = `${exports.HOST_URL_DOCS}/learn/ui-expression-editor`;
|
|
7
|
+
exports.BooleanQueryDocsLink = `${exports.HOST_URL_DOCS}/learn/adaptable-ql-expression#boolean-expressions`;
|
|
8
|
+
exports.ScalarQueryDocsLink = `${exports.HOST_URL_DOCS}/learn/adaptable-ql-expression#scalar-expressions`;
|
|
9
|
+
exports.ObservableQueryDocsLink = `${exports.HOST_URL_DOCS}/learn/adaptable-ql-expression#observable-expressions`;
|
|
10
|
+
exports.AggregatedBooleanQueryDocsLink = `${exports.HOST_URL_DOCS}/learn/adaptable-ql-expression#aggregation-boolean-expressions`;
|
|
11
|
+
exports.AggregatedScalarQueryDocsLink = `${exports.HOST_URL_DOCS}/learn/adaptable-ql-expression#aggregation-scalar-expressions`;
|
|
12
|
+
exports.PredicateDocsLink = `${exports.HOST_URL_DOCS}/learn/adaptable-ql-predicate`;
|
|
13
|
+
exports.PrimaryKeyDocsLink = `${exports.HOST_URL_DOCS}/learn/dev-guide-tutorial-primary-key`;
|
|
14
|
+
exports.LicenseDocsLink = `${exports.HOST_URL_DOCS}/licensing`;
|
|
@@ -150,6 +150,7 @@ exports.DefaultAdaptableOptions = {
|
|
|
150
150
|
clearFiltersOnStartUp: false,
|
|
151
151
|
quickFilterTrigger: 'mouseenter',
|
|
152
152
|
quickFilterValuesTrigger: 'mouseenter',
|
|
153
|
+
quickFilterHeight: null,
|
|
153
154
|
filterActionOnUserDataChange: {
|
|
154
155
|
applyFilter: GeneralConstants.FILTER_ALWAYS,
|
|
155
156
|
throttleDelay: 0,
|
|
@@ -214,7 +215,7 @@ exports.DefaultAdaptableOptions = {
|
|
|
214
215
|
showAdaptableToolPanel: true,
|
|
215
216
|
adaptableToolPanelTitle: GeneralConstants.ADAPTABLE,
|
|
216
217
|
showToolPanelsDropdown: true,
|
|
217
|
-
|
|
218
|
+
customButtons: undefined,
|
|
218
219
|
customToolPanels: undefined,
|
|
219
220
|
iconKey: 'menu',
|
|
220
221
|
width: UIHelper_1.default.getAdaptableToolPanelWidth(),
|
|
@@ -76,75 +76,68 @@ class ModuleService {
|
|
|
76
76
|
}
|
|
77
77
|
getModuleDocumentationPageByModule(adaptableModule) {
|
|
78
78
|
let url = `${DocumentationLinkConstants_1.HOST_URL_DOCS}/`;
|
|
79
|
-
let
|
|
80
|
-
let editingUrl = url + 'editing/';
|
|
81
|
-
let searchingUrl = url + 'searching/';
|
|
82
|
-
let filteringUrl = url + 'filtering/';
|
|
83
|
-
let themingUrl = url + 'theming/';
|
|
84
|
-
let stylingUrl = url + 'styling/';
|
|
85
|
-
let advancedFeaturesUrl = url + 'advanced-features/';
|
|
86
|
-
let gridManagementUrl = url + 'grid-management/';
|
|
87
|
-
let userInterfaceUrl = url + 'user-interface/';
|
|
88
|
-
let pluginUrl = url + 'plugins/';
|
|
79
|
+
let learnUrl = url + 'learn/';
|
|
89
80
|
switch (adaptableModule) {
|
|
90
81
|
case 'Alert':
|
|
91
|
-
return
|
|
82
|
+
return learnUrl + 'handbook-alerting';
|
|
92
83
|
case 'BulkUpdate':
|
|
93
|
-
return
|
|
84
|
+
return url + 'handbook-editing#bulk-update';
|
|
94
85
|
case 'CalculatedColumn':
|
|
95
|
-
return
|
|
86
|
+
return learnUrl + 'handbook-calculated-column';
|
|
96
87
|
case 'CellSummary':
|
|
97
|
-
return
|
|
88
|
+
return learnUrl + 'handbook-summarising#cell-summary-information';
|
|
98
89
|
case 'ConditionalStyle':
|
|
99
|
-
return
|
|
90
|
+
return learnUrl + 'handbook-conditional-styling';
|
|
100
91
|
case 'CustomSort':
|
|
101
|
-
return
|
|
92
|
+
return learnUrl + 'handbook-sorting';
|
|
102
93
|
case 'Dashboard':
|
|
103
|
-
return
|
|
94
|
+
return learnUrl + 'ui-dashboard';
|
|
104
95
|
case 'DataSource':
|
|
105
|
-
return
|
|
96
|
+
return learnUrl + 'handbook-data-sources';
|
|
97
|
+
case 'DataChangeHistory':
|
|
98
|
+
return learnUrl + 'handbook-monitoring#data-change-history';
|
|
106
99
|
case 'Export':
|
|
107
|
-
return
|
|
100
|
+
return learnUrl + 'handbook-exporting';
|
|
108
101
|
case 'Filter':
|
|
109
|
-
return
|
|
102
|
+
return learnUrl + 'handbook-filtering';
|
|
103
|
+
case 'FlashingCell':
|
|
104
|
+
return learnUrl + 'handbook-cell-flashing';
|
|
110
105
|
case 'FormatColumn':
|
|
111
|
-
return
|
|
106
|
+
return learnUrl + 'handbook-column-formatting';
|
|
112
107
|
case 'FreeTextColumn':
|
|
113
|
-
return
|
|
108
|
+
return learnUrl + 'handbook-freetext-column';
|
|
114
109
|
case 'GridInfo':
|
|
115
|
-
return
|
|
110
|
+
return learnUrl + 'handbook-monitoring#grid-info-panel';
|
|
116
111
|
case 'Layout':
|
|
117
|
-
return
|
|
112
|
+
return learnUrl + 'handbook-layouts';
|
|
118
113
|
case 'PlusMinus':
|
|
119
|
-
return
|
|
114
|
+
return learnUrl + 'handbook-editing#plus-minus';
|
|
120
115
|
case 'Query':
|
|
121
|
-
return
|
|
116
|
+
return learnUrl + 'handbook-querying';
|
|
122
117
|
case 'QuickSearch':
|
|
123
|
-
return
|
|
118
|
+
return learnUrl + 'handbook-searching';
|
|
124
119
|
case 'Schedule':
|
|
125
|
-
return
|
|
120
|
+
return learnUrl + 'handbook-scheduling';
|
|
126
121
|
case 'Shortcut':
|
|
127
|
-
return
|
|
122
|
+
return learnUrl + 'handbook-editing#shortcuts';
|
|
128
123
|
case 'SmartEdit':
|
|
129
|
-
return
|
|
124
|
+
return learnUrl + 'handbook-editing#smart-edit';
|
|
130
125
|
case 'StateManagement':
|
|
131
|
-
return
|
|
126
|
+
return learnUrl + 'dev-guide-adaptable-state';
|
|
132
127
|
case 'SystemStatus':
|
|
133
|
-
return
|
|
128
|
+
return learnUrl + 'handbook-notifying';
|
|
134
129
|
case 'TeamSharing':
|
|
135
|
-
return url + '
|
|
130
|
+
return url + 'handbook-collaborating';
|
|
136
131
|
case 'Theme':
|
|
137
|
-
return
|
|
132
|
+
return learnUrl + 'handbook-theming';
|
|
138
133
|
case 'ToolPanel':
|
|
139
|
-
return
|
|
140
|
-
case 'DataChangeHistory':
|
|
141
|
-
return editingUrl + 'change-history-module';
|
|
134
|
+
return learnUrl + 'ui-tool-panel';
|
|
142
135
|
case 'Glue42':
|
|
143
|
-
return
|
|
136
|
+
return learnUrl + 'integrations-glue42';
|
|
144
137
|
case 'IPushPull':
|
|
145
|
-
return
|
|
138
|
+
return learnUrl + 'integrations-ipushpull';
|
|
146
139
|
case 'OpenFin':
|
|
147
|
-
return
|
|
140
|
+
return learnUrl + 'integrations-openfin';
|
|
148
141
|
default:
|
|
149
142
|
return 'good';
|
|
150
143
|
}
|
|
@@ -19,7 +19,7 @@ exports.isValidAlertRules = (alert, api, context) => {
|
|
|
19
19
|
if (valid && alert.Rule.BooleanExpression) {
|
|
20
20
|
valid = api.queryLanguageApi.isValidBooleanExpression(alert.Rule.BooleanExpression, ModuleConstants_1.AlertModuleId);
|
|
21
21
|
if (!valid) {
|
|
22
|
-
return 'The
|
|
22
|
+
return 'The Expression is not a valid Boolean Expression';
|
|
23
23
|
}
|
|
24
24
|
}
|
|
25
25
|
// boolean expressions may also be saved as named queries
|
|
@@ -32,13 +32,13 @@ exports.isValidAlertRules = (alert, api, context) => {
|
|
|
32
32
|
if (valid && alert.Rule.ObservableExpression) {
|
|
33
33
|
valid = api.queryLanguageApi.isValidObservableExpression(alert.Rule.ObservableExpression, ModuleConstants_1.AlertModuleId);
|
|
34
34
|
if (!valid) {
|
|
35
|
-
return 'The
|
|
35
|
+
return 'The Expression is not a valid Observable Expression';
|
|
36
36
|
}
|
|
37
37
|
}
|
|
38
38
|
if (valid && alert.Rule.AggregatedBooleanExpression) {
|
|
39
39
|
valid = api.queryLanguageApi.isValidAggregatedBooleanExpression(alert.Rule.AggregatedBooleanExpression, ModuleConstants_1.AlertModuleId);
|
|
40
40
|
if (!valid) {
|
|
41
|
-
return 'The
|
|
41
|
+
return 'The Expression is not a valid Aggregation Expression';
|
|
42
42
|
}
|
|
43
43
|
}
|
|
44
44
|
return true;
|
|
@@ -9,7 +9,7 @@ declare type RuleType = XOR<{
|
|
|
9
9
|
}, AdaptableQuery>;
|
|
10
10
|
export declare const isRuleValid: (abObject: {
|
|
11
11
|
Rule?: RuleType;
|
|
12
|
-
}, api: AdaptableApi, context: OnePageAdaptableWizardContextType<unknown>) => true | "No valid Condition is specified" | "The Predicate is not valid" | "The
|
|
12
|
+
}, api: AdaptableApi, context: OnePageAdaptableWizardContextType<unknown>) => true | "No valid Condition is specified" | "The Predicate is not valid" | "The Expression is not a valid Boolean Expression";
|
|
13
13
|
declare type EntityRulesEditorProps<T> = {
|
|
14
14
|
data: T;
|
|
15
15
|
module: AdaptableModule;
|
|
@@ -25,7 +25,7 @@ exports.isRuleValid = (abObject, api, context) => {
|
|
|
25
25
|
}
|
|
26
26
|
if ((_e = abObject === null || abObject === void 0 ? void 0 : abObject.Rule) === null || _e === void 0 ? void 0 : _e.BooleanExpression) {
|
|
27
27
|
if (!api.queryLanguageApi.isValidBooleanExpression((_f = abObject === null || abObject === void 0 ? void 0 : abObject.Rule) === null || _f === void 0 ? void 0 : _f.BooleanExpression, context.moduleInfo.ModuleName)) {
|
|
28
|
-
return 'The
|
|
28
|
+
return 'The Expression is not a valid Boolean Expression';
|
|
29
29
|
}
|
|
30
30
|
}
|
|
31
31
|
return true;
|
|
@@ -16,7 +16,7 @@ const CustomSettingsPanelView_1 = require("./CustomSettingsPanelView");
|
|
|
16
16
|
const useMenuItems_1 = require("./useMenuItems");
|
|
17
17
|
const AdaptablePopupDialog_1 = require("./AdaptablePopupDialog");
|
|
18
18
|
exports.AdaptablePopup = (props) => {
|
|
19
|
-
var _a, _b;
|
|
19
|
+
var _a, _b, _c;
|
|
20
20
|
const adaptable = AdaptableContext_1.useAdaptable();
|
|
21
21
|
const settingsPanelOptions = adaptable.adaptableOptions.settingsPanelOptions;
|
|
22
22
|
const settingsPanelTitle = adaptable.api.internalApi.getModuleFriendlyName('SettingsPanel');
|
|
@@ -33,16 +33,12 @@ exports.AdaptablePopup = (props) => {
|
|
|
33
33
|
let componentModule = props.componentModule;
|
|
34
34
|
let componentName = props.componentName;
|
|
35
35
|
// ts forces to check for General, there is no menu item General
|
|
36
|
-
const useFirstItem = !props.
|
|
36
|
+
const useFirstItem = !props.componentName;
|
|
37
37
|
if (useFirstItem && firstMenuModule !== 'General') {
|
|
38
38
|
componentModule = firstMenuModule;
|
|
39
39
|
}
|
|
40
|
-
const
|
|
41
|
-
if (
|
|
42
|
-
if (useFirstItem) {
|
|
43
|
-
componentName = firstMenuItem.label;
|
|
44
|
-
}
|
|
45
|
-
const customSettingsPanel = settingsPanelOptions.customSettingsPanels.find((settingsPanel) => settingsPanel.name === componentName);
|
|
40
|
+
const customSettingsPanel = (_c = settingsPanelOptions === null || settingsPanelOptions === void 0 ? void 0 : settingsPanelOptions.customSettingsPanels) === null || _c === void 0 ? void 0 : _c.find((customPanel) => useFirstItem ? customPanel.name === firstMenuItem.label : customPanel.name === componentName);
|
|
41
|
+
if (customSettingsPanel) {
|
|
46
42
|
friendlyName = customSettingsPanel.name;
|
|
47
43
|
activeItem = customSettingsPanel.name;
|
|
48
44
|
moduleViewContent = React.createElement(CustomSettingsPanelView_1.CustomSettingsPanelView, { settingsPanel: customSettingsPanel });
|
|
@@ -32,9 +32,8 @@ exports.useMenuItems = () => {
|
|
|
32
32
|
if (customSettingsPanel) {
|
|
33
33
|
customPanelMenuItem = {
|
|
34
34
|
label: customSettingsPanel.name,
|
|
35
|
-
module: 'CustomSettingsPanelModule',
|
|
36
35
|
isVisible: true,
|
|
37
|
-
reduxAction: PopupRedux.PopupShowScreen(
|
|
36
|
+
reduxAction: PopupRedux.PopupShowScreen(null, customSettingsPanel.name),
|
|
38
37
|
};
|
|
39
38
|
}
|
|
40
39
|
return customPanelMenuItem || visibleItems.find((item) => item.module === moduleName);
|
|
@@ -40,7 +40,7 @@ exports.CustomToolPanelContent = (props) => {
|
|
|
40
40
|
}, []);
|
|
41
41
|
return (React.createElement(React.Fragment, null,
|
|
42
42
|
React.createElement("div", { ref: contentsDivDomRef, id: contentsDivId, className: contentsDivId, dangerouslySetInnerHTML: { __html: contentsHTML }, style: { width: '100%' } }),
|
|
43
|
-
((_a = customToolPanel.
|
|
43
|
+
((_a = customToolPanel.buttons) === null || _a === void 0 ? void 0 : _a.length) && (React.createElement("div", { id: buttonsDivId, className: `ab-ToolPanel__custom-content__buttons ${buttonsDivId}` }, customToolPanel.buttons.map((button) => {
|
|
44
44
|
// TODO: variants of this mapping are present in several places (just search for api.internalApi.getStyleForButton() usages)
|
|
45
45
|
// with the next opportunity we should abstract it
|
|
46
46
|
// the default size of AdapTable SVG ModuleButtons
|
|
@@ -72,7 +72,7 @@ class DashboardPopupComponent extends React.Component {
|
|
|
72
72
|
};
|
|
73
73
|
return (React.createElement(PopupPanel_1.PopupPanel, { headerText: this.props.moduleInfo.FriendlyName, glyphicon: this.props.moduleInfo.Glyph },
|
|
74
74
|
React.createElement(rebass_1.Flex, { flex: 1, height: "100%", flexDirection: "column" },
|
|
75
|
-
areDashboardSettingsVisible && (React.createElement(Panel_1.default, { header: 'Dashboard
|
|
75
|
+
areDashboardSettingsVisible && (React.createElement(Panel_1.default, { header: 'Dashboard Views', style: { height: 'auto', overflow: 'visible' }, variant: "default", borderRadius: "none", marginLeft: 2, marginRight: 2 },
|
|
76
76
|
React.createElement(rebass_1.Flex, null,
|
|
77
77
|
React.createElement(CheckBox_1.CheckBox, { mr: 3, className: `${baseClassName}__Checkbox__collapsed-check`, checked: this.props.IsCollapsed, onChange: (checked) => this.props.onSetDashboardCollapsed(checked) }, "Collapse"),
|
|
78
78
|
' ',
|
|
@@ -16,7 +16,7 @@ exports.isValidFlashingCellRules = (flashingCell, api, context) => {
|
|
|
16
16
|
if (valid && flashingCell.Rule.BooleanExpression) {
|
|
17
17
|
valid = api.queryLanguageApi.isValidBooleanExpression(flashingCell.Rule.BooleanExpression, ModuleConstants_1.FlashingCellModuleId);
|
|
18
18
|
if (!valid) {
|
|
19
|
-
return 'The
|
|
19
|
+
return 'The Expression is not a valid Boolean Expression';
|
|
20
20
|
}
|
|
21
21
|
}
|
|
22
22
|
// boolean expressions may also be saved as named queries
|
|
@@ -4,7 +4,7 @@ import { PlusMinusNudge, AdaptableApi } from '../../../types';
|
|
|
4
4
|
export declare const PlusMinusSettingsSummary: React.FunctionComponent<{
|
|
5
5
|
hasCondition: boolean;
|
|
6
6
|
}>;
|
|
7
|
-
export declare const isSettingsValid: (hasCondition: boolean) => (data: PlusMinusNudge, api: AdaptableApi, context: OnePageAdaptableWizardContextType<PlusMinusNudge>) => true | "No valid Condition is specified" | "The Predicate is not valid" | "The
|
|
7
|
+
export declare const isSettingsValid: (hasCondition: boolean) => (data: PlusMinusNudge, api: AdaptableApi, context: OnePageAdaptableWizardContextType<PlusMinusNudge>) => true | "No valid Condition is specified" | "The Predicate is not valid" | "The Expression is not a valid Boolean Expression" | "Nudge value is not specified" | "Nudge value must be different than 0";
|
|
8
8
|
interface PlusMinusSettingsWizardSectionProps {
|
|
9
9
|
onChange: (plusMinusNudge: PlusMinusNudge) => void;
|
|
10
10
|
hasCondition: boolean;
|
|
@@ -12,11 +12,11 @@ const ModuleConstants_1 = require("../../../Utilities/Constants/ModuleConstants"
|
|
|
12
12
|
const Tag_1 = require("../../../components/Tag");
|
|
13
13
|
exports.isValidNamedQueryExpression = (data, api) => {
|
|
14
14
|
if (!data.BooleanExpression) {
|
|
15
|
-
return '
|
|
15
|
+
return 'Expression is empty';
|
|
16
16
|
}
|
|
17
17
|
const valid = api.queryLanguageApi.isValidBooleanExpression(data.BooleanExpression, ModuleConstants_1.QueryModuleId);
|
|
18
18
|
if (!valid) {
|
|
19
|
-
return 'Query is not a valid
|
|
19
|
+
return 'Query is not a valid Boolean Query';
|
|
20
20
|
}
|
|
21
21
|
return valid;
|
|
22
22
|
};
|
|
@@ -13,10 +13,10 @@ const ObjectFactory_1 = tslib_1.__importDefault(require("../../../Utilities/Obje
|
|
|
13
13
|
const react_redux_1 = require("react-redux");
|
|
14
14
|
const ScheduleRedux = tslib_1.__importStar(require("../../../Redux/ActionsReducers/ScheduleRedux"));
|
|
15
15
|
exports.ScheduleWizard = (props) => {
|
|
16
|
-
var _a, _b;
|
|
16
|
+
var _a, _b, _c;
|
|
17
17
|
const data = (_a = props.data) !== null && _a !== void 0 ? _a : props.popupParams.value;
|
|
18
|
-
const isNew = props.popupParams.action ? props.popupParams.action === 'New' : !props.data;
|
|
19
|
-
const scheduleType = data ? data.ScheduleType : (
|
|
18
|
+
const isNew = ((_b = props.popupParams) === null || _b === void 0 ? void 0 : _b.action) ? props.popupParams.action === 'New' : !props.data;
|
|
19
|
+
const scheduleType = data ? data.ScheduleType : (_c = props === null || props === void 0 ? void 0 : props.abObjectType) === null || _c === void 0 ? void 0 : _c.name;
|
|
20
20
|
const [schedule, setSchedule] = React.useState(() => {
|
|
21
21
|
if (data) {
|
|
22
22
|
return data;
|
|
@@ -151,6 +151,7 @@ export declare class Adaptable implements IAdaptable {
|
|
|
151
151
|
setSelectedRows(): SelectedRowInfo | undefined;
|
|
152
152
|
setValue(dataChangedInfo: DataChangedInfo): void;
|
|
153
153
|
cancelEdit(): void;
|
|
154
|
+
isCellEditable(rowNode: RowNode, column: Column): boolean;
|
|
154
155
|
getDistinctValuesForColumn(column: AdaptableColumn, visibleRowsOnly: boolean, skipRowNode?: RowNode, permittedValues?: any[]): GridCell[];
|
|
155
156
|
getDistinctFilterValuesForColumn(column: AdaptableColumn, visibleRowsOnly: boolean, filter: string, skipRowNode?: RowNode): Promise<{
|
|
156
157
|
suppressClientSideFilter?: boolean;
|
|
@@ -186,7 +187,7 @@ export declare class Adaptable implements IAdaptable {
|
|
|
186
187
|
redrawBody(): void;
|
|
187
188
|
redrawHeader(): void;
|
|
188
189
|
redrawRow(rowNode: RowNode): void;
|
|
189
|
-
refreshCells(rowNodes: RowNode[], columns: (string | Column)[], forceUpdate: boolean): void;
|
|
190
|
+
refreshCells(rowNodes: RowNode[], columns: (string | Column)[], forceUpdate: boolean, suppressFlash?: boolean): void;
|
|
190
191
|
jumpToRow(rowNode: RowNode): void;
|
|
191
192
|
jumpToColumn(columnId: string): void;
|
|
192
193
|
jumpToCell(columnId: string, rowNode: RowNode): void;
|
|
@@ -256,6 +257,7 @@ export declare class Adaptable implements IAdaptable {
|
|
|
256
257
|
setupColumnFilter({ col, colDef }: ColumnSetupInfo): void;
|
|
257
258
|
setupColumnFloatingFilter({ col, colDef }: ColumnSetupInfo): void;
|
|
258
259
|
setupColumnValueFormatter({ col, abColumn }: ColumnSetupInfo): void;
|
|
260
|
+
setupColumnEditable({ col }: ColumnSetupInfo): void;
|
|
259
261
|
setupColumnValueSetter({ col, colId, abColumn }: ColumnSetupInfo): void;
|
|
260
262
|
setupColumnComparator({ col, colId, abColumn }: ColumnSetupInfo): void;
|
|
261
263
|
private applyCurrentTheme;
|
|
@@ -278,7 +280,7 @@ export declare class Adaptable implements IAdaptable {
|
|
|
278
280
|
expandAllRowGroups(): void;
|
|
279
281
|
closeAllRowGroups(): void;
|
|
280
282
|
expandRowGroupsForValues(columnValues: any[]): void;
|
|
281
|
-
|
|
283
|
+
getAgGridColumnForColumnId(columnId: string): Column;
|
|
282
284
|
setRowGroupColumns(columnIds: string[]): void;
|
|
283
285
|
clearRowGroupColumns(): void;
|
|
284
286
|
getExpandRowGroupsKeys(): any[];
|
package/src/agGrid/Adaptable.js
CHANGED
|
@@ -56,6 +56,7 @@ const publishTimestamp_1 = tslib_1.__importDefault(require("../../publishTimesta
|
|
|
56
56
|
const MetamodelService_1 = require("../Utilities/Services/MetamodelService");
|
|
57
57
|
const DocumentationLinkConstants_1 = require("../Utilities/Constants/DocumentationLinkConstants");
|
|
58
58
|
const ModuleConstants_1 = require("../Utilities/Constants/ModuleConstants");
|
|
59
|
+
const CheckboxRenderer_1 = require("./CheckboxRenderer");
|
|
59
60
|
const tinycolor = require('tinycolor2');
|
|
60
61
|
all_modules_1.ModuleRegistry.registerModules(all_modules_1.AllCommunityModules);
|
|
61
62
|
const GROUP_PATH_SEPARATOR = '/';
|
|
@@ -797,6 +798,7 @@ class Adaptable {
|
|
|
797
798
|
return;
|
|
798
799
|
}
|
|
799
800
|
let style = {};
|
|
801
|
+
// percent bar && do we show text
|
|
800
802
|
const columnStyle = formatColumn.ColumnStyle;
|
|
801
803
|
if (columnStyle) {
|
|
802
804
|
const gradientStyle = columnStyle === null || columnStyle === void 0 ? void 0 : columnStyle.GradientStyle;
|
|
@@ -824,6 +826,10 @@ class Adaptable {
|
|
|
824
826
|
}
|
|
825
827
|
style.backgroundColor = tinycolor(cellBackColor).setAlpha(alpha).toRgbString();
|
|
826
828
|
}
|
|
829
|
+
if (columnStyle.PercentBarStyle && columnStyle.PercentBarStyle.CellText) {
|
|
830
|
+
style.paddingTop = 0;
|
|
831
|
+
style.paddingBottom = 0;
|
|
832
|
+
}
|
|
827
833
|
}
|
|
828
834
|
else if (formatColumn.Style) {
|
|
829
835
|
style = this.convertAdaptableStyleToCSS(formatColumn.Style);
|
|
@@ -1240,6 +1246,24 @@ class Adaptable {
|
|
|
1240
1246
|
}
|
|
1241
1247
|
const pivoted = !!layout.EnablePivot;
|
|
1242
1248
|
const shouldUpdatePivoted = this.gridOptions.columnApi.isPivotMode() !== pivoted;
|
|
1249
|
+
/**
|
|
1250
|
+
* Pivot columns are secondary columns that are created on the fly and base
|
|
1251
|
+
* their configuration on the main columns by copying that configuration.
|
|
1252
|
+
* Because they copy the colDefs they might have an old copy of the colldefs.
|
|
1253
|
+
* This is why when the layout is pivoted we need to set columns before pivoting is applied.
|
|
1254
|
+
* e.g. {
|
|
1255
|
+
* field: 'pivot-1',
|
|
1256
|
+
* pivotValueColumn: {
|
|
1257
|
+
* colDef: {
|
|
1258
|
+
* field: 'price',
|
|
1259
|
+
* // this is a copy of the original column
|
|
1260
|
+
* }
|
|
1261
|
+
* }
|
|
1262
|
+
*
|
|
1263
|
+
*/
|
|
1264
|
+
if (shouldUpdatePivoted) {
|
|
1265
|
+
this.setupColumns();
|
|
1266
|
+
}
|
|
1243
1267
|
isChanged = isChanged || shouldUpdatePivoted;
|
|
1244
1268
|
let shouldUpdateHeaders = false;
|
|
1245
1269
|
shouldUpdateHeaders = this.setupColumnHeaderAggregations(layout);
|
|
@@ -1483,7 +1507,8 @@ class Adaptable {
|
|
|
1483
1507
|
return selectedRowInfo;
|
|
1484
1508
|
}
|
|
1485
1509
|
setValue(dataChangedInfo) {
|
|
1486
|
-
// note: because we use
|
|
1510
|
+
// note: because we use RowNode.setDataValue() this will cause Validation to fire
|
|
1511
|
+
// see https://www.ag-grid.com/javascript-data-grid/change-detection/#triggering-value-change-detection
|
|
1487
1512
|
let newValue;
|
|
1488
1513
|
let dataType = dataChangedInfo.column.dataType;
|
|
1489
1514
|
newValue =
|
|
@@ -1520,6 +1545,10 @@ class Adaptable {
|
|
|
1520
1545
|
cancelEdit() {
|
|
1521
1546
|
this.gridOptions.api.stopEditing(true);
|
|
1522
1547
|
}
|
|
1548
|
+
isCellEditable(rowNode, column) {
|
|
1549
|
+
// it's safe to rely on the AG Grid implementation because we override the colDef.editable property, which is in this case the single source of truth
|
|
1550
|
+
return column === null || column === void 0 ? void 0 : column.isCellEditable(rowNode);
|
|
1551
|
+
}
|
|
1523
1552
|
getDistinctValuesForColumn(column, visibleRowsOnly, skipRowNode, permittedValues) {
|
|
1524
1553
|
let returnValues = [];
|
|
1525
1554
|
// this function does NOT look up for server values but actually it should...
|
|
@@ -1909,10 +1938,8 @@ class Adaptable {
|
|
|
1909
1938
|
return isVisible;
|
|
1910
1939
|
}
|
|
1911
1940
|
redrawBody() {
|
|
1912
|
-
|
|
1913
|
-
|
|
1914
|
-
this._emit('GridRefreshed');
|
|
1915
|
-
}, 0);
|
|
1941
|
+
this.gridOptions.api.redrawRows();
|
|
1942
|
+
this._emit('GridRefreshed');
|
|
1916
1943
|
}
|
|
1917
1944
|
redrawHeader() {
|
|
1918
1945
|
this.gridOptions.api.refreshHeader();
|
|
@@ -1933,7 +1960,7 @@ class Adaptable {
|
|
|
1933
1960
|
LoggingHelper_1.ConsoleLogError('ag-grid redrawRows was unable to find some row nodes. Tried to redraw row node: ', rowNode, ex);
|
|
1934
1961
|
}
|
|
1935
1962
|
}
|
|
1936
|
-
refreshCells(rowNodes, columns, forceUpdate) {
|
|
1963
|
+
refreshCells(rowNodes, columns, forceUpdate, suppressFlash = false) {
|
|
1937
1964
|
const api = this.gridOptions.api;
|
|
1938
1965
|
// in order to get a fresh reference to rowNodes
|
|
1939
1966
|
// rowNodes = this.getRowNodesForPrimaryKeys(
|
|
@@ -1943,6 +1970,7 @@ class Adaptable {
|
|
|
1943
1970
|
rowNodes,
|
|
1944
1971
|
columns: columns,
|
|
1945
1972
|
force: forceUpdate,
|
|
1973
|
+
suppressFlash,
|
|
1946
1974
|
};
|
|
1947
1975
|
api.refreshCells(refreshCellParams);
|
|
1948
1976
|
}
|
|
@@ -2362,24 +2390,6 @@ class Adaptable {
|
|
|
2362
2390
|
this.checkColumnsDataTypeSet();
|
|
2363
2391
|
this.setLayout();
|
|
2364
2392
|
});
|
|
2365
|
-
/**
|
|
2366
|
-
* Use Case: User has started to edit a readonly cell
|
|
2367
|
-
* Action1: Stop editing immediately
|
|
2368
|
-
* Note: Deals only with user edits and not ticking data (not a problem)
|
|
2369
|
-
*/
|
|
2370
|
-
this.gridOptions.api.addEventListener(all_modules_1.Events.EVENT_CELL_EDITING_STARTED, (params) => {
|
|
2371
|
-
if (this.gridOptions.columnApi.isPivotMode()) {
|
|
2372
|
-
return;
|
|
2373
|
-
}
|
|
2374
|
-
const cellEditableFn = this.adaptableOptions.editOptions.isCellEditable;
|
|
2375
|
-
if (cellEditableFn) {
|
|
2376
|
-
let gridCell = this.getGridCellFromRowNode(params.node, params.column.getColId());
|
|
2377
|
-
let isEditable = cellEditableFn(gridCell);
|
|
2378
|
-
if (!isEditable) {
|
|
2379
|
-
this.gridOptions.api.stopEditing();
|
|
2380
|
-
}
|
|
2381
|
-
}
|
|
2382
|
-
});
|
|
2383
2393
|
/**
|
|
2384
2394
|
* Use Case: Entered or Left Pivot Mode
|
|
2385
2395
|
* Action 1: Autosize pivot columns when entering pivot mode (if autosize pivot in Layout is true)
|
|
@@ -2511,6 +2521,24 @@ class Adaptable {
|
|
|
2511
2521
|
}
|
|
2512
2522
|
}
|
|
2513
2523
|
});
|
|
2524
|
+
/**
|
|
2525
|
+
* Use Case: Data (cell/row) has changed
|
|
2526
|
+
* Action: Any CheckboxFormatColumns need to be updated, as their disabled state may have changed
|
|
2527
|
+
*/
|
|
2528
|
+
this.gridOptions.api.addGlobalListener((type) => {
|
|
2529
|
+
if ([all_modules_1.Events.EVENT_CELL_VALUE_CHANGED, all_modules_1.Events.EVENT_ROW_VALUE_CHANGED].includes(type)) {
|
|
2530
|
+
const activeCheckboxColumnIds = this.api.columnApi
|
|
2531
|
+
.getColumns()
|
|
2532
|
+
.filter((aColumn) => {
|
|
2533
|
+
const checkboxFormatColumn = this.api.formatColumnApi.getCheckBoxStyleFormatColumn(aColumn);
|
|
2534
|
+
return checkboxFormatColumn && !checkboxFormatColumn.IsSuspended;
|
|
2535
|
+
})
|
|
2536
|
+
.map((aColumn) => aColumn.columnId);
|
|
2537
|
+
if (activeCheckboxColumnIds.length) {
|
|
2538
|
+
this.refreshCells(null, activeCheckboxColumnIds, true, true);
|
|
2539
|
+
}
|
|
2540
|
+
}
|
|
2541
|
+
});
|
|
2514
2542
|
/**
|
|
2515
2543
|
* Row and Cell listeners created in 2020
|
|
2516
2544
|
* These have supplanted many of the events we previously had and simplified things
|
|
@@ -2691,6 +2719,7 @@ class Adaptable {
|
|
|
2691
2719
|
this.setupColumnFilter(colSetupInfo);
|
|
2692
2720
|
this.setupColumnFloatingFilter(colSetupInfo);
|
|
2693
2721
|
this.setupColumnValueFormatter(colSetupInfo);
|
|
2722
|
+
this.setupColumnEditable(colSetupInfo);
|
|
2694
2723
|
this.setupColumnValueSetter(colSetupInfo);
|
|
2695
2724
|
this.setupColumnComparator(colSetupInfo);
|
|
2696
2725
|
this.setupColumnCellEditor(colSetupInfo);
|
|
@@ -2854,6 +2883,11 @@ class Adaptable {
|
|
|
2854
2883
|
const adaptableColumn = this.api.columnApi.getColumnFromId(colId);
|
|
2855
2884
|
const editLookUpItem = this.api.userInterfaceApi.getEditLookUpItemForColumn(adaptableColumn);
|
|
2856
2885
|
this.setColDefProperty(col, 'cellEditor', () => {
|
|
2886
|
+
var _a;
|
|
2887
|
+
const formatColumn = this.api.formatColumnApi.getFormatColumnForColumn(adaptableColumn);
|
|
2888
|
+
if (formatColumn && !(formatColumn === null || formatColumn === void 0 ? void 0 : formatColumn.IsSuspended) && ((_a = formatColumn.ColumnStyle) === null || _a === void 0 ? void 0 : _a.CheckBoxStyle)) {
|
|
2889
|
+
return CheckboxRenderer_1.CheckboxEditor;
|
|
2890
|
+
}
|
|
2857
2891
|
if (editLookUpItem) {
|
|
2858
2892
|
return this.isModulePresent('rich-select')
|
|
2859
2893
|
? 'agRichSelectCellEditor'
|
|
@@ -2874,7 +2908,7 @@ class Adaptable {
|
|
|
2874
2908
|
setupColumnCellRenderer({ col, colId, abColumn }) {
|
|
2875
2909
|
this.setColDefProperty(col, 'cellRenderer', () => {
|
|
2876
2910
|
const formatColumn = this.api.formatColumnApi.getFormatColumnForColumn(abColumn);
|
|
2877
|
-
if (!(formatColumn === null || formatColumn === void 0 ? void 0 : formatColumn.IsSuspended) && formatColumn
|
|
2911
|
+
if (formatColumn && !(formatColumn === null || formatColumn === void 0 ? void 0 : formatColumn.IsSuspended) && formatColumn.ColumnStyle) {
|
|
2878
2912
|
if (formatColumn.ColumnStyle.PercentBarStyle) {
|
|
2879
2913
|
return this.agGridHelper.createNumericStyleRendererFunc(formatColumn);
|
|
2880
2914
|
}
|
|
@@ -3021,6 +3055,23 @@ class Adaptable {
|
|
|
3021
3055
|
}
|
|
3022
3056
|
});
|
|
3023
3057
|
}
|
|
3058
|
+
setupColumnEditable({ col }) {
|
|
3059
|
+
this.setColDefProperty(col, 'editable', (userValue) => {
|
|
3060
|
+
// if AG Grid defines the column as NOT editable, we don't mess with it
|
|
3061
|
+
if (typeof userValue === 'boolean' && userValue === false) {
|
|
3062
|
+
return userValue;
|
|
3063
|
+
}
|
|
3064
|
+
const cellEditableFn = this.adaptableOptions.editOptions.isCellEditable;
|
|
3065
|
+
if (!cellEditableFn) {
|
|
3066
|
+
return userValue;
|
|
3067
|
+
}
|
|
3068
|
+
const editableCallback = (params) => {
|
|
3069
|
+
const gridCell = this.getGridCellFromRowNode(params.node, params.column.getColId());
|
|
3070
|
+
return cellEditableFn(gridCell);
|
|
3071
|
+
};
|
|
3072
|
+
return editableCallback;
|
|
3073
|
+
});
|
|
3074
|
+
}
|
|
3024
3075
|
setupColumnValueSetter({ col, colId, abColumn }) {
|
|
3025
3076
|
this.setColDefProperty(col, 'valueSetter', (userValueSetter) => {
|
|
3026
3077
|
var _a;
|
|
@@ -3029,19 +3080,14 @@ class Adaptable {
|
|
|
3029
3080
|
.filter((alertDefinition) => {
|
|
3030
3081
|
return this.api.scopeApi.isColumnInScope(abColumn, alertDefinition.Scope);
|
|
3031
3082
|
});
|
|
3032
|
-
const cellEditableFn = this.adaptableOptions.editOptions.isCellEditable;
|
|
3033
3083
|
const noValidations = !preventEditAlertsForColumn.length && !((_a = this.adaptableOptions.editOptions) === null || _a === void 0 ? void 0 : _a.validateOnServer);
|
|
3034
|
-
if (noValidations
|
|
3084
|
+
if (noValidations) {
|
|
3035
3085
|
return;
|
|
3036
3086
|
}
|
|
3037
3087
|
const valueSetter = (params) => {
|
|
3038
3088
|
var _a;
|
|
3039
|
-
if (
|
|
3040
|
-
|
|
3041
|
-
let isEditable = cellEditableFn(gridCell);
|
|
3042
|
-
if (!isEditable) {
|
|
3043
|
-
return false;
|
|
3044
|
-
}
|
|
3089
|
+
if (preventEditAlertsForColumn.length) {
|
|
3090
|
+
return false;
|
|
3045
3091
|
}
|
|
3046
3092
|
const field = params.column.getColDef().field;
|
|
3047
3093
|
if (noValidations) {
|
|
@@ -3066,10 +3112,6 @@ class Adaptable {
|
|
|
3066
3112
|
rowNode: params.node,
|
|
3067
3113
|
trigger: 'edit',
|
|
3068
3114
|
});
|
|
3069
|
-
// just Prevent Edit Alerts below
|
|
3070
|
-
if (!preventEditAlertsForColumn.length) {
|
|
3071
|
-
return true;
|
|
3072
|
-
}
|
|
3073
3115
|
if (dataChangedInfo.oldValue === dataChangedInfo.newValue) {
|
|
3074
3116
|
return true;
|
|
3075
3117
|
}
|
|
@@ -3389,10 +3431,8 @@ class Adaptable {
|
|
|
3389
3431
|
this.gridOptions.api.onGroupExpandedOrCollapsed();
|
|
3390
3432
|
}
|
|
3391
3433
|
}
|
|
3392
|
-
|
|
3393
|
-
return this.gridOptions.columnApi
|
|
3394
|
-
.getAllColumns()
|
|
3395
|
-
.find((c) => c.getColId() === abColumn.columnId);
|
|
3434
|
+
getAgGridColumnForColumnId(columnId) {
|
|
3435
|
+
return this.gridOptions.columnApi.getColumn(columnId);
|
|
3396
3436
|
}
|
|
3397
3437
|
setRowGroupColumns(columnIds) {
|
|
3398
3438
|
this.gridOptions.columnApi.setRowGroupColumns(columnIds);
|
|
@@ -3719,7 +3759,8 @@ class Adaptable {
|
|
|
3719
3759
|
return false;
|
|
3720
3760
|
}
|
|
3721
3761
|
showQuickFilter() {
|
|
3722
|
-
this.
|
|
3762
|
+
const height = this.api.internalApi.getAdaptableOptions().filterOptions.quickFilterHeight;
|
|
3763
|
+
this.gridOptions.api.setFloatingFiltersHeight(height);
|
|
3723
3764
|
}
|
|
3724
3765
|
hideQuickFilter() {
|
|
3725
3766
|
this.gridOptions.api.setFloatingFiltersHeight(0);
|
|
@@ -1,3 +1,10 @@
|
|
|
1
1
|
import { ICellRendererFunc } from '@ag-grid-community/all-modules';
|
|
2
2
|
import { AdaptableApi } from '../Api/AdaptableApi';
|
|
3
|
-
|
|
3
|
+
import { ICellEditorComp, ICellEditorParams } from '@ag-grid-community/core/dist/cjs/es5/interfaces/iCellEditor';
|
|
4
|
+
export declare const getCheckboxRendererForColumn: (columnId: string, isColumnReadOnly: boolean, api: AdaptableApi) => ICellRendererFunc;
|
|
5
|
+
export declare class CheckboxEditor implements ICellEditorComp {
|
|
6
|
+
isCancelBeforeStart(): boolean;
|
|
7
|
+
init(params: ICellEditorParams): void;
|
|
8
|
+
getGui(): HTMLElement;
|
|
9
|
+
getValue(): any;
|
|
10
|
+
}
|