@adaptabletools/adaptable 11.1.2 → 11.1.5

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 (95) hide show
  1. package/bundle.cjs.js +120 -120
  2. package/package.json +3 -3
  3. package/publishTimestamp.d.ts +1 -1
  4. package/publishTimestamp.js +1 -1
  5. package/src/AdaptableInterfaces/IAdaptable.d.ts +1 -1
  6. package/src/AdaptableOptions/AdaptableOptions.d.ts +49 -49
  7. package/src/AdaptableOptions/ContainerOptions.d.ts +1 -1
  8. package/src/AdaptableOptions/DashboardOptions.d.ts +1 -1
  9. package/src/AdaptableOptions/EditOptions.d.ts +4 -0
  10. package/src/AdaptableOptions/NotificationsOptions.d.ts +2 -2
  11. package/src/AdaptableOptions/SmartEdit.d.ts +34 -0
  12. package/src/AdaptableOptions/SmartEdit.js +2 -0
  13. package/src/Api/Implementation/ColumnApiImpl.js +1 -1
  14. package/src/Api/Implementation/FilterApiImpl.js +8 -2
  15. package/src/Api/Implementation/GridApiImpl.d.ts +3 -3
  16. package/src/Api/Implementation/GridApiImpl.js +6 -8
  17. package/src/Api/Implementation/InternalApiImpl.d.ts +4 -0
  18. package/src/Api/Implementation/InternalApiImpl.js +9 -0
  19. package/src/Api/Implementation/SmartEditApiImpl.d.ts +3 -2
  20. package/src/Api/Implementation/ThemeApiImpl.d.ts +1 -0
  21. package/src/Api/Implementation/ThemeApiImpl.js +3 -0
  22. package/src/Api/InternalApi.d.ts +4 -0
  23. package/src/Api/SmartEditApi.d.ts +3 -2
  24. package/src/Api/ThemeApi.d.ts +4 -0
  25. package/src/PredefinedConfig/ExportState.d.ts +0 -5
  26. package/src/PredefinedConfig/PopupState.d.ts +2 -1
  27. package/src/PredefinedConfig/SystemState.d.ts +2 -5
  28. package/src/Redux/ActionsReducers/PopupRedux.d.ts +22 -3
  29. package/src/Redux/ActionsReducers/PopupRedux.js +42 -8
  30. package/src/Redux/ActionsReducers/SystemRedux.d.ts +5 -23
  31. package/src/Redux/ActionsReducers/SystemRedux.js +3 -32
  32. package/src/Strategy/AlertModule.js +29 -9
  33. package/src/Strategy/CalculatedColumnModule.js +1 -1
  34. package/src/Strategy/ExportModule.js +14 -4
  35. package/src/Strategy/SmartEditModule.d.ts +2 -2
  36. package/src/Strategy/SmartEditModule.js +24 -13
  37. package/src/Strategy/Utilities/getExportColumnsViewItems.js +1 -1
  38. package/src/Utilities/ExpressionFunctions/aggregatedBooleanExpressionFunctions.js +1 -1
  39. package/src/Utilities/ExpressionFunctions/booleanExpressionFunctions.js +4 -2
  40. package/src/Utilities/ExpressionFunctions/observableExpressionFunctions.js +1 -1
  41. package/src/Utilities/ExpressionFunctions/scalarExpressionFunctions.js +0 -3
  42. package/src/Utilities/Interface/MessagePopups.d.ts +12 -0
  43. package/src/Utilities/Services/AlertService.d.ts +3 -3
  44. package/src/Utilities/Services/AlertService.js +6 -6
  45. package/src/Utilities/Services/CalculatedColumnExpressionService.d.ts +3 -3
  46. package/src/Utilities/Services/CalculatedColumnExpressionService.js +20 -20
  47. package/src/Utilities/Services/EntitlementService.d.ts +3 -3
  48. package/src/Utilities/Services/EntitlementService.js +12 -8
  49. package/src/Utilities/Services/Interface/IReportService.d.ts +1 -1
  50. package/src/Utilities/Services/MetamodelService.d.ts +3 -3
  51. package/src/Utilities/Services/MetamodelService.js +4 -4
  52. package/src/Utilities/Services/ModuleService.d.ts +3 -3
  53. package/src/Utilities/Services/ModuleService.js +12 -12
  54. package/src/Utilities/Services/QueryLanguageService.d.ts +3 -3
  55. package/src/Utilities/Services/QueryLanguageService.js +20 -19
  56. package/src/Utilities/Services/ReportService.d.ts +4 -4
  57. package/src/Utilities/Services/ReportService.js +50 -44
  58. package/src/Utilities/Services/TeamSharingService.d.ts +3 -3
  59. package/src/Utilities/Services/TeamSharingService.js +19 -16
  60. package/src/Utilities/Services/ValidationService.d.ts +3 -3
  61. package/src/Utilities/Services/ValidationService.js +19 -17
  62. package/src/View/AdaptableView.js +2 -2
  63. package/src/View/Alert/Wizard/AlertBehaviourWizardSection.js +46 -9
  64. package/src/View/Alert/Wizard/AlertWizard.js +22 -24
  65. package/src/View/CalculatedColumn/Wizard/CalculatedColumnSettingsWizardSection.js +5 -5
  66. package/src/View/Components/AdaptableObjectList/AdaptableObjectList.js +3 -3
  67. package/src/View/Components/Popups/FormPopups/FormPopups.d.ts +10 -0
  68. package/src/View/Components/Popups/FormPopups/FormPopups.js +37 -0
  69. package/src/View/Components/Popups/WindowPopups/WindowPopups.js +1 -1
  70. package/src/View/DataChangeHistory/DataChangeHistoryPopup.js +1 -3
  71. package/src/View/DataSource/DataSourceViewPanel.d.ts +3 -3
  72. package/src/View/DataSource/DataSourceViewPanel.js +15 -13
  73. package/src/View/Export/ExportViewPanel.d.ts +1 -3
  74. package/src/View/Export/ExportViewPanel.js +1 -17
  75. package/src/View/GridInfo/AdaptableObjectsSummary.js +1 -1
  76. package/src/View/GridInfo/GridInfoPopup.js +4 -4
  77. package/src/View/Layout/Wizard/LayoutEditor/index.js +1 -4
  78. package/src/View/Layout/Wizard/LayoutEditorWizard.js +6 -1
  79. package/src/View/SmartEdit/SmartEditPopup.d.ts +3 -3
  80. package/src/View/SmartEdit/SmartEditPopup.js +15 -3
  81. package/src/View/SmartEdit/SmartEditViewPanel.d.ts +3 -4
  82. package/src/View/SmartEdit/SmartEditViewPanel.js +15 -6
  83. package/src/View/Wizard/OnePageAdaptableWizard.js +1 -1
  84. package/src/agGrid/Adaptable.d.ts +5 -4
  85. package/src/agGrid/Adaptable.js +56 -49
  86. package/src/components/StylePreview.js +2 -2
  87. package/src/metamodel/adaptable.metamodel.d.ts +5 -0
  88. package/src/metamodel/adaptable.metamodel.js +16 -5
  89. package/src/types.d.ts +1 -1
  90. package/version.d.ts +1 -1
  91. package/version.js +1 -1
  92. package/src/View/Export/ExportCustomDestinationDialog.d.ts +0 -11
  93. package/src/View/Export/ExportCustomDestinationDialog.js +0 -47
  94. package/src/View/Export/ExportCustomDestinationFormPopups.d.ts +0 -5
  95. package/src/View/Export/ExportCustomDestinationFormPopups.js +0 -15
