@thzero/library_client_svelte 0.15.9 → 0.17.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.
@@ -1,4 +1,4 @@
1
- import GlobalUtility from '@thzero/library_client/utility/global';
1
+ import LibraryClientUtility from '@thzero/library_client/utility/index';
2
2
 
3
3
  import BaseServices from '@thzero/library_client/boot/baseServices';
4
4
 
@@ -9,7 +9,7 @@ import translateService from '../service/translate';
9
9
 
10
10
  class SvelteBaseServices extends BaseServices {
11
11
  _initializeInjector(framework, injector) {
12
- GlobalUtility.$injector = injector;
12
+ LibraryClientUtility.$injector = injector;
13
13
  }
14
14
 
15
15
  _initializeEvent(injector) {
package/boot/basei18n.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import { init, getLocaleFromNavigator, register, format, addMessages, unwrapFunctionStore } from 'svelte-i18n';
2
2
 
3
- import GlobalUtility from '@thzero/library_client/utility/global';
3
+ import LibraryClientUtility from '@thzero/library_client/utility/index';
4
4
 
5
5
  import Basei18n from '@thzero/library_client/boot/basei18n';
6
6
 
@@ -15,7 +15,7 @@ class SvelteBasei18n extends Basei18n {
15
15
  fallbackLocale: 'en',
16
16
  initialLocale: getLocaleFromNavigator()
17
17
  });
18
- GlobalUtility.$trans = { t: unwrapFunctionStore(format) };
18
+ LibraryClientUtility.$trans = { t: unwrapFunctionStore(format) };
19
19
  }
20
20
 
