@edm-sdui/sdui 1.0.20 → 1.0.21
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/esm2022/lib/core/services/ui-action-handlers.service.mjs +7 -1
- package/esm2022/lib/core/services/ui-action.service.mjs +9 -75
- package/esm2022/lib/core/uitheme/enums/uiasset.mjs +2 -1
- package/esm2022/lib/core/uitheme/mapping/asset-mapping.mjs +2 -1
- package/fesm2022/edm-sdui-sdui.mjs +14 -72
- package/fesm2022/edm-sdui-sdui.mjs.map +1 -1
- package/lib/core/services/ui-action-handlers.service.d.ts +3 -0
- package/lib/core/services/ui-action-handlers.service.d.ts.map +1 -1
- package/lib/core/services/ui-action.service.d.ts +2 -3
- package/lib/core/services/ui-action.service.d.ts.map +1 -1
- package/lib/core/uitheme/enums/uiasset.d.ts +2 -1
- package/lib/core/uitheme/enums/uiasset.d.ts.map +1 -1
- package/lib/core/uitheme/mapping/asset-mapping.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -442,6 +442,12 @@ class UIActionHandlersService {
|
|
|
442
442
|
console.warn('Nenhum handler de logout registrado.');
|
|
443
443
|
}
|
|
444
444
|
}
|
|
445
|
+
registerInternalNavigation(fn) {
|
|
446
|
+
this.internalNavigationHandler = fn;
|
|
447
|
+
}
|
|
448
|
+
handleInternalNavigation(url) {
|
|
449
|
+
this.internalNavigationHandler?.(url);
|
|
450
|
+
}
|
|
445
451
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: UIActionHandlersService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
446
452
|
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: UIActionHandlersService, providedIn: 'root' }); }
|
|
447
453
|
}
|
|
@@ -504,10 +510,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
|
|
|
504
510
|
}], ctorParameters: () => [{ type: i0.Injector }, { type: i0.ApplicationRef }, { type: i0.ComponentFactoryResolver }] });
|
|
505
511
|
|
|
506
512
|
class UIActionService {
|
|
507
|
-
constructor(router,
|
|
513
|
+
constructor(router, modalService, actionHandlers) {
|
|
508
514
|
this.router = router;
|
|
509
|
-
this.actionHandlers = actionHandlers;
|
|
510
515
|
this.modalService = modalService;
|
|
516
|
+
this.actionHandlers = actionHandlers;
|
|
511
517
|
}
|
|
512
518
|
execute(action) {
|
|
513
519
|
if (!action || !action.type)
|
|
@@ -523,7 +529,8 @@ class UIActionService {
|
|
|
523
529
|
});
|
|
524
530
|
}
|
|
525
531
|
else {
|
|
526
|
-
|
|
532
|
+
if (action.url)
|
|
533
|
+
this.actionHandlers.handleInternalNavigation(action.url);
|
|
527
534
|
}
|
|
528
535
|
break;
|
|
529
536
|
case UIActionType.RELOAD_INTERNAL_URL:
|
|
@@ -554,80 +561,13 @@ class UIActionService {
|
|
|
554
561
|
// Outros tipos de ação podem ser adicionados aqui
|
|
555
562
|
}
|
|
556
563
|
}
|
|
557
|
-
|
|
558
|
-
if (url.includes('timeline/')) {
|
|
559
|
-
const broken = url.split('timeline/')[1];
|
|
560
|
-
this.router.navigate(['comunidade', 'postagem', broken], { queryParams: { from: 'sdui' } });
|
|
561
|
-
return true;
|
|
562
|
-
}
|
|
563
|
-
if (url.includes('live/')) {
|
|
564
|
-
const broken = url.split('live/')[1];
|
|
565
|
-
this.router.navigate(['comunidade', 'postagem', 'live', broken], { queryParams: { from: 'sdui' } });
|
|
566
|
-
return true;
|
|
567
|
-
}
|
|
568
|
-
if (url.includes('lesson/')) {
|
|
569
|
-
const lessonId = url.split('lesson/')[1];
|
|
570
|
-
const productId = url.includes('product/') ? url.split('product/')[1].split('/')[0] : null;
|
|
571
|
-
if (productId) {
|
|
572
|
-
this.router.navigate(['produtos', productId, 'aula', lessonId], { queryParams: { from: 'sdui' } });
|
|
573
|
-
return true;
|
|
574
|
-
}
|
|
575
|
-
}
|
|
576
|
-
if (url.includes('product/')) {
|
|
577
|
-
const productId = url.split('product/')[1];
|
|
578
|
-
this.router.navigate(['produtos', productId], { queryParams: { from: 'sdui' } });
|
|
579
|
-
return true;
|
|
580
|
-
}
|
|
581
|
-
if (url.includes('posts/')) {
|
|
582
|
-
const postId = url.split('posts/')[1];
|
|
583
|
-
this.router.navigate(['comunidade', 'postagem', postId], { queryParams: { from: 'sdui' } });
|
|
584
|
-
return true;
|
|
585
|
-
}
|
|
586
|
-
if (url.includes('my-purchases')) {
|
|
587
|
-
this.router.navigate(['perfil', 'compras'], { queryParams: { from: 'sdui' } });
|
|
588
|
-
return true;
|
|
589
|
-
}
|
|
590
|
-
if (url.includes('my-annotations')) {
|
|
591
|
-
this.router.navigate(['perfil', 'meu-caderno'], { queryParams: { from: 'sdui' } });
|
|
592
|
-
return true;
|
|
593
|
-
}
|
|
594
|
-
if (url.includes('my-list')) {
|
|
595
|
-
this.router.navigate(['perfil', 'minha-lista'], { queryParams: { from: 'sdui' } });
|
|
596
|
-
return true;
|
|
597
|
-
}
|
|
598
|
-
if (url.includes('my-certificates')) {
|
|
599
|
-
this.router.navigate(['perfil', 'certificados'], { queryParams: { from: 'sdui' } });
|
|
600
|
-
return true;
|
|
601
|
-
}
|
|
602
|
-
if (url.includes('my-subscriptions')) {
|
|
603
|
-
this.router.navigate(['perfil', 'assinaturas'], { queryParams: { from: 'sdui' } });
|
|
604
|
-
return true;
|
|
605
|
-
}
|
|
606
|
-
if (url.includes('edit-profile')) {
|
|
607
|
-
this.router.navigate(['perfil', 'editar'], { queryParams: { from: 'sdui' } });
|
|
608
|
-
return true;
|
|
609
|
-
}
|
|
610
|
-
if (url.includes('ranking')) {
|
|
611
|
-
this.router.navigate(['perfil', 'ranking'], { queryParams: { from: 'sdui' } });
|
|
612
|
-
return true;
|
|
613
|
-
}
|
|
614
|
-
if (url.includes('ranking/rules')) {
|
|
615
|
-
this.router.navigate(['perfil', 'ranking', 'regras'], { queryParams: { from: 'sdui' } });
|
|
616
|
-
return true;
|
|
617
|
-
}
|
|
618
|
-
if (url.includes('logout')) {
|
|
619
|
-
this.router.navigate(['logout'], { queryParams: { from: 'sdui' } });
|
|
620
|
-
return true;
|
|
621
|
-
}
|
|
622
|
-
return false; // nenhum dos casos especiais foi tratado
|
|
623
|
-
}
|
|
624
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: UIActionService, deps: [{ token: i1$3.Router }, { token: UIActionHandlersService }, { token: ModalService }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
564
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: UIActionService, deps: [{ token: i1$3.Router }, { token: ModalService }, { token: UIActionHandlersService }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
625
565
|
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: UIActionService, providedIn: 'root' }); }
|
|
626
566
|
}
|
|
627
567
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: UIActionService, decorators: [{
|
|
628
568
|
type: Injectable,
|
|
629
569
|
args: [{ providedIn: 'root' }]
|
|
630
|
-
}], ctorParameters: () => [{ type: i1$3.Router }, { type:
|
|
570
|
+
}], ctorParameters: () => [{ type: i1$3.Router }, { type: ModalService }, { type: UIActionHandlersService }] });
|
|
631
571
|
|
|
632
572
|
var UIAsset;
|
|
633
573
|
(function (UIAsset) {
|
|
@@ -995,6 +935,7 @@ var UIAsset;
|
|
|
995
935
|
UIAsset["IC_RANKING_RANKING"] = "ic_ranking_ranking";
|
|
996
936
|
UIAsset["BT_NEXT_PROFILE"] = "bt_next_profile";
|
|
997
937
|
UIAsset["IC_SUPPORT_PROFILE"] = "ic_support_profile";
|
|
938
|
+
UIAsset["BT_BACK_SEC"] = "bt_back_sec";
|
|
998
939
|
})(UIAsset || (UIAsset = {}));
|
|
999
940
|
|
|
1000
941
|
const assetMapping = {
|
|
@@ -1362,6 +1303,7 @@ const assetMapping = {
|
|
|
1362
1303
|
[UIAsset.IC_RANKING_RANKING]: 'assets/images/ic-ranking-ranking.svg',
|
|
1363
1304
|
[UIAsset.BT_NEXT_PROFILE]: 'assets/images/bt-next-profile.svg',
|
|
1364
1305
|
[UIAsset.IC_SUPPORT_PROFILE]: 'assets/images/ic-support-profile.svg',
|
|
1306
|
+
[UIAsset.BT_BACK_SEC]: 'assets/images/bt-back-sec.svg',
|
|
1365
1307
|
};
|
|
1366
1308
|
|
|
1367
1309
|
var UISpacingLevel;
|