cx 24.0.0 → 24.0.2

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/ui.js CHANGED
@@ -68,32 +68,19 @@ import { VDOM as VDOM$2 } from "cx-react";
68
68
  import { NumberCulture, DateTimeCulture } from "intl-io";
69
69
  import { jsx, jsxs } from "react/jsx-runtime";
70
70
 
71
- function ownKeys(object, enumerableOnly) {
72
- var keys = Object.keys(object);
73
- if (Object.getOwnPropertySymbols) {
74
- var symbols = Object.getOwnPropertySymbols(object);
75
- enumerableOnly &&
76
- (symbols = symbols.filter(function (sym) {
77
- return Object.getOwnPropertyDescriptor(object, sym).enumerable;
78
- })),
79
- keys.push.apply(keys, symbols);
71
+ function _toPrimitive(t, r) {
72
+ if ("object" != typeof t || !t) return t;
73
+ var e = t[Symbol.toPrimitive];
74
+ if (void 0 !== e) {
75
+ var i = e.call(t, r || "default");
76
+ if ("object" != typeof i) return i;
77
+ throw new TypeError("@@toPrimitive must return a primitive value.");
80
78
  }
81
- return keys;
79
+ return ("string" === r ? String : Number)(t);
82
80
  }
83
- function _objectSpread2(target) {
84
- for (var i = 1; i < arguments.length; i++) {
85
- var source = null != arguments[i] ? arguments[i] : {};
86
- i % 2
87
- ? ownKeys(Object(source), !0).forEach(function (key) {
88
- _defineProperty(target, key, source[key]);
89
- })
90
- : Object.getOwnPropertyDescriptors
91
- ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source))
92
- : ownKeys(Object(source)).forEach(function (key) {
93
- Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
94
- });
95
- }
96
- return target;
81
+ function _toPropertyKey(t) {
82
+ var i = _toPrimitive(t, "string");
83
+ return "symbol" == typeof i ? i : String(i);
97
84
  }
98
85
  function _defineProperties(target, props) {
99
86
  for (var i = 0; i < props.length; i++) {
@@ -112,19 +99,21 @@ function _createClass(Constructor, protoProps, staticProps) {
112
99
  });
113
100
  return Constructor;
114
101
  }
115
- function _defineProperty(obj, key, value) {
116
- key = _toPropertyKey(key);
117
- if (key in obj) {
118
- Object.defineProperty(obj, key, {
119
- value: value,
120
- enumerable: true,
121
- configurable: true,
122
- writable: true,
123
- });
124
- } else {
125
- obj[key] = value;
126
- }
127
- return obj;
102
+ function _extends() {
103
+ _extends = Object.assign
104
+ ? Object.assign.bind()
105
+ : function (target) {
106
+ for (var i = 1; i < arguments.length; i++) {
107
+ var source = arguments[i];
108
+ for (var key in source) {
109
+ if (Object.prototype.hasOwnProperty.call(source, key)) {
110
+ target[key] = source[key];
111
+ }
112
+ }
113
+ }
114
+ return target;
115
+ };
116
+ return _extends.apply(this, arguments);
128
117
  }
129
118
  function _inheritsLoose(subClass, superClass) {
130
119
  subClass.prototype = Object.create(superClass.prototype);
@@ -137,7 +126,7 @@ function _setPrototypeOf(o, p) {
137
126
  : function _setPrototypeOf(o, p) {
138
127
  o.__proto__ = p;
139
128
  return o;
140
- };
129
+ };
141
130
  return _setPrototypeOf(o, p);
142
131
  }
143
132
  function _assertThisInitialized(self) {
@@ -146,20 +135,6 @@ function _assertThisInitialized(self) {
146
135
  }
147
136
  return self;
148
137
  }
149
- function _toPrimitive(input, hint) {
150
- if (typeof input !== "object" || input === null) return input;
151
- var prim = input[Symbol.toPrimitive];
152
- if (prim !== undefined) {
153
- var res = prim.call(input, hint || "default");
154
- if (typeof res !== "object") return res;
155
- throw new TypeError("@@toPrimitive must return a primitive value.");
156
- }
157
- return (hint === "string" ? String : Number)(input);
158
- }
159
- function _toPropertyKey(arg) {
160
- var key = _toPrimitive(arg, "string");
161
- return typeof key === "symbol" ? key : String(key);
162
- }
163
138
 
164
139
  var computablePrefix = "computable-";
165
140
  var triggerPrefix = "trigger-";
@@ -250,7 +225,7 @@ var Controller = /*#__PURE__*/ (function (_Component) {
250
225
  Controller.namespace = "ui.controller.";
251
226
  Controller.factory = function (alias, config, more) {
252
227
  if (isFunction(alias)) {
253
- var cfg = _objectSpread2(_objectSpread2({}, config), more);
228
+ var cfg = _extends({}, config, more);
254
229
  if (cfg.instance) {
255
230
  //in rare cases instance.store may change, so we cannot rely on the store passed through configuration
256
231
  cfg.store = new StoreProxy(function () {
@@ -260,9 +235,9 @@ Controller.factory = function (alias, config, more) {
260
235
  }
261
236
  var result = alias(cfg);
262
237
  if (result instanceof Controller) return result;
263
- return Controller.create(_objectSpread2(_objectSpread2(_objectSpread2({}, config), more), result));
238
+ return Controller.create(_extends({}, config, more, result));
264
239
  }
265
- return Controller.create(_objectSpread2(_objectSpread2({}, config), more));
240
+ return Controller.create(_extends({}, config, more));
266
241
  };
267
242
 
268
243
  var cssHelperCache = {};
@@ -343,7 +318,7 @@ var CSS = /*#__PURE__*/ (function () {
343
318
  return join(
344
319
  pushMap(null, this.resolve(stateModifiers), function (m) {
345
320
  return _this3.classPrefix + "s-" + m;
346
- })
321
+ }),
347
322
  );
348
323
  };
349
324
  CSS.mod = function mod(mods) {
@@ -351,7 +326,7 @@ var CSS = /*#__PURE__*/ (function () {
351
326
  return join(
352
327
  pushMap(null, this.resolve(mods), function (m) {
353
328
  return _this4.classPrefix + "m-" + m;
354
- })
329
+ }),
355
330
  );
356
331
  };
357
332
  CSS.expand = function expand() {
@@ -392,7 +367,7 @@ var Widget = /*#__PURE__*/ (function (_Component) {
392
367
  if (this.styled) this.style = parseStyle(this.style);
393
368
  else if (this.style) {
394
369
  Console.warn(
395
- "Components that allow use of the style attribute should set styled = true on their prototype. This will be an error in future versions."
370
+ "Components that allow use of the style attribute should set styled = true on their prototype. This will be an error in future versions.",
396
371
  );
397
372
  this.style = parseStyle(this.style);
398
373
  this.styled = true;
@@ -431,14 +406,14 @@ var Widget = /*#__PURE__*/ (function (_Component) {
431
406
  {
432
407
  structured: true,
433
408
  };
434
- var props = _objectSpread2(
409
+ var props = _extends(
435
410
  {
436
411
  visible: undefined,
437
412
  mod: {
438
413
  structured: true,
439
414
  },
440
415
  },
441
- options
416
+ options,
442
417
  );
443
418
  Object.assign.apply(Object, [props].concat(Array.prototype.slice.call(arguments)));
444
419
  this.selector = new StructuredSelector({
@@ -452,7 +427,7 @@ var Widget = /*#__PURE__*/ (function (_Component) {
452
427
  data.classNames = this.CSS.expand(
453
428
  this.CSS.block(this.baseClass, data.mod, data.stateMods),
454
429
  data["class"],
455
- data.className
430
+ data.className,
456
431
  );
457
432
  data.style = parseStyle(data.style);
458
433
  };
@@ -476,7 +451,7 @@ var Widget = /*#__PURE__*/ (function (_Component) {
476
451
  _proto.render = function render(context, instance, key) {
477
452
  Console.log(this);
478
453
  throw new Error(
479
- 'Widget\'s render method should be overridden. This error usually happens if with incorrect imports, i.e. import { TextField } from "cx/data". Please check the console for details about the component configuration.'
454
+ 'Widget\'s render method should be overridden. This error usually happens if with incorrect imports, i.e. import { TextField } from "cx/data". Please check the console for details about the component configuration.',
480
455
  );
481
456
  };
482
457
  _proto.update = function update() {
@@ -558,7 +533,7 @@ var Text = /*#__PURE__*/ (function (_Widget) {
558
533
  {
559
534
  value: undefined,
560
535
  },
561
- ].concat(Array.prototype.slice.call(arguments))
536
+ ].concat(Array.prototype.slice.call(arguments)),
562
537
  );
563
538
  };
564
539
  _proto.render = function render(context, _ref, key) {
@@ -708,7 +683,7 @@ var Container = /*#__PURE__*/ (function (_Widget) {
708
683
  this.add(
709
684
  Widget.create(StaticText, {
710
685
  text: text,
711
- })
686
+ }),
712
687
  );
713
688
  else
714
689
  this.add(
@@ -716,7 +691,7 @@ var Container = /*#__PURE__*/ (function (_Widget) {
716
691
  text: {
717
692
  tpl: text,
718
693
  },
719
- })
694
+ }),
720
695
  );
721
696
  };
722
697
  _proto.find = function find(filter, options) {
@@ -746,13 +721,9 @@ var Container = /*#__PURE__*/ (function (_Widget) {
746
721
  _proto.findFirst = function findFirst(filter, options) {
747
722
  return this.find(
748
723
  filter,
749
- _objectSpread2(
750
- _objectSpread2({}, options),
751
- {},
752
- {
753
- first: true,
754
- }
755
- )
724
+ _extends({}, options, {
725
+ first: true,
726
+ }),
756
727
  )[0];
757
728
  };
758
729
  return Container;
@@ -832,7 +803,7 @@ var Localization = /*#__PURE__*/ (function () {
832
803
  Localization.localize = function localize(culture, key, values) {
833
804
  var l = localizations[culture];
834
805
  if (!l) l = localizations[culture] = {};
835
- l[key] = _objectSpread2(_objectSpread2({}, l[key]), values);
806
+ l[key] = _extends({}, l[key], values);
836
807
  };
837
808
  Localization.setCulture = function setCulture(culture) {
838
809
  var l = localizations[culture];
@@ -847,6 +818,8 @@ var Localization = /*#__PURE__*/ (function () {
847
818
  })();
848
819
 
849
820
  var culture = "en";
821
+ var numberCulture = null;
822
+ var dateTimeCulture = null;
850
823
  var cultureCache = {};
851
824
  var defaultCurrency = "USD";
852
825
  var dateEncoding = function dateEncoding(date) {
@@ -860,6 +833,16 @@ var Culture = /*#__PURE__*/ (function () {
860
833
  Localization.setCulture(cultureCode);
861
834
  this.invalidateCache();
862
835
  };
836
+ Culture.setNumberCulture = function setNumberCulture(cultureCode) {
837
+ numberCulture = cultureCode;
838
+ delete cultureCache.numberCulture;
839
+ this.invalidateCache();
840
+ };
841
+ Culture.setDateTimeCulture = function setDateTimeCulture(cultureCode) {
842
+ dateTimeCulture = cultureCode;
843
+ delete cultureCache.dateTimeCulture;
844
+ this.invalidateCache();
845
+ };
863
846
  Culture.setDefaultCurrency = function setDefaultCurrency(currencyCode) {
864
847
  defaultCurrency = currencyCode;
865
848
  this.invalidateCache();
@@ -870,12 +853,20 @@ var Culture = /*#__PURE__*/ (function () {
870
853
  invalidateStringTemplateCache();
871
854
  };
872
855
  Culture.getNumberCulture = function getNumberCulture() {
873
- if (!cultureCache.numberCulture) cultureCache.numberCulture = new NumberCulture(culture);
856
+ var _numberCulture;
857
+ if (!cultureCache.numberCulture)
858
+ cultureCache.numberCulture = new NumberCulture(
859
+ (_numberCulture = numberCulture) != null ? _numberCulture : culture,
860
+ );
874
861
  return cultureCache.numberCulture;
875
862
  };
876
863
  Culture.getDateTimeCulture = function getDateTimeCulture() {
877
- if (!cultureCache.dateCulture) cultureCache.dateCulture = new DateTimeCulture(culture);
878
- return cultureCache.dateCulture;
864
+ var _dateTimeCulture;
865
+ if (!cultureCache.dateTimeCulture)
866
+ cultureCache.dateTimeCulture = new DateTimeCulture(
867
+ (_dateTimeCulture = dateTimeCulture) != null ? _dateTimeCulture : culture,
868
+ );
869
+ return cultureCache.dateTimeCulture;
879
870
  };
880
871
  Culture.getDefaultDateEncoding = function getDefaultDateEncoding() {
881
872
  return dateEncoding;
@@ -1025,7 +1016,7 @@ var ArrayAdapter = /*#__PURE__*/ (function (_DataAdapter) {
1025
1016
  s.comparer = _this2.getComparer(isDefined(s.sortOptions) ? s.sortOptions : _this2.sortOptions);
1026
1017
  return s;
1027
1018
  }),
1028
- dataAccessor
1019
+ dataAccessor,
1029
1020
  );
1030
1021
  } else {
1031
1022
  this.sorter = null;
@@ -1071,7 +1062,7 @@ var Repeater = /*#__PURE__*/ (function (_Container) {
1071
1062
  structured: true,
1072
1063
  },
1073
1064
  },
1074
- ].concat(Array.prototype.slice.call(arguments))
1065
+ ].concat(Array.prototype.slice.call(arguments)),
1075
1066
  );
1076
1067
  };
1077
1068
  _proto.init = function init() {
@@ -1079,19 +1070,15 @@ var Repeater = /*#__PURE__*/ (function (_Container) {
1079
1070
  if (this.recordAlias) this.recordName = this.recordAlias;
1080
1071
  if (this.indexAlias) this.indexName = this.indexAlias;
1081
1072
  this.dataAdapter = ArrayAdapter.create(
1082
- _objectSpread2(
1083
- _objectSpread2({}, this.dataAdapter),
1084
- {},
1085
- {
1086
- recordName: this.recordName,
1087
- indexName: this.indexName,
1088
- keyField: this.keyField,
1089
- immutable: this.immutable,
1090
- sealed: this.sealed,
1091
- recordsAccessor: this.recordsAccessor,
1092
- sortOptions: this.sortOptions,
1093
- }
1094
- )
1073
+ _extends({}, this.dataAdapter, {
1074
+ recordName: this.recordName,
1075
+ indexName: this.indexName,
1076
+ keyField: this.keyField,
1077
+ immutable: this.immutable,
1078
+ sealed: this.sealed,
1079
+ recordsAccessor: this.recordsAccessor,
1080
+ sortOptions: this.sortOptions,
1081
+ }),
1095
1082
  );
1096
1083
  this.item = PureContainer.create({
1097
1084
  children: this.items || this.children,
@@ -1200,7 +1187,7 @@ var Rescope = /*#__PURE__*/ (function (_PureContainer) {
1200
1187
  instance: instance,
1201
1188
  data: this.data,
1202
1189
  useParentStore: true,
1203
- })
1190
+ })
1204
1191
  : null,
1205
1192
  });
1206
1193
  instance.setStore = function (store) {
@@ -1479,10 +1466,11 @@ function enableCultureSensitiveFormatting() {
1479
1466
  Format$1.registerFactory(["number", "n"], function (format, minimumFractionDigits, maximumFractionDigits, flags) {
1480
1467
  var culture = Culture.getNumberCulture();
1481
1468
  var formatter = culture.getFormatter(
1482
- _objectSpread2(
1483
- _objectSpread2({}, resolveMinMaxFractionDigits(minimumFractionDigits, maximumFractionDigits)),
1484
- resolveNumberFormattingFlags(flags)
1485
- )
1469
+ _extends(
1470
+ {},
1471
+ resolveMinMaxFractionDigits(minimumFractionDigits, maximumFractionDigits),
1472
+ resolveNumberFormattingFlags(flags),
1473
+ ),
1486
1474
  );
1487
1475
  return function (value) {
1488
1476
  return formatter.format(value);
@@ -1494,61 +1482,55 @@ function enableCultureSensitiveFormatting() {
1494
1482
  var culture = Culture.getNumberCulture();
1495
1483
  currency = currency || Culture.defaultCurrency;
1496
1484
  var formatter = culture.getFormatter(
1497
- _objectSpread2(
1498
- _objectSpread2(
1499
- {
1500
- style: "currency",
1501
- currency: currency,
1502
- },
1503
- resolveMinMaxFractionDigits(minimumFractionDigits, maximumFractionDigits)
1504
- ),
1505
- resolveNumberFormattingFlags(flags)
1506
- )
1485
+ _extends(
1486
+ {
1487
+ style: "currency",
1488
+ currency: currency,
1489
+ },
1490
+ resolveMinMaxFractionDigits(minimumFractionDigits, maximumFractionDigits),
1491
+ resolveNumberFormattingFlags(flags),
1492
+ ),
1507
1493
  );
1508
1494
  return function (value) {
1509
1495
  return formatter.format(value);
1510
1496
  };
1511
- }
1497
+ },
1512
1498
  );
1513
1499
  Format$1.registerFactory(
1514
1500
  ["percentage", "p", "%"],
1515
1501
  function (format, minimumFractionDigits, maximumFractionDigits, flags) {
1516
1502
  var culture = Culture.getNumberCulture();
1517
1503
  var formatter = culture.getFormatter(
1518
- _objectSpread2(
1519
- _objectSpread2(
1520
- {
1521
- style: "percent",
1522
- },
1523
- resolveMinMaxFractionDigits(minimumFractionDigits, maximumFractionDigits)
1524
- ),
1525
- resolveNumberFormattingFlags(flags)
1526
- )
1504
+ _extends(
1505
+ {
1506
+ style: "percent",
1507
+ },
1508
+ resolveMinMaxFractionDigits(minimumFractionDigits, maximumFractionDigits),
1509
+ resolveNumberFormattingFlags(flags),
1510
+ ),
1527
1511
  );
1528
1512
  return function (value) {
1529
1513
  return formatter.format(value);
1530
1514
  };
1531
- }
1515
+ },
1532
1516
  );
1533
1517
  Format$1.registerFactory(
1534
1518
  ["percentSign", "ps"],
1535
1519
  function (format, minimumFractionDigits, maximumFractionDigits, flags) {
1536
1520
  var culture = Culture.getNumberCulture();
1537
1521
  var formatter = culture.getFormatter(
1538
- _objectSpread2(
1539
- _objectSpread2(
1540
- {
1541
- style: "percent",
1542
- },
1543
- resolveMinMaxFractionDigits(minimumFractionDigits, maximumFractionDigits)
1544
- ),
1545
- resolveNumberFormattingFlags(flags)
1546
- )
1522
+ _extends(
1523
+ {
1524
+ style: "percent",
1525
+ },
1526
+ resolveMinMaxFractionDigits(minimumFractionDigits, maximumFractionDigits),
1527
+ resolveNumberFormattingFlags(flags),
1528
+ ),
1547
1529
  );
1548
1530
  return function (value) {
1549
1531
  return formatter.format(value / 100);
1550
1532
  };
1551
- }
1533
+ },
1552
1534
  );
1553
1535
  Format$1.registerFactory(["date", "d"], function (fmt, format) {
1554
1536
  if (format === void 0) {
@@ -1672,8 +1654,8 @@ var Instance = /*#__PURE__*/ (function () {
1672
1654
  ins = ins.widget.isContent
1673
1655
  ? ins.contentPlaceholder
1674
1656
  : ins.parent.outerLayout === ins
1675
- ? ins.parent.parent
1676
- : ins.parent;
1657
+ ? ins.parent.parent
1658
+ : ins.parent;
1677
1659
  }
1678
1660
  renderList.reverse();
1679
1661
  };
@@ -1718,7 +1700,7 @@ var Instance = /*#__PURE__*/ (function () {
1718
1700
  this.widget.version !== this.cached.widgetVersion ||
1719
1701
  this.cached.globalCacheIdentifier !== GlobalCacheIdentifier.get();
1720
1702
  if (shouldUpdate) {
1721
- this.data = _objectSpread2({}, this.rawData);
1703
+ this.data = _extends({}, this.rawData);
1722
1704
  this.widget.prepareData(context, this);
1723
1705
  debug(processDataFlag, this.widget);
1724
1706
  }
@@ -1892,8 +1874,8 @@ var Instance = /*#__PURE__*/ (function () {
1892
1874
  function () {
1893
1875
  return _this3.dataSelector(_this3.store)[prop];
1894
1876
  },
1895
- p.debounce
1896
- )
1877
+ p.debounce,
1878
+ ),
1897
1879
  );
1898
1880
  this.set(prop, value, options);
1899
1881
  return true;
@@ -1903,7 +1885,7 @@ var Instance = /*#__PURE__*/ (function () {
1903
1885
  prop,
1904
1886
  throttle(function (value) {
1905
1887
  return _this3.doSet(prop, value);
1906
- }, p.throttle)
1888
+ }, p.throttle),
1907
1889
  );
1908
1890
  this.set(prop, value, options);
1909
1891
  return true;
@@ -1944,7 +1926,7 @@ var Instance = /*#__PURE__*/ (function () {
1944
1926
  var config = dataConfig[key];
1945
1927
  if (!config)
1946
1928
  throw new Error(
1947
- "Unknown nested data key " + key + ". Known keys are " + Object.keys(dataConfig).join(", ") + "."
1929
+ "Unknown nested data key " + key + ". Known keys are " + Object.keys(dataConfig).join(", ") + ".",
1948
1930
  );
1949
1931
  if (isAccessorChain(config))
1950
1932
  config = {
@@ -1960,7 +1942,7 @@ var Instance = /*#__PURE__*/ (function () {
1960
1942
  throw new Error(
1961
1943
  "Cannot change nested data value for " +
1962
1944
  key +
1963
- " as it's read-only. Either define it as a binding or define a set function."
1945
+ " as it's read-only. Either define it as a binding or define a set function.",
1964
1946
  );
1965
1947
  if (isString(config.set)) this.getControllerMethod(config.set)(value, this);
1966
1948
  else if (isFunction(config.set)) config.set(value, this);
@@ -1968,7 +1950,7 @@ var Instance = /*#__PURE__*/ (function () {
1968
1950
  throw new Error(
1969
1951
  "Cannot change nested data value for " +
1970
1952
  key +
1971
- " the defined setter is neither a function nor a controller method."
1953
+ " the defined setter is neither a function nor a controller method.",
1972
1954
  );
1973
1955
  return true;
1974
1956
  };
@@ -2020,7 +2002,7 @@ var Instance = /*#__PURE__*/ (function () {
2020
2002
  _proto.getControllerMethod = function getControllerMethod(methodName) {
2021
2003
  if (!this.controller)
2022
2004
  throw new Error(
2023
- 'Cannot invoke controller method "' + methodName + '" as controller is not assigned to the widget.'
2005
+ 'Cannot invoke controller method "' + methodName + '" as controller is not assigned to the widget.',
2024
2006
  );
2025
2007
  var at = this;
2026
2008
  while (at != null && at.controller && !at.controller[methodName]) at = at.parent;
@@ -2028,7 +2010,7 @@ var Instance = /*#__PURE__*/ (function () {
2028
2010
  throw new Error(
2029
2011
  'Cannot invoke controller method "' +
2030
2012
  methodName +
2031
- '". The method cannot be found in any of the assigned controllers.'
2013
+ '". The method cannot be found in any of the assigned controllers.',
2032
2014
  );
2033
2015
  return at.controller[methodName].bind(at.controller);
2034
2016
  };
@@ -2051,7 +2033,7 @@ function renderResultFix(res) {
2051
2033
  ? res
2052
2034
  : {
2053
2035
  content: res,
2054
- };
2036
+ };
2055
2037
  }
2056
2038
  var InstanceCache = /*#__PURE__*/ (function () {
2057
2039
  function InstanceCache(parent, keyPrefix) {
@@ -2077,7 +2059,6 @@ var InstanceCache = /*#__PURE__*/ (function () {
2077
2059
  instance.setStore(store);
2078
2060
  if (instance.cached) delete instance.cached.rawData; // force prepareData to execute again
2079
2061
  }
2080
-
2081
2062
  return instance;
2082
2063
  };
2083
2064
  _proto2.addChild = function addChild(instance) {
@@ -2284,7 +2265,7 @@ var Cx = /*#__PURE__*/ (function (_VDOM$Component) {
2284
2265
  {
2285
2266
  data: data,
2286
2267
  },
2287
- notifyBatchedUpdateCompleted
2268
+ notifyBatchedUpdateCompleted,
2288
2269
  );
2289
2270
  } else {
2290
2271
  //in standard mode sequential store commands are batched
@@ -2296,7 +2277,7 @@ var Cx = /*#__PURE__*/ (function (_VDOM$Component) {
2296
2277
  {
2297
2278
  data: data,
2298
2279
  },
2299
- notifyBatchedUpdateCompleted
2280
+ notifyBatchedUpdateCompleted,
2300
2281
  );
2301
2282
  }, 0);
2302
2283
  }
@@ -2315,7 +2296,7 @@ var Cx = /*#__PURE__*/ (function (_VDOM$Component) {
2315
2296
  },
2316
2297
  {
2317
2298
  timeout: this.props.idleTimeout || 30000,
2318
- }
2299
+ },
2319
2300
  );
2320
2301
  };
2321
2302
  _proto.componentWillUnmount = function componentWillUnmount() {
@@ -2444,7 +2425,7 @@ var CxContext = /*#__PURE__*/ (function (_VDOM$Component2) {
2444
2425
  "cx",
2445
2426
  (beforeVDOMRender - start + afterCleanup - afterVDOMRender).toFixed(2) + "ms",
2446
2427
  "vdom",
2447
- (afterVDOMRender - beforeVDOMRender).toFixed(2) + "ms"
2428
+ (afterVDOMRender - beforeVDOMRender).toFixed(2) + "ms",
2448
2429
  );
2449
2430
  Timing.log(
2450
2431
  appLoopFlag,
@@ -2461,7 +2442,7 @@ var CxContext = /*#__PURE__*/ (function (_VDOM$Component2) {
2461
2442
  "vdom",
2462
2443
  (afterVDOMRender - beforeVDOMRender).toFixed(1),
2463
2444
  "cleanup",
2464
- (afterCleanup - afterVDOMRender).toFixed(1)
2445
+ (afterCleanup - afterVDOMRender).toFixed(1),
2465
2446
  );
2466
2447
  }
2467
2448
  };
@@ -2489,7 +2470,7 @@ var ContentResolver = /*#__PURE__*/ (function (_PureContainer) {
2489
2470
  },
2490
2471
  loading: undefined,
2491
2472
  },
2492
- ])
2473
+ ]),
2493
2474
  );
2494
2475
  };
2495
2476
  _proto.init = function init() {
@@ -2566,7 +2547,7 @@ var IsolatedScope = /*#__PURE__*/ (function (_PureContainer) {
2566
2547
  structured: true,
2567
2548
  },
2568
2549
  },
2569
- ])
2550
+ ]),
2570
2551
  );
2571
2552
  };
2572
2553
  _proto.init = function init() {
@@ -2609,7 +2590,7 @@ var DetachedScope = /*#__PURE__*/ (function (_IsolatedScope) {
2609
2590
  structured: true,
2610
2591
  },
2611
2592
  },
2612
- ])
2593
+ ]),
2613
2594
  );
2614
2595
  };
2615
2596
  _proto.init = function init() {
@@ -2633,13 +2614,9 @@ var DetachedScope = /*#__PURE__*/ (function (_IsolatedScope) {
2633
2614
  delete this.items;
2634
2615
  delete this.children;
2635
2616
  if (this.name)
2636
- this.options = _objectSpread2(
2637
- _objectSpread2({}, this.options),
2638
- {},
2639
- {
2640
- name: this.name,
2641
- }
2642
- );
2617
+ this.options = _extends({}, this.options, {
2618
+ name: this.name,
2619
+ });
2643
2620
  _IsolatedScope.prototype.init.call(this);
2644
2621
  };
2645
2622
  _proto.initInstance = function initInstance(context, instance) {
@@ -2659,7 +2636,7 @@ var DetachedScope = /*#__PURE__*/ (function (_IsolatedScope) {
2659
2636
  options: this.options,
2660
2637
  onError: this.onError,
2661
2638
  },
2662
- key
2639
+ key,
2663
2640
  );
2664
2641
  };
2665
2642
  return DetachedScope;
@@ -2727,7 +2704,7 @@ var Restate = /*#__PURE__*/ (function (_PureContainer) {
2727
2704
  idleTimeout: undefined,
2728
2705
  cacheKey: undefined,
2729
2706
  },
2730
- ])
2707
+ ]),
2731
2708
  );
2732
2709
  };
2733
2710
  _proto.init = function init() {
@@ -2803,7 +2780,7 @@ var Restate = /*#__PURE__*/ (function (_PureContainer) {
2803
2780
  idleTimeout: instance.data.idleTimeout,
2804
2781
  immediate: this.immediate,
2805
2782
  },
2806
- key
2783
+ key,
2807
2784
  );
2808
2785
  };
2809
2786
  return Restate;
@@ -3035,7 +3012,7 @@ function withHoverSync(key, hoverSync, hoverChannel, hoverId, render) {
3035
3012
  hoverId: hoverId,
3036
3013
  render: render,
3037
3014
  },
3038
- key
3015
+ key,
3039
3016
  );
3040
3017
  }
3041
3018
  var HoverSyncElement = /*#__PURE__*/ (function (_Container) {
@@ -3061,7 +3038,7 @@ var HoverSyncElement = /*#__PURE__*/ (function (_Container) {
3061
3038
  structured: true,
3062
3039
  },
3063
3040
  },
3064
- ])
3041
+ ]),
3065
3042
  );
3066
3043
  };
3067
3044
  _proto3.prepareData = function prepareData(context, instance) {
@@ -3082,31 +3059,28 @@ var HoverSyncElement = /*#__PURE__*/ (function (_Container) {
3082
3059
  onMouseMove = _ref.onMouseMove,
3083
3060
  onMouseLeave = _ref.onMouseLeave,
3084
3061
  key = _ref.key;
3085
- var style = _objectSpread2(_objectSpread2({}, data.style), hover && data.hoverStyle);
3062
+ var style = _extends({}, data.style, hover && data.hoverStyle);
3086
3063
  return VDOM$1.createElement(
3087
3064
  inSvg ? "g" : "div",
3088
- _objectSpread2(
3089
- _objectSpread2(
3090
- {
3091
- key: key,
3092
- className: CSS.expand(
3093
- data.classNames,
3094
- CSS.state({
3095
- hover: hover,
3096
- }),
3097
- hover && data.hoverClass
3098
- ),
3099
- style: style,
3100
- },
3101
- eventHandlers
3102
- ),
3103
- {},
3065
+ _extends(
3066
+ {
3067
+ key: key,
3068
+ className: CSS.expand(
3069
+ data.classNames,
3070
+ CSS.state({
3071
+ hover: hover,
3072
+ }),
3073
+ hover && data.hoverClass,
3074
+ ),
3075
+ style: style,
3076
+ },
3077
+ eventHandlers,
3104
3078
  {
3105
3079
  onMouseLeave: onMouseLeave,
3106
3080
  onMouseMove: onMouseMove,
3107
- }
3081
+ },
3108
3082
  ),
3109
- children
3083
+ children,
3110
3084
  );
3111
3085
  });
3112
3086
  };
@@ -3119,24 +3093,21 @@ HoverSyncElement.prototype.hoverChannel = "default";
3119
3093
  var flattenProps = function flattenProps(props) {
3120
3094
  if (!props) return {};
3121
3095
  if (props.jsxSpread) {
3122
- props = _objectSpread2(
3123
- _objectSpread2({}, props),
3096
+ props = _extends(
3097
+ {},
3098
+ props,
3124
3099
  props.jsxSpread.reduce(function (acc, prop) {
3125
3100
  return Object.assign(acc, prop);
3126
- }, {})
3101
+ }, {}),
3127
3102
  );
3128
3103
  }
3129
3104
  if (props.$props !== undefined) {
3130
- props = _objectSpread2(
3131
- _objectSpread2({}, props.$props),
3132
- {},
3133
- {
3134
- jsxAttributes: props.jsxAttributes,
3135
- children: props.children,
3136
- }
3137
- );
3105
+ props = _extends({}, props.$props, {
3106
+ jsxAttributes: props.jsxAttributes,
3107
+ children: props.children,
3108
+ });
3138
3109
  }
3139
- return _objectSpread2({}, props);
3110
+ return _extends({}, props);
3140
3111
  };
3141
3112
 
3142
3113
  var currentInstance = null;
@@ -3243,7 +3214,7 @@ var Selection = /*#__PURE__*/ (function (_Component) {
3243
3214
  data = instance.data;
3244
3215
  if (!data.$selection)
3245
3216
  throw new Error(
3246
- "Selection model not properly configured. Using the selectInstance method without specified record and index bindings."
3217
+ "Selection model not properly configured. Using the selectInstance method without specified record and index bindings.",
3247
3218
  );
3248
3219
  return this.select(store, data.$selection.record, data.$selection.index, options);
3249
3220
  };
@@ -3391,7 +3362,7 @@ var KeySelection = /*#__PURE__*/ (function (_Selection) {
3391
3362
  structured: true,
3392
3363
  },
3393
3364
  },
3394
- ].concat(Array.prototype.slice.call(arguments))
3365
+ ].concat(Array.prototype.slice.call(arguments)),
3395
3366
  );
3396
3367
  };
3397
3368
  _proto.configureWidget = function configureWidget(widget) {
@@ -3435,11 +3406,10 @@ var KeySelection = /*#__PURE__*/ (function (_Selection) {
3435
3406
  return !_this.areKeysEqual(x, key);
3436
3407
  }); //TODO: optimize
3437
3408
  });
3438
-
3439
3409
  this.updateSelectionWithShallowEqualsCheck(store, newSelection);
3440
3410
  }
3441
3411
  } else if (this.storage == "hash") {
3442
- var _newSelection = toggle ? _objectSpread2({}, selection) : {};
3412
+ var _newSelection = toggle ? _extends({}, selection) : {};
3443
3413
  keys.forEach(function (key) {
3444
3414
  _newSelection[key] = !_newSelection[key];
3445
3415
  });
@@ -3545,7 +3515,7 @@ var FirstVisibleChildLayout = /*#__PURE__*/ (function (_PureContainer2) {
3545
3515
  ? item
3546
3516
  : FirstVisibleChildItem.create({
3547
3517
  items: item,
3548
- });
3518
+ });
3549
3519
  };
3550
3520
  return FirstVisibleChildLayout;
3551
3521
  })(PureContainer);
@@ -3582,7 +3552,7 @@ var LabelsLeftLayout = /*#__PURE__*/ (function (_PureContainer) {
3582
3552
  structured: true,
3583
3553
  },
3584
3554
  },
3585
- ])
3555
+ ]),
3586
3556
  );