@@ -57,6 +57,7 @@ const MetamodelService_1 = require("../Utilities/Services/MetamodelService");
57
57
  const DocumentationLinkConstants_1 = require("../Utilities/Constants/DocumentationLinkConstants");
58
58
  const ModuleConstants_1 = require("../Utilities/Constants/ModuleConstants");
59
59
  const CheckboxRenderer_1 = require("./CheckboxRenderer");
60
+ const DateHelper_1 = require("../Utilities/Helpers/DateHelper");
60
61
  const tinycolor = require('tinycolor2');
61
62
  all_modules_1.ModuleRegistry.registerModules(all_modules_1.AllCommunityModules);
62
63
  const GROUP_PATH_SEPARATOR = '/';
@@ -343,15 +344,15 @@ class Adaptable {
343
344
  this.initStore();
344
345
  // create the services
345
346
  this.LicenseService = this.initLicenseService();
346
- this.ValidationService = new ValidationService_1.ValidationService(this);
347
- this.ReportService = new ReportService_1.ReportService(this);
348
- this.ModuleService = new ModuleService_1.ModuleService(this);
349
- this.CalculatedColumnExpressionService = new CalculatedColumnExpressionService_1.CalculatedColumnExpressionService(this);
350
- this.EntitlementService = new EntitlementService_1.EntitlementService(this);
351
- this.QueryLanguageService = new QueryLanguageService_1.QueryLanguageService(this);
352
- this.AlertService = new AlertService_1.AlertService(this);
353
- this.TeamSharingService = new TeamSharingService_1.TeamSharingService(this);
354
- this.MetamodelService = new MetamodelService_1.MetamodelService(this);
347
+ this.ValidationService = new ValidationService_1.ValidationService(this.api);
348
+ this.ReportService = new ReportService_1.ReportService(this.api);
349
+ this.ModuleService = new ModuleService_1.ModuleService(this.api);
350
+ this.CalculatedColumnExpressionService = new CalculatedColumnExpressionService_1.CalculatedColumnExpressionService(this.api);
351
+ this.EntitlementService = new EntitlementService_1.EntitlementService(this.api);
352
+ this.QueryLanguageService = new QueryLanguageService_1.QueryLanguageService(this.api);
353
+ this.AlertService = new AlertService_1.AlertService(this.api);
354
+ this.TeamSharingService = new TeamSharingService_1.TeamSharingService(this.api);
355
+ this.MetamodelService = new MetamodelService_1.MetamodelService(this.api);
355
356
  this.forPlugins((plugin) => plugin.afterInitServices(this));
356
357
  // Set up Modules - we set up all the Modules suitable for AG Grid
357
358
  // But users can make some hidden or readonly in their entitlements
@@ -903,6 +904,20 @@ class Adaptable {
903
904
  ? flashingCell.flashingCellDefinition.DownChangeStyle
904
905
  : flashingCell.flashingCellDefinition.NeutralChangeStyle)) !== null && _a !== void 0 ? _a : {});
