@adaptabletools/adaptable 13.0.0-canary.17 → 13.0.0-canary.19
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 +99 -0
- package/base.css.map +1 -1
- package/bundle.cjs.js +128 -128
- package/index.css +115 -0
- 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/ExportOptions.d.ts +2 -2
- package/src/Api/ExportApi.d.ts +6 -6
- package/src/Api/FormatColumnApi.d.ts +47 -29
- package/src/Api/Implementation/ExportApiImpl.d.ts +4 -4
- package/src/Api/Implementation/ExportApiImpl.js +14 -14
- package/src/Api/Implementation/FormatColumnApiImpl.d.ts +23 -11
- package/src/Api/Implementation/FormatColumnApiImpl.js +48 -63
- package/src/PredefinedConfig/FormatColumnState.d.ts +4 -3
- package/src/Redux/ActionsReducers/ConditionalStyleRedux.d.ts +0 -18
- package/src/Redux/ActionsReducers/ConditionalStyleRedux.js +0 -18
- package/src/Redux/ActionsReducers/PluginsRedux.d.ts +4 -4
- package/src/Redux/ActionsReducers/PluginsRedux.js +5 -5
- package/src/Strategy/FormatColumnModule.js +2 -12
- package/src/Utilities/Defaults/DefaultAdaptableOptions.js +1 -1
- package/src/Utilities/ObjectFactory.d.ts +2 -2
- package/src/Utilities/ObjectFactory.js +4 -4
- package/src/Utilities/Services/ReportService.js +6 -6
- package/src/View/AdaptablePopover/index.js +1 -1
- package/src/View/Alert/Wizard/AlertBehaviourWizardSection.js +9 -9
- package/src/View/Alert/Wizard/AlertDisplayWizardSection.js +6 -5
- package/src/View/BulkUpdate/BulkUpdatePopup.js +1 -1
- package/src/View/Components/AdaptableObjectList/AdaptableObjectList.js +1 -1
- package/src/View/Components/AdaptableObjectRow/index.js +1 -6
- package/src/View/Components/Buttons/ButtonInfo.d.ts +1 -3
- package/src/View/Components/Buttons/ButtonInfo.js +3 -5
- package/src/View/Components/EntityRulesEditor/index.js +8 -17
- package/src/View/Components/FilterForm/FilterForm.js +11 -16
- package/src/View/Components/FilterForm/QuickFilterForm.js +7 -13
- package/src/View/Components/NewScopeComponent.js +1 -1
- package/src/View/Components/Panels/PanelWithButton.js +1 -5
- package/src/View/Components/Panels/PanelWithImage.js +1 -5
- package/src/View/Components/Popups/AdaptablePopup/AdaptablePopup.js +2 -2
- package/src/View/Components/Popups/AdaptablePopup/AdaptablePopupDialog.d.ts +1 -0
- package/src/View/Components/Popups/AdaptablePopup/AdaptablePopupDialog.js +3 -16
- package/src/View/Components/Popups/AdaptablePopup/PopupPanel.js +1 -1
- package/src/View/Components/Popups/AdaptablePopupTeamSharing.js +5 -5
- package/src/View/Components/ScopeComponent.js +4 -4
- package/src/View/Components/Selectors/ColumnValueSelector.js +2 -2
- package/src/View/Components/StyleComponent.js +12 -17
- package/src/View/ConditionalStyle/Wizard/ConditionalStyleSettingsWizardSettings.js +1 -1
- package/src/View/DataSet/DataSetSelector.js +1 -1
- package/src/View/Export/ExportViewPanel.js +4 -4
- package/src/View/Export/ReportExportDropdown.js +1 -1
- package/src/View/Export/Wizard/ReportNameWizardSection.js +10 -11
- package/src/View/FlashingCell/FlashingCellStyle.js +3 -3
- package/src/View/FlashingCell/Wizard/FlashingCellSettingsWizardSection.js +6 -6
- package/src/View/FlashingCell/Wizard/FlashingCellWizard.js +4 -4
- package/src/View/FormatColumn/FormatColumnSummary.js +1 -1
- package/src/View/FormatColumn/Wizard/FormatColumnFormatWizardSection.js +26 -26
- package/src/View/FormatColumn/Wizard/FormatColumnSettingsWizardSection.js +2 -6
- package/src/View/FormatColumn/Wizard/FormatColumnStyleWizardSection.js +1 -1
- package/src/View/FreeTextColumn/Wizard/FreeTextColumnSettingsWizardSection.js +7 -7
- package/src/View/Layout/LayoutRadioSelector.js +1 -1
- package/src/View/Layout/Wizard/Components/ColumnLabels.js +1 -1
- package/src/View/Layout/Wizard/sections/ColumnsSection.js +5 -5
- package/src/View/Layout/Wizard/sections/SettingsSection.js +2 -2
- package/src/View/PlusMinus/Wizard/PlusMinusSettingsWizardSection.js +3 -3
- package/src/View/Query/Wizard/NamedQuerySettingsWizardSection.js +1 -1
- package/src/View/QuickSearch/QuickSearchPopup.js +2 -2
- package/src/View/Schedule/Wizard/ScheduleScheduleWizard.js +5 -5
- package/src/View/Schedule/Wizard/ScheduleSettingsWizard/ScheduleSettingsGlue42.js +1 -1
- package/src/View/Schedule/Wizard/ScheduleSettingsWizard/ScheduleSettingsIPushPull.js +5 -5
- package/src/View/Schedule/Wizard/ScheduleSettingsWizard/ScheduleSettingsOpenFin.js +1 -1
- package/src/View/Schedule/Wizard/ScheduleSettingsWizard/ScheduleSettingsReminder.js +5 -5
- package/src/View/Schedule/Wizard/ScheduleSettingsWizard/ScheduleSettingsReport.js +2 -2
- package/src/View/Shortcut/Wizard/ShortcutSettingsWizard.js +3 -3
- package/src/View/SmartEdit/SmartEditPopup.js +3 -3
- package/src/View/SpecialColumnSettingsWizardStep.js +10 -10
- package/src/View/StateManagement/StateManagementPopup.js +4 -4
- package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection.js +2 -6
- package/src/View/SystemStatus/SystemStatusEntityRow.js +4 -6
- package/src/View/TeamSharing/SharedEntityObjectView.js +1 -1
- package/src/View/TeamSharing/TeamSharingApplyButton.js +1 -1
- package/src/View/Theme/ThemePopup.js +1 -1
- package/src/View/Wizard/OnePageAdaptableWizard.js +1 -2
- package/src/agGrid/Adaptable.d.ts +0 -1
- package/src/agGrid/Adaptable.js +41 -65
- package/src/agGrid/PercentBarRenderer.js +3 -6
- package/src/agGrid/weightedAverage.js +19 -11
- package/src/components/CheckBox/index.js +1 -1
- package/src/components/ExpressionEditor/BaseEditorInput.js +13 -32
- package/src/components/ExpressionEditor/index.js +9 -17
- package/src/components/FormLayout/index.js +1 -1
- package/src/components/StylePreview.js +2 -1
- package/src/metamodel/adaptable.metamodel.d.ts +16 -11
- package/src/metamodel/adaptable.metamodel.js +1 -1
- package/src/types.d.ts +2 -2
- package/version.d.ts +1 -1
- package/version.js +1 -1
|
@@ -32,7 +32,7 @@ const HighlightStyle = (props) => {
|
|
|
32
32
|
},
|
|
33
33
|
},
|
|
34
34
|
];
|
|
35
|
-
return (React.createElement(
|
|
35
|
+
return (React.createElement(rebass_1.Box, { "data-name": props.dataName },
|
|
36
36
|
React.createElement(rebass_1.Flex, null,
|
|
37
37
|
React.createElement(CheckBox_1.CheckBox, { mr: 2, style: { alignItems: 'flex-start' }, checked: Boolean(props.highlight), onChange: (checked) => {
|
|
38
38
|
props.onChange(checked);
|
|
@@ -99,35 +99,35 @@ const AlertBehaviourWizardSection = (props) => {
|
|
|
99
99
|
return (React.createElement(Tabs_1.Tabs, null,
|
|
100
100
|
React.createElement(Tabs_1.Tabs.Tab, null, api.internalApi.getCorrectEnglishVariant('Behaviour')),
|
|
101
101
|
React.createElement(Tabs_1.Tabs.Content, null,
|
|
102
|
-
cellChangedAlert && (React.createElement(CheckBox_1.CheckBox, { style: { alignItems: 'flex-start' }, checked: AlertProperties.PreventEdit, onChange: (PreventEdit) => {
|
|
102
|
+
cellChangedAlert && (React.createElement(CheckBox_1.CheckBox, { "data-name": "prevet-cell-edit", style: { alignItems: 'flex-start' }, checked: AlertProperties.PreventEdit, onChange: (PreventEdit) => {
|
|
103
103
|
onChange({
|
|
104
104
|
PreventEdit,
|
|
105
105
|
});
|
|
106
106
|
} },
|
|
107
107
|
"Prevent Cell Edit",
|
|
108
108
|
React.createElement(rebass_1.Text, { fontSize: 2, mt: 1 }, "(automatically undo data change which triggered Alert)"))),
|
|
109
|
-
cellChangedAlert && (React.createElement(HighlightStyle, { highlight: AlertProperties.HighlightCell, label: "Highlight Cell", onChange: (HighlightCell) => {
|
|
109
|
+
cellChangedAlert && (React.createElement(HighlightStyle, { dataName: "highlight-cell", highlight: AlertProperties.HighlightCell, label: "Highlight Cell", onChange: (HighlightCell) => {
|
|
110
110
|
onChange({ HighlightCell });
|
|
111
111
|
} })),
|
|
112
|
-
cellChangedAlert && (React.createElement(HighlightStyle, { highlight: AlertProperties.HighlightRow, label: "Highlight Row", onChange: (HighlightRow) => {
|
|
112
|
+
cellChangedAlert && (React.createElement(HighlightStyle, { dataName: "highlight-row", highlight: AlertProperties.HighlightRow, label: "Highlight Row", onChange: (HighlightRow) => {
|
|
113
113
|
onChange({ HighlightRow });
|
|
114
114
|
} })),
|
|
115
|
-
rowAddedAlert && (React.createElement(HighlightStyle, { highlight: AlertProperties.HighlightRow, label: "Highlight Row", onChange: (HighlightRow) => {
|
|
115
|
+
rowAddedAlert && (React.createElement(HighlightStyle, { dataName: "highlight-row", highlight: AlertProperties.HighlightRow, label: "Highlight Row", onChange: (HighlightRow) => {
|
|
116
116
|
onChange({ HighlightRow });
|
|
117
117
|
} })),
|
|
118
|
-
cellChangedAlert && (React.createElement(CheckBox_1.CheckBox, { checked: AlertProperties.JumpToCell, onChange: (JumpToCell) => {
|
|
118
|
+
cellChangedAlert && (React.createElement(CheckBox_1.CheckBox, { "data-name": "jump-to-cell", checked: AlertProperties.JumpToCell, onChange: (JumpToCell) => {
|
|
119
119
|
onChange({ JumpToCell });
|
|
120
120
|
} }, "Jump To Cell")),
|
|
121
|
-
rowAddedAlert && (React.createElement(CheckBox_1.CheckBox, { checked: AlertProperties.JumpToRow, onChange: (JumpToRow) => {
|
|
121
|
+
rowAddedAlert && (React.createElement(CheckBox_1.CheckBox, { "data-name": "jump-to-row", checked: AlertProperties.JumpToRow, onChange: (JumpToRow) => {
|
|
122
122
|
onChange({ JumpToRow });
|
|
123
123
|
} }, "Jump To Row")),
|
|
124
|
-
React.createElement(CheckBox_1.CheckBox, { checked: AlertProperties.ShowInDiv, onChange: (ShowInDiv) => {
|
|
124
|
+
React.createElement(CheckBox_1.CheckBox, { "data-name": "show-in-div", checked: AlertProperties.ShowInDiv, onChange: (ShowInDiv) => {
|
|
125
125
|
onChange({ ShowInDiv });
|
|
126
126
|
} },
|
|
127
127
|
"Show in separate ",
|
|
128
128
|
React.createElement(CodeBlock_1.CodeBlock, null, `<div />`),
|
|
129
129
|
" element"),
|
|
130
|
-
React.createElement(CheckBox_1.CheckBox, { checked: AlertProperties.LogToConsole, onChange: (LogToConsole) => {
|
|
130
|
+
React.createElement(CheckBox_1.CheckBox, { "data-name": "log-to-console", checked: AlertProperties.LogToConsole, onChange: (LogToConsole) => {
|
|
131
131
|
onChange({ LogToConsole });
|
|
132
132
|
} }, "Log To Console"))));
|
|
133
133
|
};
|
|
@@ -12,6 +12,7 @@ const AdaptablePopupAlert_1 = require("../../Components/Popups/AdaptablePopupAle
|
|
|
12
12
|
const AlertButtonsEditor_1 = require("./AlertButtonsEditor");
|
|
13
13
|
const CodeBlock_1 = require("../../../components/CodeBlock");
|
|
14
14
|
const AdaptableInput_1 = tslib_1.__importDefault(require("../../Components/AdaptableInput"));
|
|
15
|
+
const join_1 = tslib_1.__importDefault(require("../../../components/utils/join"));
|
|
15
16
|
const DEFAULT_BUTTONS = [
|
|
16
17
|
{
|
|
17
18
|
Label: 'OK',
|
|
@@ -53,7 +54,7 @@ const AlertPreview = (_a) => {
|
|
|
53
54
|
};
|
|
54
55
|
return result;
|
|
55
56
|
}, [alertDefinition]);
|
|
56
|
-
return (React.createElement(rebass_1.Box, Object.assign({}, boxProps, { style: Object.assign({ border: '1px solid var(--ab-color-inputborder)' }, boxProps.style) }),
|
|
57
|
+
return (React.createElement(rebass_1.Box, Object.assign({}, boxProps, { className: (0, join_1.default)(boxProps.className, 'ab-AlertPreview'), style: Object.assign({ border: '1px solid var(--ab-color-inputborder)' }, boxProps.style) }),
|
|
57
58
|
React.createElement(AdaptablePopupAlert_1.AdaptablePopupAlert, { headless: true, focusFirstButton: focusFirstButton, adaptableAlert: alertToPreview, onClose: () => { } })));
|
|
58
59
|
};
|
|
59
60
|
exports.AlertPreview = AlertPreview;
|
|
@@ -73,7 +74,7 @@ const AlertDisplayWizardSection = (props) => {
|
|
|
73
74
|
props.onChange(Object.assign(Object.assign({}, data), { MessageText: value }));
|
|
74
75
|
};
|
|
75
76
|
return (React.createElement(React.Fragment, null,
|
|
76
|
-
React.createElement(Tabs_1.Tabs,
|
|
77
|
+
React.createElement(Tabs_1.Tabs, { "data-name": "message-type" },
|
|
77
78
|
React.createElement(Tabs_1.Tabs.Tab, null, "Message Type"),
|
|
78
79
|
React.createElement(Tabs_1.Tabs.Content, null,
|
|
79
80
|
React.createElement(Radio_1.RadioGroup, { value: messageType, name: "messageType", orientation: "horizontal", onRadioChange: (MessageType) => {
|
|
@@ -83,7 +84,7 @@ const AlertDisplayWizardSection = (props) => {
|
|
|
83
84
|
React.createElement(Radio_1.default, { marginLeft: 4, value: "Success" }, "Success"),
|
|
84
85
|
React.createElement(Radio_1.default, { marginLeft: 4, value: "Warning" }, "Warning"),
|
|
85
86
|
React.createElement(Radio_1.default, { marginLeft: 4, value: "Error" }, "Error")))),
|
|
86
|
-
React.createElement(Tabs_1.Tabs, { mt: 2, mb: 3, autoFocus: false },
|
|
87
|
+
React.createElement(Tabs_1.Tabs, { "data-name": "message-text", mt: 2, mb: 3, autoFocus: false },
|
|
87
88
|
React.createElement(Tabs_1.Tabs.Tab, null, "Message Text"),
|
|
88
89
|
React.createElement(Tabs_1.Tabs.Content, null,
|
|
89
90
|
React.createElement(rebass_1.Text, { fontSize: 2, mt: 3, mb: 2 }, "The text to display as the Alert Message (leave blank to show automated Message based on Trigger and Condition)"),
|
|
@@ -91,7 +92,7 @@ const AlertDisplayWizardSection = (props) => {
|
|
|
91
92
|
React.createElement(AdaptableInput_1.default, { marginTop: 2, type: 'text', autoFocus: false, value: messageText,
|
|
92
93
|
// onChange={(e: any) => onPredicateInputChange(e, index)}
|
|
93
94
|
onChange: (e) => onMessageTextChange(e) }))),
|
|
94
|
-
React.createElement(Tabs_1.Tabs, { mt: 2, mb: 3, autoFocus: false },
|
|
95
|
+
React.createElement(Tabs_1.Tabs, { "data-name": "display-options", mt: 2, mb: 3, autoFocus: false },
|
|
95
96
|
React.createElement(Tabs_1.Tabs.Tab, null, "Display options"),
|
|
96
97
|
React.createElement(Tabs_1.Tabs.Content, null,
|
|
97
98
|
React.createElement(CheckBox_1.CheckBox, { checked: (_a = data.AlertProperties) === null || _a === void 0 ? void 0 : _a.DisplayNotification, onChange: (DisplayNotification) => {
|
|
@@ -104,7 +105,7 @@ const AlertDisplayWizardSection = (props) => {
|
|
|
104
105
|
((_b = data.AlertProperties) === null || _b === void 0 ? void 0 : _b.DisplayNotification) ? (typeof data.AlertForm === 'string' ? (React.createElement(rebass_1.Text, { fontSize: 2 }, "Alert buttons cannot be customized because form is dynamically driven")) : (React.createElement(AlertButtonsEditor_1.AlertButtonsEditor, { AlertButtons: ((_c = data.AlertForm) === null || _c === void 0 ? void 0 : _c.Buttons) || DEFAULT_BUTTONS, api: api, adaptableAlert: adaptableAlert, onChange: (buttons) => {
|
|
105
106
|
props.onChange(Object.assign(Object.assign({}, data), { AlertForm: Object.assign(Object.assign({}, data.AlertForm), { Buttons: buttons }) }));
|
|
106
107
|
} }))) : null)),
|
|
107
|
-
((_d = data.AlertProperties) === null || _d === void 0 ? void 0 : _d.DisplayNotification) ? (React.createElement(Tabs_1.Tabs, { autoFocus: false },
|
|
108
|
+
((_d = data.AlertProperties) === null || _d === void 0 ? void 0 : _d.DisplayNotification) ? (React.createElement(Tabs_1.Tabs, { "data-name": "alert-preview", autoFocus: false },
|
|
108
109
|
React.createElement(Tabs_1.Tabs.Tab, null, "Alert preview"),
|
|
109
110
|
React.createElement(Tabs_1.Tabs.Content, null, typeof data.AlertForm === 'string' ? (React.createElement(rebass_1.Text, { fontSize: 2 }, "Preview not available because form is dynamically driven")) : (React.createElement(exports.AlertPreview, { alertDefinition: data, api: api }))))) : null));
|
|
110
111
|
};
|
|
@@ -56,7 +56,7 @@ class BulkUpdatePopupComponent extends React.Component {
|
|
|
56
56
|
' ',
|
|
57
57
|
"Select from existing column values")),
|
|
58
58
|
React.createElement(rebass_1.Flex, { padding: 2, flexDirection: "row", alignItems: "center" },
|
|
59
|
-
React.createElement(rebass_1.Flex, { alignItems: "center", flexDirection: "row", flex: 1, marginRight: 2 }, this.state.useSelector ? (React.createElement(ColumnValueSelector_1.ColumnValueSelector, { selectedGridCells: this.props.SelectedGridCells, selectedColumnValue: this.props.BulkUpdateValue, selectedColumn: col, api: this.props.api, onColumnValueChange: (values) => this.onColumnValueSelectedChanged(values), allowNew: false, style: { width: '100%', maxWidth: 'inherit' } })) : (React.createElement(AdaptableInput_1.default, { style: { width: '100%' }, value: String(this.props.BulkUpdateValue), type: UIHelper_1.UIHelper.getDescriptionForDataType(col.dataType), placeholder: UIHelper_1.UIHelper.getPlaceHolderforDataType(col.dataType), onChange: (e) => this.onBulkUpdateValueChange(e) }))),
|
|
59
|
+
React.createElement(rebass_1.Flex, { alignItems: "center", flexDirection: "row", flex: 1, marginRight: 2 }, this.state.useSelector ? (React.createElement(ColumnValueSelector_1.ColumnValueSelector, { selectedGridCells: this.props.SelectedGridCells, selectedColumnValue: this.props.BulkUpdateValue, selectedColumn: col, api: this.props.api, onColumnValueChange: (values) => this.onColumnValueSelectedChanged(values), allowNew: false, style: { width: '100%', maxWidth: 'inherit' } })) : (React.createElement(AdaptableInput_1.default, { "data-name": "bulk-update", style: { width: '100%' }, value: String(this.props.BulkUpdateValue), type: UIHelper_1.UIHelper.getDescriptionForDataType(col.dataType), placeholder: UIHelper_1.UIHelper.getPlaceHolderforDataType(col.dataType), onChange: (e) => this.onBulkUpdateValueChange(e) }))),
|
|
60
60
|
React.createElement(SimpleButton_1.default, { disabled: StringExtensions_1.StringExtensions.IsNullOrEmpty(this.props.BulkUpdateValue) ||
|
|
61
61
|
this.props.PreviewInfo.previewValidationSummary.validationResult == 'All', onClick: () => {
|
|
62
62
|
this.onApplyClick();
|
|
@@ -31,7 +31,7 @@ const AdaptableObjectListItemView = (props) => {
|
|
|
31
31
|
return (React.createElement(rebass_1.Flex, { "data-name": tag.name, key: `${index}-${tag.name}`, mb: 2, className: `${baseClassName}__row` },
|
|
32
32
|
React.createElement(rebass_1.Box, { className: `${baseClassName}__label`, mr: 3 },
|
|
33
33
|
labelEl,
|
|
34
|
-
props.showEditButton && (React.createElement(SimpleButton_1.default, { accessLevel: props.accessLevel, className: `${baseClassName}__edit-property`, ml: 1, icon: "edit", tooltip: "edit", iconSize: 18, variant: "text", onClick: () => {
|
|
34
|
+
props.showEditButton && (React.createElement(SimpleButton_1.default, { "data-name": `${tag.name}-edit-button`, accessLevel: props.accessLevel, className: `${baseClassName}__edit-property`, ml: 1, icon: "edit", tooltip: "edit", iconSize: 18, variant: "text", onClick: () => {
|
|
35
35
|
props.handleOnEdit(tag.name);
|
|
36
36
|
} }))),
|
|
37
37
|
React.createElement(rebass_1.Box, { flex: 1, className: `${baseClassName}__values` },
|
|
@@ -8,12 +8,7 @@ const rebass_1 = require("rebass");
|
|
|
8
8
|
const join_1 = tslib_1.__importDefault(require("../../../components/utils/join"));
|
|
9
9
|
class AdaptableObjectRow extends React.Component {
|
|
10
10
|
render() {
|
|
11
|
-
const colItems = this.props.colItems.map((colItem, index) => (React.createElement(rebass_1.Text, {
|
|
12
|
-
flex: colItem.Size,
|
|
13
|
-
whiteSpace: 'nowrap',
|
|
14
|
-
textOverflow: 'ellipsis',
|
|
15
|
-
overflow: 'hidden',
|
|
16
|
-
}, "data-name": "list-group-cell", paddingLeft: 1, paddingRight: 1 }, colItem.Content)));
|
|
11
|
+
const colItems = this.props.colItems.map((colItem, index) => (React.createElement(rebass_1.Text, { className: "ab-AdaptableObjectRow__cell", "data-name": "list-group-cell", key: index, title: typeof colItem.Content === 'string' ? colItem.Content : undefined, flex: colItem.Size, paddingLeft: 1, paddingRight: 1 }, colItem.Content)));
|
|
17
12
|
const className = (0, join_1.default)('ab-AdaptableObjectRow', this.props.isSuspended && 'ab-AdaptableObjectRow--is-suspended');
|
|
18
13
|
return (React.createElement(rebass_1.Flex, { className: className, onClick: this.props.onClick, style: this.props.style }, colItems));
|
|
19
14
|
}
|
|
@@ -4,6 +4,4 @@ export interface InfoButtonProps extends SimpleButtonProps {
|
|
|
4
4
|
glyph?: string;
|
|
5
5
|
tooltip?: string;
|
|
6
6
|
}
|
|
7
|
-
export declare
|
|
8
|
-
render(): JSX.Element;
|
|
9
|
-
}
|
|
7
|
+
export declare const ButtonInfo: React.FunctionComponent<InfoButtonProps>;
|
|
@@ -4,9 +4,7 @@ exports.ButtonInfo = void 0;
|
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
const React = tslib_1.__importStar(require("react"));
|
|
6
6
|
const SimpleButton_1 = tslib_1.__importDefault(require("../../../components/SimpleButton"));
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
}
|
|
11
|
-
}
|
|
7
|
+
const ButtonInfo = (props) => {
|
|
8
|
+
return (React.createElement(SimpleButton_1.default, Object.assign({ "data-name": "info", iconSize: 20, icon: "info", variant: "raised", tone: "accent" }, props)));
|
|
9
|
+
};
|
|
12
10
|
exports.ButtonInfo = ButtonInfo;
|
|
@@ -161,7 +161,8 @@ const EntityRulesEditor = (props) => {
|
|
|
161
161
|
};
|
|
162
162
|
const initialData = (0, react_1.useMemo)(() => api.internalApi.getQueryPreviewData(), []);
|
|
163
163
|
const showDocumentationLinks = api.internalApi.isDocumentationLinksDisplayed();
|
|
164
|
-
|
|
164
|
+
const baseClassName = 'ab-EntityRulesEditor';
|
|
165
|
+
return (React.createElement(rebass_1.Flex, Object.assign({ className: baseClassName, flexDirection: "column", padding: 2, pt: 0, pl: 0 }, flexProps, { style: Object.assign({ height: '100%' }, flexProps === null || flexProps === void 0 ? void 0 : flexProps.style) }),
|
|
165
166
|
children,
|
|
166
167
|
React.createElement(Tabs_1.Tabs, { onValueChange: setType, value: selectedTab, pt: 2, pl: 2, style: { flex: 1, overflow: 'auto' } },
|
|
167
168
|
showNoRule ? (React.createElement(Tabs_1.Tabs.Tab, { value: 'NoRule', style: { flex: 1 } },
|
|
@@ -170,15 +171,9 @@ const EntityRulesEditor = (props) => {
|
|
|
170
171
|
React.createElement(rebass_1.Text, { fontSize: 2, mb: 2 }, 'Format Column is always applied'))) : null,
|
|
171
172
|
showPredicate ? (React.createElement(Tabs_1.Tabs.Tab, { value: 'Predicate', style: { flex: 1 } },
|
|
172
173
|
React.createElement(Radio_1.default, { tabIndex: -1, margin: 0, checked: type === 'Predicate' }, "Predicate"))) : null,
|
|
173
|
-
showPredicate ? (React.createElement(Tabs_1.Tabs.Content, { value: "Predicate" },
|
|
174
|
+
showPredicate ? (React.createElement(Tabs_1.Tabs.Content, { "data-name": "Predicate", value: "Predicate" },
|
|
174
175
|
React.createElement(rebass_1.Text, { fontSize: 2, mb: 2 }, descriptions.selectPredicate),
|
|
175
|
-
React.createElement(DropdownButton_1.default, {
|
|
176
|
-
minWidth: '15rem',
|
|
177
|
-
whiteSpace: 'nowrap',
|
|
178
|
-
overflow: 'hidden',
|
|
179
|
-
textOverflow: 'ellipsis',
|
|
180
|
-
maxWidth: 'inherit',
|
|
181
|
-
}, placeholder: "Select Rule", showClearButton: !!((_e = data.Rule) === null || _e === void 0 ? void 0 : _e.Predicate), onClear: clearPredicate, items: predicateDefsOptions, columns: ['label'] }, currentPredicateDef ? currentPredicateDef.label : 'Select Rule'), (_f = currentPredicateDef === null || currentPredicateDef === void 0 ? void 0 : currentPredicateDef.inputs) === null || _f === void 0 ? void 0 :
|
|
176
|
+
React.createElement(DropdownButton_1.default, { "data-name": "entity-rules-editor-predicate-dropdown", className: `${baseClassName}__predicate-dropdown`, placeholder: "Select Rule", showClearButton: !!((_e = data.Rule) === null || _e === void 0 ? void 0 : _e.Predicate), onClear: clearPredicate, items: predicateDefsOptions, columns: ['label'] }, currentPredicateDef ? currentPredicateDef.label : 'Select Rule'), (_f = currentPredicateDef === null || currentPredicateDef === void 0 ? void 0 : currentPredicateDef.inputs) === null || _f === void 0 ? void 0 :
|
|
182
177
|
_f.map((predicateDefInput, index) => (React.createElement(rebass_1.Flex, { key: predicateId + index, flexDirection: "column" },
|
|
183
178
|
index > 0 && React.createElement(HelpBlock_1.default, { marginTop: 2 }, "AND"),
|
|
184
179
|
React.createElement(AdaptableInput_1.default, { marginTop: 2, type: predicateDefInput.type, autoFocus: index === 0, value: predicateInputs[index], onChange: (e) => onPredicateInputChange(e, index) })))),
|
|
@@ -189,20 +184,16 @@ const EntityRulesEditor = (props) => {
|
|
|
189
184
|
fontSize: 'var(--ab-font-size-3)',
|
|
190
185
|
padding: 0,
|
|
191
186
|
} },
|
|
192
|
-
React.createElement(ButtonInfo_1.ButtonInfo, { mr: 2,
|
|
193
|
-
color: 'var(--ab-color-text-on-add)',
|
|
194
|
-
fill: 'var(--ab-color-text-on-add)',
|
|
195
|
-
background: 'var(--ab-color-action-add)',
|
|
196
|
-
}, onClick: () => window.open(DocumentationLinkConstants_1.PredicateDocsLink, '_blank') }),
|
|
187
|
+
React.createElement(ButtonInfo_1.ButtonInfo, { mr: 2, onClick: () => window.open(DocumentationLinkConstants_1.PredicateDocsLink, '_blank') }),
|
|
197
188
|
"See Predicate documentation for more details and examples")))) : null,
|
|
198
189
|
showBoolean ? React.createElement(QueryTab, { value: "BooleanExpression", type: type, label: "Boolean" }) : null,
|
|
199
|
-
showBoolean ? (React.createElement(Tabs_1.Tabs.Content, { value: 'BooleanExpression', paddingLeft: 0 },
|
|
190
|
+
showBoolean ? (React.createElement(Tabs_1.Tabs.Content, { "data-name": "BooleanExpression", value: 'BooleanExpression', paddingLeft: 0 },
|
|
200
191
|
React.createElement(ExpressionEditor_1.ExpressionEditor, { type: 'boolean', module: module, value: (_h = data.Rule) === null || _h === void 0 ? void 0 : _h.BooleanExpression, onChange: setBooleanExpression, initialData: initialData, columns: api.columnApi.getQueryableColumns(), namedQueries: api.queryApi.getAllNamedQuery(), api: api }))) : null,
|
|
201
192
|
showObservable ? (React.createElement(QueryTab, { value: "ObservableExpression", type: type, label: "Observable" })) : null,
|
|
202
|
-
showObservable ? (React.createElement(Tabs_1.Tabs.Content, { value: 'ObservableExpression', paddingLeft: 0 },
|
|
193
|
+
showObservable ? (React.createElement(Tabs_1.Tabs.Content, { "data-name": "ObservableExpression", value: 'ObservableExpression', paddingLeft: 0 },
|
|
203
194
|
React.createElement(ExpressionEditor_1.ExpressionEditor, { type: 'observable', module: module, value: (_j = data.Rule) === null || _j === void 0 ? void 0 : _j.ObservableExpression, onChange: setReactiveExpression, initialData: initialData, columns: api.columnApi.getQueryableColumns(), namedQueries: api.queryApi.getAllNamedQuery(), api: api }))) : null,
|
|
204
195
|
showAggregation ? (React.createElement(QueryTab, { value: "AggregatedBooleanExpression", type: type, label: "Aggregated Boolean" })) : null,
|
|
205
|
-
showAggregation ? (React.createElement(Tabs_1.Tabs.Content, { value: 'AggregatedBooleanExpression', paddingLeft: 0 },
|
|
196
|
+
showAggregation ? (React.createElement(Tabs_1.Tabs.Content, { "data-name": "AggregatedBooleanExpression", value: 'AggregatedBooleanExpression', paddingLeft: 0 },
|
|
206
197
|
React.createElement(ExpressionEditor_1.ExpressionEditor, { type: 'aggregatedBoolean', module: module, value: (_k = data.Rule) === null || _k === void 0 ? void 0 : _k.AggregatedBooleanExpression, onChange: setAggregationExpression, initialData: initialData, columns: api.columnApi.getQueryableColumns(), namedQueries: api.queryApi.getAllNamedQuery(), api: api }))) : null)));
|
|
207
198
|
};
|
|
208
199
|
exports.EntityRulesEditor = EntityRulesEditor;
|
|
@@ -137,15 +137,14 @@ class FilterFormComponent extends React.Component {
|
|
|
137
137
|
let closeButton = (React.createElement(ButtonClose_1.ButtonClose, { onClick: () => this.onCloseForm(), tooltip: null, accessLevel: 'Full' }));
|
|
138
138
|
let clearFilterButton = (React.createElement(ButtonClear_1.ButtonClear, { onClick: () => this.onClearFilter(), disabled: isEmptyFilter, tooltip: null, accessLevel: 'Full', showText: true, showIcon: false }));
|
|
139
139
|
const useAgGridStyle = !!filterOptions.useAgGridFilterFormStyle;
|
|
140
|
-
return (React.createElement("div", { "data-name": "filter-form" }, StringExtensions_1.StringExtensions.IsNullOrEmpty(isFilterable) ? (React.createElement(FilterFormPanel_1.FilterFormPanel, { style: panelStyle, ColumnMenuTab: this.state.selectedTab, ColumnMenuTabChanged: (e) => this.onSelectTab(e), IsAlwaysFilter: this.props.embedColumnMenu, clearFilterButton: clearFilterButton, closeButton: closeButton, showCloseButton: this.props.showCloseButton, autoApplyFilter: filterOptions.autoApplyFilter ? true : false, useAgGridStyle: useAgGridStyle, applyFilterButtonDisabled: isEmptyFilter, onFilterApplied: () => this.onFilterApplied() }, this.state.selectedTab == Enums_1.ColumnMenuTab.Menu ? (React.createElement(ListBoxMenu_1.ListBoxMenu, { MenuItems: this.props.api.internalApi.buildStandaloneColumnHeader(this.props.currentColumn), onMenuItemClick: (menuItem) => this.onMenuItemClick(menuItem) })) : (React.createElement(
|
|
141
|
-
this.state.showTab && (React.createElement(
|
|
142
|
-
React.createElement(Radio_1.default, {
|
|
140
|
+
return (React.createElement("div", { className: "ab-FilterForm", "data-name": "filter-form" }, StringExtensions_1.StringExtensions.IsNullOrEmpty(isFilterable) ? (React.createElement(FilterFormPanel_1.FilterFormPanel, { style: panelStyle, ColumnMenuTab: this.state.selectedTab, ColumnMenuTabChanged: (e) => this.onSelectTab(e), IsAlwaysFilter: this.props.embedColumnMenu, clearFilterButton: clearFilterButton, closeButton: closeButton, showCloseButton: this.props.showCloseButton, autoApplyFilter: filterOptions.autoApplyFilter ? true : false, useAgGridStyle: useAgGridStyle, applyFilterButtonDisabled: isEmptyFilter, onFilterApplied: () => this.onFilterApplied() }, this.state.selectedTab == Enums_1.ColumnMenuTab.Menu ? (React.createElement(ListBoxMenu_1.ListBoxMenu, { MenuItems: this.props.api.internalApi.buildStandaloneColumnHeader(this.props.currentColumn), onMenuItemClick: (menuItem) => this.onMenuItemClick(menuItem) })) : (React.createElement(React.Fragment, null,
|
|
141
|
+
this.state.showTab && (React.createElement(React.Fragment, null,
|
|
142
|
+
React.createElement(Radio_1.default, { "data-name": "values", flex: 1, marginLeft: 1, checked: this.state.currentTab == 'values', onChange: () => this.setState({ currentTab: 'values' }) },
|
|
143
143
|
React.createElement(rebass_1.Flex, { fontSize: 'var( --ab-font-size-2)' }, "Column Values")),
|
|
144
|
-
React.createElement(Radio_1.default, { marginLeft: 2, flex: 1, checked: this.state.currentTab == 'predicates', onChange: () => this.setState({ currentTab: 'predicates' }) },
|
|
144
|
+
React.createElement(Radio_1.default, { "data-name": "predicates", marginLeft: 2, flex: 1, checked: this.state.currentTab == 'predicates', onChange: () => this.setState({ currentTab: 'predicates' }) },
|
|
145
145
|
React.createElement(rebass_1.Flex, { fontSize: 'var( --ab-font-size-2)' }, "Filters")))),
|
|
146
|
-
this.state.currentTab === 'values' && (React.createElement(
|
|
147
|
-
|
|
148
|
-
this.state.currentTab === 'predicates' && (React.createElement("div", null,
|
|
146
|
+
this.state.currentTab === 'values' && (React.createElement(ListBoxFilterForm_1.ListBoxFilterForm, { disabled: this.isFilterDisabled(), suppressClientSideFilter: this.state.suppressClientSideFilter, isLoading: this.state.isDistinctColumnValuesLoading, onFilterChange: this.handleFilterChange, currentColumn: this.props.currentColumn, columns: this.props.columns, columnDistinctValues: this.state.distinctColumnValues, dataType: this.props.currentColumn.dataType, uiSelectedColumnValues: uiSelectedColumnValues, useAgGridStyle: useAgGridStyle, onColumnValueSelectedChange: (list) => this.onColumnValuesChange(list) })),
|
|
147
|
+
this.state.currentTab === 'predicates' && (React.createElement(React.Fragment, null,
|
|
149
148
|
' ',
|
|
150
149
|
this.state.showTab && React.createElement("hr", null),
|
|
151
150
|
predicateDefs
|
|
@@ -156,15 +155,15 @@ class FilterFormComponent extends React.Component {
|
|
|
156
155
|
var _a;
|
|
157
156
|
const { editedColumnFilter } = this.state;
|
|
158
157
|
const checked = ((_a = editedColumnFilter === null || editedColumnFilter === void 0 ? void 0 : editedColumnFilter.Predicate) === null || _a === void 0 ? void 0 : _a.PredicateId) === predicateDef.id;
|
|
159
|
-
return (React.createElement(rebass_1.Flex, { key: index, flexDirection: "column" },
|
|
160
|
-
React.createElement(Radio_1.default, { disabled: this.isFilterDisabled(), fontSize: 'var(--ab-font-size-2)', margin: 1, flex: 1, checked: checked, onChange: () => this.selectColumnPredicate(predicateDef) }, predicateDef.label),
|
|
161
|
-
React.createElement(rebass_1.Flex, { flexDirection: "column", flex: 0, marginLeft: 3, marginRight: 2 }, checked && this.renderPredicateInput(predicateDef, editedColumnFilter))));
|
|
158
|
+
return (React.createElement(rebass_1.Flex, { className: "ab-FilterForm__predicate", key: index, flexDirection: "column" },
|
|
159
|
+
React.createElement(Radio_1.default, { "data-name": predicateDef.id, disabled: this.isFilterDisabled(), fontSize: 'var(--ab-font-size-2)', margin: 1, flex: 1, checked: checked, onChange: () => this.selectColumnPredicate(predicateDef) }, predicateDef.label),
|
|
160
|
+
React.createElement(rebass_1.Flex, { className: "ab-FilterForm__predicate_inputs", flexDirection: "column", flex: 0, marginLeft: 3, marginRight: 2 }, checked && this.renderPredicateInput(predicateDef, editedColumnFilter))));
|
|
162
161
|
}
|
|
163
162
|
renderPredicateInput(predicateDef, filter) {
|
|
164
163
|
var _a;
|
|
165
164
|
if ((predicateDef === null || predicateDef === void 0 ? void 0 : predicateDef.id) === 'BooleanToggle') {
|
|
166
165
|
// custom tri-state checkbox: true, false, all(indeterminate)
|
|
167
|
-
return (React.createElement(rebass_1.Flex, { flexDirection: "row", flex: 1, justifyContent: "center", alignItems: "center" },
|
|
166
|
+
return (React.createElement(rebass_1.Flex, { className: "ab-FilterForm__predicate-input", flexDirection: "row", flex: 1, justifyContent: "center", alignItems: "center" },
|
|
168
167
|
React.createElement(CheckBox_1.CheckBox, { disabled: this.isFilterDisabled(), checked: filter.Predicate.Inputs[0] === 'true'
|
|
169
168
|
? true
|
|
170
169
|
: filter.Predicate.Inputs[0] === 'false'
|
|
@@ -181,11 +180,7 @@ class FilterFormComponent extends React.Component {
|
|
|
181
180
|
} })));
|
|
182
181
|
}
|
|
183
182
|
return (_a = predicateDef.inputs) === null || _a === void 0 ? void 0 : _a.map((predicateInput, index) => (React.createElement(rebass_1.Flex, { key: index, flexDirection: "row" },
|
|
184
|
-
React.createElement(AdaptableInput_1.default, { disabled: this.isFilterDisabled(), type: predicateInput.type, autoFocus: index === 0, value: filter.Predicate.Inputs[index], onChange: (e) => this.changeColumnPredicateInput(e.target.value, index),
|
|
185
|
-
marginBottom: 5,
|
|
186
|
-
flex: 1,
|
|
187
|
-
fontSize: 'var( --ab-font-size-2)',
|
|
188
|
-
} }))));
|
|
183
|
+
React.createElement(AdaptableInput_1.default, { disabled: this.isFilterDisabled(), type: predicateInput.type, autoFocus: index === 0, value: filter.Predicate.Inputs[index], onChange: (e) => this.changeColumnPredicateInput(e.target.value, index), mb: 1, flex: 1, fontSize: 2 }))));
|
|
189
184
|
}
|
|
190
185
|
isFilterDisabled() {
|
|
191
186
|
var _a;
|
|
@@ -142,21 +142,15 @@ class QuickFilterFormComponent extends React.Component {
|
|
|
142
142
|
showQuickFilterInput = !hideQuickFilterInputFunction(this.props.currentColumn);
|
|
143
143
|
}
|
|
144
144
|
return (React.createElement(React.Fragment, null,
|
|
145
|
-
showQuickFilterDropdown && (React.createElement(OverlayTrigger_1.default, { showEvent: showEvent, hideEvent: hideEvent, preventPortalEventPropagation: showEvent === 'click', alignHorizontal: "left", targetOffset: 10, hideDelay: 300, "data-name": "quick-filter-overlay",
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
(filter === null || filter === void 0 ? void 0 : filter.Predicate.PredicateId) && (React.createElement(React.Fragment, null,
|
|
152
|
-
React.createElement(SimpleButton_1.default, { p: 2, variant: "text", onClick: () => this.clearFilter() },
|
|
153
|
-
React.createElement("span", { style: { width: 20, marginRight: 10 } },
|
|
154
|
-
React.createElement(icons_1.Icon, { name: "delete" })),
|
|
155
|
-
"Clear"))),
|
|
156
|
-
predicateDefs.map((p) => (React.createElement(SimpleButton_1.default, { disabled: this.isFilterDisabled(), key: p.id, p: 2, variant: "text", tone: (filter === null || filter === void 0 ? void 0 : filter.Predicate.PredicateId) === p.id ? 'info' : 'none', onClick: () => this.selectColumnPredicate(p.id) },
|
|
145
|
+
showQuickFilterDropdown && (React.createElement(OverlayTrigger_1.default, { className: "ab-QuickFilter", showEvent: showEvent, hideEvent: hideEvent, preventPortalEventPropagation: showEvent === 'click', alignHorizontal: "left", targetOffset: 10, hideDelay: 300, "data-name": "quick-filter-overlay", render: () => (React.createElement(rebass_1.Flex, { flexDirection: "column", "data-name": "quick-filter" },
|
|
146
|
+
(filter === null || filter === void 0 ? void 0 : filter.Predicate.PredicateId) && (React.createElement(SimpleButton_1.default, { p: 2, variant: "text", onClick: () => this.clearFilter() },
|
|
147
|
+
React.createElement("span", { style: { width: 20, marginRight: 10 } },
|
|
148
|
+
React.createElement(icons_1.Icon, { name: "delete" })),
|
|
149
|
+
"Clear")),
|
|
150
|
+
predicateDefs.map((p) => (React.createElement(SimpleButton_1.default, { "data-name": filter.Predicate.PredicateId, disabled: this.isFilterDisabled(), key: p.id, p: 2, variant: "text", tone: (filter === null || filter === void 0 ? void 0 : filter.Predicate.PredicateId) === p.id ? 'info' : 'none', onClick: () => this.selectColumnPredicate(p.id) },
|
|
157
151
|
React.createElement("span", { style: { width: 20, marginRight: 10 } }, this.renderPredicateIcon(p)),
|
|
158
152
|
p.label))))) },
|
|
159
|
-
React.createElement(SimpleButton_1.default, { style: {
|
|
153
|
+
React.createElement(SimpleButton_1.default, { "data-name": filter.Predicate.PredicateId, style: {
|
|
160
154
|
borderRadius: 0,
|
|
161
155
|
borderColor: 'var(--ab-color-primarydark)',
|
|
162
156
|
} }, this.renderPredicateIcon(activePredicateDef)))),
|
|
@@ -144,6 +144,6 @@ const NewScopeComponent = (props) => {
|
|
|
144
144
|
React.createElement(AdaptableFormControlTextClear_1.AdaptableFormControlTextClear, { value: columnsSearchText, OnTextChange: setColumnsSearchText, placeholder: "Type to search columns", style: { flex: 1 } })),
|
|
145
145
|
React.createElement(rebass_1.Flex, { paddingLeft: 2, flex: 1, style: { overflow: 'hidden' } },
|
|
146
146
|
React.createElement(ColumnSelector_1.NewColumnSelector, { columnFilterText: columnsSearchText, allowReorder: false, availableColumns: scopeColumns, selected: scopeApi.getColumnIdsInScope(props.scope), onChange: onColumnsSelectedChanged }))),
|
|
147
|
-
React.createElement(Tabs_1.Tabs.Content, { value: "DataType", style: { flex: 'none' }, "data-name": "datatype-scope" }, dataTypeOptions.map((dataTypeOption) => (React.createElement(CheckBox_1.CheckBox, {
|
|
147
|
+
React.createElement(Tabs_1.Tabs.Content, { value: "DataType", style: { flex: 'none' }, "data-name": "datatype-scope" }, dataTypeOptions.map((dataTypeOption) => (React.createElement(CheckBox_1.CheckBox, { "data-name": "scope", "data-value": dataTypeOption.value, key: dataTypeOption.value, checked: dataTypesInScope && dataTypesInScope.includes(dataTypeOption.value), onChange: (checked) => onCheckBoxDataTypeChecked(checked, dataTypeOption.value) }, dataTypeOption.label))))));
|
|
148
148
|
};
|
|
149
149
|
exports.NewScopeComponent = NewScopeComponent;
|
|
@@ -21,11 +21,7 @@ class PanelWithButton extends React.Component {
|
|
|
21
21
|
React.createElement(rebass_1.Box, { marginRight: 2, "data-name": "space-before" }),
|
|
22
22
|
this.props.headerText,
|
|
23
23
|
React.createElement(rebass_1.Box, { marginRight: 2, "data-name": "space-after" }),
|
|
24
|
-
this.props.infoLink != null && !this.props.infoLinkDisabled && (React.createElement(ButtonInfo_1.ButtonInfo, {
|
|
25
|
-
color: 'var(--ab-color-text-on-add)',
|
|
26
|
-
fill: 'var(--ab-color-text-on-add)',
|
|
27
|
-
background: 'var(--ab-color-action-add)',
|
|
28
|
-
}, onClick: () => window.open(this.props.infoLink, '_blank' // <- opens the link in a new tab or window.
|
|
24
|
+
this.props.infoLink != null && !this.props.infoLinkDisabled && (React.createElement(ButtonInfo_1.ButtonInfo, { onClick: () => window.open(this.props.infoLink, '_blank' // <- opens the link in a new tab or window.
|
|
29
25
|
) }))),
|
|
30
26
|
React.createElement(rebass_1.Box, { style: { flex: 1 } }),
|
|
31
27
|
buttonContent ? (React.createElement(SimpleButton_1.default, { variant: "raised", tone: "accent", disabled: this.props.buttonDisabled, onClick: () => (this.props.buttonClick ? this.props.buttonClick() : null) }, buttonContent)) : null,
|
|
@@ -26,11 +26,7 @@ class PanelWithImageCmp extends React.Component {
|
|
|
26
26
|
React.createElement(rebass_1.Box, { marginRight: 2 }),
|
|
27
27
|
this.props.header,
|
|
28
28
|
React.createElement(rebass_1.Box, { marginRight: 2, "data-name": "space-after" }),
|
|
29
|
-
this.props.infoLink != null && !this.props.infoLinkDisabled && (React.createElement(ButtonInfo_1.ButtonInfo, {
|
|
30
|
-
color: 'var(--ab-color-text-on-add)',
|
|
31
|
-
fill: 'var(--ab-color-text-on-add)',
|
|
32
|
-
background: 'var(--ab-color-action-add)',
|
|
33
|
-
}, onClick: () => window.open(this.props.infoLink, '_blank' // <- opens the link in a new tab or window.
|
|
29
|
+
this.props.infoLink != null && !this.props.infoLinkDisabled && (React.createElement(ButtonInfo_1.ButtonInfo, { onClick: () => window.open(this.props.infoLink, '_blank' // <- opens the link in a new tab or window.
|
|
34
30
|
) }))),
|
|
35
31
|
React.createElement(rebass_1.Box, { flex: 1 }),
|
|
36
32
|
this.props.button && React.cloneElement(this.props.button))));
|
|
@@ -71,9 +71,9 @@ const AdaptablePopup = (props) => {
|
|
|
71
71
|
}
|
|
72
72
|
},
|
|
73
73
|
} },
|
|
74
|
-
React.createElement(AdaptablePopupDialog_1.AdaptablePopupDialog, { baseClassName: baseClassName, className: className, friendlyName: friendlyName, isActionModule: isStandalone, isWindowModal: isWindowModal, onHide: props.onHide, modalContainer: modalContainer },
|
|
74
|
+
React.createElement(AdaptablePopupDialog_1.AdaptablePopupDialog, { dataName: componentModule, baseClassName: baseClassName, className: className, friendlyName: friendlyName, isActionModule: isStandalone, isWindowModal: isWindowModal, onHide: props.onHide, modalContainer: modalContainer },
|
|
75
75
|
!isStandalone && React.createElement(TopBar_1.default, { icon: settingsPanelOptions.icon }, settingsPanelTitle),
|
|
76
|
-
React.createElement(rebass_1.Flex, {
|
|
76
|
+
React.createElement(rebass_1.Flex, { flexDirection: "row", flex: "1 1 0", style: { minHeight: 0 }, className: accessLevel == 'ReadOnly' ? GeneralConstants.READ_ONLY_STYLE : '' },
|
|
77
77
|
!isStandalone && (React.createElement(Navigation_1.Navigation, { menuItems: menuItems, api: props.api, activeItem: activeItem, customSettingsPanels: settingsPanelOptions.customSettingsPanels })),
|
|
78
78
|
React.createElement(rebass_1.Flex, { flex: 1, className: "ab-Adaptable-Popup__Body" }, moduleViewContent)))));
|
|
79
79
|
};
|
|
@@ -46,19 +46,6 @@ const PopupDialog = (props) => {
|
|
|
46
46
|
};
|
|
47
47
|
const AdaptablePopupDialog = (props) => {
|
|
48
48
|
const { isActionModule, style, friendlyName, baseClassName, className, children, onHide, isWindowModal, modalContainer, } = props;
|
|
49
|
-
const elementRef = React.useMemo(() => {
|
|
50
|
-
if (!modalContainer) {
|
|
51
|
-
return null;
|
|
52
|
-
}
|
|
53
|
-
let ref = null;
|
|
54
|
-
if (typeof modalContainer === 'string') {
|
|
55
|
-
ref = globalThis.document.querySelector(modalContainer);
|
|
56
|
-
}
|
|
57
|
-
else {
|
|
58
|
-
ref = modalContainer;
|
|
59
|
-
}
|
|
60
|
-
return ref;
|
|
61
|
-
}, [modalContainer]);
|
|
62
49
|
if (modalContainer) {
|
|
63
50
|
let ref = null;
|
|
64
51
|
if (typeof modalContainer === 'string') {
|
|
@@ -67,15 +54,15 @@ const AdaptablePopupDialog = (props) => {
|
|
|
67
54
|
else {
|
|
68
55
|
ref = modalContainer;
|
|
69
56
|
}
|
|
70
|
-
return (0, react_dom_1.createPortal)(React.createElement(Dialog_1.default, { modal: false, fixed: false, onDismiss: onHide, className: className }, children), ref);
|
|
57
|
+
return (0, react_dom_1.createPortal)(React.createElement(Dialog_1.default, { "data-name": props.dataName, modal: false, fixed: false, onDismiss: onHide, className: className }, children), ref);
|
|
71
58
|
}
|
|
72
59
|
if (isWindowModal) {
|
|
73
60
|
const settingsPanelOptionsKey = isActionModule ? `action-${friendlyName}` : 'settings';
|
|
74
|
-
return (React.createElement(WindowDialog, { settingsPanelOptionsKey: settingsPanelOptionsKey, isActionModule: isActionModule, onHide: onHide, style: style, baseClassName: baseClassName, className: className }, children));
|
|
61
|
+
return (React.createElement(WindowDialog, { dataName: props.dataName, settingsPanelOptionsKey: settingsPanelOptionsKey, isActionModule: isActionModule, onHide: onHide, style: style, baseClassName: baseClassName, className: className }, children));
|
|
75
62
|
}
|
|
76
63
|
else {
|
|
77
64
|
const modalStyle = Object.assign(Object.assign({}, style), (isActionModule ? { maxWidth: 800, maxHeight: 600 } : { maxWidth: 1200, maxHeight: 1000 }));
|
|
78
|
-
return (React.createElement(PopupDialog, { onHide: onHide, style: modalStyle, className: className }, children));
|
|
65
|
+
return (React.createElement(PopupDialog, { "data-name": props.dataName, onHide: onHide, style: modalStyle, className: className }, children));
|
|
79
66
|
}
|
|
80
67
|
};
|
|
81
68
|
exports.AdaptablePopupDialog = AdaptablePopupDialog;
|
|
@@ -15,7 +15,7 @@ const PopupPanel = (props) => {
|
|
|
15
15
|
React.createElement(rebass_1.Box, { marginRight: 0, "data-name": "space-before" }),
|
|
16
16
|
React.createElement("div", { className: `${baseClassName}__Header__Title` }, props.headerText),
|
|
17
17
|
React.createElement(rebass_1.Box, { marginRight: 2, "data-name": "space-after" }),
|
|
18
|
-
props.infoLink != null && !props.infoLinkDisabled && (React.createElement(ButtonInfo_1.ButtonInfo, { iconSize: 24, onClick: () => window.open(props.infoLink, '_blank' // <- opens the link in a new tab or window.
|
|
18
|
+
props.infoLink != null && !props.infoLinkDisabled && (React.createElement(ButtonInfo_1.ButtonInfo, { tone: "none", variant: "text", iconSize: 24, onClick: () => window.open(props.infoLink, '_blank' // <- opens the link in a new tab or window.
|
|
19
19
|
) }))),
|
|
20
20
|
React.createElement(rebass_1.Box, { style: { flex: 1 } }),
|
|
21
21
|
props.button),
|
|
@@ -34,17 +34,17 @@ const AdaptablePopupTeamSharing = (props) => {
|
|
|
34
34
|
": a \"live\" share that is automatically updated with every local change"))),
|
|
35
35
|
React.createElement(FormLayout_1.default, { padding: 2 },
|
|
36
36
|
React.createElement(FormLayout_1.FormRow, { label: "Name: " },
|
|
37
|
-
React.createElement(Input_1.default, { autoFocus: true, value: config.description, type: "string", width: 300, placeholder: "Enter text", onChange: (e) => setConfig(Object.assign(Object.assign({}, config), { description: e.target.value })) })),
|
|
37
|
+
React.createElement(Input_1.default, { "data-name": "teamsharing-entity-name", autoFocus: true, value: config.description, type: "string", width: 300, placeholder: "Enter text", onChange: (e) => setConfig(Object.assign(Object.assign({}, config), { description: e.target.value })) })),
|
|
38
38
|
React.createElement(FormLayout_1.FormRow, { label: "Share: " },
|
|
39
39
|
React.createElement(rebass_1.Flex, { flexDirection: "row" },
|
|
40
|
-
React.createElement(Radio_1.default, { checked: config.type === 'Snapshot', onChange: () => setConfig(Object.assign(Object.assign({}, config), { type: 'Snapshot' })) }, "Snapshot"),
|
|
40
|
+
React.createElement(Radio_1.default, { "data-name": "teamsharing-entity-type-snapshot", checked: config.type === 'Snapshot', onChange: () => setConfig(Object.assign(Object.assign({}, config), { type: 'Snapshot' })) }, "Snapshot"),
|
|
41
41
|
' ',
|
|
42
|
-
React.createElement(Radio_1.default, { marginLeft: 3, checked: config.type === 'Active', onChange: () => setConfig(Object.assign(Object.assign({}, config), { type: 'Active' })) }, "Active"),
|
|
42
|
+
React.createElement(Radio_1.default, { "data-name": "teamsharing-entity-type-active", marginLeft: 3, checked: config.type === 'Active', onChange: () => setConfig(Object.assign(Object.assign({}, config), { type: 'Active' })) }, "Active"),
|
|
43
43
|
' '))),
|
|
44
44
|
React.createElement(rebass_1.Box, { marginTop: 3 },
|
|
45
45
|
React.createElement(rebass_1.Flex, { padding: 2 },
|
|
46
|
-
React.createElement(SimpleButton_1.default, { tone: "neutral", variant: "raised", onClick: () => onClose()
|
|
46
|
+
React.createElement(SimpleButton_1.default, { "data-name": "cancel", tone: "neutral", variant: "raised", onClick: () => onClose() }, "Cancel"),
|
|
47
47
|
React.createElement("div", { style: { flex: 1 } }),
|
|
48
|
-
React.createElement(SimpleButton_1.default, {
|
|
48
|
+
React.createElement(SimpleButton_1.default, { "data-name": "ok", tone: "accent", variant: "raised", disabled: StringExtensions_1.StringExtensions.IsNullOrEmpty(config.description), onClick: () => onConfirm(config) }, "OK")))))));
|
|
49
49
|
};
|
|
50
50
|
exports.AdaptablePopupTeamSharing = AdaptablePopupTeamSharing;
|
|
@@ -41,22 +41,22 @@ class ScopeComponent extends React.Component {
|
|
|
41
41
|
React.createElement(DualListBoxEditor_1.DualListBoxEditor, { style: { flex: 1, overflow: 'hidden', height: '250px' }, AvailableValues: availableValues, SelectedValues: this.state.selectedColumnValues, HeaderAvailable: "Columns", HeaderSelected: "Columns In Style", onChange: (SelectedValues) => this.onColumnsSelectedChanged(SelectedValues) }))),
|
|
42
42
|
this.state.ScopeChoice == 'DataType' && (React.createElement(Panel_1.default, { "data-name": "datatype-scope", variant: "modern" },
|
|
43
43
|
React.createElement(rebass_1.Flex, { flexDirection: "row" },
|
|
44
|
-
this.state.availableDataTypes.includes('Date') && (React.createElement(CheckBox_1.CheckBox, { "data-name": "scope", checked: this.state.componentScope &&
|
|
44
|
+
this.state.availableDataTypes.includes('Date') && (React.createElement(CheckBox_1.CheckBox, { "data-name": "scope", "data-value": "date", checked: this.state.componentScope &&
|
|
45
45
|
'DataTypes' in this.state.componentScope &&
|
|
46
46
|
this.props.api.scopeApi
|
|
47
47
|
.getDataTypesInScope(this.state.componentScope)
|
|
48
48
|
.includes('Date'), marginLeft: 2, onChange: (checked) => this.onCheckBoxDataTypeChecked(checked, 'Date') }, "Date")),
|
|
49
|
-
this.state.availableDataTypes.includes('Number') && (React.createElement(CheckBox_1.CheckBox, { "data-name": "scope", checked: this.state.componentScope &&
|
|
49
|
+
this.state.availableDataTypes.includes('Number') && (React.createElement(CheckBox_1.CheckBox, { "data-name": "scope", "data-value": "number", checked: this.state.componentScope &&
|
|
50
50
|
'DataTypes' in this.state.componentScope &&
|
|
51
51
|
this.props.api.scopeApi
|
|
52
52
|
.getDataTypesInScope(this.state.componentScope)
|
|
53
53
|
.includes('Number'), marginLeft: 4, onChange: (checked) => this.onCheckBoxDataTypeChecked(checked, 'Number') }, "Number")),
|
|
54
|
-
this.state.availableDataTypes.includes('String') && (React.createElement(CheckBox_1.CheckBox, { "data-name": "scope", checked: this.state.componentScope &&
|
|
54
|
+
this.state.availableDataTypes.includes('String') && (React.createElement(CheckBox_1.CheckBox, { "data-name": "scope", "data-value": "string", checked: this.state.componentScope &&
|
|
55
55
|
'DataTypes' in this.state.componentScope &&
|
|
56
56
|
this.props.api.scopeApi
|
|
57
57
|
.getDataTypesInScope(this.state.componentScope)
|
|
58
58
|
.includes('String'), marginLeft: 4, onChange: (checked) => this.onCheckBoxDataTypeChecked(checked, 'String') }, "String")),
|
|
59
|
-
this.state.availableDataTypes.includes('Boolean') && (React.createElement(CheckBox_1.CheckBox, { "data-name": "scope", checked: this.state.componentScope &&
|
|
59
|
+
this.state.availableDataTypes.includes('Boolean') && (React.createElement(CheckBox_1.CheckBox, { "data-name": "scope", "data-value": "boolean", checked: this.state.componentScope &&
|
|
60
60
|
'DataTypes' in this.state.componentScope &&
|
|
61
61
|
this.props.api.scopeApi
|
|
62
62
|
.getDataTypesInScope(this.state.componentScope)
|
|
@@ -74,8 +74,8 @@ class ColumnValueSelector extends React.Component {
|
|
|
74
74
|
]
|
|
75
75
|
: this.state.distinctColumnValues;
|
|
76
76
|
const dd = (React.createElement("div", null,
|
|
77
|
-
React.createElement(DropdownButton_1.default, { className: className, columns: ['label'], variant: "text", showClearButton: true, onClear: () => this.onSelectedValueChange([]), style: { fontSize: 'small' }, disabled: this.props.disabled, items: items, onExpand: this.handleSelectedValueExpand }, this.props.selectedColumnValue ? this.props.selectedColumnValue : placeholderText)));
|
|
78
|
-
const input = (React.createElement(AdaptableInput_1.default, { type: this.props.selectedColumn
|
|
77
|
+
React.createElement(DropdownButton_1.default, { "data-name": "bulkupdate-value-selector", className: className, columns: ['label'], variant: "text", showClearButton: true, onClear: () => this.onSelectedValueChange([]), style: { fontSize: 'small' }, disabled: this.props.disabled, items: items, onExpand: this.handleSelectedValueExpand }, this.props.selectedColumnValue ? this.props.selectedColumnValue : placeholderText)));
|
|
78
|
+
const input = (React.createElement(AdaptableInput_1.default, { "data-name": "bulkupdate-value-input", type: this.props.selectedColumn
|
|
79
79
|
? UIHelper_1.default.getDescriptionForDataType(this.props.selectedColumn.dataType)
|
|
80
80
|
: 'text', placeholder: this.props.selectedColumn
|
|
81
81
|
? UIHelper_1.default.getPlaceHolderforDataType(this.props.selectedColumn.dataType)
|