@thzero/library_client_svelte 0.17.10 → 0.18.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.
- package/boot/baseServices.js +6 -6
- package/boot/baseValidation.js +1 -1
- package/boot/basei18n.js +5 -4
- package/boot/eventBus.js +1 -1
- package/boot/main.js +6 -4
- package/boot/webcomponent.js +2 -2
- package/package.json +6 -6
- package/service/baseUser.js +2 -2
- package/service/event.js +2 -2
- package/service/router.js +1 -1
- package/service/store.js +2 -2
- package/service/translate.js +2 -2
- package/utility/index.js +3 -3
package/boot/baseServices.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import LibraryClientUtility from '@thzero/library_client/utility/index';
|
|
1
|
+
import LibraryClientUtility from '@thzero/library_client/utility/index.js';
|
|
2
2
|
|
|
3
|
-
import RootServicesBaseBoot from '@thzero/library_client/boot/rootServices';
|
|
3
|
+
import RootServicesBaseBoot from '@thzero/library_client/boot/rootServices.js';
|
|
4
4
|
|
|
5
|
-
import eventService from '../service/event';
|
|
6
|
-
import routerService from '../service/router';
|
|
7
|
-
import storeService from '../service/store';
|
|
8
|
-
import translateService from '../service/translate';
|
|
5
|
+
import eventService from '../service/event.js';
|
|
6
|
+
import routerService from '../service/router.js';
|
|
7
|
+
import storeService from '../service/store.js';
|
|
8
|
+
import translateService from '../service/translate.js';
|
|
9
9
|
|
|
10
10
|
class SveleteRootServicesBaseBoot extends RootServicesBaseBoot {
|
|
11
11
|
_initializeInjector(framework, injector) {
|
package/boot/baseValidation.js
CHANGED
package/boot/basei18n.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { init, getLocaleFromNavigator, register, format, addMessages, unwrapFunctionStore } from 'svelte-i18n';
|
|
2
2
|
|
|
3
|
-
import LibraryClientUtility from '@thzero/library_client/utility/index';
|
|
3
|
+
import LibraryClientUtility from '@thzero/library_client/utility/index.js';
|
|
4
4
|
|
|
5
|
-
import i18nBaseBoot from '@thzero/library_client/boot/basei18n';
|
|
5
|
+
import i18nBaseBoot from '@thzero/library_client/boot/basei18n.js';
|
|
6
6
|
|
|
7
|
-
import NotImplementedError from '@thzero/library_common/errors/notImplemented';
|
|
7
|
+
import NotImplementedError from '@thzero/library_common/errors/notImplemented.js';
|
|
8
8
|
|
|
9
9
|
class Sveltei18nBaseBoot extends i18nBaseBoot {
|
|
10
10
|
// eslint-disable-next-line
|
|
@@ -15,7 +15,8 @@ class Sveltei18nBaseBoot extends i18nBaseBoot {
|
|
|
15
15
|
fallbackLocale: 'en',
|
|
16
16
|
initialLocale: getLocaleFromNavigator()
|
|
17
17
|
});
|
|
18
|
-
LibraryClientUtility.$trans = { t: unwrapFunctionStore(format) };
|
|
18
|
+
// LibraryClientUtility.$trans = { t: unwrapFunctionStore(format) };
|
|
19
|
+
LibraryClientUtility.$trans = { t: format };
|
|
19
20
|
}
|
|
20
21
|
|
|
21
22
|
_initMessages(register) {
|
package/boot/eventBus.js
CHANGED
package/boot/main.js
CHANGED
|
@@ -1,15 +1,14 @@
|
|
|
1
|
-
import LibraryClientUtility from '@thzero/library_client/utility/index';
|
|
1
|
+
import LibraryClientUtility from '@thzero/library_client/utility/index.js';
|
|
2
2
|
|
|
3
3
|
// @ts-ignore
|
|
4
|
-
import {} from '@thzero/library_common/utility/string';
|
|
4
|
+
import {} from '@thzero/library_common/utility/string.js';
|
|
5
5
|
|
|
6
6
|
// eslint-disable-next-line
|
|
7
7
|
async function start(app, storeRequest, bootFiles, starter, options) {
|
|
8
8
|
let store = null;
|
|
9
9
|
if (storeRequest) {
|
|
10
10
|
try {
|
|
11
|
-
|
|
12
|
-
store = temp.initialize();
|
|
11
|
+
store = new storeRequest();
|
|
13
12
|
}
|
|
14
13
|
catch (err) {
|
|
15
14
|
console.log(err);
|
|
@@ -67,6 +66,9 @@ async function start(app, storeRequest, bootFiles, starter, options) {
|
|
|
67
66
|
}
|
|
68
67
|
}
|
|
69
68
|
}
|
|
69
|
+
|
|
70
|
+
if (!app)
|
|
71
|
+
return;
|
|
70
72
|
|
|
71
73
|
if (!starter) {
|
|
72
74
|
if (app)
|
package/boot/webcomponent.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import startMain from './main';
|
|
1
|
+
import startMain from './main.js';
|
|
2
2
|
|
|
3
3
|
async function start(storeRequest, bootFiles, starter) {
|
|
4
|
-
await startMain(null,
|
|
4
|
+
await startMain(null, storeRequest, bootFiles, starter);
|
|
5
5
|
}
|
|
6
6
|
|
|
7
7
|
export default start;
|
package/package.json
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@thzero/library_client_svelte",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.18.1",
|
|
4
4
|
"version_major": 0,
|
|
5
|
-
"version_minor":
|
|
6
|
-
"version_patch":
|
|
7
|
-
"version_date": "
|
|
5
|
+
"version_minor": 18,
|
|
6
|
+
"version_patch": 1,
|
|
7
|
+
"version_date": "02/25/2024",
|
|
8
8
|
"description": "An opinionated library of common functionality to bootstrap a Svelte based SPA application.",
|
|
9
9
|
"author": "thZero",
|
|
10
10
|
"license": "MIT",
|
|
@@ -21,8 +21,8 @@
|
|
|
21
21
|
"test": "echo \"Error: no test specified\" && exit 1"
|
|
22
22
|
},
|
|
23
23
|
"dependencies": {
|
|
24
|
-
"@thzero/library_client": "^0.
|
|
25
|
-
"@thzero/library_common": "^0.
|
|
24
|
+
"@thzero/library_client": "^0.18",
|
|
25
|
+
"@thzero/library_common": "^0.18",
|
|
26
26
|
"mitt": "^3.0.1",
|
|
27
27
|
"svelte-i18n": "^4.0.0",
|
|
28
28
|
"svelte-spa-router": "^4.0.1"
|
package/service/baseUser.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import LibraryClientConstants from '@thzero/library_client/constants';
|
|
1
|
+
import LibraryClientConstants from '@thzero/library_client/constants.js';
|
|
2
2
|
|
|
3
|
-
import BaseUserService from '@thzero/library_client/service/baseUser';
|
|
3
|
+
import BaseUserService from '@thzero/library_client/service/baseUser.js';
|
|
4
4
|
|
|
5
5
|
class SvelteBaseUserService extends BaseUserService {
|
|
6
6
|
constructor() {
|
package/service/event.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import LibraryClientUtility from '@thzero/library_client/utility/index';
|
|
1
|
+
import LibraryClientUtility from '@thzero/library_client/utility/index.js';
|
|
2
2
|
|
|
3
|
-
import EventService from '@thzero/library_client/service/event';
|
|
3
|
+
import EventService from '@thzero/library_client/service/event.js';
|
|
4
4
|
|
|
5
5
|
class SvelteEventService extends EventService {
|
|
6
6
|
// eslint-disable-next-line
|
package/service/router.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { push } from 'svelte-spa-router';
|
|
2
2
|
|
|
3
|
-
import RouterService from '@thzero/library_client/service/router';
|
|
3
|
+
import RouterService from '@thzero/library_client/service/router.js';
|
|
4
4
|
|
|
5
5
|
class SvelteRouterService extends RouterService {
|
|
6
6
|
// eslint-disable-next-line
|
package/service/store.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import LibraryClientUtility from '@thzero/library_client/utility/index';
|
|
1
|
+
import LibraryClientUtility from '@thzero/library_client/utility/index.js';
|
|
2
2
|
|
|
3
|
-
import Service from '@thzero/library_client/service/index';
|
|
3
|
+
import Service from '@thzero/library_client/service/index.js';
|
|
4
4
|
|
|
5
5
|
class SvelteStoreService extends Service {
|
|
6
6
|
get store() {
|
package/service/translate.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import LibraryClientUtility from '@thzero/library_client/utility/index';
|
|
1
|
+
import LibraryClientUtility from '@thzero/library_client/utility/index.js';
|
|
2
2
|
|
|
3
|
-
import TranslateService from '@thzero/library_client/service/translate';
|
|
3
|
+
import TranslateService from '@thzero/library_client/service/translate.js';
|
|
4
4
|
|
|
5
5
|
class SvelteTranslateService extends TranslateService {
|
|
6
6
|
// eslint-disable-next-line
|
package/utility/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import Constants from '../constants';
|
|
2
|
-
import LibraryCommonConstants from '@thzero/library_common/constants';
|
|
1
|
+
import Constants from '../constants.js';
|
|
2
|
+
import LibraryCommonConstants from '@thzero/library_common/constants.js';
|
|
3
3
|
|
|
4
|
-
import LibraryClientUtility from '@thzero/library_client/utility/index';
|
|
4
|
+
import LibraryClientUtility from '@thzero/library_client/utility/index.js';
|
|
5
5
|
|
|
6
6
|
class Utility {
|
|
7
7
|
static applyError(error, messageParams) {
|