cx 25.10.1 → 25.11.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.
Files changed (141) hide show
  1. package/LICENSE-THIRD-PARTY.md +91 -91
  2. package/LICENSE.md +7 -7
  3. package/README.md +46 -46
  4. package/dist/manifest.js +705 -705
  5. package/dist/ui.js +4 -2
  6. package/dist/widgets.js +2 -0
  7. package/package.json +1 -1
  8. package/src/charts/Bar.d.ts +27 -27
  9. package/src/charts/BarGraph.d.ts +15 -15
  10. package/src/charts/Chart.d.ts +12 -12
  11. package/src/charts/ColorMap.d.ts +21 -21
  12. package/src/charts/Column.d.ts +29 -29
  13. package/src/charts/ColumnBarBase.d.ts +64 -64
  14. package/src/charts/ColumnBarGraphBase.d.ts +73 -73
  15. package/src/charts/ColumnGraph.d.ts +18 -18
  16. package/src/charts/Gridlines.d.ts +24 -24
  17. package/src/charts/Legend.d.ts +45 -45
  18. package/src/charts/LegendEntry.d.ts +54 -54
  19. package/src/charts/LineGraph.d.ts +101 -101
  20. package/src/charts/Marker.d.ts +110 -110
  21. package/src/charts/MarkerLine.d.ts +56 -56
  22. package/src/charts/MouseTracker.d.ts +16 -16
  23. package/src/charts/PieChart.d.ts +92 -92
  24. package/src/charts/PieLabel.d.ts +26 -26
  25. package/src/charts/PieLabelsContainer.d.ts +6 -6
  26. package/src/charts/Range.d.ts +74 -74
  27. package/src/charts/RangeMarker.d.ts +35 -35
  28. package/src/charts/ScatterGraph.d.ts +64 -64
  29. package/src/charts/Swimlane.d.ts +24 -24
  30. package/src/charts/Swimlanes.d.ts +41 -41
  31. package/src/charts/axis/Axis.d.ts +113 -113
  32. package/src/charts/axis/Axis.scss +22 -22
  33. package/src/charts/axis/CategoryAxis.d.ts +30 -30
  34. package/src/charts/axis/NumericAxis.d.ts +46 -46
  35. package/src/charts/axis/Stack.d.ts +10 -10
  36. package/src/charts/axis/TimeAxis.d.ts +31 -31
  37. package/src/charts/axis/index.d.ts +3 -3
  38. package/src/charts/axis/index.scss +5 -5
  39. package/src/charts/axis/variables.scss +2 -2
  40. package/src/charts/helpers/MinMaxFinder.d.ts +22 -22
  41. package/src/charts/helpers/PointReducer.d.ts +24 -24
  42. package/src/charts/helpers/SnapPointFinder.d.ts +30 -30
  43. package/src/charts/helpers/ValueAtFinder.d.ts +16 -16
  44. package/src/charts/helpers/index.d.ts +4 -4
  45. package/src/charts/index.d.ts +27 -27
  46. package/src/charts/index.scss +22 -22
  47. package/src/charts/shapes.d.ts +22 -22
  48. package/src/data/Grouper.spec.js +57 -57
  49. package/src/global.scss +13 -13
  50. package/src/index.scss +6 -6
  51. package/src/svg/index.scss +8 -8
  52. package/src/ui/adapter/ArrayAdapter.js +152 -152
  53. package/src/ui/adapter/GroupAdapter.js +143 -140
  54. package/src/ui/index.scss +2 -2
  55. package/src/ui/layout/index.scss +3 -3
  56. package/src/ui/layout/variables.scss +2 -2
  57. package/src/ui/variables.scss +1 -1
  58. package/src/util/call-once.scss +6 -6
  59. package/src/util/index.scss +10 -10
  60. package/src/util/scss/divide.scss +3 -3
  61. package/src/util/scss/index.scss +9 -9
  62. package/src/variables.scss +217 -217
  63. package/src/widgets/AccessorBindings.spec.tsx +66 -66
  64. package/src/widgets/Button.d.ts +58 -58
  65. package/src/widgets/CxCredit.d.ts +12 -12
  66. package/src/widgets/DocumentTitle.d.ts +11 -11
  67. package/src/widgets/FlexBox.d.ts +69 -69
  68. package/src/widgets/Heading.d.ts +16 -16
  69. package/src/widgets/HighlightedSearchText.d.ts +9 -9
  70. package/src/widgets/HtmlElement.d.ts +30 -30
  71. package/src/widgets/Icon.d.ts +34 -34
  72. package/src/widgets/ProgressBar.d.ts +17 -17
  73. package/src/widgets/Resizer.d.ts +27 -27
  74. package/src/widgets/Sandbox.d.ts +18 -18
  75. package/src/widgets/Section.d.ts +52 -52
  76. package/src/widgets/animations.scss +10 -10
  77. package/src/widgets/autoFocus.d.ts +1 -1
  78. package/src/widgets/cx.d.ts +1 -1
  79. package/src/widgets/drag-drop/DragSource.d.ts +45 -45
  80. package/src/widgets/drag-drop/DropZone.d.ts +98 -98
  81. package/src/widgets/drag-drop/index.d.ts +4 -4
  82. package/src/widgets/drag-drop/index.scss +3 -3
  83. package/src/widgets/drag-drop/ops.d.ts +56 -56
  84. package/src/widgets/enableAllInternalDependencies.d.ts +1 -1
  85. package/src/widgets/form/Calendar.variables.scss +63 -63
  86. package/src/widgets/form/Checkbox.variables.scss +39 -39
  87. package/src/widgets/form/ColorPicker.variables.scss +22 -22
  88. package/src/widgets/form/Radio.variables.scss +45 -45
  89. package/src/widgets/form/index.scss +24 -24
  90. package/src/widgets/grid/Grid.d.ts +3 -0
  91. package/src/widgets/grid/Grid.js +3431 -3429
  92. package/src/widgets/grid/GridCell.d.ts +38 -38
  93. package/src/widgets/grid/Pagination.d.ts +14 -14
  94. package/src/widgets/grid/TreeNode.d.ts +23 -23
  95. package/src/widgets/grid/index.d.ts +3 -3
  96. package/src/widgets/grid/index.scss +3 -3
  97. package/src/widgets/icons/arrow-down.svg +3 -3
  98. package/src/widgets/icons/arrow-right.svg +2 -2
  99. package/src/widgets/icons/base.svg +104 -104
  100. package/src/widgets/icons/calendar-old.svg +169 -169
  101. package/src/widgets/icons/calendar.svg +187 -187
  102. package/src/widgets/icons/clear.svg +74 -74
  103. package/src/widgets/icons/close.svg +74 -74
  104. package/src/widgets/icons/dropdown-arrow.svg +61 -61
  105. package/src/widgets/icons/file.svg +4 -4
  106. package/src/widgets/icons/folder-open.svg +5 -5
  107. package/src/widgets/icons/folder.svg +58 -58
  108. package/src/widgets/icons/forward.svg +67 -67
  109. package/src/widgets/icons/loading.svg +4 -4
  110. package/src/widgets/icons/search.svg +107 -107
  111. package/src/widgets/icons/sort-asc.svg +3 -3
  112. package/src/widgets/index.d.ts +55 -55
  113. package/src/widgets/index.scss +16 -16
  114. package/src/widgets/nav/Link.d.ts +26 -26
  115. package/src/widgets/nav/LinkButton.d.ts +34 -34
  116. package/src/widgets/nav/Menu.d.ts +27 -27
  117. package/src/widgets/nav/MenuItem.d.ts +31 -31
  118. package/src/widgets/nav/MenuSpacer.d.ts +5 -5
  119. package/src/widgets/nav/RedirectRoute.d.ts +9 -9
  120. package/src/widgets/nav/Route.d.ts +21 -21
  121. package/src/widgets/nav/Scroller.d.ts +17 -17
  122. package/src/widgets/nav/Submenu.d.ts +6 -6
  123. package/src/widgets/nav/Tab.d.ts +33 -33
  124. package/src/widgets/nav/Tab.variables.scss +84 -84
  125. package/src/widgets/nav/index.d.ts +10 -10
  126. package/src/widgets/nav/index.scss +5 -5
  127. package/src/widgets/overlay/ContextMenu.d.ts +10 -10
  128. package/src/widgets/overlay/Dropdown.d.ts +32 -32
  129. package/src/widgets/overlay/FlyweightTooltipTracker.d.ts +8 -8
  130. package/src/widgets/overlay/MsgBox.d.ts +16 -16
  131. package/src/widgets/overlay/Overlay.d.ts +73 -73
  132. package/src/widgets/overlay/Toast.d.ts +30 -30
  133. package/src/widgets/overlay/Tooltip.d.ts +50 -50
  134. package/src/widgets/overlay/Window.d.ts +42 -42
  135. package/src/widgets/overlay/Window.variables.scss +62 -62
  136. package/src/widgets/overlay/alerts.d.ts +7 -7
  137. package/src/widgets/overlay/captureMouse.d.ts +53 -53
  138. package/src/widgets/overlay/captureMouse.scss +13 -13
  139. package/src/widgets/overlay/createHotPromiseWindowFactory.d.ts +18 -18
  140. package/src/widgets/overlay/index.d.ts +11 -11
  141. package/src/widgets/overlay/index.scss +15 -15
