@adaptabletools/adaptable 11.2.4 → 11.3.0

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 (67) hide show
  1. package/bundle.cjs.js +98 -98
  2. package/package.json +1 -1
  3. package/publishTimestamp.d.ts +1 -1
  4. package/publishTimestamp.js +1 -1
  5. package/src/AdaptableInterfaces/IAdaptable.d.ts +2 -0
  6. package/src/AdaptableOptions/EditOptions.d.ts +92 -4
  7. package/src/AdaptableOptions/FormatColumnOptions.d.ts +2 -1
  8. package/src/AdaptableOptions/UserInterfaceOptions.d.ts +17 -3
  9. package/src/Api/EventApi.d.ts +4 -1
  10. package/src/Api/Events/RowFormSubmitted.d.ts +19 -0
  11. package/src/{AdaptableOptions/SmartEdit.js → Api/Events/RowFormSubmitted.js} +0 -0
  12. package/src/Api/FormatColumnApi.d.ts +6 -0
  13. package/src/Api/GridApi.d.ts +14 -0
  14. package/src/Api/Implementation/FormatColumnApiImpl.d.ts +1 -0
  15. package/src/Api/Implementation/FormatColumnApiImpl.js +6 -1
  16. package/src/Api/Implementation/GridApiImpl.d.ts +3 -0
  17. package/src/Api/Implementation/GridApiImpl.js +40 -0
  18. package/src/Api/Implementation/InternalApiImpl.d.ts +4 -0
  19. package/src/Api/Implementation/InternalApiImpl.js +37 -7
  20. package/src/Api/Implementation/SmartEditApiImpl.d.ts +2 -1
  21. package/src/Api/Implementation/SmartEditApiImpl.js +3 -0
  22. package/src/Api/Implementation/UserInterfaceApiImpl.js +3 -21
  23. package/src/Api/InternalApi.d.ts +4 -1
  24. package/src/Api/SmartEditApi.d.ts +6 -1
  25. package/src/PredefinedConfig/CalculatedColumnState.d.ts +5 -0
  26. package/src/PredefinedConfig/Common/AdaptableForm.d.ts +3 -2
  27. package/src/PredefinedConfig/Common/AdaptableFormat.d.ts +1 -3
  28. package/src/PredefinedConfig/Common/AdaptableObject.d.ts +2 -11
  29. package/src/PredefinedConfig/Common/BaseContext.d.ts +1 -1
  30. package/src/PredefinedConfig/SystemState.d.ts +1 -2
  31. package/src/Redux/ActionsReducers/SystemRedux.d.ts +1 -1
  32. package/src/Strategy/SmartEditModule.d.ts +1 -1
  33. package/src/Strategy/SmartEditModule.js +5 -6
  34. package/src/Utilities/Defaults/DefaultAdaptableOptions.js +9 -0
  35. package/src/Utilities/Helpers/AdaptableHelper.js +1 -0
  36. package/src/Utilities/Services/Interface/IRowEditService.d.ts +8 -0
  37. package/src/Utilities/Services/Interface/IRowEditService.js +2 -0
  38. package/src/Utilities/Services/RowEditService.d.ts +25 -0
  39. package/src/Utilities/Services/RowEditService.js +165 -0
  40. package/src/View/CalculatedColumn/Wizard/CalculatedColumnSettingsWizardSection.js +9 -2
  41. package/src/View/Components/AdaptableObjectList/AdaptableObjectCompactList.js +1 -1
  42. package/src/View/Components/Popups/AdaptablePopup/AdaptablePopupDialog.js +2 -0
  43. package/src/View/Components/Popups/FormPopups/FormPopups.js +2 -2
  44. package/src/View/FormatColumn/Wizard/FormatColumnFormatWizardSection.js +4 -6
  45. package/src/View/Layout/Wizard/LayoutEditorWizard.d.ts +1 -1
  46. package/src/View/SmartEdit/SmartEditPopup.d.ts +1 -1
  47. package/src/View/SmartEdit/SmartEditPopup.js +1 -2
  48. package/src/View/SmartEdit/SmartEditViewPanel.d.ts +1 -1
  49. package/src/View/SmartEdit/SmartEditViewPanel.js +1 -2
  50. package/src/agGrid/ActionColumnRenderer.d.ts +6 -1
  51. package/src/agGrid/ActionColumnRenderer.js +6 -4
  52. package/src/agGrid/Adaptable.d.ts +3 -0
  53. package/src/agGrid/Adaptable.js +121 -18
  54. package/src/agGrid/rowEditIcons.d.ts +4 -0
  55. package/src/agGrid/rowEditIcons.js +9 -0
  56. package/src/components/AdaptableFormComponent/AdaptableFormComponent.js +6 -16
  57. package/src/components/Datepicker/index.js +19 -18
  58. package/src/components/WindowModal/WindowModal.d.ts +2 -0
  59. package/src/components/WindowModal/WindowModal.js +1 -1
  60. package/src/metamodel/adaptable.metamodel.d.ts +72 -0
  61. package/src/metamodel/adaptable.metamodel.js +146 -5
  62. package/src/types.d.ts +4 -3
  63. package/version.d.ts +1 -1
  64. package/version.js +1 -1
  65. package/src/AdaptableOptions/SmartEdit.d.ts +0 -34
  66. package/src/View/Components/Forms/AdaptableForm.d.ts +0 -6
  67. package/src/View/Components/Forms/AdaptableForm.js +0 -21
