cx 26.2.2 → 26.2.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/build/charts/Chart.d.ts.map +1 -1
- package/build/charts/Chart.js +5 -4
- package/build/charts/ColumnBarBase.d.ts +3 -3
- package/build/charts/ColumnBarBase.d.ts.map +1 -1
- package/build/charts/ColumnBarBase.js +1 -1
- package/build/charts/Legend.d.ts.map +1 -1
- package/build/charts/Legend.js +11 -4
- package/build/charts/Marker.d.ts +3 -3
- package/build/charts/Marker.d.ts.map +1 -1
- package/build/charts/MarkerLine.d.ts +7 -7
- package/build/charts/MarkerLine.d.ts.map +1 -1
- package/build/charts/MarkerLine.js +14 -10
- package/build/charts/PieChart.d.ts +4 -4
- package/build/charts/PieChart.d.ts.map +1 -1
- package/build/charts/PieChart.js +36 -14
- package/build/charts/PieLabel.d.ts.map +1 -1
- package/build/charts/PieLabel.js +2 -1
- package/build/charts/RangeMarker.d.ts +3 -3
- package/build/charts/RangeMarker.d.ts.map +1 -1
- package/build/charts/RangeMarker.js +1 -1
- package/build/charts/axis/TimeAxis.d.ts +3 -3
- package/build/charts/axis/TimeAxis.d.ts.map +1 -1
- package/build/charts/axis/TimeAxis.js +70 -21
- package/build/charts/helpers/ValueAtFinder.d.ts +1 -1
- package/build/charts/helpers/ValueAtFinder.d.ts.map +1 -1
- package/build/charts/helpers/ValueAtFinder.js +5 -2
- package/build/data/StructuredSelector.js +3 -4
- package/build/data/createAccessorModelProxy.d.ts +6 -11
- package/build/data/createAccessorModelProxy.d.ts.map +1 -1
- package/build/data/createAccessorModelProxy.js +1 -3
- package/build/svg/Ellipse.d.ts +5 -4
- package/build/svg/Ellipse.d.ts.map +1 -1
- package/build/svg/Ellipse.js +9 -6
- package/build/svg/Line.d.ts +1 -0
- package/build/svg/Line.d.ts.map +1 -1
- package/build/svg/Line.js +4 -1
- package/build/svg/Text.d.ts +12 -6
- package/build/svg/Text.d.ts.map +1 -1
- package/build/svg/Text.js +12 -4
- package/build/ui/Controller.d.ts +2 -0
- package/build/ui/Controller.d.ts.map +1 -1
- package/build/ui/Controller.js +3 -0
- package/build/ui/HoverSync.d.ts.map +1 -1
- package/build/ui/HoverSync.js +7 -2
- package/build/ui/Prop.d.ts +1 -1
- package/build/ui/Prop.d.ts.map +1 -1
- package/build/ui/Text.d.ts +3 -3
- package/build/ui/Text.d.ts.map +1 -1
- package/build/ui/Text.js +5 -5
- package/build/ui/adapter/GroupAdapter.d.ts.map +1 -1
- package/build/ui/adapter/GroupAdapter.js +20 -10
- package/build/ui/app/History.js +1 -1
- package/build/widgets/List.d.ts.map +1 -1
- package/build/widgets/List.js +6 -7
- package/build/widgets/drag-drop/DropZone.d.ts +3 -3
- package/build/widgets/drag-drop/DropZone.d.ts.map +1 -1
- package/build/widgets/form/Calendar.d.ts.map +1 -1
- package/build/widgets/form/Calendar.js +30 -11
- package/build/widgets/form/ColorField.d.ts.map +1 -1
- package/build/widgets/form/ColorField.js +16 -7
- package/build/widgets/form/DateTimeField.d.ts.map +1 -1
- package/build/widgets/form/DateTimeField.js +23 -10
- package/build/widgets/form/Field.d.ts +2 -0
- package/build/widgets/form/Field.d.ts.map +1 -1
- package/build/widgets/form/Field.js +11 -5
- package/build/widgets/form/LookupField.d.ts +1 -1
- package/build/widgets/form/LookupField.d.ts.map +1 -1
- package/build/widgets/form/LookupField.js +6 -6
- package/build/widgets/form/MonthField.d.ts.map +1 -1
- package/build/widgets/form/MonthField.js +15 -7
- package/build/widgets/form/MonthPicker.d.ts +1 -2
- package/build/widgets/form/MonthPicker.d.ts.map +1 -1
- package/build/widgets/form/MonthPicker.js +84 -41
- package/build/widgets/form/NumberField.d.ts +2 -0
- package/build/widgets/form/NumberField.d.ts.map +1 -1
- package/build/widgets/form/NumberField.js +45 -15
- package/build/widgets/form/TextField.d.ts +1 -9
- package/build/widgets/form/TextField.d.ts.map +1 -1
- package/build/widgets/form/TextField.js +1 -1
- package/build/widgets/grid/Grid.d.ts +2 -2
- package/build/widgets/grid/Grid.d.ts.map +1 -1
- package/build/widgets/grid/Grid.js +14 -11
- package/build/widgets/grid/Pagination.d.ts.map +1 -1
- package/build/widgets/grid/Pagination.js +4 -4
- package/build/widgets/grid/TreeNode.d.ts.map +1 -1
- package/build/widgets/grid/TreeNode.js +10 -2
- package/build/widgets/icons/folder.d.ts.map +1 -1
- package/build/widgets/icons/folder.js +1 -0
- package/build/widgets/icons/forward.d.ts.map +1 -1
- package/build/widgets/icons/forward.js +4 -3
- package/build/widgets/icons/loading.d.ts.map +1 -1
- package/build/widgets/icons/loading.js +6 -5
- package/build/widgets/icons/square.d.ts.map +1 -1
- package/build/widgets/icons/square.js +3 -3
- package/build/widgets/index.d.ts +3 -1
- package/build/widgets/index.d.ts.map +1 -1
- package/build/widgets/index.js +3 -1
- package/build/widgets/overlay/ContextMenu.d.ts.map +1 -1
- package/build/widgets/overlay/ContextMenu.js +2 -0
- package/build/widgets/overlay/Dropdown.d.ts +2 -1
- package/build/widgets/overlay/Dropdown.d.ts.map +1 -1
- package/build/widgets/overlay/Dropdown.js +75 -20
- package/build/widgets/overlay/MsgBox.d.ts +1 -0
- package/build/widgets/overlay/MsgBox.d.ts.map +1 -1
- package/build/widgets/overlay/MsgBox.js +2 -2
- package/build/widgets/overlay/Overlay.d.ts +32 -2
- package/build/widgets/overlay/Overlay.d.ts.map +1 -1
- package/build/widgets/overlay/Overlay.js +47 -16
- package/build/widgets/overlay/Toast.d.ts +1 -1
- package/build/widgets/overlay/Toast.d.ts.map +1 -1
- package/build/widgets/overlay/Toast.js +4 -1
- package/build/widgets/overlay/Tooltip.d.ts +6 -0
- package/build/widgets/overlay/Tooltip.d.ts.map +1 -1
- package/build/widgets/overlay/Tooltip.js +24 -9
- package/build/widgets/overlay/Window.d.ts.map +1 -1
- package/build/widgets/overlay/Window.js +24 -9
- package/dist/charts.css +325 -272
- package/dist/charts.js +11 -5
- package/dist/data.js +2 -2
- package/dist/manifest.js +821 -809
- package/dist/svg.css +14 -8
- package/dist/svg.js +9 -1
- package/dist/ui.js +29 -16
- package/dist/widgets.css +997 -294
- package/dist/widgets.js +319 -126
- package/package.json +1 -1
- package/src/charts/Bar.scss +13 -10
- package/src/charts/BarGraph.scss +31 -29
- package/src/charts/BubbleGraph.scss +11 -8
- package/src/charts/Chart.ts +5 -3
- package/src/charts/Column.scss +13 -10
- package/src/charts/ColumnBarBase.tsx +255 -230
- package/src/charts/ColumnGraph.scss +13 -11
- package/src/charts/Gridlines.scss +10 -8
- package/src/charts/Legend.scss +57 -50
- package/src/charts/Legend.tsx +257 -213
- package/src/charts/LegendEntry.scss +35 -29
- package/src/charts/LineGraph.scss +28 -25
- package/src/charts/Marker.scss +12 -10
- package/src/charts/Marker.tsx +3 -2
- package/src/charts/MarkerLine.scss +11 -8
- package/src/charts/MarkerLine.tsx +196 -177
- package/src/charts/PieChart.scss +12 -9
- package/src/charts/PieChart.tsx +717 -591
- package/src/charts/PieLabel.tsx +99 -81
- package/src/charts/Range.scss +11 -8
- package/src/charts/RangeMarker.tsx +204 -187
- package/src/charts/ScatterGraph.scss +12 -9
- package/src/charts/axis/Axis.scss +6 -5
- package/src/charts/axis/CategoryAxis.scss +10 -8
- package/src/charts/axis/NumericAxis.scss +9 -6
- package/src/charts/axis/TimeAxis.scss +9 -6
- package/src/charts/axis/TimeAxis.tsx +753 -637
- package/src/charts/axis/index.scss +4 -5
- package/src/charts/axis/variables.scss +4 -2
- package/src/charts/helpers/ValueAtFinder.ts +19 -5
- package/src/charts/index.scss +16 -19
- package/src/charts/maps.scss +0 -0
- package/src/charts/palette.scss +11 -31
- package/src/charts/palette.variables.scss +23 -0
- package/src/charts/variables.scss +35 -3
- package/src/data/StructuredSelector.ts +2 -2
- package/src/data/createAccessorModelProxy.ts +66 -74
- package/src/index.scss +5 -6
- package/src/maps.scss +5 -0
- package/src/svg/Ellipse.tsx +62 -55
- package/src/svg/Line.tsx +57 -42
- package/src/svg/Svg.scss +6 -6
- package/src/svg/Text.scss +19 -0
- package/src/svg/Text.tsx +172 -116
- package/src/svg/index.scss +3 -2
- package/src/svg/maps.scss +0 -0
- package/src/svg/variables.scss +0 -0
- package/src/ui/Container.spec.ts +59 -0
- package/src/ui/Controller.spec.tsx +30 -0
- package/src/ui/Controller.ts +5 -0
- package/src/ui/HoverSync.tsx +179 -147
- package/src/ui/Prop.ts +1 -1
- package/src/ui/Text.ts +12 -9
- package/src/ui/adapter/GroupAdapter.spec.ts +42 -0
- package/src/ui/adapter/GroupAdapter.ts +25 -14
- package/src/ui/app/History.ts +1 -1
- package/src/ui/index.scss +1 -1
- package/src/ui/layout/LabelsLeftLayout.scss +5 -7
- package/src/ui/layout/LabelsTopLayout.scss +4 -6
- package/src/ui/layout/index.scss +2 -3
- package/src/ui/maps.scss +0 -0
- package/src/ui/variables.scss +1 -2
- package/src/util/index.scss +4 -2
- package/src/util/maps.scss +1 -0
- package/src/util/scss/besm.scss +15 -0
- package/src/util/scss/calc.scss +103 -11
- package/src/util/scss/defaults.scss +24 -0
- package/src/util/scss/elements.scss +78 -0
- package/src/util/scss/global.scss +15 -0
- package/src/util/scss/include.scss +17 -9
- package/src/util/scss/index.scss +1 -9
- package/src/util/scss/maps.scss +2 -0
- package/src/util/scss/pad-size.scss +9 -0
- package/src/util/scss/padding.scss +6 -0
- package/src/util/scss/screen-size.scss +5 -0
- package/src/util/scss/variables.scss +6 -0
- package/src/util/variables.scss +1 -0
- package/src/variables.scss +5 -217
- package/src/widgets/Button.maps.scss +103 -0
- package/src/widgets/Button.scss +33 -9
- package/src/widgets/Button.variables.scss +8 -104
- package/src/widgets/CxCredit.scss +2 -0
- package/src/widgets/FlexBox.scss +16 -11
- package/src/widgets/Heading.scss +6 -0
- package/src/widgets/HighlightedSearchText.scss +8 -1
- package/src/widgets/Icon.scss +6 -0
- package/src/widgets/List.scss +7 -0
- package/src/widgets/List.tsx +6 -7
- package/src/widgets/ProgressBar.scss +9 -0
- package/src/widgets/Resizer.scss +9 -7
- package/src/widgets/Section.scss +53 -56
- package/src/widgets/animations.scss +4 -2
- package/src/widgets/box.scss +47 -0
- package/src/widgets/drag-drop/DragClone.scss +12 -4
- package/src/widgets/drag-drop/DragHandle.scss +12 -6
- package/src/widgets/drag-drop/DragSource.scss +12 -6
- package/src/widgets/drag-drop/DropZone.scss +9 -0
- package/src/widgets/drag-drop/DropZone.tsx +3 -3
- package/src/widgets/drag-drop/index.scss +4 -4
- package/src/widgets/drag-drop/maps.scss +7 -0
- package/src/widgets/drag-drop/variables.scss +8 -5
- package/src/widgets/form/Calendar.maps.scss +54 -0
- package/src/widgets/form/Calendar.scss +49 -11
- package/src/widgets/form/Calendar.tsx +755 -653
- package/src/widgets/form/Calendar.variables.scss +3 -46
- package/src/widgets/form/Checkbox.maps.scss +34 -0
- package/src/widgets/form/Checkbox.scss +14 -3
- package/src/widgets/form/Checkbox.variables.scss +4 -36
- package/src/widgets/form/ColorField.scss +21 -2
- package/src/widgets/form/ColorField.tsx +485 -431
- package/src/widgets/form/ColorPicker.maps.scss +21 -0
- package/src/widgets/form/ColorPicker.scss +26 -9
- package/src/widgets/form/ColorPicker.variables.scss +3 -16
- package/src/widgets/form/DateTimeField.scss +54 -21
- package/src/widgets/form/DateTimeField.tsx +697 -615
- package/src/widgets/form/DateTimePicker.scss +14 -4
- package/src/widgets/form/Field.maps.scss +122 -0
- package/src/widgets/form/Field.scss +54 -18
- package/src/widgets/form/Field.tsx +611 -504
- package/src/widgets/form/Field.variables.scss +46 -0
- package/src/widgets/form/HelpText.scss +8 -5
- package/src/widgets/form/Label.scss +10 -3
- package/src/widgets/form/LookupField.maps.scss +26 -0
- package/src/widgets/form/LookupField.scss +54 -24
- package/src/widgets/form/LookupField.tsx +25 -21
- package/src/widgets/form/MonthField.scss +48 -26
- package/src/widgets/form/MonthField.tsx +645 -567
- package/src/widgets/form/MonthPicker.maps.scss +50 -0
- package/src/widgets/form/MonthPicker.scss +44 -35
- package/src/widgets/form/MonthPicker.tsx +954 -724
- package/src/widgets/form/MonthPicker.variables.scss +24 -0
- package/src/widgets/form/NumberField.scss +19 -2
- package/src/widgets/form/NumberField.tsx +576 -466
- package/src/widgets/form/Radio.maps.scss +36 -0
- package/src/widgets/form/Radio.scss +12 -2
- package/src/widgets/form/Radio.variables.scss +3 -42
- package/src/widgets/form/Select.scss +25 -9
- package/src/widgets/form/Slider.scss +23 -14
- package/src/widgets/form/Switch.scss +18 -8
- package/src/widgets/form/TextArea.scss +14 -1
- package/src/widgets/form/TextField.scss +24 -3
- package/src/widgets/form/TextField.tsx +9 -21
- package/src/widgets/form/UploadButton.scss +14 -6
- package/src/widgets/form/ValidationError.scss +10 -6
- package/src/widgets/form/Wheel.scss +14 -4
- package/src/widgets/form/index.scss +22 -24
- package/src/widgets/form/maps.scss +81 -0
- package/src/widgets/form/variables.scss +111 -355
- package/src/widgets/grid/Grid.scss +19 -2
- package/src/widgets/grid/Grid.spec.ts +42 -0
- package/src/widgets/grid/Grid.tsx +18 -13
- package/src/widgets/grid/Pagination.scss +11 -2
- package/src/widgets/grid/Pagination.tsx +110 -102
- package/src/widgets/grid/TreeNode.scss +25 -8
- package/src/widgets/grid/TreeNode.tsx +127 -116
- package/src/widgets/grid/index.scss +3 -4
- package/src/widgets/grid/maps.scss +110 -0
- package/src/widgets/grid/variables.scss +48 -137
- package/src/widgets/icons/folder.tsx +1 -2
- package/src/widgets/icons/forward.tsx +23 -20
- package/src/widgets/icons/loading.tsx +22 -19
- package/src/widgets/icons/square.tsx +20 -17
- package/src/widgets/index.scss +16 -16
- package/src/widgets/index.ts +63 -58
- package/src/widgets/lists.scss +42 -0
- package/src/widgets/maps.scss +139 -0
- package/src/widgets/nav/Link.scss +14 -1
- package/src/widgets/nav/Menu.scss +13 -7
- package/src/widgets/nav/Menu.variables.scss +1 -12
- package/src/widgets/nav/MenuItem.scss +21 -6
- package/src/widgets/nav/Scroller.scss +11 -2
- package/src/widgets/nav/Tab.maps.scss +78 -0
- package/src/widgets/nav/Tab.scss +12 -6
- package/src/widgets/nav/Tab.variables.scss +7 -76
- package/src/widgets/nav/cover.scss +6 -4
- package/src/widgets/nav/index.scss +6 -6
- package/src/widgets/nav/maps.scss +32 -0
- package/src/widgets/nav/variables.scss +4 -11
- package/src/widgets/overlay/ContextMenu.ts +3 -0
- package/src/widgets/overlay/Dropdown.scss +47 -16
- package/src/widgets/overlay/Dropdown.tsx +851 -676
- package/src/widgets/overlay/MsgBox.tsx +125 -111
- package/src/widgets/overlay/Overlay.scss +60 -40
- package/src/widgets/overlay/Overlay.tsx +948 -800
- package/src/widgets/overlay/Toast.scss +42 -34
- package/src/widgets/overlay/Toast.ts +11 -1
- package/src/widgets/overlay/Tooltip.scss +27 -96
- package/src/widgets/overlay/Tooltip.tsx +376 -309
- package/src/widgets/overlay/Window.maps.scss +51 -0
- package/src/widgets/overlay/Window.scss +17 -17
- package/src/widgets/overlay/Window.tsx +291 -236
- package/src/widgets/overlay/Window.variables.scss +2 -43
- package/src/widgets/overlay/index.d.ts +11 -11
- package/src/widgets/overlay/index.scss +6 -15
- package/src/widgets/overlay/maps.scss +44 -0
- package/src/widgets/overlay/variables.scss +11 -42
- package/src/widgets/variables.scss +33 -117
- package/src/global.scss +0 -14
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
/** @jsxImportSource react */
|
|
3
3
|
import { Widget } from "../../ui/Widget";
|
|
4
|
-
import { DropdownBase, DropdownInstance } from "./Dropdown";
|
|
4
|
+
import { DropdownBase, DropdownInstance, } from "./Dropdown";
|
|
5
5
|
import { debug, tooltipsFlag } from "../../util/Debug";
|
|
6
6
|
import { isNonEmptyArray } from "../../util/isNonEmptyArray";
|
|
7
7
|
import { ReadOnlyDataView } from "../../data/ReadOnlyDataView";
|
|
8
8
|
import { isTouchEvent } from "../../util/isTouchEvent";
|
|
9
9
|
import { shallowEquals } from "../../util/shallowEquals";
|
|
10
10
|
import { isSelector } from "../../data/isSelector";
|
|
11
|
-
import { wireTooltipOps } from "./tooltip-ops";
|
|
11
|
+
import { wireTooltipOps, } from "./tooltip-ops";
|
|
12
12
|
import { getCursorPos } from "./captureMouse";
|
|
13
13
|
import { RenderingContext } from "../../ui/RenderingContext";
|
|
14
14
|
export class TooltipInstance extends DropdownInstance {
|
|
@@ -65,7 +65,8 @@ export class TooltipBase extends DropdownBase {
|
|
|
65
65
|
instance.tooltipComponent = component;
|
|
66
66
|
super.overlayDidMount(instance, component);
|
|
67
67
|
instance.parentValidityCheckTimer = setInterval(() => {
|
|
68
|
-
if (this.relatedElement &&
|
|
68
|
+
if (this.relatedElement &&
|
|
69
|
+
!this.relatedElement.ownerDocument.body.contains(this.relatedElement)) {
|
|
69
70
|
if (instance.dismissTooltip) {
|
|
70
71
|
instance.dismissTooltip();
|
|
71
72
|
instance.dismissTooltip = null;
|
|
@@ -101,7 +102,8 @@ export class TooltipBase extends DropdownBase {
|
|
|
101
102
|
handleMouseLeavesParent(instance) {
|
|
102
103
|
let timeout = this.mouseTrap ? 200 : 0;
|
|
103
104
|
setTimeout(() => {
|
|
104
|
-
if (!instance.mouseOverTarget &&
|
|
105
|
+
if (!instance.mouseOverTarget &&
|
|
106
|
+
!(this.mouseTrap && instance.mouseOverTooltip))
|
|
105
107
|
this.dismissTooltip(instance);
|
|
106
108
|
}, timeout);
|
|
107
109
|
}
|
|
@@ -124,6 +126,9 @@ export class TooltipBase extends DropdownBase {
|
|
|
124
126
|
return false;
|
|
125
127
|
return super.checkVisible(context, instance, data);
|
|
126
128
|
}
|
|
129
|
+
open(storeOrInstance, options) {
|
|
130
|
+
return super.open(storeOrInstance, options);
|
|
131
|
+
}
|
|
127
132
|
}
|
|
128
133
|
TooltipBase.prototype.baseClass = "tooltip";
|
|
129
134
|
TooltipBase.prototype.offset = 8;
|
|
@@ -179,11 +184,15 @@ export function getTooltipInstance(e, parentInstance, tooltip, options = {}) {
|
|
|
179
184
|
let store = new ReadOnlyDataView({
|
|
180
185
|
store: parentInstance.store,
|
|
181
186
|
});
|
|
182
|
-
tooltipInstance = parentInstance.tooltips[name] =
|
|
187
|
+
tooltipInstance = parentInstance.tooltips[name] =
|
|
188
|
+
parentInstance.getDetachedChild(tooltipWidget, name, store);
|
|
183
189
|
tooltipInstance.config = config;
|
|
184
190
|
tooltipInstance.tooltipName = name;
|
|
185
191
|
tooltipInstance.init(new RenderingContext());
|
|
186
|
-
if (config.alwaysVisible ||
|
|
192
|
+
if (config.alwaysVisible ||
|
|
193
|
+
config.trackMouse ||
|
|
194
|
+
config.trackMouseX ||
|
|
195
|
+
config.trackMouseY) {
|
|
187
196
|
tooltipInstance.data = tooltipInstance.dataSelector(store);
|
|
188
197
|
}
|
|
189
198
|
}
|
|
@@ -216,7 +225,9 @@ function tooltipMouseMove(e, parentInstance, tooltip, options = {}) {
|
|
|
216
225
|
instance.lastClickTime = Date.now();
|
|
217
226
|
setTimeout(() => {
|
|
218
227
|
let { relatedElement } = instance.widget;
|
|
219
|
-
if (!canceled &&
|
|
228
|
+
if (!canceled &&
|
|
229
|
+
instance.mouseOverTarget &&
|
|
230
|
+
relatedElement.ownerDocument.body.contains(relatedElement)) {
|
|
220
231
|
dismiss = instance.widget.open(instance, {
|
|
221
232
|
onPipeUpdate: (cb) => {
|
|
222
233
|
instance.update = cb;
|
|
@@ -276,7 +287,8 @@ function tooltipParentWillReceiveProps(element, parentInstance, tooltip, options
|
|
|
276
287
|
instance.store.setData(options.data);
|
|
277
288
|
if (instance.update)
|
|
278
289
|
instance.update();
|
|
279
|
-
if (instance.mouseOverTarget ||
|
|
290
|
+
if (instance.mouseOverTarget ||
|
|
291
|
+
(instance.data && instance.data.alwaysVisible))
|
|
280
292
|
tooltipMouseMove(element, parentInstance, tooltip, options);
|
|
281
293
|
}
|
|
282
294
|
}
|
|
@@ -292,7 +304,10 @@ function tooltipParentWillUnmount(parentInstance) {
|
|
|
292
304
|
}
|
|
293
305
|
function tooltipParentDidUpdate(element, parentInstance, tooltip) {
|
|
294
306
|
let instance = getTooltipInstance(element, parentInstance, tooltip);
|
|
295
|
-
if (instance &&
|
|
307
|
+
if (instance &&
|
|
308
|
+
instance.visible &&
|
|
309
|
+
instance.data?.alwaysVisible &&
|
|
310
|
+
instance.tooltipComponent)
|
|
296
311
|
instance.widget.updateDropdownPosition(instance, instance.tooltipComponent);
|
|
297
312
|
}
|
|
298
313
|
export function enableTooltips() {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Window.d.ts","sourceRoot":"","sources":["../../../src/widgets/overlay/Window.tsx"],"names":[],"mappings":"AAEA,OAAO,
|
|
1
|
+
{"version":3,"file":"Window.d.ts","sourceRoot":"","sources":["../../../src/widgets/overlay/Window.tsx"],"names":[],"mappings":"AAEA,OAAO,EAEL,WAAW,EAKX,aAAa,EACb,eAAe,EAChB,MAAM,WAAW,CAAC;AAanB,OAAO,EAAE,WAAW,EAAE,UAAU,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAC9E,OAAO,EAAE,gBAAgB,EAAE,MAAM,2BAA2B,CAAC;AAE7D,MAAM,WAAW,YAAa,SAAQ,aAAa;IACjD,0CAA0C;IAC1C,KAAK,CAAC,EAAE,UAAU,CAAC;IAEnB,gEAAgE;IAChE,QAAQ,CAAC,EAAE,WAAW,CAAC;IAEvB,wDAAwD;IACxD,SAAS,CAAC,EAAE,SAAS,CAAC;IAEtB,0DAA0D;IAC1D,WAAW,CAAC,EAAE,SAAS,CAAC;IAExB,0DAA0D;IAC1D,WAAW,CAAC,EAAE,SAAS,CAAC;IAExB,uEAAuE;IACvE,SAAS,CAAC,EAAE,MAAM,CAAC;IAEnB,8DAA8D;IAC9D,SAAS,CAAC,EAAE,SAAS,CAAC;IAEtB,wCAAwC;IACxC,SAAS,CAAC,EAAE,OAAO,CAAC;IAEpB,2FAA2F;IAC3F,SAAS,CAAC,EAAE,OAAO,CAAC;IAEpB,yFAAyF;IACzF,SAAS,CAAC,EAAE,OAAO,CAAC;IAEpB,yEAAyE;IACzE,KAAK,CAAC,EAAE,OAAO,CAAC;IAEhB,+DAA+D;IAC/D,GAAG,CAAC,EAAE,OAAO,CAAC;IAEd,8BAA8B;IAC9B,MAAM,CAAC,EAAE,GAAG,CAAC;IAEb,8BAA8B;IAC9B,MAAM,CAAC,EAAE,GAAG,CAAC;IAEb,0CAA0C;IAC1C,SAAS,CAAC,EAAE,WAAW,CAAC;CACzB;AAED,qBAAa,cAAe,SAAQ,eAAe,CAAC,MAAM,CAAC;IACzD,QAAQ,CAAC,EAAE,WAAW,CAAC;IACvB,QAAQ,CAAC,EAAE,WAAW,CAAC;IACvB,MAAM,CAAC,EAAE,WAAW,CAAC;IACrB,WAAW,CAAC,EAAE,WAAW,CAAC;CAC3B;AAED,qBAAa,MAAO,SAAQ,WAAW,CAAC,YAAY,EAAE,cAAc,CAAC;IAC3D,QAAQ,CAAC,EAAE,WAAW,CAAC;IACvB,SAAS,CAAC,EAAE,WAAW,CAAC;IACxB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,GAAG,CAAC,EAAE,OAAO,CAAC;IACd,SAAS,CAAC,EAAE,SAAS,CAAC;IACtB,WAAW,CAAC,EAAE,SAAS,CAAC;IACxB,WAAW,CAAC,EAAE,SAAS,CAAC;IACxB,SAAS,CAAC,EAAE,SAAS,CAAC;IACtB,KAAK,CAAC,EAAE,UAAU,CAAC;IACnB,MAAM,CAAC,EAAE,GAAG,CAAC;IACb,MAAM,CAAC,EAAE,GAAG,CAAC;IACb,SAAS,EAAE,MAAM,CAAC;IAE1B,IAAI;IAcJ,WAAW,CAAC,GAAG,IAAI,EAAE,GAAG;IAWxB,WAAW,CAAC,GAAG,IAAI,EAAE,GAAG;IA6BxB,cAAc,CAAC,OAAO,EAAE,gBAAgB,EAAE,QAAQ,EAAE,cAAc,GAAG,IAAI;IAiBzE,YAAY,CACV,OAAO,EAAE,gBAAgB,EACzB,QAAQ,EAAE,cAAc,EACxB,GAAG,EAAE,MAAM,GACV,GAAG,EAAE;IAeR,YAAY,CACV,OAAO,EAAE,gBAAgB,EACzB,QAAQ,EAAE,cAAc,EACxB,GAAG,EAAE,MAAM,GACV,GAAG;IAQN,MAAM,CACJ,OAAO,EAAE,gBAAgB,EACzB,QAAQ,EAAE,cAAc,EACxB,GAAG,EAAE,MAAM,GACV,GAAG;CAqBP"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
/** @jsxImportSource react */
|
|
3
3
|
import { Widget, getContent } from "../../ui/Widget";
|
|
4
|
-
import { OverlayBase, OverlayComponent, OverlayInstance, } from "./Overlay";
|
|
5
|
-
import { ContentPlaceholder } from "../../ui/layout/ContentPlaceholder";
|
|
4
|
+
import { OverlayBase, OverlayBeacon, OverlayComponent, OverlayInstance, } from "./Overlay";
|
|
5
|
+
import { ContentPlaceholder, } from "../../ui/layout/ContentPlaceholder";
|
|
6
6
|
import { ZIndexManager } from "../../ui/ZIndexManager";
|
|
7
7
|
import { Button } from "../Button";
|
|
8
8
|
import { parseStyle } from "../../util/parseStyle";
|
|
@@ -41,8 +41,16 @@ export class Window extends OverlayBase {
|
|
|
41
41
|
}
|
|
42
42
|
initHelpers(...args) {
|
|
43
43
|
return super.initHelpers(...args, {
|
|
44
|
-
header: Widget.create(this.header || {
|
|
45
|
-
|
|
44
|
+
header: Widget.create(this.header || {
|
|
45
|
+
type: ContentPlaceholder,
|
|
46
|
+
name: "header",
|
|
47
|
+
scoped: true,
|
|
48
|
+
}),
|
|
49
|
+
footer: Widget.create(this.footer || {
|
|
50
|
+
type: ContentPlaceholder,
|
|
51
|
+
name: "footer",
|
|
52
|
+
scoped: true,
|
|
53
|
+
}),
|
|
46
54
|
close: this.closable &&
|
|
47
55
|
Button.create({
|
|
48
56
|
mod: "hollow",
|
|
@@ -57,10 +65,14 @@ export class Window extends OverlayBase {
|
|
|
57
65
|
exploreCleanup(context, instance) {
|
|
58
66
|
super.exploreCleanup(context, instance);
|
|
59
67
|
let { helpers } = instance;
|
|
60
|
-
let unregisterHeader = helpers.header &&
|
|
68
|
+
let unregisterHeader = helpers.header &&
|
|
69
|
+
helpers.header
|
|
70
|
+
.unregisterContentPlaceholder;
|
|
61
71
|
if (unregisterHeader)
|
|
62
72
|
unregisterHeader();
|
|
63
|
-
let unregisterFooter = helpers.footer &&
|
|
73
|
+
let unregisterFooter = helpers.footer &&
|
|
74
|
+
helpers.footer
|
|
75
|
+
.unregisterContentPlaceholder;
|
|
64
76
|
if (unregisterFooter)
|
|
65
77
|
unregisterFooter();
|
|
66
78
|
}
|
|
@@ -79,12 +91,14 @@ export class Window extends OverlayBase {
|
|
|
79
91
|
return result;
|
|
80
92
|
}
|
|
81
93
|
renderFooter(context, instance, key) {
|
|
82
|
-
return getContent(instance.helpers &&
|
|
94
|
+
return getContent(instance.helpers &&
|
|
95
|
+
instance.helpers.footer &&
|
|
96
|
+
instance.helpers.footer.render(context));
|
|
83
97
|
}
|
|
84
98
|
render(context, instance, key) {
|
|
85
99
|
var header = this.renderHeader(context, instance, "header");
|
|
86
100
|
var footer = this.renderFooter(context, instance, "footer");
|
|
87
|
-
return (_jsx(WindowComponent, { instance: instance, header: header, footer: footer, subscribeToBeforeDismiss: context.options.subscribeToBeforeDismiss, children: this.renderContents(context, instance) }, key));
|
|
101
|
+
return (_jsx(OverlayBeacon, { childrenFactory: (beaconEl) => (_jsx(WindowComponent, { beaconEl: beaconEl, instance: instance, header: header, footer: footer, subscribeToBeforeDismiss: context.options.subscribeToBeforeDismiss, parentEl: context.options.parentEl, children: this.renderContents(context, instance) }, key)) }));
|
|
88
102
|
}
|
|
89
103
|
}
|
|
90
104
|
Window.prototype.baseClass = "window";
|
|
@@ -94,6 +108,7 @@ Window.prototype.fixed = false;
|
|
|
94
108
|
Window.prototype.autoFocus = true;
|
|
95
109
|
Window.prototype.focusable = true;
|
|
96
110
|
Window.prototype.pad = true;
|
|
111
|
+
Window.prototype.needsBeacon = true;
|
|
97
112
|
Widget.alias("window", Window);
|
|
98
113
|
Localization.registerPrototype("cx/widgets/Window", Window);
|
|
99
114
|
class WindowComponent extends OverlayComponent {
|
|
@@ -128,7 +143,7 @@ class WindowComponent extends OverlayComponent {
|
|
|
128
143
|
onFocusIn() {
|
|
129
144
|
super.onFocusIn();
|
|
130
145
|
if (!this.state.active) {
|
|
131
|
-
if (this.containerEl
|
|
146
|
+
if (this.containerEl?.contains(document.activeElement))
|
|
132
147
|
this.setZIndex(ZIndexManager.next());
|
|
133
148
|
this.setState({ active: true });
|
|
134
149
|
}
|