@@ -1,140 +1,143 @@
1
- import { ArrayAdapter } from "./ArrayAdapter";
2
- import { ReadOnlyDataView } from "../../data/ReadOnlyDataView";
3
- import { Grouper } from "../../data/Grouper";
4
- import { isArray } from "../../util/isArray";
5
- import { isDefined } from "../../util/isDefined";
6
- import { getComparer } from "../../data/comparer";
7
- import { Culture } from "../Culture";
8
- import { isObject } from "../../util/isObject";
9
-
10
- export class GroupAdapter extends ArrayAdapter {
11
- init() {
12
- super.init();
13
-
14
- if (this.groupRecordsAlias) this.groupRecordsName = this.groupRecordsAlias;
15
-
16
- if (this.groupings) this.groupBy(this.groupings);
17
- }
18
-
19
- getRecords(context, instance, records, parentStore) {
20
- let result = super.getRecords(context, instance, records, parentStore);
21
-
22
- if (this.groupings) {
23
- let groupedResults = [];
24
- this.processLevel([], result, groupedResults, parentStore);
25
- result = groupedResults;
26
- }
27
-
28
- return result;
29
- }
30
-
31
- processLevel(keys, records, result, parentStore) {
32
- let level = keys.length;
33
- let inverseLevel = this.groupings.length - level;
34
-
35
- if (inverseLevel == 0) {
36
- for (let i = 0; i < records.length; i++) {
37
- records[i].store.setStore(parentStore);
38
- result.push(records[i]);
39
- }
40
- return;
41
- }
42
-
43
- let grouping = this.groupings[level];
44
- let { grouper } = grouping;
45
- grouper.reset();
46
- grouper.processAll(records);
47
- let results = grouper.getResults();
48
- if (grouping.comparer) results.sort(grouping.comparer);
49
-
50
- results.forEach((gr) => {
51
- keys.push(gr.key);
52
-
53
- let key = keys.map(serializeKey).join("|");
54
-
55
- let $group = {
56
- ...gr.key,
57
- ...gr.aggregates,
58
- $name: gr.name,
59
- $level: inverseLevel,
60
- $records: gr.records || [],
61
- $key: key,
62
- };
63
-
64
- let data = {
65
- [this.recordName]: gr.records.length > 0 ? gr.records[0].data : null,
66
- [this.groupName]: $group,
67
- };
68
-
69
- let groupStore = new ReadOnlyDataView({
70
- store: parentStore,
71
- data,
72
- immutable: this.immutable,
73
- });
74
-
75
- let group = {
76
- key,
77
- data,
78
- group: $group,
79
- grouping,
80
- store: groupStore,
81
- level: inverseLevel,
82
- };
83
-
84
- if (grouping.includeHeader !== false)
85
- result.push({
86
- ...group,
87
- type: "group-header",
88
- key: "header:" + group.key,
89
- });
90
-
91
- this.processLevel(keys, gr.records, result, groupStore);
92
-
93
- if (grouping.includeFooter !== false)
94
- result.push({
95
- ...group,
96
- type: "group-footer",
97
- key: "footer:" + group.key,
98
- });
99
-
100
- keys.pop();
101
- });
102
- }
103
-
104
- groupBy(groupings) {
105
- if (!groupings) this.groupings = null;
106
- else if (isArray(groupings)) {
107
- this.groupings = groupings;
108
- this.groupings.forEach((g) => {
109
- let groupSorters = [];
110
- let key = {};
111
- for (let name in g.key) {
112
- if (!g.key[name] || !isDefined(g.key[name].direction) || !isDefined(g.key[name].value))
113
- g.key[name] = { value: g.key[name], direction: "ASC" };
114
- key[name] = g.key[name].value;
115
- groupSorters.push({
116
- field: name,
117
- direction: g.key[name].direction,
118
- });
119
- }
120
- g.grouper = new Grouper(key, { ...this.aggregates, ...g.aggregates }, (r) => r.store.getData(), g.text);
121
- if (g.comparer == null && groupSorters.length > 0)
122
- g.comparer = getComparer(
123
- groupSorters,
124
- (x) => x.key,
125
- this.sortOptions ? Culture.getComparer(this.sortOptions) : null,
126
- );
127
- });
128
- } else throw new Error("Invalid grouping provided.");
129
- }
130
- }
131
-
132
- GroupAdapter.prototype.groupName = "$group";
133
-
134
- function serializeKey(data) {
135
- if (isObject(data))
136
- return Object.keys(data)
137
- .map((k) => serializeKey(data[k]))
138
- .join(":");
139
- return data?.toString() ?? "";
140
- }
1
+ import { ArrayAdapter } from "./ArrayAdapter";
2
+ import { ReadOnlyDataView } from "../../data/ReadOnlyDataView";
3
+ import { Grouper } from "../../data/Grouper";
4
+ import { isArray } from "../../util/isArray";
5
+ import { isDefined } from "../../util/isDefined";
6
+ import { getComparer } from "../../data/comparer";
7
+ import { Culture } from "../Culture";
8
+ import { isObject } from "../../util/isObject";
9
+
10
+ export class GroupAdapter extends ArrayAdapter {
11
+ init() {
12
+ super.init();
13
+
14
+ if (this.groupRecordsAlias) this.groupRecordsName = this.groupRecordsAlias;
15
+
16
+ if (this.groupings) this.groupBy(this.groupings);
17
+ }
18
+
19
+ getRecords(context, instance, records, parentStore) {
20
+ let result = super.getRecords(context, instance, records, parentStore);
21
+
22
+ if (this.groupings) {
23
+ let groupedResults = [];
24
+ this.processLevel([], result, groupedResults, parentStore);
25
+ result = groupedResults;
26
+ }
27
+
28
+ return result;
29
+ }
30
+
31
+ processLevel(keys, records, result, parentStore) {
32
+ let level = keys.length;
33
+ let inverseLevel = this.groupings.length - level;
34
+
35
+ if (inverseLevel == 0) {
36
+ if (this.preserveOrder && this.sorter) records = this.sorter(records);
37
+ for (let i = 0; i < records.length; i++) {
38
+ records[i].store.setStore(parentStore);
39
+ result.push(records[i]);
40
+ }
41
+ return;
42
+ }
43
+
44
+ let grouping = this.groupings[level];
45
+ let { grouper } = grouping;
46
+ grouper.reset();
47
+ grouper.processAll(records);
48
+ let results = grouper.getResults();
49
+
50
+ if (grouping.comparer && !this.preserveOrder) results.sort(grouping.comparer);
51
+
52
+ results.forEach((gr) => {
53
+ keys.push(gr.key);
54
+
55
+ let key = keys.map(serializeKey).join("|");
56
+
57
+ let $group = {
58
+ ...gr.key,
59
+ ...gr.aggregates,
60
+ $name: gr.name,
61
+ $level: inverseLevel,
62
+ $records: gr.records || [],
63
+ $key: key,
64
+ };
65
+
66
+ let data = {
67
+ [this.recordName]: gr.records.length > 0 ? gr.records[0].data : null,
68
+ [this.groupName]: $group,
69
+ };
70
+
71
+ let groupStore = new ReadOnlyDataView({
72
+ store: parentStore,
73
+ data,
74
+ immutable: this.immutable,
75
+ });
76
+
77
+ let group = {
78
+ key,
79
+ data,
80
+ group: $group,
81
+ grouping,
82
+ store: groupStore,
83
+ level: inverseLevel,
84
+ };
85
+
86
+ if (grouping.includeHeader !== false)
87
+ result.push({
88
+ ...group,
89
+ type: "group-header",
90
+ key: "header:" + group.key,
91
+ });
92
+
93
+ this.processLevel(keys, gr.records, result, groupStore);
94
+
95
+ if (grouping.includeFooter !== false)
96
+ result.push({
97
+ ...group,
98
+ type: "group-footer",
99
+ key: "footer:" + group.key,
100
+ });
101
+
102
+ keys.pop();
103
+ });
104
+ }
105
+
106
+ groupBy(groupings) {
107
+ if (!groupings) this.groupings = null;
108
+ else if (isArray(groupings)) {
109
+ this.groupings = groupings;
110
+ this.groupings.forEach((g) => {
111
+ let groupSorters = [];
112
+ let key = {};
113
+ for (let name in g.key) {
114
+ if (!g.key[name] || !isDefined(g.key[name].direction) || !isDefined(g.key[name].value))
115
+ g.key[name] = { value: g.key[name], direction: "ASC" };
116
+ key[name] = g.key[name].value;
117
+ groupSorters.push({
118
+ field: name,
119
+ direction: g.key[name].direction,
120
+ });
121
+ }
122
+ g.grouper = new Grouper(key, { ...this.aggregates, ...g.aggregates }, (r) => r.store.getData(), g.text);
123
+ if (g.comparer == null && groupSorters.length > 0)
124
+ g.comparer = getComparer(
125
+ groupSorters,
126
+ (x) => x.key,
127
+ this.sortOptions ? Culture.getComparer(this.sortOptions) : null,
128
+ );
129
+ });
130
+ } else throw new Error("Invalid grouping provided.");
131
+ }
132
+ }
133
+
134
+ GroupAdapter.prototype.groupName = "$group";
135
+ GroupAdapter.prototype.preserveOrder = false;
136
+
137
+ function serializeKey(data) {
138
+ if (isObject(data))
139
+ return Object.keys(data)
140
+ .map((k) => serializeKey(data[k]))
141
+ .join(":");
142
+ return data?.toString() ?? "";
143
+ }
package/src/ui/index.scss CHANGED
@@ -1,2 +1,2 @@
1
-
2
- @import 'layout/index';
1
+
2
+ @import 'layout/index';
@@ -1,3 +1,3 @@
1
-
2
- @import "LabelsLeftLayout";
3
- @import "LabelsTopLayout";
1
+
2
+ @import "LabelsLeftLayout";
3
+ @import "LabelsTopLayout";
@@ -1,2 +1,2 @@
1
-
2
- // Layout variables
1
+
2
+ // Layout variables
@@ -1,2 +1,2 @@
1
-
1
+
2
2
  @import "layout/variables";
