@edm-sdui/sdui 1.0.16 → 1.0.18

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.
Files changed (30) hide show
  1. package/esm2022/lib/components/uicomponent/modal/modal.component.mjs +30 -0
  2. package/esm2022/lib/components/uilayout/fab/fab.component.mjs +42 -0
  3. package/esm2022/lib/components/uilayout/single-column-layout/single-column-layout.component.mjs +5 -4
  4. package/esm2022/lib/core/services/modal.service.mjs +30 -0
  5. package/esm2022/lib/core/services/ui-action.service.mjs +13 -4
  6. package/esm2022/lib/core/services/uiscreen.service.mjs +5 -2
  7. package/esm2022/lib/core/uicomposition/models/uisingle-column-layout.mjs +1 -1
  8. package/esm2022/lib/core/uitheme/mapping/color-mapping.mjs +3 -3
  9. package/esm2022/lib/core/uitheme/models/uibackground.mjs +1 -1
  10. package/esm2022/lib/directives/uiview.directive.mjs +8 -1
  11. package/esm2022/lib/sdui.module.mjs +4 -1
  12. package/fesm2022/edm-sdui-sdui.mjs +1243 -1135
  13. package/fesm2022/edm-sdui-sdui.mjs.map +1 -1
  14. package/lib/components/uicomponent/modal/modal.component.d.ts +15 -0
  15. package/lib/components/uicomponent/modal/modal.component.d.ts.map +1 -0
  16. package/lib/components/uilayout/fab/fab.component.d.ts +17 -0
  17. package/lib/components/uilayout/fab/fab.component.d.ts.map +1 -0
  18. package/lib/core/services/modal.service.d.ts +12 -0
  19. package/lib/core/services/modal.service.d.ts.map +1 -0
  20. package/lib/core/services/ui-action.service.d.ts +3 -1
  21. package/lib/core/services/ui-action.service.d.ts.map +1 -1
  22. package/lib/core/services/uiscreen.service.d.ts.map +1 -1
  23. package/lib/core/uicomposition/models/uisingle-column-layout.d.ts +2 -0
  24. package/lib/core/uicomposition/models/uisingle-column-layout.d.ts.map +1 -1
  25. package/lib/core/uitheme/models/uibackground.d.ts +3 -1
  26. package/lib/core/uitheme/models/uibackground.d.ts.map +1 -1
  27. package/lib/directives/uiview.directive.d.ts.map +1 -1
  28. package/lib/sdui.module.d.ts +28 -27
  29. package/lib/sdui.module.d.ts.map +1 -1
  30. package/package.json +1 -1
@@ -1,12 +1,13 @@
1
1
  import * as i0 from '@angular/core';
2
- import { InjectionToken, Injectable, Optional, Inject, Injector, Component, Input, Directive, HostListener, inject, ViewChild, NgModule, EventEmitter, ChangeDetectionStrategy, Output } from '@angular/core';
2
+ import { InjectionToken, Injectable, Optional, Inject, Injector, Component, Input, EventEmitter, Output, Directive, HostListener, ViewChild, inject, NgModule, ChangeDetectionStrategy } from '@angular/core';
3
3
  import * as i1$1 from '@angular/common';
4
4
  import { CommonModule } from '@angular/common';
5
- import * as i1$2 from '@angular/router';
5
+ import * as i1$3 from '@angular/router';
6
6
  import { RouterModule } from '@angular/router';
7
7
  import { map, BehaviorSubject, finalize, catchError, of } from 'rxjs';
8
8
  import * as i1 from '@angular/common/http';
9
9
  import { tap } from 'rxjs/operators';
10
+ import * as i1$2 from '@angular/platform-browser';
10
11
 
11
12
  var UIScreenIdentifier;
12
13
  (function (UIScreenIdentifier) {
@@ -116,6 +117,7 @@ class UIScreenService {
116
117
  header: json.header ? this.mapToUIComponent(json.header) : null,
117
118
  main: json.main ? this.mapToUIComponent(json.main) : null,
118
119
  footer: json.footer ? this.mapToUIComponent(json.footer) : null,
120
+ fab: json.fab ? this.mapToUIElement(json.fab) : null,
119
121
  };
120
122
  }
121
123
  mapToCenteredContentLayout(json) {
@@ -191,7 +193,9 @@ class UIScreenService {
191
193
  }
192
194
  mapBackground(json) {
193
195
  return {
194
- backgroundColor: json.background_color,
196
+ backgroundColor: json.background_color ? json.background_color : null,
197
+ gradientColor1: json.gradient_color_1 ? json.gradient_color_1 : null,
198
+ gradientColor2: json.gradient_color_2 ? json.gradient_color_2 : null,
195
199
  };
196
200
  }
197
201
  mapAction(json) {
@@ -410,1145 +414,220 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
410
414
  type: Input
411
415
  }] } });
412
416
 
413
- class SingleColumnLayoutComponent {
414
- ngOnChanges(changes) {
415
- if (changes['uiLayout']) {
416
- console.debug('[SingleColumnLayout] Novo layout recebido:', changes['uiLayout'].currentValue);
417
+ var UIActionType;
418
+ (function (UIActionType) {
419
+ // navegação
420
+ UIActionType["INTERNAL_URL"] = "INTERNAL_URL";
421
+ UIActionType["RELOAD_INTERNAL_URL"] = "RELOAD_INTERNAL_URL";
422
+ UIActionType["DISMISS_TO_SCENE"] = "DISMISS_TO_SCENE";
423
+ UIActionType["EXTERNAL_URL"] = "EXTERNAL_URL";
424
+ UIActionType["WEBVIEW_URL"] = "WEBVIEW_URL";
425
+ // paywall
426
+ UIActionType["PAYWALL"] = "PAYWALL";
427
+ UIActionType["REGISTER"] = "REGISTER";
428
+ // conteúdo
429
+ UIActionType["HTML"] = "HTML";
430
+ UIActionType["FILE"] = "FILE";
431
+ })(UIActionType || (UIActionType = {}));
432
+
433
+ class UIActionHandlersService {
434
+ registerLogout(handler) {
435
+ this.logoutHandler = handler;
436
+ }
437
+ executeLogout() {
438
+ if (this.logoutHandler) {
439
+ this.logoutHandler();
440
+ }
441
+ else {
442
+ console.warn('Nenhum handler de logout registrado.');
417
443
  }
418
444
  }
419
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: SingleColumnLayoutComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
420
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.13", type: SingleColumnLayoutComponent, selector: "edm-sdui-single-column-layout", inputs: { uiLayout: "uiLayout" }, usesOnChanges: true, ngImport: i0, template: "<div class=\"single-column-layout\" *ngIf=\"!!uiLayout\">\n <!-- <pre>{{ uiLayout | json }}</pre> -->\n\n <edm-sdui-navigation [uiNavigation]=\"uiLayout.nav\"></edm-sdui-navigation>\n\n <div class=\"header\" *ngIf=\"!!uiLayout?.header\">\n <edm-sdui-component [uiComponent]=\"uiLayout.header\"></edm-sdui-component>\n </div>\n\n <div class=\"scrollview\" *ngIf=\"!!uiLayout?.main\">\n <div class=\"main\">\n <edm-sdui-component\n *ngIf=\"!!uiLayout?.main\"\n [uiComponent]=\"uiLayout.main\"\n ></edm-sdui-component>\n </div>\n </div>\n\n <div class=\"footer\" *ngIf=\"!!uiLayout?.footer\">\n <edm-sdui-component [uiComponent]=\"uiLayout.footer\"></edm-sdui-component>\n </div>\n</div>\n", styles: [":host{display:contents}.single-column-layout{display:flex;flex-direction:column;width:100%;min-height:100vh;position:relative}.single-column-layout .header{width:100%;z-index:100}.single-column-layout .scrollview .main{flex:1;display:flex;align-items:center;justify-content:center}.single-column-layout .footer{position:fixed;bottom:0;left:0;width:100%;z-index:100}\n"], dependencies: [{ kind: "directive", type: i1$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: UINavigationComponent, selector: "edm-sdui-navigation", inputs: ["uiNavigation"] }, { kind: "component", type: UIComponentComponent, selector: "edm-sdui-component", inputs: ["uiComponent", "translateLabel"] }] }); }
445
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: UIActionHandlersService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
446
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: UIActionHandlersService, providedIn: 'root' }); }
421
447
  }
422
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: SingleColumnLayoutComponent, decorators: [{
423
- type: Component,
424
- args: [{ selector: 'edm-sdui-single-column-layout', standalone: false, template: "<div class=\"single-column-layout\" *ngIf=\"!!uiLayout\">\n <!-- <pre>{{ uiLayout | json }}</pre> -->\n\n <edm-sdui-navigation [uiNavigation]=\"uiLayout.nav\"></edm-sdui-navigation>\n\n <div class=\"header\" *ngIf=\"!!uiLayout?.header\">\n <edm-sdui-component [uiComponent]=\"uiLayout.header\"></edm-sdui-component>\n </div>\n\n <div class=\"scrollview\" *ngIf=\"!!uiLayout?.main\">\n <div class=\"main\">\n <edm-sdui-component\n *ngIf=\"!!uiLayout?.main\"\n [uiComponent]=\"uiLayout.main\"\n ></edm-sdui-component>\n </div>\n </div>\n\n <div class=\"footer\" *ngIf=\"!!uiLayout?.footer\">\n <edm-sdui-component [uiComponent]=\"uiLayout.footer\"></edm-sdui-component>\n </div>\n</div>\n", styles: [":host{display:contents}.single-column-layout{display:flex;flex-direction:column;width:100%;min-height:100vh;position:relative}.single-column-layout .header{width:100%;z-index:100}.single-column-layout .scrollview .main{flex:1;display:flex;align-items:center;justify-content:center}.single-column-layout .footer{position:fixed;bottom:0;left:0;width:100%;z-index:100}\n"] }]
425
- }], propDecorators: { uiLayout: [{
426
- type: Input
427
- }] } });
448
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: UIActionHandlersService, decorators: [{
449
+ type: Injectable,
450
+ args: [{ providedIn: 'root' }]
451
+ }] });
428
452
 
429
- class CenteredContentLayoutComponent {
430
- ngOnInit() {
431
- console.log(this.uiLayout);
453
+ class ModalComponent {
454
+ constructor(sanitizer) {
455
+ this.sanitizer = sanitizer;
456
+ this.title = '';
457
+ this.closed = new EventEmitter();
432
458
  }
433
- ngOnChanges(changes) {
434
- if (changes['uiLayout']) {
435
- console.debug('[CenteredContentLayoutComponent] Novo layout recebido:', changes['uiLayout'].currentValue);
436
- }
459
+ get safeUrl() {
460
+ return this.sanitizer.bypassSecurityTrustResourceUrl(this.url);
437
461
  }
438
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: CenteredContentLayoutComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
439
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.13", type: CenteredContentLayoutComponent, selector: "edm-sdui-centered-content-layout", inputs: { uiLayout: "uiLayout" }, usesOnChanges: true, ngImport: i0, template: "<div class=\"centered-content-layout\" *ngIf=\"!!uiLayout\">\n <!-- <pre>{{ uiLayout | json }}</pre> -->\n\n <edm-sdui-navigation [uiNavigation]=\"uiLayout.nav\"></edm-sdui-navigation>\n\n <div class=\"header\" *ngIf=\"uiLayout?.header\">\n <edm-sdui-component [uiComponent]=\"uiLayout.header\"></edm-sdui-component>\n </div>\n\n <div class=\"centered\">\n <edm-sdui-component\n *ngIf=\"!!uiLayout?.centered\"\n [uiComponent]=\"uiLayout.centered\"\n ></edm-sdui-component>\n </div>\n\n <div class=\"footer\" *ngIf=\"!!uiLayout?.footer\">\n <edm-sdui-component [uiComponent]=\"uiLayout.footer\"></edm-sdui-component>\n </div>\n</div>\n", styles: [":host{display:contents}.centered-content-layout{display:flex;flex-direction:column;width:100vw;min-height:100vh;position:relative}.centered-content-layout .header{width:100%;z-index:100}.centered-content-layout .centered{flex:1;display:flex;align-items:center;justify-content:center}.centered-content-layout .footer{position:fixed;bottom:0;left:0;width:100%;z-index:100}\n"], dependencies: [{ kind: "directive", type: i1$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: UINavigationComponent, selector: "edm-sdui-navigation", inputs: ["uiNavigation"] }, { kind: "component", type: UIComponentComponent, selector: "edm-sdui-component", inputs: ["uiComponent", "translateLabel"] }] }); }
462
+ close() {
463
+ this.closed.emit();
464
+ }
465
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: ModalComponent, deps: [{ token: i1$2.DomSanitizer }], target: i0.ɵɵFactoryTarget.Component }); }
466
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.13", type: ModalComponent, isStandalone: true, selector: "edm-modal", inputs: { url: "url", title: "title" }, outputs: { closed: "closed" }, ngImport: i0, template: "<div class=\"edm-modal-backdrop\">\n <div class=\"edm-modal-content\" (click)=\"$event.stopPropagation()\">\n\n <div class=\"edm-modal-header\">\n <span class=\"edm-modal-title\">{{ title }}</span>\n <button class=\"edm-modal-close-btn\" (click)=\"close()\">\n <img src=\"/assets/images/bt-close.svg\" width=\"28px\" height=\"28px\" />\n </button>\n </div>\n\n <iframe [src]=\"safeUrl\" frameborder=\"0\"></iframe>\n\n </div>\n</div>\n", styles: [".edm-modal-backdrop{position:fixed;inset:0;display:flex;justify-content:center;align-items:center;z-index:999999}.edm-modal-backdrop:before{content:\"\";opacity:.8;background-color:var(--bg);z-index:-1;position:absolute;inset:0}.edm-modal-content{min-width:50vw;max-width:90vw;height:80vh;box-shadow:0 0 16px #ffffff1a;border-radius:12px;overflow:hidden;display:flex;flex-direction:column;position:relative}.edm-modal-header{display:flex;align-items:center;justify-content:space-between;padding:.75rem 1rem;background:var(--bg);color:var(--main-1);font-size:1rem;font-weight:600;border-bottom:1px solid var(--aux)}.edm-modal-title{flex:1}.edm-modal-close-btn{background:var(--bg-module);border:none;cursor:pointer}iframe{flex:1;padding-top:16px;width:100%;border:none}\n"] }); }
440
467
  }
441
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: CenteredContentLayoutComponent, decorators: [{
468
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: ModalComponent, decorators: [{
442
469
  type: Component,
443
- args: [{ selector: 'edm-sdui-centered-content-layout', standalone: false, template: "<div class=\"centered-content-layout\" *ngIf=\"!!uiLayout\">\n <!-- <pre>{{ uiLayout | json }}</pre> -->\n\n <edm-sdui-navigation [uiNavigation]=\"uiLayout.nav\"></edm-sdui-navigation>\n\n <div class=\"header\" *ngIf=\"uiLayout?.header\">\n <edm-sdui-component [uiComponent]=\"uiLayout.header\"></edm-sdui-component>\n </div>\n\n <div class=\"centered\">\n <edm-sdui-component\n *ngIf=\"!!uiLayout?.centered\"\n [uiComponent]=\"uiLayout.centered\"\n ></edm-sdui-component>\n </div>\n\n <div class=\"footer\" *ngIf=\"!!uiLayout?.footer\">\n <edm-sdui-component [uiComponent]=\"uiLayout.footer\"></edm-sdui-component>\n </div>\n</div>\n", styles: [":host{display:contents}.centered-content-layout{display:flex;flex-direction:column;width:100vw;min-height:100vh;position:relative}.centered-content-layout .header{width:100%;z-index:100}.centered-content-layout .centered{flex:1;display:flex;align-items:center;justify-content:center}.centered-content-layout .footer{position:fixed;bottom:0;left:0;width:100%;z-index:100}\n"] }]
444
- }], propDecorators: { uiLayout: [{
470
+ args: [{ selector: 'edm-modal', standalone: true, template: "<div class=\"edm-modal-backdrop\">\n <div class=\"edm-modal-content\" (click)=\"$event.stopPropagation()\">\n\n <div class=\"edm-modal-header\">\n <span class=\"edm-modal-title\">{{ title }}</span>\n <button class=\"edm-modal-close-btn\" (click)=\"close()\">\n <img src=\"/assets/images/bt-close.svg\" width=\"28px\" height=\"28px\" />\n </button>\n </div>\n\n <iframe [src]=\"safeUrl\" frameborder=\"0\"></iframe>\n\n </div>\n</div>\n", styles: [".edm-modal-backdrop{position:fixed;inset:0;display:flex;justify-content:center;align-items:center;z-index:999999}.edm-modal-backdrop:before{content:\"\";opacity:.8;background-color:var(--bg);z-index:-1;position:absolute;inset:0}.edm-modal-content{min-width:50vw;max-width:90vw;height:80vh;box-shadow:0 0 16px #ffffff1a;border-radius:12px;overflow:hidden;display:flex;flex-direction:column;position:relative}.edm-modal-header{display:flex;align-items:center;justify-content:space-between;padding:.75rem 1rem;background:var(--bg);color:var(--main-1);font-size:1rem;font-weight:600;border-bottom:1px solid var(--aux)}.edm-modal-title{flex:1}.edm-modal-close-btn{background:var(--bg-module);border:none;cursor:pointer}iframe{flex:1;padding-top:16px;width:100%;border:none}\n"] }]
471
+ }], ctorParameters: () => [{ type: i1$2.DomSanitizer }], propDecorators: { url: [{
472
+ type: Input
473
+ }], title: [{
445
474
  type: Input
475
+ }], closed: [{
476
+ type: Output
446
477
  }] } });
447
478
 
448
- var UISpacingLevel;
449
- (function (UISpacingLevel) {
450
- UISpacingLevel["S1"] = "s1";
451
- UISpacingLevel["S2"] = "s2";
452
- UISpacingLevel["S3"] = "s3";
453
- UISpacingLevel["S4"] = "s4";
454
- UISpacingLevel["S5"] = "s5";
455
- UISpacingLevel["S6"] = "s6";
456
- })(UISpacingLevel || (UISpacingLevel = {}));
479
+ class ModalService {
480
+ constructor(injector, appRef, cfr) {
481
+ this.injector = injector;
482
+ this.appRef = appRef;
483
+ this.cfr = cfr;
484
+ }
485
+ open(url, title = '') {
486
+ const factory = this.cfr.resolveComponentFactory(ModalComponent);
487
+ const componentRef = factory.create(this.injector);
488
+ componentRef.instance.url = url;
489
+ componentRef.instance.title = title;
490
+ componentRef.instance.closed.subscribe(() => {
491
+ this.appRef.detachView(componentRef.hostView);
492
+ componentRef.destroy();
493
+ });
494
+ this.appRef.attachView(componentRef.hostView);
495
+ const domElem = componentRef.hostView.rootNodes[0];
496
+ document.body.appendChild(domElem);
497
+ }
498
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: ModalService, deps: [{ token: i0.Injector }, { token: i0.ApplicationRef }, { token: i0.ComponentFactoryResolver }], target: i0.ɵɵFactoryTarget.Injectable }); }
499
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: ModalService, providedIn: 'root' }); }
500
+ }
501
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: ModalService, decorators: [{
502
+ type: Injectable,
503
+ args: [{ providedIn: 'root' }]
504
+ }], ctorParameters: () => [{ type: i0.Injector }, { type: i0.ApplicationRef }, { type: i0.ComponentFactoryResolver }] });
457
505
 
