@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.
Files changed (80) hide show
  1. package/base.css +99 -0
  2. package/base.css.map +1 -1
  3. package/bundle.cjs.js +110 -110
  4. package/index.css +115 -0
  5. package/index.css.map +1 -1
  6. package/package.json +1 -1
  7. package/publishTimestamp.d.ts +1 -1
  8. package/publishTimestamp.js +1 -1
  9. package/src/Api/FormatColumnApi.d.ts +37 -29
  10. package/src/Api/Implementation/FormatColumnApiImpl.d.ts +21 -11
  11. package/src/Api/Implementation/FormatColumnApiImpl.js +42 -63
  12. package/src/Strategy/FormatColumnModule.js +2 -12
  13. package/src/View/AdaptablePopover/index.js +1 -1
  14. package/src/View/Alert/Wizard/AlertBehaviourWizardSection.js +9 -9
  15. package/src/View/Alert/Wizard/AlertDisplayWizardSection.js +6 -5
  16. package/src/View/BulkUpdate/BulkUpdatePopup.js +1 -1
  17. package/src/View/Components/AdaptableObjectList/AdaptableObjectList.js +1 -1
  18. package/src/View/Components/AdaptableObjectRow/index.js +1 -6
  19. package/src/View/Components/Buttons/ButtonInfo.d.ts +1 -3
  20. package/src/View/Components/Buttons/ButtonInfo.js +3 -5
  21. package/src/View/Components/EntityRulesEditor/index.js +8 -17
  22. package/src/View/Components/FilterForm/FilterForm.js +11 -16
  23. package/src/View/Components/FilterForm/QuickFilterForm.js +7 -13
  24. package/src/View/Components/NewScopeComponent.js +1 -1
  25. package/src/View/Components/Panels/PanelWithButton.js +1 -5
  26. package/src/View/Components/Panels/PanelWithImage.js +1 -5
  27. package/src/View/Components/Popups/AdaptablePopup/AdaptablePopup.js +2 -2
  28. package/src/View/Components/Popups/AdaptablePopup/AdaptablePopupDialog.d.ts +1 -0
  29. package/src/View/Components/Popups/AdaptablePopup/AdaptablePopupDialog.js +3 -16
  30. package/src/View/Components/Popups/AdaptablePopup/PopupPanel.js +1 -1
  31. package/src/View/Components/Popups/AdaptablePopupTeamSharing.js +5 -5
  32. package/src/View/Components/ScopeComponent.js +4 -4
  33. package/src/View/Components/Selectors/ColumnValueSelector.js +2 -2
  34. package/src/View/Components/StyleComponent.js +12 -17
  35. package/src/View/ConditionalStyle/Wizard/ConditionalStyleSettingsWizardSettings.js +1 -1
  36. package/src/View/DataSet/DataSetSelector.js +1 -1
  37. package/src/View/Export/ReportExportDropdown.js +1 -1
  38. package/src/View/Export/Wizard/ReportNameWizardSection.js +10 -11
  39. package/src/View/FlashingCell/FlashingCellStyle.js +3 -3
  40. package/src/View/FlashingCell/Wizard/FlashingCellSettingsWizardSection.js +6 -6
  41. package/src/View/FlashingCell/Wizard/FlashingCellWizard.js +4 -4
  42. package/src/View/FormatColumn/FormatColumnSummary.js +1 -1
  43. package/src/View/FormatColumn/Wizard/FormatColumnFormatWizardSection.js +26 -26
  44. package/src/View/FormatColumn/Wizard/FormatColumnSettingsWizardSection.js +2 -6
  45. package/src/View/FormatColumn/Wizard/FormatColumnStyleWizardSection.js +1 -1
  46. package/src/View/FreeTextColumn/Wizard/FreeTextColumnSettingsWizardSection.js +7 -7
  47. package/src/View/Layout/LayoutRadioSelector.js +1 -1
  48. package/src/View/Layout/Wizard/Components/ColumnLabels.js +1 -1
  49. package/src/View/Layout/Wizard/sections/ColumnsSection.js +5 -5
  50. package/src/View/Layout/Wizard/sections/SettingsSection.js +2 -2
  51. package/src/View/PlusMinus/Wizard/PlusMinusSettingsWizardSection.js +3 -3
  52. package/src/View/Query/Wizard/NamedQuerySettingsWizardSection.js +1 -1
  53. package/src/View/QuickSearch/QuickSearchPopup.js +2 -2
  54. package/src/View/Schedule/Wizard/ScheduleScheduleWizard.js +5 -5
  55. package/src/View/Schedule/Wizard/ScheduleSettingsWizard/ScheduleSettingsGlue42.js +1 -1
  56. package/src/View/Schedule/Wizard/ScheduleSettingsWizard/ScheduleSettingsIPushPull.js +5 -5
  57. package/src/View/Schedule/Wizard/ScheduleSettingsWizard/ScheduleSettingsOpenFin.js +1 -1
  58. package/src/View/Schedule/Wizard/ScheduleSettingsWizard/ScheduleSettingsReminder.js +5 -5
  59. package/src/View/Schedule/Wizard/ScheduleSettingsWizard/ScheduleSettingsReport.js +2 -2
  60. package/src/View/Shortcut/Wizard/ShortcutSettingsWizard.js +3 -3
  61. package/src/View/SmartEdit/SmartEditPopup.js +3 -3
  62. package/src/View/SpecialColumnSettingsWizardStep.js +10 -10
  63. package/src/View/StateManagement/StateManagementPopup.js +4 -4
  64. package/src/View/SystemStatus/SystemStatusEntityRow.js +4 -6
  65. package/src/View/TeamSharing/SharedEntityObjectView.js +1 -1
  66. package/src/View/TeamSharing/TeamSharingApplyButton.js +1 -1
  67. package/src/View/Theme/ThemePopup.js +1 -1
  68. package/src/View/Wizard/OnePageAdaptableWizard.js +1 -2
  69. package/src/agGrid/Adaptable.d.ts +0 -1
  70. package/src/agGrid/Adaptable.js +41 -65
  71. package/src/agGrid/PercentBarRenderer.js +3 -6
  72. package/src/agGrid/weightedAverage.js +19 -11
  73. package/src/components/CheckBox/index.js +1 -1
  74. package/src/components/ExpressionEditor/BaseEditorInput.js +13 -32
  75. package/src/components/ExpressionEditor/index.js +9 -17
  76. package/src/components/FormLayout/index.js +1 -1
  77. package/src/components/StylePreview.js +2 -1
  78. package/src/metamodel/adaptable.metamodel.js +1 -1
  79. package/version.d.ts +1 -1
  80. package/version.js +1 -1
