@adaptabletools/adaptable 13.0.0-canary.0 → 13.0.0-canary.2

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 +129 -129
  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 +3 -0
  6. package/src/Api/Implementation/DashboardApiImpl.js +2 -3
  7. package/src/Strategy/Interface/IModule.d.ts +10 -10
  8. package/src/Strategy/Utilities/Alert/getAlertBehaviourViewItems.d.ts +2 -2
  9. package/src/View/AdaptablePopover/index.d.ts +2 -2
  10. package/src/View/AdaptableView.d.ts +3 -3
  11. package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/Components/FormBox.d.ts +1 -1
  12. package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/FinanceForm/FinanceForm.d.ts +1 -1
  13. package/src/View/AdaptableWizardView/index.d.ts +1 -1
  14. package/src/View/ColorPicker.d.ts +1 -5
  15. package/src/View/Components/AdaptableDateInput/index.d.ts +1 -1
  16. package/src/View/Components/Buttons/ButtonEdit.d.ts +1 -1
  17. package/src/View/Components/Popups/AdaptablePopup/AdaptablePopupBody.d.ts +1 -1
  18. package/src/View/Components/Popups/AdaptablePopup/AdaptablePopupDialog.d.ts +2 -2
  19. package/src/View/Components/Popups/AdaptablePopup/AdaptablePopupModuleView.d.ts +1 -1
  20. package/src/View/Components/Popups/AdaptablePopup/Navigation.d.ts +1 -1
  21. package/src/View/Components/Popups/AdaptablePopup/PopupPanel.d.ts +1 -1
  22. package/src/View/Components/Popups/AdaptablePopup/TopBar.d.ts +1 -1
  23. package/src/View/Components/Popups/AdaptablePopupPrompt.d.ts +1 -1
  24. package/src/View/Layout/Wizard/sections/AggregationsSection.js +1 -1
  25. package/src/View/Layout/Wizard/sections/SettingsSection.d.ts +2 -2
  26. package/src/View/License/LicenseWatermark.d.ts +1 -1
  27. package/src/View/StateManagement/components/ClearButton.d.ts +1 -1
  28. package/src/View/StateManagement/components/LoadButton.d.ts +1 -1
  29. package/src/View/StatusBar/StatusBarPanel.d.ts +4 -4
  30. package/src/View/Wizard/OnePageAdaptableWizard.d.ts +3 -3
  31. package/src/View/Wizard/OnePageAdaptableWizard.js +2 -2
  32. package/src/View/Wizard/OnePageWizards.d.ts +3 -3
  33. package/src/View/Wizard/OnePageWizards.js +2 -2
  34. package/src/agGrid/Adaptable.d.ts +6 -0
  35. package/src/agGrid/Adaptable.js +31 -21
  36. package/src/agGrid/FilterWrapper.js +4 -5
  37. package/src/agGrid/FloatingFilterWrapper.js +3 -4
  38. package/src/agGrid/createAgStatusPanelComponent.d.ts +1 -0
  39. package/src/agGrid/createAgStatusPanelComponent.js +3 -3
  40. package/src/components/CheckBox/index.d.ts +1 -1
  41. package/src/components/Datepicker/index.d.ts +1 -1
  42. package/src/components/Dialog/index.d.ts +4 -2
  43. package/src/components/Dialog/index.js +2 -2
  44. package/src/components/DropdownButton/index.d.ts +21 -4
  45. package/src/components/DropdownButton/index.js +5 -6
  46. package/src/components/Input/index.d.ts +1 -1
  47. package/src/components/List/ListGroupItem/index.d.ts +4 -2
  48. package/src/components/Loader/Loader.d.ts +2 -2
  49. package/src/components/Logo/index.d.ts +1 -1
  50. package/src/components/Modal/index.d.ts +1 -1
  51. package/src/components/PopupWithFooter.d.ts +2 -2
  52. package/src/components/ProgressIndicator/ProgressIndicator.d.ts +1 -1
  53. package/src/components/SelectList.d.ts +1 -1
  54. package/src/components/SimpleButton/index.d.ts +4 -5
  55. package/src/components/SimpleButton/index.js +3 -2
  56. package/src/components/StylePreview.d.ts +1 -1
  57. package/src/components/Tag/Tag.d.ts +1 -1
  58. package/src/components/Textarea/index.d.ts +6 -4
  59. package/src/components/ToggleButton/index.d.ts +1 -1
  60. package/src/components/WindowModal/WindowModal.d.ts +1 -1
  61. package/src/components/icons/index.d.ts +3 -2
  62. package/src/components/icons/layout.d.ts +2 -1
  63. package/src/components/utils/useContainerScrollObserver/index.d.ts +1 -1
  64. package/src/renderReactRoot.d.ts +3 -0
  65. package/src/renderReactRoot.js +54 -0
  66. package/version.d.ts +1 -1
  67. package/version.js +1 -1
