@pepperi-addons/ngx-lib 0.4.0-angular14.21 → 0.4.0-angular14.24
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/core/common/services/addon.service.d.ts +5 -8
- package/esm2020/core/common/services/addon.service.mjs +38 -35
- package/esm2020/page-layout/page-layout.component.mjs +6 -3
- package/esm2020/remote-loader/remote-loader.service.mjs +17 -14
- package/esm2020/side-bar/side-bar.component.mjs +8 -27
- package/fesm2015/pepperi-addons-ngx-lib-page-layout.mjs +5 -2
- package/fesm2015/pepperi-addons-ngx-lib-page-layout.mjs.map +1 -1
- package/fesm2015/pepperi-addons-ngx-lib-remote-loader.mjs +16 -13
- package/fesm2015/pepperi-addons-ngx-lib-remote-loader.mjs.map +1 -1
- package/fesm2015/pepperi-addons-ngx-lib-side-bar.mjs +7 -26
- package/fesm2015/pepperi-addons-ngx-lib-side-bar.mjs.map +1 -1
- package/fesm2015/pepperi-addons-ngx-lib.mjs +37 -34
- package/fesm2015/pepperi-addons-ngx-lib.mjs.map +1 -1
- package/fesm2020/pepperi-addons-ngx-lib-page-layout.mjs +5 -2
- package/fesm2020/pepperi-addons-ngx-lib-page-layout.mjs.map +1 -1
- package/fesm2020/pepperi-addons-ngx-lib-remote-loader.mjs +16 -13
- package/fesm2020/pepperi-addons-ngx-lib-remote-loader.mjs.map +1 -1
- package/fesm2020/pepperi-addons-ngx-lib-side-bar.mjs +7 -26
- package/fesm2020/pepperi-addons-ngx-lib-side-bar.mjs.map +1 -1
- package/fesm2020/pepperi-addons-ngx-lib.mjs +38 -35
- package/fesm2020/pepperi-addons-ngx-lib.mjs.map +1 -1
- package/package.json +1 -1
- package/page-layout/page-layout.component.d.ts +2 -1
- package/remote-loader/remote-loader.service.d.ts +3 -3
- package/side-bar/side-bar.component.d.ts +2 -3
|
@@ -2357,7 +2357,7 @@ class PepAddonService {
|
|
|
2357
2357
|
this.fileService = fileService;
|
|
2358
2358
|
this.route = route;
|
|
2359
2359
|
this.PAGES_ADDON_UUID = '50062e0c-9967-4ed4-9102-f2bc50602d41';
|
|
2360
|
-
|
|
2360
|
+
// private readonly ADDON_ASSETS_PATH_KEY = 'AddonAssetsPath';
|
|
2361
2361
|
this.ADDONS_DICTIONARY_ASSETS_PATH_KEY = 'AddonsDictionaryAssetsPath';
|
|
2362
2362
|
this.ADDON_API_RELATIVE_PATH = '/addons/api';
|
|
2363
2363
|
this.ADDON_API_ASYNC_RELATIVE_PATH = `${this.ADDON_API_RELATIVE_PATH}/async`;
|
|
@@ -2371,24 +2371,22 @@ class PepAddonService {
|
|
|
2371
2371
|
? this.ADDON_API_ASYNC_RELATIVE_PATH
|
|
2372
2372
|
: this.ADDON_API_RELATIVE_PATH;
|
|
2373
2373
|
}
|
|
2374
|
-
getAddonStaticFolder(
|
|
2375
|
-
if (
|
|
2376
|
-
|
|
2377
|
-
|
|
2378
|
-
}
|
|
2379
|
-
|
|
2380
|
-
|
|
2381
|
-
|
|
2382
|
-
|
|
2383
|
-
|
|
2384
|
-
|
|
2385
|
-
|
|
2386
|
-
|
|
2387
|
-
|
|
2388
|
-
|
|
2389
|
-
|
|
2390
|
-
return this.sessionService.setObject(this.ADDON_ASSETS_PATH_KEY, path);
|
|
2391
|
-
}
|
|
2374
|
+
getAddonStaticFolder(addonUUID) {
|
|
2375
|
+
// if (addonUUID.length > 0) {
|
|
2376
|
+
const addonsDictionary = this.sessionService.getObject(this.ADDONS_DICTIONARY_ASSETS_PATH_KEY);
|
|
2377
|
+
return addonsDictionary && addonsDictionary[addonUUID] ? addonsDictionary[addonUUID] : '';
|
|
2378
|
+
// } else {
|
|
2379
|
+
// return this.sessionService.getObject(this.ADDON_ASSETS_PATH_KEY) || '';
|
|
2380
|
+
// }
|
|
2381
|
+
}
|
|
2382
|
+
setAddonStaticFolder(path, addonUUID) {
|
|
2383
|
+
// if (addonUUID.length > 0) {
|
|
2384
|
+
const addonsDictionary = this.sessionService.getObject(this.ADDONS_DICTIONARY_ASSETS_PATH_KEY) ?? {};
|
|
2385
|
+
addonsDictionary[addonUUID] = path;
|
|
2386
|
+
this.sessionService.setObject(this.ADDONS_DICTIONARY_ASSETS_PATH_KEY, addonsDictionary);
|
|
2387
|
+
// } else {
|
|
2388
|
+
// return this.sessionService.setObject(this.ADDON_ASSETS_PATH_KEY, path);
|
|
2389
|
+
// }
|
|
2392
2390
|
}
|
|
2393
2391
|
getServerBaseUrl(addonUUID, fileName = '', isAsync = false, localhostPort = 4500) {
|
|
2394
2392
|
const fileToAdd = fileName.length > 0 ? `/${fileName}` : '';
|
|
@@ -2429,8 +2427,8 @@ class PepAddonService {
|
|
|
2429
2427
|
this.loaderService.hide();
|
|
2430
2428
|
});
|
|
2431
2429
|
}
|
|
2432
|
-
getNgxLibTranslationResource(
|
|
2433
|
-
const addonStaticFolder = this.getAddonStaticFolder(
|
|
2430
|
+
getNgxLibTranslationResource(addonUUID, libName = 'ngx-lib') {
|
|
2431
|
+
const addonStaticFolder = this.getAddonStaticFolder(addonUUID);
|
|
2434
2432
|
const translationsPath = this.fileService.getAssetsTranslationsPath(addonStaticFolder, libName);
|
|
2435
2433
|
const translationsSuffix = this.fileService.getAssetsTranslationsSuffix(libName);
|
|
2436
2434
|
return {
|
|
@@ -2438,8 +2436,8 @@ class PepAddonService {
|
|
|
2438
2436
|
suffix: translationsSuffix,
|
|
2439
2437
|
};
|
|
2440
2438
|
}
|
|
2441
|
-
getAddonTranslationResource(
|
|
2442
|
-
const addonStaticFolder = this.getAddonStaticFolder(
|
|
2439
|
+
getAddonTranslationResource(addonUUID) {
|
|
2440
|
+
const addonStaticFolder = this.getAddonStaticFolder(addonUUID);
|
|
2443
2441
|
const defaultSubFolder = 'assets/i18n/';
|
|
2444
2442
|
return {
|
|
2445
2443
|
prefix: addonStaticFolder.length > 0 ? `${addonStaticFolder}${defaultSubFolder}` : `/${defaultSubFolder}`,
|
|
@@ -2452,24 +2450,29 @@ class PepAddonService {
|
|
|
2452
2450
|
getPagesAddonUUID() {
|
|
2453
2451
|
return this.PAGES_ADDON_UUID;
|
|
2454
2452
|
}
|
|
2455
|
-
// Deprecated need to delete in next major.
|
|
2456
|
-
static createDefaultMultiTranslateLoader(
|
|
2457
|
-
|
|
2458
|
-
|
|
2459
|
-
|
|
2460
|
-
|
|
2461
|
-
|
|
2462
|
-
|
|
2463
|
-
|
|
2464
|
-
|
|
2453
|
+
// // Deprecated need to delete in next major.
|
|
2454
|
+
// public static createDefaultMultiTranslateLoader(
|
|
2455
|
+
// http: HttpClient,
|
|
2456
|
+
// fileService: PepFileService,
|
|
2457
|
+
// addonService: PepAddonService,
|
|
2458
|
+
// addonUUID = ''
|
|
2459
|
+
// ) {
|
|
2460
|
+
// const ngxLibTranslationResource = addonService.getNgxLibTranslationResource(addonUUID);
|
|
2461
|
+
// const addonTranslationResource = addonService.getAddonTranslationResource(addonUUID);
|
|
2462
|
+
// return addonService.translateService.createMultiTranslateLoader([
|
|
2463
|
+
// ngxLibTranslationResource,
|
|
2464
|
+
// addonTranslationResource
|
|
2465
|
+
// ]);
|
|
2466
|
+
// }
|
|
2467
|
+
static createMultiTranslateLoader(addonUUID, addonService, libsName = ['ngx-lib']) {
|
|
2465
2468
|
const ngxLibTranslationResources = [];
|
|
2466
2469
|
if (libsName?.length > 0) {
|
|
2467
2470
|
for (let index = 0; index < libsName.length; index++) {
|
|
2468
2471
|
const libName = libsName[index];
|
|
2469
|
-
ngxLibTranslationResources.push(addonService.getNgxLibTranslationResource(
|
|
2472
|
+
ngxLibTranslationResources.push(addonService.getNgxLibTranslationResource(addonUUID, libName));
|
|
2470
2473
|
}
|
|
2471
2474
|
}
|
|
2472
|
-
const addonTranslationResource = addonService.getAddonTranslationResource(
|
|
2475
|
+
const addonTranslationResource = addonService.getAddonTranslationResource(addonUUID);
|
|
2473
2476
|
return addonService.translateService.createMultiTranslateLoader([
|
|
2474
2477
|
...ngxLibTranslationResources,
|
|
2475
2478
|
addonTranslationResource
|