@adaptabletools/adaptable-cjs 18.0.4 → 18.0.6
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.
- package/package.json +1 -1
- package/src/Utilities/ExpressionFunctions/aggregatedScalarExpressionFunctions.js +2 -0
- package/src/View/Components/AdaptableDateInput/index.d.ts +1 -1
- package/src/View/Components/AdaptableInput/AdaptableDateInlineInput.d.ts +1 -1
- package/src/View/Components/ColumnSelector/index.d.ts +1 -6
- package/src/View/Components/ColumnSelector/index.js +2 -4
- package/src/View/Components/EntityRulesEditor/index.js +1 -3
- package/src/View/Components/ValueSelector/index.d.ts +0 -5
- package/src/View/Components/ValueSelector/index.js +1 -4
- package/src/View/DataChangeHistory/DataChangeHistoryGrid.js +4 -2
- package/src/View/Layout/TransposedPopup.js +30 -20
- package/src/agGrid/AdaptableAgGrid.js +2 -4
- package/src/components/ColorPicker/ColorPicker.d.ts +1 -1
- package/src/components/Datepicker/index.d.ts +1 -1
- package/src/components/FieldWrap/index.d.ts +1 -7
- package/src/components/FieldWrap/index.js +5 -4
- package/src/components/FileDroppable/index.d.ts +1 -4
- package/src/components/FileDroppable/index.js +1 -2
- package/src/components/Input/index.d.ts +1 -1
- package/src/components/List/ListGroupItem/index.d.ts +1 -1
- package/src/components/OverlayTrigger/index.js +10 -9
- package/src/components/ResizeObserver/index.d.ts +1 -7
- package/src/components/ResizeObserver/index.js +2 -6
- package/src/components/SimpleButton/index.js +10 -9
- package/src/components/Tabs/index.d.ts +6 -24
- package/src/components/Tabs/index.js +7 -11
- package/src/env.js +2 -2
- package/src/renderReactRoot.js +10 -8
- package/tsconfig.cjs.tsbuildinfo +1 -1
|
@@ -8,5 +8,5 @@ type TypeProps = HTMLProps<HTMLElement> & {
|
|
|
8
8
|
index?: number;
|
|
9
9
|
selectionId?: string | number;
|
|
10
10
|
};
|
|
11
|
-
declare const ListGroupItem: React.ForwardRefExoticComponent<Pick<TypeProps, "children" | "size" | "name" | "tabIndex" | "color" | "style" | "cite" | "data" | "form" | "label" | "slot" | "span" | "summary" | "title" | "pattern" | "start" | "hidden" | "content" | "default" | "wrap" | "open" | "multiple" | "active" | "disabled" | "checked" | "download" | "list" | "target" | "rows" | "src" | "className" | "onTransitionEnd" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "id" | "lang" | "placeholder" | "spellCheck" | "translate" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "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" | "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" | "onTransitionEndCapture" | "value" | "
|
|
11
|
+
declare const ListGroupItem: React.ForwardRefExoticComponent<Pick<TypeProps, "children" | "size" | "name" | "tabIndex" | "color" | "style" | "cite" | "data" | "form" | "label" | "slot" | "span" | "summary" | "title" | "pattern" | "start" | "hidden" | "content" | "default" | "wrap" | "open" | "multiple" | "active" | "disabled" | "checked" | "download" | "list" | "target" | "rows" | "src" | "className" | "onTransitionEnd" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "id" | "lang" | "placeholder" | "spellCheck" | "translate" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "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" | "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" | "onTransitionEndCapture" | "value" | "step" | "sizes" | "as" | "key" | "width" | "height" | "accept" | "acceptCharset" | "action" | "allowFullScreen" | "allowTransparency" | "alt" | "async" | "autoComplete" | "autoFocus" | "autoPlay" | "capture" | "cellPadding" | "cellSpacing" | "charSet" | "challenge" | "classID" | "cols" | "colSpan" | "controls" | "coords" | "crossOrigin" | "dateTime" | "defer" | "encType" | "formAction" | "formEncType" | "formMethod" | "formNoValidate" | "formTarget" | "frameBorder" | "headers" | "high" | "href" | "hrefLang" | "htmlFor" | "httpEquiv" | "integrity" | "keyParams" | "keyType" | "kind" | "loop" | "low" | "manifest" | "marginHeight" | "marginWidth" | "max" | "maxLength" | "media" | "mediaGroup" | "method" | "min" | "minLength" | "muted" | "nonce" | "noValidate" | "optimum" | "playsInline" | "poster" | "preload" | "readOnly" | "rel" | "required" | "reversed" | "rowSpan" | "sandbox" | "scope" | "scoped" | "scrolling" | "seamless" | "selected" | "shape" | "srcDoc" | "srcLang" | "srcSet" | "type" | "useMap" | "wmode" | "index" | "factory" | "noZebra" | "selectionId"> & React.RefAttributes<unknown>>;
|
|
12
12
|
export default ListGroupItem;
|
|
@@ -51,7 +51,16 @@ const ensurePortalElement = () => {
|
|
|
51
51
|
portalElement.style.left = '0px';
|
|
52
52
|
document.body.appendChild(portalElement);
|
|
53
53
|
};
|
|
54
|
-
const
|
|
54
|
+
const defaultProps = {
|
|
55
|
+
showEvent: 'mouseenter',
|
|
56
|
+
hideEvent: 'mouseleave',
|
|
57
|
+
anchor: 'vertical',
|
|
58
|
+
targetOffset: 10,
|
|
59
|
+
defaultZIndex: 1000000,
|
|
60
|
+
opacityTransitionDuration: '250ms',
|
|
61
|
+
};
|
|
62
|
+
const OverlayTrigger = React.forwardRef((givenProps, ref) => {
|
|
63
|
+
const props = Object.assign(Object.assign({}, defaultProps), givenProps);
|
|
55
64
|
const adaptable = (0, AdaptableContext_1.useAdaptable)();
|
|
56
65
|
let { visible: _, showTriangle, showEvent, hideEvent, render, targetOffset, preventPortalEventPropagation = false, defaultZIndex, anchor, hideDelay = 0, opacityTransitionDuration, onVisibleChange, alignPosition = [
|
|
57
66
|
// overlay - target
|
|
@@ -209,12 +218,4 @@ const OverlayTrigger = React.forwardRef((props, ref) => {
|
|
|
209
218
|
} }),
|
|
210
219
|
portal));
|
|
211
220
|
});
|
|
212
|
-
OverlayTrigger.defaultProps = {
|
|
213
|
-
showEvent: 'mouseenter',
|
|
214
|
-
hideEvent: 'mouseleave',
|
|
215
|
-
anchor: 'vertical',
|
|
216
|
-
targetOffset: 10,
|
|
217
|
-
defaultZIndex: 1000000,
|
|
218
|
-
opacityTransitionDuration: '250ms',
|
|
219
|
-
};
|
|
220
221
|
exports.default = OverlayTrigger;
|
|
@@ -27,11 +27,5 @@ export declare const setupResizeObserver: (node: HTMLElement, callback: OnResize
|
|
|
27
27
|
export declare const useResizeObserver: (ref: React.MutableRefObject<HTMLElement | null>, callback: OnResizeFn, config?: {
|
|
28
28
|
earlyAttach: boolean;
|
|
29
29
|
}) => void;
|
|
30
|
-
export declare const ReactResizeObserver: {
|
|
31
|
-
(props: ResizeObserverProps): JSX.Element;
|
|
32
|
-
defaultProps: {
|
|
33
|
-
notifyOnMount: boolean;
|
|
34
|
-
earlyAttach: boolean;
|
|
35
|
-
};
|
|
36
|
-
};
|
|
30
|
+
export declare const ReactResizeObserver: ({ notifyOnMount, earlyAttach, ...props }: ResizeObserverProps) => JSX.Element;
|
|
37
31
|
export {};
|
|
@@ -78,7 +78,8 @@ const useResizeObserver = (ref, callback, config = { earlyAttach: false }) => {
|
|
|
78
78
|
}, [ref.current, callback, config.earlyAttach]);
|
|
79
79
|
};
|
|
80
80
|
exports.useResizeObserver = useResizeObserver;
|
|
81
|
-
const ReactResizeObserver = (
|
|
81
|
+
const ReactResizeObserver = (_a) => {
|
|
82
|
+
var { notifyOnMount = true, earlyAttach = false } = _a, props = tslib_1.__rest(_a, ["notifyOnMount", "earlyAttach"]);
|
|
82
83
|
const style = (0, react_1.useMemo)(() => ({
|
|
83
84
|
position: 'absolute',
|
|
84
85
|
top: 0,
|
|
@@ -87,7 +88,6 @@ const ReactResizeObserver = (props) => {
|
|
|
87
88
|
height: '100%',
|
|
88
89
|
boxSizing: 'border-box',
|
|
89
90
|
}), []);
|
|
90
|
-
const { notifyOnMount, earlyAttach } = props;
|
|
91
91
|
const firstTime = (0, react_1.useRef)(true);
|
|
92
92
|
const ref = (0, react_1.useRef)(null);
|
|
93
93
|
const onResize = (0, react_1.useCallback)((size) => {
|
|
@@ -101,7 +101,3 @@ const ReactResizeObserver = (props) => {
|
|
|
101
101
|
return React.createElement("div", { ref: ref, style: style });
|
|
102
102
|
};
|
|
103
103
|
exports.ReactResizeObserver = ReactResizeObserver;
|
|
104
|
-
exports.ReactResizeObserver.defaultProps = {
|
|
105
|
-
notifyOnMount: true,
|
|
106
|
-
earlyAttach: false,
|
|
107
|
-
};
|
|
@@ -10,8 +10,17 @@ const Tooltip_1 = tslib_1.__importDefault(require("../Tooltip"));
|
|
|
10
10
|
const theme_1 = tslib_1.__importDefault(require("../../theme"));
|
|
11
11
|
const Icon_1 = require("../Icon");
|
|
12
12
|
exports.baseClassName = 'ab-SimpleButton';
|
|
13
|
-
const
|
|
13
|
+
const defaultProps = {
|
|
14
|
+
px: null,
|
|
15
|
+
py: null,
|
|
16
|
+
fontWeight: 'normal',
|
|
17
|
+
m: null,
|
|
18
|
+
//@ts-ignore
|
|
19
|
+
borderRadius: null,
|
|
20
|
+
};
|
|
21
|
+
const SimpleButton = React.forwardRef((givenProps, theRef) => {
|
|
14
22
|
var _a, _b;
|
|
23
|
+
const props = Object.assign(Object.assign({}, defaultProps), givenProps);
|
|
15
24
|
let { children, disabled, variant = 'outlined', tone = 'neutral', iconPosition = 'start', iconSize, className, icon, tooltip, accessLevel: accessLevel, type } = props, buttonProps = tslib_1.__rest(props, ["children", "disabled", "variant", "tone", "iconPosition", "iconSize", "className", "icon", "tooltip", "accessLevel", "type"]);
|
|
16
25
|
let adaptableSystemIcon;
|
|
17
26
|
if ((0, Icon_1.isAdaptableSystemIcon)(icon)) {
|
|
@@ -79,12 +88,4 @@ const SimpleButton = React.forwardRef((props, theRef) => {
|
|
|
79
88
|
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
89
|
return tooltip ? React.createElement(Tooltip_1.default, { label: tooltip }, btn) : btn;
|
|
81
90
|
});
|
|
82
|
-
SimpleButton.defaultProps = {
|
|
83
|
-
px: null,
|
|
84
|
-
py: null,
|
|
85
|
-
fontWeight: 'normal',
|
|
86
|
-
m: null,
|
|
87
|
-
//@ts-ignore
|
|
88
|
-
borderRadius: null,
|
|
89
|
-
};
|
|
90
91
|
exports.default = SimpleButton;
|
|
@@ -12,36 +12,18 @@ export type TabsProps<VALUE_TYPE> = HTMLProps<HTMLElement> & {
|
|
|
12
12
|
} & BoxProps;
|
|
13
13
|
export declare const Tabs: {
|
|
14
14
|
<VALUE_TYPE extends string | number>(props: TabsProps<VALUE_TYPE>): JSX.Element;
|
|
15
|
-
Tab:
|
|
16
|
-
|
|
17
|
-
defaultProps: {
|
|
18
|
-
isTabsTab: boolean;
|
|
19
|
-
};
|
|
20
|
-
};
|
|
21
|
-
Content: {
|
|
22
|
-
(props: ContentProps): JSX.Element;
|
|
23
|
-
defaultProps: {
|
|
24
|
-
isTabsContent: boolean;
|
|
25
|
-
};
|
|
26
|
-
};
|
|
15
|
+
Tab: (props: TabProps) => JSX.Element;
|
|
16
|
+
Content: (props: ContentProps) => JSX.Element;
|
|
27
17
|
};
|
|
28
18
|
type TabProps = {
|
|
29
19
|
index?: number;
|
|
30
20
|
keyboardNavigation?: boolean;
|
|
31
21
|
} & BoxProps & HTMLProps<HTMLDivElement>;
|
|
32
|
-
export declare const Tab:
|
|
33
|
-
|
|
34
|
-
defaultProps: {
|
|
35
|
-
isTabsTab: boolean;
|
|
36
|
-
};
|
|
37
|
-
};
|
|
22
|
+
export declare const Tab: (props: TabProps) => JSX.Element;
|
|
23
|
+
export declare const SupportedTabMenuComps: Set<unknown>;
|
|
38
24
|
type ContentProps = {
|
|
39
25
|
value?: string | number;
|
|
40
26
|
} & BoxProps;
|
|
41
|
-
export declare const Content:
|
|
42
|
-
|
|
43
|
-
defaultProps: {
|
|
44
|
-
isTabsContent: boolean;
|
|
45
|
-
};
|
|
46
|
-
};
|
|
27
|
+
export declare const Content: (props: ContentProps) => JSX.Element;
|
|
28
|
+
export declare const SupportedTabContentComps: Set<unknown>;
|
|
47
29
|
export {};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.Content = exports.Tab = exports.Tabs = void 0;
|
|
3
|
+
exports.SupportedTabContentComps = exports.Content = exports.SupportedTabMenuComps = exports.Tab = exports.Tabs = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
const React = tslib_1.__importStar(require("react"));
|
|
6
6
|
const rebass_1 = require("rebass");
|
|
@@ -13,12 +13,10 @@ const TabContext = React.createContext({
|
|
|
13
13
|
setSelectedIndex: (index) => { },
|
|
14
14
|
});
|
|
15
15
|
const isTab = (c) => {
|
|
16
|
-
|
|
17
|
-
return c.type === exports.Tab || ((_a = c.props) === null || _a === void 0 ? void 0 : _a.isTabsTab);
|
|
16
|
+
return c.type === exports.Tab || exports.SupportedTabMenuComps.has(c.type);
|
|
18
17
|
};
|
|
19
18
|
const isTabContent = (c) => {
|
|
20
|
-
|
|
21
|
-
return c.type === exports.Content || ((_a = c.props) === null || _a === void 0 ? void 0 : _a.isTabsContent);
|
|
19
|
+
return c.type === exports.Content || exports.SupportedTabContentComps.has(c.type);
|
|
22
20
|
};
|
|
23
21
|
const Tabs = (props) => {
|
|
24
22
|
const { autoFocus = true, children, onValueChange: _onValueChange, defaultValue: _defaultValue, value: _value, keyboardNavigation = true, selectedIndex: _selectedIndex, defaultSelectedIndex: _defaultSelectedIndex, onSelectedIndexChange: _onSelectedIndexChange } = props, boxProps = tslib_1.__rest(props, ["autoFocus", "children", "onValueChange", "defaultValue", "value", "keyboardNavigation", "selectedIndex", "defaultSelectedIndex", "onSelectedIndexChange"]);
|
|
@@ -121,15 +119,13 @@ const Tab = (props) => {
|
|
|
121
119
|
} })));
|
|
122
120
|
};
|
|
123
121
|
exports.Tab = Tab;
|
|
124
|
-
exports.
|
|
125
|
-
|
|
126
|
-
};
|
|
122
|
+
exports.SupportedTabMenuComps = new Set();
|
|
123
|
+
exports.SupportedTabMenuComps.add(exports.Tab);
|
|
127
124
|
const Content = (props) => {
|
|
128
125
|
return React.createElement(React.Fragment, null, props.children);
|
|
129
126
|
};
|
|
130
127
|
exports.Content = Content;
|
|
131
|
-
exports.
|
|
132
|
-
|
|
133
|
-
};
|
|
128
|
+
exports.SupportedTabContentComps = new Set();
|
|
129
|
+
exports.SupportedTabContentComps.add(exports.Content);
|
|
134
130
|
exports.Tabs.Tab = exports.Tab;
|
|
135
131
|
exports.Tabs.Content = exports.Content;
|
package/src/env.js
CHANGED
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.default = {
|
|
4
4
|
INFINITE_TABLE_LICENSE_KEY: "StartDate=2021-06-29|EndDate=2030-01-01|Owner=Adaptable|Type=distribution|TS=1624971462479|C=137829811,1004007071,2756196225,1839832928,3994409405,636616862" || '',
|
|
5
|
-
PUBLISH_TIMESTAMP:
|
|
6
|
-
VERSION: "18.0.
|
|
5
|
+
PUBLISH_TIMESTAMP: 1714400935973 || Date.now(),
|
|
6
|
+
VERSION: "18.0.6" || '--current-version--',
|
|
7
7
|
};
|
package/src/renderReactRoot.js
CHANGED
|
@@ -3,16 +3,17 @@ 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
|
+
// we need to keep track of the roots to ensure we create a single root per container
|
|
7
|
+
// otherwise we get: "You are calling ReactDOMClient.createRoot() on a container that has already been passed to createRoot() before. Instead, call root.render() on the existing root instead if you want to update it."
|
|
6
8
|
const renderWeakMap = new WeakMap();
|
|
7
9
|
const renderReactRoot = (el, container) => {
|
|
8
10
|
// Keeping a reference to previous roots causes an error.
|
|
9
|
-
// Already (correctly)
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
//
|
|
15
|
-
const root = ReactDOMClient.createRoot(container);
|
|
11
|
+
// Already (correctly) unmounted elements are not unmounted again, and triggers an error.
|
|
12
|
+
let root = renderWeakMap.get(container);
|
|
13
|
+
if (!root) {
|
|
14
|
+
renderWeakMap.set(container, (root = ReactDOMClient.createRoot(container)));
|
|
15
|
+
}
|
|
16
|
+
// const root = ReactDOMClient.createRoot(container);
|
|
16
17
|
root.render(el);
|
|
17
18
|
return () => {
|
|
18
19
|
// requestAnimationFrame(() => {
|
|
@@ -20,9 +21,10 @@ const renderReactRoot = (el, container) => {
|
|
|
20
21
|
// // 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.
|
|
21
22
|
// // https:stackoverflow.com/questions/73459382/react-18-async-way-to-unmount-root
|
|
22
23
|
// });
|
|
23
|
-
// This needs to be
|
|
24
|
+
// This needs to be synchronous, if not, in a raf it may be to late, the element may be gone.
|
|
24
25
|
// To reproduce, move this in RAF and play with filters.
|
|
25
26
|
root.unmount();
|
|
27
|
+
renderWeakMap.delete(container);
|
|
26
28
|
};
|
|
27
29
|
};
|
|
28
30
|
exports.renderReactRoot = renderReactRoot;
|