@@ -1,7 +1,7 @@
1
- $cx-call-once-data: () !default;
2
-
3
- @function cx-call-once($name) {
4
- $result: map_get($cx-call-once-data, $name);
5
- $cx-call-once-data: map_merge($cx-call-once-data, ($name: true)) !global;
6
- @return $result != true;
1
+ $cx-call-once-data: () !default;
2
+
3
+ @function cx-call-once($name) {
4
+ $result: map_get($cx-call-once-data, $name);
5
+ $cx-call-once-data: map_merge($cx-call-once-data, ($name: true)) !global;
6
+ @return $result != true;
7
7
  }
@@ -1,11 +1,11 @@
1
- .cx-text-left.cx-text-left {
2
- text-align: left;
3
- }
4
-
5
- .cx-text-right.cx-text-right {
6
- text-align: right;
7
- }
8
-
9
- .cx-text-center.cx-text-center {
10
- text-align: center;
1
+ .cx-text-left.cx-text-left {
2
+ text-align: left;
3
+ }
4
+
5
+ .cx-text-right.cx-text-right {
6
+ text-align: right;
7
+ }
8
+
9
+ .cx-text-center.cx-text-center {
10
+ text-align: center;
11
11
  }
@@ -1,3 +1,3 @@
1
- @function cx-divide($a, $b) {
2
- @return $a / $b;
3
- }
1
+ @function cx-divide($a, $b) {
2
+ @return $a / $b;
3
+ }
@@ -1,9 +1,9 @@
1
- @import "add-rules";
2
- @import "calc";
3
- @import "call-once";
4
- @import "clockwise";
5
- @import "colors";
6
- @import "deep-merge";
7
- @import "deep-get";
8
- @import "include";
9
- @import "divide";
1
+ @import "add-rules";
2
+ @import "calc";
3
+ @import "call-once";
4
+ @import "clockwise";
5
+ @import "colors";
6
+ @import "deep-merge";
7
+ @import "deep-get";
8
+ @import "include";
9
+ @import "divide";