cx 25.7.0 → 25.10.0
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/dist/charts.css +250 -250
- package/dist/charts.js +134 -120
- package/dist/data.js +19 -19
- package/dist/hooks.js +1 -1
- package/dist/manifest.js +673 -673
- package/dist/svg.js +25 -25
- package/dist/ui.js +84 -84
- package/dist/util.js +9 -6
- package/dist/widgets.css +6 -6
- package/dist/widgets.js +520 -509
- package/package.json +1 -1
- package/src/charts/axis/Axis.js +8 -0
- package/src/widgets/form/TextArea.js +12 -3
- package/src/widgets/grid/Grid.js +24 -21
package/package.json
CHANGED
package/src/charts/axis/Axis.js
CHANGED
|
@@ -220,6 +220,13 @@ export class Axis extends BoundedObject {
|
|
|
220
220
|
}
|
|
221
221
|
|
|
222
222
|
lines.forEach((p, i) => {
|
|
223
|
+
let data =
|
|
224
|
+
p.data != null
|
|
225
|
+
? Object.entries(p.data).reduce((acc, [key, val]) => {
|
|
226
|
+
acc[`data-${key}`] = val;
|
|
227
|
+
return acc;
|
|
228
|
+
}, {})
|
|
229
|
+
: null;
|
|
223
230
|
result.push(
|
|
224
231
|
<tspan
|
|
225
232
|
key={i}
|
|
@@ -228,6 +235,7 @@ export class Axis extends BoundedObject {
|
|
|
228
235
|
style={p.style}
|
|
229
236
|
className={p.className}
|
|
230
237
|
dx={dx}
|
|
238
|
+
{...data}
|
|
231
239
|
>
|
|
232
240
|
{p.text}
|
|
233
241
|
</tspan>,
|
|
@@ -96,9 +96,7 @@ class Input extends VDOM.Component {
|
|
|
96
96
|
{...data.inputAttrs}
|
|
97
97
|
onInput={(e) => this.onChange(e.target.value, "input")}
|
|
98
98
|
onChange={(e) => this.onChange(e.target.value, "change")}
|
|
99
|
-
onBlur={(e) =>
|
|
100
|
-
this.onChange(e.target.value, "blur");
|
|
101
|
-
}}
|
|
99
|
+
onBlur={(e) => this.onBlur(e)}
|
|
102
100
|
onFocus={(e) => this.onFocus()}
|
|
103
101
|
onClick={stopPropagation}
|
|
104
102
|
onKeyDown={(e) => this.onKeyDown(e)}
|
|
@@ -179,7 +177,18 @@ class Input extends VDOM.Component {
|
|
|
179
177
|
this.setState({
|
|
180
178
|
focus: true,
|
|
181
179
|
});
|
|
180
|
+
|
|
181
|
+
instance.set("focused", true);
|
|
182
|
+
}
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
onBlur(e) {
|
|
186
|
+
const { instance } = this.props;
|
|
187
|
+
if (instance.widget.trackFocus) {
|
|
188
|
+
instance.set("focused", false);
|
|
182
189
|
}
|
|
190
|
+
|
|
191
|
+
this.onChange(e.target.value, "blur");
|
|
183
192
|
}
|
|
184
193
|
}
|
|
185
194
|
|
package/src/widgets/grid/Grid.js
CHANGED
|
@@ -102,7 +102,7 @@ export class Grid extends Container {
|
|
|
102
102
|
colWidth: {},
|
|
103
103
|
lockedColWidth: {},
|
|
104
104
|
dimensionsVersion: 0,
|
|
105
|
-
disableDefaultSort: false
|
|
105
|
+
disableDefaultSort: false,
|
|
106
106
|
};
|
|
107
107
|
instance.v = 0;
|
|
108
108
|
if (this.infinite)
|
|
@@ -183,16 +183,16 @@ export class Grid extends Container {
|
|
|
183
183
|
value: isDefined(c.aggregateValue)
|
|
184
184
|
? c.aggregateValue
|
|
185
185
|
: isDefined(c.value)
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
186
|
+
? c.value
|
|
187
|
+
: c.aggregateField
|
|
188
|
+
? { bind: this.recordName + "." + c.aggregateField }
|
|
189
|
+
: null,
|
|
190
190
|
weight:
|
|
191
191
|
c.weight != null
|
|
192
192
|
? c.weight
|
|
193
193
|
: c.weightField && {
|
|
194
|
-
|
|
195
|
-
|
|
194
|
+
bind: this.recordName + "." + c.weightField,
|
|
195
|
+
},
|
|
196
196
|
type: c.aggregate,
|
|
197
197
|
};
|
|
198
198
|
} else if (c.footer && !showFooter) {
|
|
@@ -555,8 +555,9 @@ export class Grid extends Container {
|
|
|
555
555
|
let initialPosition = getCursorPos(e);
|
|
556
556
|
resizeOverlayEl.className = CSS.element(baseClass, "resize-overlay");
|
|
557
557
|
resizeOverlayEl.style.width = `${initialWidth}px`;
|
|
558
|
-
resizeOverlayEl.style.left = `${
|
|
559
|
-
|
|
558
|
+
resizeOverlayEl.style.left = `${
|
|
559
|
+
headerCell.getBoundingClientRect().left - gridEl.getBoundingClientRect().left
|
|
560
|
+
}px`;
|
|
560
561
|
gridEl.appendChild(resizeOverlayEl);
|
|
561
562
|
captureMouse2(e, {
|
|
562
563
|
onMouseMove: (e) => {
|
|
@@ -818,7 +819,7 @@ export class Grid extends Container {
|
|
|
818
819
|
widget: () => <div className={CSS.element(baseClass, "col-header-drag-clone")}>{data.text}</div>,
|
|
819
820
|
},
|
|
820
821
|
},
|
|
821
|
-
() => {
|
|
822
|
+
() => {},
|
|
822
823
|
);
|
|
823
824
|
}
|
|
824
825
|
}
|
|
@@ -861,14 +862,14 @@ export class Grid extends Container {
|
|
|
861
862
|
|
|
862
863
|
let sorters = direction
|
|
863
864
|
? [
|
|
864
|
-
|
|
865
|
-
|
|
866
|
-
|
|
867
|
-
|
|
868
|
-
|
|
869
|
-
|
|
870
|
-
|
|
871
|
-
|
|
865
|
+
{
|
|
866
|
+
field,
|
|
867
|
+
direction,
|
|
868
|
+
value,
|
|
869
|
+
comparer,
|
|
870
|
+
sortOptions,
|
|
871
|
+
},
|
|
872
|
+
]
|
|
872
873
|
: null;
|
|
873
874
|
|
|
874
875
|
if (sorters == null) field = null;
|
|
@@ -1319,8 +1320,8 @@ class GridComponent extends VDOM.Component {
|
|
|
1319
1320
|
style={
|
|
1320
1321
|
this.rowHeight > 0
|
|
1321
1322
|
? {
|
|
1322
|
-
|
|
1323
|
-
|
|
1323
|
+
height: this.rowHeight + 1,
|
|
1324
|
+
}
|
|
1324
1325
|
: null
|
|
1325
1326
|
}
|
|
1326
1327
|
>
|
|
@@ -2458,6 +2459,7 @@ class GridComponent extends VDOM.Component {
|
|
|
2458
2459
|
headerHeight = this.dom.fixedHeader.offsetHeight;
|
|
2459
2460
|
this.dom.scroller.style.marginTop = `${headerHeight}px`;
|
|
2460
2461
|
if (this.dom.fixedScroller) this.dom.fixedScroller.style.marginTop = `${headerHeight}px`;
|
|
2462
|
+
else if (this.dom.fixedHeader.style.left != null) this.dom.fixedHeader.style.left = null;
|
|
2461
2463
|
} else {
|
|
2462
2464
|
this.dom.scroller.style.marginTop = 0;
|
|
2463
2465
|
if (this.dom.fixedScroller) this.dom.fixedScroller.style.marginTop = 0;
|
|
@@ -2510,6 +2512,7 @@ class GridComponent extends VDOM.Component {
|
|
|
2510
2512
|
}
|
|
2511
2513
|
|
|
2512
2514
|
if (this.dom.fixedScroller) this.dom.fixedFooter.style.left = `${this.dom.fixedScroller.offsetWidth}px`;
|
|
2515
|
+
else if (this.dom.fixedFooter.style.left != null) this.dom.fixedFooter.style.left = null;
|
|
2513
2516
|
}
|
|
2514
2517
|
|
|
2515
2518
|
this.dom.scroller.style.marginBottom = `${footerHeight}px`;
|
|
@@ -2731,7 +2734,7 @@ class GridComponent extends VDOM.Component {
|
|
|
2731
2734
|
hscroll = true;
|
|
2732
2735
|
item =
|
|
2733
2736
|
item.firstChild.children[
|
|
2734
|
-
|
|
2737
|
+
this.state.cursorCellIndex - this.props.instance.fixedColumnCount
|
|
2735
2738
|
];
|
|
2736
2739
|
} else {
|
|
2737
2740
|
let fixedItem = this.dom.fixedTable.querySelector(`tbody[data-record-key="${record.key}"]`);
|