cx 24.3.9 → 24.3.11
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/manifest.js +755 -749
- package/dist/ui.js +86 -62
- package/package.json +1 -1
- package/src/ui/Culture.d.ts +5 -1
- package/src/ui/Culture.js +24 -17
- package/src/ui/CultureScope.js +1 -1
- package/src/ui/Cx.js +313 -313
- package/src/ui/Restate.d.ts +21 -18
- package/src/ui/Restate.js +163 -160
package/dist/ui.js
CHANGED
|
@@ -833,20 +833,20 @@ var stack = [
|
|
|
833
833
|
},
|
|
834
834
|
},
|
|
835
835
|
];
|
|
836
|
-
function
|
|
836
|
+
function getDefaultCulture() {
|
|
837
837
|
return stack[0];
|
|
838
838
|
}
|
|
839
|
-
function
|
|
839
|
+
function getCurrentCulture() {
|
|
840
840
|
return stack[stack.length - 1];
|
|
841
841
|
}
|
|
842
842
|
function getCurrentCultureCache() {
|
|
843
|
-
return
|
|
843
|
+
return getCurrentCulture().cache;
|
|
844
844
|
}
|
|
845
845
|
function pushCulture(cultureInfo) {
|
|
846
846
|
stack.push(cultureInfo);
|
|
847
847
|
}
|
|
848
848
|
function createCulture(cultureSpecs) {
|
|
849
|
-
var current =
|
|
849
|
+
var current = getCurrentCulture();
|
|
850
850
|
var info = {
|
|
851
851
|
culture: current.culture,
|
|
852
852
|
dateEncoding: current.dateEncoding,
|
|
@@ -859,38 +859,45 @@ function createCulture(cultureSpecs) {
|
|
|
859
859
|
}
|
|
860
860
|
return info;
|
|
861
861
|
}
|
|
862
|
-
function popCulture() {
|
|
862
|
+
function popCulture(cultureSpecs) {
|
|
863
863
|
if (stack.length == 1) throw new Error("Cannot pop the last culture object.");
|
|
864
|
-
|
|
864
|
+
if (cultureSpecs && stack[stack.length - 1] !== cultureSpecs) {
|
|
865
|
+
console.warn("Popped culture object does not match the current one.");
|
|
866
|
+
}
|
|
867
|
+
try {
|
|
868
|
+
return stack.pop();
|
|
869
|
+
} finally {
|
|
870
|
+
console.log(stack);
|
|
871
|
+
}
|
|
865
872
|
}
|
|
866
873
|
var Culture = /*#__PURE__*/ (function () {
|
|
867
874
|
function Culture() {}
|
|
868
875
|
Culture.setCulture = function setCulture(cultureCode) {
|
|
869
|
-
var cultureSpecs =
|
|
876
|
+
var cultureSpecs = getDefaultCulture();
|
|
870
877
|
cultureSpecs.culture = cultureCode;
|
|
871
878
|
cultureSpecs.cache = {};
|
|
872
879
|
Localization.setCulture(cultureCode);
|
|
873
880
|
this.invalidateCache();
|
|
874
881
|
};
|
|
875
882
|
Culture.setNumberCulture = function setNumberCulture(cultureCode) {
|
|
876
|
-
var cultureSpecs =
|
|
883
|
+
var cultureSpecs = getDefaultCulture();
|
|
877
884
|
cultureSpecs.numberCulture = cultureCode;
|
|
878
885
|
delete cultureSpecs.cache.numberCulture;
|
|
879
886
|
this.invalidateCache();
|
|
880
887
|
};
|
|
881
888
|
Culture.setDateTimeCulture = function setDateTimeCulture(cultureCode) {
|
|
882
|
-
var cultureSpecs =
|
|
889
|
+
var cultureSpecs = getDefaultCulture();
|
|
883
890
|
cultureSpecs.dateTimeCulture = cultureCode;
|
|
884
891
|
delete cultureSpecs.cache.dateTimeCulture;
|
|
885
892
|
this.invalidateCache();
|
|
886
893
|
};
|
|
887
894
|
Culture.setDefaultCurrency = function setDefaultCurrency(currencyCode) {
|
|
888
|
-
var cultureSpecs =
|
|
895
|
+
var cultureSpecs = getDefaultCulture();
|
|
889
896
|
cultureSpecs.defaultCurrency = currencyCode;
|
|
890
897
|
this.invalidateCache();
|
|
891
898
|
};
|
|
892
899
|
Culture.setDefaultDateEncoding = function setDefaultDateEncoding(encoding) {
|
|
893
|
-
var cultureSpecs =
|
|
900
|
+
var cultureSpecs = getDefaultCulture();
|
|
894
901
|
cultureSpecs.dateEncoding = encoding;
|
|
895
902
|
this.invalidateCache();
|
|
896
903
|
};
|
|
@@ -900,28 +907,28 @@ var Culture = /*#__PURE__*/ (function () {
|
|
|
900
907
|
invalidateStringTemplateCache();
|
|
901
908
|
};
|
|
902
909
|
Culture.getNumberCulture = function getNumberCulture() {
|
|
903
|
-
var
|
|
904
|
-
cache =
|
|
905
|
-
numberCulture =
|
|
906
|
-
culture =
|
|
910
|
+
var _getCurrentCulture = getCurrentCulture(),
|
|
911
|
+
cache = _getCurrentCulture.cache,
|
|
912
|
+
numberCulture = _getCurrentCulture.numberCulture,
|
|
913
|
+
culture = _getCurrentCulture.culture;
|
|
907
914
|
if (!cache.numberCulture) cache.numberCulture = new NumberCulture(numberCulture != null ? numberCulture : culture);
|
|
908
915
|
return cache.numberCulture;
|
|
909
916
|
};
|
|
910
917
|
Culture.getDateTimeCulture = function getDateTimeCulture() {
|
|
911
|
-
var
|
|
912
|
-
cache =
|
|
913
|
-
dateTimeCulture =
|
|
914
|
-
culture =
|
|
918
|
+
var _getCurrentCulture2 = getCurrentCulture(),
|
|
919
|
+
cache = _getCurrentCulture2.cache,
|
|
920
|
+
dateTimeCulture = _getCurrentCulture2.dateTimeCulture,
|
|
921
|
+
culture = _getCurrentCulture2.culture;
|
|
915
922
|
if (!cache.dateTimeCulture)
|
|
916
923
|
cache.dateTimeCulture = new DateTimeCulture(dateTimeCulture != null ? dateTimeCulture : culture);
|
|
917
924
|
return cache.dateTimeCulture;
|
|
918
925
|
};
|
|
919
926
|
Culture.getDefaultDateEncoding = function getDefaultDateEncoding() {
|
|
920
|
-
return
|
|
927
|
+
return getCurrentCulture().dateEncoding;
|
|
921
928
|
};
|
|
922
929
|
Culture.getComparer = function getComparer(options) {
|
|
923
|
-
var
|
|
924
|
-
culture =
|
|
930
|
+
var _getCurrentCulture3 = getCurrentCulture(),
|
|
931
|
+
culture = _getCurrentCulture3.culture;
|
|
925
932
|
if (typeof Intl.Collator != "undefined") return new Intl.Collator(culture, options).compare;
|
|
926
933
|
return defaultCompare;
|
|
927
934
|
};
|
|
@@ -929,13 +936,13 @@ var Culture = /*#__PURE__*/ (function () {
|
|
|
929
936
|
{
|
|
930
937
|
key: "defaultCurrency",
|
|
931
938
|
get: function get() {
|
|
932
|
-
return
|
|
939
|
+
return getCurrentCulture().defaultCurrency;
|
|
933
940
|
},
|
|
934
941
|
},
|
|
935
942
|
{
|
|
936
943
|
key: "culture",
|
|
937
944
|
get: function get() {
|
|
938
|
-
return
|
|
945
|
+
return getCurrentCulture().culture;
|
|
939
946
|
},
|
|
940
947
|
},
|
|
941
948
|
]);
|
|
@@ -2296,7 +2303,10 @@ var Cx = /*#__PURE__*/ (function (_VDOM$Component) {
|
|
|
2296
2303
|
throw new Error("Could not resolve a widget instance in the Cx component.");
|
|
2297
2304
|
};
|
|
2298
2305
|
_proto.render = function render() {
|
|
2306
|
+
var _this$props$cultureIn;
|
|
2299
2307
|
if (this.props.deferredUntilIdle && this.state.deferToken < this.deferCounter) return null;
|
|
2308
|
+
var cultureInfo =
|
|
2309
|
+
(_this$props$cultureIn = this.props.cultureInfo) != null ? _this$props$cultureIn : getCurrentCulture();
|
|
2300
2310
|
return /*#__PURE__*/ jsx(CxContext, {
|
|
2301
2311
|
instance: this.getInstance(),
|
|
2302
2312
|
flags: this.flags,
|
|
@@ -2304,6 +2314,7 @@ var Cx = /*#__PURE__*/ (function (_VDOM$Component) {
|
|
|
2304
2314
|
buster: ++this.renderCount,
|
|
2305
2315
|
contentFactory: this.props.contentFactory,
|
|
2306
2316
|
forceUpdate: this.forceUpdateCallback,
|
|
2317
|
+
cultureInfo: cultureInfo,
|
|
2307
2318
|
});
|
|
2308
2319
|
};
|
|
2309
2320
|
_proto.componentDidMount = function componentDidMount() {
|
|
@@ -2375,7 +2386,8 @@ var Cx = /*#__PURE__*/ (function (_VDOM$Component) {
|
|
|
2375
2386
|
props.instance !== this.props.instance ||
|
|
2376
2387
|
props.widget !== this.props.widget ||
|
|
2377
2388
|
props.store !== this.props.store ||
|
|
2378
|
-
props.parentInstance !== this.props.parentInstance
|
|
2389
|
+
props.parentInstance !== this.props.parentInstance ||
|
|
2390
|
+
props.cultureInfo !== this.props.cultureInfo
|
|
2379
2391
|
);
|
|
2380
2392
|
};
|
|
2381
2393
|
_proto.componentDidCatchHandler = function componentDidCatchHandler(error, info) {
|
|
@@ -2410,46 +2422,51 @@ var CxContext = /*#__PURE__*/ (function (_VDOM$Component2) {
|
|
|
2410
2422
|
throw new Error("The instance passed to a Cx component should be detached from its parent.");
|
|
2411
2423
|
if (this.props.instance !== instance && this.props.instance.destroyTracked) this.props.instance.destroy();
|
|
2412
2424
|
this.props.flags.preparing = true;
|
|
2413
|
-
|
|
2414
|
-
|
|
2415
|
-
|
|
2416
|
-
|
|
2417
|
-
|
|
2418
|
-
|
|
2419
|
-
|
|
2420
|
-
|
|
2421
|
-
|
|
2422
|
-
|
|
2423
|
-
|
|
2425
|
+
if (this.props.cultureInfo) pushCulture(this.props.cultureInfo);
|
|
2426
|
+
try {
|
|
2427
|
+
do {
|
|
2428
|
+
context = new RenderingContext(options);
|
|
2429
|
+
context.forceUpdate = this.props.forceUpdate;
|
|
2430
|
+
this.props.flags.dirty = false;
|
|
2431
|
+
instance.assignedRenderList = context.getRootRenderList();
|
|
2432
|
+
visible = instance.scheduleExploreIfVisible(context);
|
|
2433
|
+
if (visible) {
|
|
2434
|
+
while (!context.exploreStack.empty()) {
|
|
2435
|
+
var inst = context.exploreStack.pop();
|
|
2436
|
+
//console.log("EXPLORE", inst.widget.constructor.name, inst.widget.tag, inst.widget.widgetId);
|
|
2437
|
+
inst.explore(context);
|
|
2438
|
+
}
|
|
2439
|
+
} else if (instance.destroyTracked) {
|
|
2440
|
+
instance.destroy();
|
|
2441
|
+
break;
|
|
2424
2442
|
}
|
|
2425
|
-
}
|
|
2426
|
-
|
|
2427
|
-
|
|
2428
|
-
|
|
2429
|
-
|
|
2430
|
-
if (visible) {
|
|
2431
|
-
this.timings.afterExplore = now();
|
|
2432
|
-
for (var i = 0; i < context.prepareList.length; i++) context.prepareList[i].prepare(context);
|
|
2433
|
-
this.timings.afterPrepare = now();
|
|
2443
|
+
} while (this.props.flags.dirty && ++count <= 3 && Widget.optimizePrepare && now() - this.timings.start < 8);
|
|
2444
|
+
if (visible) {
|
|
2445
|
+
this.timings.afterExplore = now();
|
|
2446
|
+
for (var i = 0; i < context.prepareList.length; i++) context.prepareList[i].prepare(context);
|
|
2447
|
+
this.timings.afterPrepare = now();
|
|
2434
2448
|
|
|
2435
|
-
|
|
2436
|
-
|
|
2437
|
-
|
|
2438
|
-
|
|
2439
|
-
|
|
2449
|
+
//walk in reverse order so children get rendered first
|
|
2450
|
+
var renderList = context.getRootRenderList();
|
|
2451
|
+
while (renderList) {
|
|
2452
|
+
for (var _i = renderList.data.length - 1; _i >= 0; _i--) {
|
|
2453
|
+
renderList.data[_i].render(context);
|
|
2454
|
+
}
|
|
2455
|
+
renderList = renderList.right;
|
|
2440
2456
|
}
|
|
2441
|
-
|
|
2457
|
+
this.content = getContent(instance.vdom);
|
|
2458
|
+
if (contentFactory)
|
|
2459
|
+
this.content = contentFactory({
|
|
2460
|
+
children: this.content,
|
|
2461
|
+
});
|
|
2462
|
+
this.timings.afterRender = now();
|
|
2463
|
+
for (var _i2 = 0; _i2 < context.cleanupList.length; _i2++) context.cleanupList[_i2].cleanup(context);
|
|
2464
|
+
} else {
|
|
2465
|
+
this.content = null;
|
|
2466
|
+
this.timings.afterExplore = this.timings.afterPrepare = this.timings.afterRender = now();
|
|
2442
2467
|
}
|
|
2443
|
-
|
|
2444
|
-
if (
|
|
2445
|
-
this.content = contentFactory({
|
|
2446
|
-
children: this.content,
|
|
2447
|
-
});
|
|
2448
|
-
this.timings.afterRender = now();
|
|
2449
|
-
for (var _i2 = 0; _i2 < context.cleanupList.length; _i2++) context.cleanupList[_i2].cleanup(context);
|
|
2450
|
-
} else {
|
|
2451
|
-
this.content = null;
|
|
2452
|
-
this.timings.afterExplore = this.timings.afterPrepare = this.timings.afterRender = now();
|
|
2468
|
+
} finally {
|
|
2469
|
+
if (this.props.cultureInfo) popCulture(this.props.cultureInfo);
|
|
2453
2470
|
}
|
|
2454
2471
|
this.timings.beforeVDOMRender = now();
|
|
2455
2472
|
this.props.flags.preparing = false;
|
|
@@ -2815,8 +2832,11 @@ var Restate = /*#__PURE__*/ (function (_PureContainer) {
|
|
|
2815
2832
|
}
|
|
2816
2833
|
};
|
|
2817
2834
|
_proto.explore = function explore(context, instance) {
|
|
2835
|
+
var _this$culture;
|
|
2818
2836
|
if (!instance.subStore) this.initSubStore(context, instance);
|
|
2819
2837
|
if (instance.subStore.parentDataCheck()) instance.markShouldUpdate();
|
|
2838
|
+
instance.cultureInfo = (_this$culture = this.culture) != null ? _this$culture : getCurrentCulture();
|
|
2839
|
+
if (instance.cache("cultureInfo", instance.culture)) instance.markShouldUpdate();
|
|
2820
2840
|
_PureContainer.prototype.explore.call(this, context, instance);
|
|
2821
2841
|
};
|
|
2822
2842
|
_proto.exploreItems = function exploreItems(context, instance, items) {
|
|
@@ -2840,6 +2860,7 @@ var Restate = /*#__PURE__*/ (function (_PureContainer) {
|
|
|
2840
2860
|
deferredUntilIdle: instance.data.deferredUntilIdle,
|
|
2841
2861
|
idleTimeout: instance.data.idleTimeout,
|
|
2842
2862
|
immediate: this.immediate,
|
|
2863
|
+
cultureInfo: instance.cultureInfo,
|
|
2843
2864
|
},
|
|
2844
2865
|
key,
|
|
2845
2866
|
);
|
|
@@ -2849,6 +2870,7 @@ var Restate = /*#__PURE__*/ (function (_PureContainer) {
|
|
|
2849
2870
|
Restate.prototype.detached = false;
|
|
2850
2871
|
Restate.prototype.waitForIdle = false;
|
|
2851
2872
|
Restate.prototype.immediate = false;
|
|
2873
|
+
Restate.prototype.culture = null;
|
|
2852
2874
|
var PrivateStore = Restate;
|
|
2853
2875
|
var RestateStore = /*#__PURE__*/ (function (_Store) {
|
|
2854
2876
|
function RestateStore(config) {
|
|
@@ -3202,7 +3224,7 @@ var CultureScope = /*#__PURE__*/ (function (_PureContainer) {
|
|
|
3202
3224
|
_PureContainer.prototype.explore.call(this, context, instance);
|
|
3203
3225
|
};
|
|
3204
3226
|
_proto.exploreCleanup = function exploreCleanup(context, instance) {
|
|
3205
|
-
popCulture();
|
|
3227
|
+
popCulture(instance.culture);
|
|
3206
3228
|
};
|
|
3207
3229
|
return CultureScope;
|
|
3208
3230
|
})(PureContainer);
|
|
@@ -4564,8 +4586,10 @@ export {
|
|
|
4564
4586
|
flattenProps,
|
|
4565
4587
|
getContent,
|
|
4566
4588
|
getContentArray,
|
|
4589
|
+
getCurrentCulture,
|
|
4567
4590
|
getCurrentCultureCache,
|
|
4568
4591
|
getCurrentInstance,
|
|
4592
|
+
getDefaultCulture,
|
|
4569
4593
|
isBatchingUpdates,
|
|
4570
4594
|
notifyBatchedUpdateCompleted,
|
|
4571
4595
|
notifyBatchedUpdateStarting,
|
package/package.json
CHANGED
package/src/ui/Culture.d.ts
CHANGED
|
@@ -42,6 +42,10 @@ export function createCulture(cultureSpecs: CultureSpecs): CultureInfo;
|
|
|
42
42
|
|
|
43
43
|
export function pushCulture(cultureSpecs: CultureInfo): void;
|
|
44
44
|
|
|
45
|
-
export function popCulture(): CultureInfo;
|
|
45
|
+
export function popCulture(cultureSpecs?: CultureInfo): CultureInfo;
|
|
46
46
|
|
|
47
47
|
export function getCurrentCultureCache(): any;
|
|
48
|
+
|
|
49
|
+
export function getCurrentCulture(): CultureInfo;
|
|
50
|
+
|
|
51
|
+
export function getDefaultCulture(): CultureInfo;
|
package/src/ui/Culture.js
CHANGED
|
@@ -23,16 +23,16 @@ let stack = [
|
|
|
23
23
|
},
|
|
24
24
|
];
|
|
25
25
|
|
|
26
|
-
function
|
|
26
|
+
export function getDefaultCulture() {
|
|
27
27
|
return stack[0];
|
|
28
28
|
}
|
|
29
29
|
|
|
30
|
-
function
|
|
30
|
+
export function getCurrentCulture() {
|
|
31
31
|
return stack[stack.length - 1];
|
|
32
32
|
}
|
|
33
33
|
|
|
34
34
|
export function getCurrentCultureCache() {
|
|
35
|
-
return
|
|
35
|
+
return getCurrentCulture().cache;
|
|
36
36
|
}
|
|
37
37
|
|
|
38
38
|
export function pushCulture(cultureInfo) {
|
|
@@ -40,7 +40,7 @@ export function pushCulture(cultureInfo) {
|
|
|
40
40
|
}
|
|
41
41
|
|
|
42
42
|
export function createCulture(cultureSpecs) {
|
|
43
|
-
let current =
|
|
43
|
+
let current = getCurrentCulture();
|
|
44
44
|
let info = {
|
|
45
45
|
culture: current.culture,
|
|
46
46
|
dateEncoding: current.dateEncoding,
|
|
@@ -54,14 +54,21 @@ export function createCulture(cultureSpecs) {
|
|
|
54
54
|
return info;
|
|
55
55
|
}
|
|
56
56
|
|
|
57
|
-
export function popCulture() {
|
|
57
|
+
export function popCulture(cultureSpecs) {
|
|
58
58
|
if (stack.length == 1) throw new Error("Cannot pop the last culture object.");
|
|
59
|
-
|
|
59
|
+
if (cultureSpecs && stack[stack.length - 1] !== cultureSpecs) {
|
|
60
|
+
console.warn("Popped culture object does not match the current one.");
|
|
61
|
+
}
|
|
62
|
+
try {
|
|
63
|
+
return stack.pop();
|
|
64
|
+
} finally {
|
|
65
|
+
console.log(stack);
|
|
66
|
+
}
|
|
60
67
|
}
|
|
61
68
|
|
|
62
69
|
export class Culture {
|
|
63
70
|
static setCulture(cultureCode) {
|
|
64
|
-
let cultureSpecs =
|
|
71
|
+
let cultureSpecs = getDefaultCulture();
|
|
65
72
|
cultureSpecs.culture = cultureCode;
|
|
66
73
|
cultureSpecs.cache = {};
|
|
67
74
|
Localization.setCulture(cultureCode);
|
|
@@ -69,27 +76,27 @@ export class Culture {
|
|
|
69
76
|
}
|
|
70
77
|
|
|
71
78
|
static setNumberCulture(cultureCode) {
|
|
72
|
-
let cultureSpecs =
|
|
79
|
+
let cultureSpecs = getDefaultCulture();
|
|
73
80
|
cultureSpecs.numberCulture = cultureCode;
|
|
74
81
|
delete cultureSpecs.cache.numberCulture;
|
|
75
82
|
this.invalidateCache();
|
|
76
83
|
}
|
|
77
84
|
|
|
78
85
|
static setDateTimeCulture(cultureCode) {
|
|
79
|
-
let cultureSpecs =
|
|
86
|
+
let cultureSpecs = getDefaultCulture();
|
|
80
87
|
cultureSpecs.dateTimeCulture = cultureCode;
|
|
81
88
|
delete cultureSpecs.cache.dateTimeCulture;
|
|
82
89
|
this.invalidateCache();
|
|
83
90
|
}
|
|
84
91
|
|
|
85
92
|
static setDefaultCurrency(currencyCode) {
|
|
86
|
-
let cultureSpecs =
|
|
93
|
+
let cultureSpecs = getDefaultCulture();
|
|
87
94
|
cultureSpecs.defaultCurrency = currencyCode;
|
|
88
95
|
this.invalidateCache();
|
|
89
96
|
}
|
|
90
97
|
|
|
91
98
|
static setDefaultDateEncoding(encoding) {
|
|
92
|
-
let cultureSpecs =
|
|
99
|
+
let cultureSpecs = getDefaultCulture();
|
|
93
100
|
cultureSpecs.dateEncoding = encoding;
|
|
94
101
|
this.invalidateCache();
|
|
95
102
|
}
|
|
@@ -101,31 +108,31 @@ export class Culture {
|
|
|
101
108
|
}
|
|
102
109
|
|
|
103
110
|
static get defaultCurrency() {
|
|
104
|
-
return
|
|
111
|
+
return getCurrentCulture().defaultCurrency;
|
|
105
112
|
}
|
|
106
113
|
|
|
107
114
|
static get culture() {
|
|
108
|
-
return
|
|
115
|
+
return getCurrentCulture().culture;
|
|
109
116
|
}
|
|
110
117
|
|
|
111
118
|
static getNumberCulture() {
|
|
112
|
-
let { cache, numberCulture, culture } =
|
|
119
|
+
let { cache, numberCulture, culture } = getCurrentCulture();
|
|
113
120
|
if (!cache.numberCulture) cache.numberCulture = new NumberCulture(numberCulture ?? culture);
|
|
114
121
|
return cache.numberCulture;
|
|
115
122
|
}
|
|
116
123
|
|
|
117
124
|
static getDateTimeCulture() {
|
|
118
|
-
let { cache, dateTimeCulture, culture } =
|
|
125
|
+
let { cache, dateTimeCulture, culture } = getCurrentCulture();
|
|
119
126
|
if (!cache.dateTimeCulture) cache.dateTimeCulture = new DateTimeCulture(dateTimeCulture ?? culture);
|
|
120
127
|
return cache.dateTimeCulture;
|
|
121
128
|
}
|
|
122
129
|
|
|
123
130
|
static getDefaultDateEncoding() {
|
|
124
|
-
return
|
|
131
|
+
return getCurrentCulture().dateEncoding;
|
|
125
132
|
}
|
|
126
133
|
|
|
127
134
|
static getComparer(options) {
|
|
128
|
-
let { culture } =
|
|
135
|
+
let { culture } = getCurrentCulture();
|
|
129
136
|
if (typeof Intl.Collator != "undefined") return new Intl.Collator(culture, options).compare;
|
|
130
137
|
return defaultCompare;
|
|
131
138
|
}
|