@adaptabletools/adaptable 13.0.0-canary.20 → 13.0.0-canary.22
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/bundle.cjs.js +218 -218
- package/package.json +1 -1
- package/publishTimestamp.d.ts +1 -1
- package/publishTimestamp.js +1 -1
- package/src/AdaptableOptions/UserInterfaceOptions.d.ts +2 -2
- package/src/Api/AdaptableApi.d.ts +0 -5
- package/src/Api/ConfigApi.d.ts +0 -5
- package/src/Api/Implementation/AdaptableApiImpl.d.ts +0 -2
- package/src/Api/Implementation/AdaptableApiImpl.js +0 -3
- package/src/Api/Implementation/AlertApiImpl.js +9 -4
- package/src/Api/Implementation/ConfigApiImpl.d.ts +0 -2
- package/src/Api/Implementation/ConfigApiImpl.js +0 -11
- package/src/Api/Implementation/FlashingCellApiImpl.js +4 -1
- package/src/Api/Implementation/InternalApiImpl.d.ts +1 -0
- package/src/Api/Implementation/InternalApiImpl.js +5 -0
- package/src/Api/InternalApi.d.ts +1 -0
- package/src/Redux/DeadRedux.d.ts +6 -0
- package/src/Redux/DeadRedux.js +19 -1
- package/src/Redux/Store/AdaptableStore.js +2 -8
- package/src/Strategy/ConditionalStyleModule.d.ts +2 -23
- package/src/Strategy/ConditionalStyleModule.js +0 -189
- package/src/Strategy/FormatColumnModule.js +2 -2
- package/src/Strategy/LayoutModule.js +0 -4
- package/src/Utilities/Defaults/DefaultSettingsPanel.js +0 -1
- package/src/Utilities/Services/ModuleService.js +0 -2
- package/src/Utilities/Services/QueryLanguageService.js +1 -1
- package/src/View/Alert/Wizard/AlertBehaviourWizardSection.js +12 -11
- package/src/View/Alert/Wizard/AlertButtonsEditor.js +24 -1
- package/src/View/Alert/Wizard/isValidAlertRules.js +1 -1
- package/src/View/GridInfo/ColumnInfoComponent.js +0 -7
- package/src/agGrid/agGridHelper.js +1 -2
- package/src/metamodel/adaptable.metamodel.d.ts +22 -26
- package/src/metamodel/adaptable.metamodel.js +1 -1
- package/src/types.d.ts +0 -2
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/src/Api/ConditionalStyleApi.d.ts +0 -86
- package/src/Api/ConditionalStyleApi.js +0 -2
- 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 -31
- package/src/Redux/ActionsReducers/ConditionalStyleRedux.js +0 -77
- package/src/Strategy/Interface/IConditionalStyleModule.d.ts +0 -6
- package/src/Strategy/Interface/IConditionalStyleModule.js +0 -2
- package/src/Strategy/Utilities/getStyleViewItems.d.ts +0 -2
- package/src/Strategy/Utilities/getStyleViewItems.js +0 -16
- package/src/View/ConditionalStyle/ConditionalStylePopupHeader.d.ts +0 -2
- package/src/View/ConditionalStyle/ConditionalStylePopupHeader.js +0 -18
- package/src/View/ConditionalStyle/ConditionalStyleSummary.d.ts +0 -25
- package/src/View/ConditionalStyle/ConditionalStyleSummary.js +0 -108
- package/src/View/ConditionalStyle/Wizard/ConditionalStyleRuleWizardSection.d.ts +0 -9
- package/src/View/ConditionalStyle/Wizard/ConditionalStyleRuleWizardSection.js +0 -42
- package/src/View/ConditionalStyle/Wizard/ConditionalStyleScopeWizardSection.d.ts +0 -8
- package/src/View/ConditionalStyle/Wizard/ConditionalStyleScopeWizardSection.js +0 -43
- package/src/View/ConditionalStyle/Wizard/ConditionalStyleSettingsWizardSettings.d.ts +0 -8
- package/src/View/ConditionalStyle/Wizard/ConditionalStyleSettingsWizardSettings.js +0 -29
- package/src/View/ConditionalStyle/Wizard/ConditionalStyleStyleWizardSection.d.ts +0 -8
- package/src/View/ConditionalStyle/Wizard/ConditionalStyleStyleWizardSection.js +0 -23
- package/src/View/ConditionalStyle/Wizard/ConditionalStyleWizard.d.ts +0 -6
- package/src/View/ConditionalStyle/Wizard/ConditionalStyleWizard.js +0 -104
- 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
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.ConditionalStyleScopeWizardSection = exports.renderConditionalStyleScopeSummary = void 0;
|
|
4
|
-
const tslib_1 = require("tslib");
|
|
5
|
-
const React = tslib_1.__importStar(require("react"));
|
|
6
|
-
const OnePageAdaptableWizard_1 = require("../../Wizard/OnePageAdaptableWizard");
|
|
7
|
-
const NewScopeComponent_1 = require("../../Components/NewScopeComponent");
|
|
8
|
-
const DEFAULT_PREDICATE_ID_FOR_CONDITIONAL_STYLE_1 = require("./DEFAULT_PREDICATE_ID_FOR_CONDITIONAL_STYLE");
|
|
9
|
-
const renderConditionalStyleScopeSummary = (data) => {
|
|
10
|
-
return (0, NewScopeComponent_1.renderScopeSummary)(data.Scope, {
|
|
11
|
-
scopeWholeRow: 'Matching rows will display the Conditionally Style',
|
|
12
|
-
scopeColumns: 'Cells in selected columns will display the Conditionally Style',
|
|
13
|
-
scopeDataTypes: 'Cells in columns of the selected data-types will display the Conditionally Style',
|
|
14
|
-
});
|
|
15
|
-
};
|
|
16
|
-
exports.renderConditionalStyleScopeSummary = renderConditionalStyleScopeSummary;
|
|
17
|
-
function ConditionalStyleScopeWizardSection(props) {
|
|
18
|
-
const { data, api } = (0, OnePageAdaptableWizard_1.useOnePageAdaptableWizardContext)();
|
|
19
|
-
return (React.createElement(React.Fragment, null,
|
|
20
|
-
React.createElement(NewScopeComponent_1.NewScopeComponent, { scope: data.Scope, descriptions: {
|
|
21
|
-
rowScope: 'Matching Rows will have the Conditional Style applied',
|
|
22
|
-
columnScope: 'Matching Columns will have the Conditional Style applied',
|
|
23
|
-
}, updateScope: (Scope) => {
|
|
24
|
-
const newData = Object.assign(Object.assign({}, data), { Scope });
|
|
25
|
-
const wholeRow = api.scopeApi.scopeIsAll(Scope);
|
|
26
|
-
if (newData.Rule.Predicate) {
|
|
27
|
-
if (wholeRow) {
|
|
28
|
-
// if scope is whole row, a predicate cannot be present, so we set the rule
|
|
29
|
-
// to be a boolean expression
|
|
30
|
-
delete newData.Rule.Predicate;
|
|
31
|
-
newData.Rule.BooleanExpression = '';
|
|
32
|
-
}
|
|
33
|
-
else {
|
|
34
|
-
// if scope is not whole row, if you have a predicate, reset it
|
|
35
|
-
newData.Rule.Predicate = {
|
|
36
|
-
PredicateId: DEFAULT_PREDICATE_ID_FOR_CONDITIONAL_STYLE_1.DEFAULT_PREDICATE_ID_FOR_CONDITIONAL_STYLE,
|
|
37
|
-
};
|
|
38
|
-
}
|
|
39
|
-
}
|
|
40
|
-
props.onChange(newData);
|
|
41
|
-
} })));
|
|
42
|
-
}
|
|
43
|
-
exports.ConditionalStyleScopeWizardSection = ConditionalStyleScopeWizardSection;
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
import { ConditionalStyle } from '../../../../types';
|
|
3
|
-
export declare const renderConditionalStyleSettingsSummary: (data: ConditionalStyle) => JSX.Element;
|
|
4
|
-
interface ConditionalStyleSettingsWizardSettingsProps {
|
|
5
|
-
onChange: (data: ConditionalStyle) => void;
|
|
6
|
-
}
|
|
7
|
-
export declare const ConditionalStyleSettingsWizardSettings: React.FunctionComponent<ConditionalStyleSettingsWizardSettingsProps>;
|
|
8
|
-
export {};
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.ConditionalStyleSettingsWizardSettings = exports.renderConditionalStyleSettingsSummary = void 0;
|
|
4
|
-
const tslib_1 = require("tslib");
|
|
5
|
-
const React = tslib_1.__importStar(require("react"));
|
|
6
|
-
const rebass_1 = require("rebass");
|
|
7
|
-
const CheckBox_1 = require("../../../components/CheckBox");
|
|
8
|
-
const FormLayout_1 = tslib_1.__importStar(require("../../../components/FormLayout"));
|
|
9
|
-
const Tabs_1 = require("../../../components/Tabs");
|
|
10
|
-
const OnePageAdaptableWizard_1 = require("../../Wizard/OnePageAdaptableWizard");
|
|
11
|
-
const renderConditionalStyleSettingsSummary = (data) => (React.createElement(rebass_1.Box, { padding: 2 },
|
|
12
|
-
React.createElement(rebass_1.Text, null, "Include grouped rows"),
|
|
13
|
-
React.createElement(rebass_1.Text, { mt: 3 }, data.IncludeGroupedRows ? 'Yes' : 'No')));
|
|
14
|
-
exports.renderConditionalStyleSettingsSummary = renderConditionalStyleSettingsSummary;
|
|
15
|
-
const ConditionalStyleSettingsWizardSettings = (props) => {
|
|
16
|
-
const { data } = (0, OnePageAdaptableWizard_1.useOnePageAdaptableWizardContext)();
|
|
17
|
-
const onIncludeGroupedRowsChanged = (checked) => {
|
|
18
|
-
props.onChange(Object.assign(Object.assign({}, data), { IncludeGroupedRows: checked }));
|
|
19
|
-
};
|
|
20
|
-
return (React.createElement(Tabs_1.Tabs, null,
|
|
21
|
-
React.createElement(Tabs_1.Tabs.Tab, null, "Settings"),
|
|
22
|
-
React.createElement(Tabs_1.Tabs.Content, null,
|
|
23
|
-
React.createElement(rebass_1.Flex, { flexDirection: "row" },
|
|
24
|
-
React.createElement(FormLayout_1.default, null,
|
|
25
|
-
React.createElement(FormLayout_1.FormRow, { label: "Include Grouped Rows:" },
|
|
26
|
-
React.createElement(rebass_1.Flex, { alignItems: "center", marginLeft: 2 },
|
|
27
|
-
React.createElement(CheckBox_1.CheckBox, { "data-name": "inlcude-grouped-rows", checked: data.IncludeGroupedRows, onChange: onIncludeGroupedRowsChanged, mr: 2 }))))))));
|
|
28
|
-
};
|
|
29
|
-
exports.ConditionalStyleSettingsWizardSettings = ConditionalStyleSettingsWizardSettings;
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
import { ConditionalStyle } from '../../../types';
|
|
3
|
-
declare type ConditionalStyleStyleWizardSectionProps = {
|
|
4
|
-
onChange: (data: ConditionalStyle) => void;
|
|
5
|
-
};
|
|
6
|
-
export declare const renderConditionalStyleStyleSummary: (data: ConditionalStyle) => JSX.Element;
|
|
7
|
-
export declare function ConditionalStyleStyleWizardSection(props: ConditionalStyleStyleWizardSectionProps): JSX.Element;
|
|
8
|
-
export {};
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.ConditionalStyleStyleWizardSection = exports.renderConditionalStyleStyleSummary = void 0;
|
|
4
|
-
const tslib_1 = require("tslib");
|
|
5
|
-
const React = tslib_1.__importStar(require("react"));
|
|
6
|
-
const StyleComponent_1 = require("../../Components/StyleComponent");
|
|
7
|
-
const OnePageAdaptableWizard_1 = require("../../Wizard/OnePageAdaptableWizard");
|
|
8
|
-
const rebass_1 = require("rebass");
|
|
9
|
-
const StyleHelper_1 = require("../../../Utilities/Helpers/StyleHelper");
|
|
10
|
-
const toStyle = (style) => {
|
|
11
|
-
return Object.assign(Object.assign({}, (0, StyleHelper_1.convertAdaptableStyleToCSS)(style !== null && style !== void 0 ? style : {})), { borderWidth: (style === null || style === void 0 ? void 0 : style.BorderColor) ? 2 : 0, borderStyle: 'solid' });
|
|
12
|
-
};
|
|
13
|
-
const renderConditionalStyleStyleSummary = (data) => {
|
|
14
|
-
return (React.createElement(rebass_1.Text, { padding: 2, style: toStyle(data.Style) }, "Preview result"));
|
|
15
|
-
};
|
|
16
|
-
exports.renderConditionalStyleStyleSummary = renderConditionalStyleStyleSummary;
|
|
17
|
-
function ConditionalStyleStyleWizardSection(props) {
|
|
18
|
-
const { data, api } = (0, OnePageAdaptableWizard_1.useOnePageAdaptableWizardContext)();
|
|
19
|
-
return (React.createElement(StyleComponent_1.StyleComponent, { headless: true, api: api, Style: data.Style, UpdateStyle: (Style) => {
|
|
20
|
-
props.onChange(Object.assign(Object.assign({}, data), { Style }));
|
|
21
|
-
} }));
|
|
22
|
-
}
|
|
23
|
-
exports.ConditionalStyleStyleWizardSection = ConditionalStyleStyleWizardSection;
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
import { AdaptableOnePageWizardProps } from '../../Wizard/Interface/IAdaptableWizard';
|
|
3
|
-
import { ConditionalStyle } from '../../../types';
|
|
4
|
-
export interface ConditionalStyleWizardProps extends AdaptableOnePageWizardProps<ConditionalStyle> {
|
|
5
|
-
}
|
|
6
|
-
export declare const ConditionalStyleWizard: React.FunctionComponent<ConditionalStyleWizardProps>;
|
|
@@ -1,104 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.ConditionalStyleWizard = void 0;
|
|
4
|
-
const tslib_1 = require("tslib");
|
|
5
|
-
const React = tslib_1.__importStar(require("react"));
|
|
6
|
-
const react_1 = require("react");
|
|
7
|
-
const rebass_1 = require("rebass");
|
|
8
|
-
const OnePageAdaptableWizard_1 = require("../../Wizard/OnePageAdaptableWizard");
|
|
9
|
-
const Helper_1 = require("../../../Utilities/Helpers/Helper");
|
|
10
|
-
const ConditionalStyleStyleWizardSection_1 = require("./ConditionalStyleStyleWizardSection");
|
|
11
|
-
const ConditionalStyleScopeWizardSection_1 = require("./ConditionalStyleScopeWizardSection");
|
|
12
|
-
const ConditionalStyleRuleWizardSection_1 = require("./ConditionalStyleRuleWizardSection");
|
|
13
|
-
const DEFAULT_PREDICATE_ID_FOR_CONDITIONAL_STYLE_1 = require("./DEFAULT_PREDICATE_ID_FOR_CONDITIONAL_STYLE");
|
|
14
|
-
const CheckBox_1 = require("../../../components/CheckBox");
|
|
15
|
-
const NewScopeComponent_1 = require("../../Components/NewScopeComponent");
|
|
16
|
-
const EntityRulesEditor_1 = require("../../Components/EntityRulesEditor");
|
|
17
|
-
const ObjectFactory_1 = tslib_1.__importDefault(require("../../../Utilities/ObjectFactory"));
|
|
18
|
-
const react_redux_1 = require("react-redux");
|
|
19
|
-
const ConditionalStyleSettingsWizardSettings_1 = require("./ConditionalStyleSettingsWizardSettings");
|
|
20
|
-
const ObjectTagsWizardSection_1 = require("../../Wizard/ObjectTagsWizardSection");
|
|
21
|
-
const ConditionalStyleWizard = (props) => {
|
|
22
|
-
var _a, _b;
|
|
23
|
-
const data = (_a = props.data) !== null && _a !== void 0 ? _a : (_b = props.popupParams) === null || _b === void 0 ? void 0 : _b.value;
|
|
24
|
-
const [conditionalStyle, setConditionalStyle] = (0, react_1.useState)(() => {
|
|
25
|
-
var _a, _b, _c;
|
|
26
|
-
const DEFAULT_RULE = {
|
|
27
|
-
BooleanExpression: '',
|
|
28
|
-
};
|
|
29
|
-
const conditionalStyle = data ? (0, Helper_1.cloneObject)(data) : ObjectFactory_1.default.CreateEmptyConditionalStyle();
|
|
30
|
-
conditionalStyle.Scope = (_a = conditionalStyle.Scope) !== null && _a !== void 0 ? _a : { All: true };
|
|
31
|
-
if (!conditionalStyle.Rule) {
|
|
32
|
-
conditionalStyle.Rule = DEFAULT_RULE;
|
|
33
|
-
}
|
|
34
|
-
if (!conditionalStyle.Rule.Predicate && conditionalStyle.Rule.BooleanExpression == undefined) {
|
|
35
|
-
conditionalStyle.Rule.BooleanExpression = '';
|
|
36
|
-
}
|
|
37
|
-
if (((_b = props.popupParams) === null || _b === void 0 ? void 0 : _b.action) === 'New' && ((_c = props.popupParams) === null || _c === void 0 ? void 0 : _c.column)) {
|
|
38
|
-
conditionalStyle.Scope = {
|
|
39
|
-
ColumnIds: [props.popupParams.column.columnId],
|
|
40
|
-
};
|
|
41
|
-
}
|
|
42
|
-
return conditionalStyle;
|
|
43
|
-
});
|
|
44
|
-
const dispatch = (0, react_redux_1.useDispatch)();
|
|
45
|
-
return (React.createElement(OnePageAdaptableWizard_1.OnePageAdaptableWizard, { defaultCurrentSectionName: props.defaultCurrentSectionName, moduleInfo: props.moduleInfo, data: conditionalStyle, onHide: props.onCloseWizard, sections: [
|
|
46
|
-
{
|
|
47
|
-
title: 'Style',
|
|
48
|
-
details: 'Specify the Style to be applied conditionally',
|
|
49
|
-
renderSummary: ConditionalStyleStyleWizardSection_1.renderConditionalStyleStyleSummary,
|
|
50
|
-
render: () => {
|
|
51
|
-
return (React.createElement(rebass_1.Box, { padding: 2 },
|
|
52
|
-
React.createElement(ConditionalStyleStyleWizardSection_1.ConditionalStyleStyleWizardSection, { onChange: setConditionalStyle })));
|
|
53
|
-
},
|
|
54
|
-
},
|
|
55
|
-
{
|
|
56
|
-
title: 'Target',
|
|
57
|
-
isValid: NewScopeComponent_1.isScopeValid,
|
|
58
|
-
renderSummary: ConditionalStyleScopeWizardSection_1.renderConditionalStyleScopeSummary,
|
|
59
|
-
details: (React.createElement(rebass_1.Flex, { flexDirection: "row", alignItems: "center" },
|
|
60
|
-
"Specify where the Conditional Style should be applied",
|
|
61
|
-
React.createElement("div", { style: { flex: 1 } }),
|
|
62
|
-
React.createElement(CheckBox_1.CheckBox, { margin: 0, marginLeft: 2, onChange: (IncludeGroupedRows) => {
|
|
63
|
-
setConditionalStyle(Object.assign(Object.assign({}, conditionalStyle), { IncludeGroupedRows: IncludeGroupedRows }));
|
|
64
|
-
}, checked: conditionalStyle.IncludeGroupedRows }, "Include Grouped Rows"))),
|
|
65
|
-
render: () => {
|
|
66
|
-
return (React.createElement(rebass_1.Flex, { flexDirection: "column", style: { height: '100%' }, padding: 2 },
|
|
67
|
-
React.createElement(ConditionalStyleScopeWizardSection_1.ConditionalStyleScopeWizardSection, { onChange: setConditionalStyle })));
|
|
68
|
-
},
|
|
69
|
-
},
|
|
70
|
-
{
|
|
71
|
-
isValid: EntityRulesEditor_1.isRuleValid,
|
|
72
|
-
title: 'Condition',
|
|
73
|
-
details: 'Build the rules when the Conditional Style should be applied',
|
|
74
|
-
render: () => {
|
|
75
|
-
return (React.createElement(ConditionalStyleRuleWizardSection_1.ConditionalStyleRuleWizardSection, { onChange: setConditionalStyle, defaultPredicateId: DEFAULT_PREDICATE_ID_FOR_CONDITIONAL_STYLE_1.DEFAULT_PREDICATE_ID_FOR_CONDITIONAL_STYLE }));
|
|
76
|
-
},
|
|
77
|
-
renderSummary: ConditionalStyleRuleWizardSection_1.renderConditionalStyleRuleSummary,
|
|
78
|
-
},
|
|
79
|
-
{
|
|
80
|
-
title: 'Settings',
|
|
81
|
-
renderSummary: ConditionalStyleSettingsWizardSettings_1.renderConditionalStyleSettingsSummary,
|
|
82
|
-
render: () => (React.createElement(rebass_1.Box, { padding: 2 },
|
|
83
|
-
React.createElement(ConditionalStyleSettingsWizardSettings_1.ConditionalStyleSettingsWizardSettings, { onChange: setConditionalStyle }))),
|
|
84
|
-
},
|
|
85
|
-
{
|
|
86
|
-
details: 'Select Conditional Style tags',
|
|
87
|
-
title: 'Tags',
|
|
88
|
-
isVisible: (_, api) => api.internalApi.shouldDisplayTagSections(),
|
|
89
|
-
render: () => (React.createElement(rebass_1.Box, { padding: 2 },
|
|
90
|
-
React.createElement(ObjectTagsWizardSection_1.ObjectTagsWizardSection, { onChange: setConditionalStyle }))),
|
|
91
|
-
renderSummary: ObjectTagsWizardSection_1.renderObjectTagsSummary,
|
|
92
|
-
},
|
|
93
|
-
'-',
|
|
94
|
-
{
|
|
95
|
-
details: 'Review the Conditional Style',
|
|
96
|
-
render: () => {
|
|
97
|
-
return (React.createElement(rebass_1.Box, { padding: 2 },
|
|
98
|
-
React.createElement(OnePageAdaptableWizard_1.OnePageWizardSummary, null)));
|
|
99
|
-
},
|
|
100
|
-
title: 'Summary',
|
|
101
|
-
},
|
|
102
|
-
] }));
|
|
103
|
-
};
|
|
104
|
-
exports.ConditionalStyleWizard = ConditionalStyleWizard;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const DEFAULT_PREDICATE_ID_FOR_CONDITIONAL_STYLE = "NonBlanks";
|