@@ -57,12 +57,9 @@ const getPercentBarRendererForColumn = (columnStyle, abColumn, api) => {
57
57
  textEl.className = 'ab-PercentBar__text';
58
58
  textEl.style.lineHeight = '1.2';
59
59
  if (percentBarStyle.CellText.includes('CellValue')) {
60
- let preparedValue = value;
61
- const formatColumn = api.formatColumnApi.getFormatColumnWithDisplayFormatForColumn(abColumn);
62
- if (formatColumn &&
63
- !formatColumn.IsSuspended &&
64
- formatColumn.DisplayFormat &&
65
- api.scopeApi.isColumnInNumericScope(abColumn, formatColumn.Scope)) {
60
+ const activeFormatColumnsWithDisplayFormat = api.formatColumnApi.getFormatColumnsWithDisplayFormatForColumn(abColumn);
61
+ const [formatColumn] = api.formatColumnApi.getFormatColumnsRelevantForColumn(activeFormatColumnsWithDisplayFormat, abColumn, { node: params.node, value });
62
+ if (formatColumn && api.scopeApi.isColumnInNumericScope(abColumn, formatColumn.Scope)) {
66
63
  const options = formatColumn.DisplayFormat.Options;
67
64
  value = api.formatColumnApi.getNumberFormattedValue(params.value, params.node, abColumn, options);
68
65
  }
@@ -79,22 +79,30 @@ const cellSummaryWeightedAverage = ({ numericColumns, selectedCellInfo, adaptabl
79
79
  sumPrimaryValues += weightedGridCell.rawValue * gridCell.normalisedValue;
80
80
  }
81
81
  });
82
- if (isValid) {
83
- const formatColumn = adaptableApi.formatColumnApi.getFormatColumnForColumnId(columnId);
84
- if (formatColumn && formatColumn.DisplayFormat) {
85
- const options = formatColumn.DisplayFormat
86
- .Options;
87
- if (options) {
88
- return FormatHelper_1.default.NumberFormatter(sumPrimaryValues / sumWeightedValue, options);
89
- }
82
+ if (!isValid) {
83
+ return '';
84
+ }
85
+ const abColumn = adaptableApi.columnApi.getColumnFromId(columnId);
86
+ if (!abColumn) {
87
+ return '';
88
+ }
89
+ const activeFormatColumnsWithDisplayFormat = adaptableApi.formatColumnApi.getFormatColumnsWithDisplayFormatForColumn(abColumn);
90
+ if (activeFormatColumnsWithDisplayFormat.length === 1 &&
91
+ activeFormatColumnsWithDisplayFormat[0].DisplayFormat.Formatter === 'NumberFormatter') {
92
+ // there only one FormatColumn on this column, so we will use it to format the aggregated value
93
+ const [singleActiveFormatColumnsWithDisplayFormat] = activeFormatColumnsWithDisplayFormat;
94
+ const options = singleActiveFormatColumnsWithDisplayFormat
95
+ .DisplayFormat.Options;
96
+ if (options) {
97
+ return FormatHelper_1.default.NumberFormatter(sumPrimaryValues / sumWeightedValue, options);
90
98
  }
99
+ }
100
+ else {
101
+ // there are multiple (possibly conflicting) FormatColumns for this column, we cannot know which to use
91
102
  return FormatHelper_1.default.NumberFormatter(sumPrimaryValues / sumWeightedValue, {
92
103
  FractionDigits: 2,
93
104
  });
94
105
  }
95
- else {
96
- return '';
97
- }
98
106
  }
99
107
  };
100
108
  exports.cellSummaryWeightedAverage = cellSummaryWeightedAverage;
@@ -46,7 +46,7 @@ const CheckBox = (_a) => {
46
46
  opacity: 0,
47
47
  cursor: 'pointer',
48
48
  }, onChange: onInputChange }));
