cx 26.3.3 → 26.3.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 (65) hide show
  1. package/build/charts/helpers/SnapPointFinder.d.ts +2 -2
  2. package/build/charts/helpers/SnapPointFinder.d.ts.map +1 -1
  3. package/build/charts/helpers/ValueAtFinder.d.ts +4 -4
  4. package/build/charts/helpers/ValueAtFinder.d.ts.map +1 -1
  5. package/build/charts/helpers/ValueAtFinder.js +5 -2
  6. package/build/data/createAccessorModelProxy.d.ts +11 -6
  7. package/build/data/createAccessorModelProxy.d.ts.map +1 -1
  8. package/build/data/createAccessorModelProxy.js +3 -1
  9. package/build/jsx-runtime.d.ts +1 -2
  10. package/build/jsx-runtime.d.ts.map +1 -1
  11. package/build/ui/createFunctionalComponent.d.ts +1 -4
  12. package/build/ui/createFunctionalComponent.d.ts.map +1 -1
  13. package/build/widgets/form/Calendar.d.ts +0 -1
  14. package/build/widgets/form/Calendar.d.ts.map +1 -1
  15. package/build/widgets/form/Calendar.js +22 -14
  16. package/build/widgets/form/TimeList.d.ts +1 -3
  17. package/build/widgets/form/TimeList.d.ts.map +1 -1
  18. package/build/widgets/index.d.ts +1 -3
  19. package/build/widgets/index.d.ts.map +1 -1
  20. package/build/widgets/index.js +1 -3
  21. package/build/widgets/overlay/Overlay.d.ts +1 -1
  22. package/build/widgets/overlay/Overlay.d.ts.map +1 -1
  23. package/build/widgets/overlay/Overlay.js +19 -10
  24. package/build/widgets/overlay/Window.d.ts.map +1 -1
  25. package/build/widgets/overlay/Window.js +11 -5
  26. package/dist/charts.css +256 -256
  27. package/dist/manifest.js +728 -737
  28. package/dist/widgets.css +6 -14
  29. package/dist/widgets.js +13 -26
  30. package/package.json +1 -1
  31. package/src/charts/BarGraph.scss +31 -31
  32. package/src/charts/Legend.scss +57 -57
  33. package/src/charts/LegendEntry.scss +35 -35
  34. package/src/charts/LineGraph.scss +28 -28
  35. package/src/charts/helpers/SnapPointFinder.ts +136 -136
  36. package/src/charts/helpers/ValueAtFinder.ts +72 -72
  37. package/src/charts/variables.scss +1 -2
  38. package/src/data/createAccessorModelProxy.ts +66 -66
  39. package/src/ui/DataProxy.ts +55 -55
  40. package/src/ui/Rescope.ts +50 -50
  41. package/src/ui/adapter/ArrayAdapter.ts +229 -229
  42. package/src/ui/exprHelpers.ts +96 -96
  43. package/src/util/scss/include.scss +40 -27
  44. package/src/widgets/Button.maps.scss +103 -103
  45. package/src/widgets/Sandbox.ts +104 -104
  46. package/src/widgets/drag-drop/variables.scss +1 -2
  47. package/src/widgets/form/Calendar.tsx +772 -772
  48. package/src/widgets/form/ColorField.scss +112 -117
  49. package/src/widgets/form/DateTimeField.scss +111 -125
  50. package/src/widgets/form/LookupField.scss +228 -251
  51. package/src/widgets/form/MonthField.scss +113 -122
  52. package/src/widgets/form/NumberField.scss +72 -80
  53. package/src/widgets/form/Select.scss +104 -117
  54. package/src/widgets/form/TextField.scss +66 -78
  55. package/src/widgets/form/variables.scss +110 -111
  56. package/src/widgets/grid/Grid.tsx +3885 -4428
  57. package/src/widgets/grid/variables.scss +47 -48
  58. package/src/widgets/index.ts +63 -63
  59. package/src/widgets/nav/Menu.variables.scss +1 -2
  60. package/src/widgets/nav/Tab.ts +6 -4
  61. package/src/widgets/nav/variables.scss +1 -2
  62. package/src/widgets/overlay/Overlay.tsx +1028 -1028
  63. package/src/widgets/overlay/Window.tsx +320 -320
  64. package/src/widgets/overlay/variables.scss +1 -2
  65. package/src/widgets/variables.scss +61 -62
