cx 26.3.5 → 26.3.6

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.
Files changed (65) hide show
  1. package/build/charts/helpers/SnapPointFinder.d.ts +2 -2
  2. package/build/charts/helpers/SnapPointFinder.d.ts.map +1 -1
  3. package/build/charts/helpers/ValueAtFinder.d.ts +4 -4
  4. package/build/charts/helpers/ValueAtFinder.d.ts.map +1 -1
  5. package/build/charts/helpers/ValueAtFinder.js +2 -5
  6. package/build/data/createAccessorModelProxy.d.ts +6 -11
  7. package/build/data/createAccessorModelProxy.d.ts.map +1 -1
  8. package/build/data/createAccessorModelProxy.js +1 -3
  9. package/build/jsx-runtime.d.ts +2 -1
  10. package/build/jsx-runtime.d.ts.map +1 -1
  11. package/build/ui/createFunctionalComponent.d.ts +4 -1
  12. package/build/ui/createFunctionalComponent.d.ts.map +1 -1
  13. package/build/widgets/form/Calendar.d.ts +1 -0
  14. package/build/widgets/form/Calendar.d.ts.map +1 -1
  15. package/build/widgets/form/Calendar.js +14 -22
  16. package/build/widgets/form/TimeList.d.ts +3 -1
  17. package/build/widgets/form/TimeList.d.ts.map +1 -1
  18. package/build/widgets/grid/Grid.d.ts +3 -3
  19. package/build/widgets/grid/Grid.d.ts.map +1 -1
  20. package/build/widgets/grid/Grid.js +86 -188
  21. package/build/widgets/index.d.ts +3 -1
  22. package/build/widgets/index.d.ts.map +1 -1
  23. package/build/widgets/index.js +3 -1
  24. package/build/widgets/nav/Tab.d.ts.map +1 -1
  25. package/build/widgets/nav/Tab.js +9 -5
  26. package/build/widgets/overlay/Overlay.d.ts +1 -1
  27. package/build/widgets/overlay/Overlay.d.ts.map +1 -1
  28. package/build/widgets/overlay/Overlay.js +10 -19
  29. package/build/widgets/overlay/Window.d.ts.map +1 -1
  30. package/build/widgets/overlay/Window.js +5 -11
  31. package/dist/charts.css +256 -256
  32. package/dist/manifest.js +722 -713
  33. package/dist/widgets.css +15 -7
  34. package/dist/widgets.js +31 -17
  35. package/package.json +1 -1
  36. package/src/charts/BarGraph.scss +31 -31
  37. package/src/charts/Legend.scss +57 -57
  38. package/src/charts/LegendEntry.scss +35 -35
  39. package/src/charts/LineGraph.scss +28 -28
  40. package/src/charts/helpers/SnapPointFinder.ts +136 -136
  41. package/src/charts/helpers/ValueAtFinder.ts +72 -72
  42. package/src/data/createAccessorModelProxy.ts +66 -66
  43. package/src/ui/DataProxy.ts +55 -55
  44. package/src/ui/Rescope.ts +50 -50
  45. package/src/ui/adapter/ArrayAdapter.ts +229 -229
  46. package/src/ui/exprHelpers.ts +96 -96
  47. package/src/util/scss/include.scss +69 -69
  48. package/src/widgets/Button.maps.scss +103 -103
  49. package/src/widgets/Sandbox.ts +104 -104
  50. package/src/widgets/form/Calendar.tsx +772 -772
  51. package/src/widgets/form/ColorField.scss +112 -112
  52. package/src/widgets/form/DateTimeField.scss +111 -111
  53. package/src/widgets/form/LookupField.scss +228 -228
  54. package/src/widgets/form/MonthField.scss +113 -113
  55. package/src/widgets/form/NumberField.scss +72 -72
  56. package/src/widgets/form/Select.scss +104 -104
  57. package/src/widgets/form/TextField.scss +66 -66
  58. package/src/widgets/form/variables.scss +110 -110
  59. package/src/widgets/grid/Grid.tsx +4264 -4264
  60. package/src/widgets/grid/variables.scss +47 -47
  61. package/src/widgets/index.ts +63 -63
  62. package/src/widgets/nav/Tab.ts +122 -122
  63. package/src/widgets/overlay/Overlay.tsx +1028 -1028
  64. package/src/widgets/overlay/Window.tsx +320 -320
  65. package/src/widgets/variables.scss +61 -61