21
21
  _initMessages(register) {
package/boot/eventBus.js CHANGED
@@ -1,9 +1,9 @@
1
1
  import mitt from 'mitt';
2
2
 
3
- import GlobalUtility from '@thzero/library_client/utility/global';
3
+ import LibraryClientUtility from '@thzero/library_client/utility/index';
4
4
 
5
5
  const EventBus = mitt();
6
6
 
7
7
  export default async () => {
8
- GlobalUtility.$EventBus = EventBus;
8
+ LibraryClientUtility.$EventBus = EventBus;
9
9
  };
package/boot/main.js CHANGED
@@ -1,4 +1,4 @@
1
- import GlobalUtility from '@thzero/library_client/utility/global';
1
+ import LibraryClientUtility from '@thzero/library_client/utility/index';
2
2
 
3
3
  // @ts-ignore
4
4
  import {} from '@thzero/library_common/utility/string';
@@ -18,7 +18,7 @@ async function start(app, storeRequest, bootFiles, starter) {
18
18
 
19
19
  if (!store)
20
20
  throw Error('Unable to create store.');
21
- GlobalUtility.$store = store;
21
+ LibraryClientUtility.$store = store;
22
22
 
23
23
  if (bootFiles && (bootFiles.length > 0)) {
24
24
  let obj;
package/license.md CHANGED
@@ -1,6 +1,6 @@
1
1
  MIT License
2
2
 
3
- Copyright (c) 2021-2022 thZero.com
3
+ Copyright (c) 2021-2023 thZero.com
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
6
6
 
package/package.json CHANGED
@@ -1,10 +1,10 @@
1
1
  {
2
2
  "name": "@thzero/library_client_svelte",
3
- "version": "0.15.9",
3
+ "version": "0.17.2",
4
4
  "version_major": 0,
5
- "version_minor": 15,
6
- "version_patch": 9,
7
- "version_date": "12/15/2022",
5
+ "version_minor": 17,
6
+ "version_patch": 2,
7
+ "version_date": "02/03/2023",
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.16",
25
- "@thzero/library_common": "^0.16",
24
+ "@thzero/library_client": "^0.17",
25
+ "@thzero/library_common": "^0.17",
26
26
  "mitt": "^3.0.0",
27
27
  "svelte-i18n": "^3.6.0",
28
28
  "svelte-spa-router": "^3.3.0"
@@ -1,4 +1,4 @@
1
- import LibraryConstants from '@thzero/library_client/constants';
1
+ import LibraryClientConstants from '@thzero/library_client/constants';
2
2
 
3
3
  import BaseUserService from '@thzero/library_client/service/baseUser';
4
4
 
@@ -12,7 +12,7 @@ class VueBaseUserService extends BaseUserService {
12
12
  async init(injector) {
13
13
  await super.init(injector);
14
14
 
15
- this._serviceStore = this._injector.getService(LibraryConstants.InjectorKeys.SERVICE_STORE);
15
+ this._serviceStore = this._injector.getService(LibraryClientConstants.InjectorKeys.SERVICE_STORE);
16
16
  }
17
17
 
18
18
  async resetUser(correlationId) {
package/service/event.js CHANGED
@@ -1,11 +1,11 @@
1
- import GlobalUtility from '@thzero/library_client/utility/global';
1
+ import LibraryClientUtility from '@thzero/library_client/utility/index';
2
2
 
3
3
  import EventService from '@thzero/library_client/service/event';
4
4
 
5
5
  class SvelteEventService extends EventService {
6
6
  // eslint-disable-next-line
7
7
  emit(channel, value) {
8
- GlobalUtility.$EventBus.emit(channel, value);
8
+ LibraryClientUtility.$EventBus.emit(channel, value);
9
9
  }
10
10
  }
11
11
 
package/service/store.js CHANGED
@@ -1,10 +1,10 @@
1
- import GlobalUtility from '@thzero/library_client/utility/global';
1
+ import LibraryClientUtility from '@thzero/library_client/utility/index';
2
2
 
3
3
  import Service from '@thzero/library_client/service/index';
4
4
 
5
5
  class SvelteStoreService extends Service {
6
6
  get store() {
7
- return GlobalUtility.$store;
7
+ return LibraryClientUtility.$store;
8
8
  }
9
9
  }
10
10
 
@@ -1,11 +1,11 @@
1
- import GlobalUtility from '@thzero/library_client/utility/global';
1
+ import LibraryClientUtility from '@thzero/library_client/utility/index';
2
2
 
3
3
  import TranslateService from '@thzero/library_client/service/translate';
4
4
 
5
5
  class SvelteTranslateService extends TranslateService {
6
6
  // eslint-disable-next-line
7
7
  translate(correlationId, id) {
8
- return GlobalUtility.$trans.t(id);
8
+ return LibraryClientUtility.$trans.t(id);
9
9
  }
10
10
  }
11
11
 
package/utility/index.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import Constants from '../constants';
2
2
  import LibraryCommonConstants from '@thzero/library_common/constants';
3
3
 
4
- import GlobalUtility from '@thzero/library_client/utility/global';
4
+ import LibraryClientUtility from '@thzero/library_client/utility/index';
5
5
 
6
6
  class Utility {
7
7
  static applyError(error, messageParams) {
@@ -29,7 +29,7 @@ class Utility {
29
29
  let suffix = param.suffix;
30
30
  if (String.isNullOrEmpty(suffix))
31
31
  suffix = Constants.ErrorCodes.SuffixParams;
32
- param.value = GlobalUtility.$trans.t(`${suffix}.${param.value}`);
32
+ param.value = LibraryClientUtility.$trans.t(`${suffix}.${param.value}`);
33
33
  }
34
34
  messageParams[field] = param.value;
35
35
  }
@@ -38,7 +38,7 @@ class Utility {
38
38
  messageCode = Constants.ErrorCodes.Default;
39
39
 
40
40
  return {
41
- message: GlobalUtility.$trans.t(`${Constants.ErrorCodes.Suffix}.${messageCode}`, messageParams),
41
+ message: LibraryClientUtility.$trans.t(`${Constants.ErrorCodes.Suffix}.${messageCode}`, messageParams),
42
42
  field: (error.field ? error.field : LibraryCommonConstants.ErrorFields.Generic)
43
43
  };
44
44
  }
@@ -70,7 +70,7 @@ class Utility {
70
70
  return;
71
71
  }
72
72
 
73
- GlobalUtility.$navRouter.push('/');
73
+ LibraryClientUtility.$navRouter.push('/');
74
74
  }
75
75
  }
76
76