@adaptabletools/adaptable 17.0.0-canary.6 → 17.0.0-canary.7

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.
@@ -3,11 +3,20 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.renderReactRoot = void 0;
4
4
  const tslib_1 = require("tslib");
5
5
  const ReactDOMClient = tslib_1.__importStar(require("react-dom/client"));
6
+ const renderWeakMap = new WeakMap();
6
7
  const renderReactRoot = (el, container) => {
7
- const root = ReactDOMClient.createRoot(container);
8
+ let root = renderWeakMap.get(container);
9
+ if (!root) {
10
+ renderWeakMap.set(container, (root = ReactDOMClient.createRoot(container)));
11
+ }
8
12
  root.render(el);
9
13
  return () => {
10
- root.unmount();
14
+ requestAnimationFrame(() => {
15
+ // This pervents this warning:
16
+ // Warning: Attempted to synchronously unmount a root while React was already rendering. React cannot finish unmounting the root until the current render has completed, which may lead to a race condition.
17
+ // https:stackoverflow.com/questions/73459382/react-18-async-way-to-unmount-root
18
+ root.unmount();
19
+ });
11
20
  };
12
21
  };
13
22
  exports.renderReactRoot = renderReactRoot;
package/src/types.d.ts CHANGED
@@ -14,7 +14,7 @@ export type { FlashingCellOptions } from './AdaptableOptions/FlashingCellOptions
14
14
  export type { TOAST_POSITIONS, NotificationsOptions, } from './AdaptableOptions/NotificationsOptions';
15
15
  export type { AlertOptions, ActionHandler, AlertForm, AlertFormContext, AlertMessageContext, } from './AdaptableOptions/AlertOptions';
16
16
  export type { DashboardOptions, CustomToolbar, DashboardButtonContext, CustomToolbarButtonContext, } from './AdaptableOptions/DashboardOptions';
17
- export type { EditOptions, ValidationResult, SmartEditCustomOperation, SmartEditOperation, SmartEditOperationContext, ServerValidationContext, CellEditableContext, } from './AdaptableOptions/EditOptions';
17
+ export type { EditOptions, ServerValidationResult, SmartEditCustomOperation, SmartEditOperation, SmartEditOperationContext, ServerValidationContext, CellEditableContext, } from './AdaptableOptions/EditOptions';
18
18
  export type { ActionRowOptions, ActionRowButtonOptions, ActionRowFormOptions, ActionRowParamContext, ActionRowParamFieldContext, CreateActionRowFormContext, EditActionRowFormContext, ActionRowFormContext, ActionRowType, ActionRowButtonType, ActionRowButtonConfigurationContext, ActionRowButtonsContext, SetPrimaryKeyValueContext, ActionRowFormColumnContext, } from './AdaptableOptions/ActionRowOptions';
19
19
  export type { ActionColumnContext, ActionColumn, ActionColumnSettings, ActionColumnOptions, } from './AdaptableOptions/ActionColumnOptions';
20
20
  export type { ExportOptions, SystemExportDestination, SystemExportDestinations, CustomDestination, ExternalReport, PreProcessExportContext, AdaptableReportColumn, DataFormatType, ExportFormContext, ReportContext, ExportableColumnContext, ReportFileNameContext, } from './AdaptableOptions/ExportOptions';
@@ -34,7 +34,7 @@ export type { MasterDetailPluginOptions, DetailInitContext, } from './AdaptableO
34
34
  export type { FinsemblePluginOptions, FinsemblePluginStateOptions, } from './AdaptableOptions/FinsemblePluginOptions';
35
35
  export type { DateInputOptions } from './AdaptableOptions/DateInputOptions';
36
36
  export type { ColumnFilterOptions, QuickFilterOptions, FilterFormOptions, ValuesFilterOptions, ColumnFilterContext, } from './AdaptableOptions/ColumnFilterOptions';
37
- export type { GridFilterOptions } from './AdaptableOptions/GridFilterOptions';
37
+ export type { GridFilterOptions, GridFilterEditors, GridFilterEditor } from './AdaptableOptions/GridFilterOptions';
38
38
  export type { QuickSearchOptions, QuickSearchContext } from './AdaptableOptions/QuickSearchOptions';
39
39
  export type { FormatColumnOptions, CustomDisplayFormatter, CustomDisplayFormatterContext, } from './AdaptableOptions/FormatColumnOptions';
40
40
  export type { ColumnOptions, ColumnFriendlyNameContext } from './AdaptableOptions/ColumnOptions';
package/version.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- declare const _default: "17.0.0-canary.6";
1
+ declare const _default: "17.0.0-canary.7";
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 = '17.0.0-canary.6'; // PLEASE DONT UPDATE THIS!!! - will be updated at build time with the correct version
3
+ exports.default = '17.0.0-canary.7'; // PLEASE DONT UPDATE THIS!!! - will be updated at build time with the correct version