458
- const spaceMapping = {
459
- [UISpacingLevel.S1]: '4px',
460
- [UISpacingLevel.S2]: '8px',
461
- [UISpacingLevel.S3]: '16px',
462
- [UISpacingLevel.S4]: '24px',
463
- [UISpacingLevel.S5]: '32px',
464
- [UISpacingLevel.S6]: '40px',
465
- };
466
-
467
- var UIColor;
468
- (function (UIColor) {
469
- UIColor["ALERT"] = "alert";
470
- UIColor["BG_TAG"] = "bg_tag";
471
- UIColor["ACTINDCOLOR"] = "actindcolor";
472
- UIColor["TEXT_WEB"] = "text_web";
473
- UIColor["TEXT_RANKING_HIGHLIGHT"] = "text_ranking_highlight";
474
- UIColor["RANKING_HIGHLIGHT"] = "ranking_highlight";
475
- UIColor["TEXT_RANKING_MAIN"] = "text_ranking_main";
476
- UIColor["TEXT_RANKING_AUX"] = "text_ranking_aux";
477
- UIColor["BT_SELECT_ACTIVITY"] = "bt_select_activity";
478
- UIColor["FONT_BT"] = "font_bt";
479
- UIColor["FONT_BT_PRICE"] = "font_bt_price";
480
- UIColor["FONT_TAG"] = "font_tag";
481
- UIColor["FONT_LIVE"] = "font_live";
482
- UIColor["QUIZ_SELECT"] = "quiz_select";
483
- UIColor["MAIN1"] = "main_1";
484
- UIColor["AUX"] = "aux";
485
- UIColor["VOTE_OFF"] = "vote_off";
486
- UIColor["BG_VOTE"] = "bg_vote";
487
- UIColor["VOTE_ON"] = "vote_on";
488
- UIColor["STORY_OFF"] = "story_off";
489
- UIColor["STORY_ON"] = "story_on";
490
- UIColor["FONT_ACTIONS"] = "font_actions";
491
- UIColor["FONT_SEARCH_OFF"] = "font_search_off";
492
- UIColor["FONT_SEARCH_ON"] = "font_search_on";
493
- UIColor["SLIDER_OFF"] = "slider_off";
494
- UIColor["SLIDER_ON"] = "slider_on";
495
- UIColor["PROGRESS_VIEW_OFF"] = "progress_view_off";
496
- UIColor["PROGRESS_VIEW_RANKING_OFF"] = "progress_view_ranking_off";
497
- UIColor["PROGRESS_STORY_OFF"] = "progress_story_off";
498
- UIColor["PROGRESS_STORY_ON"] = "progress_story_on";
499
- UIColor["PROGRESS_VIEW_ON"] = "progress_view_on";
500
- UIColor["FONT_DISABLED"] = "font_disabled";
501
- UIColor["BT_TAB_OFF"] = "bt_tab_off";
502
- UIColor["BG"] = "bg";
503
- UIColor["FONT_BT_PROGRAM"] = "font_bt_program";
504
- UIColor["BG_RANKING"] = "bg_ranking";
505
- UIColor["BG_STORY"] = "bg_story";
506
- UIColor["BG_NEW_COMMENT"] = "bg_new_comment";
507
- UIColor["SHADOW"] = "shadow";
508
- UIColor["BG_SURVEY"] = "bg_survey";
509
- UIColor["BG_LIVE"] = "bg_live";
510
- UIColor["BG_VIEW_LIVE"] = "bg_view_live";
511
- UIColor["MAIN2"] = "main_2";
512
- UIColor["BT_TAG_ON"] = "bt_tag_on";
513
- UIColor["TEXT_COLOR"] = "text_color";
514
- UIColor["TEXT_STORY"] = "text_story";
515
- UIColor["BT_REGISTER"] = "bt_register";
516
- UIColor["BT_SHADOW_PROFILE"] = "bt_shadow_profile";
517
- UIColor["FONT_REGISTER"] = "font_register";
518
- UIColor["FONT_BT_MAIN"] = "font_bt_main";
519
- UIColor["FONT_BT_QUIZ"] = "font_bt_quiz";
520
- UIColor["FONT_BT_VIEW"] = "font_bt_view";
521
- UIColor["FONT_BT_TAG_OFF"] = "font_bt_tag_off";
522
- UIColor["FONT_BT_TAG_ON"] = "font_bt_tag_on";
523
- UIColor["ATTENTION_COLOR"] = "attention_color";
524
- UIColor["QUIZ_ERROR"] = "quiz_error";
525
- UIColor["BG_NAV"] = "bg_nav";
526
- UIColor["BT_OPEN_E_CLOSE"] = "bt_open_e_close";
527
- UIColor["IC_TYPE_CLASS"] = "ic_type_class";
528
- UIColor["IC_TYPE_LIVE"] = "ic_type_live";
529
- UIColor["IC_TYPE_DISABLED"] = "ic_type_disabled";
530
- UIColor["BT_DOWNLOAD"] = "bt_download";
531
- UIColor["BT_DISABLED"] = "bt_disabled";
532
- UIColor["BT_DISABLED_HOME"] = "bt_disabled_home";
533
- UIColor["BT_CHECK_OFF"] = "bt_check_off";
534
- UIColor["ACTIONS_OFF"] = "actions_off";
535
- UIColor["BT_PROGRAM"] = "bt_program";
536
- UIColor["PLAYER_CONTROLS"] = "player_controls";
537
- UIColor["RATING_OFF"] = "rating_off";
538
- UIColor["RATING_ON"] = "rating_on";
539
- UIColor["ACTIONS_ON"] = "actions_on";
540
- UIColor["TAG_VIP_HIGHLIGHT"] = "tag_vip_highlight";
541
- UIColor["BT_CHECK_ON"] = "bt_check_on";
542
- UIColor["BT_TAB_ON"] = "bt_tab_on";
543
- UIColor["BT_VIEW_DEG1"] = "bt_view_deg1";
544
- UIColor["LINE_DIVISER"] = "line_diviser";
545
- UIColor["BG_SEC"] = "bg_sec";
546
- UIColor["BG_SEARCH"] = "bg_search";
547
- UIColor["FONT_PRICE"] = "font_price";
548
- UIColor["BT_LIKE_ON"] = "bt_like_on";
549
- UIColor["BG_CARD"] = "bg_card";
550
- UIColor["BT_TAG_OFF"] = "bt_tag_off";
551
- UIColor["BT_TAG_VIP"] = "bt_tag_vip";
552
- UIColor["BT_PROFILE"] = "bt_profile";
553
- UIColor["BT_PRICE_DEG1"] = "bt_price_deg1";
554
- UIColor["BT_PRICE_DEG2"] = "bt_price_deg2";
555
- UIColor["BT_LIKE_OFF"] = "bt_like_off";
556
- UIColor["BT_LOCK"] = "bt_lock";
557
- UIColor["BT_TRASH"] = "bt_trash";
558
- UIColor["BG_COMMENT"] = "bg_comment";
559
- UIColor["BG_POST"] = "bg_post";
560
- UIColor["BT_HIGHLIGHT"] = "bt_highlight";
561
- UIColor["ATTENTION_BADGE"] = "attention_badge";
562
- UIColor["BT_BORDER_PROFILE"] = "bt_border_profile";
563
- UIColor["BT_MAIN_DEG1"] = "bt_main_deg1";
564
- UIColor["BT_MAIN_DEG2"] = "bt_main_deg2";
565
- UIColor["BT_VIEW_DEG2"] = "bt_view_deg2";
566
- UIColor["BG_MODULO"] = "bg_modulo";
567
- UIColor["BG_MODULO_RANKING"] = "bg_modulo_ranking";
568
- UIColor["QUIZ_RIGHT"] = "quiz_right";
569
- UIColor["BT_BANNER_MAIN"] = "bt_banner_main";
570
- UIColor["FONT_BT_BANNER"] = "font_bt_banner";
571
- UIColor["BT_BANNER"] = "bt_banner";
572
- UIColor["FONT_BT_BANNER_MAIN"] = "font_bt_banner_main";
573
- UIColor["BORDER_BANNER"] = "border_banner";
574
- UIColor["INPUT_ERROR"] = "input_error";
575
- UIColor["BT_BACK"] = "bt_back";
576
- UIColor["TEXT_COMMENT_SEC"] = "text_comment_sec";
577
- UIColor["BT_IA_DEG1"] = "bt_ia_deg1";
578
- UIColor["BT_IA_DEG2"] = "bt_ia_deg2";
579
- UIColor["NORMAL"] = "normal";
580
- UIColor["BG_CLIPS"] = "bg_clips";
581
- UIColor["FONT_CLIPS"] = "font_clips";
582
- UIColor["BG_MASK_0"] = "bg_mask_0";
583
- UIColor["BG_MASK_80"] = "bg_mask_80";
584
- UIColor["BG_MASK_20"] = "bg_mask_20";
585
- UIColor["TEXT_CHALLENGE_AUX"] = "text_challenge_aux";
586
- UIColor["TEXT_CHALLENGE_HIGHLIGHT"] = "text_challenge_highlight";
587
- UIColor["BG_CHALLENGE"] = "bg_challenge";
588
- UIColor["BG_MODULO_CHALLENGE"] = "bg_modulo_challenge";
589
- UIColor["CHALLENGE_HIGHLIGHT"] = "challenge_highlight";
590
- UIColor["BT_CHALLENGE"] = "bt_challenge";
591
- UIColor["FONT_BT_CHALLENGE"] = "font_bt_challenge";
592
- UIColor["CHALLENGE_OFF"] = "challenge_off";
593
- UIColor["TEXT_CHALLENGE_DISABLED"] = "text_challenge_disabled";
594
- UIColor["TEXT_CHALLENGE_MAIN"] = "text_challenge_main";
595
- UIColor["CHALLENGE_WAY"] = "challenge_way";
596
- })(UIColor || (UIColor = {}));
597
-
598
- const colorMapping = {
599
- [UIColor.ALERT]: 'var(--alert)',
600
- [UIColor.BG_TAG]: 'var(--bg-tag)',
601
- [UIColor.ACTINDCOLOR]: 'var(--actindcolor)',
602
- [UIColor.TEXT_WEB]: 'var(--text-web)',
603
- [UIColor.TEXT_RANKING_HIGHLIGHT]: 'var(--text-ranking-highlight)',
604
- [UIColor.RANKING_HIGHLIGHT]: 'var(--ranking-highlight)',
605
- [UIColor.TEXT_RANKING_MAIN]: 'var(--text-ranking-main)',
606
- [UIColor.TEXT_RANKING_AUX]: 'var(--text-ranking-aux)',
607
- [UIColor.BT_SELECT_ACTIVITY]: 'var(--bt-select-activity)',
608
- [UIColor.FONT_BT]: 'var(--font-bt)',
609
- [UIColor.FONT_BT_PRICE]: 'var(--font-bt-price)',
610
- [UIColor.FONT_TAG]: 'var(--font-tag)',
611
- [UIColor.FONT_LIVE]: 'var(--font-live)',
612
- [UIColor.QUIZ_SELECT]: 'var(--quiz-select)',
613
- [UIColor.MAIN1]: 'var(--main-1)',
614
- [UIColor.AUX]: 'var(--aux)',
615
- [UIColor.VOTE_OFF]: 'var(--vote-off)',
616
- [UIColor.BG_VOTE]: 'var(--bg-vote)',
617
- [UIColor.VOTE_ON]: 'var(--vote-on)',
618
- [UIColor.STORY_OFF]: 'var(--story-off)',
619
- [UIColor.STORY_ON]: 'var(--story-on)',
620
- [UIColor.FONT_ACTIONS]: 'var(--font-actions)',
621
- [UIColor.FONT_SEARCH_OFF]: 'var(--font-search-off)',
622
- [UIColor.FONT_SEARCH_ON]: 'var(--font-search-on)',
623
- [UIColor.SLIDER_OFF]: 'var(--slider-off)',
624
- [UIColor.SLIDER_ON]: 'var(--slider-on)',
625
- [UIColor.PROGRESS_VIEW_OFF]: 'var(--progress-view-off)',
626
- [UIColor.PROGRESS_VIEW_RANKING_OFF]: 'var(--progress-view-ranking-off)',
627
- [UIColor.PROGRESS_STORY_OFF]: 'var(--progress-story-off)',
628
- [UIColor.PROGRESS_STORY_ON]: 'var(--progress-story-on)',
629
- [UIColor.PROGRESS_VIEW_ON]: 'var(--progress-view-on)',
630
- [UIColor.FONT_DISABLED]: 'var(--font-disabled)',
631
- [UIColor.BT_TAB_OFF]: 'var(--bt-tab-off)',
632
- [UIColor.BG]: 'var(--bg)',
633
- [UIColor.FONT_BT_PROGRAM]: 'var(--font-bt-program)',
634
- [UIColor.BG_RANKING]: 'var(--bg-ranking)',
635
- [UIColor.BG_STORY]: 'var(--bg-story)',
636
- [UIColor.BG_NEW_COMMENT]: 'var(--bg-new-comment)',
637
- [UIColor.SHADOW]: 'var(--shadow)',
638
- [UIColor.BG_SURVEY]: 'var(--bg-survey)',
639
- [UIColor.BG_LIVE]: 'var(--bg-live)',
640
- [UIColor.BG_VIEW_LIVE]: 'var(--bg-view-live)',
641
- [UIColor.MAIN2]: 'var(--main-2)',
642
- [UIColor.BT_TAG_ON]: 'var(--bt-tag-on)',
643
- [UIColor.TEXT_COLOR]: 'var(--text-color)',
644
- [UIColor.TEXT_STORY]: 'var(--text-story)',
645
- [UIColor.BT_REGISTER]: 'var(--bt-register)',
646
- [UIColor.BT_SHADOW_PROFILE]: 'var(--bt-shadow-profile)',
647
- [UIColor.FONT_REGISTER]: 'var(--font-register)',
648
- [UIColor.FONT_BT_MAIN]: 'var(--font-bt-main)',
649
- [UIColor.FONT_BT_QUIZ]: 'var(--font-bt-quiz)',
650
- [UIColor.FONT_BT_VIEW]: 'var(--font-bt-view)',
651
- [UIColor.FONT_BT_TAG_OFF]: 'var(--font-bt-tag-off)',
652
- [UIColor.FONT_BT_TAG_ON]: 'var(--font-bt-tag-on)',
653
- [UIColor.ATTENTION_COLOR]: 'var(--attention-color)',
654
- [UIColor.QUIZ_ERROR]: 'var(--quiz-error)',
655
- [UIColor.BG_NAV]: 'var(--bg-nav)',
656
- [UIColor.BT_OPEN_E_CLOSE]: 'var(--bt-open-e-close)',
657
- [UIColor.IC_TYPE_CLASS]: 'var(--ic-type-class)',
658
- [UIColor.IC_TYPE_LIVE]: 'var(--ic-type-live)',
659
- [UIColor.IC_TYPE_DISABLED]: 'var(--ic-type-disabled)',
660
- [UIColor.BT_DOWNLOAD]: 'var(--bt-download)',
661
- [UIColor.BT_DISABLED]: 'var(--bt-disabled)',
662
- [UIColor.BT_DISABLED_HOME]: 'var(--bt-disabled-home)',
663
- [UIColor.BT_CHECK_OFF]: 'var(--bt-check-off)',
664
- [UIColor.ACTIONS_OFF]: 'var(--actions-off)',
665
- [UIColor.BT_PROGRAM]: 'var(--bt-program)',
666
- [UIColor.PLAYER_CONTROLS]: 'var(--player-controls)',
667
- [UIColor.RATING_OFF]: 'var(--rating-off)',
668
- [UIColor.RATING_ON]: 'var(--rating-on)',
669
- [UIColor.ACTIONS_ON]: 'var(--actions-on)',
670
- [UIColor.TAG_VIP_HIGHLIGHT]: 'var(--tag-vip-highlight)',
671
- [UIColor.BT_CHECK_ON]: 'var(--bt-check-on)',
672
- [UIColor.BT_TAB_ON]: 'var(--bt-tab-on)',
673
- [UIColor.BT_VIEW_DEG1]: 'var(--bt-view-deg1)',
674
- [UIColor.LINE_DIVISER]: 'var(--line-diviser)',
675
- [UIColor.BG_SEC]: 'var(--bg-sec)',
676
- [UIColor.BG_SEARCH]: 'var(--bg-search)',
677
- [UIColor.FONT_PRICE]: 'var(--font-price)',
678
- [UIColor.BT_LIKE_ON]: 'var(--bt-like-on)',
679
- [UIColor.BG_CARD]: 'var(--bg-card)',
680
- [UIColor.BT_TAG_OFF]: 'var(--bt-tag-off)',
681
- [UIColor.BT_TAG_VIP]: 'var(--bt-tag-vip)',
682
- [UIColor.BT_PROFILE]: 'var(--bt-profile)',
683
- [UIColor.BT_PRICE_DEG1]: 'var(--bt-price-deg1)',
684
- [UIColor.BT_PRICE_DEG2]: 'var(--bt-price-deg2)',
685
- [UIColor.BT_LIKE_OFF]: 'var(--bt-like-off)',
686
- [UIColor.BT_LOCK]: 'var(--bt-lock)',
687
- [UIColor.BT_TRASH]: 'var(--bt-trash)',
688
- [UIColor.BG_COMMENT]: 'var(--bg-comment)',
689
- [UIColor.BG_POST]: 'var(--bg-post)',
690
- [UIColor.BT_HIGHLIGHT]: 'var(--bt-highlight)',
691
- [UIColor.ATTENTION_BADGE]: 'var(--attention-badge)',
692
- [UIColor.BT_BORDER_PROFILE]: 'var(--bt-border-profile)',
693
- [UIColor.BT_MAIN_DEG1]: 'var(--bt-main-deg1)',
694
- [UIColor.BT_MAIN_DEG2]: 'var(--bt-main-deg2)',
695
- [UIColor.BT_VIEW_DEG2]: 'var(--bt-view-deg2)',
696
- [UIColor.BG_MODULO]: 'var(--bg-modulo)',
697
- [UIColor.BG_MODULO_RANKING]: 'var(--bg-modulo-ranking)',
698
- [UIColor.QUIZ_RIGHT]: 'var(--quiz-right)',
699
- [UIColor.BT_BANNER_MAIN]: 'var(--bt-banner-main)',
700
- [UIColor.FONT_BT_BANNER]: 'var(--font-bt-banner)',
701
- [UIColor.BT_BANNER]: 'var(--bt-banner)',
702
- [UIColor.FONT_BT_BANNER_MAIN]: 'var(--font-bt-banner-main)',
703
- [UIColor.BORDER_BANNER]: 'var(--border-banner)',
704
- [UIColor.INPUT_ERROR]: 'var(--input-error)',
705
- [UIColor.BT_BACK]: 'var(--bt-back)',
706
- [UIColor.TEXT_COMMENT_SEC]: 'var(--text-comment-sec)',
707
- [UIColor.BT_IA_DEG1]: 'var(--bt-ia-deg1)',
708
- [UIColor.BT_IA_DEG2]: 'var(--bt-ia-deg2)',
709
- [UIColor.NORMAL]: 'var(--normal)',
710
- [UIColor.BG_CLIPS]: 'var(--bg-clips)',
711
- [UIColor.FONT_CLIPS]: 'var(--font-clips)',
712
- [UIColor.BG_MASK_0]: 'var(--bg-mask-0)',
713
- [UIColor.BG_MASK_80]: 'var(--bg-mask-80)',
714
- [UIColor.BG_MASK_20]: 'var(--bg-mask-20)',
715
- [UIColor.TEXT_CHALLENGE_AUX]: 'var(--text-challenge-aux)',
716
- [UIColor.TEXT_CHALLENGE_HIGHLIGHT]: 'var(--text-challenge-highlight)',
717
- [UIColor.BG_CHALLENGE]: 'var(--bg-challenge)',
718
- [UIColor.BG_MODULO_CHALLENGE]: 'var(--bg-modulo-challenge)',
719
- [UIColor.CHALLENGE_HIGHLIGHT]: 'var(--challenge-highlight)',
720
- [UIColor.BT_CHALLENGE]: 'var(--bt-challenge)',
721
- [UIColor.FONT_BT_CHALLENGE]: 'var(--font-bt-challenge)',
722
- [UIColor.CHALLENGE_OFF]: 'var(--challenge-off)',
723
- [UIColor.TEXT_CHALLENGE_DISABLED]: 'var(--text-challenge-disabled)',
724
- [UIColor.TEXT_CHALLENGE_MAIN]: 'var(--text-challenge-main)',
725
- [UIColor.CHALLENGE_WAY]: 'var(--challenge-way)',
726
- };
727
-
728
- var UIPaddingLevel;
729
- (function (UIPaddingLevel) {
730
- UIPaddingLevel["P1"] = "p1";
731
- UIPaddingLevel["P2"] = "p2";
732
- UIPaddingLevel["P3"] = "p3";
733
- UIPaddingLevel["P4"] = "p4";
734
- UIPaddingLevel["P5"] = "p5";
735
- UIPaddingLevel["P6"] = "p6";
736
- UIPaddingLevel["P7"] = "p7";
737
- UIPaddingLevel["P8"] = "p8";
738
- })(UIPaddingLevel || (UIPaddingLevel = {}));
739
-
740
- const padMapping = {
741
- [UIPaddingLevel.P1]: '4px',
742
- [UIPaddingLevel.P2]: '8px',
743
- [UIPaddingLevel.P3]: '16px',
744
- [UIPaddingLevel.P4]: '24px',
745
- [UIPaddingLevel.P5]: '32px',
746
- [UIPaddingLevel.P6]: '40px',
747
- [UIPaddingLevel.P7]: '48px',
748
- [UIPaddingLevel.P8]: '56px',
749
- };
750
-
751
- var UIRadiusLevel;
752
- (function (UIRadiusLevel) {
753
- UIRadiusLevel["R1"] = "r1";
754
- UIRadiusLevel["R2"] = "r2";
755
- UIRadiusLevel["R3"] = "r3";
756
- UIRadiusLevel["R4"] = "r4";
757
- UIRadiusLevel["R5"] = "r5";
758
- UIRadiusLevel["R50"] = "r50";
759
- })(UIRadiusLevel || (UIRadiusLevel = {}));
760
-
761
- const radiusMapping = {
762
- [UIRadiusLevel.R1]: '3px',
763
- [UIRadiusLevel.R2]: '5px',
764
- [UIRadiusLevel.R3]: '8px',
765
- [UIRadiusLevel.R4]: '10px',
766
- [UIRadiusLevel.R5]: '12px',
767
- [UIRadiusLevel.R50]: '50%',
768
- };
769
-
770
- var UIAlignmentType;
771
- (function (UIAlignmentType) {
772
- UIAlignmentType["START"] = "start";
773
- UIAlignmentType["CENTER"] = "center";
774
- UIAlignmentType["END"] = "end";
775
- })(UIAlignmentType || (UIAlignmentType = {}));
776
-
777
- const alignmentMapping = {
778
- [UIAlignmentType.CENTER]: 'center',
779
- [UIAlignmentType.END]: 'end',
780
- [UIAlignmentType.START]: 'start',
781
- };
782
-
783
- var UIDimension;
784
- (function (UIDimension) {
785
- UIDimension["P100"] = "p100";
786
- UIDimension["P90"] = "p90";
787
- UIDimension["P80"] = "p80";
788
- UIDimension["P70"] = "p70";
789
- UIDimension["P60"] = "p60";
790
- UIDimension["P50"] = "p50";
791
- UIDimension["P40"] = "p40";
792
- UIDimension["P30"] = "p30";
793
- UIDimension["P20"] = "p20";
794
- UIDimension["P10"] = "p10";
795
- UIDimension["D180"] = "d180";
796
- UIDimension["D150"] = "d150";
797
- UIDimension["D120"] = "d120";
798
- UIDimension["D110"] = "d110";
799
- UIDimension["D100"] = "d100";
800
- UIDimension["D90"] = "d90";
801
- UIDimension["D80"] = "d80";
802
- UIDimension["D72"] = "d72";
803
- UIDimension["D64"] = "d64";
804
- UIDimension["D60"] = "d60";
805
- UIDimension["D56"] = "d56";
806
- UIDimension["D48"] = "d48";
807
- UIDimension["D42"] = "d42";
808
- UIDimension["D40"] = "d40";
809
- UIDimension["D36"] = "d36";
810
- UIDimension["D32"] = "d32";
811
- UIDimension["D30"] = "d30";
812
- UIDimension["D28"] = "d28";
813
- UIDimension["D26"] = "d26";
814
- UIDimension["D24"] = "d24";
815
- UIDimension["D22"] = "d22";
816
- UIDimension["D20"] = "d20";
817
- UIDimension["D18"] = "d18";
818
- UIDimension["D16"] = "d16";
819
- UIDimension["D14"] = "d14";
820
- UIDimension["D12"] = "d12";
821
- UIDimension["D10"] = "d10";
822
- UIDimension["D8"] = "d8";
823
- UIDimension["D5"] = "d5";
824
- UIDimension["D4"] = "d4";
825
- UIDimension["D3"] = "d3";
826
- UIDimension["D2"] = "d2";
827
- UIDimension["D1"] = "d1";
828
- })(UIDimension || (UIDimension = {}));
829
-
830
- const dimensionMapping = {
831
- // Percentage values
832
- [UIDimension.P100]: '100%',
833
- [UIDimension.P90]: '90%',
834
- [UIDimension.P80]: '80%',
835
- [UIDimension.P70]: '70%',
836
- [UIDimension.P60]: '60%',
837
- [UIDimension.P50]: '50%',
838
- [UIDimension.P40]: '40%',
839
- [UIDimension.P30]: '30%',
840
- [UIDimension.P20]: '20%',
841
- [UIDimension.P10]: '10%',
842
- // Pixel values
843
- [UIDimension.D180]: '180px',
844
- [UIDimension.D150]: '150px',
845
- [UIDimension.D120]: '120px',
846
- [UIDimension.D110]: '110px',
847
- [UIDimension.D100]: '100px',
848
- [UIDimension.D90]: '90px',
849
- [UIDimension.D80]: '80px',
850
- [UIDimension.D72]: '72px',
851
- [UIDimension.D64]: '64px',
852
- [UIDimension.D60]: '60px',
853
- [UIDimension.D56]: '56px',
854
- [UIDimension.D48]: '48px',
855
- [UIDimension.D42]: '42px',
856
- [UIDimension.D40]: '40px',
857
- [UIDimension.D36]: '36px',
858
- [UIDimension.D32]: '32px',
859
- [UIDimension.D30]: '30px',
860
- [UIDimension.D28]: '28px',
861
- [UIDimension.D26]: '26px',
862
- [UIDimension.D24]: '24px',
863
- [UIDimension.D22]: '22px',
864
- [UIDimension.D20]: '20px',
865
- [UIDimension.D18]: '18px',
866
- [UIDimension.D16]: '16px',
867
- [UIDimension.D14]: '14px',
868
- [UIDimension.D12]: '12px',
869
- [UIDimension.D10]: '10px',
870
- [UIDimension.D8]: '8px',
871
- [UIDimension.D5]: '5px',
872
- [UIDimension.D4]: '4px',
873
- [UIDimension.D3]: '3px',
874
- [UIDimension.D2]: '2px',
875
- [UIDimension.D1]: '1px',
876
- };
877
-
878
- var UIShadowOffset;
879
- (function (UIShadowOffset) {
880
- UIShadowOffset["S1"] = "s1";
881
- })(UIShadowOffset || (UIShadowOffset = {}));
882
-
883
- var UIShadowBlurRadius;
884
- (function (UIShadowBlurRadius) {
885
- UIShadowBlurRadius["B1"] = "b1";
886
- })(UIShadowBlurRadius || (UIShadowBlurRadius = {}));
887
-
888
- const shadowOffsetMapping = {
889
- [UIShadowOffset.S1]: '1px',
890
- };
891
- const shadowBlurRadiusMapping = {
892
- [UIShadowBlurRadius.B1]: '3px',
893
- };
894
-
895
- var UIJustify;
896
- (function (UIJustify) {
897
- UIJustify["START"] = "start";
898
- UIJustify["CENTER"] = "center";
899
- UIJustify["END"] = "end";
900
- UIJustify["BETWEEN"] = "space-between";
901
- UIJustify["EVENLY"] = "space-evenly";
902
- })(UIJustify || (UIJustify = {}));
903
-
904
- const justifyMapping = {
905
- [UIJustify.START]: 'flex-start',
906
- [UIJustify.CENTER]: 'center',
907
- [UIJustify.END]: 'flex-end',
908
- [UIJustify.BETWEEN]: 'space-between',
909
- [UIJustify.EVENLY]: 'space-evenly',
910
- };
911
-
912
- var UIActionType;
913
- (function (UIActionType) {
914
- // navegação
915
- UIActionType["INTERNAL_URL"] = "INTERNAL_URL";
916
- UIActionType["RELOAD_INTERNAL_URL"] = "RELOAD_INTERNAL_URL";
917
- UIActionType["DISMISS_TO_SCENE"] = "DISMISS_TO_SCENE";
918
- UIActionType["EXTERNAL_URL"] = "EXTERNAL_URL";
919
- UIActionType["WEBVIEW_URL"] = "WEBVIEW_URL";
920
- // paywall
921
- UIActionType["PAYWALL"] = "PAYWALL";
922
- UIActionType["REGISTER"] = "REGISTER";
923
- // conteúdo
924
- UIActionType["HTML"] = "HTML";
925
- UIActionType["FILE"] = "FILE";
926
- })(UIActionType || (UIActionType = {}));
927
-
928
- class UIActionHandlersService {
929
- registerLogout(handler) {
930
- this.logoutHandler = handler;
931
- }
932
- executeLogout() {
933
- if (this.logoutHandler) {
934
- this.logoutHandler();
935
- }
936
- else {
937
- console.warn('Nenhum handler de logout registrado.');
938
- }
939
- }
940
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: UIActionHandlersService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
941
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: UIActionHandlersService, providedIn: 'root' }); }
942
- }
943
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: UIActionHandlersService, decorators: [{
944
- type: Injectable,
945
- args: [{ providedIn: 'root' }]
946
- }] });
947
-
948
- class UIActionService {
949
- constructor(router, actionHandlers) {
950
- this.router = router;
951
- this.actionHandlers = actionHandlers;
952
- }
953
- execute(action) {
954
- if (!action || !action.type)
955
- return;
956
- console.log(action);
957
- switch (action.type) {
958
- case UIActionType.INTERNAL_URL:
959
- if (action.url && isSduiUrl(action.url)) {
960
- const resolved = resolveSduiUrl(action.url);
961
- this.router.navigate([], {
962
- queryParams: { [SDUI_URL_PARAM]: resolved },
963
- queryParamsHandling: 'merge',
964
- });
965
- }
966
- else {
967
- this.handleCustomNavigation(action.url || '');
968
- }
969
- break;
970
- case UIActionType.RELOAD_INTERNAL_URL:
971
- if (action.url) {
972
- console.debug('[UIActionService] Navigating to:', action.url);
973
- if (isSduiUrl(action.url)) {
974
- const resolved = resolveSduiUrl(action.url);
975
- this.router.navigate([], {
976
- queryParams: { [SDUI_URL_PARAM]: resolved },
977
- queryParamsHandling: 'merge',
978
- });
979
- }
980
- else {
981
- this.router.navigateByUrl(action.url, { replaceUrl: false });
982
- }
983
- }
984
- break;
985
- case UIActionType.EXTERNAL_URL:
986
- if (action.url) {
987
- window.open(action.url, '_blank');
988
- }
989
- // Outros tipos de ação podem ser adicionados aqui
990
- }
991
- }
992
- handleCustomNavigation(url) {
993
- if (url.includes('timeline/')) {
994
- const broken = url.split('timeline/')[1];
995
- this.router.navigate(['comunidade', 'postagem', broken], { queryParams: { from: 'sdui' } });
996
- return true;
997
- }
998
- if (url.includes('live/')) {
999
- const broken = url.split('live/')[1];
1000
- this.router.navigate(['comunidade', 'postagem', 'live', broken], { queryParams: { from: 'sdui' } });
1001
- return true;
1002
- }
1003
- if (url.includes('lesson/')) {
1004
- const lessonId = url.split('lesson/')[1];
1005
- const productId = url.includes('product/') ? url.split('product/')[1].split('/')[0] : null;
1006
- if (productId) {
1007
- this.router.navigate(['produtos', productId, 'aula', lessonId], { queryParams: { from: 'sdui' } });
1008
- return true;
1009
- }
1010
- }
1011
- if (url.includes('product/')) {
1012
- const productId = url.split('product/')[1];
1013
- this.router.navigate(['produtos', productId], { queryParams: { from: 'sdui' } });
1014
- return true;
1015
- }
1016
- if (url.includes('posts/')) {
1017
- const postId = url.split('posts/')[1];
1018
- this.router.navigate(['comunidade', 'postagem', postId], { queryParams: { from: 'sdui' } });
1019
- return true;
1020
- }
1021
- if (url.includes('my-purchases')) {
1022
- this.router.navigate(['perfil', 'compras'], { queryParams: { from: 'sdui' } });
1023
- return true;
1024
- }
1025
- if (url.includes('my-annotations')) {
1026
- this.router.navigate(['perfil', 'meu-caderno'], { queryParams: { from: 'sdui' } });
1027
- return true;
1028
- }
1029
- if (url.includes('my-list')) {
1030
- this.router.navigate(['perfil', 'minha-lista'], { queryParams: { from: 'sdui' } });
1031
- return true;
1032
- }
1033
- if (url.includes('my-certificates')) {
1034
- this.router.navigate(['perfil', 'certificados'], { queryParams: { from: 'sdui' } });
1035
- return true;
1036
- }
1037
- if (url.includes('my-subscriptions')) {
1038
- this.router.navigate(['perfil', 'assinaturas'], { queryParams: { from: 'sdui' } });
1039
- return true;
1040
- }
1041
- if (url.includes('edit-profile')) {
1042
- this.router.navigate(['perfil', 'editar'], { queryParams: { from: 'sdui' } });
1043
- return true;
1044
- }
1045
- if (url.includes('ranking')) {
1046
- this.router.navigate(['perfil', 'ranking'], { queryParams: { from: 'sdui' } });
1047
- return true;
1048
- }
1049
- if (url.includes('ranking/rules')) {
1050
- this.router.navigate(['perfil', 'ranking', 'regras'], { queryParams: { from: 'sdui' } });
1051
- return true;
1052
- }
1053
- if (url.includes('logout')) {
1054
- this.router.navigate(['logout'], { queryParams: { from: 'sdui' } });
1055
- return true;
1056
- }
1057
- return false; // nenhum dos casos especiais foi tratado
1058
- }
1059
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: UIActionService, deps: [{ token: i1$2.Router }, { token: UIActionHandlersService }], target: i0.ɵɵFactoryTarget.Injectable }); }
1060
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: UIActionService, providedIn: 'root' }); }
1061
- }
1062
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: UIActionService, decorators: [{
1063
- type: Injectable,
1064
- args: [{ providedIn: 'root' }]
1065
- }], ctorParameters: () => [{ type: i1$2.Router }, { type: UIActionHandlersService }] });
1066
-
1067
- class UIViewDirective {
1068
- constructor(elementRef, renderer, router, actionService, screenViewModel) {
1069
- this.elementRef = elementRef;
1070
- this.renderer = renderer;
1071
- this.router = router;
1072
- this.actionService = actionService;
1073
- this.screenViewModel = screenViewModel;
1074
- this.disableClick = false;
1075
- }
1076
- ngOnChanges(changes) {
1077
- if (this.edmSduiView) {
1078
- this.applyStyles(this.edmSduiView);
1079
- }
1080
- }
1081
- applyStyles(uiView) {
1082
- if (uiView.padding) {
1083
- this.applyPadding(uiView.padding);
1084
- }
1085
- if (uiView.background) {
1086
- this.applyBackground(uiView.background);
1087
- }
1088
- if (uiView.action) {
1089
- this.applyAction(uiView.action);
1090
- }
1091
- if (uiView.alignment) {
1092
- this.applyAlignment(uiView.alignment);
1093
- }
1094
- if (uiView.shadow) {
1095
- this.applyShadow(uiView.shadow);
1096
- }
1097
- if (uiView.radius) {
1098
- this.applyRadius(uiView.radius);
1099
- }
1100
- if (uiView.spacing) {
1101
- this.applySpacing(uiView.spacing);
1102
- }
1103
- if (uiView.height) {
1104
- this.applyHeight(uiView.height);
1105
- }
1106
- if (uiView.width) {
1107
- this.applyWidth(uiView.width);
1108
- }
1109
- if (uiView.borderWidth) {
1110
- this.applyBorderWidth(uiView.borderWidth);
1111
- }
1112
- if (uiView.borderColor) {
1113
- this.applyBorderColor(uiView.borderColor);
1114
- }
1115
- if (uiView.justify) {
1116
- this.applyJustify(uiView.justify);
1117
- }
1118
- }
1119
- applyPadding(uiPadding) {
1120
- if (uiPadding.top) {
1121
- const padValue = padMapping[uiPadding.top];
1122
- this.renderer.setStyle(this.elementRef.nativeElement, 'padding-top', padValue);
1123
- }
1124
- if (uiPadding.left) {
1125
- const padValue = padMapping[uiPadding.left];
1126
- this.renderer.setStyle(this.elementRef.nativeElement, 'padding-left', padValue);
1127
- }
1128
- if (uiPadding.right) {
1129
- const padValue = padMapping[uiPadding.right];
1130
- this.renderer.setStyle(this.elementRef.nativeElement, 'padding-right', padValue);
1131
- }
1132
- if (uiPadding.bottom) {
1133
- const padValue = padMapping[uiPadding.bottom];
1134
- this.renderer.setStyle(this.elementRef.nativeElement, 'padding-bottom', padValue);
1135
- }
1136
- }
1137
- applyBackground(uiBackground) {
1138
- if (uiBackground.backgroundColor) {
1139
- const backgroundColor = colorMapping[uiBackground.backgroundColor];
1140
- this.renderer.setStyle(this.elementRef.nativeElement, 'background-color', backgroundColor);
1141
- }
1142
- }
1143
- applyAction(uiAction) {
1144
- if (this.disableClick) {
1145
- return;
1146
- }
1147
- this.renderer.setStyle(this.elementRef.nativeElement, 'cursor', 'pointer');
1148
- }
1149
- applyAlignment(uiAlignment) {
1150
- if (uiAlignment.alignment) {
1151
- // console.debug('alignment:', uiAlignment.alignment);
1152
- const alignment = alignmentMapping[uiAlignment.alignment];
1153
- this.renderer.setStyle(this.elementRef.nativeElement, 'align-items', alignment);
1154
- }
1155
- }
1156
- applyShadow(uiShadow) {
1157
- if (uiShadow.color && uiShadow.offsetX && uiShadow.offsetY && uiShadow.blurRadius) {
1158
- const color = colorMapping[uiShadow.color];
1159
- const offsetX = shadowOffsetMapping[uiShadow.offsetX];
1160
- const offsetY = shadowOffsetMapping[uiShadow.offsetY];
1161
- const blurRadius = shadowBlurRadiusMapping[uiShadow.blurRadius];
1162
- const opacity = uiShadow.opacity !== undefined ? uiShadow.opacity : 1;
1163
- // Format: box-shadow: offsetX offsetY blurRadius color
1164
- const shadowValue = `${offsetX} ${offsetY} ${blurRadius} ${color}`;
1165
- this.renderer.setStyle(this.elementRef.nativeElement, 'box-shadow', shadowValue);
1166
- if (opacity !== 1) {
1167
- this.renderer.setStyle(this.elementRef.nativeElement, 'opacity', opacity.toString());
1168
- }
1169
- }
1170
- }
1171
- applyRadius(uiRadius) {
1172
- if (uiRadius.topLeft) {
1173
- const radius = radiusMapping[uiRadius.topLeft];
1174
- this.renderer.setStyle(this.elementRef.nativeElement, 'border-top-left-radius', radius);
1175
- }
1176
- if (uiRadius.topRight) {
1177
- const radius = radiusMapping[uiRadius.topRight];
1178
- this.renderer.setStyle(this.elementRef.nativeElement, 'border-top-right-radius', radius);
1179
- }
1180
- if (uiRadius.bottomLeft) {
1181
- const radius = radiusMapping[uiRadius.bottomLeft];
1182
- this.renderer.setStyle(this.elementRef.nativeElement, 'border-bottom-left-radius', radius);
1183
- }
1184
- if (uiRadius.bottomRight) {
1185
- const radius = radiusMapping[uiRadius.bottomRight];
1186
- this.renderer.setStyle(this.elementRef.nativeElement, 'border-bottom-right-radius', radius);
1187
- }
1188
- }
1189
- applySpacing(uiSpacing) {
1190
- if (uiSpacing.spacing) {
1191
- const spacingValue = spaceMapping[uiSpacing.spacing];
1192
- this.renderer.setStyle(this.elementRef.nativeElement, 'gap', spacingValue);
1193
- }
1194
- }
1195
- applyHeight(height) {
1196
- if (height) {
1197
- const heightValue = dimensionMapping[height];
1198
- this.renderer.setStyle(this.elementRef.nativeElement, 'height', heightValue);
1199
- }
1200
- }
1201
- applyWidth(width) {
1202
- if (width) {
1203
- const widthValue = dimensionMapping[width];
1204
- this.renderer.setStyle(this.elementRef.nativeElement, 'width', widthValue);
1205
- }
1206
- }
1207
- applyBorderWidth(borderWidth) {
1208
- if (borderWidth !== null && borderWidth !== undefined) {
1209
- this.renderer.setStyle(this.elementRef.nativeElement, 'border-width', `${borderWidth}px`);
1210
- // Ensure border style is set, otherwise border-width won't be visible
1211
- this.renderer.setStyle(this.elementRef.nativeElement, 'border-style', 'solid');
1212
- }
1213
- }
1214
- applyBorderColor(borderColor) {
1215
- if (borderColor) {
1216
- const color = colorMapping[borderColor];
1217
- this.renderer.setStyle(this.elementRef.nativeElement, 'border-color', color);
1218
- }
1219
- }
1220
- applyJustify(justify) {
1221
- if (justify) {
1222
- const justifyValue = justifyMapping[justify];
1223
- this.renderer.setStyle(this.elementRef.nativeElement, 'justify-content', justifyValue);
1224
- }
1225
- }
1226
- onClick(event) {
1227
- if (this.disableClick)
1228
- return;
1229
- if (this.edmSduiView?.action) {
1230
- event.stopPropagation();
1231
- this.actionService.execute(this.edmSduiView.action);
1232
- }
1233
- }
1234
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: UIViewDirective, deps: [{ token: i0.ElementRef }, { token: i0.Renderer2 }, { token: i1$2.Router }, { token: UIActionService }, { token: UIScreenViewModel, optional: true }], target: i0.ɵɵFactoryTarget.Directive }); }
1235
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.2.13", type: UIViewDirective, selector: "[edmSduiView]", inputs: { edmSduiView: "edmSduiView", disableClick: "disableClick" }, host: { listeners: { "click": "onClick($event)" } }, usesOnChanges: true, ngImport: i0 }); }
1236
- }
1237
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: UIViewDirective, decorators: [{
1238
- type: Directive,
1239
- args: [{
1240
- selector: '[edmSduiView]',
1241
- standalone: false,
1242
- }]
1243
- }], ctorParameters: () => [{ type: i0.ElementRef }, { type: i0.Renderer2 }, { type: i1$2.Router }, { type: UIActionService }, { type: UIScreenViewModel, decorators: [{
1244
- type: Optional
1245
- }] }], propDecorators: { edmSduiView: [{
1246
- type: Input
1247
- }], disableClick: [{
1248
- type: Input
1249
- }], onClick: [{
1250
- type: HostListener,
1251
- args: ['click', ['$event']]
1252
- }] } });
1253
-
1254
- class NavigationControlsComponent {
1255
- constructor(viewModel) {
1256
- this.viewModel = viewModel;
1257
- }
1258
- ngOnInit() {
1259
- // Monitorar o estado do botão de voltar para debugging
1260
- this.viewModel.canGoBack$.subscribe((canGoBack) => {
1261
- console.debug('[NavigationControls] Estado do botão de voltar:', canGoBack);
1262
- });
1263
- }
1264
- goBack() {
1265
- console.debug('[NavigationControls] Botão de voltar clicado');
1266
- this.viewModel.goBack();
1267
- }
1268
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: NavigationControlsComponent, deps: [{ token: UIScreenViewModel }], target: i0.ɵɵFactoryTarget.Component }); }
1269
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.13", type: NavigationControlsComponent, selector: "edm-sdui-navigation-controls", ngImport: i0, template: "<div class=\"navigation-controls\" *ngIf=\"false\">\n <button\n class=\"back-button\"\n [disabled]=\"!(viewModel.canGoBack$ | async)\"\n (click)=\"goBack()\"\n >\n <img src=\"assets/images/bt-back.svg\" width=\"100%\" height=\"40px\"/>\n </button>\n</div>\n", styles: [":host{display:contents}.navigation-controls{display:flex;gap:8px}.navigation-controls button{display:flex;align-items:center;justify-content:center;padding:0;border-radius:4px;cursor:pointer;transition:all .2s ease}.navigation-controls button:hover:not(:disabled){background-color:#e8e8e8}.navigation-controls button:disabled{opacity:.5;cursor:not-allowed}\n"], dependencies: [{ kind: "directive", type: i1$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "pipe", type: i1$1.AsyncPipe, name: "async" }] }); }
1270
- }
1271
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: NavigationControlsComponent, decorators: [{
1272
- type: Component,
1273
- args: [{ selector: 'edm-sdui-navigation-controls', standalone: false, template: "<div class=\"navigation-controls\" *ngIf=\"false\">\n <button\n class=\"back-button\"\n [disabled]=\"!(viewModel.canGoBack$ | async)\"\n (click)=\"goBack()\"\n >\n <img src=\"assets/images/bt-back.svg\" width=\"100%\" height=\"40px\"/>\n </button>\n</div>\n", styles: [":host{display:contents}.navigation-controls{display:flex;gap:8px}.navigation-controls button{display:flex;align-items:center;justify-content:center;padding:0;border-radius:4px;cursor:pointer;transition:all .2s ease}.navigation-controls button:hover:not(:disabled){background-color:#e8e8e8}.navigation-controls button:disabled{opacity:.5;cursor:not-allowed}\n"] }]
1274
- }], ctorParameters: () => [{ type: UIScreenViewModel }] });
1275
-
1276
- class UIScreenComponent {
1277
- constructor(viewModel) {
1278
- this.viewModel = viewModel;
1279
- this.UIScreenIdentifier = UIScreenIdentifier;
1280
- }
1281
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: UIScreenComponent, deps: [{ token: UIScreenViewModel }], target: i0.ɵɵFactoryTarget.Component }); }
1282
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.13", type: UIScreenComponent, selector: "edm-sdui-uiscreen", ngImport: i0, template: "<ng-container *ngIf=\"viewModel.isLoading$ | async; else loaded\">\n <div class=\"loading-spinner\">\n <div class=\"spinner\"></div>\n </div>\n</ng-container>\n\n<ng-template #loaded>\n <ng-container\n *ngIf=\"viewModel.error$ | async as errorMessage; else renderScreen\"\n >\n <div class=\"error-label\">\n Erro ao carregar a tela:\n <pre>{{ errorMessage }}</pre>\n </div>\n </ng-container>\n\n <ng-template #renderScreen>\n <div\n class=\"ui-screen\"\n *ngIf=\"viewModel.uiScreen$ | async as uiScreen\"\n [edmSduiView]=\"uiScreen\"\n >\n <edm-sdui-navigation-controls\n [edmSduiView]=\"uiScreen\"\n ></edm-sdui-navigation-controls>\n\n <ng-container [ngSwitch]=\"uiScreen.identifier\">\n <edm-sdui-single-column-layout\n *ngSwitchCase=\"UIScreenIdentifier.SINGLE_COLUMN\"\n [uiLayout]=\"uiScreen.content\"\n ></edm-sdui-single-column-layout>\n\n <edm-sdui-centered-content-layout\n *ngSwitchCase=\"UIScreenIdentifier.CENTERED_CONTENT\"\n [uiLayout]=\"uiScreen.content\"\n ></edm-sdui-centered-content-layout>\n </ng-container>\n </div>\n </ng-template>\n</ng-template>\n", styles: [":host{display:contents}.ui-screen{width:100vw;min-height:100vh}.error-label{color:var(--input-error)}.loading-spinner{display:flex;justify-content:center;align-items:center;height:100vh;width:100vw;box-sizing:border-box;position:relative}.spinner{width:48px;height:48px;border:5px solid var(--actindcolor);border-top-color:#333;border-radius:50%;animation:spin 1s linear infinite;top:50%;left:50%}@keyframes spin{to{transform:rotate(360deg)}}\n"], dependencies: [{ kind: "directive", type: i1$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1$1.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { kind: "directive", type: i1$1.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { kind: "component", type: SingleColumnLayoutComponent, selector: "edm-sdui-single-column-layout", inputs: ["uiLayout"] }, { kind: "component", type: CenteredContentLayoutComponent, selector: "edm-sdui-centered-content-layout", inputs: ["uiLayout"] }, { kind: "directive", type: UIViewDirective, selector: "[edmSduiView]", inputs: ["edmSduiView", "disableClick"] }, { kind: "component", type: NavigationControlsComponent, selector: "edm-sdui-navigation-controls" }, { kind: "pipe", type: i1$1.AsyncPipe, name: "async" }] }); }
1283
- }
1284
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: UIScreenComponent, decorators: [{
1285
- type: Component,
1286
- args: [{ selector: 'edm-sdui-uiscreen', standalone: false, template: "<ng-container *ngIf=\"viewModel.isLoading$ | async; else loaded\">\n <div class=\"loading-spinner\">\n <div class=\"spinner\"></div>\n </div>\n</ng-container>\n\n<ng-template #loaded>\n <ng-container\n *ngIf=\"viewModel.error$ | async as errorMessage; else renderScreen\"\n >\n <div class=\"error-label\">\n Erro ao carregar a tela:\n <pre>{{ errorMessage }}</pre>\n </div>\n </ng-container>\n\n <ng-template #renderScreen>\n <div\n class=\"ui-screen\"\n *ngIf=\"viewModel.uiScreen$ | async as uiScreen\"\n [edmSduiView]=\"uiScreen\"\n >\n <edm-sdui-navigation-controls\n [edmSduiView]=\"uiScreen\"\n ></edm-sdui-navigation-controls>\n\n <ng-container [ngSwitch]=\"uiScreen.identifier\">\n <edm-sdui-single-column-layout\n *ngSwitchCase=\"UIScreenIdentifier.SINGLE_COLUMN\"\n [uiLayout]=\"uiScreen.content\"\n ></edm-sdui-single-column-layout>\n\n <edm-sdui-centered-content-layout\n *ngSwitchCase=\"UIScreenIdentifier.CENTERED_CONTENT\"\n [uiLayout]=\"uiScreen.content\"\n ></edm-sdui-centered-content-layout>\n </ng-container>\n </div>\n </ng-template>\n</ng-template>\n", styles: [":host{display:contents}.ui-screen{width:100vw;min-height:100vh}.error-label{color:var(--input-error)}.loading-spinner{display:flex;justify-content:center;align-items:center;height:100vh;width:100vw;box-sizing:border-box;position:relative}.spinner{width:48px;height:48px;border:5px solid var(--actindcolor);border-top-color:#333;border-radius:50%;animation:spin 1s linear infinite;top:50%;left:50%}@keyframes spin{to{transform:rotate(360deg)}}\n"] }]
1287
- }], ctorParameters: () => [{ type: UIScreenViewModel }] });
1288
-
1289
- class RowComponent {
1290
- constructor(uiComponent) {
1291
- this.uiComponent = uiComponent;
1292
- }
1293
- ngOnInit() {
1294
- }
1295
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: RowComponent, deps: [{ token: 'uiComponent' }], target: i0.ɵɵFactoryTarget.Component }); }
1296
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.13", type: RowComponent, selector: "edm-sdui-row", ngImport: i0, template: "<div class=\"row-1\" *ngIf=\"uiComponent\" [edmSduiView]=\"uiComponent.element\">\n <edm-sdui-component\n *ngFor=\"let component of uiComponent.components\"\n [uiComponent]=\"component\"\n >\n </edm-sdui-component>\n</div>\n", styles: [":host{display:contents}.row-1{display:flex;flex-direction:row;align-items:center}\n"], dependencies: [{ kind: "directive", type: i1$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: UIComponentComponent, selector: "edm-sdui-component", inputs: ["uiComponent", "translateLabel"] }, { kind: "directive", type: UIViewDirective, selector: "[edmSduiView]", inputs: ["edmSduiView", "disableClick"] }] }); }
1297
- }
1298
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: RowComponent, decorators: [{
1299
- type: Component,
1300
- args: [{ selector: 'edm-sdui-row', standalone: false, template: "<div class=\"row-1\" *ngIf=\"uiComponent\" [edmSduiView]=\"uiComponent.element\">\n <edm-sdui-component\n *ngFor=\"let component of uiComponent.components\"\n [uiComponent]=\"component\"\n >\n </edm-sdui-component>\n</div>\n", styles: [":host{display:contents}.row-1{display:flex;flex-direction:row;align-items:center}\n"] }]
1301
- }], ctorParameters: () => [{ type: undefined, decorators: [{
1302
- type: Inject,
1303
- args: ['uiComponent']
1304
- }] }] });
1305
-
1306
- var row_component = /*#__PURE__*/Object.freeze({
1307
- __proto__: null,
1308
- RowComponent: RowComponent
1309
- });
1310
-
1311
- class ColumnComponent {
1312
- constructor(uiComponent) {
1313
- this.uiComponent = uiComponent;
1314
- }
1315
- ngOnInit() {
1316
- // console.debug('column.uiComponent: ', this.uiComponent);
1317
- }
1318
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: ColumnComponent, deps: [{ token: 'uiComponent' }], target: i0.ɵɵFactoryTarget.Component }); }
1319
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.13", type: ColumnComponent, selector: "edm-sdui-column", ngImport: i0, template: "<div class=\"column\" *ngIf=\"uiComponent\" [edmSduiView]=\"uiComponent.element\">\n <edm-sdui-component\n *ngFor=\"let child of uiComponent.components\"\n [uiComponent]=\"child\"\n >\n </edm-sdui-component>\n</div>\n", styles: [":host{display:contents}.column{display:flex;flex-direction:column}\n"], dependencies: [{ kind: "directive", type: i1$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: UIComponentComponent, selector: "edm-sdui-component", inputs: ["uiComponent", "translateLabel"] }, { kind: "directive", type: UIViewDirective, selector: "[edmSduiView]", inputs: ["edmSduiView", "disableClick"] }] }); }
1320
- }
1321
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: ColumnComponent, decorators: [{
1322
- type: Component,
1323
- args: [{ selector: 'edm-sdui-column', standalone: false, template: "<div class=\"column\" *ngIf=\"uiComponent\" [edmSduiView]=\"uiComponent.element\">\n <edm-sdui-component\n *ngFor=\"let child of uiComponent.components\"\n [uiComponent]=\"child\"\n >\n </edm-sdui-component>\n</div>\n", styles: [":host{display:contents}.column{display:flex;flex-direction:column}\n"] }]
1324
- }], ctorParameters: () => [{ type: undefined, decorators: [{
1325
- type: Inject,
1326
- args: ['uiComponent']
1327
- }] }] });
1328
-
1329
- var column_component = /*#__PURE__*/Object.freeze({
1330
- __proto__: null,
1331
- ColumnComponent: ColumnComponent
1332
- });
1333
-
1334
- var UITextStyle;
1335
- (function (UITextStyle) {
1336
- UITextStyle["LARGE_TITLE"] = "large_title";
1337
- UITextStyle["TITLE_1"] = "title_1";
1338
- UITextStyle["TITLE_2"] = "title_2";
1339
- UITextStyle["TITLE_3"] = "title_3";
1340
- UITextStyle["CALLOUT"] = "callout";
1341
- UITextStyle["HEADLINE"] = "headline";
1342
- UITextStyle["SUBHEADLINE"] = "subheadline";
1343
- UITextStyle["BODY"] = "body";
1344
- UITextStyle["CAPTION_1"] = "caption_1";
1345
- UITextStyle["CAPTION_2"] = "caption_2";
1346
- UITextStyle["FOOTNOTE"] = "footnote";
1347
- })(UITextStyle || (UITextStyle = {}));
1348
-
1349
- class FontSizeMappingService {
1350
- constructor() {
1351
- this.baseFontSize = inject(SDUI_FONT_ADJUST, { optional: true }) ?? 0;
1352
- this.mapping = {
1353
- caption_2: `${13 + this.baseFontSize}px`,
1354
- caption_1: `${14 + this.baseFontSize}px`,
1355
- body: `${16 + this.baseFontSize}px`,
1356
- title_2: `${16 + this.baseFontSize}px`,
1357
- title_1: `${21 + this.baseFontSize}px`,
1358
- callout: `${19 + this.baseFontSize}px`,
1359
- headline: `${18 + this.baseFontSize}px`,
1360
- large_title: `${35 + this.baseFontSize}px`,
1361
- subheadline: `${16 + this.baseFontSize}px`,
1362
- footnote: `${12 + this.baseFontSize}px`,
1363
- };
1364
- }
1365
- getMapping() {
1366
- return this.mapping;
1367
- }
1368
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: FontSizeMappingService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
1369
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: FontSizeMappingService, providedIn: 'root' }); }
1370
- }
1371
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: FontSizeMappingService, decorators: [{
1372
- type: Injectable,
1373
- args: [{ providedIn: 'root' }]
1374
- }], ctorParameters: () => [] });
1375
-
1376
- function getTextStyleMappingFontSize() {
1377
- return inject(FontSizeMappingService).getMapping();
1378
- }
1379
- const textStyleMappingFontWeight = {
1380
- [UITextStyle.BODY]: 'regular',
1381
- [UITextStyle.LARGE_TITLE]: 'bold',
1382
- [UITextStyle.TITLE_1]: 'bold',
1383
- [UITextStyle.TITLE_2]: 'bold',
1384
- [UITextStyle.TITLE_3]: 'bold',
1385
- [UITextStyle.CALLOUT]: 'regular',
1386
- [UITextStyle.HEADLINE]: 'bold',
1387
- [UITextStyle.SUBHEADLINE]: 'bold',
1388
- [UITextStyle.CAPTION_1]: 'regular',
1389
- [UITextStyle.CAPTION_2]: 'regular',
1390
- [UITextStyle.FOOTNOTE]: 'regular',
1391
- };
1392
- const textStyleMappingLineHeight = {
1393
- [UITextStyle.BODY]: '18px',
1394
- [UITextStyle.LARGE_TITLE]: '37px',
1395
- [UITextStyle.TITLE_1]: '23px',
1396
- [UITextStyle.TITLE_2]: '23px',
1397
- [UITextStyle.TITLE_3]: '23px',
1398
- [UITextStyle.CALLOUT]: '21px',
1399
- [UITextStyle.HEADLINE]: '20px',
1400
- [UITextStyle.SUBHEADLINE]: '18px',
1401
- [UITextStyle.CAPTION_1]: '16px',
1402
- [UITextStyle.CAPTION_2]: '15px',
1403
- [UITextStyle.FOOTNOTE]: '14px',
1404
- };
1405
-
1406
- class LabelComponent {
1407
- constructor(uiComponent, renderer, fontSizeMappingService) {
1408
- this.uiComponent = uiComponent;
1409
- this.renderer = renderer;
1410
- this.fontSizeMappingService = fontSizeMappingService;
1411
- }
1412
- ngOnInit() {
1413
- // console.debug('label.uiComponent: ', this.uiComponent);
1414
- }
1415
- ngAfterViewInit() {
1416
- if (this.uiComponent.element) {
1417
- this.applyElement(this.uiComponent.element);
1418
- }
1419
- }
1420
- applyElement(element) {
1421
- if (element.textColor) {
1422
- const color = colorMapping[element.textColor];
1423
- this.renderer.setStyle(this.spanElementRef.nativeElement, 'color', color);
1424
- }
1425
- if (element.textStyle) {
1426
- const textStyleMappingFontSize = this.fontSizeMappingService.getMapping();
1427
- const fontSize = textStyleMappingFontSize[element.textStyle];
1428
- const fontWeight = textStyleMappingFontWeight[element.textStyle];
1429
- const lineHeight = textStyleMappingLineHeight[element.textStyle];
1430
- //TODO: Substituir por classe no futuro.
1431
- this.renderer.setStyle(this.spanElementRef.nativeElement, 'font-weight', fontWeight);
1432
- this.renderer.setStyle(this.spanElementRef.nativeElement, 'font-size', fontSize);
1433
- this.renderer.setStyle(this.spanElementRef.nativeElement, 'line-height', lineHeight);
1434
- }
1435
- const maxLines = element.maxLines ?? 1;
1436
- if (element.maxLines) {
1437
- this.renderer.setStyle(this.spanElementRef.nativeElement, 'display', '-webkit-box');
1438
- this.renderer.setStyle(this.spanElementRef.nativeElement, '-webkit-box-orient', 'vertical');
1439
- this.renderer.setStyle(this.spanElementRef.nativeElement, 'overflow', 'hidden');
1440
- this.renderer.setStyle(this.spanElementRef.nativeElement, 'text-overflow', 'ellipsis');
1441
- this.renderer.setStyle(this.spanElementRef.nativeElement, '-webkit-line-clamp', maxLines);
1442
- }
1443
- if (element.opacity) {
1444
- const opacity = element.opacity;
1445
- this.renderer.setStyle(this.spanElementRef.nativeElement, 'opacity', opacity);
1446
- }
1447
- if (element.alignment) {
1448
- const alignment = element.alignment.alignment;
1449
- switch (alignment) {
1450
- case UIAlignmentType.START: {
1451
- this.renderer.setStyle(this.spanElementRef.nativeElement, 'text-align', 'left');
1452
- break;
1453
- }
1454
- case UIAlignmentType.CENTER: {
1455
- this.renderer.setStyle(this.spanElementRef.nativeElement, 'text-align', 'center');
1456
- break;
1457
- }
1458
- case UIAlignmentType.END: {
1459
- this.renderer.setStyle(this.spanElementRef.nativeElement, 'text-align', 'right');
1460
- break;
1461
- }
1462
- }
1463
- }
1464
- }
1465
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: LabelComponent, deps: [{ token: 'uiComponent' }, { token: i0.Renderer2 }, { token: FontSizeMappingService }], target: i0.ɵɵFactoryTarget.Component }); }
1466
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.13", type: LabelComponent, selector: "edm-sdui-label", viewQueries: [{ propertyName: "spanElementRef", first: true, predicate: ["spanElement"], descendants: true }], ngImport: i0, template: "<span #spanElement [edmSduiView]=\"uiComponent.element\" *ngIf=\"uiComponent\">{{\n uiComponent.element?.label ?? \"\"\n}}</span>\n", styles: [":host{display:contents}\n"], dependencies: [{ kind: "directive", type: i1$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: UIViewDirective, selector: "[edmSduiView]", inputs: ["edmSduiView", "disableClick"] }] }); }
1467
- }
1468
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: LabelComponent, decorators: [{
1469
- type: Component,
1470
- args: [{ selector: 'edm-sdui-label', standalone: false, template: "<span #spanElement [edmSduiView]=\"uiComponent.element\" *ngIf=\"uiComponent\">{{\n uiComponent.element?.label ?? \"\"\n}}</span>\n", styles: [":host{display:contents}\n"] }]
1471
- }], ctorParameters: () => [{ type: undefined, decorators: [{
1472
- type: Inject,
1473
- args: ['uiComponent']
1474
- }] }, { type: i0.Renderer2 }, { type: FontSizeMappingService }], propDecorators: { spanElementRef: [{
1475
- type: ViewChild,
1476
- args: ['spanElement']
1477
- }] } });
1478
-
1479
- var label_component = /*#__PURE__*/Object.freeze({
1480
- __proto__: null,
1481
- LabelComponent: LabelComponent
1482
- });
1483
-
1484
- class SpaceComponent {
1485
- constructor(uiComponent) {
1486
- this.uiComponent = uiComponent;
1487
- }
1488
- ngOnInit() {
1489
- // console.debug('space.uiComponent: ', this.uiComponent);
1490
- }
1491
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: SpaceComponent, deps: [{ token: 'uiComponent' }], target: i0.ɵɵFactoryTarget.Component }); }
1492
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.13", type: SpaceComponent, selector: "edm-sdui-space", ngImport: i0, template: "<div class=\"space\"></div>\n", styles: [":host{display:contents}.space{flex-grow:1;flex-shrink:1;min-height:1px;min-width:1px}\n"] }); }
1493
- }
1494
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: SpaceComponent, decorators: [{
1495
- type: Component,
1496
- args: [{ selector: 'edm-sdui-space', standalone: false, template: "<div class=\"space\"></div>\n", styles: [":host{display:contents}.space{flex-grow:1;flex-shrink:1;min-height:1px;min-width:1px}\n"] }]
1497
- }], ctorParameters: () => [{ type: undefined, decorators: [{
1498
- type: Inject,
1499
- args: ['uiComponent']
1500
- }] }] });
1501
-
1502
- var space_component = /*#__PURE__*/Object.freeze({
1503
- __proto__: null,
1504
- SpaceComponent: SpaceComponent
1505
- });
1506
-
1507
- class ZStackComponent {
1508
- constructor(uiComponent) {
1509
- this.uiComponent = uiComponent;
1510
- }
1511
- ngOnInit() {
1512
- // console.debug('zstack.uiComponent: ', this.uiComponent);
1513
- }
1514
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: ZStackComponent, deps: [{ token: 'uiComponent' }], target: i0.ɵɵFactoryTarget.Component }); }
1515
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.13", type: ZStackComponent, selector: "edm-sdui-zstack", ngImport: i0, template: "<div #zstackElementRef class=\"zstack\" *ngIf=\"uiComponent\" [edmSduiView]=\"uiComponent.element\">\n <ng-container *ngFor=\"let child of uiComponent.components\">\n <div class=\"zstack-child\">\n <edm-sdui-component [uiComponent]=\"child\"></edm-sdui-component>\n </div>\n </ng-container>\n</div>\n", styles: [":host{display:contents}.zstack{display:grid}.zstack-child{grid-area:1/1;display:flex;align-items:center}\n"], dependencies: [{ kind: "directive", type: i1$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: UIComponentComponent, selector: "edm-sdui-component", inputs: ["uiComponent", "translateLabel"] }, { kind: "directive", type: UIViewDirective, selector: "[edmSduiView]", inputs: ["edmSduiView", "disableClick"] }] }); }
1516
- }
1517
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: ZStackComponent, decorators: [{
1518
- type: Component,
1519
- args: [{ selector: 'edm-sdui-zstack', standalone: false, template: "<div #zstackElementRef class=\"zstack\" *ngIf=\"uiComponent\" [edmSduiView]=\"uiComponent.element\">\n <ng-container *ngFor=\"let child of uiComponent.components\">\n <div class=\"zstack-child\">\n <edm-sdui-component [uiComponent]=\"child\"></edm-sdui-component>\n </div>\n </ng-container>\n</div>\n", styles: [":host{display:contents}.zstack{display:grid}.zstack-child{grid-area:1/1;display:flex;align-items:center}\n"] }]
1520
- }], ctorParameters: () => [{ type: undefined, decorators: [{
1521
- type: Inject,
1522
- args: ['uiComponent']
1523
- }] }] });
1524
-
1525
- var zstack_component = /*#__PURE__*/Object.freeze({
1526
- __proto__: null,
1527
- ZStackComponent: ZStackComponent
1528
- });
1529
-
1530
- class RowDivisorComponent {
1531
- constructor(uiComponent) {
1532
- this.uiComponent = uiComponent;
1533
- }
1534
- ngOnInit() {
1535
- // console.debug('rowDivisor.uiComponent: ', this.uiComponent);
1536
- }
1537
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: RowDivisorComponent, deps: [{ token: 'uiComponent' }], target: i0.ɵɵFactoryTarget.Component }); }
1538
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.13", type: RowDivisorComponent, selector: "edm-sdui-row-divisor", ngImport: i0, template: "<div\n class=\"row-divisor\"\n *ngIf=\"uiComponent\"\n [edmSduiView]=\"uiComponent.element\"\n></div>\n", styles: [":host{display:contents}.row-divisor{height:1px}\n"], dependencies: [{ kind: "directive", type: i1$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: UIViewDirective, selector: "[edmSduiView]", inputs: ["edmSduiView", "disableClick"] }] }); }
1539
- }
1540
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: RowDivisorComponent, decorators: [{
1541
- type: Component,
1542
- args: [{ selector: 'edm-sdui-row-divisor', standalone: false, template: "<div\n class=\"row-divisor\"\n *ngIf=\"uiComponent\"\n [edmSduiView]=\"uiComponent.element\"\n></div>\n", styles: [":host{display:contents}.row-divisor{height:1px}\n"] }]
1543
- }], ctorParameters: () => [{ type: undefined, decorators: [{
1544
- type: Inject,
1545
- args: ['uiComponent']
1546
- }] }] });
1547
-
1548
- var rowDivisor_component = /*#__PURE__*/Object.freeze({
1549
- __proto__: null,
1550
- RowDivisorComponent: RowDivisorComponent
1551
- });
506
+ class UIActionService {
507
+ constructor(router, actionHandlers, modalService) {
508
+ this.router = router;
509
+ this.actionHandlers = actionHandlers;
510
+ this.modalService = modalService;
511
+ }
512
+ execute(action) {
513
+ if (!action || !action.type)
514
+ return;
515
+ console.log(action);
516
+ switch (action.type) {
517
+ case UIActionType.INTERNAL_URL:
518
+ if (action.url && isSduiUrl(action.url)) {
519
+ const resolved = resolveSduiUrl(action.url);
520
+ this.router.navigate([], {
521
+ queryParams: { [SDUI_URL_PARAM]: resolved },
522
+ queryParamsHandling: 'merge',
523
+ });
524
+ }
525
+ else {
526
+ this.handleCustomNavigation(action.url || '');
527
+ }
528
+ break;
529
+ case UIActionType.RELOAD_INTERNAL_URL:
530
+ if (action.url) {
531
+ console.debug('[UIActionService] Navigating to:', action.url);
532
+ if (isSduiUrl(action.url)) {
533
+ const resolved = resolveSduiUrl(action.url);
534
+ this.router.navigate([], {
535
+ queryParams: { [SDUI_URL_PARAM]: resolved },
536
+ queryParamsHandling: 'merge',
537
+ });
538
+ }
539
+ else {
540
+ this.router.navigateByUrl(action.url, { replaceUrl: false });
541
+ }
542
+ }
543
+ break;
544
+ case UIActionType.EXTERNAL_URL:
545
+ if (action.url) {
546
+ window.open(action.url, '_blank');
547
+ }
548
+ break;
549
+ case UIActionType.WEBVIEW_URL:
550
+ if (action.url) {
551
+ const modal = this.modalService.open(action.url);
552
+ }
553
+ break;
554
+ // Outros tipos de ação podem ser adicionados aqui
555
+ }
556
+ }
557
+ handleCustomNavigation(url) {
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 }); }
625
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: UIActionService, providedIn: 'root' }); }
626
+ }
627
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: UIActionService, decorators: [{
628
+ type: Injectable,
629
+ args: [{ providedIn: 'root' }]
630
+ }], ctorParameters: () => [{ type: i1$3.Router }, { type: UIActionHandlersService }, { type: ModalService }] });
1552
631
 