@@ -1,104 +1,104 @@
1
- import { Widget } from "../ui/Widget";
2
- import { PureContainerBase, PureContainerConfig } from "../ui/PureContainer";
3
- import { Binding, BindingInput } from "../data/Binding";
4
- import { ExposedValueView, ExposedValueViewConfig } from "../data/ExposedValueView";
5
- import { RenderingContext } from "../ui/RenderingContext";
6
- import { Instance } from "../ui/Instance";
7
- import { StringProp, WritableProp } from "../ui/Prop";
8
- import { AccessorChain } from "../data/createAccessorModelProxy";
9
-
10
- export interface SandboxConfig extends PureContainerConfig {
11
- /** Binding to the object that holds sandbox data. */
12
- storage: WritableProp<Record<string, any>>;
13
-
14
- /** Key used to identify the sandbox instance within the storage. */
15
- key?: StringProp;
16
-
17
- /** Alias for `key`. */
18
- accessKey?: StringProp;
19
-
20
- /** Alias used to expose sandbox data. Default is `$page`. */
21
- recordName?: string | AccessorChain<any>;
22
-
23
- /** Alias for `recordName`. */
24
- recordAlias?: string | AccessorChain<any>;
25
-
26
- /** Indicate that parent store data should not be mutated. */
27
- immutable?: boolean;
28
-
29
- /** Indicate that sandbox store data should not be mutated. */
30
- sealed?: boolean;
31
- }
32
-
33
- export interface SandboxInstance extends Instance {
34
- store: ExposedValueView;
35
- }
36
-
37
- export class Sandbox extends PureContainerBase<SandboxConfig, SandboxInstance> {
38
- declare storage: WritableProp<Record<string, any>>;
39
- declare key?: StringProp;
40
- declare recordName?: string;
41
- declare recordAlias?: string;
42
- declare accessKey?: StringProp;
43
- declare immutable?: boolean;
44
- declare sealed?: boolean;
45
- declare storageBinding: Binding;
46
- init(): void {
47
- if (this.recordAlias) this.recordName = this.recordAlias;
48
-
49
- if (this.accessKey) this.key = this.accessKey;
50
-
51
- this.storageBinding = Binding.get(this.storage);
52
-
53
- super.init();
54
- }
55
-
56
- initInstance(context: RenderingContext, instance: SandboxInstance): void {
57
- instance.store = new ExposedValueView({
58
- store: instance.parentStore,
59
- containerBinding: this.storageBinding,
60
- key: null,
61
- recordName: this.recordName,
62
- immutable: this.immutable,
63
- });
64
- super.initInstance(context, instance);
65
- }
66
-
67
- applyParentStore(instance: SandboxInstance): void {
68
- instance.store.setStore(instance.parentStore);
69
- }
70
-
71
- declareData(...args: Record<string, unknown>[]): void {
72
- super.declareData(
73
- {
74
- storage: undefined,
75
- key: undefined,
76
- },
77
- ...args,
78
- );
79
- }
80
-
81
- prepareData(context: RenderingContext, instance: SandboxInstance): void {
82
- var { store, data } = instance;
83
- if (store.getKey() !== data.key) {
84
- //when navigating to a page using the same widget tree as the previous page
85
- //everything needs to be reinstantiated, e.g. user/1 => user/2
86
- instance.store = new ExposedValueView({
87
- store: store,
88
- containerBinding: this.storageBinding,
89
- key: data.key,
90
- recordName: this.recordName,
91
- immutable: this.immutable,
92
- sealed: this.sealed,
93
- });
94
- instance.clearChildrenCache();
95
- }
96
- super.prepareData(context, instance);
97
- }
98
- }
99
-
100
- Sandbox.prototype.recordName = "$page";
101
- Sandbox.prototype.immutable = false;
102
- Sandbox.prototype.sealed = false;
103
-
104
- Widget.alias("sandbox", Sandbox);
1
+ import { Widget } from "../ui/Widget";
2
+ import { PureContainerBase, PureContainerConfig } from "../ui/PureContainer";
3
+ import { Binding, BindingInput } from "../data/Binding";
4
+ import { ExposedValueView, ExposedValueViewConfig } from "../data/ExposedValueView";
5
+ import { RenderingContext } from "../ui/RenderingContext";
6
+ import { Instance } from "../ui/Instance";
7
+ import { StringProp, WritableProp } from "../ui/Prop";
8
+ import { AccessorChain } from "../data/createAccessorModelProxy";
9
+
10
+ export interface SandboxConfig extends PureContainerConfig {
11
+ /** Binding to the object that holds sandbox data. */
12
+ storage: WritableProp<Record<string, any>>;
13
+
14
+ /** Key used to identify the sandbox instance within the storage. */
15
+ key?: StringProp;
16
+
17
+ /** Alias for `key`. */
18
+ accessKey?: StringProp;
19
+
20
+ /** Alias used to expose sandbox data. Default is `$page`. */
21
+ recordName?: string | AccessorChain<any>;
22
+
23
+ /** Alias for `recordName`. */
24
+ recordAlias?: string | AccessorChain<any>;
25
+
26
+ /** Indicate that parent store data should not be mutated. */
27
+ immutable?: boolean;
28
+
29
+ /** Indicate that sandbox store data should not be mutated. */
30
+ sealed?: boolean;
31
+ }
32
+
33
+ export interface SandboxInstance extends Instance {
34
+ store: ExposedValueView;
35
+ }
36
+
37
+ export class Sandbox extends PureContainerBase<SandboxConfig, SandboxInstance> {
38
+ declare storage: WritableProp<Record<string, any>>;
39
+ declare key?: StringProp;
40
+ declare recordName?: string;
41
+ declare recordAlias?: string;
42
+ declare accessKey?: StringProp;
43
+ declare immutable?: boolean;
44
+ declare sealed?: boolean;
45
+ declare storageBinding: Binding;
46
+ init(): void {
47
+ if (this.recordAlias) this.recordName = this.recordAlias;
48
+
49
+ if (this.accessKey) this.key = this.accessKey;
50
+
51
+ this.storageBinding = Binding.get(this.storage);
52
+
53
+ super.init();
54
+ }
55
+
56
+ initInstance(context: RenderingContext, instance: SandboxInstance): void {
57
+ instance.store = new ExposedValueView({
58
+ store: instance.parentStore,
59
+ containerBinding: this.storageBinding,
60
+ key: null,
61
+ recordName: this.recordName,
62
+ immutable: this.immutable,
63
+ });
64
+ super.initInstance(context, instance);
65
+ }
66
+
67
+ applyParentStore(instance: SandboxInstance): void {
68
+ instance.store.setStore(instance.parentStore);
69
+ }
70
+
71
+ declareData(...args: Record<string, unknown>[]): void {
72
+ super.declareData(
73
+ {
74
+ storage: undefined,
75
+ key: undefined,
76
+ },
77
+ ...args,
78
+ );
79
+ }
80
+
81
+ prepareData(context: RenderingContext, instance: SandboxInstance): void {
82
+ var { store, data } = instance;
83
+ if (store.getKey() !== data.key) {
84
+ //when navigating to a page using the same widget tree as the previous page
85
+ //everything needs to be reinstantiated, e.g. user/1 => user/2
86
+ instance.store = new ExposedValueView({
87
+ store: store,
88
+ containerBinding: this.storageBinding,
89
+ key: data.key,
90
+ recordName: this.recordName,
91
+ immutable: this.immutable,
92
+ sealed: this.sealed,
93
+ });
94
+ instance.clearChildrenCache();
95
+ }
96
+ super.prepareData(context, instance);
97
+ }
98
+ }
99
+
100
+ Sandbox.prototype.recordName = "$page";
101
+ Sandbox.prototype.immutable = false;
102
+ Sandbox.prototype.sealed = false;
103
+
104
+ Widget.alias("sandbox", Sandbox);