3587
3557
  };
3588
3558
  _proto.render = function render(context, instance, key) {
@@ -3615,8 +3585,8 @@ var LabelsLeftLayout = /*#__PURE__*/ (function (_PureContainer) {
3615
3585
  }),
3616
3586
  ],
3617
3587
  },
3618
- key
3619
- )
3588
+ key,
3589
+ ),
3620
3590
  );
3621
3591
  }
3622
3592
  };
@@ -3632,7 +3602,7 @@ var LabelsLeftLayout = /*#__PURE__*/ (function (_PureContainer) {
3632
3602
  children: result,
3633
3603
  }),
3634
3604
  },
3635
- key
3605
+ key,
3636
3606
  );
3637
3607
  };
3638
3608
  return LabelsLeftLayout;
@@ -3689,7 +3659,7 @@ var LabelsTopLayout = /*#__PURE__*/ (function (_Container) {
3689
3659
  children: state.rows,
3690
3660
  }),
3691
3661
  },
3692
- key
3662
+ key,
3693
3663
  );
3694
3664
  };
3695
3665
  _proto.addRow = function addRow(state) {
@@ -3700,8 +3670,8 @@ var LabelsTopLayout = /*#__PURE__*/ (function (_Container) {
3700
3670
  {
3701
3671
  children: state.labelCells,
3702
3672
  },
3703
- state.rows.length
3704
- )
3673
+ state.rows.length,
3674
+ ),
3705
3675
  );
