cx 26.2.1 → 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 +9 -4
- 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 +892 -880
- 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 +317 -121
- 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 +15 -7
- 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
package/dist/widgets.js
CHANGED
|
@@ -53,6 +53,9 @@ export {
|
|
|
53
53
|
DetachedScope,
|
|
54
54
|
GroupAdapter,
|
|
55
55
|
IsolatedScope,
|
|
56
|
+
LabelsLeftLayout,
|
|
57
|
+
LabelsTopLayout,
|
|
58
|
+
LabelsTopLayoutCell,
|
|
56
59
|
PrivateStore,
|
|
57
60
|
PureContainer,
|
|
58
61
|
Repeater,
|
|
@@ -63,7 +66,7 @@ export {
|
|
|
63
66
|
TreeAdapter,
|
|
64
67
|
Widget,
|
|
65
68
|
} from "cx/ui";
|
|
66
|
-
import { jsx, jsxs } from "react/jsx-runtime";
|
|
69
|
+
import { jsx, jsxs, Fragment } from "react/jsx-runtime";
|
|
67
70
|
import {
|
|
68
71
|
isTouchEvent,
|
|
69
72
|
isUndefined,
|
|
@@ -1280,11 +1283,12 @@ class List extends StyledContainerBase {
|
|
|
1280
1283
|
},
|
|
1281
1284
|
};
|
|
1282
1285
|
}
|
|
1283
|
-
|
|
1284
|
-
|
|
1285
|
-
|
|
1286
|
-
|
|
1287
|
-
|
|
1286
|
+
// Clone to avoid mutating the original config
|
|
1287
|
+
return {
|
|
1288
|
+
...g,
|
|
1289
|
+
header: g.header ? Widget.create(g.header) : undefined,
|
|
1290
|
+
footer: g.footer ? Widget.create(g.footer) : undefined,
|
|
1291
|
+
};
|
|
1288
1292
|
});
|
|
1289
1293
|
this.adapter.groupBy(normalized);
|
|
1290
1294
|
this.update();
|
|
@@ -2689,6 +2693,7 @@ class OverlayInstance extends Instance {
|
|
|
2689
2693
|
onBeforeDismiss;
|
|
2690
2694
|
}
|
|
2691
2695
|
class OverlayBase extends ContainerBase {
|
|
2696
|
+
static configureOverlayContainer;
|
|
2692
2697
|
init() {
|
|
2693
2698
|
if (this.center) this.centerX = this.centerY = this.center;
|
|
2694
2699
|
super.init();
|
|
@@ -2745,20 +2750,38 @@ class OverlayBase extends ContainerBase {
|
|
|
2745
2750
|
context.pop("parentPositionChangeEvent");
|
|
2746
2751
|
}
|
|
2747
2752
|
render(context, instance, key) {
|
|
2748
|
-
|
|
2749
|
-
|
|
2750
|
-
|
|
2751
|
-
|
|
2752
|
-
|
|
2753
|
-
|
|
2754
|
-
|
|
2755
|
-
|
|
2756
|
-
|
|
2757
|
-
|
|
2753
|
+
if (this.needsBeacon)
|
|
2754
|
+
return jsx(
|
|
2755
|
+
OverlayBeacon,
|
|
2756
|
+
{
|
|
2757
|
+
childrenFactory: (beaconEl) =>
|
|
2758
|
+
jsx(OverlayComponent, {
|
|
2759
|
+
beaconEl: beaconEl,
|
|
2760
|
+
instance: instance,
|
|
2761
|
+
subscribeToBeforeDismiss: context.options.subscribeToBeforeDismiss,
|
|
2762
|
+
parentEl: context.options.parentEl,
|
|
2763
|
+
children: this.renderContents(context, instance),
|
|
2764
|
+
}),
|
|
2765
|
+
},
|
|
2766
|
+
key,
|
|
2767
|
+
);
|
|
2768
|
+
return jsx(OverlayComponent, {
|
|
2769
|
+
beaconEl: null,
|
|
2770
|
+
instance: instance,
|
|
2771
|
+
subscribeToBeforeDismiss: context.options.subscribeToBeforeDismiss,
|
|
2772
|
+
parentEl: context.options.parentEl,
|
|
2773
|
+
children: this.renderContents(context, instance),
|
|
2774
|
+
});
|
|
2758
2775
|
}
|
|
2759
2776
|
renderContents(context, instance) {
|
|
2760
2777
|
return this.renderChildren(context, instance);
|
|
2761
2778
|
}
|
|
2779
|
+
getConfigureOverlayContainerContext(instance, initiatingEvent) {
|
|
2780
|
+
return {
|
|
2781
|
+
initiatingEvent,
|
|
2782
|
+
relatedElement: instance?.beaconEl,
|
|
2783
|
+
};
|
|
2784
|
+
}
|
|
2762
2785
|
overlayDidMount(instance, component) {
|
|
2763
2786
|
let { el } = component;
|
|
2764
2787
|
if (this.centerX) if (!el.style.left) el.style.left = `${(window.innerWidth - el.offsetWidth) / 2}px`;
|
|
@@ -2786,17 +2809,19 @@ class OverlayBase extends ContainerBase {
|
|
|
2786
2809
|
getOverlayContainer() {
|
|
2787
2810
|
return document.body;
|
|
2788
2811
|
}
|
|
2789
|
-
containerFactory() {
|
|
2812
|
+
containerFactory(instance, initiatingEvent) {
|
|
2790
2813
|
let el = document.createElement("div");
|
|
2791
2814
|
let container = this.getOverlayContainer();
|
|
2792
2815
|
container.appendChild(el);
|
|
2793
2816
|
el.style.position = "absolute";
|
|
2794
2817
|
if (this.containerStyle) Object.assign(el.style, parseStyle(this.containerStyle));
|
|
2818
|
+
if (OverlayBase.configureOverlayContainer)
|
|
2819
|
+
OverlayBase.configureOverlayContainer(el, this.getConfigureOverlayContainerContext(instance, initiatingEvent));
|
|
2795
2820
|
return el;
|
|
2796
2821
|
}
|
|
2797
2822
|
open(storeOrInstance, options) {
|
|
2798
2823
|
if (!this.initialized) this.init();
|
|
2799
|
-
let el = this.containerFactory();
|
|
2824
|
+
let el = this.containerFactory(undefined, options?.initiatingEvent);
|
|
2800
2825
|
el.style.display = "hidden";
|
|
2801
2826
|
let beforeDismiss = null;
|
|
2802
2827
|
let stop;
|
|
@@ -2867,6 +2892,7 @@ OverlayBase.prototype.focusable = false;
|
|
|
2867
2892
|
OverlayBase.prototype.containerStyle = undefined;
|
|
2868
2893
|
OverlayBase.prototype.dismissOnPopState = false;
|
|
2869
2894
|
OverlayBase.prototype.closeOnEscape = false;
|
|
2895
|
+
OverlayBase.prototype.needsBeacon = false;
|
|
2870
2896
|
class Overlay extends OverlayBase {}
|
|
2871
2897
|
Widget.alias("overlay", Overlay);
|
|
2872
2898
|
//TODO: all el related logic should be moved here
|
|
@@ -2912,13 +2938,13 @@ class OverlayComponent extends VDOM.Component {
|
|
|
2912
2938
|
let { widget } = instance;
|
|
2913
2939
|
if (widget.inline || parentEl) return this.renderOverlay();
|
|
2914
2940
|
if (!this.containerEl) {
|
|
2915
|
-
|
|
2941
|
+
instance.beaconEl = this.props.beaconEl;
|
|
2942
|
+
this.ownedEl = widget.containerFactory(instance);
|
|
2916
2943
|
this.ownedEl.style.display = "hidden";
|
|
2917
2944
|
this.containerEl = this.ownedEl;
|
|
2918
2945
|
}
|
|
2919
|
-
if
|
|
2920
|
-
|
|
2921
|
-
return null;
|
|
2946
|
+
// content is rendered in componentDidUpdate if portals are not supported
|
|
2947
|
+
return VDOM.DOM.createPortal ? VDOM.DOM.createPortal(this.renderOverlay(), this.containerEl) : null;
|
|
2922
2948
|
}
|
|
2923
2949
|
renderOverlay() {
|
|
2924
2950
|
let { widget, data } = this.props.instance;
|
|
@@ -3300,6 +3326,30 @@ class OverlayComponent extends VDOM.Component {
|
|
|
3300
3326
|
this.overlayDidUpdate();
|
|
3301
3327
|
}
|
|
3302
3328
|
}
|
|
3329
|
+
class OverlayBeacon extends VDOM.Component {
|
|
3330
|
+
el;
|
|
3331
|
+
render() {
|
|
3332
|
+
return jsxs(Fragment, {
|
|
3333
|
+
children: [
|
|
3334
|
+
jsx("div", {
|
|
3335
|
+
ref: (el) => {
|
|
3336
|
+
this.el = el;
|
|
3337
|
+
},
|
|
3338
|
+
style: {
|
|
3339
|
+
position: "absolute",
|
|
3340
|
+
display: "none",
|
|
3341
|
+
},
|
|
3342
|
+
}),
|
|
3343
|
+
this.state?.children,
|
|
3344
|
+
],
|
|
3345
|
+
});
|
|
3346
|
+
}
|
|
3347
|
+
componentDidMount() {
|
|
3348
|
+
this.setState({
|
|
3349
|
+
children: this.props.childrenFactory(this.el),
|
|
3350
|
+
});
|
|
3351
|
+
}
|
|
3352
|
+
}
|
|
3303
3353
|
|
|
3304
3354
|
class DropdownInstance extends OverlayInstance {
|
|
3305
3355
|
mousePosition;
|
|
@@ -3794,6 +3844,12 @@ class DropdownBase extends OverlayBase {
|
|
|
3794
3844
|
}
|
|
3795
3845
|
return super.getOverlayContainer();
|
|
3796
3846
|
}
|
|
3847
|
+
getConfigureOverlayContainerContext(instance) {
|
|
3848
|
+
return {
|
|
3849
|
+
...super.getConfigureOverlayContainerContext(),
|
|
3850
|
+
relatedElement: instance?.relatedElement ?? this.relatedElement,
|
|
3851
|
+
};
|
|
3852
|
+
}
|
|
3797
3853
|
}
|
|
3798
3854
|
DropdownBase.prototype.offset = 0;
|
|
3799
3855
|
DropdownBase.prototype.baseClass = "dropdown";
|
|
@@ -3940,6 +3996,9 @@ class TooltipBase extends DropdownBase {
|
|
|
3940
3996
|
if (!isNonEmptyArray(this.items) && !data.title && !data.text) return false;
|
|
3941
3997
|
return super.checkVisible(context, instance, data);
|
|
3942
3998
|
}
|
|
3999
|
+
open(storeOrInstance, options) {
|
|
4000
|
+
return super.open(storeOrInstance, options);
|
|
4001
|
+
}
|
|
3943
4002
|
}
|
|
3944
4003
|
TooltipBase.prototype.baseClass = "tooltip";
|
|
3945
4004
|
TooltipBase.prototype.offset = 8;
|
|
@@ -4196,17 +4255,22 @@ class Window extends OverlayBase {
|
|
|
4196
4255
|
render(context, instance, key) {
|
|
4197
4256
|
var header = this.renderHeader(context, instance, "header");
|
|
4198
4257
|
var footer = this.renderFooter(context, instance, "footer");
|
|
4199
|
-
return jsx(
|
|
4200
|
-
|
|
4201
|
-
|
|
4202
|
-
|
|
4203
|
-
|
|
4204
|
-
|
|
4205
|
-
|
|
4206
|
-
|
|
4207
|
-
|
|
4208
|
-
|
|
4209
|
-
|
|
4258
|
+
return jsx(OverlayBeacon, {
|
|
4259
|
+
childrenFactory: (beaconEl) =>
|
|
4260
|
+
jsx(
|
|
4261
|
+
WindowComponent,
|
|
4262
|
+
{
|
|
4263
|
+
beaconEl: beaconEl,
|
|
4264
|
+
instance: instance,
|
|
4265
|
+
header: header,
|
|
4266
|
+
footer: footer,
|
|
4267
|
+
subscribeToBeforeDismiss: context.options.subscribeToBeforeDismiss,
|
|
4268
|
+
parentEl: context.options.parentEl,
|
|
4269
|
+
children: this.renderContents(context, instance),
|
|
4270
|
+
},
|
|
4271
|
+
key,
|
|
4272
|
+
),
|
|
4273
|
+
});
|
|
4210
4274
|
}
|
|
4211
4275
|
}
|
|
4212
4276
|
Window.prototype.baseClass = "window";
|
|
@@ -4216,6 +4280,7 @@ Window.prototype.fixed = false;
|
|
|
4216
4280
|
Window.prototype.autoFocus = true;
|
|
4217
4281
|
Window.prototype.focusable = true;
|
|
4218
4282
|
Window.prototype.pad = true;
|
|
4283
|
+
Window.prototype.needsBeacon = true;
|
|
4219
4284
|
Widget.alias("window", Window);
|
|
4220
4285
|
Localization.registerPrototype("cx/widgets/Window", Window);
|
|
4221
4286
|
class WindowComponent extends OverlayComponent {
|
|
@@ -4287,7 +4352,7 @@ class WindowComponent extends OverlayComponent {
|
|
|
4287
4352
|
onFocusIn() {
|
|
4288
4353
|
super.onFocusIn();
|
|
4289
4354
|
if (!this.state.active) {
|
|
4290
|
-
if (this.containerEl
|
|
4355
|
+
if (this.containerEl?.contains(document.activeElement)) this.setZIndex(ZIndexManager.next());
|
|
4291
4356
|
this.setState({
|
|
4292
4357
|
active: true,
|
|
4293
4358
|
});
|
|
@@ -4360,7 +4425,9 @@ class MsgBox {
|
|
|
4360
4425
|
}),
|
|
4361
4426
|
}),
|
|
4362
4427
|
);
|
|
4363
|
-
w.open(opts.store
|
|
4428
|
+
w.open(opts.store, {
|
|
4429
|
+
initiatingEvent: opts.initiatingEvent,
|
|
4430
|
+
});
|
|
4364
4431
|
});
|
|
4365
4432
|
}
|
|
4366
4433
|
static yesNo(options) {
|
|
@@ -4413,7 +4480,9 @@ class MsgBox {
|
|
|
4413
4480
|
}),
|
|
4414
4481
|
}),
|
|
4415
4482
|
);
|
|
4416
|
-
w.open(opts.store
|
|
4483
|
+
w.open(opts.store, {
|
|
4484
|
+
initiatingEvent: opts.initiatingEvent,
|
|
4485
|
+
});
|
|
4417
4486
|
});
|
|
4418
4487
|
}
|
|
4419
4488
|
}
|
|
@@ -4473,9 +4542,11 @@ class Toast extends OverlayBase {
|
|
|
4473
4542
|
el.classList.remove(this.CSS.state("live"));
|
|
4474
4543
|
if (component.timeoutTimer) clearTimeout(component.timeoutTimer);
|
|
4475
4544
|
}
|
|
4476
|
-
containerFactory() {
|
|
4545
|
+
containerFactory(instance, initiatingEvent) {
|
|
4477
4546
|
let el = document.createElement("div");
|
|
4478
4547
|
el.className = this.CSS.element("toaster", "item");
|
|
4548
|
+
if (OverlayBase.configureOverlayContainer)
|
|
4549
|
+
OverlayBase.configureOverlayContainer(el, this.getConfigureOverlayContainerContext(instance, initiatingEvent));
|
|
4479
4550
|
let placement = this.placement || "top";
|
|
4480
4551
|
let toaster = getToaster(placement);
|
|
4481
4552
|
toaster.el.className = this.CSS.block("toaster", null, {
|
|
@@ -4503,6 +4574,7 @@ Toast.prototype.animate = true;
|
|
|
4503
4574
|
Toast.prototype.baseClass = "toast";
|
|
4504
4575
|
Toast.prototype.placement = "top";
|
|
4505
4576
|
Toast.prototype.destroyDelay = 300;
|
|
4577
|
+
Toast.prototype.needsBeacon = true;
|
|
4506
4578
|
|
|
4507
4579
|
class ContextMenu extends Dropdown {
|
|
4508
4580
|
constructor(config) {
|
|
@@ -4518,6 +4590,7 @@ ContextMenu.prototype.offset = 0;
|
|
|
4518
4590
|
ContextMenu.prototype.autoFocus = true;
|
|
4519
4591
|
ContextMenu.prototype.autoFocusFirstChild = false;
|
|
4520
4592
|
ContextMenu.prototype.focusable = true;
|
|
4593
|
+
Localization.registerPrototype("cx/widgets/ContextMenu", ContextMenu);
|
|
4521
4594
|
const openContextMenu = (e, content, storeOrInstance, options) => {
|
|
4522
4595
|
e.preventDefault();
|
|
4523
4596
|
e.stopPropagation();
|
|
@@ -6430,13 +6503,13 @@ class Field extends PureContainerBase {
|
|
|
6430
6503
|
super.init();
|
|
6431
6504
|
}
|
|
6432
6505
|
initComponents(_context, instance) {
|
|
6433
|
-
if (this.validationMode == "tooltip" && isUndefined(this.errorTooltip)) {
|
|
6506
|
+
if (this.validationMode == "tooltip" && (isUndefined(this.errorTooltip) || isObject(this.errorTooltip))) {
|
|
6434
6507
|
this.errorTooltip = {
|
|
6435
6508
|
text: {
|
|
6436
6509
|
bind: "$error",
|
|
6437
6510
|
},
|
|
6438
6511
|
mod: "error",
|
|
6439
|
-
...
|
|
6512
|
+
...this.errorTooltip,
|
|
6440
6513
|
};
|
|
6441
6514
|
}
|
|
6442
6515
|
if (isUndefined(this.help)) {
|
|
@@ -6943,13 +7016,13 @@ let Input$2 = class Input extends VDOM.Component {
|
|
|
6943
7016
|
});
|
|
6944
7017
|
}
|
|
6945
7018
|
onBlur(e) {
|
|
7019
|
+
this.onChange(e.target.value, "blur");
|
|
6946
7020
|
if (this.state.focus) {
|
|
6947
7021
|
this.setState({
|
|
6948
7022
|
focus: false,
|
|
6949
7023
|
});
|
|
6950
7024
|
this.props.instance.set("focused", false);
|
|
6951
7025
|
}
|
|
6952
|
-
this.onChange(e.target.value, "blur");
|
|
6953
7026
|
}
|
|
6954
7027
|
onClearClick(_e) {
|
|
6955
7028
|
if (this.input) this.input.value = ""; // prevent onChange call with old text value on blur or component unmount
|
|
@@ -7051,6 +7124,7 @@ var SquareIcon = registerIcon(
|
|
|
7051
7124
|
width: "40",
|
|
7052
7125
|
height: "40",
|
|
7053
7126
|
fill: "currentColor",
|
|
7127
|
+
shapeRendering: "crispEdges",
|
|
7054
7128
|
}),
|
|
7055
7129
|
},
|
|
7056
7130
|
key,
|
|
@@ -8905,35 +8979,38 @@ class LookupComponent extends VDOM.Component {
|
|
|
8905
8979
|
let readOnly = data.disabled || data.readOnly;
|
|
8906
8980
|
if (isNonEmptyArray(data.records)) {
|
|
8907
8981
|
let valueTextFormatter = widget.onGetRecordDisplayText ?? ((record) => record[widget.valueTextField]);
|
|
8908
|
-
text =
|
|
8909
|
-
|
|
8910
|
-
|
|
8911
|
-
|
|
8912
|
-
|
|
8913
|
-
|
|
8914
|
-
|
|
8915
|
-
|
|
8916
|
-
jsx("span", {
|
|
8917
|
-
className: CSS.element(baseClass, "tag-value"),
|
|
8918
|
-
children: valueTextFormatter(v, instance),
|
|
8982
|
+
text = jsx("div", {
|
|
8983
|
+
className: CSS.element(baseClass, "tags"),
|
|
8984
|
+
children: data.records.map((v, i) =>
|
|
8985
|
+
jsxs(
|
|
8986
|
+
"div",
|
|
8987
|
+
{
|
|
8988
|
+
className: CSS.element(baseClass, "tag", {
|
|
8989
|
+
readonly: readOnly,
|
|
8919
8990
|
}),
|
|
8920
|
-
|
|
8921
|
-
jsx("
|
|
8922
|
-
className: CSS.element(baseClass, "tag-
|
|
8923
|
-
|
|
8924
|
-
e.preventDefault();
|
|
8925
|
-
e.stopPropagation();
|
|
8926
|
-
},
|
|
8927
|
-
onClick: (e) => this.onClearClick(e, v),
|
|
8928
|
-
children: jsx(ClearIcon, {
|
|
8929
|
-
className: CSS.element(baseClass, "icon"),
|
|
8930
|
-
}),
|
|
8991
|
+
children: [
|
|
8992
|
+
jsx("span", {
|
|
8993
|
+
className: CSS.element(baseClass, "tag-value"),
|
|
8994
|
+
children: valueTextFormatter(v, instance),
|
|
8931
8995
|
}),
|
|
8932
|
-
|
|
8933
|
-
|
|
8934
|
-
|
|
8996
|
+
!readOnly &&
|
|
8997
|
+
jsx("div", {
|
|
8998
|
+
className: CSS.element(baseClass, "tag-clear"),
|
|
8999
|
+
onMouseDown: (e) => {
|
|
9000
|
+
e.preventDefault();
|
|
9001
|
+
e.stopPropagation();
|
|
9002
|
+
},
|
|
9003
|
+
onClick: (e) => this.onClearClick(e, v),
|
|
9004
|
+
children: jsx(ClearIcon, {
|
|
9005
|
+
className: CSS.element(baseClass, "icon"),
|
|
9006
|
+
}),
|
|
9007
|
+
}),
|
|
9008
|
+
],
|
|
9009
|
+
},
|
|
9010
|
+
i,
|
|
9011
|
+
),
|
|
8935
9012
|
),
|
|
8936
|
-
);
|
|
9013
|
+
});
|
|
8937
9014
|
} else {
|
|
8938
9015
|
text = this.getPlaceholder(data.placeholder);
|
|
8939
9016
|
}
|
|
@@ -9432,6 +9509,7 @@ class NumberField extends Field {
|
|
|
9432
9509
|
icon: undefined,
|
|
9433
9510
|
scale: undefined,
|
|
9434
9511
|
offset: undefined,
|
|
9512
|
+
focused: undefined,
|
|
9435
9513
|
},
|
|
9436
9514
|
...args,
|
|
9437
9515
|
);
|
|
@@ -9514,6 +9592,7 @@ Widget.alias("numberfield", NumberField);
|
|
|
9514
9592
|
Localization.registerPrototype("cx/widgets/NumberField", NumberField);
|
|
9515
9593
|
let Input$1 = class Input extends VDOM.Component {
|
|
9516
9594
|
input;
|
|
9595
|
+
unsubscribeOnWheel;
|
|
9517
9596
|
constructor(props) {
|
|
9518
9597
|
super(props);
|
|
9519
9598
|
this.state = {
|
|
@@ -9579,13 +9658,8 @@ let Input$1 = class Input extends VDOM.Component {
|
|
|
9579
9658
|
onMouseLeave: (e) => tooltipMouseLeave$1(e, ...getFieldTooltip(this.props.instance)),
|
|
9580
9659
|
onChange: (e) => this.onChange(e, "change"),
|
|
9581
9660
|
onKeyDown: this.onKeyDown.bind(this),
|
|
9582
|
-
onBlur: (e) =>
|
|
9583
|
-
this.onChange(e, "blur");
|
|
9584
|
-
},
|
|
9661
|
+
onBlur: (e) => this.onBlur(e),
|
|
9585
9662
|
onFocus: (e) => this.onFocus(),
|
|
9586
|
-
onWheel: (e) => {
|
|
9587
|
-
this.onChange(e, "wheel");
|
|
9588
|
-
},
|
|
9589
9663
|
onClick: stopPropagation,
|
|
9590
9664
|
}),
|
|
9591
9665
|
insideButton,
|
|
@@ -9608,6 +9682,19 @@ let Input$1 = class Input extends VDOM.Component {
|
|
|
9608
9682
|
componentDidMount() {
|
|
9609
9683
|
tooltipParentDidMount$1(this.input, ...getFieldTooltip(this.props.instance));
|
|
9610
9684
|
autoFocus(this.input, this);
|
|
9685
|
+
let { widget } = this.props.instance;
|
|
9686
|
+
if (widget.reactOn.indexOf("wheel") !== -1) {
|
|
9687
|
+
this.unsubscribeOnWheel = addEventListenerWithOptions(
|
|
9688
|
+
this.input,
|
|
9689
|
+
"wheel",
|
|
9690
|
+
(e) => {
|
|
9691
|
+
this.onChange(e, "wheel");
|
|
9692
|
+
},
|
|
9693
|
+
{
|
|
9694
|
+
passive: false,
|
|
9695
|
+
},
|
|
9696
|
+
);
|
|
9697
|
+
}
|
|
9611
9698
|
}
|
|
9612
9699
|
componentDidUpdate() {
|
|
9613
9700
|
autoFocus(this.input, this);
|
|
@@ -9622,6 +9709,7 @@ let Input$1 = class Input extends VDOM.Component {
|
|
|
9622
9709
|
);
|
|
9623
9710
|
}
|
|
9624
9711
|
tooltipParentWillUnmount$1(this.props.instance);
|
|
9712
|
+
this.unsubscribeOnWheel?.();
|
|
9625
9713
|
}
|
|
9626
9714
|
getPreCursorDigits(text, cursor, decimalSeparator) {
|
|
9627
9715
|
let res = "";
|
|
@@ -9803,6 +9891,18 @@ let Input$1 = class Input extends VDOM.Component {
|
|
|
9803
9891
|
this.setState({
|
|
9804
9892
|
focus: true,
|
|
9805
9893
|
});
|
|
9894
|
+
instance.set("focused", true);
|
|
9895
|
+
}
|
|
9896
|
+
}
|
|
9897
|
+
onBlur(e) {
|
|
9898
|
+
let { instance } = this.props;
|
|
9899
|
+
let { widget } = instance;
|
|
9900
|
+
this.onChange(e, "blur");
|
|
9901
|
+
if (widget.trackFocus && this.state.focus) {
|
|
9902
|
+
this.setState({
|
|
9903
|
+
focus: false,
|
|
9904
|
+
});
|
|
9905
|
+
instance.set("focused", false);
|
|
9806
9906
|
}
|
|
9807
9907
|
}
|
|
9808
9908
|
};
|
|
@@ -10180,7 +10280,7 @@ class MonthPicker extends Field {
|
|
|
10180
10280
|
MonthPicker.prototype.baseClass = "monthpicker";
|
|
10181
10281
|
MonthPicker.prototype.range = false;
|
|
10182
10282
|
MonthPicker.prototype.startYear = 1980;
|
|
10183
|
-
MonthPicker.prototype.endYear =
|
|
10283
|
+
MonthPicker.prototype.endYear = 2050;
|
|
10184
10284
|
MonthPicker.prototype.bufferSize = 15;
|
|
10185
10285
|
MonthPicker.prototype.hideQuarters = false;
|
|
10186
10286
|
// Localization
|
|
@@ -10241,7 +10341,7 @@ class MonthPickerComponent extends VDOM.Component {
|
|
|
10241
10341
|
return cursor;
|
|
10242
10342
|
}
|
|
10243
10343
|
moveCursor(e, data, options = {}) {
|
|
10244
|
-
e.preventDefault();
|
|
10344
|
+
//e.preventDefault();
|
|
10245
10345
|
e.stopPropagation();
|
|
10246
10346
|
if ("cursorYear" in data && data.cursorYear !== undefined) {
|
|
10247
10347
|
let { startYear, endYear } = this.props.instance.widget;
|
|
@@ -10254,12 +10354,25 @@ class MonthPickerComponent extends VDOM.Component {
|
|
|
10254
10354
|
let tbody = this.dom.table?.children?.[index];
|
|
10255
10355
|
if (tbody) scrollElementIntoView(tbody);
|
|
10256
10356
|
}
|
|
10357
|
+
if (options.select) {
|
|
10358
|
+
let { instance } = this.props;
|
|
10359
|
+
let { widget, data } = instance;
|
|
10360
|
+
let [cursorFromDate, cursorToDate] = this.getCursorDates();
|
|
10361
|
+
let originFromDate = cursorFromDate,
|
|
10362
|
+
originToDate = cursorToDate;
|
|
10363
|
+
if (widget.range) {
|
|
10364
|
+
if (data.from) originFromDate = data.from;
|
|
10365
|
+
if (data.to) originToDate = data.to;
|
|
10366
|
+
}
|
|
10367
|
+
widget.handleSelect(e, instance, minDate(originFromDate, cursorFromDate), maxDate(originToDate, cursorToDate));
|
|
10368
|
+
}
|
|
10257
10369
|
});
|
|
10258
10370
|
}
|
|
10259
10371
|
handleKeyPress(e) {
|
|
10260
10372
|
let { instance } = this.props;
|
|
10261
10373
|
let { widget } = this.props.instance;
|
|
10262
10374
|
let { cursorMonth, cursorYear, cursorQuarter, column } = this.state;
|
|
10375
|
+
let select = widget.range && e.shiftKey;
|
|
10263
10376
|
switch (e.keyCode) {
|
|
10264
10377
|
case KeyCode.enter:
|
|
10265
10378
|
// if (widget.range && e.shiftKey && !this.dragStartDates) {
|
|
@@ -10273,47 +10386,90 @@ class MonthPickerComponent extends VDOM.Component {
|
|
|
10273
10386
|
break;
|
|
10274
10387
|
case KeyCode.left:
|
|
10275
10388
|
if (column == "Y")
|
|
10276
|
-
this.moveCursor(
|
|
10277
|
-
|
|
10278
|
-
|
|
10279
|
-
|
|
10280
|
-
|
|
10389
|
+
this.moveCursor(
|
|
10390
|
+
e,
|
|
10391
|
+
{
|
|
10392
|
+
cursorQuarter: 3,
|
|
10393
|
+
cursorYear: cursorYear - 1,
|
|
10394
|
+
column: "Q",
|
|
10395
|
+
},
|
|
10396
|
+
{
|
|
10397
|
+
select,
|
|
10398
|
+
},
|
|
10399
|
+
);
|
|
10281
10400
|
else if (column == "Q")
|
|
10282
|
-
this.moveCursor(
|
|
10283
|
-
|
|
10284
|
-
|
|
10285
|
-
|
|
10401
|
+
this.moveCursor(
|
|
10402
|
+
e,
|
|
10403
|
+
{
|
|
10404
|
+
cursorMonth: cursorQuarter * 4,
|
|
10405
|
+
column: "M",
|
|
10406
|
+
},
|
|
10407
|
+
{
|
|
10408
|
+
select,
|
|
10409
|
+
},
|
|
10410
|
+
);
|
|
10286
10411
|
else if (column == "M" && (cursorMonth - 1) % 3 == 0)
|
|
10287
10412
|
this.moveCursor(e, {
|
|
10288
10413
|
column: "Y",
|
|
10289
10414
|
});
|
|
10290
10415
|
else
|
|
10291
|
-
this.moveCursor(
|
|
10292
|
-
|
|
10293
|
-
|
|
10416
|
+
this.moveCursor(
|
|
10417
|
+
e,
|
|
10418
|
+
{
|
|
10419
|
+
cursorMonth: cursorMonth - 1,
|
|
10420
|
+
},
|
|
10421
|
+
{
|
|
10422
|
+
select,
|
|
10423
|
+
},
|
|
10424
|
+
);
|
|
10294
10425
|
break;
|
|
10295
10426
|
case KeyCode.right:
|
|
10296
10427
|
if (column == "Y")
|
|
10297
|
-
this.moveCursor(
|
|
10298
|
-
|
|
10299
|
-
|
|
10300
|
-
|
|
10428
|
+
this.moveCursor(
|
|
10429
|
+
e,
|
|
10430
|
+
{
|
|
10431
|
+
cursorMonth: 1,
|
|
10432
|
+
column: "M",
|
|
10433
|
+
},
|
|
10434
|
+
{
|
|
10435
|
+
select,
|
|
10436
|
+
},
|
|
10437
|
+
);
|
|
10301
10438
|
else if (column == "Q")
|
|
10302
|
-
this.moveCursor(
|
|
10303
|
-
|
|
10304
|
-
|
|
10305
|
-
|
|
10439
|
+
this.moveCursor(
|
|
10440
|
+
e,
|
|
10441
|
+
{
|
|
10442
|
+
column: "Y",
|
|
10443
|
+
cursorYear: cursorQuarter == 3 ? cursorYear + 1 : cursorYear,
|
|
10444
|
+
},
|
|
10445
|
+
{
|
|
10446
|
+
select,
|
|
10447
|
+
},
|
|
10448
|
+
);
|
|
10306
10449
|
else if (column == "M" && (cursorMonth - 1) % 3 == 2)
|
|
10307
|
-
this.moveCursor(
|
|
10308
|
-
|
|
10309
|
-
|
|
10310
|
-
|
|
10450
|
+
this.moveCursor(
|
|
10451
|
+
e,
|
|
10452
|
+
{
|
|
10453
|
+
column: "Q",
|
|
10454
|
+
cursorQuarter: Math.floor((cursorMonth - 1) / 3),
|
|
10455
|
+
},
|
|
10456
|
+
{
|
|
10457
|
+
select,
|
|
10458
|
+
},
|
|
10459
|
+
);
|
|
10311
10460
|
else
|
|
10312
|
-
this.moveCursor(
|
|
10313
|
-
|
|
10314
|
-
|
|
10461
|
+
this.moveCursor(
|
|
10462
|
+
e,
|
|
10463
|
+
{
|
|
10464
|
+
cursorMonth: cursorMonth + 1,
|
|
10465
|
+
},
|
|
10466
|
+
{
|
|
10467
|
+
select,
|
|
10468
|
+
},
|
|
10469
|
+
);
|
|
10315
10470
|
break;
|
|
10316
10471
|
case KeyCode.up:
|
|
10472
|
+
e.preventDefault(); // prevent scroll
|
|
10317
10473
|
if (column == "Y")
|
|
10318
10474
|
this.moveCursor(
|
|
10319
10475
|
e,
|
|
@@ -10322,6 +10478,7 @@ class MonthPickerComponent extends VDOM.Component {
|
|
|
10322
10478
|
},
|
|
10323
10479
|
{
|
|
10324
10480
|
ensureVisible: true,
|
|
10481
|
+
select,
|
|
10325
10482
|
},
|
|
10326
10483
|
);
|
|
10327
10484
|
else if (column == "Q")
|
|
@@ -10333,6 +10490,7 @@ class MonthPickerComponent extends VDOM.Component {
|
|
|
10333
10490
|
},
|
|
10334
10491
|
{
|
|
10335
10492
|
ensureVisible: true,
|
|
10493
|
+
select,
|
|
10336
10494
|
},
|
|
10337
10495
|
);
|
|
10338
10496
|
else if (column == "M")
|
|
@@ -10344,6 +10502,7 @@ class MonthPickerComponent extends VDOM.Component {
|
|
|
10344
10502
|
},
|
|
10345
10503
|
{
|
|
10346
10504
|
ensureVisible: true,
|
|
10505
|
+
select,
|
|
10347
10506
|
},
|
|
10348
10507
|
);
|
|
10349
10508
|
else
|
|
@@ -10355,10 +10514,12 @@ class MonthPickerComponent extends VDOM.Component {
|
|
|
10355
10514
|
},
|
|
10356
10515
|
{
|
|
10357
10516
|
ensureVisible: true,
|
|
10517
|
+
select,
|
|
10358
10518
|
},
|
|
10359
10519
|
);
|
|
10360
10520
|
break;
|
|
10361
10521
|
case KeyCode.down:
|
|
10522
|
+
e.preventDefault(); // prevent scroll
|
|
10362
10523
|
if (column == "Y")
|
|
10363
10524
|
this.moveCursor(
|
|
10364
10525
|
e,
|
|
@@ -10367,6 +10528,7 @@ class MonthPickerComponent extends VDOM.Component {
|
|
|
10367
10528
|
},
|
|
10368
10529
|
{
|
|
10369
10530
|
ensureVisible: true,
|
|
10531
|
+
select,
|
|
10370
10532
|
},
|
|
10371
10533
|
);
|
|
10372
10534
|
else if (column == "Q")
|
|
@@ -10378,6 +10540,7 @@ class MonthPickerComponent extends VDOM.Component {
|
|
|
10378
10540
|
},
|
|
10379
10541
|
{
|
|
10380
10542
|
ensureVisible: true,
|
|
10543
|
+
select,
|
|
10381
10544
|
},
|
|
10382
10545
|
);
|
|
10383
10546
|
else if (column == "M")
|
|
@@ -10389,6 +10552,7 @@ class MonthPickerComponent extends VDOM.Component {
|
|
|
10389
10552
|
},
|
|
10390
10553
|
{
|
|
10391
10554
|
ensureVisible: true,
|
|
10555
|
+
select,
|
|
10392
10556
|
},
|
|
10393
10557
|
);
|
|
10394
10558
|
else
|
|
@@ -10400,18 +10564,33 @@ class MonthPickerComponent extends VDOM.Component {
|
|
|
10400
10564
|
},
|
|
10401
10565
|
{
|
|
10402
10566
|
ensureVisible: true,
|
|
10567
|
+
select,
|
|
10403
10568
|
},
|
|
10404
10569
|
);
|
|
10405
10570
|
break;
|
|
10406
10571
|
case KeyCode.pageUp:
|
|
10407
|
-
this.moveCursor(
|
|
10408
|
-
|
|
10409
|
-
|
|
10572
|
+
this.moveCursor(
|
|
10573
|
+
e,
|
|
10574
|
+
{
|
|
10575
|
+
cursorYear: this.state.cursorYear - 1,
|
|
10576
|
+
},
|
|
10577
|
+
{
|
|
10578
|
+
ensureVisible: true,
|
|
10579
|
+
select,
|
|
10580
|
+
},
|
|
10581
|
+
);
|
|
10410
10582
|
break;
|
|
10411
10583
|
case KeyCode.pageDown:
|
|
10412
|
-
this.moveCursor(
|
|
10413
|
-
|
|
10414
|
-
|
|
10584
|
+
this.moveCursor(
|
|
10585
|
+
e,
|
|
10586
|
+
{
|
|
10587
|
+
cursorYear: this.state.cursorYear + 1,
|
|
10588
|
+
},
|
|
10589
|
+
{
|
|
10590
|
+
ensureVisible: true,
|
|
10591
|
+
select,
|
|
10592
|
+
},
|
|
10593
|
+
);
|
|
10415
10594
|
break;
|
|
10416
10595
|
default:
|
|
10417
10596
|
if (widget.onKeyDown) instance.invoke("onKeyDown", e, instance);
|
|
@@ -10468,9 +10647,9 @@ class MonthPickerComponent extends VDOM.Component {
|
|
|
10468
10647
|
if (this.state.state == "drag") this.handleMouseUp(e);
|
|
10469
10648
|
}
|
|
10470
10649
|
handleMouseEnter(e) {
|
|
10650
|
+
if (this.state.state != "drag") return;
|
|
10471
10651
|
let cursor = this.extractCursorInfo(e.target);
|
|
10472
10652
|
if (cursor) {
|
|
10473
|
-
cursor.hover = !isTouchEvent();
|
|
10474
10653
|
this.moveCursor(e, cursor);
|
|
10475
10654
|
}
|
|
10476
10655
|
}
|
|
@@ -10480,7 +10659,9 @@ class MonthPickerComponent extends VDOM.Component {
|
|
|
10480
10659
|
if (!cursor) {
|
|
10481
10660
|
cursor = this.extractCursorInfo(e.currentTarget);
|
|
10482
10661
|
if (!cursor) return;
|
|
10483
|
-
this.moveCursor(e, cursor
|
|
10662
|
+
this.moveCursor(e, cursor, {
|
|
10663
|
+
select: !widget.range,
|
|
10664
|
+
});
|
|
10484
10665
|
}
|
|
10485
10666
|
e.stopPropagation();
|
|
10486
10667
|
preventFocusOnTouch(e);
|
|
@@ -10545,7 +10726,7 @@ class MonthPickerComponent extends VDOM.Component {
|
|
|
10545
10726
|
}
|
|
10546
10727
|
}
|
|
10547
10728
|
let monthNames = Culture.getDateTimeCulture().getMonthNames("short");
|
|
10548
|
-
let showCursor = this.state.
|
|
10729
|
+
let showCursor = this.state.focused;
|
|
10549
10730
|
for (let y = start; y <= end; y++) {
|
|
10550
10731
|
let selectableMonths = 0b111111111111;
|
|
10551
10732
|
// Loop through the months in a year to check if all months are unselectable
|
|
@@ -10712,18 +10893,15 @@ class MonthPickerComponent extends VDOM.Component {
|
|
|
10712
10893
|
startYear,
|
|
10713
10894
|
startYear + floor5(Math.floor(this.dom.el.scrollTop / this.state.yearHeight)) - visibleItems,
|
|
10714
10895
|
);
|
|
10715
|
-
if (start != this.state.start
|
|
10896
|
+
if (start != this.state.start) {
|
|
10716
10897
|
this.setState({
|
|
10717
10898
|
start,
|
|
10718
|
-
end: start +
|
|
10899
|
+
end: Math.min(start + bufferSize, endYear),
|
|
10719
10900
|
});
|
|
10720
10901
|
}
|
|
10721
10902
|
}
|
|
10722
10903
|
handleMouseLeave(e) {
|
|
10723
10904
|
tooltipMouseLeave$1(e, ...getFieldTooltip(this.props.instance));
|
|
10724
|
-
this.moveCursor(e, {
|
|
10725
|
-
hover: false,
|
|
10726
|
-
});
|
|
10727
10905
|
}
|
|
10728
10906
|
componentDidMount() {
|
|
10729
10907
|
//non-input, ok to focus on mobile
|
|
@@ -11390,6 +11568,7 @@ class MonthField extends Field {
|
|
|
11390
11568
|
data: instance.data,
|
|
11391
11569
|
instance: instance,
|
|
11392
11570
|
monthPicker: {
|
|
11571
|
+
mod: "dropdown",
|
|
11393
11572
|
...this.monthPickerOptions,
|
|
11394
11573
|
value: this.value,
|
|
11395
11574
|
from: this.from,
|
|
@@ -11838,6 +12017,7 @@ class ColorInput extends VDOM.Component {
|
|
|
11838
12017
|
relatedElement: this.input,
|
|
11839
12018
|
items: {
|
|
11840
12019
|
type: ColorPicker,
|
|
12020
|
+
mod: "dropdown",
|
|
11841
12021
|
...this.props.picker,
|
|
11842
12022
|
onColorClick: (e) => {
|
|
11843
12023
|
e.stopPropagation();
|
|
@@ -13784,6 +13964,7 @@ class DateTimeInput extends VDOM.Component {
|
|
|
13784
13964
|
},
|
|
13785
13965
|
onMouseDown: stopPropagation,
|
|
13786
13966
|
items: {
|
|
13967
|
+
mod: "dropdown",
|
|
13787
13968
|
...pickerConfig,
|
|
13788
13969
|
...this.props.picker,
|
|
13789
13970
|
autoFocus: !dateTimeWidget.focusInputFirst,
|
|
@@ -14539,7 +14720,10 @@ class Grid extends ContainerBase {
|
|
|
14539
14720
|
if (instance.cached) delete instance.cached.rawData;
|
|
14540
14721
|
}
|
|
14541
14722
|
createRowTemplate(context, columnParams, instance, groupingData) {
|
|
14542
|
-
|
|
14723
|
+
// Clone row to avoid mutating the original config
|
|
14724
|
+
var row = {
|
|
14725
|
+
...this.row,
|
|
14726
|
+
};
|
|
14543
14727
|
let columns = this.columns;
|
|
14544
14728
|
if (this.onGetColumns) {
|
|
14545
14729
|
let result = instance.invoke("onGetColumns", columnParams, instance);
|
|
@@ -14560,8 +14744,13 @@ class Grid extends ContainerBase {
|
|
|
14560
14744
|
for (let i = 0; i < 10; i++) {
|
|
14561
14745
|
let l = row["line" + i];
|
|
14562
14746
|
if (l) {
|
|
14563
|
-
if (isArray(l.columns))
|
|
14564
|
-
|
|
14747
|
+
if (isArray(l.columns)) {
|
|
14748
|
+
// Clone columns to avoid mutating the original config
|
|
14749
|
+
l.columns = l.columns.map((col, c) => ({
|
|
14750
|
+
...col,
|
|
14751
|
+
uniqueColumnId: `l${i}-${col.key || c}`,
|
|
14752
|
+
}));
|
|
14753
|
+
}
|
|
14565
14754
|
lines.push(l);
|
|
14566
14755
|
}
|
|
14567
14756
|
}
|
|
@@ -17635,7 +17824,13 @@ class TreeNode extends ContainerBase {
|
|
|
17635
17824
|
jsxs("div", {
|
|
17636
17825
|
className: CSS.element(baseClass, "handle"),
|
|
17637
17826
|
onClick: (e) => this.toggle(e, instance),
|
|
17638
|
-
onMouseDown:
|
|
17827
|
+
onMouseDown:
|
|
17828
|
+
!this.hideIcon && !data.leaf
|
|
17829
|
+
? (e) => {
|
|
17830
|
+
e.stopPropagation();
|
|
17831
|
+
e.preventDefault();
|
|
17832
|
+
}
|
|
17833
|
+
: undefined,
|
|
17639
17834
|
children: [
|
|
17640
17835
|
!data.leaf &&
|
|
17641
17836
|
!data.hideArrow &&
|
|
@@ -17708,7 +17903,7 @@ class Pagination extends Widget {
|
|
|
17708
17903
|
for (let p = minPage - 1; p <= maxPage + 1; p++) {
|
|
17709
17904
|
pageBtns.push(
|
|
17710
17905
|
jsx(
|
|
17711
|
-
"
|
|
17906
|
+
"div",
|
|
17712
17907
|
{
|
|
17713
17908
|
className: CSS.element(baseClass, "page", {
|
|
17714
17909
|
active: page == p,
|
|
@@ -17729,7 +17924,7 @@ class Pagination extends Widget {
|
|
|
17729
17924
|
);
|
|
17730
17925
|
}
|
|
17731
17926
|
return jsx(
|
|
17732
|
-
"
|
|
17927
|
+
"div",
|
|
17733
17928
|
{
|
|
17734
17929
|
className: data.classNames,
|
|
17735
17930
|
style: data.style,
|
|
@@ -18216,6 +18411,7 @@ export {
|
|
|
18216
18411
|
Option,
|
|
18217
18412
|
Overlay,
|
|
18218
18413
|
OverlayBase,
|
|
18414
|
+
OverlayBeacon,
|
|
18219
18415
|
OverlayComponent,
|
|
18220
18416
|
OverlayInstance,
|
|
18221
18417
|
Pagination,
|