905
906
  }
907
+ getFlashingCellClass(col, params) {
908
+ var _a, _b, _c;
909
+ const primaryKey = params.node.aggData
910
+ ? params.node.id
911
+ : this.getPrimaryKeyValueFromRowNode(params.node);
912
+ const flashingCell = this.api.internalApi.getAdaptableFlashingCellFor(primaryKey, col.columnId);
913
+ if (!flashingCell) {
914
+ return;
915
+ }
916
+ return flashingCell.direction === 'up'
917
+ ? (_a = flashingCell.flashingCellDefinition.UpChangeStyle) === null || _a === void 0 ? void 0 : _a.ClassName : flashingCell.direction === 'down'
918
+ ? (_b = flashingCell.flashingCellDefinition.DownChangeStyle) === null || _b === void 0 ? void 0 : _b.ClassName : flashingCell.direction === 'neutral'
919
+ ? (_c = flashingCell.flashingCellDefinition.NeutralChangeStyle) === null || _c === void 0 ? void 0 : _c.ClassName : undefined;
920
+ }
906
921
  getCellHighlightStyle(col, params) {
907
922
  const primaryKeyValue = this.getPrimaryKeyValueFromRowNode(params.node);
908
923
  const cellHightlight = this.api.internalApi
@@ -994,8 +1009,7 @@ class Adaptable {
994
1009
  return (_b = conditionalStyle.Style) === null || _b === void 0 ? void 0 : _b.ClassName;
995
1010
  }
996
1011
  })