@@ -1,320 +1,320 @@
1
- /** @jsxImportSource react */
2
- import { Widget, VDOM, getContent } from "../../ui/Widget";
3
- import {
4
- Overlay,
5
- OverlayBase,
6
- OverlayBeacon,
7
- OverlayComponent,
8
- OverlayComponentProps,
9
- OverlayComponentState,
10
- OverlayConfig,
11
- OverlayInstance,
12
- } from "./Overlay";
13
- import { ContentPlaceholder, ContentPlaceholderInstance } from "../../ui/layout/ContentPlaceholder";
14
- import { ZIndexManager } from "../../ui/ZIndexManager";
15
- import { Button } from "../Button";
16
- import { parseStyle } from "../../util/parseStyle";
17
- import { Localization } from "../../ui/Localization";
18
- import { stopPropagation } from "../../util/eventCallbacks";
19
- import { ddMouseDown, ddDetect, ddMouseUp } from "../drag-drop/ops";
20
- import { isDefined } from "../../util/isDefined";
21
- import { isString } from "../../util/isString";
22
- import { BooleanProp, StringProp, StyleProp, ClassProp } from "../../ui/Prop";
23
- import { RenderingContext } from "../../ui/RenderingContext";
24
-
25
- export interface WindowConfig extends OverlayConfig {
26
- /** Text to be displayed in the header. */
27
- title?: StringProp;
28
-
29
- /** Controls the close button visibility. Defaults to `true`. */
30
- closable?: BooleanProp;
31
-
32
- /** A custom style which will be applied to the body. */
33
- bodyStyle?: StyleProp;
34
-
35
- /** A custom style which will be applied to the header. */
36
- headerStyle?: StyleProp;
37
-
38
- /** A custom style which will be applied to the footer. */
39
- footerStyle?: StyleProp;
40
-
41
- /** Base CSS class to be applied to the field. Defaults to `window`. */
42
- baseClass?: string;
43
-
44
- /** Additional CSS class to be applied to the section body. */
45
- bodyClass?: ClassProp;
46
-
47
- /** Set to `true` to enable resizing. */
48
- resizable?: boolean;
49
-
50
- /** Set to `true` to automatically focus the field, after it renders for the first time. */
51
- autoFocus?: boolean;
52
-
53
- /** Set to `false` to prevent the window itself to be focusable. Default value is true.*/
54
- focusable?: boolean;
55
-
56
- /** Set to `true` to disable moving the window by dragging the header. */
57
- fixed?: boolean;
58
-
59
- /** Set to `true` to add default padding to the window body. */
60
- pad?: boolean;
61
-
62
- /** Optional header widget. */
63
- header?: any;
64
-
65
- /** Optional footer widget. */
66
- footer?: any;
67
-
68
- /** Custom event handler for closeable. */
69
- closeable?: BooleanProp;
70
- }
71
-
72
- export class WindowInstance extends OverlayInstance<Window> {
73
- headerEl?: HTMLElement;
74
- footerEl?: HTMLElement;
75
- bodyEl?: HTMLElement;
76
- containerEl?: HTMLElement;
77
- }
78
-
79
- export class Window extends OverlayBase<WindowConfig, WindowInstance> {
80
- declare closable?: BooleanProp;
81
- declare closeable?: BooleanProp;
82
- declare resizable?: boolean;
83
- declare fixed?: boolean;
84
- declare autoFocus?: boolean;
85
- declare focusable?: boolean;
86
- declare pad?: boolean;
87
- declare bodyStyle?: StyleProp;
88
- declare headerStyle?: StyleProp;
89
- declare footerStyle?: StyleProp;
90
- declare bodyClass?: ClassProp;
91
- declare title?: StringProp;
92
- declare header?: any;
93
- declare footer?: any;
94
- declare baseClass: string;
95
-
96
- init() {
97
- if (isDefined(this.closeable)) this.closable = this.closeable;
98
-
99
- if (isString(this.headerStyle)) this.headerStyle = parseStyle(this.headerStyle);
100
-
101
- if (isString(this.footerStyle)) this.footerStyle = parseStyle(this.footerStyle);
102
-
103
- if (isString(this.bodyStyle)) this.bodyStyle = parseStyle(this.bodyStyle);
104
-
105
- super.init();
106
- }
107
-
108
- declareData(...args: any) {
109
- return super.declareData(...args, {
110
- title: undefined,
111
- closable: undefined,
112
- bodyStyle: { structured: true },
113
- bodyClass: { structured: true },
114
- headerStyle: { structured: true },
115
- footerStyle: { structured: true },
116
- });
117
- }
118
-
119
- initHelpers(...args: any) {
120
- return super.initHelpers(...args, {
121
- header: Widget.create(
122
- this.header || {
123
- type: ContentPlaceholder,
124
- name: "header",
125
- scoped: true,
126
- },
127
- ),
128
- footer: Widget.create(
129
- this.footer || {
130
- type: ContentPlaceholder,
131
- name: "footer",
132
- scoped: true,
133
- },
134
- ),
135
- close:
136
- this.closable &&
137
- Button.create({
138
- mod: "hollow",
139
- dismiss: true,
140
- icon: "close",
141
- style: "margin-left: auto",
142
- onTouchStart: stopPropagation,
143
- onMouseDown: stopPropagation,
144
- }),
145
- });
146
- }
147
-
148
- exploreCleanup(context: RenderingContext, instance: WindowInstance): void {
149
- super.exploreCleanup(context, instance);
150
-
151
- let { helpers } = instance;
152
- let unregisterHeader =
153
- helpers!.header && (helpers!.header as ContentPlaceholderInstance).unregisterContentPlaceholder;
154
- if (unregisterHeader) unregisterHeader();
155
-
156
- let unregisterFooter =
157
- helpers!.footer && (helpers!.footer as ContentPlaceholderInstance).unregisterContentPlaceholder;
158
- if (unregisterFooter) unregisterFooter();
159
- }
160
-
161
- renderHeader(context: RenderingContext, instance: WindowInstance, key: string): any[] {
162
- let { data } = instance;
163
- let result = [];
164
- if (data.title) result.push(data.title);
165
- if (instance.helpers) {
166
- let header = getContent(instance.helpers.header && instance.helpers.header.render(context));
167
- if (header) result.push(header);
168
- if (data.closable && instance.helpers.close) result.push(getContent(instance.helpers.close.render(context)));
169
- }
170
- return result;
171
- }
172
-
173
- renderFooter(context: RenderingContext, instance: WindowInstance, key: string): any {
174
- return getContent(instance.helpers && instance.helpers.footer && instance.helpers.footer.render(context));
175
- }
176
-
177
- render(context: RenderingContext, instance: WindowInstance, key: string): any {
178
- var header = this.renderHeader(context, instance, "header");
179
- var footer = this.renderFooter(context, instance, "footer");
180
-
181
- return (
182
- <OverlayBeacon
183
- key={key}
184
- childrenFactory={(beaconEl) => (
185
- <WindowComponent
186
- beaconEl={beaconEl}
187
- instance={instance}
188
- header={header}
189
- footer={footer}
190
- subscribeToBeforeDismiss={context.options.subscribeToBeforeDismiss}
191
- parentEl={context.options.parentEl}
192
- >
193
- {this.renderContents(context, instance)}
194
- </WindowComponent>
195
- )}
196
- />
197
- );
198
- }
199
- }
200
-
201
- Window.prototype.baseClass = "window";
202
- Window.prototype.closable = true;
203
- Window.prototype.resizable = false;
204
- Window.prototype.fixed = false;
205
- Window.prototype.autoFocus = true;
206
- Window.prototype.focusable = true;
207
- Window.prototype.pad = true;
208
- Window.prototype.needsBeacon = true;
209
-
210
- Widget.alias("window", Window);
211
- Localization.registerPrototype("cx/widgets/Window", Window);
212
-
213
- interface WindowComponentProps extends OverlayComponentProps {
214
- header: any[];
215
- footer: any;
216
- instance: WindowInstance;
217
- }
218
-
219
- interface WindowComponentState extends OverlayComponentState {
220
- active?: boolean;
221
- }
222
-
223
- class WindowComponent extends OverlayComponent<WindowComponentProps, WindowComponentState> {
224
- headerEl?: HTMLElement | null;
225
- footerEl?: HTMLElement | null;
226
- bodyEl?: HTMLElement | null;
227
-
228
- renderOverlayBody() {
229
- var { widget, data } = this.props.instance;
230
- var { CSS, baseClass, pad } = widget;
231
-
232
- let header, footer;
233
-
234
- if (this.props.header.length > 0) {
235
- header = (
236
- <header
237
- key="header"
238
- ref={(c) => {
239
- this.headerEl = c;
240
- }}
241
- className={CSS.element(baseClass, "header")}
242
- style={data.headerStyle}
243
- onMouseDown={this.onHeaderMouseDown.bind(this)}
244
- onMouseUp={ddMouseUp}
245
- onMouseMove={this.onHeaderMouseMove.bind(this)}
246
- onTouchStart={this.onHeaderMouseDown.bind(this)}
247
- onTouchEnd={ddMouseUp}
248
- onTouchMove={this.onHeaderMouseMove.bind(this)}
249
- >
250
- {this.props.header}
251
- </header>
252
- );
253
- }
254
-
255
- if (this.props.footer) {
256
- footer = (
257
- <footer
258
- key="footer"
259
- ref={(c) => {
260
- this.footerEl = c;
261
- }}
262
- className={CSS.element(baseClass, "footer")}
263
- style={data.footerStyle}
264
- >
265
- {this.props.footer}
266
- </footer>
267
- );
268
- }
269
-
270
- var body = (
271
- <div
272
- key="body"
273
- ref={(c) => {
274
- this.bodyEl = c;
275
- }}
276
- className={CSS.expand(CSS.element(baseClass, "body", { pad }), data.bodyClass)}
277
- style={data.bodyStyle}
278
- >
279
- {this.props.children}
280
- </div>
281
- );
282
-
283
- return [header, body, footer];
284
- }
285
-
286
- getOverlayCssClass() {
287
- var cls = super.getOverlayCssClass();
288
- if (this.state.active) cls += " cxs-active";
289
- return cls;
290
- }
291
-
292
- onFocusIn() {
293
- super.onFocusIn();
294
- if (!this.state.active) {
295
- if (this.containerEl?.contains(document.activeElement)) this.setZIndex(ZIndexManager.next());
296
- this.setState({ active: true });
297
- }
298
- }
299
-
300
- onFocusOut() {
301
- super.onFocusOut();
302
- if (this.state.active) {
303
- this.setState({
304
- active: false,
305
- });
306
- }
307
- }
308
-
309
- onHeaderMouseDown(e: any) {
310
- e.stopPropagation();
311
- ddMouseDown(e);
312
- }
313
-
314
- onHeaderMouseMove(e: any) {
315
- e.stopPropagation();
316
- if (!(this.props.instance.widget as Window).fixed && ddDetect(e)) {
317
- this.startMoveOperation(e);
318
- }
319
- }
320
- }
1
+ /** @jsxImportSource react */
2
+ import { Widget, VDOM, getContent } from "../../ui/Widget";
3
+ import {
4
+ Overlay,
5
+ OverlayBase,
6
+ OverlayBeacon,
7
+ OverlayComponent,
8
+ OverlayComponentProps,
9
+ OverlayComponentState,
10
+ OverlayConfig,
11
+ OverlayInstance,
12
+ } from "./Overlay";
13
+ import { ContentPlaceholder, ContentPlaceholderInstance } from "../../ui/layout/ContentPlaceholder";
14
+ import { ZIndexManager } from "../../ui/ZIndexManager";
15
+ import { Button } from "../Button";
16
+ import { parseStyle } from "../../util/parseStyle";
17
+ import { Localization } from "../../ui/Localization";
18
+ import { stopPropagation } from "../../util/eventCallbacks";
19
+ import { ddMouseDown, ddDetect, ddMouseUp } from "../drag-drop/ops";
20
+ import { isDefined } from "../../util/isDefined";
21
+ import { isString } from "../../util/isString";
22
+ import { BooleanProp, StringProp, StyleProp, ClassProp } from "../../ui/Prop";
23
+ import { RenderingContext } from "../../ui/RenderingContext";
24
+
25
+ export interface WindowConfig extends OverlayConfig {
26
+ /** Text to be displayed in the header. */
27
+ title?: StringProp;
28
+
29
+ /** Controls the close button visibility. Defaults to `true`. */
30
+ closable?: BooleanProp;
31
+
32
+ /** A custom style which will be applied to the body. */
33
+ bodyStyle?: StyleProp;
34
+
35
+ /** A custom style which will be applied to the header. */
36
+ headerStyle?: StyleProp;
37
+
38
+ /** A custom style which will be applied to the footer. */
39
+ footerStyle?: StyleProp;
40
+
41
+ /** Base CSS class to be applied to the field. Defaults to `window`. */
42
+ baseClass?: string;
43
+
44
+ /** Additional CSS class to be applied to the section body. */
45
+ bodyClass?: ClassProp;
46
+
47
+ /** Set to `true` to enable resizing. */
48
+ resizable?: boolean;
49
+
50
+ /** Set to `true` to automatically focus the field, after it renders for the first time. */
51
+ autoFocus?: boolean;
52
+
53
+ /** Set to `false` to prevent the window itself to be focusable. Default value is true.*/
54
+ focusable?: boolean;
55
+
56
+ /** Set to `true` to disable moving the window by dragging the header. */
57
+ fixed?: boolean;
58
+
59
+ /** Set to `true` to add default padding to the window body. */
60
+ pad?: boolean;
61
+
62
+ /** Optional header widget. */
63
+ header?: any;
64
+
65
+ /** Optional footer widget. */
66
+ footer?: any;
67
+
68
+ /** Custom event handler for closeable. */
69
+ closeable?: BooleanProp;
70
+ }
71
+
72
+ export class WindowInstance extends OverlayInstance<Window> {
73
+ headerEl?: HTMLElement;
74
+ footerEl?: HTMLElement;
75
+ bodyEl?: HTMLElement;
76
+ containerEl?: HTMLElement;
77
+ }
78
+
79
+ export class Window extends OverlayBase<WindowConfig, WindowInstance> {
80
+ declare closable?: BooleanProp;
81
+ declare closeable?: BooleanProp;
82
+ declare resizable?: boolean;
83
+ declare fixed?: boolean;
84
+ declare autoFocus?: boolean;
85
+ declare focusable?: boolean;
86
+ declare pad?: boolean;
87
+ declare bodyStyle?: StyleProp;
88
+ declare headerStyle?: StyleProp;
89
+ declare footerStyle?: StyleProp;
90
+ declare bodyClass?: ClassProp;
91
+ declare title?: StringProp;
92
+ declare header?: any;
93
+ declare footer?: any;
94
+ declare baseClass: string;
95
+
96
+ init() {
97
+ if (isDefined(this.closeable)) this.closable = this.closeable;
98
+
99
+ if (isString(this.headerStyle)) this.headerStyle = parseStyle(this.headerStyle);
100
+
101
+ if (isString(this.footerStyle)) this.footerStyle = parseStyle(this.footerStyle);
102
+
103
+ if (isString(this.bodyStyle)) this.bodyStyle = parseStyle(this.bodyStyle);
104
+
105
+ super.init();
106
+ }
107
+
108
+ declareData(...args: any) {
109
+ return super.declareData(...args, {
110
+ title: undefined,
111
+ closable: undefined,
112
+ bodyStyle: { structured: true },
113
+ bodyClass: { structured: true },
114
+ headerStyle: { structured: true },
115
+ footerStyle: { structured: true },
116
+ });
117
+ }
118
+
119
+ initHelpers(...args: any) {
120
+ return super.initHelpers(...args, {
121
+ header: Widget.create(
122
+ this.header || {
123
+ type: ContentPlaceholder,
124
+ name: "header",
125
+ scoped: true,
126
+ },
127
+ ),
128
+ footer: Widget.create(
129
+ this.footer || {
130
+ type: ContentPlaceholder,
131
+ name: "footer",
132
+ scoped: true,
133
+ },
134
+ ),
135
+ close:
136
+ this.closable &&
137
+ Button.create({
138
+ mod: "hollow",
139
+ dismiss: true,
140
+ icon: "close",
141
+ style: "margin-left: auto",
142
+ onTouchStart: stopPropagation,
143
+ onMouseDown: stopPropagation,
144
+ }),
145
+ });
146
+ }
147
+
148
+ exploreCleanup(context: RenderingContext, instance: WindowInstance): void {
149
+ super.exploreCleanup(context, instance);
150
+
151
+ let { helpers } = instance;
152
+ let unregisterHeader =
153
+ helpers!.header && (helpers!.header as ContentPlaceholderInstance).unregisterContentPlaceholder;
154
+ if (unregisterHeader) unregisterHeader();
155
+
156
+ let unregisterFooter =
157
+ helpers!.footer && (helpers!.footer as ContentPlaceholderInstance).unregisterContentPlaceholder;
158
+ if (unregisterFooter) unregisterFooter();
159
+ }
160
+
161
+ renderHeader(context: RenderingContext, instance: WindowInstance, key: string): any[] {
162
+ let { data } = instance;
163
+ let result = [];
164
+ if (data.title) result.push(data.title);
165
+ if (instance.helpers) {
166
+ let header = getContent(instance.helpers.header && instance.helpers.header.render(context));
167
+ if (header) result.push(header);
168
+ if (data.closable && instance.helpers.close) result.push(getContent(instance.helpers.close.render(context)));
169
+ }
170
+ return result;
171
+ }
172
+
173
+ renderFooter(context: RenderingContext, instance: WindowInstance, key: string): any {
174
+ return getContent(instance.helpers && instance.helpers.footer && instance.helpers.footer.render(context));
175
+ }
176
+
177
+ render(context: RenderingContext, instance: WindowInstance, key: string): any {
178
+ var header = this.renderHeader(context, instance, "header");
179
+ var footer = this.renderFooter(context, instance, "footer");
180
+
181
+ return (
182
+ <OverlayBeacon
183
+ key={key}
184
+ childrenFactory={(beaconEl) => (
185
+ <WindowComponent
186
+ beaconEl={beaconEl}
187
+ instance={instance}
188
+ header={header}
189
+ footer={footer}
190
+ subscribeToBeforeDismiss={context.options.subscribeToBeforeDismiss}
191
+ parentEl={context.options.parentEl}
192
+ >
193
+ {this.renderContents(context, instance)}
194
+ </WindowComponent>
195
+ )}
196
+ />
197
+ );
198
+ }
199
+ }
200
+
201
+ Window.prototype.baseClass = "window";
202
+ Window.prototype.closable = true;
203
+ Window.prototype.resizable = false;
204
+ Window.prototype.fixed = false;
205
+ Window.prototype.autoFocus = true;
206
+ Window.prototype.focusable = true;
207
+ Window.prototype.pad = true;
208
+ Window.prototype.needsBeacon = true;
209
+
210
+ Widget.alias("window", Window);
211
+ Localization.registerPrototype("cx/widgets/Window", Window);
212
+
213
+ interface WindowComponentProps extends OverlayComponentProps {
214
+ header: any[];
215
+ footer: any;
216
+ instance: WindowInstance;
217
+ }
218
+
219
+ interface WindowComponentState extends OverlayComponentState {
220
+ active?: boolean;
221
+ }
222
+
223
+ class WindowComponent extends OverlayComponent<WindowComponentProps, WindowComponentState> {
224
+ headerEl?: HTMLElement | null;
225
+ footerEl?: HTMLElement | null;
226
+ bodyEl?: HTMLElement | null;
227
+
228
+ renderOverlayBody() {
229
+ var { widget, data } = this.props.instance;
230
+ var { CSS, baseClass, pad } = widget;
231
+
232
+ let header, footer;
233
+
234
+ if (this.props.header.length > 0) {
235
+ header = (
236
+ <header
237
+ key="header"
238
+ ref={(c) => {
239
+ this.headerEl = c;
240
+ }}
241
+ className={CSS.element(baseClass, "header")}
242
+ style={data.headerStyle}
243
+ onMouseDown={this.onHeaderMouseDown.bind(this)}
244
+ onMouseUp={ddMouseUp}
245
+ onMouseMove={this.onHeaderMouseMove.bind(this)}
246
+ onTouchStart={this.onHeaderMouseDown.bind(this)}
247
+ onTouchEnd={ddMouseUp}
248
+ onTouchMove={this.onHeaderMouseMove.bind(this)}
249
+ >
250
+ {this.props.header}
251
+ </header>
252
+ );
253
+ }
254
+
255
+ if (this.props.footer) {
256
+ footer = (
257
+ <footer
258
+ key="footer"
259
+ ref={(c) => {
260
+ this.footerEl = c;
261
+ }}
262
+ className={CSS.element(baseClass, "footer")}
263
+ style={data.footerStyle}
264
+ >
265
+ {this.props.footer}
266
+ </footer>
267
+ );
268
+ }
269
+
270
+ var body = (
271
+ <div
272
+ key="body"
273
+ ref={(c) => {
274
+ this.bodyEl = c;
275
+ }}
276
+ className={CSS.expand(CSS.element(baseClass, "body", { pad }), data.bodyClass)}
277
+ style={data.bodyStyle}
278
+ >
279
+ {this.props.children}
280
+ </div>
281
+ );
282
+
283
+ return [header, body, footer];
284
+ }
285
+
286
+ getOverlayCssClass() {
287
+ var cls = super.getOverlayCssClass();
288
+ if (this.state.active) cls += " cxs-active";
289
+ return cls;
290
+ }
291
+
292
+ onFocusIn() {
293
+ super.onFocusIn();
294
+ if (!this.state.active) {
295
+ if (this.containerEl?.contains(document.activeElement)) this.setZIndex(ZIndexManager.next());
296
+ this.setState({ active: true });
297
+ }
298
+ }
299
+
300
+ onFocusOut() {
301
+ super.onFocusOut();
302
+ if (this.state.active) {
303
+ this.setState({
304
+ active: false,
305
+ });
306
+ }
307
+ }
308
+
309
+ onHeaderMouseDown(e: any) {
310
+ e.stopPropagation();
311
+ ddMouseDown(e);
312
+ }
313
+
314
+ onHeaderMouseMove(e: any) {
315
+ e.stopPropagation();
316
+ if (!(this.props.instance.widget as Window).fixed && ddDetect(e)) {
317
+ this.startMoveOperation(e);
318
+ }
319
+ }
320
+ }
@@ -40,8 +40,7 @@ $cx-default-toast-padding: 10px !default;
40
40
  // WINDOW
41
41
  @forward "Window.variables";
42
42
 
43
- $cx-dependencies: map.merge(
44
- $cx-dependencies,
43
+ @include cx-register-dependencies(
45
44
  (
46
45
  "cx/widgets/Overlay": "cx/widgets/captureMouse",
47
46
  "cx/widgets/Dropdown": "cx/widgets/Overlay",