3706
3676
  if (state.fieldCells.length > 0)
3707
3677
  state.rows.push(
@@ -3710,8 +3680,8 @@ var LabelsTopLayout = /*#__PURE__*/ (function (_Container) {
3710
3680
  {
3711
3681
  children: state.fieldCells,
3712
3682
  },
3713
- state.rows.length
3714
- )
3683
+ state.rows.length,
3684
+ ),
3715
3685
  );
3716
3686
  state.labelCells = [];
3717
3687
  state.fieldCells = [];
@@ -3735,8 +3705,8 @@ var LabelsTopLayout = /*#__PURE__*/ (function (_Container) {
3735
3705
  colSpan: data.colSpan,
3736
3706
  children: getContent(item.label),
3737
3707
  },
3738
- state.labelCells.length
3739
- )
3708
+ state.labelCells.length,
3709
+ ),
3740
3710
  );
3741
3711
  state.fieldCells.push(
3742
3712
  /*#__PURE__*/ jsx(
@@ -3748,8 +3718,8 @@ var LabelsTopLayout = /*#__PURE__*/ (function (_Container) {
3748
3718
  style: data.style,
3749
3719
  children: validContent(item),
3750
3720
  },
3751
- state.fieldCells.length
3752
- )
3721
+ state.fieldCells.length,
3722
+ ),
3753
3723
  );
