cx 24.3.11 → 24.4.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/dist/charts.css +6 -0
- package/dist/charts.js +307 -62
- package/dist/manifest.js +720 -719
- package/dist/ui.js +2 -75
- package/package.json +1 -1
- package/src/charts/BarGraph.d.ts +7 -9
- package/src/charts/ColumnGraph.d.ts +10 -12
- package/src/charts/LineGraph.d.ts +1 -1
- package/src/charts/PieChart.d.ts +6 -0
- package/src/charts/PieChart.js +162 -82
- package/src/charts/RangeMarker.d.ts +35 -0
- package/src/charts/RangeMarker.js +155 -0
- package/src/charts/RangeMarker.scss +15 -0
- package/src/charts/ScatterGraph.d.ts +30 -32
- package/src/charts/index.d.ts +1 -0
- package/src/charts/index.js +1 -0
- package/src/charts/index.scss +1 -0
- package/src/charts/variables.scss +21 -20
- package/src/data/Expression.d.ts +17 -17
- package/src/data/Expression.js +220 -220
- package/src/data/StringTemplate.d.ts +15 -15
- package/src/data/StringTemplate.js +92 -92
- package/src/ui/Culture.d.ts +51 -51
- package/src/ui/Culture.js +129 -139
- package/src/ui/Cx.js +313 -313
- package/src/ui/Format.js +107 -107
- package/src/ui/Restate.d.ts +21 -21
- package/src/ui/Restate.js +163 -163
- package/src/ui/index.d.ts +0 -1
- package/src/ui/index.js +44 -45
- package/src/util/Console.d.ts +2 -7
- package/src/util/Format.d.ts +18 -18
- package/src/util/Format.js +234 -234
- package/src/widgets/drag-drop/DropZone.d.ts +9 -9
- package/src/widgets/grid/Grid.d.ts +12 -12
- package/src/ui/CultureScope.d.ts +0 -10
- package/src/ui/CultureScope.js +0 -53
|
@@ -284,18 +284,18 @@ interface GridProps<T = unknown> extends StyledContainerProps {
|
|
|
284
284
|
rowStyle?: StyleProp;
|
|
285
285
|
|
|
286
286
|
// drag-drop handlers
|
|
287
|
-
onDrop?: (e: GridDragEvent, instance: Instance) => void;
|
|
288
|
-
onDropTest?: (e: DragEvent, instance: Instance) => boolean;
|
|
289
|
-
onDragStart?: (e: DragEvent, instance: Instance) => void;
|
|
290
|
-
onDragEnd?: (e: DragEvent, instance: Instance) => void;
|
|
291
|
-
onDragOver?: (e: GridDragEvent, instance: Instance) => void | boolean;
|
|
292
|
-
|
|
293
|
-
onRowDropTest?: (e: DragEvent, instance: Instance) => boolean;
|
|
294
|
-
onRowDragOver?: (e: GridRowDragEvent, instance: Instance) => void | boolean;
|
|
295
|
-
onRowDrop?: (e: GridRowDragEvent, instance: Instance) => void | boolean;
|
|
296
|
-
|
|
297
|
-
onColumnDrop?: (e: GridColumnDropEvent, instance: Instance) => void;
|
|
298
|
-
onColumnDropTest?: (e: DragEvent, instance: Instance) => boolean;
|
|
287
|
+
onDrop?: string | ((e: GridDragEvent, instance: Instance) => void);
|
|
288
|
+
onDropTest?: string | ((e: DragEvent, instance: Instance) => boolean);
|
|
289
|
+
onDragStart?: string | ((e: DragEvent, instance: Instance) => void);
|
|
290
|
+
onDragEnd?: string | ((e: DragEvent, instance: Instance) => void);
|
|
291
|
+
onDragOver?: string | ((e: GridDragEvent, instance: Instance) => void | boolean);
|
|
292
|
+
|
|
293
|
+
onRowDropTest?: string | ((e: DragEvent, instance: Instance) => boolean);
|
|
294
|
+
onRowDragOver?: string | ((e: GridRowDragEvent, instance: Instance) => void | boolean);
|
|
295
|
+
onRowDrop?: string | ((e: GridRowDragEvent, instance: Instance) => void | boolean);
|
|
296
|
+
|
|
297
|
+
onColumnDrop?: string | ((e: GridColumnDropEvent, instance: Instance) => void);
|
|
298
|
+
onColumnDropTest?: string | ((e: DragEvent, instance: Instance) => boolean);
|
|
299
299
|
|
|
300
300
|
/** Parameters that affect filtering. */
|
|
301
301
|
filterParams?: StructuredProp;
|
package/src/ui/CultureScope.d.ts
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import * as Cx from "../core";
|
|
2
|
-
|
|
3
|
-
interface CultureScopeProps extends Cx.PureContainerProps {
|
|
4
|
-
culture: Cx.StringProp;
|
|
5
|
-
numberCulture: Cx.StringProp;
|
|
6
|
-
dateTimeCulture: Cx.StringProp;
|
|
7
|
-
defaultCurrency: Cx.StringProp;
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
export class CultureScope extends Cx.Widget<CultureScopeProps> {}
|
package/src/ui/CultureScope.js
DELETED
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
import { createCulture, popCulture, pushCulture } from "./Culture";
|
|
2
|
-
import { PureContainer } from "./PureContainer";
|
|
3
|
-
|
|
4
|
-
export class CultureScope extends PureContainer {
|
|
5
|
-
init() {
|
|
6
|
-
this.initialItems = this.items ?? this.children;
|
|
7
|
-
delete this.items;
|
|
8
|
-
delete this.children;
|
|
9
|
-
super.init();
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
declareData(...args) {
|
|
13
|
-
super.declareData(...args, {
|
|
14
|
-
culture: undefined,
|
|
15
|
-
numberCulture: undefined,
|
|
16
|
-
dateTimeCulture: undefined,
|
|
17
|
-
defaultCurrency: undefined,
|
|
18
|
-
});
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
prepareData(context, instance) {
|
|
22
|
-
super.prepareData(context, instance);
|
|
23
|
-
this.clear();
|
|
24
|
-
let { data } = instance;
|
|
25
|
-
|
|
26
|
-
if (this.onCreateCulture) instance.culture = instance.invoke("onCreateCulture", data, instance);
|
|
27
|
-
else
|
|
28
|
-
instance.culture = createCulture({
|
|
29
|
-
culture: data.culture,
|
|
30
|
-
numberCulture: data.numberCulture,
|
|
31
|
-
dateTimeCulture: data.dateTimeCulture,
|
|
32
|
-
defaultCurrency: data.defaultCurrency,
|
|
33
|
-
dateEncoding: this.dateEncoding,
|
|
34
|
-
});
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
explore(context, instance) {
|
|
38
|
-
let { culture } = instance;
|
|
39
|
-
pushCulture(culture);
|
|
40
|
-
if (this.items.length == 0 && this.initialItems) this.add(this.initialItems);
|
|
41
|
-
super.explore(context, instance);
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
exploreCleanup(context, instance) {
|
|
45
|
-
popCulture(instance.culture);
|
|
46
|
-
}
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
CultureScope.prototype.culture = null;
|
|
50
|
-
CultureScope.prototype.numberCulture = null;
|
|
51
|
-
CultureScope.prototype.dateTimeCulture = null;
|
|
52
|
-
CultureScope.prototype.defaultCurrency = null;
|
|
53
|
-
CultureScope.prototype.dateEncoding = null;
|