@@ -5,7 +5,7 @@ import { AccessLevel } from '../../PredefinedConfig/Common/Entitlement';
5
5
  import { OverlayProps } from '../OverlayTrigger/Overlay';
6
6
  import { AdaptableIcon } from '../../PredefinedConfig/Common/AdaptableIcon';
7
7
  export declare const baseClassName = "ab-SimpleButton";
8
- export interface SimpleButtonProps extends ButtonProps {
8
+ export interface SimpleButtonProps extends Omit<ButtonProps, 'ref'> {
9
9
  tooltip?: string;
10
10
  variant?: 'text' | 'outlined' | 'raised';
11
11
  tone?: 'success' | 'error' | 'neutral' | 'none' | 'warning' | 'info' | 'accent';
@@ -14,10 +14,9 @@ export interface SimpleButtonProps extends ButtonProps {
14
14
  iconPosition?: 'start' | 'end';
15
15
  disabled?: boolean;
16
16
  accessLevel?: AccessLevel;
17
- children?: ReactNode | ReactNode[];
18
17
  tooltipAnchor?: OverlayProps['anchor'];
19
18
  }
20
- declare const SimpleButton: React.FunctionComponent<SimpleButtonProps> & {
21
- ref?: React.Ref<HTMLButtonElement>;
22
- };
19
+ declare const SimpleButton: React.ForwardRefExoticComponent<SimpleButtonProps & {
20
+ children?: React.ReactNode;
21
+ } & React.RefAttributes<HTMLButtonElement>>;
23
22
  export default SimpleButton;
@@ -10,7 +10,7 @@ const Tooltip_1 = tslib_1.__importDefault(require("../Tooltip"));
10
10
  const theme_1 = tslib_1.__importDefault(require("../../theme"));
11
11
  const AdaptableIconComponent_1 = require("../AdaptableIconComponent");
12
12
  exports.baseClassName = 'ab-SimpleButton';
13
- const SimpleButton = React.forwardRef((props, ref) => {
13
+ const SimpleButton = React.forwardRef((props, theRef) => {
14
14
  var _a, _b;
15
15
  let { children, disabled, variant = 'outlined', tone = 'neutral', iconPosition = 'start', iconSize, className, icon, tooltip, tooltipAnchor, accessLevel: accessLevel, type } = props, buttonProps = tslib_1.__rest(props, ["children", "disabled", "variant", "tone", "iconPosition", "iconSize", "className", "icon", "tooltip", "tooltipAnchor", "accessLevel", "type"]);
16
16
  let adaptableInternalIcon;
@@ -76,7 +76,7 @@ const SimpleButton = React.forwardRef((props, ref) => {
76
76
  const fontWeight = buttonProps.fontWeight
77
77
  ? (_b = (_a = theme_1.default[buttonProps.fontWeight]) !== null && _a !== void 0 ? _a : buttonProps.fontWeight) !== null && _b !== void 0 ? _b : 'normal'
78
78
  : 'normal';
79
- const btn = (React.createElement(rebass_1.Button, Object.assign({}, buttonProps, { disabled: disabled, className: (0, join_1.default)(className, exports.baseClassName, disabled ? `${exports.baseClassName}--disabled` : '', fontWeight ? `${exports.baseClassName}--font-weight=${fontWeight}` : '', `${exports.baseClassName}--variant-${variant}`, `${exports.baseClassName}--tone-${tone}`), ref: ref }), children));
79
+ const btn = (React.createElement(rebass_1.Button, Object.assign({}, buttonProps, { disabled: disabled, className: (0, join_1.default)(className, exports.baseClassName, disabled ? `${exports.baseClassName}--disabled` : '', fontWeight ? `${exports.baseClassName}--font-weight=${fontWeight}` : '', `${exports.baseClassName}--variant-${variant}`, `${exports.baseClassName}--tone-${tone}`), ref: theRef }), children));
80
80
  return tooltip ? (React.createElement(Tooltip_1.default, { anchor: tooltipAnchor, label: tooltip }, btn)) : (btn);
81
81
  });
82
82
  SimpleButton.defaultProps = {
@@ -84,6 +84,7 @@ SimpleButton.defaultProps = {
84
84
  py: null,
85
85
  fontWeight: 'normal',
86
86
  m: null,
87
+ //@ts-ignore
87
88
  borderRadius: null,
88
89
  };
89
90
  exports.default = SimpleButton;
@@ -4,5 +4,5 @@ import { AdaptableStyle } from '../types';
4
4
  interface StylePreviewProps extends BoxProps {
5
5
  styleObject: AdaptableStyle;
6
6
  }
7
- export declare const StylePreview: React.FunctionComponent<StylePreviewProps>;
7
+ export declare const StylePreview: React.FunctionComponent<React.PropsWithChildren<StylePreviewProps>>;
8
8
  export {};
@@ -1,3 +1,3 @@
1
1
  import * as React from 'react';
2
2
  import { FlexProps } from 'rebass';
3
- export declare const Tag: React.FunctionComponent<FlexProps>;
3
+ export declare const Tag: React.FunctionComponent<React.PropsWithChildren<FlexProps>>;
@@ -2,14 +2,16 @@ import * as React from 'react';
2
2
  import { BoxProps } from 'rebass';
3
3
  import { HTMLProps } from 'react';
4
4
  export declare const baseClassName = "ab-Textarea";
5
- export declare type TextareaProps = HTMLProps<HTMLTextAreaElement> & {
5
+ export declare type TextareaProps = Omit<HTMLProps<HTMLTextAreaElement>, 'ref'> & {
6
6
  placehoder?: string;
7
7
  type?: string;
8
8
  disabled?: boolean;
9
- } & BoxProps;
10
- declare const Textarea: React.ForwardRefExoticComponent<Pick<React.HTMLProps<HTMLTextAreaElement> & {
9
+ value?: string;
10
+ } & Omit<BoxProps, 'ref'>;
11
+ declare const Textarea: React.ForwardRefExoticComponent<Omit<React.HTMLProps<HTMLTextAreaElement>, "ref"> & {
11
12
  placehoder?: string;
12
13
  type?: string;
13
14
  disabled?: boolean;
14
- } & BoxProps, "max" | "required" | "type" | "data" | "default" | "high" | "low" | "key" | "id" | "media" | "height" | "width" | "start" | "open" | "name" | "alignSelf" | "backgroundColor" | "color" | "content" | "flex" | "fontSize" | "margin" | "marginBottom" | "marginLeft" | "marginRight" | "marginTop" | "opacity" | "order" | "padding" | "paddingBottom" | "paddingLeft" | "paddingRight" | "paddingTop" | "translate" | "value" | "hidden" | "cite" | "dir" | "form" | "label" | "p" | "slot" | "span" | "style" | "summary" | "title" | "pattern" | "acceptCharset" | "action" | "method" | "noValidate" | "target" | "accessKey" | "draggable" | "lang" | "className" | "prefix" | "children" | "contentEditable" | "inputMode" | "nonce" | "tabIndex" | "async" | "disabled" | "multiple" | "size" | "manifest" | "m" | "wrap" | "accept" | "allowFullScreen" | "allowTransparency" | "alt" | "as" | "autoComplete" | "autoFocus" | "autoPlay" | "capture" | "cellPadding" | "cellSpacing" | "charSet" | "challenge" | "checked" | "classID" | "cols" | "colSpan" | "controls" | "coords" | "crossOrigin" | "dateTime" | "defer" | "download" | "encType" | "formAction" | "formEncType" | "formMethod" | "formNoValidate" | "formTarget" | "frameBorder" | "headers" | "href" | "hrefLang" | "htmlFor" | "httpEquiv" | "integrity" | "keyParams" | "keyType" | "kind" | "list" | "loop" | "marginHeight" | "marginWidth" | "maxLength" | "mediaGroup" | "min" | "minLength" | "muted" | "optimum" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "contextMenu" | "placeholder" | "spellCheck" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "playsInline" | "poster" | "preload" | "readOnly" | "rel" | "reversed" | "rows" | "rowSpan" | "sandbox" | "scope" | "scoped" | "scrolling" | "seamless" | "selected" | "shape" | "sizes" | "src" | "srcDoc" | "srcLang" | "srcSet" | "step" | "useMap" | "wmode" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "mt" | "mb" | "ml" | "mr" | "my" | "marginY" | "mx" | "marginX" | "pt" | "pr" | "pb" | "pl" | "px" | "paddingX" | "py" | "paddingY" | "bg" | "css" | "placehoder"> & React.RefAttributes<unknown>>;
15
+ value?: string;
16
+ } & Omit<BoxProps, "ref"> & React.RefAttributes<HTMLInputElement | HTMLDivElement | HTMLTextAreaElement>>;
15
17
  export default Textarea;
@@ -7,5 +7,5 @@ interface ToggleButtonProps {
7
7
  style?: React.CSSProperties;
8
8
  'data-name': string;
9
9
  }
10
- export declare const ToggleButton: React.FunctionComponent<ToggleButtonProps>;
10
+ export declare const ToggleButton: React.FunctionComponent<React.PropsWithChildren<ToggleButtonProps>>;
11
11
  export {};
@@ -24,4 +24,4 @@ export interface WindowModalProps {
24
24
  };
25
25
  }) => void;
26
26
  }
27
- export declare const WindowModal: React.FunctionComponent<WindowModalProps>;
27
+ export declare const WindowModal: React.FunctionComponent<React.PropsWithChildren<WindowModalProps>>;
@@ -1,7 +1,8 @@
1
1
  import * as React from 'react';
2
- import { CSSProperties, ReactNode } from 'react';
2
+ import { CSSProperties } from 'react';
3
+ import { IconProps } from './DefaultIcon';
3
4
  import { AdaptableExternalIcon, AdaptableInternalIcon, AdaptableInternalIconName } from '../../PredefinedConfig/Common/AdaptableIcon';
4
- declare const allIcons: Record<AdaptableInternalIconName, ReactNode>;
5
+ declare const allIcons: Record<AdaptableInternalIconName, React.FunctionComponent<IconProps>>;
5
6
  export declare const Icon: ({ name, style, className, tabIndex, ...props }: {
6
7
  style?: React.CSSProperties;
7
8
  name: AdaptableInternalIconName;
@@ -1,3 +1,4 @@
1
1
  /// <reference types="react" />
2
- declare const _default: (props: any) => JSX.Element;
2
+ import { IconProps } from './DefaultIcon';
3
+ declare const _default: (props: IconProps) => JSX.Element;
3
4
  export default _default;
@@ -1,6 +1,6 @@
1
1
  declare type UseContainerScrollObserverCallback = (currentIndex: number) => void;
2
2
  export declare const useContainerScrollObserver: (callback: UseContainerScrollObserverCallback) => {
3
- ref: (node: any) => void;
3
+ ref: (node: HTMLElement) => void;
4
4
  scrollToIndex: (index: number) => void;
5
5
  };
6
6
  export {};
@@ -0,0 +1,3 @@
1
+ /// <reference types="react" />
2
+ export declare type RenderReactRootFn = (el: JSX.Element, container: HTMLElement) => VoidFunction;
3
+ export declare const renderReactRoot: (el: JSX.Element, container: HTMLElement, supressReact18RenderWarning: boolean) => () => void;
@@ -0,0 +1,54 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.renderReactRoot = void 0;
4
+ const tslib_1 = require("tslib");
5
+ const ReactDOM = tslib_1.__importStar(require("react-dom"));
6
+ //@ts-ignore
7
+ // import * as ReactDOMClient from 'react-dom/client';
8
+ const originalConsoleError = console.error;
9
+ const doRenderReactRoot = (el, container) => {
10
+ // if ((ReactDOMClient || {}).createRoot) {
11
+ // const root = ReactDOMClient.createRoot(container);
12
+ // root.render(el);
13
+ // return () => {
14
+ // root.unmount();
15
+ // };
16
+ // }
17
+ ReactDOM.render(el, container);
18
+ return () => {
19
+ ReactDOM.unmountComponentAtNode(container);
20
+ };
21
+ };
22
+ function capture() {
23
+ console.error = (message, ...optionalParams) => {
24
+ if (message &&
25
+ typeof message === 'string' &&
26
+ message.includes('Warning: ReactDOM.render is no longer supported in React 18.')) {
27
+ return;
28
+ }
29
+ return originalConsoleError.call(console, message, ...optionalParams);
30
+ };
31
+ }
32
+ function release() {
33
+ console.error = originalConsoleError;
34
+ }
35
+ const renderReactRoot = (el, container, supressReact18RenderWarning) => {
36
+ if (supressReact18RenderWarning) {
37
+ capture();
38
+ }
39
+ const unmount = doRenderReactRoot(el, container);
40
+ if (supressReact18RenderWarning) {
41
+ release();
42
+ }
43
+ return () => {
44
+ // probably capturing not needed for unmount to be honest ...
45
+ if (supressReact18RenderWarning) {
46
+ capture();
47
+ }
48
+ unmount();
49
+ if (supressReact18RenderWarning) {
50
+ release();
51
+ }
52
+ };
53
+ };
54
+ exports.renderReactRoot = renderReactRoot;
package/version.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- declare const _default: "13.0.0-canary.0";
1
+ declare const _default: "13.0.0-canary.2";
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 = '13.0.0-canary.0'; // PLEASE DONT UPDATE THIS!!! - will be updated at build time with the correct version
3
+ exports.default = '13.0.0-canary.2'; // PLEASE DONT UPDATE THIS!!! - will be updated at build time with the correct version