3754
3724
  };
3755
3725
  return LabelsTopLayout;
@@ -3776,7 +3746,7 @@ var LabelsTopLayoutCell = /*#__PURE__*/ (function (_PureContainer) {
3776
3746
  colSpan: undefined,
3777
3747
  rowSpan: undefined,
3778
3748
  },
3779
- ])
3749
+ ]),
3780
3750
  );
3781
3751
  };
3782
3752
  _proto2.render = function render(context, instance, key) {
@@ -3824,7 +3794,7 @@ var ContentPlaceholder = /*#__PURE__*/ (function (_PureContainer) {
3824
3794
  {
3825
3795
  name: undefined,
3826
3796
  },
3827
- ])
3797
+ ]),
3828
3798
  );
3829
3799
  };
3830
3800
  _proto.explore = function explore(context, instance) {
@@ -4095,7 +4065,7 @@ var History = /*#__PURE__*/ (function () {
4095
4065
  window.history[op](tr.state, tr.title, tr.url);
4096
4066
  if (subscribers) subscribers.notify(tr.url, op);
4097
4067
  }
4098
- }
4068
+ },
4099
4069
  );
4100
4070
  return changed;
4101
4071
  };
@@ -4188,16 +4158,12 @@ var GroupAdapter = /*#__PURE__*/ (function (_ArrayAdapter) {
4188
4158
  .join(":");
4189
4159
  })