49
- return (React.createElement(rebass_1.Box, Object.assign({ my: 2 }, props, { className: (0, join_1.default)('ab-CheckBox', `ab-CheckBox--${type}`, `ab-CheckBox--variant-${variant}`, disabled ? 'ab-CheckBox--disabled' : '', readOnly ? 'ab-CheckBox--readonly' : '', props.className), style: Object.assign({ display: 'inline-flex', flexFlow: 'row', alignItems: 'center', cursor: 'pointer', position: 'relative' }, props.style), as: as }),
49
+ return (React.createElement(rebass_1.Box, Object.assign({ my: 2 }, props, { className: (0, join_1.default)('ab-CheckBox', `ab-CheckBox--${type}`, `ab-CheckBox--variant-${variant}`, disabled ? 'ab-CheckBox--disabled' : '', readOnly ? 'ab-CheckBox--readonly' : '', props.className), style: props.style, as: as }),
50
50
  before,
51
51
  beforeGap,
52
52
  input,
@@ -19,6 +19,7 @@ const DocumentationLinkConstants_1 = require("../../Utilities/Constants/Document
19
19
  const LoggingHelper_1 = require("../../Utilities/Helpers/LoggingHelper");
20
20
  const icons_1 = require("../icons");
21
21
  const AdaptableContext_1 = require("../../View/AdaptableContext");
22
+ const join_1 = tslib_1.__importDefault(require("../utils/join"));
22
23
  const VarEditorButton = () => {
23
24
  var _a, _b;
24
25
  const adaptable = (0, AdaptableContext_1.useAdaptable)();
@@ -39,6 +40,7 @@ function BaseEditorInput(props) {
39
40
  let evaluationError;
40
41
  let expressionError;
41
42
  let selectedFunctionName;
43
+ const baseClassName = 'ab-ExpressionEditorInput';
42
44
  const buildParserExceptionMessage = (e) => {
43
45
  const parserExceptionSummary = 'Invalid expression is not parsable';
44
46
  if (!e.message) {
@@ -101,55 +103,34 @@ function BaseEditorInput(props) {
101
103
  props.onSelectedFunctionChange(selectedFunctionName ? expressionFunctions[selectedFunctionName] : null);
102
104
  }
103
105
  }, [selectedFunctionName]);
104
- const functionsDropdown = (React.createElement(OverlayTrigger_1.default, { render: () => (React.createElement(rebass_1.Flex, { "data-name": "expression-dropdown-list", flexDirection: "column", p: 2, style: {
105
- fontSize: 'var(--ab-font-size-2)',
106
- border: '1px solid var(--ab-color-primarydark)',
107
- borderRadius: 'var(--ab__border-radius)',
108
- background: 'var(--ab-color-primarylight)',
109
- zIndex: 1000,
110
- maxHeight: 300,
111
- overflow: 'auto',
112
- } }, Object.keys(expressionFunctions)
106
+ const functionsDropdown = (React.createElement(OverlayTrigger_1.default, { render: () => (React.createElement(rebass_1.Flex, { className: `${baseClassName}__dropdown-functions-list`, "data-name": "expression-dropdown-fuctions-list", flexDirection: "column", p: 2 }, Object.keys(expressionFunctions)
113
107
  .filter((functionName) => !expressionFunctions[functionName].isHiddenFromMenu)
114
108
  .map((functionName) => functionName === 'VAR' ? (React.createElement(VarEditorButton, { key: functionName })) : (React.createElement(EditorButton_1.default, { data: `${functionName}()`, key: functionName, mr: 1 }, functionName))))), showEvent: "focus", hideEvent: "blur" },
115
109
  React.createElement(SimpleButton_1.default, { "data-name": "expression-dropdown", icon: "arrow-down", iconPosition: 'end', mr: 1 },
116
- React.createElement(rebass_1.Flex, { marginRight: 1, style: { fontSize: 'var(--ab-font-size-2)' } },
117
- React.createElement(icons_1.Icon, { name: 'equation', style: { marginTop: 0 } })))));
110
+ React.createElement(rebass_1.Flex, { marginRight: 1, fontSize: 2 },
111
+ React.createElement(icons_1.Icon, { name: "equation" })))));
118
112
  const operatorButtons = props.editorButtons
119
113
  .filter((editorButtonDef) => !!expressionFunctions[editorButtonDef.functionName])
120
114
  .map((editorButtonDef) => (React.createElement(EditorButton_1.default, { key: `${editorButtonDef.functionName}-operator`, data: editorButtonDef.data, icon: editorButtonDef.icon }, !editorButtonDef.icon && (editorButtonDef.text || editorButtonDef.functionName))));
121
115
  const showDocumentationLink = props.api.internalApi.isDocumentationLinksDisplayed();
122
116
  return (React.createElement(React.Fragment, null,
123
- React.createElement(rebass_1.Flex, { "data-name": "expression-toolbar", py: 2, mb: 2, flexWrap: "wrap", style: {
124
- background: 'var(--ab-color-primarylight)',
125
- borderRadius: 'var(--ab__border-radius)',
126
- '--ab-overlay-horizontal-align': 'left',
127
- width: '100%',
128
- marginTop: 5,
129
- } },
117
+ React.createElement(rebass_1.Flex, { className: baseClassName, "data-name": "expression-toolbar", py: 2, mb: 2, mt: 2, flexWrap: "wrap" },
130
118
  React.createElement(rebass_1.Flex, { style: { flex: 1, marginLeft: 5 }, flexWrap: "wrap" },
131
119
  functionsDropdown,
132
120
  operatorButtons),
133
121
  showDocumentationLink && (React.createElement(rebass_1.Flex, { alignItems: "flex-start" },
134
- React.createElement(ButtonInfo_1.ButtonInfo, { style: {
135
- color: 'var(--ab-color-text-on-add)',
136
- fill: 'var(--ab-color-text-on-add)',
137
- background: 'var(--ab-color-action-add)',
138
- marginRight: 5,
139
- }, tooltip: 'Learn how to use the Expression Editor', onClick: () => window.open(DocumentationLinkConstants_1.ExpressionEditorDocsLink, '_blank') })))),
140
- React.createElement(Textarea_1.default, { "data-name": `expression-input-${type}`, ref: textAreaRefCallback, value: props.value || '', placeholder: props.placeholder || 'Create Query', disabled: props.disabled || false, className: "ab-ExpressionEditor__textarea", autoFocus: true, spellCheck: "false", onChange: (event) => {
122
+ React.createElement(ButtonInfo_1.ButtonInfo, { mr: 2, tooltip: 'Learn how to use the Expression Editor', onClick: () => window.open(DocumentationLinkConstants_1.ExpressionEditorDocsLink, '_blank') })))),
123
+ React.createElement(Textarea_1.default, { "data-name": `expression-input-${type}`, ref: textAreaRefCallback, value: props.value || '', placeholder: props.placeholder || 'Create Query', disabled: props.disabled || false, className: (0, join_1.default)('ab-ExpressionEditor__textarea', // left for backwards compatibility
124
+ `${baseClassName}__textarea`), autoFocus: true, spellCheck: "false", onChange: (event) => {
141
125
  props.onChange(event.target.value);
142
- }, style: Object.assign({ width: '100%', minHeight: 100, fontFamily: 'monospace', resize: 'vertical', fontSize: '1rem', padding: 'var(--ab-space-2)' }, style) }),
143
- props.isFullExpression !== true && (React.createElement(HelpBlock_1.default, { mt: 2, mb: 2, p: 2, style: { fontSize: 'var(--ab-font-size-3)' } },
126
+ }, style: style }),
127
+ props.isFullExpression !== true && (React.createElement(HelpBlock_1.default, { mt: 2, mb: 2, p: 2, fontSize: 3 },
144
128
  "This Query must resolve to a ",
145
129
  React.createElement("b", null, "boolean "),
146
130
  "(i.e. true / false) value")),
147
- expressionError && (React.createElement(ErrorBox_1.default, { style: { whiteSpace: 'pre-wrap' }, mt: 2 }, expressionError)),
131
+ expressionError && (React.createElement(ErrorBox_1.default, { width: "100%", style: { whiteSpace: 'pre-wrap' }, mt: 2 }, expressionError)),
148
132
  evaluationError && (React.createElement(ErrorBox_1.default, { style: { whiteSpace: 'pre-wrap' }, mt: 2 }, `${evaluationError.expressionFnName} ${evaluationError.message}`)),
149
- !props.hideResultPreview && result !== undefined && (React.createElement(rebass_1.Box, { "data-name": "expression-editor-feedback", mt: 2, p: 2, style: {
150
- background: 'var(--ab-color-primarylight)',
151
- borderRadius: 'var(--ab__border-radius)',
152
- } },
133
+ !props.hideResultPreview && result !== undefined && (React.createElement(rebass_1.Box, { className: `${baseClassName}__editor-feedback`, "data-name": "expression-editor-feedback", mt: 2, p: 2 },
153
134
  React.createElement("pre", { style: { whiteSpace: 'pre-wrap', margin: 0 } },
154
135
  "Result (using Test Data): ",
155
136
  React.createElement("b", null, JSON.stringify(result)))))));
@@ -31,6 +31,7 @@ function ExpressionEditor(props) {
31
31
  const [data, setData] = (0, react_1.useState)(props.initialData);
32
32
  const [showColumnIds, setShowColumnIds] = (0, react_1.useState)(false);
33
33
  const [showNamedQueries, setShowNamedQueries] = (0, react_1.useState)(false);
34
+ const baseClassName = `ab-ExpressionEditor`;
34
35
  const [selectedFunction, setSelectedFunction] = (0, react_1.useState)(null);
35
36
  const [expressionText, setExpressionText] = (0, react_1.useState)('');
36
37
  const { namedQuery, setNamedQuery } = (0, NamedQueryContext_1.useNamedQueryContext)();
@@ -102,7 +103,7 @@ function ExpressionEditor(props) {
102
103
  };
103
104
  const [searchInputValue, setSearchInputValue] = React.useState('');
104
105
  const dataTableEditor = (React.createElement(React.Fragment, null,
105
- React.createElement(rebass_1.Flex, { flexDirection: "column", alignItems: "start", style: { marginTop: 2 } },
106
+ React.createElement(rebass_1.Flex, { className: `${baseClassName}__columns-list`, flexDirection: "column", alignItems: "start", style: { marginTop: 2 } },
106
107
  React.createElement(CheckBox_1.CheckBox, { checked: showColumnIds, onChange: (checked) => setShowColumnIds(checked), style: {
107
108
  float: 'right',
108
109
  margin: 0,
@@ -157,28 +158,24 @@ function ExpressionEditor(props) {
157
158
  setSelectedFunction,
158
159
  textAreaRef,
159
160
  } },
160
- React.createElement("div", { "data-name": "expression-editor", style: Object.assign({ flex: 1, overflow: 'auto', display: 'flex', paddingLeft: 'var(--ab-space-2)' }, props.style) },
161
+ React.createElement(rebass_1.Flex, { className: baseClassName, flex: 1, "data-name": "expression-editor-wrapper", pl: 2, style: props.style },
161
162
  React.createElement(rebass_1.Flex, { flex: 1, style: { minHeight: 0 }, flexDirection: "column", onFocus: (event) => {
162
163
  if (event.target.tagName === 'TEXTAREA') {
163
164
  textAreaRef.current = event.target;
164
165
  }
165
166
  } },
166
- React.createElement(rebass_1.Flex, { flex: 1, flexDirection: "row", "data-name": "expression-editor", style: { fontSize: 'var(--ab-font-size-2)', minHeight: 0, flex: 1 } },
167
+ React.createElement(rebass_1.Flex, { flex: 1, flexDirection: "row", "data-name": "expression-editor", fontSize: 2, style: { minHeight: 0 } },
167
168
  React.createElement(rebass_1.Flex, { flex: 1, paddingRight: 2, style: { overflow: 'auto' }, "data-name": "expression-builder", flexDirection: "column" },
168
169
  editorInput,
169
170
  StringExtensions_1.default.IsNotNullOrEmpty(expressionText === null || expressionText === void 0 ? void 0 : expressionText.trim()) && (React.createElement(ExpressionFunctionDocumentation_1.ExpressionFunctionDocumentation, { expressionFunction: selectedFunction })),
170
171
  /* displayed for advanced queries (observable&Aggregation) to give the users a starting point */
171
172
  StringExtensions_1.default.IsNullOrEmpty(expressionText === null || expressionText === void 0 ? void 0 : expressionText.trim()) && renderQueryHints(type),
172
- showDocumentationLinks && (React.createElement(HelpBlock_1.default, { "data-name": "query-documentation", mt: 2, mb: 2, style: { fontSize: 'var(--ab-font-size-3)' } },
173
- React.createElement(ButtonInfo_1.ButtonInfo, { mr: 2, style: {
174
- color: 'var(--ab-color-text-on-add)',
175
- fill: 'var(--ab-color-text-on-add)',
176
- background: 'var(--ab-color-action-add)',
177
- }, onClick: () => window.open(queryDocumentationLink, '_blank') }),
173
+ showDocumentationLinks && (React.createElement(HelpBlock_1.default, { "data-name": "query-documentation", mt: 2, mb: 2, fontSize: 3 },
174
+ React.createElement(ButtonInfo_1.ButtonInfo, { mr: 2, onClick: () => window.open(queryDocumentationLink, '_blank') }),
178
175
  "See ",
179
176
  StringExtensions_1.default.CapitaliseFirstLetter(type),
180
177
  " Query documentation for more details and examples")),
181
- React.createElement("div", { style: { flex: 1 } }),
178
+ React.createElement(rebass_1.Box, { flex: 1 }),
182
179
  allowSaveNamedQuery &&
183
180
  props.api.internalApi
184
181
  .getModuleService()
@@ -202,13 +199,8 @@ function ExpressionEditor(props) {
202
199
  BooleanExpression: expressionText,
203
200
  });
204
201
  } })) : null))),
205
- React.createElement(rebass_1.Box, { "data-name": "expression-column-picker", pb: 2, paddingLeft: 2, style: {
206
- overflow: 'auto',
207
- minWidth: 220,
208
- height: '100%',
209
- paddingRight: 'var(--ab-space-2)',
210
- } },
211
- ArrayExtensions_1.default.IsNotNullOrEmpty(props.namedQueries) && (React.createElement(rebass_1.Flex, { flexDirection: "row", alignItems: "start", style: { padding: 3, marginTop: 5 }, backgroundColor: "primarylight" },
202
+ React.createElement(rebass_1.Box, { className: `${baseClassName}__column-picker`, "data-name": "expression-column-picker", pb: 2, paddingLeft: 2, pr: 2 },
203
+ ArrayExtensions_1.default.IsNotNullOrEmpty(props.namedQueries) && (React.createElement(rebass_1.Flex, { flexDirection: "row", alignItems: "start", p: 1, mt: 2, backgroundColor: "primarylight" },
212
204
  React.createElement(Radio_1.default, { checked: !showNamedQueries, onChange: (checked) => setShowNamedQueries(!checked), style: { marginRight: 10 } }, "Columns"),
213
205
  React.createElement(Radio_1.default, { checked: showNamedQueries, onChange: (checked) => setShowNamedQueries(checked), style: { marginLeft: 10, whiteSpace: 'nowrap' } }, "Named Queries"))),
214
206
  showNamedQueries ? React.createElement("div", null, namedQueries) : React.createElement("div", null, dataTableEditor)))))));
@@ -73,7 +73,7 @@ const FormRow = (props) => {
73
73
  }
74
74
  if (props.as != null || column.component != null) {
75
75
  const Cmp = column.component;
76
- value = (React.createElement(Cmp, { style: Object.assign(Object.assign({}, column.style), { gridColumn: columnIndex + 1, gridRow: rowIndex + 1 }), className: column.className }, value));
76
+ value = (React.createElement(Cmp, { "data-name": props.dataName, style: Object.assign(Object.assign({}, column.style), { gridColumn: columnIndex + 1, gridRow: rowIndex + 1 }), className: column.className }, value));
77
77
  }
78
78
  return typeof value === 'string' ? value : React.cloneElement(value, { key: columnName });
79
79
  });
@@ -5,8 +5,9 @@ const tslib_1 = require("tslib");
5
5
  const React = tslib_1.__importStar(require("react"));
6
6
  const rebass_1 = require("rebass");
7
7
  const StyleHelper_1 = require("../Utilities/Helpers/StyleHelper");
8
+ const join_1 = tslib_1.__importDefault(require("./utils/join"));
8
9
  const StylePreview = (props) => {
9
10
  var _a, _b, _c;
10
- return (React.createElement(rebass_1.Box, Object.assign({}, props, { padding: (_a = props.padding) !== null && _a !== void 0 ? _a : 2, mt: (_b = props.mt) !== null && _b !== void 0 ? _b : 2, style: Object.assign(Object.assign({}, (0, StyleHelper_1.toStyle)(props.styleObject)), props.style) }), (_c = props.children) !== null && _c !== void 0 ? _c : 'Preview result'));
11
+ return (React.createElement(rebass_1.Box, Object.assign({}, props, { className: (0, join_1.default)('ab-StylePreview', props.className), padding: (_a = props.padding) !== null && _a !== void 0 ? _a : 2, mt: (_b = props.mt) !== null && _b !== void 0 ? _b : 2, style: Object.assign(Object.assign({}, (0, StyleHelper_1.toStyle)(props.styleObject)), props.style) }), (_c = props.children) !== null && _c !== void 0 ? _c : 'Preview result'));
11
12
  };
12
13
  exports.StylePreview = StylePreview;