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,57 +1,57 @@
1
- let Grouper = require("./Grouper").Grouper;
2
- import assert from "assert";
3
-
4
- describe("Grouper", function () {
5
- describe("single grouping", function () {
6
- it("should work", function () {
7
- let data = [
8
- { name: "John", age: 12 },
9
- { name: "Jane", age: 12 },
10
- ];
11
-
12
- let grouper = new Grouper({ name: { bind: "name" } });
13
- grouper.processAll(data);
14
-
15
- let results = grouper.getResults();
16
- // console.log(results);
17
- assert.equal(results.length, 2);
18
- });
19
-
20
- it("keys can have nested properties", function () {
21
- let data = [
22
- { name: "John", age: 12 },
23
- { name: "Jane", age: 12 },
24
- ];
25
-
26
- let grouper = new Grouper({ "person.name": { bind: "name" } });
27
- grouper.processAll(data);
28
-
29
- let results = grouper.getResults();
30
- assert.equal(results.length, 2);
31
- assert.equal(results[0].key.person?.name, "John");
32
- assert.equal(results[1].key.person?.name, "Jane");
33
- });
34
- });
35
-
36
- describe("multi grouping", function () {
37
- it("should work", function () {
38
- let data = [
39
- { name: "John", age: 12 },
40
- { name: "John", age: 12 },
41
- { name: "John", age: 13 },
42
- { name: "John", age: 14 },
43
- { name: "Jane", age: 12 },
44
- { name: "Jane", age: 13 },
45
- { name: "Jane", age: 14 },
46
- ];
47
-
48
- let grouper = new Grouper({ name: { bind: "name" }, age: { bind: "age" } });
49
- grouper.processAll(data);
50
-
51
- let results = grouper.getResults();
52
- // console.log(results);
53
- assert.equal(results.length, 6);
54
- assert.equal(results[0].records.length, 2);
55
- });
56
- });
57
- });
1
+ import { Grouper } from "./Grouper";
2
+ import assert from "assert";
3
+
4
+ describe("Grouper", function () {
5
+ describe("single grouping", function () {
6
+ it("should work", function () {
7
+ let data = [
8
+ { name: "John", age: 12 },
9
+ { name: "Jane", age: 12 },
10
+ ];
11
+
12
+ let grouper = new Grouper({ name: { bind: "name" } });
13
+ grouper.processAll(data);
14
+
15
+ let results = grouper.getResults();
16
+ // console.log(results);
17
+ assert.equal(results.length, 2);
18
+ });
19
+
20
+ it("keys can have nested properties", function () {
21
+ let data = [
22
+ { name: "John", age: 12 },
23
+ { name: "Jane", age: 12 },
24
+ ];
25
+
26
+ let grouper = new Grouper({ "person.name": { bind: "name" } });
27
+ grouper.processAll(data);
28
+
29
+ let results = grouper.getResults();
30
+ assert.equal(results.length, 2);
31
+ assert.equal(results[0].key.person?.name, "John");
32
+ assert.equal(results[1].key.person?.name, "Jane");
33
+ });
34
+ });
35
+
36
+ describe("multi grouping", function () {
37
+ it("should work", function () {
38
+ let data = [
39
+ { name: "John", age: 12 },
40
+ { name: "John", age: 12 },
41
+ { name: "John", age: 13 },
42
+ { name: "John", age: 14 },
43
+ { name: "Jane", age: 12 },
44
+ { name: "Jane", age: 13 },
45
+ { name: "Jane", age: 14 },
46
+ ];
47
+
48
+ let grouper = new Grouper({ name: { bind: "name" }, age: { bind: "age" } });
49
+ grouper.processAll(data);
50
+
51
+ let results = grouper.getResults();
52
+ // console.log(results);
53
+ assert.equal(results.length, 6);
54
+ assert.equal(results[0].records.length, 2);
55
+ });
56
+ });
57
+ });
package/src/global.scss CHANGED
@@ -1,14 +1,14 @@
1
-
2
- $cx-include-global-rules: false !default;
3
-
4
- @mixin cx-global-rules() {
5
- @each $tag, $styles in $cx-element-style-map {
6
- #{$tag} {
7
- @include cx-add-rules($styles)
8
- }
9
- }
10
- }
11
-
12
- @if ($cx-include-global-rules and cx-call-once('cx/globals')) {
13
- @include cx-global-rules();
1
+
2
+ $cx-include-global-rules: false !default;
3
+
4
+ @mixin cx-global-rules() {
5
+ @each $tag, $styles in $cx-element-style-map {
6
+ #{$tag} {
7
+ @include cx-add-rules($styles)
8
+ }
9
+ }
10
+ }
11
+
12
+ @if ($cx-include-global-rules and cx-call-once('cx/globals')) {
13
+ @include cx-global-rules();
14
14
  }