4190
4160
  .join("|");
4191
- var $group = _objectSpread2(
4192
- _objectSpread2(_objectSpread2({}, gr.key), gr.aggregates),
4193
- {},
4194
- {
4195
- $name: gr.name,
4196
- $level: inverseLevel,
4197
- $records: gr.records || [],
4198
- $key: key,
4199
- }
4200
- );
4161
+ var $group = _extends({}, gr.key, gr.aggregates, {
4162
+ $name: gr.name,
4163
+ $level: inverseLevel,
4164
+ $records: gr.records || [],
4165
+ $key: key,
4166
+ });
4201
4167
  var data =
4202
4168
  ((_data = {}),
4203
4169
  (_data[_this.recordName] = gr.records.length > 0 ? gr.records[0].data : null),
@@ -4218,26 +4184,18 @@ var GroupAdapter = /*#__PURE__*/ (function (_ArrayAdapter) {
4218
4184
  };
4219
4185
  if (grouping.includeHeader !== false)
4220
4186
  result.push(
4221
- _objectSpread2(
4222
- _objectSpread2({}, group),
4223
- {},
4224
- {
4225
- type: "group-header",
4226
- key: "header:" + group.key,
4227
- }
4228
- )
4187
+ _extends({}, group, {
4188
+ type: "group-header",
4189
+ key: "header:" + group.key,
4190
+ }),
4229
4191
  );
4230
4192
  _this.processLevel(keys, gr.records, result, groupStore);
4231
4193
  if (grouping.includeFooter !== false)
4232
4194
  result.push(
4233
- _objectSpread2(
4234
- _objectSpread2({}, group),
4235
- {},
4236
- {
4237
- type: "group-footer",
4238
- key: "footer:" + group.key,
4239
- }
4240
- )
4195
+ _extends({}, group, {
4196
+ type: "group-footer",
4197
+ key: "footer:" + group.key,
4198
+ }),
4241
4199
  );
4242
4200
  keys.pop();
4243
4201
  });