1553
632
  var UIAsset;
1554
633
  (function (UIAsset) {
@@ -2285,6 +1364,1033 @@ const assetMapping = {
2285
1364
  [UIAsset.IC_SUPPORT_PROFILE]: 'assets/images/ic-support-profile.svg',
2286
1365
  };
2287
1366
 
1367
+ var UISpacingLevel;
1368
+ (function (UISpacingLevel) {
1369
+ UISpacingLevel["S1"] = "s1";
1370
+ UISpacingLevel["S2"] = "s2";
1371
+ UISpacingLevel["S3"] = "s3";
1372
+ UISpacingLevel["S4"] = "s4";
1373
+ UISpacingLevel["S5"] = "s5";
1374
+ UISpacingLevel["S6"] = "s6";
1375
+ })(UISpacingLevel || (UISpacingLevel = {}));
1376
+
1377
+ const spaceMapping = {
1378
+ [UISpacingLevel.S1]: '4px',
1379
+ [UISpacingLevel.S2]: '8px',
1380
+ [UISpacingLevel.S3]: '16px',
1381
+ [UISpacingLevel.S4]: '24px',
1382
+ [UISpacingLevel.S5]: '32px',
1383
+ [UISpacingLevel.S6]: '40px',
1384
+ };
1385
+
1386
+ var UIColor;
1387
+ (function (UIColor) {
1388
+ UIColor["ALERT"] = "alert";
1389
+ UIColor["BG_TAG"] = "bg_tag";
1390
+ UIColor["ACTINDCOLOR"] = "actindcolor";
1391
+ UIColor["TEXT_WEB"] = "text_web";
1392
+ UIColor["TEXT_RANKING_HIGHLIGHT"] = "text_ranking_highlight";
1393
+ UIColor["RANKING_HIGHLIGHT"] = "ranking_highlight";
1394
+ UIColor["TEXT_RANKING_MAIN"] = "text_ranking_main";
1395
+ UIColor["TEXT_RANKING_AUX"] = "text_ranking_aux";
1396
+ UIColor["BT_SELECT_ACTIVITY"] = "bt_select_activity";
1397
+ UIColor["FONT_BT"] = "font_bt";
1398
+ UIColor["FONT_BT_PRICE"] = "font_bt_price";
1399
+ UIColor["FONT_TAG"] = "font_tag";
1400
+ UIColor["FONT_LIVE"] = "font_live";
1401
+ UIColor["QUIZ_SELECT"] = "quiz_select";
1402
+ UIColor["MAIN1"] = "main_1";
1403
+ UIColor["AUX"] = "aux";
1404
+ UIColor["VOTE_OFF"] = "vote_off";
1405
+ UIColor["BG_VOTE"] = "bg_vote";
1406
+ UIColor["VOTE_ON"] = "vote_on";
1407
+ UIColor["STORY_OFF"] = "story_off";
1408
+ UIColor["STORY_ON"] = "story_on";
1409
+ UIColor["FONT_ACTIONS"] = "font_actions";
1410
+ UIColor["FONT_SEARCH_OFF"] = "font_search_off";
1411
+ UIColor["FONT_SEARCH_ON"] = "font_search_on";
1412
+ UIColor["SLIDER_OFF"] = "slider_off";
1413
+ UIColor["SLIDER_ON"] = "slider_on";
1414
+ UIColor["PROGRESS_VIEW_OFF"] = "progress_view_off";
1415
+ UIColor["PROGRESS_VIEW_RANKING_OFF"] = "progress_view_ranking_off";
1416
+ UIColor["PROGRESS_STORY_OFF"] = "progress_story_off";
1417
+ UIColor["PROGRESS_STORY_ON"] = "progress_story_on";
1418
+ UIColor["PROGRESS_VIEW_ON"] = "progress_view_on";
1419
+ UIColor["FONT_DISABLED"] = "font_disabled";
1420
+ UIColor["BT_TAB_OFF"] = "bt_tab_off";
1421
+ UIColor["BG"] = "bg";
1422
+ UIColor["FONT_BT_PROGRAM"] = "font_bt_program";
1423
+ UIColor["BG_RANKING"] = "bg_ranking";
1424
+ UIColor["BG_STORY"] = "bg_story";
1425
+ UIColor["BG_NEW_COMMENT"] = "bg_new_comment";
1426
+ UIColor["SHADOW"] = "shadow";
1427
+ UIColor["BG_SURVEY"] = "bg_survey";
1428
+ UIColor["BG_LIVE"] = "bg_live";
1429
+ UIColor["BG_VIEW_LIVE"] = "bg_view_live";
1430
+ UIColor["MAIN2"] = "main_2";
1431
+ UIColor["BT_TAG_ON"] = "bt_tag_on";
1432
+ UIColor["TEXT_COLOR"] = "text_color";
1433
+ UIColor["TEXT_STORY"] = "text_story";
1434
+ UIColor["BT_REGISTER"] = "bt_register";
1435
+ UIColor["BT_SHADOW_PROFILE"] = "bt_shadow_profile";
1436
+ UIColor["FONT_REGISTER"] = "font_register";
1437
+ UIColor["FONT_BT_MAIN"] = "font_bt_main";
1438
+ UIColor["FONT_BT_QUIZ"] = "font_bt_quiz";
1439
+ UIColor["FONT_BT_VIEW"] = "font_bt_view";
1440
+ UIColor["FONT_BT_TAG_OFF"] = "font_bt_tag_off";
1441
+ UIColor["FONT_BT_TAG_ON"] = "font_bt_tag_on";
1442
+ UIColor["ATTENTION_COLOR"] = "attention_color";
1443
+ UIColor["QUIZ_ERROR"] = "quiz_error";
1444
+ UIColor["BG_NAV"] = "bg_nav";
1445
+ UIColor["BT_OPEN_E_CLOSE"] = "bt_open_e_close";
1446
+ UIColor["IC_TYPE_CLASS"] = "ic_type_class";
1447
+ UIColor["IC_TYPE_LIVE"] = "ic_type_live";
1448
+ UIColor["IC_TYPE_DISABLED"] = "ic_type_disabled";
1449
+ UIColor["BT_DOWNLOAD"] = "bt_download";
1450
+ UIColor["BT_DISABLED"] = "bt_disabled";
1451
+ UIColor["BT_DISABLED_HOME"] = "bt_disabled_home";
1452
+ UIColor["BT_CHECK_OFF"] = "bt_check_off";
1453
+ UIColor["ACTIONS_OFF"] = "actions_off";
1454
+ UIColor["BT_PROGRAM"] = "bt_program";
1455
+ UIColor["PLAYER_CONTROLS"] = "player_controls";
1456
+ UIColor["RATING_OFF"] = "rating_off";
1457
+ UIColor["RATING_ON"] = "rating_on";
1458
+ UIColor["ACTIONS_ON"] = "actions_on";
1459
+ UIColor["TAG_VIP_HIGHLIGHT"] = "tag_vip_highlight";
1460
+ UIColor["BT_CHECK_ON"] = "bt_check_on";
1461
+ UIColor["BT_TAB_ON"] = "bt_tab_on";
1462
+ UIColor["BT_VIEW_DEG1"] = "bt_view_deg1";
1463
+ UIColor["LINE_DIVISER"] = "line_diviser";
1464
+ UIColor["BG_SEC"] = "bg_sec";
1465
+ UIColor["BG_SEARCH"] = "bg_search";
1466
+ UIColor["FONT_PRICE"] = "font_price";
1467
+ UIColor["BT_LIKE_ON"] = "bt_like_on";
1468
+ UIColor["BG_CARD"] = "bg_card";
1469
+ UIColor["BT_TAG_OFF"] = "bt_tag_off";
1470
+ UIColor["BT_TAG_VIP"] = "bt_tag_vip";
1471
+ UIColor["BT_PROFILE"] = "bt_profile";
1472
+ UIColor["BT_PRICE_DEG1"] = "bt_price_deg1";
1473
+ UIColor["BT_PRICE_DEG2"] = "bt_price_deg2";
1474
+ UIColor["BT_LIKE_OFF"] = "bt_like_off";
1475
+ UIColor["BT_LOCK"] = "bt_lock";
1476
+ UIColor["BT_TRASH"] = "bt_trash";
1477
+ UIColor["BG_COMMENT"] = "bg_comment";
1478
+ UIColor["BG_POST"] = "bg_post";
1479
+ UIColor["BT_HIGHLIGHT"] = "bt_highlight";
1480
+ UIColor["ATTENTION_BADGE"] = "attention_badge";
1481
+ UIColor["BT_BORDER_PROFILE"] = "bt_border_profile";
1482
+ UIColor["BT_MAIN_DEG1"] = "bt_main_deg1";
1483
+ UIColor["BT_MAIN_DEG2"] = "bt_main_deg2";
1484
+ UIColor["BT_VIEW_DEG2"] = "bt_view_deg2";
1485
+ UIColor["BG_MODULO"] = "bg_modulo";
1486
+ UIColor["BG_MODULO_RANKING"] = "bg_modulo_ranking";
1487
+ UIColor["QUIZ_RIGHT"] = "quiz_right";
1488
+ UIColor["BT_BANNER_MAIN"] = "bt_banner_main";
1489
+ UIColor["FONT_BT_BANNER"] = "font_bt_banner";
1490
+ UIColor["BT_BANNER"] = "bt_banner";
1491
+ UIColor["FONT_BT_BANNER_MAIN"] = "font_bt_banner_main";
1492
+ UIColor["BORDER_BANNER"] = "border_banner";
1493
+ UIColor["INPUT_ERROR"] = "input_error";
1494
+ UIColor["BT_BACK"] = "bt_back";
1495
+ UIColor["TEXT_COMMENT_SEC"] = "text_comment_sec";
1496
+ UIColor["BT_IA_DEG1"] = "bt_ia_deg1";
1497
+ UIColor["BT_IA_DEG2"] = "bt_ia_deg2";
1498
+ UIColor["NORMAL"] = "normal";
1499
+ UIColor["BG_CLIPS"] = "bg_clips";
1500
+ UIColor["FONT_CLIPS"] = "font_clips";
1501
+ UIColor["BG_MASK_0"] = "bg_mask_0";
1502
+ UIColor["BG_MASK_80"] = "bg_mask_80";
1503
+ UIColor["BG_MASK_20"] = "bg_mask_20";
1504
+ UIColor["TEXT_CHALLENGE_AUX"] = "text_challenge_aux";
1505
+ UIColor["TEXT_CHALLENGE_HIGHLIGHT"] = "text_challenge_highlight";
1506
+ UIColor["BG_CHALLENGE"] = "bg_challenge";
1507
+ UIColor["BG_MODULO_CHALLENGE"] = "bg_modulo_challenge";
1508
+ UIColor["CHALLENGE_HIGHLIGHT"] = "challenge_highlight";
1509
+ UIColor["BT_CHALLENGE"] = "bt_challenge";
1510
+ UIColor["FONT_BT_CHALLENGE"] = "font_bt_challenge";
1511
+ UIColor["CHALLENGE_OFF"] = "challenge_off";
1512
+ UIColor["TEXT_CHALLENGE_DISABLED"] = "text_challenge_disabled";
1513
+ UIColor["TEXT_CHALLENGE_MAIN"] = "text_challenge_main";
1514
+ UIColor["CHALLENGE_WAY"] = "challenge_way";
1515
+ })(UIColor || (UIColor = {}));
1516
+
1517
+ const colorMapping = {
1518
+ [UIColor.ALERT]: 'var(--alert)',
1519
+ [UIColor.BG_TAG]: 'var(--bg-tag)',
1520
+ [UIColor.ACTINDCOLOR]: 'var(--actindcolor)',
1521
+ [UIColor.TEXT_WEB]: 'var(--text-web)',
1522
+ [UIColor.TEXT_RANKING_HIGHLIGHT]: 'var(--text-ranking-highlight)',
1523
+ [UIColor.RANKING_HIGHLIGHT]: 'var(--ranking-highlight)',
1524
+ [UIColor.TEXT_RANKING_MAIN]: 'var(--text-ranking-main)',
1525
+ [UIColor.TEXT_RANKING_AUX]: 'var(--text-ranking-aux)',
1526
+ [UIColor.BT_SELECT_ACTIVITY]: 'var(--bt-select-activity)',
1527
+ [UIColor.FONT_BT]: 'var(--font-bt)',
1528
+ [UIColor.FONT_BT_PRICE]: 'var(--font-bt-price)',
1529
+ [UIColor.FONT_TAG]: 'var(--font-tag)',
1530
+ [UIColor.FONT_LIVE]: 'var(--font-live)',
1531
+ [UIColor.QUIZ_SELECT]: 'var(--quiz-select)',
1532
+ [UIColor.MAIN1]: 'var(--main-1)',
1533
+ [UIColor.AUX]: 'var(--aux)',
1534
+ [UIColor.VOTE_OFF]: 'var(--vote-off)',
1535
+ [UIColor.BG_VOTE]: 'var(--bg-vote)',
1536
+ [UIColor.VOTE_ON]: 'var(--vote-on)',
1537
+ [UIColor.STORY_OFF]: 'var(--story-off)',
1538
+ [UIColor.STORY_ON]: 'var(--story-on)',
1539
+ [UIColor.FONT_ACTIONS]: 'var(--font-actions)',
1540
+ [UIColor.FONT_SEARCH_OFF]: 'var(--font-search-off)',
1541
+ [UIColor.FONT_SEARCH_ON]: 'var(--font-search-on)',
1542
+ [UIColor.SLIDER_OFF]: 'var(--slider-off)',
1543
+ [UIColor.SLIDER_ON]: 'var(--slider-on)',
1544
+ [UIColor.PROGRESS_VIEW_OFF]: 'var(--progress-view-off)',
1545
+ [UIColor.PROGRESS_VIEW_RANKING_OFF]: 'var(--progress-view-ranking-off)',
1546
+ [UIColor.PROGRESS_STORY_OFF]: 'var(--progress-story-off)',
1547
+ [UIColor.PROGRESS_STORY_ON]: 'var(--progress-story-on)',
1548
+ [UIColor.PROGRESS_VIEW_ON]: 'var(--progress-view-on)',
1549
+ [UIColor.FONT_DISABLED]: 'var(--font-disabled)',
1550
+ [UIColor.BT_TAB_OFF]: 'var(--bt-tab-off)',
1551
+ [UIColor.BG]: 'var(--bg)',
1552
+ [UIColor.FONT_BT_PROGRAM]: 'var(--font-bt-program)',
1553
+ [UIColor.BG_RANKING]: 'var(--bg-ranking)',
1554
+ [UIColor.BG_STORY]: 'var(--bg-story)',
1555
+ [UIColor.BG_NEW_COMMENT]: 'var(--bg-new-comment)',
1556
+ [UIColor.SHADOW]: 'var(--shadow)',
1557
+ [UIColor.BG_SURVEY]: 'var(--bg-survey)',
1558
+ [UIColor.BG_LIVE]: 'var(--bg-live)',
1559
+ [UIColor.BG_VIEW_LIVE]: 'var(--bg-view-live)',
1560
+ [UIColor.MAIN2]: 'var(--main-2)',
1561
+ [UIColor.BT_TAG_ON]: 'var(--bt-tag-on)',
1562
+ [UIColor.TEXT_COLOR]: 'var(--text-color)',
1563
+ [UIColor.TEXT_STORY]: 'var(--text-story)',
1564
+ [UIColor.BT_REGISTER]: 'var(--bt-register)',
1565
+ [UIColor.BT_SHADOW_PROFILE]: 'var(--bt-shadow-profile)',
1566
+ [UIColor.FONT_REGISTER]: 'var(--font-register)',
1567
+ [UIColor.FONT_BT_MAIN]: 'var(--font-bt-main)',
1568
+ [UIColor.FONT_BT_QUIZ]: 'var(--font-bt-quiz)',
1569
+ [UIColor.FONT_BT_VIEW]: 'var(--font-bt-view)',
1570
+ [UIColor.FONT_BT_TAG_OFF]: 'var(--font-bt-tag-off)',
1571
+ [UIColor.FONT_BT_TAG_ON]: 'var(--font-bt-tag-on)',
1572
+ [UIColor.ATTENTION_COLOR]: 'var(--attention-color)',
1573
+ [UIColor.QUIZ_ERROR]: 'var(--quiz-error)',
1574
+ [UIColor.BG_NAV]: 'var(--bg-nav)',
1575
+ [UIColor.BT_OPEN_E_CLOSE]: 'var(--bt-open-e-close)',
1576
+ [UIColor.IC_TYPE_CLASS]: 'var(--ic-type-class)',
1577
+ [UIColor.IC_TYPE_LIVE]: 'var(--ic-type-live)',
1578
+ [UIColor.IC_TYPE_DISABLED]: 'var(--ic-type-disabled)',
1579
+ [UIColor.BT_DOWNLOAD]: 'var(--bt-download)',
1580
+ [UIColor.BT_DISABLED]: 'var(--bt-disabled)',
1581
+ [UIColor.BT_DISABLED_HOME]: 'var(--bt-disabled-home)',
1582
+ [UIColor.BT_CHECK_OFF]: 'var(--bt-check-off)',
1583
+ [UIColor.ACTIONS_OFF]: 'var(--actions-off)',
1584
+ [UIColor.BT_PROGRAM]: 'var(--bt-program)',
1585
+ [UIColor.PLAYER_CONTROLS]: 'var(--player-controls)',
1586
+ [UIColor.RATING_OFF]: 'var(--rating-off)',
1587
+ [UIColor.RATING_ON]: 'var(--rating-on)',
1588
+ [UIColor.ACTIONS_ON]: 'var(--actions-on)',
1589
+ [UIColor.TAG_VIP_HIGHLIGHT]: 'var(--tag-vip-highlight)',
1590
+ [UIColor.BT_CHECK_ON]: 'var(--bt-check-on)',
1591
+ [UIColor.BT_TAB_ON]: 'var(--bt-tab-on)',
1592
+ [UIColor.BT_VIEW_DEG1]: 'var(--bt-view-deg1)',
1593
+ [UIColor.LINE_DIVISER]: 'var(--line-diviser)',
1594
+ [UIColor.BG_SEC]: 'var(--bg-sec)',
1595
+ [UIColor.BG_SEARCH]: 'var(--bg-search)',
1596
+ [UIColor.FONT_PRICE]: 'var(--font-price)',
1597
+ [UIColor.BT_LIKE_ON]: 'var(--bt-like-on)',
1598
+ [UIColor.BG_CARD]: 'var(--bg-card)',
1599
+ [UIColor.BT_TAG_OFF]: 'var(--bt-tag-off)',
1600
+ [UIColor.BT_TAG_VIP]: 'var(--bt-tag-vip)',
1601
+ [UIColor.BT_PROFILE]: 'var(--bt-profile)',
1602
+ [UIColor.BT_PRICE_DEG1]: 'var(--bt-price-deg1)',
1603
+ [UIColor.BT_PRICE_DEG2]: 'var(--bt-price-deg2)',
1604
+ [UIColor.BT_LIKE_OFF]: 'var(--bt-like-off)',
1605
+ [UIColor.BT_LOCK]: 'var(--bt-lock)',
1606
+ [UIColor.BT_TRASH]: 'var(--bt-trash)',
1607
+ [UIColor.BG_COMMENT]: 'var(--bg-comment)',
1608
+ [UIColor.BG_POST]: 'var(--bg-post)',
1609
+ [UIColor.BT_HIGHLIGHT]: 'var(--bt-highlight)',
1610
+ [UIColor.ATTENTION_BADGE]: 'var(--attention-badge)',
1611
+ [UIColor.BT_BORDER_PROFILE]: 'var(--bt-border-profile)',
1612
+ [UIColor.BT_MAIN_DEG1]: 'var(--bt-main-deg1)',
1613
+ [UIColor.BT_MAIN_DEG2]: 'var(--bt-main-deg2)',
1614
+ [UIColor.BT_VIEW_DEG2]: 'var(--bt-view-deg2)',
1615
+ [UIColor.BG_MODULO]: 'var(--bg-modulo)',
1616
+ [UIColor.BG_MODULO_RANKING]: 'var(--bg-modulo-ranking)',
1617
+ [UIColor.QUIZ_RIGHT]: 'var(--quiz-right)',
1618
+ [UIColor.BT_BANNER_MAIN]: 'var(--bt-banner-main)',
1619
+ [UIColor.FONT_BT_BANNER]: 'var(--font-bt-banner)',
1620
+ [UIColor.BT_BANNER]: 'var(--bt-banner)',
1621
+ [UIColor.FONT_BT_BANNER_MAIN]: 'var(--font-bt-banner-main)',
1622
+ [UIColor.BORDER_BANNER]: 'var(--border-banner)',
1623
+ [UIColor.INPUT_ERROR]: 'var(--input-error)',
1624
+ [UIColor.BT_BACK]: 'var(--bt-back)',
1625
+ [UIColor.TEXT_COMMENT_SEC]: 'var(--text-comment-sec)',
1626
+ [UIColor.BT_IA_DEG1]: 'var(--bt-ia-deg-1)',
1627
+ [UIColor.BT_IA_DEG2]: 'var(--bt-ia-deg-2)',
1628
+ [UIColor.NORMAL]: 'var(--normal)',
1629
+ [UIColor.BG_CLIPS]: 'var(--bg-clips)',
1630
+ [UIColor.FONT_CLIPS]: 'var(--font-clips)',
1631
+ [UIColor.BG_MASK_0]: 'var(--bg-mask-0)',
1632
+ [UIColor.BG_MASK_80]: 'var(--bg-mask-80)',
1633
+ [UIColor.BG_MASK_20]: 'var(--bg-mask-20)',
1634
+ [UIColor.TEXT_CHALLENGE_AUX]: 'var(--text-challenge-aux)',
1635
+ [UIColor.TEXT_CHALLENGE_HIGHLIGHT]: 'var(--text-challenge-highlight)',
1636
+ [UIColor.BG_CHALLENGE]: 'var(--bg-challenge)',
1637
+ [UIColor.BG_MODULO_CHALLENGE]: 'var(--bg-modulo-challenge)',
1638
+ [UIColor.CHALLENGE_HIGHLIGHT]: 'var(--challenge-highlight)',
1639
+ [UIColor.BT_CHALLENGE]: 'var(--bt-challenge)',
1640
+ [UIColor.FONT_BT_CHALLENGE]: 'var(--font-bt-challenge)',
1641
+ [UIColor.CHALLENGE_OFF]: 'var(--challenge-off)',
1642
+ [UIColor.TEXT_CHALLENGE_DISABLED]: 'var(--text-challenge-disabled)',
1643
+ [UIColor.TEXT_CHALLENGE_MAIN]: 'var(--text-challenge-main)',
1644
+ [UIColor.CHALLENGE_WAY]: 'var(--challenge-way)',
1645
+ };
1646
+
1647
+ var UIPaddingLevel;
1648
+ (function (UIPaddingLevel) {
1649
+ UIPaddingLevel["P1"] = "p1";
1650
+ UIPaddingLevel["P2"] = "p2";
1651
+ UIPaddingLevel["P3"] = "p3";
1652
+ UIPaddingLevel["P4"] = "p4";
1653
+ UIPaddingLevel["P5"] = "p5";
1654
+ UIPaddingLevel["P6"] = "p6";
1655
+ UIPaddingLevel["P7"] = "p7";
1656
+ UIPaddingLevel["P8"] = "p8";
1657
+ })(UIPaddingLevel || (UIPaddingLevel = {}));
1658
+
1659
+ const padMapping = {
1660
+ [UIPaddingLevel.P1]: '4px',
1661
+ [UIPaddingLevel.P2]: '8px',
1662
+ [UIPaddingLevel.P3]: '16px',
1663
+ [UIPaddingLevel.P4]: '24px',
1664
+ [UIPaddingLevel.P5]: '32px',
1665
+ [UIPaddingLevel.P6]: '40px',
1666
+ [UIPaddingLevel.P7]: '48px',
1667
+ [UIPaddingLevel.P8]: '56px',
1668
+ };
1669
+
1670
+ var UIRadiusLevel;
1671
+ (function (UIRadiusLevel) {
1672
+ UIRadiusLevel["R1"] = "r1";
1673
+ UIRadiusLevel["R2"] = "r2";
1674
+ UIRadiusLevel["R3"] = "r3";
1675
+ UIRadiusLevel["R4"] = "r4";
1676
+ UIRadiusLevel["R5"] = "r5";
1677
+ UIRadiusLevel["R50"] = "r50";
1678
+ })(UIRadiusLevel || (UIRadiusLevel = {}));
1679
+
1680
+ const radiusMapping = {
1681
+ [UIRadiusLevel.R1]: '3px',
1682
+ [UIRadiusLevel.R2]: '5px',
1683
+ [UIRadiusLevel.R3]: '8px',
1684
+ [UIRadiusLevel.R4]: '10px',
1685
+ [UIRadiusLevel.R5]: '12px',
1686
+ [UIRadiusLevel.R50]: '50%',
1687
+ };
1688
+
1689
+ var UIAlignmentType;
1690
+ (function (UIAlignmentType) {
1691
+ UIAlignmentType["START"] = "start";
1692
+ UIAlignmentType["CENTER"] = "center";
1693
+ UIAlignmentType["END"] = "end";
1694
+ })(UIAlignmentType || (UIAlignmentType = {}));
1695
+
1696
+ const alignmentMapping = {
1697
+ [UIAlignmentType.CENTER]: 'center',
1698
+ [UIAlignmentType.END]: 'end',
1699
+ [UIAlignmentType.START]: 'start',
1700
+ };
1701
+
1702
+ var UIDimension;
1703
+ (function (UIDimension) {
1704
+ UIDimension["P100"] = "p100";
1705
+ UIDimension["P90"] = "p90";
1706
+ UIDimension["P80"] = "p80";
1707
+ UIDimension["P70"] = "p70";
1708
+ UIDimension["P60"] = "p60";
1709
+ UIDimension["P50"] = "p50";
1710
+ UIDimension["P40"] = "p40";
1711
+ UIDimension["P30"] = "p30";
1712
+ UIDimension["P20"] = "p20";
1713
+ UIDimension["P10"] = "p10";
1714
+ UIDimension["D180"] = "d180";
1715
+ UIDimension["D150"] = "d150";
1716
+ UIDimension["D120"] = "d120";
1717
+ UIDimension["D110"] = "d110";
1718
+ UIDimension["D100"] = "d100";
1719
+ UIDimension["D90"] = "d90";
1720
+ UIDimension["D80"] = "d80";
1721
+ UIDimension["D72"] = "d72";
1722
+ UIDimension["D64"] = "d64";
1723
+ UIDimension["D60"] = "d60";
1724
+ UIDimension["D56"] = "d56";
1725
+ UIDimension["D48"] = "d48";
1726
+ UIDimension["D42"] = "d42";
1727
+ UIDimension["D40"] = "d40";
1728
+ UIDimension["D36"] = "d36";
1729
+ UIDimension["D32"] = "d32";
1730
+ UIDimension["D30"] = "d30";
1731
+ UIDimension["D28"] = "d28";
1732
+ UIDimension["D26"] = "d26";
1733
+ UIDimension["D24"] = "d24";
1734
+ UIDimension["D22"] = "d22";
1735
+ UIDimension["D20"] = "d20";
1736
+ UIDimension["D18"] = "d18";
1737
+ UIDimension["D16"] = "d16";
1738
+ UIDimension["D14"] = "d14";
1739
+ UIDimension["D12"] = "d12";
1740
+ UIDimension["D10"] = "d10";
1741
+ UIDimension["D8"] = "d8";
1742
+ UIDimension["D5"] = "d5";
1743
+ UIDimension["D4"] = "d4";
1744
+ UIDimension["D3"] = "d3";
1745
+ UIDimension["D2"] = "d2";
1746
+ UIDimension["D1"] = "d1";
1747
+ })(UIDimension || (UIDimension = {}));
1748
+
1749
+ const dimensionMapping = {
1750
+ // Percentage values
1751
+ [UIDimension.P100]: '100%',
1752
+ [UIDimension.P90]: '90%',
1753
+ [UIDimension.P80]: '80%',
1754
+ [UIDimension.P70]: '70%',
1755
+ [UIDimension.P60]: '60%',
1756
+ [UIDimension.P50]: '50%',
1757
+ [UIDimension.P40]: '40%',
1758
+ [UIDimension.P30]: '30%',
1759
+ [UIDimension.P20]: '20%',
1760
+ [UIDimension.P10]: '10%',
1761
+ // Pixel values
1762
+ [UIDimension.D180]: '180px',
1763
+ [UIDimension.D150]: '150px',
1764
+ [UIDimension.D120]: '120px',
1765
+ [UIDimension.D110]: '110px',
1766
+ [UIDimension.D100]: '100px',
1767
+ [UIDimension.D90]: '90px',
1768
+ [UIDimension.D80]: '80px',
1769
+ [UIDimension.D72]: '72px',
1770
+ [UIDimension.D64]: '64px',
1771
+ [UIDimension.D60]: '60px',
1772
+ [UIDimension.D56]: '56px',
1773
+ [UIDimension.D48]: '48px',
1774
+ [UIDimension.D42]: '42px',
1775
+ [UIDimension.D40]: '40px',
1776
+ [UIDimension.D36]: '36px',
1777
+ [UIDimension.D32]: '32px',
1778
+ [UIDimension.D30]: '30px',
1779
+ [UIDimension.D28]: '28px',
1780
+ [UIDimension.D26]: '26px',
1781
+ [UIDimension.D24]: '24px',
1782
+ [UIDimension.D22]: '22px',
1783
+ [UIDimension.D20]: '20px',
1784
+ [UIDimension.D18]: '18px',
1785
+ [UIDimension.D16]: '16px',
1786
+ [UIDimension.D14]: '14px',
1787
+ [UIDimension.D12]: '12px',
1788
+ [UIDimension.D10]: '10px',
1789
+ [UIDimension.D8]: '8px',
1790
+ [UIDimension.D5]: '5px',
1791
+ [UIDimension.D4]: '4px',
1792
+ [UIDimension.D3]: '3px',
1793
+ [UIDimension.D2]: '2px',
1794
+ [UIDimension.D1]: '1px',
1795
+ };
1796
+
1797
+ var UIShadowOffset;
1798
+ (function (UIShadowOffset) {
1799
+ UIShadowOffset["S1"] = "s1";
1800
+ })(UIShadowOffset || (UIShadowOffset = {}));
1801
+
1802
+ var UIShadowBlurRadius;
1803
+ (function (UIShadowBlurRadius) {
1804
+ UIShadowBlurRadius["B1"] = "b1";
1805
+ })(UIShadowBlurRadius || (UIShadowBlurRadius = {}));
1806
+
1807
+ const shadowOffsetMapping = {
1808
+ [UIShadowOffset.S1]: '1px',
1809
+ };
1810
+ const shadowBlurRadiusMapping = {
1811
+ [UIShadowBlurRadius.B1]: '3px',
1812
+ };
1813
+
1814
+ var UIJustify;
1815
+ (function (UIJustify) {
1816
+ UIJustify["START"] = "start";
1817
+ UIJustify["CENTER"] = "center";
1818
+ UIJustify["END"] = "end";
1819
+ UIJustify["BETWEEN"] = "space-between";
1820
+ UIJustify["EVENLY"] = "space-evenly";
1821
+ })(UIJustify || (UIJustify = {}));
1822
+
1823
+ const justifyMapping = {
1824
+ [UIJustify.START]: 'flex-start',
1825
+ [UIJustify.CENTER]: 'center',
1826
+ [UIJustify.END]: 'flex-end',
1827
+ [UIJustify.BETWEEN]: 'space-between',
1828
+ [UIJustify.EVENLY]: 'space-evenly',
1829
+ };
1830
+
1831
+ class UIViewDirective {
1832
+ constructor(elementRef, renderer, router, actionService, screenViewModel) {
1833
+ this.elementRef = elementRef;
1834
+ this.renderer = renderer;
1835
+ this.router = router;
1836
+ this.actionService = actionService;
1837
+ this.screenViewModel = screenViewModel;
1838
+ this.disableClick = false;
1839
+ }
1840
+ ngOnChanges(changes) {
1841
+ if (this.edmSduiView) {
1842
+ this.applyStyles(this.edmSduiView);
1843
+ }
1844
+ }
1845
+ applyStyles(uiView) {
1846
+ if (uiView.padding) {
1847
+ this.applyPadding(uiView.padding);
1848
+ }
1849
+ if (uiView.background) {
1850
+ this.applyBackground(uiView.background);
1851
+ }
1852
+ if (uiView.action) {
1853
+ this.applyAction(uiView.action);
1854
+ }
1855
+ if (uiView.alignment) {
1856
+ this.applyAlignment(uiView.alignment);
1857
+ }
1858
+ if (uiView.shadow) {
1859
+ this.applyShadow(uiView.shadow);
1860
+ }
1861
+ if (uiView.radius) {
1862
+ this.applyRadius(uiView.radius);
1863
+ }
1864
+ if (uiView.spacing) {
1865
+ this.applySpacing(uiView.spacing);
1866
+ }
1867
+ if (uiView.height) {
1868
+ this.applyHeight(uiView.height);
1869
+ }
1870
+ if (uiView.width) {
1871
+ this.applyWidth(uiView.width);
1872
+ }
1873
+ if (uiView.borderWidth) {
1874
+ this.applyBorderWidth(uiView.borderWidth);
1875
+ }
1876
+ if (uiView.borderColor) {
1877
+ this.applyBorderColor(uiView.borderColor);
1878
+ }
1879
+ if (uiView.justify) {
1880
+ this.applyJustify(uiView.justify);
1881
+ }
1882
+ }
1883
+ applyPadding(uiPadding) {
1884
+ if (uiPadding.top) {
1885
+ const padValue = padMapping[uiPadding.top];
1886
+ this.renderer.setStyle(this.elementRef.nativeElement, 'padding-top', padValue);
1887
+ }
1888
+ if (uiPadding.left) {
1889
+ const padValue = padMapping[uiPadding.left];
1890
+ this.renderer.setStyle(this.elementRef.nativeElement, 'padding-left', padValue);
1891
+ }
1892
+ if (uiPadding.right) {
1893
+ const padValue = padMapping[uiPadding.right];
1894
+ this.renderer.setStyle(this.elementRef.nativeElement, 'padding-right', padValue);
1895
+ }
1896
+ if (uiPadding.bottom) {
1897
+ const padValue = padMapping[uiPadding.bottom];
1898
+ this.renderer.setStyle(this.elementRef.nativeElement, 'padding-bottom', padValue);
1899
+ }
1900
+ }
1901
+ applyBackground(uiBackground) {
1902
+ if (uiBackground.backgroundColor) {
1903
+ const backgroundColor = colorMapping[uiBackground.backgroundColor];
1904
+ this.renderer.setStyle(this.elementRef.nativeElement, 'background-color', backgroundColor);
1905
+ }
1906
+ if (uiBackground.gradientColor1 && uiBackground.gradientColor2) {
1907
+ const gradientColor1 = colorMapping[uiBackground.gradientColor1];
1908
+ const gradientColor2 = colorMapping[uiBackground.gradientColor2];
1909
+ const gradientStyles = `linear-gradient(45deg, ${gradientColor1}, ${gradientColor2})`;
1910
+ console.log(gradientColor1, gradientColor2, gradientStyles);
1911
+ this.renderer.setStyle(this.elementRef.nativeElement, 'background', gradientStyles);
1912
+ }
1913
+ }
1914
+ applyAction(uiAction) {
1915
+ if (this.disableClick) {
1916
+ return;
1917
+ }
1918
+ this.renderer.setStyle(this.elementRef.nativeElement, 'cursor', 'pointer');
1919
+ }
1920
+ applyAlignment(uiAlignment) {
1921
+ if (uiAlignment.alignment) {
1922
+ // console.debug('alignment:', uiAlignment.alignment);
1923
+ const alignment = alignmentMapping[uiAlignment.alignment];
1924
+ this.renderer.setStyle(this.elementRef.nativeElement, 'align-items', alignment);
1925
+ }
1926
+ }
1927
+ applyShadow(uiShadow) {
1928
+ if (uiShadow.color && uiShadow.offsetX && uiShadow.offsetY && uiShadow.blurRadius) {
1929
+ const color = colorMapping[uiShadow.color];
1930
+ const offsetX = shadowOffsetMapping[uiShadow.offsetX];
1931
+ const offsetY = shadowOffsetMapping[uiShadow.offsetY];
1932
+ const blurRadius = shadowBlurRadiusMapping[uiShadow.blurRadius];
1933
+ const opacity = uiShadow.opacity !== undefined ? uiShadow.opacity : 1;
1934
+ // Format: box-shadow: offsetX offsetY blurRadius color
1935
+ const shadowValue = `${offsetX} ${offsetY} ${blurRadius} ${color}`;
1936
+ this.renderer.setStyle(this.elementRef.nativeElement, 'box-shadow', shadowValue);
1937
+ if (opacity !== 1) {
1938
+ this.renderer.setStyle(this.elementRef.nativeElement, 'opacity', opacity.toString());
1939
+ }
1940
+ }
1941
+ }
1942
+ applyRadius(uiRadius) {
1943
+ if (uiRadius.topLeft) {
1944
+ const radius = radiusMapping[uiRadius.topLeft];
1945
+ this.renderer.setStyle(this.elementRef.nativeElement, 'border-top-left-radius', radius);
1946
+ }
1947
+ if (uiRadius.topRight) {
1948
+ const radius = radiusMapping[uiRadius.topRight];
1949
+ this.renderer.setStyle(this.elementRef.nativeElement, 'border-top-right-radius', radius);
1950
+ }
1951
+ if (uiRadius.bottomLeft) {
1952
+ const radius = radiusMapping[uiRadius.bottomLeft];
1953
+ this.renderer.setStyle(this.elementRef.nativeElement, 'border-bottom-left-radius', radius);
1954
+ }
1955
+ if (uiRadius.bottomRight) {
1956
+ const radius = radiusMapping[uiRadius.bottomRight];
1957
+ this.renderer.setStyle(this.elementRef.nativeElement, 'border-bottom-right-radius', radius);
1958
+ }
1959
+ }
1960
+ applySpacing(uiSpacing) {
1961
+ if (uiSpacing.spacing) {
1962
+ const spacingValue = spaceMapping[uiSpacing.spacing];
1963
+ this.renderer.setStyle(this.elementRef.nativeElement, 'gap', spacingValue);
1964
+ }
1965
+ }
1966
+ applyHeight(height) {
1967
+ if (height) {
1968
+ const heightValue = dimensionMapping[height];
1969
+ this.renderer.setStyle(this.elementRef.nativeElement, 'height', heightValue);
1970
+ }
1971
+ }
1972
+ applyWidth(width) {
1973
+ if (width) {
1974
+ const widthValue = dimensionMapping[width];
1975
+ this.renderer.setStyle(this.elementRef.nativeElement, 'width', widthValue);
1976
+ }
1977
+ }
1978
+ applyBorderWidth(borderWidth) {
1979
+ if (borderWidth !== null && borderWidth !== undefined) {
1980
+ this.renderer.setStyle(this.elementRef.nativeElement, 'border-width', `${borderWidth}px`);
1981
+ // Ensure border style is set, otherwise border-width won't be visible
1982
+ this.renderer.setStyle(this.elementRef.nativeElement, 'border-style', 'solid');
1983
+ }
1984
+ }
1985
+ applyBorderColor(borderColor) {
1986
+ if (borderColor) {
1987
+ const color = colorMapping[borderColor];
1988
+ this.renderer.setStyle(this.elementRef.nativeElement, 'border-color', color);
1989
+ }
1990
+ }
1991
+ applyJustify(justify) {
1992
+ if (justify) {
1993
+ const justifyValue = justifyMapping[justify];
1994
+ this.renderer.setStyle(this.elementRef.nativeElement, 'justify-content', justifyValue);
1995
+ }
1996
+ }
1997
+ onClick(event) {
1998
+ if (this.disableClick)
1999
+ return;
2000
+ if (this.edmSduiView?.action) {
2001
+ event.stopPropagation();
2002
+ this.actionService.execute(this.edmSduiView.action);
2003
+ }
2004
+ }
2005
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: UIViewDirective, deps: [{ token: i0.ElementRef }, { token: i0.Renderer2 }, { token: i1$3.Router }, { token: UIActionService }, { token: UIScreenViewModel, optional: true }], target: i0.ɵɵFactoryTarget.Directive }); }
2006
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.2.13", type: UIViewDirective, selector: "[edmSduiView]", inputs: { edmSduiView: "edmSduiView", disableClick: "disableClick" }, host: { listeners: { "click": "onClick($event)" } }, usesOnChanges: true, ngImport: i0 }); }
2007
+ }
2008
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: UIViewDirective, decorators: [{
2009
+ type: Directive,
2010
+ args: [{
2011
+ selector: '[edmSduiView]',
2012
+ standalone: false,
2013
+ }]
2014
+ }], ctorParameters: () => [{ type: i0.ElementRef }, { type: i0.Renderer2 }, { type: i1$3.Router }, { type: UIActionService }, { type: UIScreenViewModel, decorators: [{
2015
+ type: Optional
2016
+ }] }], propDecorators: { edmSduiView: [{
2017
+ type: Input
2018
+ }], disableClick: [{
2019
+ type: Input
2020
+ }], onClick: [{
2021
+ type: HostListener,
2022
+ args: ['click', ['$event']]
2023
+ }] } });
2024
+
2025
+ class FabComponent {
2026
+ constructor(actionService, render2) {
2027
+ this.actionService = actionService;
2028
+ this.render2 = render2;
2029
+ }
2030
+ ngAfterViewInit() {
2031
+ if (this.element) {
2032
+ this.applyElement(this.element);
2033
+ }
2034
+ }
2035
+ applyElement(element) {
2036
+ if (element.asset) {
2037
+ const asset = assetMapping[element.asset];
2038
+ this.render2.setAttribute(this.imgElement.nativeElement, 'src', asset);
2039
+ }
2040
+ }
2041
+ onClick() {
2042
+ if (this.element?.action) {
2043
+ this.actionService.execute(this.element.action);
2044
+ }
2045
+ }
2046
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: FabComponent, deps: [{ token: UIActionService }, { token: i0.Renderer2 }], target: i0.ɵɵFactoryTarget.Component }); }
2047
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.13", type: FabComponent, selector: "sdui-fab", inputs: { element: "element" }, viewQueries: [{ propertyName: "imgElement", first: true, predicate: ["imgElement"], descendants: true }], ngImport: i0, template: "<button\n class=\"edm-fab\"\n (click)=\"onClick()\"\n [edmSduiView]=\"element\"\n>\n <img\n #imgElement\n *ngIf=\"element?.asset\"\n class=\"fab-icon\"\n />\n\n</button>\n", styles: [":host{display:contents}.edm-fab{width:64px;height:64px;min-width:64px;min-height:64px;display:flex;align-items:center;justify-content:center;border:none;cursor:pointer;box-shadow:0 6px 20px #00000040;transition:all .2s ease-in-out;z-index:9999999;background:none}.edm-fab:hover{transform:scale(1.05);box-shadow:0 8px 24px #00000059}\n"], dependencies: [{ kind: "directive", type: i1$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: UIViewDirective, selector: "[edmSduiView]", inputs: ["edmSduiView", "disableClick"] }] }); }
2048
+ }
2049
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: FabComponent, decorators: [{
2050
+ type: Component,
2051
+ args: [{ selector: 'sdui-fab', standalone: false, template: "<button\n class=\"edm-fab\"\n (click)=\"onClick()\"\n [edmSduiView]=\"element\"\n>\n <img\n #imgElement\n *ngIf=\"element?.asset\"\n class=\"fab-icon\"\n />\n\n</button>\n", styles: [":host{display:contents}.edm-fab{width:64px;height:64px;min-width:64px;min-height:64px;display:flex;align-items:center;justify-content:center;border:none;cursor:pointer;box-shadow:0 6px 20px #00000040;transition:all .2s ease-in-out;z-index:9999999;background:none}.edm-fab:hover{transform:scale(1.05);box-shadow:0 8px 24px #00000059}\n"] }]
2052
+ }], ctorParameters: () => [{ type: UIActionService }, { type: i0.Renderer2 }], propDecorators: { element: [{
2053
+ type: Input,
2054
+ args: [{ required: true }]
2055
+ }], imgElement: [{
2056
+ type: ViewChild,
2057
+ args: ['imgElement']
2058
+ }] } });
2059
+
2060
+ class SingleColumnLayoutComponent {
2061
+ ngOnChanges(changes) {
2062
+ if (changes['uiLayout']) {
2063
+ console.debug('[SingleColumnLayout] Novo layout recebido:', changes['uiLayout'].currentValue);
2064
+ }
2065
+ }
2066
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: SingleColumnLayoutComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
2067
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.13", type: SingleColumnLayoutComponent, selector: "edm-sdui-single-column-layout", inputs: { uiLayout: "uiLayout" }, usesOnChanges: true, ngImport: i0, template: "<div class=\"single-column-layout\" *ngIf=\"!!uiLayout\">\n <!-- <pre>{{ uiLayout | json }}</pre> -->\n\n <edm-sdui-navigation [uiNavigation]=\"uiLayout.nav\"></edm-sdui-navigation>\n\n <div class=\"header\" *ngIf=\"!!uiLayout?.header\">\n <edm-sdui-component [uiComponent]=\"uiLayout.header\"></edm-sdui-component>\n </div>\n\n <div class=\"scrollview\" *ngIf=\"!!uiLayout?.main\">\n <div class=\"main\">\n <edm-sdui-component\n *ngIf=\"!!uiLayout?.main\"\n [uiComponent]=\"uiLayout.main\"\n ></edm-sdui-component>\n </div>\n </div>\n <div class=\"fab\" *ngIf=\"!!uiLayout?.fab\">\n <sdui-fab [element]=\"uiLayout.fab\"></sdui-fab>\n </div>\n <div class=\"footer\" *ngIf=\"!!uiLayout?.footer\">\n <edm-sdui-component [uiComponent]=\"uiLayout.footer\"></edm-sdui-component>\n </div>\n</div>\n", styles: [":host{display:contents}.single-column-layout{display:flex;flex-direction:column;width:100%;min-height:100vh;position:relative}.single-column-layout .header{width:100%;z-index:100}.single-column-layout .scrollview .main{flex:1;display:flex;align-items:center;justify-content:center}.single-column-layout .footer{position:fixed;bottom:0;left:0;width:100%;z-index:100}.single-column-layout .fab{position:fixed;bottom:16px;right:16px;width:64px;z-index:10000}\n"], dependencies: [{ kind: "directive", type: i1$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: UINavigationComponent, selector: "edm-sdui-navigation", inputs: ["uiNavigation"] }, { kind: "component", type: FabComponent, selector: "sdui-fab", inputs: ["element"] }, { kind: "component", type: UIComponentComponent, selector: "edm-sdui-component", inputs: ["uiComponent", "translateLabel"] }] }); }
2068
+ }
2069
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: SingleColumnLayoutComponent, decorators: [{
2070
+ type: Component,
2071
+ args: [{ selector: 'edm-sdui-single-column-layout', standalone: false, template: "<div class=\"single-column-layout\" *ngIf=\"!!uiLayout\">\n <!-- <pre>{{ uiLayout | json }}</pre> -->\n\n <edm-sdui-navigation [uiNavigation]=\"uiLayout.nav\"></edm-sdui-navigation>\n\n <div class=\"header\" *ngIf=\"!!uiLayout?.header\">\n <edm-sdui-component [uiComponent]=\"uiLayout.header\"></edm-sdui-component>\n </div>\n\n <div class=\"scrollview\" *ngIf=\"!!uiLayout?.main\">\n <div class=\"main\">\n <edm-sdui-component\n *ngIf=\"!!uiLayout?.main\"\n [uiComponent]=\"uiLayout.main\"\n ></edm-sdui-component>\n </div>\n </div>\n <div class=\"fab\" *ngIf=\"!!uiLayout?.fab\">\n <sdui-fab [element]=\"uiLayout.fab\"></sdui-fab>\n </div>\n <div class=\"footer\" *ngIf=\"!!uiLayout?.footer\">\n <edm-sdui-component [uiComponent]=\"uiLayout.footer\"></edm-sdui-component>\n </div>\n</div>\n", styles: [":host{display:contents}.single-column-layout{display:flex;flex-direction:column;width:100%;min-height:100vh;position:relative}.single-column-layout .header{width:100%;z-index:100}.single-column-layout .scrollview .main{flex:1;display:flex;align-items:center;justify-content:center}.single-column-layout .footer{position:fixed;bottom:0;left:0;width:100%;z-index:100}.single-column-layout .fab{position:fixed;bottom:16px;right:16px;width:64px;z-index:10000}\n"] }]
2072
+ }], propDecorators: { uiLayout: [{
2073
+ type: Input
2074
+ }] } });
2075
+
2076
+ class CenteredContentLayoutComponent {
2077
+ ngOnInit() {
2078
+ console.log(this.uiLayout);
2079
+ }
2080
+ ngOnChanges(changes) {
2081
+ if (changes['uiLayout']) {
2082
+ console.debug('[CenteredContentLayoutComponent] Novo layout recebido:', changes['uiLayout'].currentValue);
2083
+ }
2084
+ }
2085
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: CenteredContentLayoutComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
2086
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.13", type: CenteredContentLayoutComponent, selector: "edm-sdui-centered-content-layout", inputs: { uiLayout: "uiLayout" }, usesOnChanges: true, ngImport: i0, template: "<div class=\"centered-content-layout\" *ngIf=\"!!uiLayout\">\n <!-- <pre>{{ uiLayout | json }}</pre> -->\n\n <edm-sdui-navigation [uiNavigation]=\"uiLayout.nav\"></edm-sdui-navigation>\n\n <div class=\"header\" *ngIf=\"uiLayout?.header\">\n <edm-sdui-component [uiComponent]=\"uiLayout.header\"></edm-sdui-component>\n </div>\n\n <div class=\"centered\">\n <edm-sdui-component\n *ngIf=\"!!uiLayout?.centered\"\n [uiComponent]=\"uiLayout.centered\"\n ></edm-sdui-component>\n </div>\n\n <div class=\"footer\" *ngIf=\"!!uiLayout?.footer\">\n <edm-sdui-component [uiComponent]=\"uiLayout.footer\"></edm-sdui-component>\n </div>\n</div>\n", styles: [":host{display:contents}.centered-content-layout{display:flex;flex-direction:column;width:100vw;min-height:100vh;position:relative}.centered-content-layout .header{width:100%;z-index:100}.centered-content-layout .centered{flex:1;display:flex;align-items:center;justify-content:center}.centered-content-layout .footer{position:fixed;bottom:0;left:0;width:100%;z-index:100}\n"], dependencies: [{ kind: "directive", type: i1$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: UINavigationComponent, selector: "edm-sdui-navigation", inputs: ["uiNavigation"] }, { kind: "component", type: UIComponentComponent, selector: "edm-sdui-component", inputs: ["uiComponent", "translateLabel"] }] }); }
2087
+ }
2088
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: CenteredContentLayoutComponent, decorators: [{
2089
+ type: Component,
2090
+ args: [{ selector: 'edm-sdui-centered-content-layout', standalone: false, template: "<div class=\"centered-content-layout\" *ngIf=\"!!uiLayout\">\n <!-- <pre>{{ uiLayout | json }}</pre> -->\n\n <edm-sdui-navigation [uiNavigation]=\"uiLayout.nav\"></edm-sdui-navigation>\n\n <div class=\"header\" *ngIf=\"uiLayout?.header\">\n <edm-sdui-component [uiComponent]=\"uiLayout.header\"></edm-sdui-component>\n </div>\n\n <div class=\"centered\">\n <edm-sdui-component\n *ngIf=\"!!uiLayout?.centered\"\n [uiComponent]=\"uiLayout.centered\"\n ></edm-sdui-component>\n </div>\n\n <div class=\"footer\" *ngIf=\"!!uiLayout?.footer\">\n <edm-sdui-component [uiComponent]=\"uiLayout.footer\"></edm-sdui-component>\n </div>\n</div>\n", styles: [":host{display:contents}.centered-content-layout{display:flex;flex-direction:column;width:100vw;min-height:100vh;position:relative}.centered-content-layout .header{width:100%;z-index:100}.centered-content-layout .centered{flex:1;display:flex;align-items:center;justify-content:center}.centered-content-layout .footer{position:fixed;bottom:0;left:0;width:100%;z-index:100}\n"] }]
2091
+ }], propDecorators: { uiLayout: [{
2092
+ type: Input
2093
+ }] } });
2094
+
2095
+ class NavigationControlsComponent {
2096
+ constructor(viewModel) {
2097
+ this.viewModel = viewModel;
2098
+ }
2099
+ ngOnInit() {
2100
+ // Monitorar o estado do botão de voltar para debugging
2101
+ this.viewModel.canGoBack$.subscribe((canGoBack) => {
2102
+ console.debug('[NavigationControls] Estado do botão de voltar:', canGoBack);
2103
+ });
2104
+ }
2105
+ goBack() {
2106
+ console.debug('[NavigationControls] Botão de voltar clicado');
2107
+ this.viewModel.goBack();
2108
+ }
2109
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: NavigationControlsComponent, deps: [{ token: UIScreenViewModel }], target: i0.ɵɵFactoryTarget.Component }); }
2110
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.13", type: NavigationControlsComponent, selector: "edm-sdui-navigation-controls", ngImport: i0, template: "<div class=\"navigation-controls\" *ngIf=\"false\">\n <button\n class=\"back-button\"\n [disabled]=\"!(viewModel.canGoBack$ | async)\"\n (click)=\"goBack()\"\n >\n <img src=\"assets/images/bt-back.svg\" width=\"100%\" height=\"40px\"/>\n </button>\n</div>\n", styles: [":host{display:contents}.navigation-controls{display:flex;gap:8px}.navigation-controls button{display:flex;align-items:center;justify-content:center;padding:0;border-radius:4px;cursor:pointer;transition:all .2s ease}.navigation-controls button:hover:not(:disabled){background-color:#e8e8e8}.navigation-controls button:disabled{opacity:.5;cursor:not-allowed}\n"], dependencies: [{ kind: "directive", type: i1$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "pipe", type: i1$1.AsyncPipe, name: "async" }] }); }
2111
+ }
2112
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: NavigationControlsComponent, decorators: [{
2113
+ type: Component,
2114
+ args: [{ selector: 'edm-sdui-navigation-controls', standalone: false, template: "<div class=\"navigation-controls\" *ngIf=\"false\">\n <button\n class=\"back-button\"\n [disabled]=\"!(viewModel.canGoBack$ | async)\"\n (click)=\"goBack()\"\n >\n <img src=\"assets/images/bt-back.svg\" width=\"100%\" height=\"40px\"/>\n </button>\n</div>\n", styles: [":host{display:contents}.navigation-controls{display:flex;gap:8px}.navigation-controls button{display:flex;align-items:center;justify-content:center;padding:0;border-radius:4px;cursor:pointer;transition:all .2s ease}.navigation-controls button:hover:not(:disabled){background-color:#e8e8e8}.navigation-controls button:disabled{opacity:.5;cursor:not-allowed}\n"] }]
2115
+ }], ctorParameters: () => [{ type: UIScreenViewModel }] });
2116
+
2117
+ class UIScreenComponent {
2118
+ constructor(viewModel) {
2119
+ this.viewModel = viewModel;
2120
+ this.UIScreenIdentifier = UIScreenIdentifier;
2121
+ }
2122
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: UIScreenComponent, deps: [{ token: UIScreenViewModel }], target: i0.ɵɵFactoryTarget.Component }); }
2123
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.13", type: UIScreenComponent, selector: "edm-sdui-uiscreen", ngImport: i0, template: "<ng-container *ngIf=\"viewModel.isLoading$ | async; else loaded\">\n <div class=\"loading-spinner\">\n <div class=\"spinner\"></div>\n </div>\n</ng-container>\n\n<ng-template #loaded>\n <ng-container\n *ngIf=\"viewModel.error$ | async as errorMessage; else renderScreen\"\n >\n <div class=\"error-label\">\n Erro ao carregar a tela:\n <pre>{{ errorMessage }}</pre>\n </div>\n </ng-container>\n\n <ng-template #renderScreen>\n <div\n class=\"ui-screen\"\n *ngIf=\"viewModel.uiScreen$ | async as uiScreen\"\n [edmSduiView]=\"uiScreen\"\n >\n <edm-sdui-navigation-controls\n [edmSduiView]=\"uiScreen\"\n ></edm-sdui-navigation-controls>\n\n <ng-container [ngSwitch]=\"uiScreen.identifier\">\n <edm-sdui-single-column-layout\n *ngSwitchCase=\"UIScreenIdentifier.SINGLE_COLUMN\"\n [uiLayout]=\"uiScreen.content\"\n ></edm-sdui-single-column-layout>\n\n <edm-sdui-centered-content-layout\n *ngSwitchCase=\"UIScreenIdentifier.CENTERED_CONTENT\"\n [uiLayout]=\"uiScreen.content\"\n ></edm-sdui-centered-content-layout>\n </ng-container>\n </div>\n </ng-template>\n</ng-template>\n", styles: [":host{display:contents}.ui-screen{width:100vw;min-height:100vh}.error-label{color:var(--input-error)}.loading-spinner{display:flex;justify-content:center;align-items:center;height:100vh;width:100vw;box-sizing:border-box;position:relative}.spinner{width:48px;height:48px;border:5px solid var(--actindcolor);border-top-color:#333;border-radius:50%;animation:spin 1s linear infinite;top:50%;left:50%}@keyframes spin{to{transform:rotate(360deg)}}\n"], dependencies: [{ kind: "directive", type: i1$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1$1.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { kind: "directive", type: i1$1.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { kind: "component", type: SingleColumnLayoutComponent, selector: "edm-sdui-single-column-layout", inputs: ["uiLayout"] }, { kind: "component", type: CenteredContentLayoutComponent, selector: "edm-sdui-centered-content-layout", inputs: ["uiLayout"] }, { kind: "directive", type: UIViewDirective, selector: "[edmSduiView]", inputs: ["edmSduiView", "disableClick"] }, { kind: "component", type: NavigationControlsComponent, selector: "edm-sdui-navigation-controls" }, { kind: "pipe", type: i1$1.AsyncPipe, name: "async" }] }); }
2124
+ }
2125
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: UIScreenComponent, decorators: [{
2126
+ type: Component,
2127
+ args: [{ selector: 'edm-sdui-uiscreen', standalone: false, template: "<ng-container *ngIf=\"viewModel.isLoading$ | async; else loaded\">\n <div class=\"loading-spinner\">\n <div class=\"spinner\"></div>\n </div>\n</ng-container>\n\n<ng-template #loaded>\n <ng-container\n *ngIf=\"viewModel.error$ | async as errorMessage; else renderScreen\"\n >\n <div class=\"error-label\">\n Erro ao carregar a tela:\n <pre>{{ errorMessage }}</pre>\n </div>\n </ng-container>\n\n <ng-template #renderScreen>\n <div\n class=\"ui-screen\"\n *ngIf=\"viewModel.uiScreen$ | async as uiScreen\"\n [edmSduiView]=\"uiScreen\"\n >\n <edm-sdui-navigation-controls\n [edmSduiView]=\"uiScreen\"\n ></edm-sdui-navigation-controls>\n\n <ng-container [ngSwitch]=\"uiScreen.identifier\">\n <edm-sdui-single-column-layout\n *ngSwitchCase=\"UIScreenIdentifier.SINGLE_COLUMN\"\n [uiLayout]=\"uiScreen.content\"\n ></edm-sdui-single-column-layout>\n\n <edm-sdui-centered-content-layout\n *ngSwitchCase=\"UIScreenIdentifier.CENTERED_CONTENT\"\n [uiLayout]=\"uiScreen.content\"\n ></edm-sdui-centered-content-layout>\n </ng-container>\n </div>\n </ng-template>\n</ng-template>\n", styles: [":host{display:contents}.ui-screen{width:100vw;min-height:100vh}.error-label{color:var(--input-error)}.loading-spinner{display:flex;justify-content:center;align-items:center;height:100vh;width:100vw;box-sizing:border-box;position:relative}.spinner{width:48px;height:48px;border:5px solid var(--actindcolor);border-top-color:#333;border-radius:50%;animation:spin 1s linear infinite;top:50%;left:50%}@keyframes spin{to{transform:rotate(360deg)}}\n"] }]
2128
+ }], ctorParameters: () => [{ type: UIScreenViewModel }] });
2129
+
2130
+ class RowComponent {
2131
+ constructor(uiComponent) {
2132
+ this.uiComponent = uiComponent;
2133
+ }
2134
+ ngOnInit() {
2135
+ }
2136
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: RowComponent, deps: [{ token: 'uiComponent' }], target: i0.ɵɵFactoryTarget.Component }); }
2137
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.13", type: RowComponent, selector: "edm-sdui-row", ngImport: i0, template: "<div class=\"row-1\" *ngIf=\"uiComponent\" [edmSduiView]=\"uiComponent.element\">\n <edm-sdui-component\n *ngFor=\"let component of uiComponent.components\"\n [uiComponent]=\"component\"\n >\n </edm-sdui-component>\n</div>\n", styles: [":host{display:contents}.row-1{display:flex;flex-direction:row;align-items:center}\n"], dependencies: [{ kind: "directive", type: i1$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: UIComponentComponent, selector: "edm-sdui-component", inputs: ["uiComponent", "translateLabel"] }, { kind: "directive", type: UIViewDirective, selector: "[edmSduiView]", inputs: ["edmSduiView", "disableClick"] }] }); }
2138
+ }
2139
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: RowComponent, decorators: [{
2140
+ type: Component,
2141
+ args: [{ selector: 'edm-sdui-row', standalone: false, template: "<div class=\"row-1\" *ngIf=\"uiComponent\" [edmSduiView]=\"uiComponent.element\">\n <edm-sdui-component\n *ngFor=\"let component of uiComponent.components\"\n [uiComponent]=\"component\"\n >\n </edm-sdui-component>\n</div>\n", styles: [":host{display:contents}.row-1{display:flex;flex-direction:row;align-items:center}\n"] }]
2142
+ }], ctorParameters: () => [{ type: undefined, decorators: [{
2143
+ type: Inject,
2144
+ args: ['uiComponent']
2145
+ }] }] });
2146
+
2147
+ var row_component = /*#__PURE__*/Object.freeze({
2148
+ __proto__: null,
2149
+ RowComponent: RowComponent
2150
+ });
2151
+
2152
+ class ColumnComponent {
2153
+ constructor(uiComponent) {
2154
+ this.uiComponent = uiComponent;
2155
+ }
2156
+ ngOnInit() {
2157
+ // console.debug('column.uiComponent: ', this.uiComponent);
2158
+ }
2159
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: ColumnComponent, deps: [{ token: 'uiComponent' }], target: i0.ɵɵFactoryTarget.Component }); }
2160
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.13", type: ColumnComponent, selector: "edm-sdui-column", ngImport: i0, template: "<div class=\"column\" *ngIf=\"uiComponent\" [edmSduiView]=\"uiComponent.element\">\n <edm-sdui-component\n *ngFor=\"let child of uiComponent.components\"\n [uiComponent]=\"child\"\n >\n </edm-sdui-component>\n</div>\n", styles: [":host{display:contents}.column{display:flex;flex-direction:column}\n"], dependencies: [{ kind: "directive", type: i1$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: UIComponentComponent, selector: "edm-sdui-component", inputs: ["uiComponent", "translateLabel"] }, { kind: "directive", type: UIViewDirective, selector: "[edmSduiView]", inputs: ["edmSduiView", "disableClick"] }] }); }
2161
+ }
2162
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: ColumnComponent, decorators: [{
2163
+ type: Component,
2164
+ args: [{ selector: 'edm-sdui-column', standalone: false, template: "<div class=\"column\" *ngIf=\"uiComponent\" [edmSduiView]=\"uiComponent.element\">\n <edm-sdui-component\n *ngFor=\"let child of uiComponent.components\"\n [uiComponent]=\"child\"\n >\n </edm-sdui-component>\n</div>\n", styles: [":host{display:contents}.column{display:flex;flex-direction:column}\n"] }]
2165
+ }], ctorParameters: () => [{ type: undefined, decorators: [{
2166
+ type: Inject,
2167
+ args: ['uiComponent']
2168
+ }] }] });
2169
+
2170
+ var column_component = /*#__PURE__*/Object.freeze({
2171
+ __proto__: null,
2172
+ ColumnComponent: ColumnComponent
2173
+ });
2174
+
2175
+ var UITextStyle;
2176
+ (function (UITextStyle) {
2177
+ UITextStyle["LARGE_TITLE"] = "large_title";
2178
+ UITextStyle["TITLE_1"] = "title_1";
2179
+ UITextStyle["TITLE_2"] = "title_2";
2180
+ UITextStyle["TITLE_3"] = "title_3";
2181
+ UITextStyle["CALLOUT"] = "callout";
2182
+ UITextStyle["HEADLINE"] = "headline";
2183
+ UITextStyle["SUBHEADLINE"] = "subheadline";
2184
+ UITextStyle["BODY"] = "body";
2185
+ UITextStyle["CAPTION_1"] = "caption_1";
2186
+ UITextStyle["CAPTION_2"] = "caption_2";
2187
+ UITextStyle["FOOTNOTE"] = "footnote";
2188
+ })(UITextStyle || (UITextStyle = {}));
2189
+
2190
+ class FontSizeMappingService {
2191
+ constructor() {
2192
+ this.baseFontSize = inject(SDUI_FONT_ADJUST, { optional: true }) ?? 0;
2193
+ this.mapping = {
2194
+ caption_2: `${13 + this.baseFontSize}px`,
2195
+ caption_1: `${14 + this.baseFontSize}px`,
2196
+ body: `${16 + this.baseFontSize}px`,
2197
+ title_2: `${16 + this.baseFontSize}px`,
2198
+ title_1: `${21 + this.baseFontSize}px`,
2199
+ callout: `${19 + this.baseFontSize}px`,
2200
+ headline: `${18 + this.baseFontSize}px`,
2201
+ large_title: `${35 + this.baseFontSize}px`,
2202
+ subheadline: `${16 + this.baseFontSize}px`,
2203
+ footnote: `${12 + this.baseFontSize}px`,
2204
+ };
2205
+ }
2206
+ getMapping() {
2207
+ return this.mapping;
2208
+ }
2209
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: FontSizeMappingService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
2210
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: FontSizeMappingService, providedIn: 'root' }); }
2211
+ }
2212
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: FontSizeMappingService, decorators: [{
2213
+ type: Injectable,
2214
+ args: [{ providedIn: 'root' }]
2215
+ }], ctorParameters: () => [] });
2216
+
2217
+ function getTextStyleMappingFontSize() {
2218
+ return inject(FontSizeMappingService).getMapping();
2219
+ }
2220
+ const textStyleMappingFontWeight = {
2221
+ [UITextStyle.BODY]: 'regular',
2222
+ [UITextStyle.LARGE_TITLE]: 'bold',
2223
+ [UITextStyle.TITLE_1]: 'bold',
2224
+ [UITextStyle.TITLE_2]: 'bold',
2225
+ [UITextStyle.TITLE_3]: 'bold',
2226
+ [UITextStyle.CALLOUT]: 'regular',
2227
+ [UITextStyle.HEADLINE]: 'bold',
2228
+ [UITextStyle.SUBHEADLINE]: 'bold',
2229
+ [UITextStyle.CAPTION_1]: 'regular',
2230
+ [UITextStyle.CAPTION_2]: 'regular',
2231
+ [UITextStyle.FOOTNOTE]: 'regular',
2232
+ };
2233
+ const textStyleMappingLineHeight = {
2234
+ [UITextStyle.BODY]: '18px',
2235
+ [UITextStyle.LARGE_TITLE]: '37px',
2236
+ [UITextStyle.TITLE_1]: '23px',
2237
+ [UITextStyle.TITLE_2]: '23px',
2238
+ [UITextStyle.TITLE_3]: '23px',
2239
+ [UITextStyle.CALLOUT]: '21px',
2240
+ [UITextStyle.HEADLINE]: '20px',
2241
+ [UITextStyle.SUBHEADLINE]: '18px',
2242
+ [UITextStyle.CAPTION_1]: '16px',
2243
+ [UITextStyle.CAPTION_2]: '15px',
2244
+ [UITextStyle.FOOTNOTE]: '14px',
2245
+ };
2246
+
2247
+ class LabelComponent {
2248
+ constructor(uiComponent, renderer, fontSizeMappingService) {
2249
+ this.uiComponent = uiComponent;
2250
+ this.renderer = renderer;
2251
+ this.fontSizeMappingService = fontSizeMappingService;
2252
+ }
2253
+ ngOnInit() {
2254
+ // console.debug('label.uiComponent: ', this.uiComponent);
2255
+ }
2256
+ ngAfterViewInit() {
2257
+ if (this.uiComponent.element) {
2258
+ this.applyElement(this.uiComponent.element);
2259
+ }
2260
+ }
2261
+ applyElement(element) {
2262
+ if (element.textColor) {
2263
+ const color = colorMapping[element.textColor];
2264
+ this.renderer.setStyle(this.spanElementRef.nativeElement, 'color', color);
2265
+ }
2266
+ if (element.textStyle) {
2267
+ const textStyleMappingFontSize = this.fontSizeMappingService.getMapping();
2268
+ const fontSize = textStyleMappingFontSize[element.textStyle];
2269
+ const fontWeight = textStyleMappingFontWeight[element.textStyle];
2270
+ const lineHeight = textStyleMappingLineHeight[element.textStyle];
2271
+ //TODO: Substituir por classe no futuro.
2272
+ this.renderer.setStyle(this.spanElementRef.nativeElement, 'font-weight', fontWeight);
2273
+ this.renderer.setStyle(this.spanElementRef.nativeElement, 'font-size', fontSize);
2274
+ this.renderer.setStyle(this.spanElementRef.nativeElement, 'line-height', lineHeight);
2275
+ }
2276
+ const maxLines = element.maxLines ?? 1;
2277
+ if (element.maxLines) {
2278
+ this.renderer.setStyle(this.spanElementRef.nativeElement, 'display', '-webkit-box');
2279
+ this.renderer.setStyle(this.spanElementRef.nativeElement, '-webkit-box-orient', 'vertical');
2280
+ this.renderer.setStyle(this.spanElementRef.nativeElement, 'overflow', 'hidden');
2281
+ this.renderer.setStyle(this.spanElementRef.nativeElement, 'text-overflow', 'ellipsis');
2282
+ this.renderer.setStyle(this.spanElementRef.nativeElement, '-webkit-line-clamp', maxLines);
2283
+ }
2284
+ if (element.opacity) {
2285
+ const opacity = element.opacity;
2286
+ this.renderer.setStyle(this.spanElementRef.nativeElement, 'opacity', opacity);
2287
+ }
2288
+ if (element.alignment) {
2289
+ const alignment = element.alignment.alignment;
2290
+ switch (alignment) {
2291
+ case UIAlignmentType.START: {
2292
+ this.renderer.setStyle(this.spanElementRef.nativeElement, 'text-align', 'left');
2293
+ break;
2294
+ }
2295
+ case UIAlignmentType.CENTER: {
2296
+ this.renderer.setStyle(this.spanElementRef.nativeElement, 'text-align', 'center');
2297
+ break;
2298
+ }
2299
+ case UIAlignmentType.END: {
2300
+ this.renderer.setStyle(this.spanElementRef.nativeElement, 'text-align', 'right');
2301
+ break;
2302
+ }
2303
+ }
2304
+ }
2305
+ }
2306
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: LabelComponent, deps: [{ token: 'uiComponent' }, { token: i0.Renderer2 }, { token: FontSizeMappingService }], target: i0.ɵɵFactoryTarget.Component }); }
2307
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.13", type: LabelComponent, selector: "edm-sdui-label", viewQueries: [{ propertyName: "spanElementRef", first: true, predicate: ["spanElement"], descendants: true }], ngImport: i0, template: "<span #spanElement [edmSduiView]=\"uiComponent.element\" *ngIf=\"uiComponent\">{{\n uiComponent.element?.label ?? \"\"\n}}</span>\n", styles: [":host{display:contents}\n"], dependencies: [{ kind: "directive", type: i1$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: UIViewDirective, selector: "[edmSduiView]", inputs: ["edmSduiView", "disableClick"] }] }); }
2308
+ }
2309
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: LabelComponent, decorators: [{
2310
+ type: Component,
2311
+ args: [{ selector: 'edm-sdui-label', standalone: false, template: "<span #spanElement [edmSduiView]=\"uiComponent.element\" *ngIf=\"uiComponent\">{{\n uiComponent.element?.label ?? \"\"\n}}</span>\n", styles: [":host{display:contents}\n"] }]
2312
+ }], ctorParameters: () => [{ type: undefined, decorators: [{
2313
+ type: Inject,
2314
+ args: ['uiComponent']
2315
+ }] }, { type: i0.Renderer2 }, { type: FontSizeMappingService }], propDecorators: { spanElementRef: [{
2316
+ type: ViewChild,
2317
+ args: ['spanElement']
2318
+ }] } });
2319
+
2320
+ var label_component = /*#__PURE__*/Object.freeze({
2321
+ __proto__: null,
2322
+ LabelComponent: LabelComponent
2323
+ });
2324
+
2325
+ class SpaceComponent {
2326
+ constructor(uiComponent) {
2327
+ this.uiComponent = uiComponent;
2328
+ }
2329
+ ngOnInit() {
2330
+ // console.debug('space.uiComponent: ', this.uiComponent);
2331
+ }
2332
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: SpaceComponent, deps: [{ token: 'uiComponent' }], target: i0.ɵɵFactoryTarget.Component }); }
2333
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.13", type: SpaceComponent, selector: "edm-sdui-space", ngImport: i0, template: "<div class=\"space\"></div>\n", styles: [":host{display:contents}.space{flex-grow:1;flex-shrink:1;min-height:1px;min-width:1px}\n"] }); }
2334
+ }
2335
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: SpaceComponent, decorators: [{
2336
+ type: Component,
2337
+ args: [{ selector: 'edm-sdui-space', standalone: false, template: "<div class=\"space\"></div>\n", styles: [":host{display:contents}.space{flex-grow:1;flex-shrink:1;min-height:1px;min-width:1px}\n"] }]
2338
+ }], ctorParameters: () => [{ type: undefined, decorators: [{
2339
+ type: Inject,
2340
+ args: ['uiComponent']
2341
+ }] }] });
2342
+
2343
+ var space_component = /*#__PURE__*/Object.freeze({
2344
+ __proto__: null,
2345
+ SpaceComponent: SpaceComponent
2346
+ });
2347
+
2348
+ class ZStackComponent {
2349
+ constructor(uiComponent) {
2350
+ this.uiComponent = uiComponent;
2351
+ }
2352
+ ngOnInit() {
2353
+ // console.debug('zstack.uiComponent: ', this.uiComponent);
2354
+ }
2355
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: ZStackComponent, deps: [{ token: 'uiComponent' }], target: i0.ɵɵFactoryTarget.Component }); }
2356
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.13", type: ZStackComponent, selector: "edm-sdui-zstack", ngImport: i0, template: "<div #zstackElementRef class=\"zstack\" *ngIf=\"uiComponent\" [edmSduiView]=\"uiComponent.element\">\n <ng-container *ngFor=\"let child of uiComponent.components\">\n <div class=\"zstack-child\">\n <edm-sdui-component [uiComponent]=\"child\"></edm-sdui-component>\n </div>\n </ng-container>\n</div>\n", styles: [":host{display:contents}.zstack{display:grid}.zstack-child{grid-area:1/1;display:flex;align-items:center}\n"], dependencies: [{ kind: "directive", type: i1$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: UIComponentComponent, selector: "edm-sdui-component", inputs: ["uiComponent", "translateLabel"] }, { kind: "directive", type: UIViewDirective, selector: "[edmSduiView]", inputs: ["edmSduiView", "disableClick"] }] }); }
2357
+ }
2358
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: ZStackComponent, decorators: [{
2359
+ type: Component,
2360
+ args: [{ selector: 'edm-sdui-zstack', standalone: false, template: "<div #zstackElementRef class=\"zstack\" *ngIf=\"uiComponent\" [edmSduiView]=\"uiComponent.element\">\n <ng-container *ngFor=\"let child of uiComponent.components\">\n <div class=\"zstack-child\">\n <edm-sdui-component [uiComponent]=\"child\"></edm-sdui-component>\n </div>\n </ng-container>\n</div>\n", styles: [":host{display:contents}.zstack{display:grid}.zstack-child{grid-area:1/1;display:flex;align-items:center}\n"] }]
2361
+ }], ctorParameters: () => [{ type: undefined, decorators: [{
2362
+ type: Inject,
2363
+ args: ['uiComponent']
2364
+ }] }] });
2365
+
2366
+ var zstack_component = /*#__PURE__*/Object.freeze({
2367
+ __proto__: null,
2368
+ ZStackComponent: ZStackComponent
2369
+ });
2370
+
2371
+ class RowDivisorComponent {
2372
+ constructor(uiComponent) {
2373
+ this.uiComponent = uiComponent;
2374
+ }
2375
+ ngOnInit() {
2376
+ // console.debug('rowDivisor.uiComponent: ', this.uiComponent);
2377
+ }
2378
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: RowDivisorComponent, deps: [{ token: 'uiComponent' }], target: i0.ɵɵFactoryTarget.Component }); }
2379
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.13", type: RowDivisorComponent, selector: "edm-sdui-row-divisor", ngImport: i0, template: "<div\n class=\"row-divisor\"\n *ngIf=\"uiComponent\"\n [edmSduiView]=\"uiComponent.element\"\n></div>\n", styles: [":host{display:contents}.row-divisor{height:1px}\n"], dependencies: [{ kind: "directive", type: i1$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: UIViewDirective, selector: "[edmSduiView]", inputs: ["edmSduiView", "disableClick"] }] }); }
2380
+ }
2381
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: RowDivisorComponent, decorators: [{
2382
+ type: Component,
2383
+ args: [{ selector: 'edm-sdui-row-divisor', standalone: false, template: "<div\n class=\"row-divisor\"\n *ngIf=\"uiComponent\"\n [edmSduiView]=\"uiComponent.element\"\n></div>\n", styles: [":host{display:contents}.row-divisor{height:1px}\n"] }]
2384
+ }], ctorParameters: () => [{ type: undefined, decorators: [{
2385
+ type: Inject,
2386
+ args: ['uiComponent']
2387
+ }] }] });
2388
+
2389
+ var rowDivisor_component = /*#__PURE__*/Object.freeze({
2390
+ __proto__: null,
2391
+ RowDivisorComponent: RowDivisorComponent
2392
+ });
2393
+
2288
2394
  class ButtonComponent {
2289
2395
  constructor(uiComponent, renderer, fontSizeMappingService) {
2290
2396
  this.uiComponent = uiComponent;
@@ -2466,13 +2572,13 @@ class SduiComponent {
2466
2572
  validateParam(paramValue) {
2467
2573
  return !!paramValue && paramValue.trim() !== '';
2468
2574
  }
2469
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: SduiComponent, deps: [{ token: i1$2.ActivatedRoute }, { token: UIScreenViewModel }], target: i0.ɵɵFactoryTarget.Component }); }
2575
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: SduiComponent, deps: [{ token: i1$3.ActivatedRoute }, { token: UIScreenViewModel }], target: i0.ɵɵFactoryTarget.Component }); }
2470
2576
  static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.13", type: SduiComponent, selector: "edm-sdui", inputs: { initialUrl: "initialUrl" }, ngImport: i0, template: "<div class=\"sdui-container\">\n <edm-sdui-uiscreen *ngIf=\"currentSduiUrl\"></edm-sdui-uiscreen>\n</div>\n", styles: [":host{display:contents}.sdui-container{display:flex;flex-direction:column;min-height:100vh;width:100vw;position:relative}\n"], dependencies: [{ kind: "directive", type: i1$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: UIScreenComponent, selector: "edm-sdui-uiscreen" }] }); }