@@ -61,6 +61,8 @@ const DateHelper_1 = require("../Utilities/Helpers/DateHelper");
61
61
  const StatusBarState_1 = require("../PredefinedConfig/StatusBarState");
62
62
  const createAgStatusPanelComponent_1 = require("./createAgStatusPanelComponent");
63
63
  const AdaptableStatusBar_1 = require("../View/StatusBar/AdaptableStatusBar");
64
+ const RowEditService_1 = require("../Utilities/Services/RowEditService");
65
+ const rowEditIcons_1 = require("./rowEditIcons");
64
66
  const tinycolor = require('tinycolor2');
65
67
  all_modules_1.ModuleRegistry.registerModules(all_modules_1.AllCommunityModules);
66
68
  const GROUP_PATH_SEPARATOR = '/';
@@ -391,6 +393,7 @@ class Adaptable {
391
393
  this.QueryLanguageService = new QueryLanguageService_1.QueryLanguageService(this.api);
392
394
  this.AlertService = new AlertService_1.AlertService(this.api);
393
395
  this.TeamSharingService = new TeamSharingService_1.TeamSharingService(this.api);
396
+ this.RowEditService = new RowEditService_1.RowEditService(this.api);
394
397
  this.MetamodelService = new MetamodelService_1.MetamodelService(this.api);
395
398
  this.forPlugins((plugin) => plugin.afterInitServices(this));
396
399
  // Set up Modules - we set up all the Modules suitable for AG Grid
@@ -1205,6 +1208,12 @@ class Adaptable {
1205
1208
  layout = this.api.layoutApi.getCurrentLayout();
1206
1209
  }
1207
1210
  layout.Columns = layout.Columns || [];
1211
+ const rowEditActionColumn = this.getColDefsForRowEditColumns()[0];
1212
+ if (rowEditActionColumn) {
1213
+ layout.Columns.push(rowEditActionColumn.colId);
1214
+ layout.PinnedColumnsMap = layout.PinnedColumnsMap || {};
1215
+ layout.PinnedColumnsMap[rowEditActionColumn.colId] = rowEditActionColumn.pinned;
1216
+ }
1208
1217
  const layoutColumnsMap = layout.Columns.reduce((acc, colId) => {
1209
1218
  acc[colId] = true;
1210
1219
  return acc;
@@ -1244,7 +1253,7 @@ class Adaptable {
1244
1253
  let newColState = this.getSortedColumnStateForVisibleColumns(columnsToShow, columnsState);
1245
1254
  newColState = newColState
1246
1255
  .map((colState) => {
1247
- var _a, _b, _c, _d;
1256
+ var _a, _b, _c, _d, _e;
1248
1257
  const { colId } = colState;
1249
1258
  const oldColState = columnsStateMap[colId];
1250
1259
  const hide = this.api.columnApi.isAutoPivotColumn(colId)
@@ -1283,10 +1292,16 @@ class Adaptable {
1283
1292
  newColState.aggFunc =
1284
1293
  aggregationFunctionsColumnsMap[colId] === true
1285
1294
  ? // if we have true, it means - take the default aggFunc from colDef
1286
- (_d = (_c =
1295
+ (_e = (_d = (_c =
1287
1296
  // NOTE: colState gives us the current aggFunc, which can be null,
1288
1297
  // while the colDef gives us the initially configured aggFunc for that column
1289
- colState.aggFunc) !== null && _c !== void 0 ? _c : colDef === null || colDef === void 0 ? void 0 : colDef.aggFunc) !== null && _d !== void 0 ? _d : 'sum' : aggregationFunctionsColumnsMap[colId];
1298
+ colState.aggFunc) !== null && _c !== void 0 ? _c : colDef === null || colDef === void 0 ? void 0 : colDef.aggFunc) !== null && _d !== void 0 ? _d :
1299
+ // @ts-ignore available only wth ag-Grid v27.3.x
1300
+ colDef === null ||
1301
+ // @ts-ignore available only wth ag-Grid v27.3.x
1302
+ colDef === void 0 ? void 0 :
1303
+ // @ts-ignore available only wth ag-Grid v27.3.x
1304
+ colDef.defaultAggFunc) !== null && _e !== void 0 ? _e : 'sum' : aggregationFunctionsColumnsMap[colId];
1290
1305
  }
1291
1306
  if (sortModelMap[colId]) {
1292
1307
  newColState.sort = sortModelMap[colId].sort;
@@ -2067,6 +2082,7 @@ class Adaptable {
2067
2082
  ...this.getColDefsForCalculatedColumns(),
2068
2083
  ...this.getColDefsForActionColumns(),
2069
2084
  ...this.getColDefsForFreeTextColumns(),
2085
+ ...this.getColDefsForRowEditColumns(),
2070
2086
  ];
2071
2087
  }
2072
2088
  getColDefsForFreeTextColumns() {
@@ -2134,6 +2150,87 @@ class Adaptable {
2134
2150
  });
2135
2151
  }
2136
2152
  }
2153
+ getColDefsForRowEditColumns() {
2154
+ var _a;
2155
+ if (!((_a = this.adaptableOptions.userInterfaceOptions.rowActionButtons) === null || _a === void 0 ? void 0 : _a.length)) {
2156
+ return [];
2157
+ }
2158
+ const editButtons = this.adaptableOptions.userInterfaceOptions.rowActionButtons
2159
+ .map((buttonName) => {
2160
+ if (buttonName === 'edit') {
2161
+ // we need this dirty hack until ActionColumn support for custom icons is improved
2162
+ const label = rowEditIcons_1.rowEditIcon;
2163
+ return {
2164
+ label,
2165
+ tooltip: 'Edit',
2166
+ onClick: (button, context) => {
2167
+ this.api.gridApi.openEditRowForm(context.primaryKeyValue);
2168
+ },
2169
+ };
2170
+ }
2171
+ if (buttonName === 'clone') {
2172
+ // we need this dirty hack until ActionColumn support for custom icons is improved
2173
+ const label = rowEditIcons_1.rowCloneIcon;
2174
+ return {
2175
+ label,
2176
+ tooltip: 'Clone',
2177
+ onClick: (button, context) => {
2178
+ this.api.gridApi.openCloneRowForm(context.primaryKeyValue);
2179
+ },
2180
+ };
2181
+ }
2182
+ if (buttonName === 'delete') {
2183
+ // we need this dirty hack until ActionColumn support for custom icons is improved
2184
+ const label = rowEditIcons_1.rowDeleteIcon;
2185
+ return {
2186
+ label,
2187
+ tooltip: 'Delete',
2188
+ onClick: (button, context) => {
2189
+ var _a, _b;
2190
+ const eventInfo = {
2191
+ type: 'rowDeleted',
2192
+ rowNode: context.rowNode,
2193
+ adaptableApi: context.adaptableApi,
2194
+ };
2195
+ this.api.eventApi.emit('RowFormSubmitted', eventInfo);
2196
+ (_b = (_a = this.adaptableOptions.editOptions.rowFormOptions).onFormSubmit) === null || _b === void 0 ? void 0 : _b.call(_a, eventInfo);
2197
+ },
2198
+ };
2199
+ }
2200
+ })
2201
+ .filter(Boolean);
2202
+ if (!editButtons.length) {
2203
+ return [];
2204
+ }
2205
+ const rowEditActionColumn = {
2206
+ columnId: 'adaptableRowEditButtons',
2207
+ actionColumnButton: editButtons,
2208
+ };
2209
+ return [
2210
+ {
2211
+ headerName: '',
2212
+ colId: 'adaptableRowEditButtons',
2213
+ hide: false,
2214
+ editable: false,
2215
+ width: editButtons.length * 42,
2216
+ resizable: false,
2217
+ suppressMenu: true,
2218
+ suppressMovable: true,
2219
+ filter: false,
2220
+ sortable: false,
2221
+ enableRowGroup: false,
2222
+ pinned: this.adaptableOptions.userInterfaceOptions.rowActionButtonsPosition === 'pinnedRight'
2223
+ ? 'right'
2224
+ : 'left',
2225
+ cellRenderer: ActionColumnRenderer_1.ActionColumnRenderer,
2226
+ cellRendererParams: {
2227
+ actionColumn: rowEditActionColumn,
2228
+ },
2229
+ cellClass: 'adaptableRowEditButtons',
2230
+ type: [GeneralConstants_1.AB_SPECIAL_COLUMN, 'abColDefObject'],
2231
+ },
2232
+ ];
2233
+ }
2137
2234
  getColDefsForActionColumns() {
2138
2235
  const defaultActionColumnSettings = {
2139
2236
  resizable: true,
@@ -2286,6 +2383,10 @@ class Adaptable {
2286
2383
  suppressMovable: calculatedColumnSettings.SuppressMovable,
2287
2384
  type: columnTypes,
2288
2385
  valueGetter: (params) => {
2386
+ var _a, _b;
2387
+ if ((_a = calculatedColumn.CalculatedColumnSettings) === null || _a === void 0 ? void 0 : _a.ExternallyEvaluatedExpression) {
2388
+ return (_b = params.data) === null || _b === void 0 ? void 0 : _b[calculatedColumn.ColumnId];
2389
+ }
2289
2390
  return this.CalculatedColumnExpressionService.evaluateCalculatedColumnQuery(calculatedColumn, params.node);
2290
2391
  },
2291
2392
  };
@@ -2347,7 +2448,7 @@ class Adaptable {
2347
2448
  return this.gridOptions.api.getDisplayedRowAtIndex(firstDisplayedRowIndex);
2348
2449
  }
2349
2450
  destroy(config) {
2350
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
2451
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0;
2351
2452
  if (this.gridOptions && this.gridOptions.api) {
2352
2453
  this.gridOptions.api.removeEventListener(all_modules_1.Events.EVENT_FIRST_DATA_RENDERED, this.listenerFirstDataRendered);
2353
2454
  this.gridOptions.api.removeEventListener(all_modules_1.Events.EVENT_COLUMN_PIVOT_MODE_CHANGED, this.listenerPivotModeChanged);
@@ -2407,27 +2508,29 @@ class Adaptable {
2407
2508
  this.adaptableStore = null;
2408
2509
  this.gridOptions = null;
2409
2510
  this.adaptableOptions = null;
2410
- (_b = this.CalculatedColumnExpressionService) === null || _b === void 0 ? void 0 : _b.destroy();
2511
+ (_c = (_b = this.CalculatedColumnExpressionService) === null || _b === void 0 ? void 0 : _b.destroy) === null || _c === void 0 ? void 0 : _c.call(_b);
2411
2512
  this.CalculatedColumnExpressionService = null;
2412
- (_c = this.DataService) === null || _c === void 0 ? void 0 : _c.destroy();
2513
+ (_e = (_d = this.DataService) === null || _d === void 0 ? void 0 : _d.destroy) === null || _e === void 0 ? void 0 : _e.call(_d);
2413
2514
  this.DataService = null;
2414
- (_d = this.EntitlementService) === null || _d === void 0 ? void 0 : _d.destroy();
2515
+ (_g = (_f = this.EntitlementService) === null || _f === void 0 ? void 0 : _f.destroy) === null || _g === void 0 ? void 0 : _g.call(_f);
2415
2516
  this.EntitlementService = null;
2416
- (_e = this.ReportService) === null || _e === void 0 ? void 0 : _e.destroy();
2517
+ (_j = (_h = this.ReportService) === null || _h === void 0 ? void 0 : _h.destroy) === null || _j === void 0 ? void 0 : _j.call(_h);
2417
2518
  this.ReportService = null;
2418
- (_f = this.ModuleService) === null || _f === void 0 ? void 0 : _f.destroy();
2519
+ (_l = (_k = this.ModuleService) === null || _k === void 0 ? void 0 : _k.destroy) === null || _l === void 0 ? void 0 : _l.call(_k);
2419
2520
  this.ModuleService = null;
2420
- (_g = this.ValidationService) === null || _g === void 0 ? void 0 : _g.destroy();
2521
+ (_o = (_m = this.ValidationService) === null || _m === void 0 ? void 0 : _m.destroy) === null || _o === void 0 ? void 0 : _o.call(_m);
2421
2522
  this.ValidationService = null;
2422
- (_h = this.QueryLanguageService) === null || _h === void 0 ? void 0 : _h.destroy();
2523
+ (_q = (_p = this.QueryLanguageService) === null || _p === void 0 ? void 0 : _p.destroy) === null || _q === void 0 ? void 0 : _q.call(_p);
2423
2524
  this.QueryLanguageService = null;
2424
- (_j = this.AlertService) === null || _j === void 0 ? void 0 : _j.destroy();
2525
+ (_s = (_r = this.AlertService) === null || _r === void 0 ? void 0 : _r.destroy) === null || _s === void 0 ? void 0 : _s.call(_r);
2425
2526
  this.AlertService = null;
2426
- (_k = this.TeamSharingService) === null || _k === void 0 ? void 0 : _k.destroy();
2527
+ (_u = (_t = this.TeamSharingService) === null || _t === void 0 ? void 0 : _t.destroy) === null || _u === void 0 ? void 0 : _u.call(_t);
2427
2528
  this.TeamSharingService = null;
2428
- (_l = this.MetamodelService) === null || _l === void 0 ? void 0 : _l.destroy();
2529
+ (_w = (_v = this.RowEditService) === null || _v === void 0 ? void 0 : _v.destroy) === null || _w === void 0 ? void 0 : _w.call(_v);
2530
+ this.RowEditService = null;
2531
+ (_y = (_x = this.MetamodelService) === null || _x === void 0 ? void 0 : _x.destroy) === null || _y === void 0 ? void 0 : _y.call(_x);
2429
2532
  this.MetamodelService = null;
2430
- (_m = this.LicenseService) === null || _m === void 0 ? void 0 : _m.destroy();
2533
+ (_0 = (_z = this.LicenseService) === null || _z === void 0 ? void 0 : _z.destroy) === null || _0 === void 0 ? void 0 : _0.call(_z);
2431
2534
  this.LicenseService = null;
2432
2535
  this.isDestroyed = true;
2433
2536
  }
@@ -2943,7 +3046,7 @@ class Adaptable {
2943
3046
  fontSize: null,
2944
3047
  borderColor: null,
2945
3048
  };
2946
- const formatColumn = this.api.formatColumnApi.getFormatColumnForColumn(abColumn);
3049
+ const formatColumn = this.api.formatColumnApi.getActiveFormatColumnForColumn(abColumn);
2947
3050
  const conditionalStyles = this.api.conditionalStyleApi.getConditionalStylesForColumn(abColumn);
2948
3051
  const quickSearchStyle = this.getQuickSearchCellStyle();
2949
3052
  const hasQuickSearchStyle = quickSearchStyle != undefined;
@@ -3010,7 +3113,7 @@ class Adaptable {
3010
3113
  const hasRichSelectCellEditor = this.isModulePresent('rich-select');
3011
3114
  this.setColDefProperty(col, 'cellEditor', () => {
3012
3115
  var _a;
3013
- const formatColumn = this.api.formatColumnApi.getFormatColumnForColumn(adaptableColumn);
3116
+ const formatColumn = this.api.formatColumnApi.getActiveFormatColumnForColumn(adaptableColumn);
3014
3117
  if (formatColumn && !(formatColumn === null || formatColumn === void 0 ? void 0 : formatColumn.IsSuspended) && ((_a = formatColumn.ColumnStyle) === null || _a === void 0 ? void 0 : _a.CheckBoxStyle)) {
3015
3118
  return CheckboxRenderer_1.CheckboxEditor;
3016
3119
  }
@@ -3038,7 +3141,7 @@ class Adaptable {
3038
3141
  }
3039
3142
  setupColumnCellRenderer({ col, colId, abColumn }) {
3040
3143
  this.setColDefProperty(col, 'cellRenderer', () => {
3041
- const formatColumn = this.api.formatColumnApi.getFormatColumnForColumn(abColumn);
3144
+ const formatColumn = this.api.formatColumnApi.getActiveFormatColumnForColumn(abColumn);
3042
3145
  if (formatColumn && !(formatColumn === null || formatColumn === void 0 ? void 0 : formatColumn.IsSuspended) && formatColumn.ColumnStyle) {
3043
3146
  if (formatColumn.ColumnStyle.PercentBarStyle) {
3044
3147
  return this.agGridHelper.createPercentBarRendererComp(formatColumn);
@@ -0,0 +1,4 @@
1
+ /// <reference types="react" />
2
+ export declare const rowEditIcon: JSX.Element;
3
+ export declare const rowCloneIcon: JSX.Element;
4
+ export declare const rowDeleteIcon: JSX.Element;
@@ -0,0 +1,9 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.rowDeleteIcon = exports.rowCloneIcon = exports.rowEditIcon = void 0;
4
+ const tslib_1 = require("tslib");
5
+ const icons_1 = require("../components/icons");
6
+ const React = tslib_1.__importStar(require("react"));
7
+ exports.rowEditIcon = React.createElement(icons_1.Icon, { name: "edit" });
8
+ exports.rowCloneIcon = React.createElement(icons_1.Icon, { name: "clone" });
9
+ exports.rowDeleteIcon = React.createElement(icons_1.Icon, { name: "delete" });
@@ -63,17 +63,7 @@ function AdaptableFormComponent({ formDef, data, onChange, onButtonClick, displa
63
63
  label: item.label,
64
64
  onClick: () => setFieldValue(field.name, item.value),
65
65
  }));
66
- return (
67
- /*
68
- <Dropdown
69
- options={field.Options || []}
70
- value={value}
71
- onChange={(value) => {
72
- setFieldValue(field.Name, value);
73
- }}
74
- ></Dropdown>
75
- */
76
- React.createElement(DropdownButton_1.default, { style: {
66
+ return (React.createElement(DropdownButton_1.default, { style: {
77
67
  width: '100%',
78
68
  whiteSpace: 'nowrap',
79
69
  overflow: 'hidden',
@@ -85,7 +75,7 @@ function AdaptableFormComponent({ formDef, data, onChange, onButtonClick, displa
85
75
  setFieldValue(field.name, event.target.checked);
86
76
  } }));
87
77
  case 'textOutput':
88
- return React.createElement(rebass_1.Box, { style: { textAlign: 'center' } }, value);
78
+ return (React.createElement(rebass_1.Box, { paddingLeft: 2, style: { textAlign: 'left' } }, value));
89
79
  default:
90
80
  return React.createElement("div", null,
91
81
  "Unknown field type: ",
@@ -95,9 +85,9 @@ function AdaptableFormComponent({ formDef, data, onChange, onButtonClick, displa
95
85
  // by default we have 2 columns: label & input
96
86
  const columns = (_b = (_a = formDef.config) === null || _a === void 0 ? void 0 : _a.columns) !== null && _b !== void 0 ? _b : [1, 2];
97
87
  return (React.createElement(React.Fragment, null,
98
- displayTitle && formDef.title && (React.createElement(rebass_1.Box, { fontSize: 5, mb: 2, style: { fontWeight: 'bold' } }, formDef.title)),
99
- formDef.description && React.createElement(rebass_1.Box, { mb: 3 }, formDef.description),
100
- React.createElement(FormLayout_1.default, { columns: columns }, (_c = formDef.fields) === null || _c === void 0 ? void 0 : _c.map((field, index) => {
88
+ displayTitle && formDef.title && (React.createElement(rebass_1.Box, { "data-name": "form-title", fontSize: 5, mb: 2, style: { fontWeight: 'bold' } }, formDef.title)),
89
+ formDef.description && (React.createElement(rebass_1.Box, { "data-name": "form-description", mb: 3 }, formDef.description)),
90
+ React.createElement(FormLayout_1.default, { "data-name": "form-content", columns: columns, style: { overflow: 'auto' }, paddingRight: 1 }, (_c = formDef.fields) === null || _c === void 0 ? void 0 : _c.map((field, index) => {
101
91
  if (Array.isArray(field)) {
102
92
  const rowFields = {};
103
93
  field.map((fieldItem, index) => {
@@ -113,7 +103,7 @@ function AdaptableFormComponent({ formDef, data, onChange, onButtonClick, displa
113
103
  renderField(field)));
114
104
  }
115
105
  })),
116
- formDef.buttons ? (React.createElement(rebass_1.Flex, { marginTop: 3, flexDirection: "row", alignItems: "center", justifyContent: "center" },
106
+ formDef.buttons ? (React.createElement(rebass_1.Flex, { "data-name": "form-buttons", marginTop: 3, flexDirection: "row", alignItems: "center", justifyContent: "center" },
117
107
  React.createElement(AdaptableFormComponentButtons, { focusFirstButton: focusFirstButton, onClick: onButtonClick, disabledButtons: disabledButtons, defaultTone: "success", formDef: formDef, api: api, context: context }))) : null));
118
108
  }
119
109
  exports.AdaptableFormComponent = AdaptableFormComponent;
@@ -86,22 +86,23 @@ exports.Datepicker = React.forwardRef((props, ref) => {
86
86
  clearValue();
87
87
  }, accessLevel: 'Full' })) : null;
88
88
  const calendarButton = (React.createElement(SimpleButton_1.default, { disabled: disabled, variant: "text", icon: "calendar", tooltip: "Date", iconSize: 20, px: 0, py: 0, onClick: () => setVisible(true) }));
89
- return (React.createElement(OverlayTrigger_1.default, { visible: visible, alignHorizontal: 'left', render: () => (React.createElement(DatepickerOverlay, { onHide: () => setVisible(false), onKeyDown: (e) => {
90
- if (e.key === 'Escape' || e.key === 'Enter') {
91
- setVisible(false, e.key);
92
- }
93
- } },
94
- React.createElement(react_day_picker_1.DayPicker, Object.assign({ fixedWeeks: true }, dayPickerProps, { showWeekNumber: showWeekNumber, showOutsideDays: showOutsideDays, mode: "single", month: isNaN(+month) ? new Date() : month, onMonthChange: setMonth, components: { Caption: Caption_1.Caption, CaptionLabel: CaptionLabel_1.CaptionLabel }, onSelect: updateValue, footer: React.createElement(rebass_1.Flex, { justifyContent: "space-between", mt: 2, flexWrap: 'wrap' }, footerButtons) })))) },
95
- React.createElement(FieldWrap_1.default, Object.assign({}, boxProps, { style: {
96
- borderRadius: style === null || style === void 0 ? void 0 : style.borderRadius,
97
- width: style === null || style === void 0 ? void 0 : style.width,
98
- maxWidth: style === null || style === void 0 ? void 0 : style.maxWidth,
99
- }, onFocus: () => {
100
- if (!visible) {
101
- setVisible(true);
102
- }
103
- } }),
104
- React.createElement(Input_1.default, { value: inputValue, placehoder: placeholder !== null && placeholder !== void 0 ? placeholder : dateProps.format, style: style, disabled: disabled, readOnly: true, ref: ref }),
105
- !!inputValue ? clearButton : null,
106
- calendarButton)));
89
+ return (React.createElement(rebass_1.Flex, null,
90
+ React.createElement(OverlayTrigger_1.default, { visible: visible, alignHorizontal: 'left', render: () => (React.createElement(DatepickerOverlay, { onHide: () => setVisible(false), onKeyDown: (e) => {
91
+ if (e.key === 'Escape' || e.key === 'Enter') {
92
+ setVisible(false, e.key);
93
+ }
94
+ } },
95
+ React.createElement(react_day_picker_1.DayPicker, Object.assign({ fixedWeeks: true }, dayPickerProps, { showWeekNumber: showWeekNumber, showOutsideDays: showOutsideDays, mode: "single", month: isNaN(+month) ? new Date() : month, onMonthChange: setMonth, components: { Caption: Caption_1.Caption, CaptionLabel: CaptionLabel_1.CaptionLabel }, onSelect: updateValue, footer: React.createElement(rebass_1.Flex, { justifyContent: "space-between", mt: 2, flexWrap: 'wrap' }, footerButtons) })))) },
96
+ React.createElement(FieldWrap_1.default, Object.assign({}, boxProps, { style: {
97
+ borderRadius: style === null || style === void 0 ? void 0 : style.borderRadius,
98
+ width: style === null || style === void 0 ? void 0 : style.width,
99
+ maxWidth: style === null || style === void 0 ? void 0 : style.maxWidth,
100
+ }, onFocus: () => {
101
+ if (!visible) {
102
+ setVisible(true);
103
+ }
104
+ } }),
105
+ React.createElement(Input_1.default, { value: inputValue, placehoder: placeholder !== null && placeholder !== void 0 ? placeholder : dateProps.format, style: style, disabled: disabled, readOnly: true, ref: ref }),
106
+ !!inputValue ? clearButton : null,
107
+ calendarButton))));
107
108
  });
@@ -10,6 +10,8 @@ export declare type WindowModalPosition = {
10
10
  export interface WindowModalProps {
11
11
  handleSelector: string;
12
12
  size: WindowModalSize;
13
+ minWidth?: number;
14
+ minHeight?: number;
13
15
  position?: WindowModalPosition;
14
16
  onChange: (settings: {
15
17
  size: {
@@ -100,7 +100,7 @@ exports.WindowModal = (props) => {
100
100
  return react_dom_1.createPortal(React.createElement("div", { style: style,
101
101
  //@ts-ignore
102
102
  ref: targetRef, onMouseDown: stacking.bringInFront },
103
- React.createElement(re_resizable_1.Resizable, { onResizeStop: handleResizeStop, onResize: handleResize, bounds: "window", defaultSize: {
103
+ React.createElement(re_resizable_1.Resizable, { minWidth: props.minWidth, minHeight: props.minHeight, onResizeStop: handleResizeStop, onResize: handleResize, bounds: "window", defaultSize: {
104
104
  width: props.size.width,
105
105
  height: props.size.height,
106
106
  } }, props.children)), portalElement);
@@ -297,12 +297,21 @@ export declare const ADAPTABLE_METAMODEL: {
297
297
  description: string;
298
298
  uiLabel: string;
299
299
  isOptional: boolean;
300
+ reference?: undefined;
300
301
  } | {
301
302
  name: string;
302
303
  kind: string;
303
304
  description: string;
304
305
  uiLabel: string;
306
+ reference: string;
305
307
  isOptional?: undefined;
308
+ } | {
309
+ name: string;
310
+ kind: string;
311
+ description: string;
312
+ uiLabel: string;
313
+ isOptional?: undefined;
314
+ reference?: undefined;
306
315
  })[];
307
316
  };
308
317
  AdaptableIcon: {
@@ -1940,6 +1949,7 @@ export declare const ADAPTABLE_METAMODEL: {
1940
1949
  isOptional: boolean;
1941
1950
  gridInfo: string;
1942
1951
  defaultValue: string;
1952
+ reference?: undefined;
1943
1953
  } | {
1944
1954
  name: string;
1945
1955
  kind: string;
@@ -1948,6 +1958,16 @@ export declare const ADAPTABLE_METAMODEL: {
1948
1958
  isOptional: boolean;
1949
1959
  gridInfo?: undefined;
1950
1960
  defaultValue?: undefined;
1961
+ reference?: undefined;
1962
+ } | {
1963
+ name: string;
1964
+ kind: string;
1965
+ description: string;
1966
+ uiLabel: string;
1967
+ isOptional: boolean;
1968
+ reference: string;
1969
+ gridInfo?: undefined;
1970
+ defaultValue?: undefined;
1951
1971
  })[];
1952
1972
  };
1953
1973
  EntitlementOptions: {
@@ -3567,6 +3587,26 @@ export declare const ADAPTABLE_METAMODEL: {
3567
3587
  reference: string;
3568
3588
  })[];
3569
3589
  };
3590
+ RowFormOptions: {
3591
+ name: string;
3592
+ kind: string;
3593
+ description: string;
3594
+ properties: ({
3595
+ name: string;
3596
+ kind: string;
3597
+ description: string;
3598
+ uiLabel: string;
3599
+ isOptional: boolean;
3600
+ defaultValue?: undefined;
3601
+ } | {
3602
+ name: string;
3603
+ kind: string;
3604
+ description: string;
3605
+ uiLabel: string;
3606
+ isOptional: boolean;
3607
+ defaultValue: string;
3608
+ })[];
3609
+ };
3570
3610
  RowInfo: {
3571
3611
  name: string;
3572
3612
  kind: string;
@@ -3793,6 +3833,29 @@ export declare const ADAPTABLE_METAMODEL: {
3793
3833
  uiLabel: string;
3794
3834
  }[];
3795
3835
  };
3836
+ SmartEditCustomOperation: {
3837
+ name: string;
3838
+ kind: string;
3839
+ description: string;
3840
+ };
3841
+ SmartEditOperationContext: {
3842
+ name: string;
3843
+ kind: string;
3844
+ description: string;
3845
+ properties: ({
3846
+ name: string;
3847
+ kind: string;
3848
+ description: string;
3849
+ uiLabel: string;
3850
+ reference: string;
3851
+ } | {
3852
+ name: string;
3853
+ kind: string;
3854
+ description: string;
3855
+ uiLabel: string;
3856
+ reference?: undefined;
3857
+ })[];
3858
+ };
3796
3859
  SpecialColumnSettings: {
3797
3860
  name: string;
3798
3861
  kind: string;
@@ -4142,6 +4205,15 @@ export declare const ADAPTABLE_METAMODEL: {
4142
4205
  reference: string;
4143
4206
  defaultValue?: undefined;
4144
4207
  gridInfo?: undefined;
4208
+ } | {
4209
+ name: string;
4210
+ kind: string;
4211
+ description: string;
4212
+ uiLabel: string;
4213
+ isOptional: boolean;
4214
+ defaultValue: string;
4215
+ reference?: undefined;
4216
+ gridInfo?: undefined;
4145
4217
  } | {
4146
4218
  name: string;
4147
4219
  kind: string;