@tstdl/base 0.87.12 → 0.87.14
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.
|
@@ -100,7 +100,9 @@ class ArrayList extends import_list.List {
|
|
|
100
100
|
}
|
|
101
101
|
_removeAt(index) {
|
|
102
102
|
if (index == 0) {
|
|
103
|
-
|
|
103
|
+
const value = this.backingArray.shift();
|
|
104
|
+
this.updateSize();
|
|
105
|
+
return value;
|
|
104
106
|
}
|
|
105
107
|
return this.removeManyAt(index, 1)[0];
|
|
106
108
|
}
|
package/package.json
CHANGED
|
@@ -30,7 +30,6 @@ __export(dynamic_text_model_exports, {
|
|
|
30
30
|
});
|
|
31
31
|
module.exports = __toCommonJS(dynamic_text_model_exports);
|
|
32
32
|
var import_rxjs = require("rxjs");
|
|
33
|
-
var import_core = require("../core.js");
|
|
34
33
|
var import_inject = require("../injector/inject.js");
|
|
35
34
|
var import_api = require("../signals/api.js");
|
|
36
35
|
var import_switch_map = require("../signals/switch-map.js");
|
|
@@ -38,12 +37,11 @@ var import_untracked_operator = require("../signals/untracked-operator.js");
|
|
|
38
37
|
var import_type_guards = require("../utils/type-guards.js");
|
|
39
38
|
var import_localization_service = require("./localization.service.js");
|
|
40
39
|
const missingLocalizationKeyText = "[MISSING LOCALIZATION KEY]";
|
|
41
|
-
function resolveDynamicText(text, localizationService) {
|
|
42
|
-
const resolvedLocalizationService = localizationService ?? ((0, import_inject.isInInjectionContext)() ? (0, import_inject.inject)(import_localization_service.LocalizationService) : (0, import_core.getGlobalInjector)().resolve(import_localization_service.LocalizationService));
|
|
40
|
+
function resolveDynamicText(text, localizationService = (0, import_inject.inject)(import_localization_service.LocalizationService)) {
|
|
43
41
|
const localizableTextSignal = (0, import_api.isSignal)(text) ? text : (0, import_rxjs.isObservable)(text) ? (0, import_api.toSignal)(text.pipe((0, import_untracked_operator.runInUntracked)()), { initialValue: missingLocalizationKeyText }) : (0, import_api.computed)(() => text);
|
|
44
42
|
return (0, import_switch_map.switchMap)(() => {
|
|
45
43
|
const localizableText = localizableTextSignal();
|
|
46
|
-
return (0, import_type_guards.isString)(localizableText) ? (0, import_api.computed)(() => localizableText) :
|
|
44
|
+
return (0, import_type_guards.isString)(localizableText) ? (0, import_api.computed)(() => localizableText) : localizationService.localize(localizableText);
|
|
47
45
|
});
|
|
48
46
|
}
|
|
49
47
|
function resolveDynamicText$(text, localizationService) {
|