@tstdl/base 0.85.13 → 0.85.15
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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tstdl/base",
|
|
3
|
-
"version": "0.85.
|
|
3
|
+
"version": "0.85.15",
|
|
4
4
|
"author": "Patrick Hein",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
"luxon": "^3.3",
|
|
24
24
|
"reflect-metadata": "^0.1",
|
|
25
25
|
"rxjs": "^7.8",
|
|
26
|
-
"type-fest": "^
|
|
26
|
+
"type-fest": "^4.0"
|
|
27
27
|
},
|
|
28
28
|
"devDependencies": {
|
|
29
29
|
"@types/chroma-js": "2.4",
|
|
@@ -33,11 +33,11 @@
|
|
|
33
33
|
"@types/mjml": "4.7",
|
|
34
34
|
"@types/node": "20",
|
|
35
35
|
"@types/nodemailer": "6.4",
|
|
36
|
-
"@typescript-eslint/eslint-plugin": "
|
|
37
|
-
"@typescript-eslint/parser": "
|
|
36
|
+
"@typescript-eslint/eslint-plugin": "6.1",
|
|
37
|
+
"@typescript-eslint/parser": "6.1",
|
|
38
38
|
"concurrently": "8.2",
|
|
39
39
|
"esbuild": "0.18",
|
|
40
|
-
"eslint": "8.
|
|
40
|
+
"eslint": "8.45",
|
|
41
41
|
"eslint-import-resolver-typescript": "3.5",
|
|
42
42
|
"eslint-plugin-import": "2.27",
|
|
43
43
|
"tsc-alias": "1.8",
|
|
@@ -54,15 +54,15 @@
|
|
|
54
54
|
"@zxcvbn-ts/language-en": "^3.0",
|
|
55
55
|
"chroma-js": "^2.4",
|
|
56
56
|
"handlebars": "^4.7",
|
|
57
|
-
"knex": "^2.
|
|
57
|
+
"knex": "^2.5",
|
|
58
58
|
"koa": "^2.14",
|
|
59
59
|
"minio": "^7.1",
|
|
60
60
|
"mjml": "^4.14",
|
|
61
61
|
"mongodb": "^5.7",
|
|
62
62
|
"nodemailer": "^6.9",
|
|
63
|
-
"playwright": "^1.
|
|
64
|
-
"preact": "^10.
|
|
65
|
-
"preact-render-to-string": "^6.
|
|
63
|
+
"playwright": "^1.36",
|
|
64
|
+
"preact": "^10.16",
|
|
65
|
+
"preact-render-to-string": "^6.2",
|
|
66
66
|
"undici": "^5.22",
|
|
67
67
|
"urlpattern-polyfill": "^9.0"
|
|
68
68
|
},
|
package/signals/index.d.ts
CHANGED
package/signals/index.js
CHANGED
|
@@ -21,3 +21,4 @@ __reExport(signals_exports, require("./effect-with-dependencies.js"), module.exp
|
|
|
21
21
|
__reExport(signals_exports, require("./pipe.js"), module.exports);
|
|
22
22
|
__reExport(signals_exports, require("./switch-map.js"), module.exports);
|
|
23
23
|
__reExport(signals_exports, require("./types.js"), module.exports);
|
|
24
|
+
__reExport(signals_exports, require("./untracked-operator.js"), module.exports);
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
var untracked_operator_exports = {};
|
|
20
|
+
__export(untracked_operator_exports, {
|
|
21
|
+
runInUntracked: () => runInUntracked
|
|
22
|
+
});
|
|
23
|
+
module.exports = __toCommonJS(untracked_operator_exports);
|
|
24
|
+
var import_rxjs = require("rxjs");
|
|
25
|
+
var import_api = require("./api.js");
|
|
26
|
+
function runInUntracked() {
|
|
27
|
+
return function runInUntracked2(source) {
|
|
28
|
+
return new import_rxjs.Observable((subscriber) => source.subscribe({
|
|
29
|
+
next: (state) => (0, import_api.untracked)(() => subscriber.next(state)),
|
|
30
|
+
complete: () => (0, import_api.untracked)(() => subscriber.complete()),
|
|
31
|
+
error: (error) => (0, import_api.untracked)(() => subscriber.error(error))
|
|
32
|
+
}));
|
|
33
|
+
};
|
|
34
|
+
}
|
|
@@ -31,15 +31,15 @@ __export(dynamic_text_model_exports, {
|
|
|
31
31
|
module.exports = __toCommonJS(dynamic_text_model_exports);
|
|
32
32
|
var import_rxjs = require("rxjs");
|
|
33
33
|
var import_container = require("../container/index.js");
|
|
34
|
-
var import_timing = require("../rxjs/timing.js");
|
|
35
34
|
var import_api = require("../signals/api.js");
|
|
36
35
|
var import_switch_map = require("../signals/switch-map.js");
|
|
36
|
+
var import_untracked_operator = require("../signals/untracked-operator.js");
|
|
37
37
|
var import_type_guards = require("../utils/type-guards.js");
|
|
38
38
|
var import_localization_service = require("./localization.service.js");
|
|
39
39
|
const missingLocalizationKeyText = "[MISSING LOCALIZATION KEY]";
|
|
40
40
|
function resolveDynamicText(text, localizationService) {
|
|
41
41
|
const resolvedLocalizationService = localizationService ?? import_container.container.resolve(import_localization_service.LocalizationService);
|
|
42
|
-
const localizableTextSignal = (0, import_api.isSignal)(text) ? text : (0, import_rxjs.isObservable)(text) ? (0, import_api.toSignal)(text.pipe((0,
|
|
42
|
+
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);
|
|
43
43
|
return (0, import_switch_map.switchMap)(() => {
|
|
44
44
|
const localizableText = localizableTextSignal();
|
|
45
45
|
return (0, import_type_guards.isString)(localizableText) ? (0, import_api.computed)(() => localizableText) : resolvedLocalizationService.localize(localizableText);
|