@adaptabletools/adaptable-cjs 23.0.2 → 23.0.3
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/AdaptableOptions/SettingsPanelOptions.d.ts +4 -4
- package/src/Utilities/Services/ThemeService.d.ts +1 -1
- package/src/Utilities/Services/ThemeService.js +2 -2
- package/src/View/Components/Popups/AdaptablePopup/AdaptablePopupDialog.js +2 -2
- package/src/agGrid/agGridDataTypeDefinitions.js +4 -0
- package/src/components/WindowModal/WindowModal.js +14 -1
- package/src/env.js +2 -2
- package/src/metamodel/adaptable.metamodel.d.ts +1198 -259
- package/src/metamodel/adaptable.metamodel.js +1 -1
- package/tsconfig.cjs.tsbuildinfo +1 -1
package/package.json
CHANGED
|
@@ -7,7 +7,7 @@ import { CustomRenderContext } from '../agGrid/AdaptableFrameworkComponent';
|
|
|
7
7
|
*/
|
|
8
8
|
export interface SettingsPanelOptions {
|
|
9
9
|
/**
|
|
10
|
-
* Title for
|
|
10
|
+
* Title for Settings Panel
|
|
11
11
|
*
|
|
12
12
|
* @defaultValue 'Settings Panel'
|
|
13
13
|
*/
|
|
@@ -45,7 +45,7 @@ export interface SettingsPanelOptions {
|
|
|
45
45
|
*/
|
|
46
46
|
navigation?: SettingsPanelNavigationConfigurer;
|
|
47
47
|
/**
|
|
48
|
-
* Initial position of Settings Panel window
|
|
48
|
+
* Initial position of Settings Panel — pixel offset of top-left corner from top-left of viewport (requires `popupType` to be `'window'`)
|
|
49
49
|
*
|
|
50
50
|
* @defaultValue Middle of Screen
|
|
51
51
|
*/
|
|
@@ -54,7 +54,7 @@ export interface SettingsPanelOptions {
|
|
|
54
54
|
y: number;
|
|
55
55
|
};
|
|
56
56
|
/**
|
|
57
|
-
* Initial size of Settings Panel
|
|
57
|
+
* Initial size (in pixels) of Settings Panel (requires `popupType` to be `'window'`)
|
|
58
58
|
*
|
|
59
59
|
* @defaultValue Computed based on size of screen
|
|
60
60
|
*/
|
|
@@ -63,7 +63,7 @@ export interface SettingsPanelOptions {
|
|
|
63
63
|
height: number;
|
|
64
64
|
};
|
|
65
65
|
/**
|
|
66
|
-
*
|
|
66
|
+
* How the Settings Panel is rendered: `'modal'` (centred and unmovable and resizable) or `'window'` (supports size, position, drag and resize)
|
|
67
67
|
*
|
|
68
68
|
* @defaultValue 'modal'
|
|
69
69
|
*/
|
|
@@ -7,7 +7,7 @@ export declare class ThemeService implements IThemeService {
|
|
|
7
7
|
constructor(api: AdaptableApi);
|
|
8
8
|
destroy(): void;
|
|
9
9
|
subscribe(): void;
|
|
10
|
-
|
|
10
|
+
onThemeSelected: () => void;
|
|
11
11
|
applyNewThemeVariables(theme: AdaptableTheme): void;
|
|
12
12
|
showMissingThemeFiles(theme: AdaptableTheme): void;
|
|
13
13
|
getDOMPrefferedColorScheme(): 'dark' | 'light';
|
|
@@ -23,14 +23,14 @@ class ThemeService {
|
|
|
23
23
|
document.adoptedStyleSheets = [...document.adoptedStyleSheets].filter((sheet) => sheet !== this.styleSheetObject);
|
|
24
24
|
}
|
|
25
25
|
subscribe() {
|
|
26
|
-
const themeChangedUnsubscribe = this.api.eventApi.on('ThemeSelected', this.
|
|
26
|
+
const themeChangedUnsubscribe = this.api.eventApi.on('ThemeSelected', this.onThemeSelected);
|
|
27
27
|
const prefferedColorSchemeUnsubscribe = this.attachPrefferedColorSchemeListener();
|
|
28
28
|
this.unsubscribe = () => {
|
|
29
29
|
themeChangedUnsubscribe();
|
|
30
30
|
prefferedColorSchemeUnsubscribe();
|
|
31
31
|
};
|
|
32
32
|
}
|
|
33
|
-
|
|
33
|
+
onThemeSelected = () => {
|
|
34
34
|
let currentTheme = this.api.themeApi.getCurrentThemeObject();
|
|
35
35
|
currentTheme = this.mapOsTheme(currentTheme);
|
|
36
36
|
this.applyNewThemeVariables(currentTheme);
|
|
@@ -11,7 +11,7 @@ const AdaptableContext_1 = require("../../../AdaptableContext");
|
|
|
11
11
|
const Utilities_1 = require("../Utilities");
|
|
12
12
|
const utils_1 = require("../../../../lib/utils");
|
|
13
13
|
const WindowDialog = (props) => {
|
|
14
|
-
const { onChange, style, baseClassName, className, isActionModule, settingsPanelOptionsKey, onHide, ...dialogProps } = props;
|
|
14
|
+
const { onChange, style, baseClassName, className, isActionModule, settingsPanelOptionsKey, onHide, dataName, ...dialogProps } = props;
|
|
15
15
|
const adaptable = (0, AdaptableContext_1.useAdaptable)();
|
|
16
16
|
const dispatch = (0, react_redux_1.useDispatch)();
|
|
17
17
|
const settingsPanelOptions = adaptable.adaptableOptions.settingsPanelOptions;
|
|
@@ -38,7 +38,7 @@ const WindowDialog = (props) => {
|
|
|
38
38
|
position: popupSettings.position,
|
|
39
39
|
onChange: handleWindowSettings,
|
|
40
40
|
};
|
|
41
|
-
return ((0, jsx_runtime_1.jsx)(Dialog_1.default, { windowModal: true, fixed: false, windowModalProps: windowModalProps, style: props.style, onDismiss: onHide, isOpen: true, showCloseButton: true, ...dialogProps, className: (0, utils_1.cn)('twa:p-0 twa:h-full', className) }));
|
|
41
|
+
return ((0, jsx_runtime_1.jsx)(Dialog_1.default, { "data-name": dataName, windowModal: true, fixed: false, windowModalProps: windowModalProps, style: props.style, onDismiss: onHide, isOpen: true, showCloseButton: true, ...dialogProps, className: (0, utils_1.cn)('twa:p-0 twa:h-full', className) }));
|
|
42
42
|
};
|
|
43
43
|
const PopupDialog = (props) => {
|
|
44
44
|
const { style, className, onHide, children, ...dialogProps } = props;
|
|
@@ -38,6 +38,10 @@ exports.agGridDataTypeDefinitions = {
|
|
|
38
38
|
// boolean: is kept as is
|
|
39
39
|
// object: is kept as is
|
|
40
40
|
// Adaptable specific types
|
|
41
|
+
unknown: {
|
|
42
|
+
baseDataType: 'text',
|
|
43
|
+
extendsDataType: 'text',
|
|
44
|
+
},
|
|
41
45
|
[exports.TEXT_ARRAY_DATA_TYPE]: {
|
|
42
46
|
baseDataType: 'text',
|
|
43
47
|
extendsDataType: 'text',
|
|
@@ -104,9 +104,22 @@ const WindowModal = (props) => {
|
|
|
104
104
|
}
|
|
105
105
|
}, []);
|
|
106
106
|
const ResizableCmp = re_resizable_1.Resizable;
|
|
107
|
+
// React propagates events through the component tree, not the DOM tree. A
|
|
108
|
+
// nested popup (e.g. a modal wizard) rendered as a React child of this window
|
|
109
|
+
// is portaled elsewhere in the DOM, so a mousedown inside it would bubble here
|
|
110
|
+
// and incorrectly bring this window to the front (covering the popup). Guard
|
|
111
|
+
// against this by only reacting to mousedowns that happen inside this window's
|
|
112
|
+
// own DOM subtree.
|
|
113
|
+
const handleMouseDown = (event) => {
|
|
114
|
+
const node = targetRef.current;
|
|
115
|
+
if (node && event.target instanceof Node && !node.contains(event.target)) {
|
|
116
|
+
return;
|
|
117
|
+
}
|
|
118
|
+
stacking.bringInFront();
|
|
119
|
+
};
|
|
107
120
|
return (0, react_dom_1.createPortal)((0, jsx_runtime_1.jsx)("div", { style: style,
|
|
108
121
|
//@ts-ignore
|
|
109
|
-
ref: targetRef, onMouseDown:
|
|
122
|
+
ref: targetRef, onMouseDown: handleMouseDown, children: (0, jsx_runtime_1.jsx)(ResizableCmp, { minWidth: props.minWidth, minHeight: props.minHeight, onResizeStop: handleResizeStop, onResize: handleResize, bounds: "window", defaultSize: {
|
|
110
123
|
width: props.size.width,
|
|
111
124
|
height: props.size.height,
|
|
112
125
|
}, children: props.children }) }), portalElement);
|
package/src/env.js
CHANGED
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.default = {
|
|
4
4
|
NEXT_PUBLIC_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: "23.0.
|
|
5
|
+
PUBLISH_TIMESTAMP: 1782392473893 || Date.now(),
|
|
6
|
+
VERSION: "23.0.3" || '--current-version--',
|
|
7
7
|
};
|