997
- .filter((x) => !!x)
998
- .join(' ');
1012
+ .filter((x) => !!x);
999
1013
  return classNames;
1000
1014
  }
1001
1015
  getEditableCellClass(abColumn, params) {
@@ -1678,27 +1692,27 @@ class Adaptable {
1678
1692
  return undefined;
1679
1693
  }
1680
1694
  }
1681
- isInternallyRenderedColumn(column) {
1695
+ isCustomRenderedColumn(column) {
1682
1696
  if (!column || column.isGrouped) {
1683
- return true;
1697
+ return false;
1684
1698
  }
1685
- // we need to return false if the column has a cell rendeerer i think...
1699
+ // we need to return false if the column has a cell renderer i think...
1686
1700
  const colDef = this.gridOptions.api.getColumnDef(column.columnId);
1687
1701
  if (colDef && colDef.cellRenderer != null) {
1688
- return false;
1702
+ return true;
1689
1703
  }
1690
1704
  if (this.api.columnApi.isFormatNumericStyleColumn(column)) {
1691
- return false;
1705
+ return true;
1692
1706
  }
1693
1707
  if (this.api.columnApi.isBooleanColumn(column)) {
1694
- return false;
1708
+ return true;
1695
1709
  }
1696
- return true;
1710
+ return false;
1697
1711
  }
1698
- getDisplayValue(id, columnId) {
1712
+ getDisplayValue(primaryKey, columnId) {
1699
1713
  let returnValue;
1700
1714
  if (this.useRowNodeLookUp) {
1701
- const rowNode = this.gridOptions.api.getRowNode(id);
1715
+ const rowNode = this.getRowNodeForPrimaryKey(primaryKey);
1702
1716
  return this.getDisplayValueFromRowNode(rowNode, columnId);
1703
1717
  }
1704
1718
  else {
@@ -1706,7 +1720,7 @@ class Adaptable {
1706
1720
  this.gridOptions.api.getModel().forEachNode((rowNode) => {
1707
1721
  if (!foundRow) {
1708
1722
  const primaryKeyValue = this.getPrimaryKeyValueFromRowNode(rowNode);
1709
- if (id == primaryKeyValue) {
1723
+ if (primaryKey == primaryKeyValue) {
1710
1724
  returnValue = this.getDisplayValueFromRowNode(rowNode, columnId);
1711
1725
  }
1712
1726
  foundRow = true;
@@ -1789,10 +1803,17 @@ class Adaptable {
1789
1803
  return formatterFn(params);
1790
1804
  }
1791
1805
  getNormalisedValueFromRowValue(rawValue, displayValue, column) {
1806
+ // not sure if the current implementation is correct:
1807
+ // the returned "normalised value" is actually the displayed value in almost all cases?!
1808
+ // ex. how to read the following: if 'rawValue' is NOT a number, return normalised version of rawValue, but if rawValue IS a number, return displayedValue of it (which will almost certainly will NOT be a number)
1809
+ // if (dataType === 'Number') {
1810
+ // return typeof rawValue !== 'number' ? Number(rawValue) : returnValue;
1811
+ // }
1812
+ // anyway, it seems to work so far (as of v11.1.3), so I'm leaving it for now :)
1792
1813
  if (!column) {
1793
1814
  return rawValue;
1794
1815
  }
1795
- const returnValue = this.isInternallyRenderedColumn(column) ? displayValue : rawValue;
1816
+ const returnValue = this.isCustomRenderedColumn(column) ? rawValue : displayValue;
1796
1817
  if (returnValue === undefined || returnValue === null) {
1797
1818
  return rawValue;
1798
1819
  }
@@ -1806,13 +1827,15 @@ class Adaptable {
1806
1827
  if (dataType === 'Boolean') {
1807
1828
  return typeof rawValue !== 'boolean' ? Boolean(rawValue) : returnValue;
1808
1829
  }
1809
- // Do not normalize dates to Date type
1810
- // - breaks when rendering in filter-form
1811
- // - breaks quick-search; the Date is transformed to string;
1812
- // -- an incorrect comparison is made (new Date().toString).incudes('query)
1830
+ if (dataType === 'Date') {
1831
+ return rawValue instanceof Date ? rawValue : DateHelper_1.parseDateValue(rawValue);
1832
+ }
1813
1833
  return returnValue;
1814
1834
  }
1815
1835
  getRawValueFromRowNode(rowNode, columnId) {
1836
+ if (rowNode == null) {
1837
+ return undefined;
1838
+ }
1816
1839
  return this.gridOptions.api.getValue(columnId, rowNode);
1817
1840
  }
1818
1841
  getDataRowFromRowNode(rowNode) {
@@ -2092,7 +2115,10 @@ class Adaptable {
2092
2115
  if (newlyCreatedSpecialColDef) {
2093
2116
  // if it's a special column and we have a special col def for it, return the special col def
2094
2117
  processedSpecialColDefIds.push(colDef.colId);
2095
- return newlyCreatedSpecialColDef;
2118
+ // merge the user defined colDef with the special col def
2119
+ // this way the user may provide some custom settings for the special col def (tooltip, etc)
2120
+ const mergedColDef = Object.assign(Object.assign({}, colDef), newlyCreatedSpecialColDef);
2121
+ return mergedColDef;
2096
2122
  }
2097
2123
  else {
2098
2124
  // otherwise, return the original col def
@@ -2841,14 +2867,13 @@ class Adaptable {
2841
2867
  const hasConditionalStylesWithClassNames = ArrayExtensions_1.ArrayExtensions.IsNotNullOrEmpty(conditionalStyles);
2842
2868
  const quickSearchStyleClassName = this.api.quickSearchApi.getQuickSearchStyle().ClassName;
2843
2869
  const hasQuickSearchStyleClassName = StringExtensions_1.StringExtensions.IsNotNullOrEmpty(quickSearchStyleClassName);
2844
- const classNameMap = {};
2845
2870
  const cellClass = (params) => {
2846
- var _a;
2847
2871
  const isQuickSearchActive = hasQuickSearchStyleClassName && this.isQuickSearchActive(abColumn, params);
2848
2872
  const primaryKeyValue = this.getPrimaryKeyValueFromRowNode(params.node);
2849
2873
  const editableClassName = this.getEditableCellClass(abColumn, params);
2850
2874
  const readonlyClassName = this.getReadonlyCellClass(abColumn, params);
2851
2875
  const highlightAlertClassName = this.getAlertCellClass(abColumn, params);
2876
+ const flashingClassName = this.getFlashingCellClass(abColumn, params);
2852
2877
  const returnValue = [
2853
2878
  this.getExcelClassNameForCell(colId, primaryKeyValue),
2854
2879
  typeof userCellClass === 'function' ? userCellClass(params) : userCellClass,
@@ -2860,29 +2885,11 @@ class Adaptable {
2860
2885
  editableClassName,
2861
2886
  readonlyClassName,
2862
2887
  highlightAlertClassName,
2888
+ flashingClassName,
2863
2889
  ]
2864
- // we flatten the array because 'userCellClass' might return a string[]
2890
+ // we flatten the array because some rules ('userCellClass',conditionalStyles etc) might return a string[]
2865
2891
  .flat()
2866
2892
  .filter((x) => !!x);
2867
- const returnValueHash = returnValue.join(' ');
2868
- const primaryKey = this.getPrimaryKeyValueFromRowNode(params.node);
2869
- const key = `${primaryKey}:${params.colDef.colId}`;
2870
- if (classNameMap[key] &&
2871
- classNameMap[key] !== returnValueHash &&
2872
- // only hard-reset when removing class-names
2873
- // ag-grid does not remove class-names, it accumulates them
2874
- // https://www.ag-grid.com/javascript-data-grid/cell-styles/#refresh-of-styles
2875
- returnValueHash.length < ((_a = classNameMap[key]) === null || _a === void 0 ? void 0 : _a.length)) {
2876
- setTimeout(() => {
2877
- /**
2878
- * This is called inside a getter function, inside ag-grid.
2879
- * To allow ag-grid run it's logic, the redraw is done inside an timeout
2880
- * to make sure it is not done in an inappropriate time.
2881
- */
2882
- params.api.redrawRows({ rowNodes: [params.node] });
2883
- }, 0);
2884
- }
2885
- classNameMap[key] = returnValueHash;
2886
2893
  return returnValue.length ? returnValue : undefined;
2887
2894
  };
2888
2895
  return cellClass;
@@ -6,6 +6,6 @@ const React = tslib_1.__importStar(require("react"));
6
6
  const rebass_1 = require("rebass");
7
7
  const StyleHelper_1 = require("../Utilities/Helpers/StyleHelper");
8
8
  exports.StylePreview = (props) => {
9
- var _a;
10
- return (React.createElement(rebass_1.Box, Object.assign({}, props, { padding: 2, mt: 2, style: Object.assign(Object.assign({}, StyleHelper_1.toStyle(props.styleObject)), props.style) }), (_a = props.children) !== null && _a !== void 0 ? _a : 'Preview result'));
9
+ 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({}, StyleHelper_1.toStyle(props.styleObject)), props.style) }), (_c = props.children) !== null && _c !== void 0 ? _c : 'Preview result'));
11
11
  };
@@ -3601,6 +3601,11 @@ export declare const ADAPTABLE_METAMODEL: {
3601
3601
  isOptional: boolean;
3602
3602
  }[];
3603
3603
  };
3604
+ TOAST_POSITIONS: {
3605
+ name: string;
3606
+ kind: string;
3607
+ description: string;
3608
+ };
3604
3609
  ToolPanelApi: {
3605
3610
  name: string;
3606
3611
  kind: string;
@@ -3574,7 +3574,7 @@ exports.ADAPTABLE_METAMODEL = {
3574
3574
  {
3575
3575
  "name": "agGridContainerWaitTimeout",
3576
3576
  "kind": "number",
3577
- "description": "how long AdapTable waits for AG Grid before giving up connecting to it; useful when AG Grid is instantiated separately (eg: by AdapTable React or AdapTable Angular)",
3577
+ "description": "How long AdapTable waits for AG Grid before giving up connecting to it",
3578
3578
  "uiLabel": "Ag Grid Container Wait Timeout",
3579
3579
  "isOptional": true,
3580
3580
  "gridInfo": "item",
@@ -4287,7 +4287,7 @@ exports.ADAPTABLE_METAMODEL = {
4287
4287
  {
4288
4288
  "name": "buttonsLocation",
4289
4289
  "kind": "unknown",
4290
- "description": "Position in the Dashboard to show the Module and Custom Buttons",
4290
+ "description": "Where in Dashboard to display Module and Custom Buttons",
4291
4291
  "uiLabel": "Buttons Location",
4292
4292
  "isOptional": true,
4293
4293
  "defaultValue": "&#39;right&#39;"
@@ -8599,12 +8599,12 @@ exports.ADAPTABLE_METAMODEL = {
8599
8599
  "isOptional": true,
8600
8600
  "gridInfo": "item",
8601
8601
  "defaultValue": "&#39;BottomRight&#39;",
8602
- "reference": "unknown"
8602
+ "reference": "TOAST_POSITIONS"
8603
8603
  },
8604
8604
  {
8605
8605
  "name": "showApplicationIcon",
8606
8606
  "kind": "boolean",
8607
- "description": "Displays the application icon in Notifications (if provided in `UserInterfaceOptions`)",
8607
+ "description": "Displays the application icon in Notifications",
8608
8608
  "uiLabel": "Show Application Icon",
8609
8609
  "isOptional": true,
8610
8610
  "defaultValue": "false"
@@ -8621,7 +8621,7 @@ exports.ADAPTABLE_METAMODEL = {
8621
8621
  {
8622
8622
  "name": "showSystemStatusMessageNotifications",
8623
8623
  "kind": "boolean",
8624
- "description": "Display an Alert when a System Status Message is set",
8624
+ "description": "Display System Status Messages as Notifications",
8625
8625
  "uiLabel": "Show System Status Message Notifications",
8626
8626
  "isOptional": true,
8627
8627
  "gridInfo": "item",
@@ -11070,6 +11070,12 @@ exports.ADAPTABLE_METAMODEL = {
11070
11070
  "description": "Applies the Current Theme",
11071
11071
  "uiLabel": "Apply Current Theme"
11072
11072
  },
11073
+ {
11074
+ "name": "getAgGridCurrentThemeName",
11075
+ "kind": "function",
11076
+ "description": "Get the name of the current AG Grid theme",
11077
+ "uiLabel": "Get Ag Grid Current Theme Name"
11078
+ },
11073
11079
  {
11074
11080
  "name": "getAllSystemTheme",
11075
11081
  "kind": "function",
@@ -11179,6 +11185,11 @@ exports.ADAPTABLE_METAMODEL = {
11179
11185
  }
11180
11186
  ]
11181
11187
  },
11188
+ "TOAST_POSITIONS": {
11189
+ "name": "TOAST_POSITIONS",
11190
+ "kind": "TypeAlias",
11191
+ "description": "Different positions offered by Notifications"
11192
+ },
11182
11193
  "ToolPanelApi": {
11183
11194
  "name": "ToolPanelApi",
11184
11195
  "kind": "Interface",
package/src/types.d.ts CHANGED
@@ -9,7 +9,7 @@ export type { AdaptableOptions } from './AdaptableOptions/AdaptableOptions';
9
9
  export { AdaptablePlugin } from './AdaptableOptions/AdaptablePlugin';
10
10
  export type { ContainerOptions } from './AdaptableOptions/ContainerOptions';
11
11
  export type { FlashingCellOptions } from './AdaptableOptions/FlashingCellOptions';
12
- export type { NotificationsOptions } from './AdaptableOptions/NotificationsOptions';
12
+ export type { TOAST_POSITIONS, NotificationsOptions, } from './AdaptableOptions/NotificationsOptions';
13
13
  export type { AlertOptions, ActionHandler, AlertForm, AlertButtonContext, } from './AdaptableOptions/AlertOptions';
14
14
  export type { DashboardOptions, CustomToolbar, DashboardButtonContext, CustomToolbarButtonContext, } from './AdaptableOptions/DashboardOptions';
15
15
  export type { EditOptions, ValidationResult } from './AdaptableOptions/EditOptions';
package/version.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- declare const _default: "11.1.2";
1
+ declare const _default: "11.1.5";
2
2
  export default _default;
package/version.js CHANGED
@@ -1,3 +1,3 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.default = '11.1.2'; // PLEASE DONT UPDATE THIS!!! - will be updated at build time with the correct version
3
+ exports.default = '11.1.5'; // PLEASE DONT UPDATE THIS!!! - will be updated at build time with the correct version
@@ -1,11 +0,0 @@
1
- /// <reference types="react" />
2
- import { CustomDestination } from '../../AdaptableOptions/ExportOptions';
3
- import { Report } from '../../PredefinedConfig/ExportState';
4
- interface ExportCustomDestinationDialogProps {
5
- report: Report;
6
- customDestination: CustomDestination;
7
- isOpen: boolean;
8
- onDismiss: () => void;
9
- }
10
- export declare function ExportCustomDestinationDialog({ report, customDestination, isOpen, onDismiss, }: ExportCustomDestinationDialogProps): JSX.Element;
11
- export {};
@@ -1,47 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.ExportCustomDestinationDialog = void 0;
4
- const tslib_1 = require("tslib");
5
- const React = tslib_1.__importStar(require("react"));
6
- const rebass_1 = require("rebass");
7
- const AdaptableForm_1 = require("../../PredefinedConfig/Common/AdaptableForm");
8
- const Dialog_1 = tslib_1.__importDefault(require("../../components/Dialog"));
9
- const AdaptableFormComponent_1 = require("../../components/AdaptableFormComponent");
10
- const AdaptableContext_1 = require("../AdaptableContext");
11
- function ExportCustomDestinationDialog({ report, customDestination,
12
- //onSubmit,
13
- isOpen, onDismiss, }) {
14
- const [data, setData] = React.useState({});
15
- const adaptable = AdaptableContext_1.useAdaptable();
16
- const context = React.useMemo(() => {
17
- return {
18
- adaptableApi: adaptable.api,
19
- report,
20
- reportData: undefined,
21
- customDestination,
22
- formData: data,
23
- };
24
- }, [data]);
25
- const formDef = customDestination === null || customDestination === void 0 ? void 0 : customDestination.form;
26
- React.useEffect(() => {
27
- if (formDef) {
28
- setData(Object.assign(Object.assign({}, AdaptableForm_1.getDefaultAdaptableFormData(formDef)), data));
29
- }
30
- }, [formDef]);
31
- return (React.createElement(Dialog_1.default, { isOpen: isOpen, showCloseButton: false, style: { minHeight: 'auto', minWidth: 400 }, onDismiss: () => {
32
- onDismiss();
33
- } }, isOpen && (React.createElement(rebass_1.Box, { padding: 4 },
34
- React.createElement(AdaptableFormComponent_1.AdaptableFormComponent, { formDef: formDef, data: data, context: context, onChange: setData, api: adaptable.api, displayTitle: true, onButtonClick: (button) => {
35
- onDismiss();
36
- // we want to give the current popup time to close
37
- // and we reopen with a delay in case this button action causes another popup
38
- setTimeout(() => {
39
- var _a;
40
- context.reportData = adaptable.api.internalApi
41
- .getReportService()
42
- .getReportData(report);
43
- (_a = button.onClick) === null || _a === void 0 ? void 0 : _a.call(button, button, context);
44
- }, 20);
45
- } })))));
46
- }
47
- exports.ExportCustomDestinationDialog = ExportCustomDestinationDialog;
@@ -1,5 +0,0 @@
1
- import * as React from 'react';
2
- import { AdaptableApi } from '../../types';
3
- export declare const ExportCustomDestinationFormPopups: React.FunctionComponent<{
4
- api: AdaptableApi;
5
- }>;
@@ -1,15 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.ExportCustomDestinationFormPopups = void 0;
4
- const tslib_1 = require("tslib");
5
- const React = tslib_1.__importStar(require("react"));
6
- const react_redux_1 = require("react-redux");
7
- const SystemRedux = tslib_1.__importStar(require("../../Redux/ActionsReducers/SystemRedux"));
8
- const ExportCustomDestinationDialog_1 = require("./ExportCustomDestinationDialog");
9
- exports.ExportCustomDestinationFormPopups = (props) => {
10
- var _a;
11
- const dispatch = react_redux_1.useDispatch();
12
- const customDestinationPopups = react_redux_1.useSelector(SystemRedux.getSystemExportCustomDestinationPopups);
13
- const handleDismiss = React.useCallback((config) => dispatch(SystemRedux.SystemExportCustomDestinationPopupHide(config)), []);
14
- return (React.createElement(React.Fragment, null, (_a = (customDestinationPopups || [])) === null || _a === void 0 ? void 0 : _a.map((customDestinationPopup) => customDestinationPopup && (React.createElement(ExportCustomDestinationDialog_1.ExportCustomDestinationDialog, { isOpen: true, key: `${customDestinationPopup.ReportName}-${customDestinationPopup.ExportDestination.name}`, report: props.api.exportApi.getReportByName(customDestinationPopup.ReportName), customDestination: customDestinationPopup.ExportDestination, onDismiss: () => handleDismiss(customDestinationPopup) })))));
15
- };