2471
2577
  }
2472
2578
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: SduiComponent, decorators: [{
2473
2579
  type: Component,
2474
2580
  args: [{ selector: 'edm-sdui', standalone: false, template: "<div class=\"sdui-container\">\n <edm-sdui-uiscreen *ngIf=\"currentSduiUrl\"></edm-sdui-uiscreen>\n</div>\n", styles: [":host{display:contents}.sdui-container{display:flex;flex-direction:column;min-height:100vh;width:100vw;position:relative}\n"] }]
2475
- }], ctorParameters: () => [{ type: i1$2.ActivatedRoute }, { type: UIScreenViewModel }], propDecorators: { initialUrl: [{
2581
+ }], ctorParameters: () => [{ type: i1$3.ActivatedRoute }, { type: UIScreenViewModel }], propDecorators: { initialUrl: [{
2476
2582
  type: Input
2477
2583
  }] } });
2478
2584
 
@@ -2488,7 +2594,7 @@ class SduiRoutingModule {
2488
2594
  };
2489
2595
  }
2490
2596
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: SduiRoutingModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
2491
- static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "18.2.13", ngImport: i0, type: SduiRoutingModule, imports: [i1$2.RouterModule], exports: [RouterModule] }); }
2597
+ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "18.2.13", ngImport: i0, type: SduiRoutingModule, imports: [i1$3.RouterModule], exports: [RouterModule] }); }
2492
2598
  static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: SduiRoutingModule, imports: [RouterModule.forChild(defaultRoutes), RouterModule] }); }
