@adaptabletools/adaptable 13.0.0-canary.17 → 13.0.0-canary.18
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 +110 -110
- 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/Api/FormatColumnApi.d.ts +37 -29
- package/src/Api/Implementation/FormatColumnApiImpl.d.ts +21 -11
- package/src/Api/Implementation/FormatColumnApiImpl.js +42 -63
- package/src/Strategy/FormatColumnModule.js +2 -12
- 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/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/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.js +1 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
|
@@ -27,13 +27,16 @@ class FormatColumnApiImpl extends ApiBase_1.ApiBase {
|
|
|
27
27
|
return this.getAllFormatColumn().filter((formatColumn) => formatColumn.IsSuspended);
|
|
28
28
|
}
|
|
29
29
|
getAllFormatColumnWithStyle() {
|
|
30
|
-
return this.getAllFormatColumn().filter((fc) => fc.Style
|
|
30
|
+
return this.getAllFormatColumn().filter((fc) => fc.Style);
|
|
31
|
+
}
|
|
32
|
+
getAllFormatColumnWithStyleAndCellAlignment() {
|
|
33
|
+
return this.getAllFormatColumn().filter((fc) => fc.Style || fc.CellAlignment);
|
|
31
34
|
}
|
|
32
35
|
getAllFormatColumnWithDisplayFormat() {
|
|
33
|
-
return this.getAllFormatColumn().filter((fc) => fc.DisplayFormat
|
|
36
|
+
return this.getAllFormatColumn().filter((fc) => fc.DisplayFormat);
|
|
34
37
|
}
|
|
35
38
|
getAllFormatColumnWithCellAlignment() {
|
|
36
|
-
return this.getAllFormatColumn().filter((fc) => fc.CellAlignment
|
|
39
|
+
return this.getAllFormatColumn().filter((fc) => fc.CellAlignment);
|
|
37
40
|
}
|
|
38
41
|
addFormatColumn(formatColumn) {
|
|
39
42
|
this.addUidToAdaptableObject(formatColumn);
|
|
@@ -77,37 +80,27 @@ class FormatColumnApiImpl extends ApiBase_1.ApiBase {
|
|
|
77
80
|
applyFormatColumnDisplayFormats() {
|
|
78
81
|
throw 'This API method is deprecated - it is not needed anymore.';
|
|
79
82
|
}
|
|
80
|
-
|
|
81
|
-
const formatColumns = this.
|
|
82
|
-
return this.
|
|
83
|
-
}
|
|
84
|
-
getColumnFormatColumnsWithStyle(column) {
|
|
85
|
-
const formatColumns = this.getAllFormatColumnWithStyle();
|
|
86
|
-
return this.getFormatColumnInColumnScope(formatColumns, column).filter((scopedFormatColumn) => {
|
|
87
|
-
return this.adaptable.api.scopeApi.isColumnInScope(column, scopedFormatColumn.Scope);
|
|
88
|
-
});
|
|
83
|
+
getFormatColumnsForColumn(column, config) {
|
|
84
|
+
const formatColumns = this.getAllFormatColumn().filter((formatColumn) => (config === null || config === void 0 ? void 0 : config.includeSuspended) || !formatColumn.IsSuspended);
|
|
85
|
+
return this.getFormatColumnWithColumnInScope(formatColumns, column);
|
|
89
86
|
}
|
|
90
|
-
|
|
91
|
-
const formatColumns = this.
|
|
92
|
-
return this.
|
|
87
|
+
getFormatColumnsWithStyleForColumn(column, config) {
|
|
88
|
+
const formatColumns = this.getAllFormatColumnWithStyleAndCellAlignment().filter((formatColumn) => (config === null || config === void 0 ? void 0 : config.includeSuspended) || !formatColumn.IsSuspended);
|
|
89
|
+
return this.getFormatColumnWithColumnInScope(formatColumns, column);
|
|
93
90
|
}
|
|
94
|
-
|
|
91
|
+
getFormatColumnsForColumnId(columnId, config) {
|
|
95
92
|
const abColumn = this.adaptable.api.columnApi.getColumnFromId(columnId);
|
|
96
93
|
if (!abColumn) {
|
|
97
94
|
return undefined;
|
|
98
95
|
}
|
|
99
|
-
return this.
|
|
96
|
+
return this.getFormatColumnsForColumn(abColumn, config);
|
|
100
97
|
}
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
return this.getAppropriateFormatColumn(formatColumns, column);
|
|
98
|
+
getFormatColumnWithStyleClassNameForColumn(column, config) {
|
|
99
|
+
return this.getFormatColumnsWithStyleForColumn(column, config).filter((formatColumn) => { var _a; return StringExtensions_1.default.IsNotNullOrEmpty((_a = formatColumn === null || formatColumn === void 0 ? void 0 : formatColumn.Style) === null || _a === void 0 ? void 0 : _a.ClassName); });
|
|
104
100
|
}
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
getFormatColumnWithDisplayFormatForColumn(column) {
|
|
109
|
-
const formatColumns = this.getAllFormatColumnWithDisplayFormat();
|
|
110
|
-
return this.getAppropriateFormatColumn(formatColumns, column);
|
|
101
|
+
getFormatColumnsWithDisplayFormatForColumn(column, config) {
|
|
102
|
+
const formatColumns = this.getAllFormatColumnWithDisplayFormat().filter((formatColumn) => (config === null || config === void 0 ? void 0 : config.includeSuspended) || !formatColumn.IsSuspended);
|
|
103
|
+
return this.getFormatColumnWithColumnInScope(formatColumns, column);
|
|
111
104
|
}
|
|
112
105
|
getFormatColumnWithSingleColumnScope(columnId) {
|
|
113
106
|
const abColumn = this.adaptable.api.columnApi.getColumnFromId(columnId);
|
|
@@ -126,7 +119,8 @@ class FormatColumnApiImpl extends ApiBase_1.ApiBase {
|
|
|
126
119
|
});
|
|
127
120
|
return returnFormatColumn;
|
|
128
121
|
}
|
|
129
|
-
|
|
122
|
+
// TODO is this really needed, I don't think it achieves anything
|
|
123
|
+
getFormatColumnInColumnScope(formatColumns) {
|
|
130
124
|
// we need to maintain the format columns order, therefore we will extract all 3 scope types in a single iteration
|
|
131
125
|
return formatColumns.filter((fc) => {
|
|
132
126
|
return (
|
|
@@ -138,8 +132,8 @@ class FormatColumnApiImpl extends ApiBase_1.ApiBase {
|
|
|
138
132
|
this.adaptable.api.scopeApi.scopeIsAll(fc.Scope));
|
|
139
133
|
});
|
|
140
134
|
}
|
|
141
|
-
|
|
142
|
-
return this.getFormatColumnInColumnScope(formatColumns
|
|
135
|
+
getFormatColumnWithColumnInScope(formatColumns, column) {
|
|
136
|
+
return this.getFormatColumnInColumnScope(formatColumns).filter((scopedFormatColumn) => this.adaptable.api.scopeApi.isColumnInScope(column, scopedFormatColumn.Scope));
|
|
143
137
|
}
|
|
144
138
|
hasStyleFormatColumns() {
|
|
145
139
|
return ArrayExtensions_1.default.IsNotNullOrEmpty(this.getAllFormatColumnWithStyle());
|
|
@@ -214,50 +208,35 @@ class FormatColumnApiImpl extends ApiBase_1.ApiBase {
|
|
|
214
208
|
getFormatColumnDefsForScope(scope) {
|
|
215
209
|
return this.getFormatColumnPredicateDefs().filter((predicateDef) => this.adaptable.api.scopeApi.isScopeInScope(scope, predicateDef.columnScope));
|
|
216
210
|
}
|
|
217
|
-
|
|
218
|
-
|
|
211
|
+
getFormatColumnsRelevantForColumn(formatColumns, column, params) {
|
|
212
|
+
return formatColumns.filter((formatColumn) => this.isFormatColumnRelevantForColumn(formatColumn, column, params));
|
|
213
|
+
}
|
|
214
|
+
isFormatColumnRelevantForColumn(formatColumn, column, params) {
|
|
215
|
+
// suspended is important to be first
|
|
219
216
|
if (formatColumn.IsSuspended) {
|
|
220
217
|
return false;
|
|
221
218
|
}
|
|
222
219
|
if (!formatColumn.Rule) {
|
|
223
220
|
return true;
|
|
224
221
|
}
|
|
225
|
-
if (
|
|
226
|
-
|
|
227
|
-
this.evaluateExpression(formatColumn, params.node)) {
|
|
228
|
-
return true;
|
|
229
|
-
}
|
|
230
|
-
// nothing has passed then return false
|
|
231
|
-
return false;
|
|
232
|
-
}
|
|
233
|
-
isFormatColumnActiveForColumn(formatColumn, column, params) {
|
|
234
|
-
// suspedned is important to be first
|
|
235
|
-
if (formatColumn.IsSuspended) {
|
|
222
|
+
if (!formatColumn.IncludeGroupedRows &&
|
|
223
|
+
this.adaptable.api.gridApi.isGroupRowNode(params.node)) {
|
|
236
224
|
return false;
|
|
237
225
|
}
|
|
238
|
-
|
|
239
|
-
|
|
226
|
+
// first run the predicate
|
|
227
|
+
if (formatColumn.Rule.Predicate && formatColumn.Rule.Predicate.PredicateId) {
|
|
228
|
+
return this.evaluatePredicate({
|
|
229
|
+
formatColumn,
|
|
230
|
+
column,
|
|
231
|
+
value: params.value,
|
|
232
|
+
node: params.node,
|
|
233
|
+
});
|
|
240
234
|
}
|
|
241
|
-
if (
|
|
242
|
-
|
|
243
|
-
if (formatColumn.Rule.Predicate && formatColumn.Rule.Predicate.PredicateId) {
|
|
244
|
-
if (this.evaluatePredicate({
|
|
245
|
-
formatColumn,
|
|
246
|
-
column,
|
|
247
|
-
value: params.value,
|
|
248
|
-
node: params.node,
|
|
249
|
-
})) {
|
|
250
|
-
return true;
|
|
251
|
-
}
|
|
252
|
-
}
|
|
253
|
-
else if (formatColumn.Rule.BooleanExpression) {
|
|
254
|
-
if (this.evaluateExpression(formatColumn, params.node)) {
|
|
255
|
-
return true;
|
|
256
|
-
}
|
|
257
|
-
}
|
|
258
|
-
// nothing has passed then return false
|
|
259
|
-
return false;
|
|
235
|
+
else if (formatColumn.Rule.BooleanExpression) {
|
|
236
|
+
return this.evaluateExpression(formatColumn, params.node);
|
|
260
237
|
}
|
|
238
|
+
// nothing has passed then return false
|
|
239
|
+
return false;
|
|
261
240
|
}
|
|
262
241
|
evaluatePredicate({ formatColumn, column, value, node, }) {
|
|
263
242
|
const params = {
|
|
@@ -77,22 +77,12 @@ class FormatColumnModule extends AdaptableModuleBase_1.AdaptableModuleBase {
|
|
|
77
77
|
addColumnMenuItems(column) {
|
|
78
78
|
let returnColumnMenuItems = [];
|
|
79
79
|
if (column && this.isModuleEditable() && !column.isSparkline) {
|
|
80
|
-
// not fullproof as might be an All but its generally pretty good
|
|
81
|
-
let formatColumn = this.api.formatColumnApi.getFormatColumnForColumn(column);
|
|
82
|
-
let formatExists = formatColumn
|
|
83
|
-
? this.api.scopeApi.isColumnInScopeColumns(column, formatColumn.Scope)
|
|
84
|
-
: false;
|
|
85
|
-
if (formatColumn && formatColumn.IsReadOnly && formatColumn.IsReadOnly == true) {
|
|
86
|
-
formatExists = false;
|
|
87
|
-
}
|
|
88
|
-
let label = formatExists ? 'Edit ' : 'Create ';
|
|
89
80
|
let popupParam = {
|
|
90
81
|
column: column,
|
|
91
|
-
action:
|
|
82
|
+
action: 'New',
|
|
92
83
|
source: 'ColumnMenu',
|
|
93
|
-
value: formatColumn,
|
|
94
84
|
};
|
|
95
|
-
returnColumnMenuItems.push(this.createColumnMenuItemShowPopup(
|
|
85
|
+
returnColumnMenuItems.push(this.createColumnMenuItemShowPopup('Create Format Column', this.moduleInfo.Popup, this.moduleInfo.Glyph, popupParam));
|
|
96
86
|
}
|
|
97
87
|
return returnColumnMenuItems;
|
|
98
88
|
}
|
|
@@ -36,7 +36,7 @@ class AdaptablePopover extends React.Component {
|
|
|
36
36
|
return (React.createElement(rebass_1.Flex, { alignItems: "center", className: this.props.className },
|
|
37
37
|
React.createElement(OverlayTrigger_1.default, { showTriangle: true, render: () => popoverClickRootClose, showEvent: (this.props.showEvent || 'mouseenter'), hideEvent: (this.props.hideEvent || 'mouseleave'), style: {
|
|
38
38
|
overflow: 'visible',
|
|
39
|
-
}, defaultZIndex: 100000 }, useButton ? (React.createElement(ButtonInfo_1.ButtonInfo, { style: iconStyle, onClick: () => null, icon: showIcon && icon, tooltip: this.props.tooltipText }, this.props.children)) : (React.createElement("div", { title: this.props.tooltipText, tabIndex: 0, style: { cursor: 'pointer', display: 'inline-block' } },
|
|
39
|
+
}, defaultZIndex: 100000 }, useButton ? (React.createElement(ButtonInfo_1.ButtonInfo, { style: iconStyle, variant: "text", onClick: () => null, icon: showIcon && icon, tooltip: this.props.tooltipText }, this.props.children)) : (React.createElement("div", { title: this.props.tooltipText, tabIndex: 0, style: { cursor: 'pointer', display: 'inline-block' } },
|
|
40
40
|
this.props.children,
|
|
41
41
|
showIcon && React.createElement(icons_1.Icon, { name: icon }))))));
|
|
42
42
|
}
|
|
@@ -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
|
};
|