cx 24.3.11 → 24.4.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.
@@ -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;
@@ -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> {}
@@ -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;