2493
2599
  }
2494
2600
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: SduiRoutingModule, decorators: [{
@@ -2765,7 +2871,7 @@ class SearchBarDismissComponent {
2765
2871
  this.router.navigate(['/']); // fallback
2766
2872
  }
2767
2873
  }
2768
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: SearchBarDismissComponent, deps: [{ token: UIActionService }, { token: 'uiComponent' }, { token: i0.Renderer2 }, { token: i1$2.Router }, { token: FontSizeMappingService }], target: i0.ɵɵFactoryTarget.Component }); }
2874
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: SearchBarDismissComponent, deps: [{ token: UIActionService }, { token: 'uiComponent' }, { token: i0.Renderer2 }, { token: i1$3.Router }, { token: FontSizeMappingService }], target: i0.ɵɵFactoryTarget.Component }); }
2769
2875
  static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.13", type: SearchBarDismissComponent, selector: "edm-sdui-search-bar-dismiss", viewQueries: [{ propertyName: "inputElementRef", first: true, predicate: ["inputElement"], descendants: true }], ngImport: i0, template: "<div class=\"flex w-100\" (click)=\"clearInput()\">\n <img\n class=\"search-bar-icon\"\n src=\"assets/images/ic-search.svg\"\n>\n<input\n #inputElement\n class=\"search-bar\"\n [edmSduiView]=\"uiComponent.element\"\n [disableClick]=\"true\"\n *ngIf=\"uiComponent\"\n/>\n<img\n class=\"search-bar-close-icon cursor-pointer\"\n src=\"assets/images/bt-close-comment.svg\"\n>\n</div>\n\n", styles: [".search-bar{width:100%;line-height:1.5rem;background-color:var(--bg-search);cursor:pointer}\n"], dependencies: [{ kind: "directive", type: i1$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: UIViewDirective, selector: "[edmSduiView]", inputs: ["edmSduiView", "disableClick"] }] }); }
