cx 26.6.0 → 26.7.1
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/data/ExposedValueView.js +1 -1
- package/build/data/comparer.d.ts +6 -8
- package/build/data/comparer.d.ts.map +1 -1
- package/build/ui/Cx.d.ts +5 -0
- package/build/ui/Cx.d.ts.map +1 -1
- package/build/ui/Cx.js +34 -3
- package/build/ui/Prop.d.ts +1 -1
- package/build/ui/Prop.d.ts.map +1 -1
- package/build/ui/Restate.d.ts +6 -0
- package/build/ui/Restate.d.ts.map +1 -1
- package/build/ui/Restate.js +2 -1
- package/build/ui/adapter/ArrayAdapter.d.ts +4 -6
- package/build/ui/adapter/ArrayAdapter.d.ts.map +1 -1
- package/build/ui/adapter/GroupAdapter.d.ts +22 -2
- package/build/ui/adapter/GroupAdapter.d.ts.map +1 -1
- package/build/ui/adapter/GroupAdapter.js +80 -5
- package/build/widgets/DocumentTitle.d.ts.map +1 -1
- package/build/widgets/DocumentTitle.js +2 -0
- package/build/widgets/drag-drop/DragSource.d.ts +3 -2
- package/build/widgets/drag-drop/DragSource.d.ts.map +1 -1
- package/build/widgets/drag-drop/DropZone.d.ts +4 -4
- package/build/widgets/drag-drop/DropZone.d.ts.map +1 -1
- package/build/widgets/drag-drop/ops.d.ts +13 -2
- package/build/widgets/drag-drop/ops.d.ts.map +1 -1
- package/build/widgets/drag-drop/ops.js +36 -9
- package/build/widgets/form/NumberField.js +1 -0
- package/build/widgets/grid/Grid.d.ts +19 -3
- package/build/widgets/grid/Grid.d.ts.map +1 -1
- package/build/widgets/grid/Grid.js +2 -0
- package/build/widgets/grid/TreeNode.d.ts +2 -0
- package/build/widgets/grid/TreeNode.d.ts.map +1 -1
- package/build/widgets/overlay/captureMouse.d.ts +4 -4
- package/build/widgets/overlay/captureMouse.d.ts.map +1 -1
- package/build/widgets/overlay/captureMouse.js +8 -3
- package/dist/data.js +1 -1
- package/dist/manifest.js +866 -866
- package/dist/ui.js +130 -12
- package/dist/widgets.css +4 -0
- package/dist/widgets.js +43 -10
- package/package.json +1 -1
- package/src/data/ExposedValueView.spec.ts +57 -0
- package/src/data/ExposedValueView.ts +1 -1
- package/src/data/comparer.ts +6 -7
- package/src/ui/Cx.tsx +44 -3
- package/src/ui/DataProxy.ts +55 -55
- package/src/ui/Prop.ts +1 -1
- package/src/ui/Rescope.ts +50 -50
- package/src/ui/Restate.tsx +9 -0
- package/src/ui/adapter/ArrayAdapter.ts +6 -8
- package/src/ui/adapter/GroupAdapter.spec.ts +75 -0
- package/src/ui/adapter/GroupAdapter.ts +103 -10
- package/src/ui/exprHelpers.ts +96 -96
- package/src/widgets/DocumentTitle.ts +2 -0
- package/src/widgets/Sandbox.ts +104 -104
- package/src/widgets/drag-drop/DragSource.tsx +3 -3
- package/src/widgets/drag-drop/DropZone.tsx +5 -5
- package/src/widgets/drag-drop/ops.tsx +54 -12
- package/src/widgets/form/ColorField.scss +112 -112
- package/src/widgets/form/DateTimeField.scss +111 -111
- package/src/widgets/form/LookupField.maps.scss +26 -26
- package/src/widgets/form/MonthField.scss +113 -113
- package/src/widgets/form/NumberField.scss +4 -0
- package/src/widgets/form/NumberField.tsx +1 -0
- package/src/widgets/form/Select.scss +104 -104
- package/src/widgets/form/TextField.scss +66 -66
- package/src/widgets/grid/Grid.tsx +23 -2
- package/src/widgets/grid/TreeNode.tsx +3 -0
- package/src/widgets/nav/MenuItem.tsx +525 -525
- package/src/widgets/overlay/captureMouse.ts +14 -7
|
@@ -31,7 +31,7 @@ interface CaptureMouseOptions {
|
|
|
31
31
|
export function captureMouse2(
|
|
32
32
|
e: React.MouseEvent | React.TouchEvent | MouseEvent | TouchEvent,
|
|
33
33
|
options: CaptureMouseOptions,
|
|
34
|
-
): void {
|
|
34
|
+
): () => void {
|
|
35
35
|
let surface = document.createElement("div");
|
|
36
36
|
surface.className = "cxb-mousecapture";
|
|
37
37
|
surface.style.cursor = options.cursor || getComputedStyle(e.currentTarget as Element).cursor;
|
|
@@ -67,6 +67,8 @@ export function captureMouse2(
|
|
|
67
67
|
|
|
68
68
|
e.stopPropagation();
|
|
69
69
|
|
|
70
|
+
return tear;
|
|
71
|
+
|
|
70
72
|
function move(e: Event) {
|
|
71
73
|
if (!active) {
|
|
72
74
|
tear();
|
|
@@ -110,7 +112,7 @@ export function captureMouse2(
|
|
|
110
112
|
export function captureMouseOrTouch2(
|
|
111
113
|
e: React.MouseEvent | React.TouchEvent | MouseEvent | TouchEvent,
|
|
112
114
|
options: CaptureMouseOptions,
|
|
113
|
-
): void {
|
|
115
|
+
): () => void {
|
|
114
116
|
if (e.type.indexOf("touch") == 0) {
|
|
115
117
|
let el = e.currentTarget as HTMLElement;
|
|
116
118
|
|
|
@@ -136,7 +138,12 @@ export function captureMouseOrTouch2(
|
|
|
136
138
|
el.addEventListener("touchend", end);
|
|
137
139
|
|
|
138
140
|
e.stopPropagation();
|
|
139
|
-
|
|
141
|
+
|
|
142
|
+
return () => {
|
|
143
|
+
el.removeEventListener("touchmove", move);
|
|
144
|
+
el.removeEventListener("touchend", end);
|
|
145
|
+
};
|
|
146
|
+
} else return captureMouse2(e, options);
|
|
140
147
|
}
|
|
141
148
|
|
|
142
149
|
/**
|
|
@@ -153,8 +160,8 @@ export function captureMouse(
|
|
|
153
160
|
onMouseUp?: (e: MouseEvent | TouchEvent, captureData?: any) => void,
|
|
154
161
|
captureData?: any,
|
|
155
162
|
cursor?: string,
|
|
156
|
-
): void {
|
|
157
|
-
captureMouse2(e, {
|
|
163
|
+
): () => void {
|
|
164
|
+
return captureMouse2(e, {
|
|
158
165
|
onMouseMove,
|
|
159
166
|
onMouseUp,
|
|
160
167
|
captureData,
|
|
@@ -176,8 +183,8 @@ export function captureMouseOrTouch(
|
|
|
176
183
|
onMouseUp?: (e: MouseEvent, captureData?: any) => void,
|
|
177
184
|
captureData?: any,
|
|
178
185
|
cursor?: string,
|
|
179
|
-
): void {
|
|
180
|
-
captureMouseOrTouch2(e, { onMouseMove, onMouseUp, captureData, cursor });
|
|
186
|
+
): () => void {
|
|
187
|
+
return captureMouseOrTouch2(e, { onMouseMove, onMouseUp, captureData, cursor });
|
|
181
188
|
}
|
|
182
189
|
|
|
183
190
|
/**
|