@adaptabletools/adaptable 15.3.2 → 15.3.3-canary.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/base.css +57 -2
- package/base.css.map +1 -1
- package/bundle.cjs.js +156 -156
- package/index.css +83 -2
- package/index.css.map +1 -1
- package/package.json +1 -1
- package/publishTimestamp.d.ts +1 -1
- package/publishTimestamp.js +1 -1
- package/src/AdaptableOptions/ActionOptions.d.ts +6 -1
- package/src/AdaptableOptions/EditOptions.d.ts +35 -6
- package/src/AdaptableOptions/EntitlementOptions.d.ts +3 -2
- package/src/AdaptableOptions/ExportOptions.d.ts +1 -1
- package/src/AdaptableOptions/FilterOptions.d.ts +9 -3
- package/src/AdaptableOptions/LayoutOptions.d.ts +1 -1
- package/src/Api/Implementation/StyledColumnApiImpl.d.ts +1 -0
- package/src/Api/Implementation/StyledColumnApiImpl.js +12 -0
- package/src/Api/Internal/StyledColumnInternalApi.d.ts +3 -1
- package/src/Api/Internal/StyledColumnInternalApi.js +24 -0
- package/src/Api/StyledColumnApi.d.ts +5 -0
- package/src/PredefinedConfig/Common/AdaptableFormat.d.ts +1 -2
- package/src/PredefinedConfig/Common/AdaptableIcon.d.ts +1 -1
- package/src/PredefinedConfig/Common/AdaptablePredicate.js +5 -5
- package/src/PredefinedConfig/Common/AdaptableStyle.d.ts +8 -0
- package/src/PredefinedConfig/Common/Enums.js +1 -0
- package/src/PredefinedConfig/StyledColumnState.d.ts +61 -5
- package/src/Redux/Store/AdaptableReduxMerger.js +1 -1
- package/src/Strategy/BulkUpdateModule.js +1 -1
- package/src/Strategy/CalculatedColumnModule.js +1 -1
- package/src/Strategy/CellSummaryModule.js +1 -1
- package/src/Strategy/CustomSortModule.js +1 -1
- package/src/Strategy/DashboardModule.js +2 -2
- package/src/Strategy/DataChangeHistoryModule.js +1 -1
- package/src/Strategy/FilterModule.js +1 -1
- package/src/Strategy/FlashingCellModule.js +1 -1
- package/src/Strategy/FormatColumnModule.js +42 -3
- package/src/Strategy/FreeTextColumnModule.js +1 -1
- package/src/Strategy/GridInfoModule.js +2 -2
- package/src/Strategy/LayoutModule.js +7 -6
- package/src/Strategy/PlusMinusModule.js +1 -1
- package/src/Strategy/QueryModule.js +1 -1
- package/src/Strategy/QuickSearchModule.js +1 -1
- package/src/Strategy/ShortcutModule.js +1 -1
- package/src/Strategy/SmartEditModule.js +1 -1
- package/src/Strategy/StateManagementModule.js +1 -1
- package/src/Strategy/StyledColumnModule.d.ts +2 -0
- package/src/Strategy/StyledColumnModule.js +132 -59
- package/src/Strategy/SystemStatusModule.js +1 -1
- package/src/Strategy/TeamSharingModule.js +1 -1
- package/src/Strategy/ToolPanelModule.js +1 -1
- package/src/Utilities/Constants/GeneralConstants.d.ts +2 -0
- package/src/Utilities/Constants/GeneralConstants.js +4 -2
- package/src/Utilities/Defaults/DefaultAdaptableOptions.js +1 -0
- package/src/Utilities/Helpers/StyleHelper.js +19 -0
- package/src/Utilities/ObjectFactory.d.ts +3 -1
- package/src/Utilities/ObjectFactory.js +14 -1
- package/src/Utilities/Services/EntitlementService.js +7 -4
- package/src/Utilities/Services/ValidationService.js +13 -2
- package/src/View/Alert/Wizard/AlertButtonsEditor.js +27 -25
- package/src/View/Charting/ShowChartButton.js +1 -1
- package/src/View/Components/AdaptableObjectList/AdaptableObjectList.js +1 -1
- package/src/View/Components/Buttons/ButtonClear.js +1 -1
- package/src/View/Components/Buttons/ButtonClose.js +1 -1
- package/src/View/Components/Buttons/ButtonConfigure.js +1 -1
- package/src/View/Components/Buttons/ButtonDelete.js +1 -1
- package/src/View/Components/Buttons/ButtonExpand.js +1 -1
- package/src/View/Components/Buttons/ButtonInvalid.js +1 -1
- package/src/View/Components/Buttons/ButtonLogin.js +1 -1
- package/src/View/Components/Buttons/ButtonPreviewDelete.js +1 -1
- package/src/View/Components/Buttons/ButtonShare.js +1 -1
- package/src/View/Components/FilterForm/QuickFilterForm.js +10 -2
- package/src/View/Components/Forms/AdaptableFormControlTextClear.js +1 -1
- package/src/View/Components/ListBox/ListBoxFilterSortComponent.js +1 -1
- package/src/View/Components/NewScopeComponent.js +2 -2
- package/src/View/Components/Panels/ToolPanelSettingsPanel.js +1 -1
- package/src/View/Components/PredicateEditor/PredicateEditor.d.ts +1 -0
- package/src/View/Components/PredicateEditor/PredicateEditor.js +24 -16
- package/src/View/Components/StyleComponent.d.ts +7 -0
- package/src/View/Components/StyleComponent.js +68 -16
- package/src/View/Components/ValueSelector/index.js +1 -1
- package/src/View/FormatColumn/Wizard/FormatColumnFormatWizardSection.js +8 -6
- package/src/View/FormatColumn/Wizard/FormatColumnSettingsWizardSection.js +18 -10
- package/src/View/FormatColumn/Wizard/FormatColumnStyleWizardSection.js +4 -3
- package/src/View/Layout/Wizard/sections/ColumnsSection.js +3 -3
- package/src/View/Shortcut/Wizard/ShortcutScopeWizardSection.js +2 -2
- package/src/View/Shortcut/Wizard/ShortcutSettingsWizard.js +14 -12
- package/src/View/StateManagement/StateManagementViewPanel.js +1 -1
- package/src/View/StyledColumn/Wizard/StyledColumnBadgeSection.d.ts +7 -0
- package/src/View/StyledColumn/Wizard/StyledColumnBadgeSection.js +108 -0
- package/src/View/StyledColumn/Wizard/StyledColumnSparklineSettingsSection.js +15 -14
- package/src/View/StyledColumn/Wizard/StyledColumnWizard.js +44 -21
- package/src/View/StyledColumn/Wizard/StyledColumnWizardColumnSection.js +17 -9
- package/src/View/StyledColumn/Wizard/StyledColumnWizardSettingsSection.js +1 -1
- package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/StyledColumnBadgePreview.d.ts +5 -0
- package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/StyledColumnBadgePreview.js +29 -0
- package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/StyledColumnWizardStyleSection.js +25 -5
- package/src/View/StyledColumn/Wizard/StyledColumnWizardTypeSection.js +15 -4
- package/src/View/Theme/ThemeEditor.js +1 -1
- package/src/agGrid/Adaptable.d.ts +6 -0
- package/src/agGrid/Adaptable.js +63 -26
- package/src/agGrid/BadgeRenderer.d.ts +4 -0
- package/src/agGrid/BadgeRenderer.js +59 -0
- package/src/agGrid/PercentBarRenderer.js +37 -17
- package/src/agGrid/agGridHelper.d.ts +1 -0
- package/src/agGrid/agGridHelper.js +4 -0
- package/src/agGrid/editors/AdaptableNumberEditor/InternalAdaptableNumberEditor.js +1 -1
- package/src/components/Badge/index.d.ts +8 -0
- package/src/components/Badge/index.js +18 -0
- package/src/components/Dashboard/DashboardToolbar.js +2 -2
- package/src/components/Datepicker/index.js +1 -1
- package/src/components/DragAndDropContext/TabList.js +1 -1
- package/src/components/Dropdown/index.js +1 -1
- package/src/components/DropdownButton/index.js +1 -1
- package/src/components/FileDroppable/index.js +1 -1
- package/src/components/IconSelector/IconSelector.d.ts +7 -0
- package/src/components/IconSelector/IconSelector.js +42 -0
- package/src/components/IconSelector/index.d.ts +1 -0
- package/src/components/IconSelector/index.js +4 -0
- package/src/components/OverlayTrigger/index.js +1 -0
- package/src/components/Toggle/Toggle.d.ts +8 -0
- package/src/components/Toggle/Toggle.js +15 -0
- package/src/components/Toggle/ToggleGroup.d.ts +2 -0
- package/src/components/Toggle/ToggleGroup.js +10 -0
- package/src/components/Toggle/index.d.ts +2 -0
- package/src/components/Toggle/index.js +5 -0
- package/src/components/icons/DefaultIcon.js +1 -1
- package/src/components/icons/align-center.js +7 -0
- package/src/components/icons/align-left.d.ts +3 -0
- package/src/components/icons/align-left.js +7 -0
- package/src/components/icons/align-right.d.ts +3 -0
- package/src/components/icons/align-right.js +7 -0
- package/src/components/icons/badge.d.ts +3 -0
- package/src/components/icons/badge.js +7 -0
- package/src/components/icons/bold.d.ts +3 -0
- package/src/components/icons/bold.js +7 -0
- package/src/components/icons/case-lower.d.ts +3 -0
- package/src/components/icons/case-lower.js +7 -0
- package/src/components/icons/case-sentence.d.ts +3 -0
- package/src/components/icons/case-sentence.js +8 -0
- package/src/components/icons/case-upper.d.ts +3 -0
- package/src/components/icons/case-upper.js +7 -0
- package/src/components/icons/gradient.d.ts +3 -0
- package/src/components/icons/gradient.js +7 -0
- package/src/components/icons/index.js +76 -72
- package/src/components/icons/italic.d.ts +3 -0
- package/src/components/icons/{clear.js → italic.js} +2 -2
- package/src/components/icons/overline.d.ts +3 -0
- package/src/components/icons/overline.js +7 -0
- package/src/components/icons/strikethrough.d.ts +3 -0
- package/src/components/icons/strikethrough.js +7 -0
- package/src/components/icons/underline.d.ts +3 -0
- package/src/components/icons/underline.js +7 -0
- package/src/metamodel/adaptable.metamodel.d.ts +86 -6
- package/src/metamodel/adaptable.metamodel.js +1 -1
- package/src/types.d.ts +4 -3
- package/version.d.ts +1 -1
- package/version.js +1 -1
- /package/src/components/icons/{clear.d.ts → align-center.d.ts} +0 -0
|
@@ -6,7 +6,7 @@ const React = tslib_1.__importStar(require("react"));
|
|
|
6
6
|
const SimpleButton_1 = tslib_1.__importDefault(require("../../../components/SimpleButton"));
|
|
7
7
|
class ButtonClose extends React.Component {
|
|
8
8
|
render() {
|
|
9
|
-
return (React.createElement(SimpleButton_1.default, Object.assign({ "data-name": "close", tooltip: "Close", iconSize: 20, icon: "
|
|
9
|
+
return (React.createElement(SimpleButton_1.default, Object.assign({ "data-name": "close", tooltip: "Close", iconSize: 20, icon: "close" }, this.props, { variant: "text" })));
|
|
10
10
|
}
|
|
11
11
|
}
|
|
12
12
|
exports.ButtonClose = ButtonClose;
|
|
@@ -6,7 +6,7 @@ const React = tslib_1.__importStar(require("react"));
|
|
|
6
6
|
const SimpleButton_1 = tslib_1.__importDefault(require("../../../components/SimpleButton"));
|
|
7
7
|
class ButtonConfigure extends React.Component {
|
|
8
8
|
render() {
|
|
9
|
-
return (React.createElement(SimpleButton_1.default, Object.assign({ "data-name": "configure", tooltip: "Configure", iconSize: 18, icon: "
|
|
9
|
+
return (React.createElement(SimpleButton_1.default, Object.assign({ "data-name": "configure", tooltip: "Configure", iconSize: 18, icon: "spanner" }, this.props, { variant: "text" })));
|
|
10
10
|
}
|
|
11
11
|
}
|
|
12
12
|
exports.ButtonConfigure = ButtonConfigure;
|
|
@@ -10,7 +10,7 @@ class ButtonDeleteComponent extends React.Component {
|
|
|
10
10
|
render() {
|
|
11
11
|
var _a, _b;
|
|
12
12
|
const _c = this.props, { onConfirmWarning, ConfirmAction, ConfirmationMsg, ConfirmationTitle, onClickAction } = _c, props = tslib_1.__rest(_c, ["onConfirmWarning", "ConfirmAction", "ConfirmationMsg", "ConfirmationTitle", "onClickAction"]);
|
|
13
|
-
return (React.createElement(SimpleButton_1.default, Object.assign({ "data-name": "delete", tooltip: (_a = props.tooltip) !== null && _a !== void 0 ? _a : 'Delete', variant: "text", icon: "
|
|
13
|
+
return (React.createElement(SimpleButton_1.default, Object.assign({ "data-name": "delete", tooltip: (_a = props.tooltip) !== null && _a !== void 0 ? _a : 'Delete', variant: "text", icon: "delete", iconSize: (_b = props.iconSize) !== null && _b !== void 0 ? _b : 24 }, props, { onClick: () => this.onClick() })));
|
|
14
14
|
}
|
|
15
15
|
onClick() {
|
|
16
16
|
if (this.props.ConfirmAction) {
|
|
@@ -6,7 +6,7 @@ const React = tslib_1.__importStar(require("react"));
|
|
|
6
6
|
const SimpleButton_1 = tslib_1.__importDefault(require("../../../components/SimpleButton"));
|
|
7
7
|
class ButtonExpand extends React.Component {
|
|
8
8
|
render() {
|
|
9
|
-
return (React.createElement(SimpleButton_1.default, Object.assign({ "data-name": "expand", tooltip: "Expand", iconSize: 20, icon: "
|
|
9
|
+
return (React.createElement(SimpleButton_1.default, Object.assign({ "data-name": "expand", tooltip: "Expand", iconSize: 20, icon: "arrow-expand", variant: "text" }, this.props)));
|
|
10
10
|
}
|
|
11
11
|
}
|
|
12
12
|
exports.ButtonExpand = ButtonExpand;
|
|
@@ -6,7 +6,7 @@ const React = tslib_1.__importStar(require("react"));
|
|
|
6
6
|
const SimpleButton_1 = tslib_1.__importDefault(require("../../../components/SimpleButton"));
|
|
7
7
|
class ButtonInvalid extends React.Component {
|
|
8
8
|
render() {
|
|
9
|
-
return (React.createElement(SimpleButton_1.default, Object.assign({ "data-name": "invalid", tooltip: "Invalid", iconSize: 20, icon: "
|
|
9
|
+
return (React.createElement(SimpleButton_1.default, Object.assign({ "data-name": "invalid", tooltip: "Invalid", iconSize: 20, icon: "warning" }, this.props)));
|
|
10
10
|
}
|
|
11
11
|
}
|
|
12
12
|
exports.ButtonInvalid = ButtonInvalid;
|
|
@@ -6,7 +6,7 @@ const React = tslib_1.__importStar(require("react"));
|
|
|
6
6
|
const SimpleButton_1 = tslib_1.__importDefault(require("../../../components/SimpleButton"));
|
|
7
7
|
class ButtonLogin extends React.Component {
|
|
8
8
|
render() {
|
|
9
|
-
return (React.createElement(SimpleButton_1.default, Object.assign({ "data-name": "login", tooltip: "Login", iconSize: 20, icon: "
|
|
9
|
+
return (React.createElement(SimpleButton_1.default, Object.assign({ "data-name": "login", tooltip: "Login", iconSize: 20, icon: "person", variant: "text" }, this.props)));
|
|
10
10
|
}
|
|
11
11
|
}
|
|
12
12
|
exports.ButtonLogin = ButtonLogin;
|
|
@@ -4,5 +4,5 @@ const tslib_1 = require("tslib");
|
|
|
4
4
|
const React = tslib_1.__importStar(require("react"));
|
|
5
5
|
const SimpleButton_1 = tslib_1.__importDefault(require("../../../components/SimpleButton"));
|
|
6
6
|
exports.default = (props) => {
|
|
7
|
-
return React.createElement(SimpleButton_1.default, Object.assign({}, props, { icon: '
|
|
7
|
+
return React.createElement(SimpleButton_1.default, Object.assign({}, props, { icon: 'delete', variant: "text", "data-name": "preview-delete" }));
|
|
8
8
|
};
|
|
@@ -14,7 +14,7 @@ class ButtonShare extends React.Component {
|
|
|
14
14
|
var _a;
|
|
15
15
|
const _b = this.props, { onShare, Header } = _b, buttonProps = tslib_1.__rest(_b, ["onShare", "Header"]);
|
|
16
16
|
return (React.createElement(React.Fragment, null,
|
|
17
|
-
React.createElement(SimpleButton_1.default, Object.assign({ "data-name": "share", tooltip: "Share", variant: "text", icon: "
|
|
17
|
+
React.createElement(SimpleButton_1.default, Object.assign({ "data-name": "share", tooltip: "Share", variant: "text", icon: "folder-shared", iconSize: (_a = buttonProps.iconSize) !== null && _a !== void 0 ? _a : 24, onClick: () => this.setState({ open: true }) }, buttonProps)),
|
|
18
18
|
this.state.open && (React.createElement(AdaptablePopupTeamSharing_1.AdaptablePopupTeamSharing, { header: Header, showPopup: true, onClose: () => this.setState({ open: false }), onConfirm: (config) => {
|
|
19
19
|
this.setState({ open: false });
|
|
20
20
|
onShare(config);
|
|
@@ -58,12 +58,20 @@ class QuickFilterFormComponent extends React.Component {
|
|
|
58
58
|
let showQuickFilterDropdown = true;
|
|
59
59
|
let hideQuickFilterDropdownFunction = this.props.api.optionsApi.getFilterOptions().hideQuickFilterDropdown;
|
|
60
60
|
if (hideQuickFilterDropdownFunction) {
|
|
61
|
-
|
|
61
|
+
const filterContext = {
|
|
62
|
+
column: this.props.currentColumn,
|
|
63
|
+
adaptableApi: this.props.api,
|
|
64
|
+
};
|
|
65
|
+
showQuickFilterDropdown = !hideQuickFilterDropdownFunction(filterContext);
|
|
62
66
|
}
|
|
63
67
|
let showQuickFilterInput = true;
|
|
64
68
|
let hideQuickFilterInputFunction = this.props.api.optionsApi.getFilterOptions().hideQuickFilterInput;
|
|
65
69
|
if (hideQuickFilterInputFunction) {
|
|
66
|
-
|
|
70
|
+
const filterContext = {
|
|
71
|
+
column: this.props.currentColumn,
|
|
72
|
+
adaptableApi: this.props.api,
|
|
73
|
+
};
|
|
74
|
+
showQuickFilterInput = !hideQuickFilterInputFunction(filterContext);
|
|
67
75
|
}
|
|
68
76
|
return (React.createElement(React.Fragment, null,
|
|
69
77
|
showQuickFilterDropdown && (React.createElement(OverlayTrigger_1.default, { className: "ab-QuickFilter", showEvent: showEvent, hideEvent: hideEvent, preventPortalEventPropagation: showEvent === 'click', targetOffset: 10, hideDelay: 300, "data-name": "quick-filter-overlay", render: () => (React.createElement(rebass_1.Flex, { className: "ab-QuickFilter__dropdown", flexDirection: "column", "data-name": "quick-filter", fontSize: 2 },
|
|
@@ -24,7 +24,7 @@ exports.AdaptableFormControlTextClear = React.forwardRef((props, ref) => {
|
|
|
24
24
|
ref.current = r;
|
|
25
25
|
}
|
|
26
26
|
}, type: "text", placeholder: props.placeholder, value: props.value, onChange: (x) => props.OnTextChange(x.target.value) }),
|
|
27
|
-
React.createElement(SimpleButton_1.default, { variant: "text", icon: "
|
|
27
|
+
React.createElement(SimpleButton_1.default, { variant: "text", icon: "close", tooltip: closeButtonTooltip, px: 0, py: 0, marginRight: 1, onClick: () => {
|
|
28
28
|
props.OnTextChange('');
|
|
29
29
|
const input = inputRef.current;
|
|
30
30
|
if (!focusOnClear) {
|
|
@@ -17,7 +17,7 @@ class ListBoxFilterSortComponent extends React.Component {
|
|
|
17
17
|
padding: 2 /* here just for the focus box-shadow to be visible*/,
|
|
18
18
|
} },
|
|
19
19
|
React.createElement(Input_1.default, { value: this.props.FilterValue, placeholder: "Search", onChange: (e) => this.handleChangeFilterValue(e), style: { width: 0 } }),
|
|
20
|
-
React.createElement(SimpleButton_1.default, { disabled: !this.props.FilterValue, onClick: () => this.clearFilter(), icon: "
|
|
20
|
+
React.createElement(SimpleButton_1.default, { disabled: !this.props.FilterValue, onClick: () => this.clearFilter(), icon: "close", variant: "text" }),
|
|
21
21
|
this.props.SortOrder == Enums_1.SortOrder.Asc ? (React.createElement(SimpleButton_1.default, { onClick: () => this.props.sortColumnValues(), icon: "sort-asc", variant: "text" })) : (React.createElement(SimpleButton_1.default, { onClick: () => this.props.sortColumnValues(), icon: "sort-desc", variant: "text" }))));
|
|
22
22
|
}
|
|
23
23
|
handleChangeFilterValue(x) {
|
|
@@ -19,10 +19,10 @@ const isScopeValid = ({ Scope }) => {
|
|
|
19
19
|
return 'No scope specified or scope is empty';
|
|
20
20
|
}
|
|
21
21
|
if (Scope && 'ColumnIds' in Scope && Scope.ColumnIds.length === 0) {
|
|
22
|
-
result.push('No
|
|
22
|
+
result.push('No Columns selected in Scope');
|
|
23
23
|
}
|
|
24
24
|
if (Scope && 'DataTypes' in Scope && Scope.DataTypes.length === 0) {
|
|
25
|
-
result.push('No
|
|
25
|
+
result.push('No Data Types selected in Scope');
|
|
26
26
|
}
|
|
27
27
|
return result.length ? result.join(', ') : true;
|
|
28
28
|
};
|
|
@@ -12,7 +12,7 @@ class ToolPanelSettingsPanel extends React.Component {
|
|
|
12
12
|
render() {
|
|
13
13
|
let header = (React.createElement("span", { style: { verticalAlign: 'middle' } },
|
|
14
14
|
' ',
|
|
15
|
-
React.createElement(icons_1.Icon, { name: '
|
|
15
|
+
React.createElement(icons_1.Icon, { name: 'spanner' }),
|
|
16
16
|
" ",
|
|
17
17
|
React.createElement("span", null, "Settings"),
|
|
18
18
|
this.props.button &&
|
|
@@ -13,26 +13,31 @@ const AdaptableInput_1 = tslib_1.__importDefault(require("../AdaptableInput"));
|
|
|
13
13
|
const PermittedValuesSelector_1 = require("../PermittedValuesSelector");
|
|
14
14
|
const isValuesPredicateDef = (colDef) => colDef && ['Values', 'ExcludeValues'].includes(colDef.id);
|
|
15
15
|
const PredicateEditor = (props) => {
|
|
16
|
-
var _a;
|
|
16
|
+
var _a, _b, _c;
|
|
17
17
|
const baseClassName = 'ab-PredicateEditor';
|
|
18
|
-
const
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
18
|
+
const placeholder = (_a = props.placeholder) !== null && _a !== void 0 ? _a : 'Select Rule';
|
|
19
|
+
const predicateDefsOptions = React.useMemo(() => {
|
|
20
|
+
var _a;
|
|
21
|
+
return (_a = props === null || props === void 0 ? void 0 : props.predicateDefs) === null || _a === void 0 ? void 0 : _a.map((item) => ({
|
|
22
|
+
value: item.id,
|
|
23
|
+
label: item.label,
|
|
24
|
+
onClick: () => {
|
|
25
|
+
var _a;
|
|
26
|
+
props.onChange(Object.assign(Object.assign({}, props.predicate), { PredicateId: item.id, Inputs: ((_a = item === null || item === void 0 ? void 0 : item.inputs) !== null && _a !== void 0 ? _a : []).map((input) => { var _a; return (_a = input.defaultValue) !== null && _a !== void 0 ? _a : ''; }) }));
|
|
27
|
+
},
|
|
28
|
+
}));
|
|
29
|
+
}, [props.predicateDefs, props.onChange]);
|
|
26
30
|
const handlePredicateInputChange = (e, index) => {
|
|
31
|
+
var _a;
|
|
27
32
|
const { value } = e.target;
|
|
28
|
-
const newInputs = [...props.predicate.Inputs];
|
|
33
|
+
const newInputs = [...((_a = props.predicate.Inputs) !== null && _a !== void 0 ? _a : [])];
|
|
29
34
|
newInputs[index] = value;
|
|
30
35
|
props.onChange(Object.assign(Object.assign({}, props.predicate), { Inputs: newInputs }));
|
|
31
36
|
};
|
|
32
37
|
const handlePredicateValuesChange = (inputs) => {
|
|
33
38
|
props.onChange(Object.assign(Object.assign({}, props.predicate), { Inputs: inputs }));
|
|
34
39
|
};
|
|
35
|
-
const currentPredicateDef = props.predicateDefs.find((item) => { var _a; return item.id === ((_a = props.predicate) === null || _a === void 0 ? void 0 : _a.PredicateId); });
|
|
40
|
+
const currentPredicateDef = (_b = props === null || props === void 0 ? void 0 : props.predicateDefs) === null || _b === void 0 ? void 0 : _b.find((item) => { var _a; return item.id === ((_a = props.predicate) === null || _a === void 0 ? void 0 : _a.PredicateId); });
|
|
36
41
|
let icon = null;
|
|
37
42
|
if (currentPredicateDef) {
|
|
38
43
|
if ((0, AdaptableIconComponent_1.isAdaptableInternalIcon)(currentPredicateDef === null || currentPredicateDef === void 0 ? void 0 : currentPredicateDef.icon)) {
|
|
@@ -45,11 +50,14 @@ const PredicateEditor = (props) => {
|
|
|
45
50
|
return (React.createElement(rebass_1.Box, { className: baseClassName },
|
|
46
51
|
React.createElement(rebass_1.Flex, { justifyContent: "stretch", alignItems: "center" },
|
|
47
52
|
icon && React.createElement(Tag_1.Tag, { mr: 2 }, icon),
|
|
48
|
-
React.createElement(DropdownButton_1.default, { mb: 0, style: { flex: 1 }, listStyle: { minWidth: 150 }, "data-name": "select-predicate", className: `${baseClassName}__predicate-dropdown`, placeholder:
|
|
49
|
-
React.createElement(rebass_1.Flex, null, (
|
|
50
|
-
|
|
51
|
-
React.createElement(
|
|
52
|
-
React.createElement(
|
|
53
|
+
React.createElement(DropdownButton_1.default, { mb: 0, style: { flex: 1 }, listStyle: { minWidth: 150 }, "data-name": "select-predicate", className: `${baseClassName}__predicate-dropdown`, placeholder: placeholder, showClearButton: !!props.predicate, onClear: props.onClear, items: predicateDefsOptions, columns: ['label'] }, currentPredicateDef ? currentPredicateDef.label : placeholder)),
|
|
54
|
+
React.createElement(rebass_1.Flex, null, (_c = currentPredicateDef === null || currentPredicateDef === void 0 ? void 0 : currentPredicateDef.inputs) === null || _c === void 0 ? void 0 : _c.map((predicateDefInput, index) => {
|
|
55
|
+
var _a, _b;
|
|
56
|
+
return (React.createElement(React.Fragment, null,
|
|
57
|
+
index > 0 && React.createElement(HelpBlock_1.default, { margin: 2 }, "AND"),
|
|
58
|
+
React.createElement(rebass_1.Flex, { key: index, flex: 1, flexDirection: "column" },
|
|
59
|
+
React.createElement(AdaptableInput_1.default, { "data-name": `predicate-input-${index}`, marginTop: 2, type: predicateDefInput.type, autoFocus: index === 0, value: (_b = (_a = props.predicate.Inputs) === null || _a === void 0 ? void 0 : _a[index]) !== null && _b !== void 0 ? _b : '', onChange: (e) => handlePredicateInputChange(e, index) }))));
|
|
60
|
+
})),
|
|
53
61
|
isValuesPredicateDef(currentPredicateDef) && (React.createElement(PermittedValuesSelector_1.PermitedValuesSelector, { onPredicateValuesChange: handlePredicateValuesChange, predicate: props.predicate, columnId: props.columnId }))));
|
|
54
62
|
};
|
|
55
63
|
exports.PredicateEditor = PredicateEditor;
|
|
@@ -9,6 +9,7 @@ export interface StyleComponentProps extends React.ClassAttributes<StyleComponen
|
|
|
9
9
|
headless?: boolean;
|
|
10
10
|
hidePreview?: boolean;
|
|
11
11
|
Style: AdaptableStyle;
|
|
12
|
+
showFontSizeAs?: 'radio' | 'dropdown';
|
|
12
13
|
UpdateStyle: (style: AdaptableStyle) => void;
|
|
13
14
|
}
|
|
14
15
|
export interface StyleComponentState {
|
|
@@ -17,6 +18,10 @@ export interface StyleComponentState {
|
|
|
17
18
|
}
|
|
18
19
|
export declare class StyleComponent extends React.Component<StyleComponentProps, StyleComponentState> {
|
|
19
20
|
constructor(props: StyleComponentProps);
|
|
21
|
+
static getDerivedStateFromProps(nextProps: StyleComponentProps, prevState: StyleComponentState): {
|
|
22
|
+
componentStyle: AdaptableStyle;
|
|
23
|
+
ShowClassName: boolean;
|
|
24
|
+
};
|
|
20
25
|
render(): JSX.Element;
|
|
21
26
|
private onShowClassNameChanged;
|
|
22
27
|
private onStyleClassNameChanged;
|
|
@@ -29,5 +34,7 @@ export declare class StyleComponent extends React.Component<StyleComponentProps,
|
|
|
29
34
|
private onBorderColorSelectChange;
|
|
30
35
|
private onFontWeightChange;
|
|
31
36
|
private onFontStyleChange;
|
|
37
|
+
private onTextDecorationChange;
|
|
38
|
+
private onBorderRadiusChange;
|
|
32
39
|
private onFontSizeChange;
|
|
33
40
|
}
|
|
@@ -16,6 +16,9 @@ const DropdownButton_1 = tslib_1.__importDefault(require("../../components/Dropd
|
|
|
16
16
|
const ArrayExtensions_1 = tslib_1.__importDefault(require("../../Utilities/Extensions/ArrayExtensions"));
|
|
17
17
|
const Radio_1 = tslib_1.__importDefault(require("../../components/Radio"));
|
|
18
18
|
const StylePreview_1 = require("../../components/StylePreview");
|
|
19
|
+
const ToggleGroup_1 = require("../../components/Toggle/ToggleGroup");
|
|
20
|
+
const Toggle_1 = require("../../components/Toggle/Toggle");
|
|
21
|
+
const AdaptableInput_1 = tslib_1.__importDefault(require("./AdaptableInput"));
|
|
19
22
|
class StyleComponent extends React.Component {
|
|
20
23
|
constructor(props) {
|
|
21
24
|
super(props);
|
|
@@ -24,7 +27,14 @@ class StyleComponent extends React.Component {
|
|
|
24
27
|
ShowClassName: StringExtensions_1.StringExtensions.IsNotNullOrEmpty(this.props.Style.ClassName),
|
|
25
28
|
};
|
|
26
29
|
}
|
|
30
|
+
static getDerivedStateFromProps(nextProps, prevState) {
|
|
31
|
+
return {
|
|
32
|
+
componentStyle: nextProps.Style,
|
|
33
|
+
ShowClassName: StringExtensions_1.StringExtensions.IsNotNullOrEmpty(nextProps.Style.ClassName),
|
|
34
|
+
};
|
|
35
|
+
}
|
|
27
36
|
render() {
|
|
37
|
+
var _a, _b;
|
|
28
38
|
const Cmp = this.props.headless ? rebass_1.Box : Panel_1.default;
|
|
29
39
|
const cmpProps = this.props.headless
|
|
30
40
|
? {}
|
|
@@ -36,6 +46,8 @@ class StyleComponent extends React.Component {
|
|
|
36
46
|
const styleClassNames = this.props.api.userInterfaceApi.getStyleClassNames();
|
|
37
47
|
const colourSpellingVariant = this.props.api.internalApi.getCorrectEnglishVariant('Colour');
|
|
38
48
|
const coloursSpellingVariant = this.props.api.internalApi.getCorrectEnglishVariant('colours');
|
|
49
|
+
let fontSizes = ['Default'];
|
|
50
|
+
fontSizes.push(...EnumExtensions_1.EnumExtensions.getNames(Enums_1.FontSize));
|
|
39
51
|
return (React.createElement(Cmp, Object.assign({}, cmpProps, { className: "ab-StyleComponent" }),
|
|
40
52
|
ArrayExtensions_1.default.IsNotNullOrEmpty(styleClassNames) && (React.createElement(rebass_1.Flex, { flexDirection: "row", padding: 2 },
|
|
41
53
|
React.createElement(Radio_1.default, { "data-name": "show-class-name", value: "Predicate", checked: this.state.ShowClassName, onChange: (checked) => this.onShowClassNameChanged(checked) }, "Use Style Class Name"),
|
|
@@ -65,33 +77,56 @@ class StyleComponent extends React.Component {
|
|
|
65
77
|
React.createElement(FormLayout_1.default, { columns: [1, 2] },
|
|
66
78
|
React.createElement(FormLayout_1.FormRow, null,
|
|
67
79
|
React.createElement(CheckBox_1.CheckBox, { "data-name": "set-background-color", value: "existing", margin: 1, checked: !!this.state.componentStyle.BackColor, onChange: (checked) => this.onUseBackColorCheckChange(checked) },
|
|
68
|
-
"
|
|
80
|
+
"Back ",
|
|
69
81
|
colourSpellingVariant),
|
|
70
82
|
this.state.componentStyle.BackColor != null ? (React.createElement(ColorPicker_1.ColorPicker, { api: this.props.api, value: this.state.componentStyle.BackColor, onChange: (x) => this.onBackColorSelectChange(x) })) : (React.createElement("span", null))),
|
|
71
83
|
React.createElement(FormLayout_1.FormRow, null,
|
|
72
84
|
React.createElement(CheckBox_1.CheckBox, { "data-name": "set-foreground-color", margin: 1, value: "existing", checked: this.state.componentStyle.ForeColor ? true : false, onChange: (checked) => this.onUseForeColorCheckChange(checked) },
|
|
73
|
-
"
|
|
85
|
+
"Fore ",
|
|
74
86
|
colourSpellingVariant),
|
|
75
87
|
this.state.componentStyle.ForeColor != null ? (React.createElement(ColorPicker_1.ColorPicker, { api: this.props.api, value: this.state.componentStyle.ForeColor, onChange: (x) => this.onForeColorSelectChange(x) })) : (React.createElement("span", null))),
|
|
76
88
|
React.createElement(FormLayout_1.FormRow, null,
|
|
77
89
|
React.createElement(CheckBox_1.CheckBox, { "data-name": "set-border-color", margin: 1, value: "existing", checked: this.state.componentStyle.BorderColor ? true : false, onChange: (checked) => this.onUseBorderColorCheckChange(checked) },
|
|
78
|
-
"
|
|
90
|
+
"Border ",
|
|
79
91
|
colourSpellingVariant),
|
|
80
92
|
this.state.componentStyle.BorderColor != null ? (React.createElement(ColorPicker_1.ColorPicker, { api: this.props.api, value: this.state.componentStyle.BorderColor, onChange: (x) => this.onBorderColorSelectChange(x) })) : (React.createElement("span", null)))),
|
|
81
93
|
React.createElement(HelpBlock_1.default, { fontSize: 2, marginTop: 2, marginBottom: 2 }, "Set the font properties of the Style"),
|
|
82
|
-
React.createElement(FormLayout_1.default,
|
|
83
|
-
React.createElement(FormLayout_1.FormRow,
|
|
84
|
-
React.createElement(
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
React.createElement(FormLayout_1.FormRow,
|
|
88
|
-
React.createElement(
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
94
|
+
React.createElement(FormLayout_1.default, null,
|
|
95
|
+
React.createElement(FormLayout_1.FormRow, { label: "Font Style" },
|
|
96
|
+
React.createElement(ToggleGroup_1.ToggleGroup, null,
|
|
97
|
+
React.createElement(Toggle_1.Toggle, { pressed: this.state.componentStyle.FontStyle == Enums_1.FontStyle.Italic, onPressedChange: (checked) => this.onFontStyleChange(checked), icon: "italic" }),
|
|
98
|
+
React.createElement(Toggle_1.Toggle, { pressed: this.state.componentStyle.FontWeight == Enums_1.FontWeight.Bold, onPressedChange: (checked) => this.onFontWeightChange(checked), icon: "bold" }))),
|
|
99
|
+
React.createElement(FormLayout_1.FormRow, { label: "Text Decoration" },
|
|
100
|
+
React.createElement(ToggleGroup_1.ToggleGroup, null,
|
|
101
|
+
React.createElement(Toggle_1.Toggle, { icon: "underline", pressed: this.state.componentStyle.TextDecoration === 'Underline', onPressedChange: (checked) => this.onTextDecorationChange(checked ? 'Underline' : 'None') }),
|
|
102
|
+
React.createElement(Toggle_1.Toggle, { icon: "strikethrough", pressed: this.state.componentStyle.TextDecoration === 'LineThrough', onPressedChange: (checked) => this.onTextDecorationChange(checked ? 'LineThrough' : 'None') }),
|
|
103
|
+
React.createElement(Toggle_1.Toggle, { icon: "overline", pressed: this.state.componentStyle.TextDecoration === 'Overline', onPressedChange: (checked) => this.onTextDecorationChange(checked ? 'Overline' : 'None') }))),
|
|
104
|
+
React.createElement(FormLayout_1.FormRow, { label: "Font Size" }, !this.props.showFontSizeAs || this.props.showFontSizeAs === 'dropdown' ? (React.createElement(rebass_1.Flex, { flexDirection: "row", alignItems: "center" },
|
|
105
|
+
React.createElement(DropdownButton_1.default, { width: "100px", mr: 1, items: [
|
|
106
|
+
{
|
|
107
|
+
value: '',
|
|
108
|
+
label: 'Default',
|
|
109
|
+
onClick: () => this.onFontSizeChange(''),
|
|
110
|
+
},
|
|
111
|
+
...EnumExtensions_1.EnumExtensions.getNames(Enums_1.FontSize).map((enumName) => ({
|
|
112
|
+
value: enumName,
|
|
113
|
+
label: enumName,
|
|
114
|
+
onClick: () => this.onFontSizeChange(enumName),
|
|
115
|
+
})),
|
|
116
|
+
], columns: ['label'] }, (_b = (_a = this.state.componentStyle.FontSize) === null || _a === void 0 ? void 0 : _a.toString()) !== null && _b !== void 0 ? _b : 'Default'))) : (React.createElement(rebass_1.Box, null, fontSizes.map((enumName) => {
|
|
117
|
+
return (React.createElement(Radio_1.default, { onClick: () => this.onFontSizeChange(enumName), checked: (enumName == 'Default' && !this.state.componentStyle.FontSize) ||
|
|
118
|
+
this.state.componentStyle.FontSize === enumName, mr: 3, key: enumName }, enumName));
|
|
119
|
+
})))),
|
|
120
|
+
React.createElement(FormLayout_1.FormRow, { label: "Border Radius" },
|
|
121
|
+
React.createElement(AdaptableInput_1.default, { width: "100px", type: "number", min: "0", value: this.state.componentStyle.BorderRadius, onChange: (event) => {
|
|
122
|
+
const number = Number(event.target.value);
|
|
123
|
+
if (isNaN(number)) {
|
|
124
|
+
this.onBorderRadiusChange(0);
|
|
125
|
+
}
|
|
126
|
+
else {
|
|
127
|
+
this.onBorderRadiusChange(number);
|
|
128
|
+
}
|
|
129
|
+
} }))))))),
|
|
95
130
|
!this.props.hidePreview && (React.createElement(rebass_1.Box, null,
|
|
96
131
|
React.createElement(HelpBlock_1.default, { fontSize: 2, marginTop: 2, marginBottom: 2 }, "Preview"),
|
|
97
132
|
React.createElement(StylePreview_1.StylePreview, { styleObject: this.state.componentStyle })))));
|
|
@@ -177,8 +212,25 @@ class StyleComponent extends React.Component {
|
|
|
177
212
|
}
|
|
178
213
|
this.props.UpdateStyle(this.state.componentStyle);
|
|
179
214
|
}
|
|
215
|
+
onTextDecorationChange(textDecoration) {
|
|
216
|
+
this.state.componentStyle.TextDecoration = textDecoration;
|
|
217
|
+
if (textDecoration === 'None' || !textDecoration) {
|
|
218
|
+
delete this.state.componentStyle.TextDecoration;
|
|
219
|
+
}
|
|
220
|
+
this.props.UpdateStyle(this.state.componentStyle);
|
|
221
|
+
}
|
|
222
|
+
onBorderRadiusChange(value) {
|
|
223
|
+
this.state.componentStyle.BorderRadius = value;
|
|
224
|
+
if (value === 0) {
|
|
225
|
+
delete this.state.componentStyle.BorderRadius;
|
|
226
|
+
}
|
|
227
|
+
this.props.UpdateStyle(this.state.componentStyle);
|
|
228
|
+
}
|
|
180
229
|
onFontSizeChange(value) {
|
|
181
230
|
this.state.componentStyle.FontSize = value;
|
|
231
|
+
if (value === '' || value == 'Default') {
|
|
232
|
+
delete this.state.componentStyle.FontSize;
|
|
233
|
+
}
|
|
182
234
|
this.props.UpdateStyle(this.state.componentStyle);
|
|
183
235
|
}
|
|
184
236
|
}
|
|
@@ -186,7 +186,7 @@ function ValueOptionsTags(props) {
|
|
|
186
186
|
(_c = (_b = (_a = e.target) === null || _a === void 0 ? void 0 : _a.lastChild) === null || _b === void 0 ? void 0 : _b.focus) === null || _c === void 0 ? void 0 : _c.call(_b);
|
|
187
187
|
}, style: { flex: 'none' } },
|
|
188
188
|
renderLabel ? renderLabel(label) : label,
|
|
189
|
-
readOnly ? null : (React.createElement(SimpleButton_1.default, { icon: "
|
|
189
|
+
readOnly ? null : (React.createElement(SimpleButton_1.default, { icon: "close", ml: 2, iconSize: 14, variant: "text", style: { border: 'none' }, onClick: clear }))));
|
|
190
190
|
};
|
|
191
191
|
const renderEllipsis = (0, react_1.useCallback)(({ remaining }) => {
|
|
192
192
|
return (React.createElement(rebass_1.Text, { fontSize: 2, style: { whiteSpace: 'nowrap' } },
|
|
@@ -19,6 +19,7 @@ const StringExtensions_1 = tslib_1.__importDefault(require("../../../Utilities/E
|
|
|
19
19
|
const Tag_1 = require("../../../components/Tag");
|
|
20
20
|
const AdaptableContext_1 = require("../../AdaptableContext");
|
|
21
21
|
const FormatHelper_1 = tslib_1.__importDefault(require("../../../Utilities/Helpers/FormatHelper"));
|
|
22
|
+
const Toggle_1 = require("../../../components/Toggle");
|
|
22
23
|
const DOLLAR_OPTIONS = {
|
|
23
24
|
FractionDigits: 2,
|
|
24
25
|
FractionSeparator: '.',
|
|
@@ -347,12 +348,13 @@ const renderStringFormat = (data, _onChange, setFormatOption, scopedCustomFormat
|
|
|
347
348
|
React.createElement(Tabs_1.Tabs.Content, null,
|
|
348
349
|
React.createElement(rebass_1.Flex, { flexDirection: "column" },
|
|
349
350
|
React.createElement(FormLayout_1.default, { mr: 3 },
|
|
350
|
-
React.createElement(FormLayout_1.FormRow, { label: "Case:
|
|
351
|
-
React.createElement(
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
351
|
+
React.createElement(FormLayout_1.FormRow, { label: "Case:" },
|
|
352
|
+
React.createElement(rebass_1.Flex, null,
|
|
353
|
+
React.createElement(Toggle_1.ToggleGroup, null,
|
|
354
|
+
React.createElement(Toggle_1.Toggle, { pressed: data.DisplayFormat.Options.Case === 'Upper', onPressedChange: (pressed) => setFormatOption('Case', pressed ? 'Upper' : undefined), icon: "case-upper" }),
|
|
355
|
+
React.createElement(Toggle_1.Toggle, { pressed: data.DisplayFormat.Options.Case === 'Lower', onPressedChange: (pressed) => setFormatOption('Case', pressed ? 'Lower' : undefined), icon: "case-lower" }),
|
|
356
|
+
React.createElement(Toggle_1.Toggle, { pressed: data.DisplayFormat.Options.Case === 'Sentence', onPressedChange: (pressed) => setFormatOption('Case', pressed ? 'Sentence' : undefined), icon: "case-sentence" })),
|
|
357
|
+
React.createElement(CheckBox_1.CheckBox, { "data-name": "trim-checkbox", marginLeft: 5, checked: data.DisplayFormat.Options.Trim, onChange: (checked) => setFormatOption('Trim', checked) }, "Trim"))),
|
|
356
358
|
React.createElement(FormLayout_1.FormRow, { label: "Prefix" },
|
|
357
359
|
React.createElement(Input_1.default, { "data-name": "prefix", value: (_a = data.DisplayFormat.Options.Prefix) !== null && _a !== void 0 ? _a : '', onChange: (e) => setFormatOption('Prefix', e.currentTarget.value) })),
|
|
358
360
|
React.createElement(FormLayout_1.FormRow, { label: "Suffix" },
|
|
@@ -4,12 +4,13 @@ exports.FormatColumnSettingsWizardSection = exports.renderFormatColumnSettingsSu
|
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
const React = tslib_1.__importStar(require("react"));
|
|
6
6
|
const rebass_1 = require("rebass");
|
|
7
|
-
const DropdownButton_1 = tslib_1.__importDefault(require("../../../components/DropdownButton"));
|
|
8
7
|
const FormLayout_1 = tslib_1.__importStar(require("../../../components/FormLayout"));
|
|
9
8
|
const CheckBox_1 = require("../../../components/CheckBox");
|
|
10
9
|
const Tabs_1 = require("../../../components/Tabs");
|
|
11
10
|
const OnePageAdaptableWizard_1 = require("../../Wizard/OnePageAdaptableWizard");
|
|
12
11
|
const Tag_1 = require("../../../components/Tag");
|
|
12
|
+
const ToggleGroup_1 = require("../../../components/Toggle/ToggleGroup");
|
|
13
|
+
const Toggle_1 = require("../../../components/Toggle/Toggle");
|
|
13
14
|
let alignmentOptions = [
|
|
14
15
|
{ value: 'Left', label: 'Left' },
|
|
15
16
|
{ value: 'Right', label: 'Right' },
|
|
@@ -27,9 +28,13 @@ const renderFormatColumnSettingsSummary = (data) => {
|
|
|
27
28
|
};
|
|
28
29
|
exports.renderFormatColumnSettingsSummary = renderFormatColumnSettingsSummary;
|
|
29
30
|
const FormatColumnSettingsWizardSection = (props) => {
|
|
30
|
-
const { data
|
|
31
|
+
const { data } = (0, OnePageAdaptableWizard_1.useOnePageAdaptableWizardContext)();
|
|
31
32
|
const onCellAlignmentSelectChanged = (CellAlignment) => {
|
|
32
|
-
|
|
33
|
+
const newData = Object.assign(Object.assign({}, data), { CellAlignment });
|
|
34
|
+
if (CellAlignment === null) {
|
|
35
|
+
delete newData.CellAlignment;
|
|
36
|
+
}
|
|
37
|
+
props.onChange(newData);
|
|
33
38
|
};
|
|
34
39
|
const onIncludeGroupedRowsChanged = (IncludeGroupedRows) => {
|
|
35
40
|
props.onChange(Object.assign(Object.assign({}, data), { IncludeGroupedRows }));
|
|
@@ -40,13 +45,16 @@ const FormatColumnSettingsWizardSection = (props) => {
|
|
|
40
45
|
React.createElement(rebass_1.Flex, { flexDirection: "row" },
|
|
41
46
|
React.createElement(FormLayout_1.default, null,
|
|
42
47
|
React.createElement(FormLayout_1.FormRow, { label: "Cell Alignment" },
|
|
43
|
-
React.createElement(
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
48
|
+
React.createElement(ToggleGroup_1.ToggleGroup, null,
|
|
49
|
+
React.createElement(Toggle_1.Toggle, { icon: "align-left", pressed: data.CellAlignment === 'Left', onPressedChange: (pressed) => pressed
|
|
50
|
+
? onCellAlignmentSelectChanged('Left')
|
|
51
|
+
: onCellAlignmentSelectChanged(null) }),
|
|
52
|
+
React.createElement(Toggle_1.Toggle, { icon: "align-center", pressed: data.CellAlignment === 'Center', onPressedChange: (pressed) => pressed
|
|
53
|
+
? onCellAlignmentSelectChanged('Center')
|
|
54
|
+
: onCellAlignmentSelectChanged(null) }),
|
|
55
|
+
React.createElement(Toggle_1.Toggle, { icon: "align-right", pressed: data.CellAlignment === 'Right', onPressedChange: (pressed) => pressed
|
|
56
|
+
? onCellAlignmentSelectChanged('Right')
|
|
57
|
+
: onCellAlignmentSelectChanged(null) }))),
|
|
50
58
|
React.createElement(FormLayout_1.FormRow, { label: "Include Grouped Rows:" },
|
|
51
59
|
React.createElement(rebass_1.Flex, { alignItems: "center", marginLeft: 2 },
|
|
52
60
|
React.createElement(CheckBox_1.CheckBox, { "data-name": "include-grouped-rows-checkbox", checked: data.IncludeGroupedRows, onChange: onIncludeGroupedRowsChanged, mr: 2 }))))))));
|
|
@@ -19,8 +19,9 @@ const isFormatColumnStyleValid = (data, api) => {
|
|
|
19
19
|
return true;
|
|
20
20
|
};
|
|
21
21
|
exports.isFormatColumnStyleValid = isFormatColumnStyleValid;
|
|
22
|
-
const toStyle = (
|
|
23
|
-
|
|
22
|
+
const toStyle = (data) => {
|
|
23
|
+
var _a, _b;
|
|
24
|
+
return Object.assign(Object.assign({}, (0, StyleHelper_1.convertAdaptableStyleToCSS)((_a = data.Style) !== null && _a !== void 0 ? _a : {})), { borderWidth: ((_b = data.Style) === null || _b === void 0 ? void 0 : _b.BorderColor) ? 2 : 0, borderStyle: 'solid', textAlign: data.CellAlignment ? data.CellAlignment.toLowerCase() : undefined });
|
|
24
25
|
};
|
|
25
26
|
const renderFormatColumnStyleWizardSummary = (data) => {
|
|
26
27
|
const { api } = (0, OnePageAdaptableWizard_1.useOnePageAdaptableWizardContext)();
|
|
@@ -28,7 +29,7 @@ const renderFormatColumnStyleWizardSummary = (data) => {
|
|
|
28
29
|
};
|
|
29
30
|
exports.renderFormatColumnStyleWizardSummary = renderFormatColumnStyleWizardSummary;
|
|
30
31
|
const renderFormatColumnStyleSummary = (data, api) => {
|
|
31
|
-
return (React.createElement(rebass_1.Text, { className: "ab-FormatPreview", padding: 2, style: toStyle(data
|
|
32
|
+
return (React.createElement(rebass_1.Text, { className: "ab-FormatPreview", padding: 2, style: toStyle(data) }, "Preview result"));
|
|
32
33
|
};
|
|
33
34
|
exports.renderFormatColumnStyleSummary = renderFormatColumnStyleSummary;
|
|
34
35
|
function FormatColumnStyleWizardSection(props) {
|
|
@@ -139,7 +139,7 @@ const ColumnRow = (props) => {
|
|
|
139
139
|
const adaptable = (0, AdaptableContext_1.useAdaptable)();
|
|
140
140
|
// headers
|
|
141
141
|
const initialHeader = adaptable.api.columnApi.getFriendlyNameForColumnId(props.column.columnId);
|
|
142
|
-
const customHeader = (_b = (_a = props.layout.ColumnHeadersMap) === null || _a === void 0 ? void 0 : _a[props.column.columnId]) !== null && _b !== void 0 ? _b :
|
|
142
|
+
const customHeader = (_b = (_a = props.layout.ColumnHeadersMap) === null || _a === void 0 ? void 0 : _a[props.column.columnId]) !== null && _b !== void 0 ? _b : initialHeader;
|
|
143
143
|
// column pinning
|
|
144
144
|
const columnPinning = ((_c = props.layout.PinnedColumnsMap) === null || _c === void 0 ? void 0 : _c[props.column.columnId]) || 'None';
|
|
145
145
|
const pinningOptions = [
|
|
@@ -172,8 +172,8 @@ const ColumnRow = (props) => {
|
|
|
172
172
|
isExpanded && (React.createElement(rebass_1.Box, { className: "ab-Layout-Wizard__ColumnRow__Expanded-Container", mb: 2, padding: 2, mt: 2 },
|
|
173
173
|
React.createElement(rebass_1.Flex, { mb: 2 },
|
|
174
174
|
React.createElement(FormLayout_1.default, { width: "100%", mr: 3 },
|
|
175
|
-
React.createElement(FormLayout_1.FormRow, { label: "
|
|
176
|
-
React.createElement(Tag_1.Tag, null, props.column.
|
|
175
|
+
React.createElement(FormLayout_1.FormRow, { label: "ColumnId" },
|
|
176
|
+
React.createElement(Tag_1.Tag, null, props.column.columnId)),
|
|
177
177
|
React.createElement(FormLayout_1.FormRow, { label: "Header" },
|
|
178
178
|
React.createElement(Input_1.default, { "data-name": "column-header", className: "ab-Layout-Wizard__ColumnRow__Input", placehoder: "Custom name (optional)", onChange: () => {
|
|
179
179
|
props.onColumnNameChange(props.column.columnId, event.target.value);
|
|
@@ -9,8 +9,8 @@ const ShortcutScopeWizardSection = (props) => {
|
|
|
9
9
|
const { data, api } = (0, OnePageAdaptableWizard_1.useOnePageAdaptableWizardContext)();
|
|
10
10
|
const availableColumns = React.useMemo(() => api.columnApi.getNumericColumns(), []);
|
|
11
11
|
return (React.createElement(NewScopeComponent_1.NewScopeComponent, { availableDataTypes: ['Number'], scopeColumns: availableColumns, scope: data.Scope, descriptions: {
|
|
12
|
-
rowScope: '
|
|
13
|
-
columnScope: '
|
|
12
|
+
rowScope: 'All Numeric Columns will have the Shortcut applied',
|
|
13
|
+
columnScope: 'Selected Columns will have the Shortcut applied',
|
|
14
14
|
}, updateScope: (Scope) => {
|
|
15
15
|
let preparedScope = Scope;
|
|
16
16
|
if (Scope && 'DataTypes' in Scope && Scope.DataTypes.length === 0) {
|