2770
2876
  }
2771
2877
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: SearchBarDismissComponent, decorators: [{
@@ -2774,7 +2880,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
2774
2880
  }], ctorParameters: () => [{ type: UIActionService }, { type: undefined, decorators: [{
2775
2881
  type: Inject,
2776
2882
  args: ['uiComponent']
2777
- }] }, { type: i0.Renderer2 }, { type: i1$2.Router }, { type: FontSizeMappingService }], propDecorators: { inputElementRef: [{
2883
+ }] }, { type: i0.Renderer2 }, { type: i1$3.Router }, { type: FontSizeMappingService }], propDecorators: { inputElementRef: [{
2778
2884
  type: ViewChild,
2779
2885
  args: ['inputElement']
2780
2886
  }] } });
@@ -3209,6 +3315,7 @@ class SduiModule {
3209
3315
  // UIComposite
3210
3316
  UIScreenComponent,
3211
3317
  UINavigationComponent,
3318
+ FabComponent,
3212
3319
  // Layout
3213
3320
  SingleColumnLayoutComponent,
3214
3321
  CenteredContentLayoutComponent,
@@ -3247,6 +3354,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
3247
3354
  // UIComposite
3248
3355
  UIScreenComponent,
3249
3356
  UINavigationComponent,
3357
+ FabComponent,
3250
3358
  // Layout
3251
3359
  SingleColumnLayoutComponent,
3252
3360
  CenteredContentLayoutComponent,