package/src/index.scss CHANGED
@@ -1,6 +1,6 @@
1
- @import "global";
2
- @import "util/index";
3
- @import "ui/index";
4
- @import "widgets/index";
5
- @import "svg/index";
6
- @import "charts/index";
1
+ @import "global";
2
+ @import "util/index";
3
+ @import "ui/index";
4
+ @import "widgets/index";
5
+ @import "svg/index";
6
+ @import "charts/index";
@@ -1,9 +1,9 @@
1
- .cxs-text-anchor-middle {
2
- text-anchor: middle;
3
- }
4
-
5
- .cxs-text-anchor-right {
6
- text-anchor: end;
7
- }
8
-
1
+ .cxs-text-anchor-middle {
2
+ text-anchor: middle;
3
+ }
4
+
5
+ .cxs-text-anchor-right {
6
+ text-anchor: end;
7
+ }
8
+
9
9
  @import "Svg";
@@ -1,152 +1,152 @@
1
- import { DataAdapter } from "./DataAdapter";
2
- import { ReadOnlyDataView } from "../../data/ReadOnlyDataView";
3
- import { sorter } from "../../data/comparer";
4
- import { isArray } from "../../util/isArray";
5
- import { ArrayElementView } from "../../data/ArrayElementView";
6
- import { getAccessor } from "../../data/getAccessor";
7
- import { Culture } from "../Culture";
8
- import { isDefined, isObject } from "../../util";
9
-
10
- export class ArrayAdapter extends DataAdapter {
11
- init() {
12
- this.recordsAccessor = getAccessor(this.recordsBinding ? this.recordsBinding : this.recordsAccessor);
13
-
14
- //resolve accessor chains
15
- this.recordName = this.recordName.toString();
16
- this.indexName = this.indexName.toString();
17
- }
18
-
19
- initInstance(context, instance) {
20
- if (!instance.recordStoreCache) {
21
- instance.recordStoreCache = new WeakMap();
22
- instance.cacheByKey = {};
23
- }
24
-
25
- if (!instance.recordsAccessor && this.recordsAccessor) {
26
- instance.recordsAccessor = this.recordsAccessor.bindInstance
27
- ? this.recordsAccessor.bindInstance(instance)
28
- : this.recordsAccessor;
29
- }
30
- }
31
-
32
- getRecords(context, instance, records, parentStore) {
33
- if (!instance.recordStoreCache) this.initInstance(context, instance);
34
-
35
- return this.mapRecords(context, instance, records, parentStore, instance.recordsAccessor);
36
- }
37
-
38
- mapRecords(context, instance, records, parentStore, recordsAccessor) {
39
- let result = [];
40
-
41
- if (!instance.recordStoreCache) this.initInstance(context, instance);
42
-
43
- if (isArray(records))
44
- records.forEach((data, index) => {
45
- if (this.filterFn && !this.filterFn(data)) return;
46
-
47
- let record = this.mapRecord(context, instance, data, parentStore, recordsAccessor, index);
48
-
49
- result.push(record);
50
- });
51
-
52
- if (this.sorter) result = this.sorter(result);
53
-
54
- return result;
55
- }
56
-
57
- mapRecord(context, instance, data, parentStore, recordsAccessor, index) {
58
- let key = this.cacheByKeyField && this.keyField ? data[this.keyField] : null;
59
- let recordStore = key != null ? instance.cacheByKey[key] : instance.recordStoreCache.get(data);
60
-
61
- if (recordsAccessor) {
62
- if (!recordStore)
63
- recordStore = new ArrayElementView({
64
- store: parentStore,
65
- arrayAccessor: recordsAccessor,
66
- itemIndex: index,
67
- recordAlias: this.recordName,
68
- indexAlias: this.indexName,
69
- immutable: this.immutable,
70
- sealed: this.sealed,
71
- });
72
- else {
73
- recordStore.setStore(parentStore);
74
- recordStore.setIndex(index);
75
- }
76
- } else {
77
- if (!recordStore)
78
- recordStore = new ReadOnlyDataView({
79
- store: parentStore,
80
- data: {
81
- [this.recordName]: data,
82
- [this.indexName]: index,
83
- },
84
- immutable: this.immutable,
85
- sealed: this.sealed,
86
- });
87
- else {
88
- recordStore.setStore(parentStore);
89
- recordStore.setData(data);
90
- }
91
- }
92
-
93
- // cache by the key or by data reference
94
- if (key != null) instance.cacheByKey[key] = recordStore;
95
- else if (isObject(data)) instance.recordStoreCache.set(data, recordStore);
96
-
97
- return {
98
- store: recordStore,
99
- index: index,
100
- data: data,
101
- type: "data",
102
- key: this.keyField ? data[this.keyField] : index,
103
- };
104
- }
105
-
106
- setFilter(filterFn) {
107
- this.filterFn = filterFn;
108
- }
109
-
110
- getComparer(sortOptions) {
111
- return sortOptions ? Culture.getComparer(sortOptions) : null;
112
- }
113
-
114
- buildSorter(sorters) {
115
- if (isArray(sorters) && sorters.length > 0) {
116
- let fieldValueMapper;
117
- let dataAccessor;
118
-
119
- //if all sorters are based on record fields access data directly (faster)
120
- if (sorters.every((x) => x.field && x.value == null)) {
121
- dataAccessor = (x) => x.data;
122
- fieldValueMapper = (x) => ({ bind: x.field });
123
- } else {
124
- dataAccessor = (x) => x.store.getData();
125
- fieldValueMapper = (x) => ({ bind: this.recordName + "." + x.field });
126
- }
127
- this.sorter = sorter(
128
- sorters.map((x) => {
129
- let s = Object.assign({}, x);
130
- if (s.field && s.value == null) s.value = fieldValueMapper(s);
131
- if (!s.comparer)
132
- s.comparer = this.getComparer(isDefined(s.sortOptions) ? s.sortOptions : this.sortOptions);
133
- return s;
134
- }),
135
- dataAccessor,
136
- );
137
- } else {
138
- this.sorter = null;
139
- }
140
- }
141
-
142
- sort(sorters) {
143
- this.buildSorter(sorters);
144
- }
145
- }
146
-
147
- ArrayAdapter.prototype.immutable = false;
148
- ArrayAdapter.prototype.sealed = false;
149
- ArrayAdapter.prototype.keyField = null;
150
- ArrayAdapter.prototype.cacheByKeyField = true;
151
-
152
- ArrayAdapter.autoInit = true;
1
+ import { DataAdapter } from "./DataAdapter";
2
+ import { ReadOnlyDataView } from "../../data/ReadOnlyDataView";
3
+ import { sorter } from "../../data/comparer";
4
+ import { isArray } from "../../util/isArray";
5
+ import { ArrayElementView } from "../../data/ArrayElementView";
6
+ import { getAccessor } from "../../data/getAccessor";
7
+ import { Culture } from "../Culture";
8
+ import { isDefined, isObject } from "../../util";
9
+
10
+ export class ArrayAdapter extends DataAdapter {
11
+ init() {
12
+ this.recordsAccessor = getAccessor(this.recordsBinding ? this.recordsBinding : this.recordsAccessor);
13
+
14
+ //resolve accessor chains
15
+ this.recordName = this.recordName.toString();
16
+ this.indexName = this.indexName.toString();
17
+ }
18
+
19
+ initInstance(context, instance) {
20
+ if (!instance.recordStoreCache) {
21
+ instance.recordStoreCache = new WeakMap();
22
+ instance.cacheByKey = {};
23
+ }
24
+
25
+ if (!instance.recordsAccessor && this.recordsAccessor) {
26
+ instance.recordsAccessor = this.recordsAccessor.bindInstance
27
+ ? this.recordsAccessor.bindInstance(instance)
28
+ : this.recordsAccessor;
29
+ }
30
+ }
31
+
32
+ getRecords(context, instance, records, parentStore) {
33
+ if (!instance.recordStoreCache) this.initInstance(context, instance);
34
+
35
+ return this.mapRecords(context, instance, records, parentStore, instance.recordsAccessor);
36
+ }
37
+
38
+ mapRecords(context, instance, records, parentStore, recordsAccessor) {
39
+ let result = [];
40
+
41
+ if (!instance.recordStoreCache) this.initInstance(context, instance);
42
+
43
+ if (isArray(records))
44
+ records.forEach((data, index) => {
45
+ if (this.filterFn && !this.filterFn(data)) return;
46
+
47
+ let record = this.mapRecord(context, instance, data, parentStore, recordsAccessor, index);
48
+
49
+ result.push(record);
50
+ });
51
+
52
+ if (this.sorter && !this.preserveOrder) result = this.sorter(result);
53
+
54
+ return result;
55
+ }
56
+
57
+ mapRecord(context, instance, data, parentStore, recordsAccessor, index) {
58
+ let key = this.cacheByKeyField && this.keyField ? data[this.keyField] : null;
59
+ let recordStore = key != null ? instance.cacheByKey[key] : instance.recordStoreCache.get(data);
60
+
61
+ if (recordsAccessor) {
62
+ if (!recordStore)
63
+ recordStore = new ArrayElementView({
64
+ store: parentStore,
65
+ arrayAccessor: recordsAccessor,
66
+ itemIndex: index,
67
+ recordAlias: this.recordName,
68
+ indexAlias: this.indexName,
69
+ immutable: this.immutable,
70
+ sealed: this.sealed,
71
+ });
72
+ else {
73
+ recordStore.setStore(parentStore);
74
+ recordStore.setIndex(index);
75
+ }
76
+ } else {
77
+ if (!recordStore)
78
+ recordStore = new ReadOnlyDataView({
79
+ store: parentStore,
80
+ data: {
81
+ [this.recordName]: data,
82
+ [this.indexName]: index,
83
+ },
84
+ immutable: this.immutable,
85
+ sealed: this.sealed,
86
+ });
87
+ else {
88
+ recordStore.setStore(parentStore);
89
+ recordStore.setData(data);
90
+ }
91
+ }
92
+
93
+ // cache by the key or by data reference
94
+ if (key != null) instance.cacheByKey[key] = recordStore;
95
+ else if (isObject(data)) instance.recordStoreCache.set(data, recordStore);
96
+
97
+ return {
98
+ store: recordStore,
99
+ index: index,
100
+ data: data,
101
+ type: "data",
102
+ key: this.keyField ? data[this.keyField] : index,
103
+ };
104
+ }
105
+
106
+ setFilter(filterFn) {
107
+ this.filterFn = filterFn;
108
+ }
109
+
110
+ getComparer(sortOptions) {
111
+ return sortOptions ? Culture.getComparer(sortOptions) : null;
112
+ }
113
+
114
+ buildSorter(sorters) {
115
+ if (isArray(sorters) && sorters.length > 0) {
116
+ let fieldValueMapper;
117
+ let dataAccessor;
118
+
119
+ //if all sorters are based on record fields access data directly (faster)
120
+ if (sorters.every((x) => x.field && x.value == null)) {
121
+ dataAccessor = (x) => x.data;
122
+ fieldValueMapper = (x) => ({ bind: x.field });
123
+ } else {
124
+ dataAccessor = (x) => x.store.getData();
125
+ fieldValueMapper = (x) => ({ bind: this.recordName + "." + x.field });
126
+ }
127
+ this.sorter = sorter(
128
+ sorters.map((x) => {
129
+ let s = Object.assign({}, x);
130
+ if (s.field && s.value == null) s.value = fieldValueMapper(s);
131
+ if (!s.comparer)
132
+ s.comparer = this.getComparer(isDefined(s.sortOptions) ? s.sortOptions : this.sortOptions);
133
+ return s;
134
+ }),
135
+ dataAccessor,
136
+ );
137
+ } else {
138
+ this.sorter = null;
139
+ }
140
+ }
141
+
142
+ sort(sorters) {
143
+ this.buildSorter(sorters);
144
+ }
145
+ }
146
+
147
+ ArrayAdapter.prototype.immutable = false;
148
+ ArrayAdapter.prototype.sealed = false;
149
+ ArrayAdapter.prototype.keyField = null;
150
+ ArrayAdapter.prototype.cacheByKeyField = true;
151
+
152
+ ArrayAdapter.autoInit = true;