@@ -4264,11 +4222,11 @@ var GroupAdapter = /*#__PURE__*/ (function (_ArrayAdapter) {
4264
4222
  }
4265
4223
  g.grouper = new Grouper(
4266
4224
  key,
4267
- _objectSpread2(_objectSpread2({}, _this2.aggregates), g.aggregates),
4225
+ _extends({}, _this2.aggregates, g.aggregates),
4268
4226
  function (r) {
4269
4227
  return r.store.getData();
4270
4228
  },
4271
- g.text
4229
+ g.text,
4272
4230
  );
4273
4231
  g.comparer = null;
4274
4232
  if (groupSorters.length > 0)
@@ -4277,7 +4235,7 @@ var GroupAdapter = /*#__PURE__*/ (function (_ArrayAdapter) {
4277
4235
  function (x) {
4278
4236
  return x.key;
4279
4237
  },
4280
- _this2.sortOptions ? Culture.getComparer(_this2.sortOptions) : null
4238
+ _this2.sortOptions ? Culture.getComparer(_this2.sortOptions) : null,
4281
4239
  );
4282
4240
  });
4283
4241
  } else throw new Error("Invalid grouping provided.");
@@ -4300,7 +4258,7 @@ var TreeAdapter = /*#__PURE__*/ (function (_ArrayAdapter) {
4300
4258
  if (this.restoreExpandedNodesOnLoad) {
4301
4259
  if (!this.keyField)
4302
4260
  throw new Error(
4303
- "Stateful tree adapter requires keyField property to be specified on either Grid or data adapter."
4261
+ "Stateful tree adapter requires keyField property to be specified on either Grid or data adapter.",
4304
4262
  );
4305
4263
  this.expandedState = {
4306
4264
  next: new Set(),
@@ -4345,7 +4303,7 @@ var TreeAdapter = /*#__PURE__*/ (function (_ArrayAdapter) {
4345
4303
  instance,
4346
4304
  data[this.childrenField],
4347
4305
  store,
4348
- this.childrenAccessor
4306
+ this.childrenAccessor,
4349
4307
  );
4350
4308
  this.processList(context, instance, level + 1, record.key + ":", childNodes, result);
4351
4309
  } else if (this.load && !data[this.loadedField] && !data[this.loadingField]) {