@edm-sdui/sdui 1.0.17 → 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.
@@ -1,5 +1,5 @@
1
1
  import * as i0 from '@angular/core';
2
- import { InjectionToken, Injectable, Optional, Inject, Injector, Component, Input, EventEmitter, Output, Directive, HostListener, inject, ViewChild, NgModule, ChangeDetectionStrategy } 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
5
  import * as i1$3 from '@angular/router';
@@ -117,6 +117,7 @@ class UIScreenService {
117
117
  header: json.header ? this.mapToUIComponent(json.header) : null,
118
118
  main: json.main ? this.mapToUIComponent(json.main) : null,
119
119
  footer: json.footer ? this.mapToUIComponent(json.footer) : null,
120
+ fab: json.fab ? this.mapToUIElement(json.fab) : null,
120
121
  };
121
122
  }
122
123
  mapToCenteredContentLayout(json) {
@@ -192,7 +193,9 @@ class UIScreenService {
192
193
  }
193
194
  mapBackground(json) {
194
195
  return {
195
- 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,
196
199
  };
197
200
  }
198
201
  mapAction(json) {
@@ -411,1205 +414,220 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
411
414
  type: Input
412
415
  }] } });
413
416
 
414
- class SingleColumnLayoutComponent {
415
- ngOnChanges(changes) {
416
- if (changes['uiLayout']) {
417
- 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.');
418
443
  }
419
444
  }
420
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: SingleColumnLayoutComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
421
- 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' }); }
422
447
  }
423
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: SingleColumnLayoutComponent, decorators: [{
424
- type: Component,
425
- 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"] }]
426
- }], propDecorators: { uiLayout: [{
427
- type: Input
428
- }] } });
448
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: UIActionHandlersService, decorators: [{
449
+ type: Injectable,
450
+ args: [{ providedIn: 'root' }]
451
+ }] });
429
452
 
430
- class CenteredContentLayoutComponent {
431
- ngOnInit() {
432
- console.log(this.uiLayout);
453
+ class ModalComponent {
454
+ constructor(sanitizer) {
455
+ this.sanitizer = sanitizer;
456
+ this.title = '';
457
+ this.closed = new EventEmitter();
433
458
  }
434
- ngOnChanges(changes) {
435
- if (changes['uiLayout']) {
436
- console.debug('[CenteredContentLayoutComponent] Novo layout recebido:', changes['uiLayout'].currentValue);
437
- }
459
+ get safeUrl() {
460
+ return this.sanitizer.bypassSecurityTrustResourceUrl(this.url);
438
461
  }
439
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: CenteredContentLayoutComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
440
- 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"] }); }
441
467
  }
442
- 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: [{
443
469
  type: Component,
444
- 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"] }]
445
- }], 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: [{
446
474
  type: Input
475
+ }], closed: [{
476
+ type: Output
447
477
  }] } });
448
478
 
449
- var UISpacingLevel;
450
- (function (UISpacingLevel) {
451
- UISpacingLevel["S1"] = "s1";
452
- UISpacingLevel["S2"] = "s2";
453
- UISpacingLevel["S3"] = "s3";
454
- UISpacingLevel["S4"] = "s4";
455
- UISpacingLevel["S5"] = "s5";
456
- UISpacingLevel["S6"] = "s6";
457
- })(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 }] });
458
505
 
459
- const spaceMapping = {
460
- [UISpacingLevel.S1]: '4px',
461
- [UISpacingLevel.S2]: '8px',
462
- [UISpacingLevel.S3]: '16px',
463
- [UISpacingLevel.S4]: '24px',
464
- [UISpacingLevel.S5]: '32px',
465
- [UISpacingLevel.S6]: '40px',
466
- };
467
-
468
- var UIColor;
469
- (function (UIColor) {
470
- UIColor["ALERT"] = "alert";
471
- UIColor["BG_TAG"] = "bg_tag";
472
- UIColor["ACTINDCOLOR"] = "actindcolor";
473
- UIColor["TEXT_WEB"] = "text_web";
474
- UIColor["TEXT_RANKING_HIGHLIGHT"] = "text_ranking_highlight";
475
- UIColor["RANKING_HIGHLIGHT"] = "ranking_highlight";
476
- UIColor["TEXT_RANKING_MAIN"] = "text_ranking_main";
477
- UIColor["TEXT_RANKING_AUX"] = "text_ranking_aux";
478
- UIColor["BT_SELECT_ACTIVITY"] = "bt_select_activity";
479
- UIColor["FONT_BT"] = "font_bt";
480
- UIColor["FONT_BT_PRICE"] = "font_bt_price";
481
- UIColor["FONT_TAG"] = "font_tag";
482
- UIColor["FONT_LIVE"] = "font_live";
483
- UIColor["QUIZ_SELECT"] = "quiz_select";
484
- UIColor["MAIN1"] = "main_1";
485
- UIColor["AUX"] = "aux";
486
- UIColor["VOTE_OFF"] = "vote_off";
487
- UIColor["BG_VOTE"] = "bg_vote";
488
- UIColor["VOTE_ON"] = "vote_on";
489
- UIColor["STORY_OFF"] = "story_off";
490
- UIColor["STORY_ON"] = "story_on";
491
- UIColor["FONT_ACTIONS"] = "font_actions";
492
- UIColor["FONT_SEARCH_OFF"] = "font_search_off";
493
- UIColor["FONT_SEARCH_ON"] = "font_search_on";
494
- UIColor["SLIDER_OFF"] = "slider_off";
495
- UIColor["SLIDER_ON"] = "slider_on";
496
- UIColor["PROGRESS_VIEW_OFF"] = "progress_view_off";
497
- UIColor["PROGRESS_VIEW_RANKING_OFF"] = "progress_view_ranking_off";
498
- UIColor["PROGRESS_STORY_OFF"] = "progress_story_off";
499
- UIColor["PROGRESS_STORY_ON"] = "progress_story_on";
500
- UIColor["PROGRESS_VIEW_ON"] = "progress_view_on";
501
- UIColor["FONT_DISABLED"] = "font_disabled";
502
- UIColor["BT_TAB_OFF"] = "bt_tab_off";
503
- UIColor["BG"] = "bg";
504
- UIColor["FONT_BT_PROGRAM"] = "font_bt_program";
505
- UIColor["BG_RANKING"] = "bg_ranking";
506
- UIColor["BG_STORY"] = "bg_story";
507
- UIColor["BG_NEW_COMMENT"] = "bg_new_comment";
508
- UIColor["SHADOW"] = "shadow";
509
- UIColor["BG_SURVEY"] = "bg_survey";
510
- UIColor["BG_LIVE"] = "bg_live";
511
- UIColor["BG_VIEW_LIVE"] = "bg_view_live";
512
- UIColor["MAIN2"] = "main_2";
513
- UIColor["BT_TAG_ON"] = "bt_tag_on";
514
- UIColor["TEXT_COLOR"] = "text_color";
515
- UIColor["TEXT_STORY"] = "text_story";
516
- UIColor["BT_REGISTER"] = "bt_register";
517
- UIColor["BT_SHADOW_PROFILE"] = "bt_shadow_profile";
518
- UIColor["FONT_REGISTER"] = "font_register";
519
- UIColor["FONT_BT_MAIN"] = "font_bt_main";
520
- UIColor["FONT_BT_QUIZ"] = "font_bt_quiz";
521
- UIColor["FONT_BT_VIEW"] = "font_bt_view";
522
- UIColor["FONT_BT_TAG_OFF"] = "font_bt_tag_off";
523
- UIColor["FONT_BT_TAG_ON"] = "font_bt_tag_on";
524
- UIColor["ATTENTION_COLOR"] = "attention_color";
525
- UIColor["QUIZ_ERROR"] = "quiz_error";
526
- UIColor["BG_NAV"] = "bg_nav";
527
- UIColor["BT_OPEN_E_CLOSE"] = "bt_open_e_close";
528
- UIColor["IC_TYPE_CLASS"] = "ic_type_class";
529
- UIColor["IC_TYPE_LIVE"] = "ic_type_live";
530
- UIColor["IC_TYPE_DISABLED"] = "ic_type_disabled";
531
- UIColor["BT_DOWNLOAD"] = "bt_download";
532
- UIColor["BT_DISABLED"] = "bt_disabled";
533
- UIColor["BT_DISABLED_HOME"] = "bt_disabled_home";
534
- UIColor["BT_CHECK_OFF"] = "bt_check_off";
535
- UIColor["ACTIONS_OFF"] = "actions_off";
536
- UIColor["BT_PROGRAM"] = "bt_program";
537
- UIColor["PLAYER_CONTROLS"] = "player_controls";
538
- UIColor["RATING_OFF"] = "rating_off";
539
- UIColor["RATING_ON"] = "rating_on";
540
- UIColor["ACTIONS_ON"] = "actions_on";
541
- UIColor["TAG_VIP_HIGHLIGHT"] = "tag_vip_highlight";
542
- UIColor["BT_CHECK_ON"] = "bt_check_on";
543
- UIColor["BT_TAB_ON"] = "bt_tab_on";
544
- UIColor["BT_VIEW_DEG1"] = "bt_view_deg1";
545
- UIColor["LINE_DIVISER"] = "line_diviser";
546
- UIColor["BG_SEC"] = "bg_sec";
547
- UIColor["BG_SEARCH"] = "bg_search";
548
- UIColor["FONT_PRICE"] = "font_price";
549
- UIColor["BT_LIKE_ON"] = "bt_like_on";
550
- UIColor["BG_CARD"] = "bg_card";
551
- UIColor["BT_TAG_OFF"] = "bt_tag_off";
552
- UIColor["BT_TAG_VIP"] = "bt_tag_vip";
553
- UIColor["BT_PROFILE"] = "bt_profile";
554
- UIColor["BT_PRICE_DEG1"] = "bt_price_deg1";
555
- UIColor["BT_PRICE_DEG2"] = "bt_price_deg2";
556
- UIColor["BT_LIKE_OFF"] = "bt_like_off";
557
- UIColor["BT_LOCK"] = "bt_lock";
558
- UIColor["BT_TRASH"] = "bt_trash";
559
- UIColor["BG_COMMENT"] = "bg_comment";
560
- UIColor["BG_POST"] = "bg_post";
561
- UIColor["BT_HIGHLIGHT"] = "bt_highlight";
562
- UIColor["ATTENTION_BADGE"] = "attention_badge";
563
- UIColor["BT_BORDER_PROFILE"] = "bt_border_profile";
564
- UIColor["BT_MAIN_DEG1"] = "bt_main_deg1";
565
- UIColor["BT_MAIN_DEG2"] = "bt_main_deg2";
566
- UIColor["BT_VIEW_DEG2"] = "bt_view_deg2";
567
- UIColor["BG_MODULO"] = "bg_modulo";
568
- UIColor["BG_MODULO_RANKING"] = "bg_modulo_ranking";
569
- UIColor["QUIZ_RIGHT"] = "quiz_right";
570
- UIColor["BT_BANNER_MAIN"] = "bt_banner_main";
571
- UIColor["FONT_BT_BANNER"] = "font_bt_banner";
572
- UIColor["BT_BANNER"] = "bt_banner";
573
- UIColor["FONT_BT_BANNER_MAIN"] = "font_bt_banner_main";
574
- UIColor["BORDER_BANNER"] = "border_banner";
575
- UIColor["INPUT_ERROR"] = "input_error";
576
- UIColor["BT_BACK"] = "bt_back";
577
- UIColor["TEXT_COMMENT_SEC"] = "text_comment_sec";
578
- UIColor["BT_IA_DEG1"] = "bt_ia_deg1";
579
- UIColor["BT_IA_DEG2"] = "bt_ia_deg2";
580
- UIColor["NORMAL"] = "normal";
581
- UIColor["BG_CLIPS"] = "bg_clips";
582
- UIColor["FONT_CLIPS"] = "font_clips";
583
- UIColor["BG_MASK_0"] = "bg_mask_0";
584
- UIColor["BG_MASK_80"] = "bg_mask_80";
585
- UIColor["BG_MASK_20"] = "bg_mask_20";
586
- UIColor["TEXT_CHALLENGE_AUX"] = "text_challenge_aux";
587
- UIColor["TEXT_CHALLENGE_HIGHLIGHT"] = "text_challenge_highlight";
588
- UIColor["BG_CHALLENGE"] = "bg_challenge";
589
- UIColor["BG_MODULO_CHALLENGE"] = "bg_modulo_challenge";
590
- UIColor["CHALLENGE_HIGHLIGHT"] = "challenge_highlight";
591
- UIColor["BT_CHALLENGE"] = "bt_challenge";
592
- UIColor["FONT_BT_CHALLENGE"] = "font_bt_challenge";
593
- UIColor["CHALLENGE_OFF"] = "challenge_off";
594
- UIColor["TEXT_CHALLENGE_DISABLED"] = "text_challenge_disabled";
595
- UIColor["TEXT_CHALLENGE_MAIN"] = "text_challenge_main";
596
- UIColor["CHALLENGE_WAY"] = "challenge_way";
597
- })(UIColor || (UIColor = {}));
598
-
599
- const colorMapping = {
600
- [UIColor.ALERT]: 'var(--alert)',
601
- [UIColor.BG_TAG]: 'var(--bg-tag)',
602
- [UIColor.ACTINDCOLOR]: 'var(--actindcolor)',
603
- [UIColor.TEXT_WEB]: 'var(--text-web)',
604
- [UIColor.TEXT_RANKING_HIGHLIGHT]: 'var(--text-ranking-highlight)',
605
- [UIColor.RANKING_HIGHLIGHT]: 'var(--ranking-highlight)',
606
- [UIColor.TEXT_RANKING_MAIN]: 'var(--text-ranking-main)',
607
- [UIColor.TEXT_RANKING_AUX]: 'var(--text-ranking-aux)',
608
- [UIColor.BT_SELECT_ACTIVITY]: 'var(--bt-select-activity)',
609
- [UIColor.FONT_BT]: 'var(--font-bt)',
610
- [UIColor.FONT_BT_PRICE]: 'var(--font-bt-price)',
611
- [UIColor.FONT_TAG]: 'var(--font-tag)',
612
- [UIColor.FONT_LIVE]: 'var(--font-live)',
613
- [UIColor.QUIZ_SELECT]: 'var(--quiz-select)',
614
- [UIColor.MAIN1]: 'var(--main-1)',
615
- [UIColor.AUX]: 'var(--aux)',
616
- [UIColor.VOTE_OFF]: 'var(--vote-off)',
617
- [UIColor.BG_VOTE]: 'var(--bg-vote)',
618
- [UIColor.VOTE_ON]: 'var(--vote-on)',
619
- [UIColor.STORY_OFF]: 'var(--story-off)',
620
- [UIColor.STORY_ON]: 'var(--story-on)',
621
- [UIColor.FONT_ACTIONS]: 'var(--font-actions)',
622
- [UIColor.FONT_SEARCH_OFF]: 'var(--font-search-off)',
623
- [UIColor.FONT_SEARCH_ON]: 'var(--font-search-on)',
624
- [UIColor.SLIDER_OFF]: 'var(--slider-off)',
625
- [UIColor.SLIDER_ON]: 'var(--slider-on)',
626
- [UIColor.PROGRESS_VIEW_OFF]: 'var(--progress-view-off)',
627
- [UIColor.PROGRESS_VIEW_RANKING_OFF]: 'var(--progress-view-ranking-off)',
628
- [UIColor.PROGRESS_STORY_OFF]: 'var(--progress-story-off)',
629
- [UIColor.PROGRESS_STORY_ON]: 'var(--progress-story-on)',
630
- [UIColor.PROGRESS_VIEW_ON]: 'var(--progress-view-on)',
631
- [UIColor.FONT_DISABLED]: 'var(--font-disabled)',
632
- [UIColor.BT_TAB_OFF]: 'var(--bt-tab-off)',
633
- [UIColor.BG]: 'var(--bg)',
634
- [UIColor.FONT_BT_PROGRAM]: 'var(--font-bt-program)',
635
- [UIColor.BG_RANKING]: 'var(--bg-ranking)',
636
- [UIColor.BG_STORY]: 'var(--bg-story)',
637
- [UIColor.BG_NEW_COMMENT]: 'var(--bg-new-comment)',
638
- [UIColor.SHADOW]: 'var(--shadow)',
639
- [UIColor.BG_SURVEY]: 'var(--bg-survey)',
640
- [UIColor.BG_LIVE]: 'var(--bg-live)',
641
- [UIColor.BG_VIEW_LIVE]: 'var(--bg-view-live)',
642
- [UIColor.MAIN2]: 'var(--main-2)',
643
- [UIColor.BT_TAG_ON]: 'var(--bt-tag-on)',
644
- [UIColor.TEXT_COLOR]: 'var(--text-color)',
645
- [UIColor.TEXT_STORY]: 'var(--text-story)',
646
- [UIColor.BT_REGISTER]: 'var(--bt-register)',
647
- [UIColor.BT_SHADOW_PROFILE]: 'var(--bt-shadow-profile)',
648
- [UIColor.FONT_REGISTER]: 'var(--font-register)',
649
- [UIColor.FONT_BT_MAIN]: 'var(--font-bt-main)',
650
- [UIColor.FONT_BT_QUIZ]: 'var(--font-bt-quiz)',
651
- [UIColor.FONT_BT_VIEW]: 'var(--font-bt-view)',
652
- [UIColor.FONT_BT_TAG_OFF]: 'var(--font-bt-tag-off)',
653
- [UIColor.FONT_BT_TAG_ON]: 'var(--font-bt-tag-on)',
654
- [UIColor.ATTENTION_COLOR]: 'var(--attention-color)',
655
- [UIColor.QUIZ_ERROR]: 'var(--quiz-error)',
656
- [UIColor.BG_NAV]: 'var(--bg-nav)',
657
- [UIColor.BT_OPEN_E_CLOSE]: 'var(--bt-open-e-close)',
658
- [UIColor.IC_TYPE_CLASS]: 'var(--ic-type-class)',
659
- [UIColor.IC_TYPE_LIVE]: 'var(--ic-type-live)',
660
- [UIColor.IC_TYPE_DISABLED]: 'var(--ic-type-disabled)',
661
- [UIColor.BT_DOWNLOAD]: 'var(--bt-download)',
662
- [UIColor.BT_DISABLED]: 'var(--bt-disabled)',
663
- [UIColor.BT_DISABLED_HOME]: 'var(--bt-disabled-home)',
664
- [UIColor.BT_CHECK_OFF]: 'var(--bt-check-off)',
665
- [UIColor.ACTIONS_OFF]: 'var(--actions-off)',
666
- [UIColor.BT_PROGRAM]: 'var(--bt-program)',
667
- [UIColor.PLAYER_CONTROLS]: 'var(--player-controls)',
668
- [UIColor.RATING_OFF]: 'var(--rating-off)',
669
- [UIColor.RATING_ON]: 'var(--rating-on)',
670
- [UIColor.ACTIONS_ON]: 'var(--actions-on)',
671
- [UIColor.TAG_VIP_HIGHLIGHT]: 'var(--tag-vip-highlight)',
672
- [UIColor.BT_CHECK_ON]: 'var(--bt-check-on)',
673
- [UIColor.BT_TAB_ON]: 'var(--bt-tab-on)',
674
- [UIColor.BT_VIEW_DEG1]: 'var(--bt-view-deg1)',
675
- [UIColor.LINE_DIVISER]: 'var(--line-diviser)',
676
- [UIColor.BG_SEC]: 'var(--bg-sec)',
677
- [UIColor.BG_SEARCH]: 'var(--bg-search)',
678
- [UIColor.FONT_PRICE]: 'var(--font-price)',
679
- [UIColor.BT_LIKE_ON]: 'var(--bt-like-on)',
680
- [UIColor.BG_CARD]: 'var(--bg-card)',
681
- [UIColor.BT_TAG_OFF]: 'var(--bt-tag-off)',
682
- [UIColor.BT_TAG_VIP]: 'var(--bt-tag-vip)',
683
- [UIColor.BT_PROFILE]: 'var(--bt-profile)',
684
- [UIColor.BT_PRICE_DEG1]: 'var(--bt-price-deg1)',
685
- [UIColor.BT_PRICE_DEG2]: 'var(--bt-price-deg2)',
686
- [UIColor.BT_LIKE_OFF]: 'var(--bt-like-off)',
687
- [UIColor.BT_LOCK]: 'var(--bt-lock)',
688
- [UIColor.BT_TRASH]: 'var(--bt-trash)',
689
- [UIColor.BG_COMMENT]: 'var(--bg-comment)',
690
- [UIColor.BG_POST]: 'var(--bg-post)',
691
- [UIColor.BT_HIGHLIGHT]: 'var(--bt-highlight)',
692
- [UIColor.ATTENTION_BADGE]: 'var(--attention-badge)',
693
- [UIColor.BT_BORDER_PROFILE]: 'var(--bt-border-profile)',
694
- [UIColor.BT_MAIN_DEG1]: 'var(--bt-main-deg1)',
695
- [UIColor.BT_MAIN_DEG2]: 'var(--bt-main-deg2)',
696
- [UIColor.BT_VIEW_DEG2]: 'var(--bt-view-deg2)',
697
- [UIColor.BG_MODULO]: 'var(--bg-modulo)',
698
- [UIColor.BG_MODULO_RANKING]: 'var(--bg-modulo-ranking)',
699
- [UIColor.QUIZ_RIGHT]: 'var(--quiz-right)',
700
- [UIColor.BT_BANNER_MAIN]: 'var(--bt-banner-main)',
701
- [UIColor.FONT_BT_BANNER]: 'var(--font-bt-banner)',
702
- [UIColor.BT_BANNER]: 'var(--bt-banner)',
703
- [UIColor.FONT_BT_BANNER_MAIN]: 'var(--font-bt-banner-main)',
704
- [UIColor.BORDER_BANNER]: 'var(--border-banner)',
705
- [UIColor.INPUT_ERROR]: 'var(--input-error)',
706
- [UIColor.BT_BACK]: 'var(--bt-back)',
707
- [UIColor.TEXT_COMMENT_SEC]: 'var(--text-comment-sec)',
708
- [UIColor.BT_IA_DEG1]: 'var(--bt-ia-deg1)',
709
- [UIColor.BT_IA_DEG2]: 'var(--bt-ia-deg2)',
710
- [UIColor.NORMAL]: 'var(--normal)',
711
- [UIColor.BG_CLIPS]: 'var(--bg-clips)',
712
- [UIColor.FONT_CLIPS]: 'var(--font-clips)',
713
- [UIColor.BG_MASK_0]: 'var(--bg-mask-0)',
714
- [UIColor.BG_MASK_80]: 'var(--bg-mask-80)',
715
- [UIColor.BG_MASK_20]: 'var(--bg-mask-20)',
716
- [UIColor.TEXT_CHALLENGE_AUX]: 'var(--text-challenge-aux)',
717
- [UIColor.TEXT_CHALLENGE_HIGHLIGHT]: 'var(--text-challenge-highlight)',
718
- [UIColor.BG_CHALLENGE]: 'var(--bg-challenge)',
719
- [UIColor.BG_MODULO_CHALLENGE]: 'var(--bg-modulo-challenge)',
720
- [UIColor.CHALLENGE_HIGHLIGHT]: 'var(--challenge-highlight)',
721
- [UIColor.BT_CHALLENGE]: 'var(--bt-challenge)',
722
- [UIColor.FONT_BT_CHALLENGE]: 'var(--font-bt-challenge)',
723
- [UIColor.CHALLENGE_OFF]: 'var(--challenge-off)',
724
- [UIColor.TEXT_CHALLENGE_DISABLED]: 'var(--text-challenge-disabled)',
725
- [UIColor.TEXT_CHALLENGE_MAIN]: 'var(--text-challenge-main)',
726
- [UIColor.CHALLENGE_WAY]: 'var(--challenge-way)',
727
- };
728
-
729
- var UIPaddingLevel;
730
- (function (UIPaddingLevel) {
731
- UIPaddingLevel["P1"] = "p1";
732
- UIPaddingLevel["P2"] = "p2";
733
- UIPaddingLevel["P3"] = "p3";
734
- UIPaddingLevel["P4"] = "p4";
735
- UIPaddingLevel["P5"] = "p5";
736
- UIPaddingLevel["P6"] = "p6";
737
- UIPaddingLevel["P7"] = "p7";
738
- UIPaddingLevel["P8"] = "p8";
739
- })(UIPaddingLevel || (UIPaddingLevel = {}));
740
-
741
- const padMapping = {
742
- [UIPaddingLevel.P1]: '4px',
743
- [UIPaddingLevel.P2]: '8px',
744
- [UIPaddingLevel.P3]: '16px',
745
- [UIPaddingLevel.P4]: '24px',
746
- [UIPaddingLevel.P5]: '32px',
747
- [UIPaddingLevel.P6]: '40px',
748
- [UIPaddingLevel.P7]: '48px',
749
- [UIPaddingLevel.P8]: '56px',
750
- };
751
-
752
- var UIRadiusLevel;
753
- (function (UIRadiusLevel) {
754
- UIRadiusLevel["R1"] = "r1";
755
- UIRadiusLevel["R2"] = "r2";
756
- UIRadiusLevel["R3"] = "r3";
757
- UIRadiusLevel["R4"] = "r4";
758
- UIRadiusLevel["R5"] = "r5";
759
- UIRadiusLevel["R50"] = "r50";
760
- })(UIRadiusLevel || (UIRadiusLevel = {}));
761
-
762
- const radiusMapping = {
763
- [UIRadiusLevel.R1]: '3px',
764
- [UIRadiusLevel.R2]: '5px',
765
- [UIRadiusLevel.R3]: '8px',
766
- [UIRadiusLevel.R4]: '10px',
767
- [UIRadiusLevel.R5]: '12px',
768
- [UIRadiusLevel.R50]: '50%',
769
- };
770
-
771
- var UIAlignmentType;
772
- (function (UIAlignmentType) {
773
- UIAlignmentType["START"] = "start";
774
- UIAlignmentType["CENTER"] = "center";
775
- UIAlignmentType["END"] = "end";
776
- })(UIAlignmentType || (UIAlignmentType = {}));
777
-
778
- const alignmentMapping = {
779
- [UIAlignmentType.CENTER]: 'center',
780
- [UIAlignmentType.END]: 'end',
781
- [UIAlignmentType.START]: 'start',
782
- };
783
-
784
- var UIDimension;
785
- (function (UIDimension) {
786
- UIDimension["P100"] = "p100";
787
- UIDimension["P90"] = "p90";
788
- UIDimension["P80"] = "p80";
789
- UIDimension["P70"] = "p70";
790
- UIDimension["P60"] = "p60";
791
- UIDimension["P50"] = "p50";
792
- UIDimension["P40"] = "p40";
793
- UIDimension["P30"] = "p30";
794
- UIDimension["P20"] = "p20";
795
- UIDimension["P10"] = "p10";
796
- UIDimension["D180"] = "d180";
797
- UIDimension["D150"] = "d150";
798
- UIDimension["D120"] = "d120";
799
- UIDimension["D110"] = "d110";
800
- UIDimension["D100"] = "d100";
801
- UIDimension["D90"] = "d90";
802
- UIDimension["D80"] = "d80";
803
- UIDimension["D72"] = "d72";
804
- UIDimension["D64"] = "d64";
805
- UIDimension["D60"] = "d60";
806
- UIDimension["D56"] = "d56";
807
- UIDimension["D48"] = "d48";
808
- UIDimension["D42"] = "d42";
809
- UIDimension["D40"] = "d40";
810
- UIDimension["D36"] = "d36";
811
- UIDimension["D32"] = "d32";
812
- UIDimension["D30"] = "d30";
813
- UIDimension["D28"] = "d28";
814
- UIDimension["D26"] = "d26";
815
- UIDimension["D24"] = "d24";
816
- UIDimension["D22"] = "d22";
817
- UIDimension["D20"] = "d20";
818
- UIDimension["D18"] = "d18";
819
- UIDimension["D16"] = "d16";
820
- UIDimension["D14"] = "d14";
821
- UIDimension["D12"] = "d12";
822
- UIDimension["D10"] = "d10";
823
- UIDimension["D8"] = "d8";
824
- UIDimension["D5"] = "d5";
825
- UIDimension["D4"] = "d4";
826
- UIDimension["D3"] = "d3";
827
- UIDimension["D2"] = "d2";
828
- UIDimension["D1"] = "d1";
829
- })(UIDimension || (UIDimension = {}));
830
-
831
- const dimensionMapping = {
832
- // Percentage values
833
- [UIDimension.P100]: '100%',
834
- [UIDimension.P90]: '90%',
835
- [UIDimension.P80]: '80%',
836
- [UIDimension.P70]: '70%',
837
- [UIDimension.P60]: '60%',
838
- [UIDimension.P50]: '50%',
839
- [UIDimension.P40]: '40%',
840
- [UIDimension.P30]: '30%',
841
- [UIDimension.P20]: '20%',
842
- [UIDimension.P10]: '10%',
843
- // Pixel values
844
- [UIDimension.D180]: '180px',
845
- [UIDimension.D150]: '150px',
846
- [UIDimension.D120]: '120px',
847
- [UIDimension.D110]: '110px',
848
- [UIDimension.D100]: '100px',
849
- [UIDimension.D90]: '90px',
850
- [UIDimension.D80]: '80px',
851
- [UIDimension.D72]: '72px',
852
- [UIDimension.D64]: '64px',
853
- [UIDimension.D60]: '60px',
854
- [UIDimension.D56]: '56px',
855
- [UIDimension.D48]: '48px',
856
- [UIDimension.D42]: '42px',
857
- [UIDimension.D40]: '40px',
858
- [UIDimension.D36]: '36px',
859
- [UIDimension.D32]: '32px',
860
- [UIDimension.D30]: '30px',
861
- [UIDimension.D28]: '28px',
862
- [UIDimension.D26]: '26px',
863
- [UIDimension.D24]: '24px',
864
- [UIDimension.D22]: '22px',
865
- [UIDimension.D20]: '20px',
866
- [UIDimension.D18]: '18px',
867
- [UIDimension.D16]: '16px',
868
- [UIDimension.D14]: '14px',
869
- [UIDimension.D12]: '12px',
870
- [UIDimension.D10]: '10px',
871
- [UIDimension.D8]: '8px',
872
- [UIDimension.D5]: '5px',
873
- [UIDimension.D4]: '4px',
874
- [UIDimension.D3]: '3px',
875
- [UIDimension.D2]: '2px',
876
- [UIDimension.D1]: '1px',
877
- };
878
-
879
- var UIShadowOffset;
880
- (function (UIShadowOffset) {
881
- UIShadowOffset["S1"] = "s1";
882
- })(UIShadowOffset || (UIShadowOffset = {}));
883
-
884
- var UIShadowBlurRadius;
885
- (function (UIShadowBlurRadius) {
886
- UIShadowBlurRadius["B1"] = "b1";
887
- })(UIShadowBlurRadius || (UIShadowBlurRadius = {}));
888
-
889
- const shadowOffsetMapping = {
890
- [UIShadowOffset.S1]: '1px',
891
- };
892
- const shadowBlurRadiusMapping = {
893
- [UIShadowBlurRadius.B1]: '3px',
894
- };
895
-
896
- var UIJustify;
897
- (function (UIJustify) {
898
- UIJustify["START"] = "start";
899
- UIJustify["CENTER"] = "center";
900
- UIJustify["END"] = "end";
901
- UIJustify["BETWEEN"] = "space-between";
902
- UIJustify["EVENLY"] = "space-evenly";
903
- })(UIJustify || (UIJustify = {}));
904
-
905
- const justifyMapping = {
906
- [UIJustify.START]: 'flex-start',
907
- [UIJustify.CENTER]: 'center',
908
- [UIJustify.END]: 'flex-end',
909
- [UIJustify.BETWEEN]: 'space-between',
910
- [UIJustify.EVENLY]: 'space-evenly',
911
- };
912
-
913
- var UIActionType;
914
- (function (UIActionType) {
915
- // navegação
916
- UIActionType["INTERNAL_URL"] = "INTERNAL_URL";
917
- UIActionType["RELOAD_INTERNAL_URL"] = "RELOAD_INTERNAL_URL";
918
- UIActionType["DISMISS_TO_SCENE"] = "DISMISS_TO_SCENE";
919
- UIActionType["EXTERNAL_URL"] = "EXTERNAL_URL";
920
- UIActionType["WEBVIEW_URL"] = "WEBVIEW_URL";
921
- // paywall
922
- UIActionType["PAYWALL"] = "PAYWALL";
923
- UIActionType["REGISTER"] = "REGISTER";
924
- // conteúdo
925
- UIActionType["HTML"] = "HTML";
926
- UIActionType["FILE"] = "FILE";
927
- })(UIActionType || (UIActionType = {}));
928
-
929
- class UIActionHandlersService {
930
- registerLogout(handler) {
931
- this.logoutHandler = handler;
932
- }
933
- executeLogout() {
934
- if (this.logoutHandler) {
935
- this.logoutHandler();
936
- }
937
- else {
938
- console.warn('Nenhum handler de logout registrado.');
939
- }
940
- }
941
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: UIActionHandlersService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
942
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: UIActionHandlersService, providedIn: 'root' }); }
943
- }
944
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: UIActionHandlersService, decorators: [{
945
- type: Injectable,
946
- args: [{ providedIn: 'root' }]
947
- }] });
948
-
949
- class ModalComponent {
950
- constructor(sanitizer) {
951
- this.sanitizer = sanitizer;
952
- this.title = '';
953
- this.closed = new EventEmitter();
954
- }
955
- get safeUrl() {
956
- return this.sanitizer.bypassSecurityTrustResourceUrl(this.url);
957
- }
958
- close() {
959
- this.closed.emit();
960
- }
961
- 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 }); }
962
- 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\" (click)=\"close()\">\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-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"] }); }
963
- }
964
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: ModalComponent, decorators: [{
965
- type: Component,
966
- args: [{ selector: 'edm-modal', standalone: true, template: "<div class=\"edm-modal-backdrop\" (click)=\"close()\">\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-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"] }]
967
- }], ctorParameters: () => [{ type: i1$2.DomSanitizer }], propDecorators: { url: [{
968
- type: Input
969
- }], title: [{
970
- type: Input
971
- }], closed: [{
972
- type: Output
973
- }] } });
974
-
975
- class ModalService {
976
- constructor(injector, appRef, cfr) {
977
- this.injector = injector;
978
- this.appRef = appRef;
979
- this.cfr = cfr;
980
- }
981
- open(url, title = '') {
982
- const factory = this.cfr.resolveComponentFactory(ModalComponent);
983
- const componentRef = factory.create(this.injector);
984
- componentRef.instance.url = url;
985
- componentRef.instance.title = title;
986
- componentRef.instance.closed.subscribe(() => {
987
- this.appRef.detachView(componentRef.hostView);
988
- componentRef.destroy();
989
- });
990
- this.appRef.attachView(componentRef.hostView);
991
- const domElem = componentRef.hostView.rootNodes[0];
992
- document.body.appendChild(domElem);
993
- }
994
- 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 }); }
995
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: ModalService, providedIn: 'root' }); }
996
- }
997
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: ModalService, decorators: [{
998
- type: Injectable,
999
- args: [{ providedIn: 'root' }]
1000
- }], ctorParameters: () => [{ type: i0.Injector }, { type: i0.ApplicationRef }, { type: i0.ComponentFactoryResolver }] });
1001
-
1002
- class UIActionService {
1003
- constructor(router, actionHandlers, modalService) {
1004
- this.router = router;
1005
- this.actionHandlers = actionHandlers;
1006
- this.modalService = modalService;
1007
- }
1008
- execute(action) {
1009
- if (!action || !action.type)
1010
- return;
1011
- console.log(action);
1012
- switch (action.type) {
1013
- case UIActionType.INTERNAL_URL:
1014
- if (action.url && isSduiUrl(action.url)) {
1015
- const resolved = resolveSduiUrl(action.url);
1016
- this.router.navigate([], {
1017
- queryParams: { [SDUI_URL_PARAM]: resolved },
1018
- queryParamsHandling: 'merge',
1019
- });
1020
- }
1021
- else {
1022
- this.handleCustomNavigation(action.url || '');
1023
- }
1024
- break;
1025
- case UIActionType.RELOAD_INTERNAL_URL:
1026
- if (action.url) {
1027
- console.debug('[UIActionService] Navigating to:', action.url);
1028
- if (isSduiUrl(action.url)) {
1029
- const resolved = resolveSduiUrl(action.url);
1030
- this.router.navigate([], {
1031
- queryParams: { [SDUI_URL_PARAM]: resolved },
1032
- queryParamsHandling: 'merge',
1033
- });
1034
- }
1035
- else {
1036
- this.router.navigateByUrl(action.url, { replaceUrl: false });
1037
- }
1038
- }
1039
- break;
1040
- case UIActionType.EXTERNAL_URL:
1041
- if (action.url) {
1042
- window.open(action.url, '_blank');
1043
- }
1044
- break;
1045
- case UIActionType.WEBVIEW_URL:
1046
- if (action.url) {
1047
- const modal = this.modalService.open(action.url);
1048
- }
1049
- break;
1050
- // Outros tipos de ação podem ser adicionados aqui
1051
- }
1052
- }
1053
- handleCustomNavigation(url) {
1054
- if (url.includes('timeline/')) {
1055
- const broken = url.split('timeline/')[1];
1056
- this.router.navigate(['comunidade', 'postagem', broken], { queryParams: { from: 'sdui' } });
1057
- return true;
1058
- }
1059
- if (url.includes('live/')) {
1060
- const broken = url.split('live/')[1];
1061
- this.router.navigate(['comunidade', 'postagem', 'live', broken], { queryParams: { from: 'sdui' } });
1062
- return true;
1063
- }
1064
- if (url.includes('lesson/')) {
1065
- const lessonId = url.split('lesson/')[1];
1066
- const productId = url.includes('product/') ? url.split('product/')[1].split('/')[0] : null;
1067
- if (productId) {
1068
- this.router.navigate(['produtos', productId, 'aula', lessonId], { queryParams: { from: 'sdui' } });
1069
- return true;
1070
- }
1071
- }
1072
- if (url.includes('product/')) {
1073
- const productId = url.split('product/')[1];
1074
- this.router.navigate(['produtos', productId], { queryParams: { from: 'sdui' } });
1075
- return true;
1076
- }
1077
- if (url.includes('posts/')) {
1078
- const postId = url.split('posts/')[1];
1079
- this.router.navigate(['comunidade', 'postagem', postId], { queryParams: { from: 'sdui' } });
1080
- return true;
1081
- }
1082
- if (url.includes('my-purchases')) {
1083
- this.router.navigate(['perfil', 'compras'], { queryParams: { from: 'sdui' } });
1084
- return true;
1085
- }
1086
- if (url.includes('my-annotations')) {
1087
- this.router.navigate(['perfil', 'meu-caderno'], { queryParams: { from: 'sdui' } });
1088
- return true;
1089
- }
1090
- if (url.includes('my-list')) {
1091
- this.router.navigate(['perfil', 'minha-lista'], { queryParams: { from: 'sdui' } });
1092
- return true;
1093
- }
1094
- if (url.includes('my-certificates')) {
1095
- this.router.navigate(['perfil', 'certificados'], { queryParams: { from: 'sdui' } });
1096
- return true;
1097
- }
1098
- if (url.includes('my-subscriptions')) {
1099
- this.router.navigate(['perfil', 'assinaturas'], { queryParams: { from: 'sdui' } });
1100
- return true;
1101
- }
1102
- if (url.includes('edit-profile')) {
1103
- this.router.navigate(['perfil', 'editar'], { queryParams: { from: 'sdui' } });
1104
- return true;
1105
- }
1106
- if (url.includes('ranking')) {
1107
- this.router.navigate(['perfil', 'ranking'], { queryParams: { from: 'sdui' } });
1108
- return true;
1109
- }
1110
- if (url.includes('ranking/rules')) {
1111
- this.router.navigate(['perfil', 'ranking', 'regras'], { queryParams: { from: 'sdui' } });
1112
- return true;
1113
- }
1114
- if (url.includes('logout')) {
1115
- this.router.navigate(['logout'], { queryParams: { from: 'sdui' } });
1116
- return true;
1117
- }
1118
- return false; // nenhum dos casos especiais foi tratado
1119
- }
1120
- 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 }); }
1121
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: UIActionService, providedIn: 'root' }); }
1122
- }
1123
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: UIActionService, decorators: [{
1124
- type: Injectable,
1125
- args: [{ providedIn: 'root' }]
1126
- }], ctorParameters: () => [{ type: i1$3.Router }, { type: UIActionHandlersService }, { type: ModalService }] });
1127
-
1128
- class UIViewDirective {
1129
- constructor(elementRef, renderer, router, actionService, screenViewModel) {
1130
- this.elementRef = elementRef;
1131
- this.renderer = renderer;
1132
- this.router = router;
1133
- this.actionService = actionService;
1134
- this.screenViewModel = screenViewModel;
1135
- this.disableClick = false;
1136
- }
1137
- ngOnChanges(changes) {
1138
- if (this.edmSduiView) {
1139
- this.applyStyles(this.edmSduiView);
1140
- }
1141
- }
1142
- applyStyles(uiView) {
1143
- if (uiView.padding) {
1144
- this.applyPadding(uiView.padding);
1145
- }
1146
- if (uiView.background) {
1147
- this.applyBackground(uiView.background);
1148
- }
1149
- if (uiView.action) {
1150
- this.applyAction(uiView.action);
1151
- }
1152
- if (uiView.alignment) {
1153
- this.applyAlignment(uiView.alignment);
1154
- }
1155
- if (uiView.shadow) {
1156
- this.applyShadow(uiView.shadow);
1157
- }
1158
- if (uiView.radius) {
1159
- this.applyRadius(uiView.radius);
1160
- }
1161
- if (uiView.spacing) {
1162
- this.applySpacing(uiView.spacing);
1163
- }
1164
- if (uiView.height) {
1165
- this.applyHeight(uiView.height);
1166
- }
1167
- if (uiView.width) {
1168
- this.applyWidth(uiView.width);
1169
- }
1170
- if (uiView.borderWidth) {
1171
- this.applyBorderWidth(uiView.borderWidth);
1172
- }
1173
- if (uiView.borderColor) {
1174
- this.applyBorderColor(uiView.borderColor);
1175
- }
1176
- if (uiView.justify) {
1177
- this.applyJustify(uiView.justify);
1178
- }
1179
- }
1180
- applyPadding(uiPadding) {
1181
- if (uiPadding.top) {
1182
- const padValue = padMapping[uiPadding.top];
1183
- this.renderer.setStyle(this.elementRef.nativeElement, 'padding-top', padValue);
1184
- }
1185
- if (uiPadding.left) {
1186
- const padValue = padMapping[uiPadding.left];
1187
- this.renderer.setStyle(this.elementRef.nativeElement, 'padding-left', padValue);
1188
- }
1189
- if (uiPadding.right) {
1190
- const padValue = padMapping[uiPadding.right];
1191
- this.renderer.setStyle(this.elementRef.nativeElement, 'padding-right', padValue);
1192
- }
1193
- if (uiPadding.bottom) {
1194
- const padValue = padMapping[uiPadding.bottom];
1195
- this.renderer.setStyle(this.elementRef.nativeElement, 'padding-bottom', padValue);
1196
- }
1197
- }
1198
- applyBackground(uiBackground) {
1199
- if (uiBackground.backgroundColor) {
1200
- const backgroundColor = colorMapping[uiBackground.backgroundColor];
1201
- this.renderer.setStyle(this.elementRef.nativeElement, 'background-color', backgroundColor);
1202
- }
1203
- }
1204
- applyAction(uiAction) {
1205
- if (this.disableClick) {
1206
- return;
1207
- }
1208
- this.renderer.setStyle(this.elementRef.nativeElement, 'cursor', 'pointer');
1209
- }
1210
- applyAlignment(uiAlignment) {
1211
- if (uiAlignment.alignment) {
1212
- // console.debug('alignment:', uiAlignment.alignment);
1213
- const alignment = alignmentMapping[uiAlignment.alignment];
1214
- this.renderer.setStyle(this.elementRef.nativeElement, 'align-items', alignment);
1215
- }
1216
- }
1217
- applyShadow(uiShadow) {
1218
- if (uiShadow.color && uiShadow.offsetX && uiShadow.offsetY && uiShadow.blurRadius) {
1219
- const color = colorMapping[uiShadow.color];
1220
- const offsetX = shadowOffsetMapping[uiShadow.offsetX];
1221
- const offsetY = shadowOffsetMapping[uiShadow.offsetY];
1222
- const blurRadius = shadowBlurRadiusMapping[uiShadow.blurRadius];
1223
- const opacity = uiShadow.opacity !== undefined ? uiShadow.opacity : 1;
1224
- // Format: box-shadow: offsetX offsetY blurRadius color
1225
- const shadowValue = `${offsetX} ${offsetY} ${blurRadius} ${color}`;
1226
- this.renderer.setStyle(this.elementRef.nativeElement, 'box-shadow', shadowValue);
1227
- if (opacity !== 1) {
1228
- this.renderer.setStyle(this.elementRef.nativeElement, 'opacity', opacity.toString());
1229
- }
1230
- }
1231
- }
1232
- applyRadius(uiRadius) {
1233
- if (uiRadius.topLeft) {
1234
- const radius = radiusMapping[uiRadius.topLeft];
1235
- this.renderer.setStyle(this.elementRef.nativeElement, 'border-top-left-radius', radius);
1236
- }
1237
- if (uiRadius.topRight) {
1238
- const radius = radiusMapping[uiRadius.topRight];
1239
- this.renderer.setStyle(this.elementRef.nativeElement, 'border-top-right-radius', radius);
1240
- }
1241
- if (uiRadius.bottomLeft) {
1242
- const radius = radiusMapping[uiRadius.bottomLeft];
1243
- this.renderer.setStyle(this.elementRef.nativeElement, 'border-bottom-left-radius', radius);
1244
- }
1245
- if (uiRadius.bottomRight) {
1246
- const radius = radiusMapping[uiRadius.bottomRight];
1247
- this.renderer.setStyle(this.elementRef.nativeElement, 'border-bottom-right-radius', radius);
1248
- }
1249
- }
1250
- applySpacing(uiSpacing) {
1251
- if (uiSpacing.spacing) {
1252
- const spacingValue = spaceMapping[uiSpacing.spacing];
1253
- this.renderer.setStyle(this.elementRef.nativeElement, 'gap', spacingValue);
1254
- }
1255
- }
1256
- applyHeight(height) {
1257
- if (height) {
1258
- const heightValue = dimensionMapping[height];
1259
- this.renderer.setStyle(this.elementRef.nativeElement, 'height', heightValue);
1260
- }
1261
- }
1262
- applyWidth(width) {
1263
- if (width) {
1264
- const widthValue = dimensionMapping[width];
1265
- this.renderer.setStyle(this.elementRef.nativeElement, 'width', widthValue);
1266
- }
1267
- }
1268
- applyBorderWidth(borderWidth) {
1269
- if (borderWidth !== null && borderWidth !== undefined) {
1270
- this.renderer.setStyle(this.elementRef.nativeElement, 'border-width', `${borderWidth}px`);
1271
- // Ensure border style is set, otherwise border-width won't be visible
1272
- this.renderer.setStyle(this.elementRef.nativeElement, 'border-style', 'solid');
1273
- }
1274
- }
1275
- applyBorderColor(borderColor) {
1276
- if (borderColor) {
1277
- const color = colorMapping[borderColor];
1278
- this.renderer.setStyle(this.elementRef.nativeElement, 'border-color', color);
1279
- }
1280
- }
1281
- applyJustify(justify) {
1282
- if (justify) {
1283
- const justifyValue = justifyMapping[justify];
1284
- this.renderer.setStyle(this.elementRef.nativeElement, 'justify-content', justifyValue);
1285
- }
1286
- }
1287
- onClick(event) {
1288
- if (this.disableClick)
1289
- return;
1290
- if (this.edmSduiView?.action) {
1291
- event.stopPropagation();
1292
- this.actionService.execute(this.edmSduiView.action);
1293
- }
1294
- }
1295
- 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 }); }
1296
- 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 }); }
1297
- }
1298
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: UIViewDirective, decorators: [{
1299
- type: Directive,
1300
- args: [{
1301
- selector: '[edmSduiView]',
1302
- standalone: false,
1303
- }]
1304
- }], ctorParameters: () => [{ type: i0.ElementRef }, { type: i0.Renderer2 }, { type: i1$3.Router }, { type: UIActionService }, { type: UIScreenViewModel, decorators: [{
1305
- type: Optional
1306
- }] }], propDecorators: { edmSduiView: [{
1307
- type: Input
1308
- }], disableClick: [{
1309
- type: Input
1310
- }], onClick: [{
1311
- type: HostListener,
1312
- args: ['click', ['$event']]
1313
- }] } });
1314
-
1315
- class NavigationControlsComponent {
1316
- constructor(viewModel) {
1317
- this.viewModel = viewModel;
1318
- }
1319
- ngOnInit() {
1320
- // Monitorar o estado do botão de voltar para debugging
1321
- this.viewModel.canGoBack$.subscribe((canGoBack) => {
1322
- console.debug('[NavigationControls] Estado do botão de voltar:', canGoBack);
1323
- });
1324
- }
1325
- goBack() {
1326
- console.debug('[NavigationControls] Botão de voltar clicado');
1327
- this.viewModel.goBack();
1328
- }
1329
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: NavigationControlsComponent, deps: [{ token: UIScreenViewModel }], target: i0.ɵɵFactoryTarget.Component }); }
1330
- 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" }] }); }
1331
- }
1332
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: NavigationControlsComponent, decorators: [{
1333
- type: Component,
1334
- 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"] }]
1335
- }], ctorParameters: () => [{ type: UIScreenViewModel }] });
1336
-
1337
- class UIScreenComponent {
1338
- constructor(viewModel) {
1339
- this.viewModel = viewModel;
1340
- this.UIScreenIdentifier = UIScreenIdentifier;
1341
- }
1342
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: UIScreenComponent, deps: [{ token: UIScreenViewModel }], target: i0.ɵɵFactoryTarget.Component }); }
1343
- 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" }] }); }
1344
- }
1345
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: UIScreenComponent, decorators: [{
1346
- type: Component,
1347
- 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"] }]
1348
- }], ctorParameters: () => [{ type: UIScreenViewModel }] });
1349
-
1350
- class RowComponent {
1351
- constructor(uiComponent) {
1352
- this.uiComponent = uiComponent;
1353
- }
1354
- ngOnInit() {
1355
- }
1356
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: RowComponent, deps: [{ token: 'uiComponent' }], target: i0.ɵɵFactoryTarget.Component }); }
1357
- 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"] }] }); }
1358
- }
1359
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: RowComponent, decorators: [{
1360
- type: Component,
1361
- 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"] }]
1362
- }], ctorParameters: () => [{ type: undefined, decorators: [{
1363
- type: Inject,
1364
- args: ['uiComponent']
1365
- }] }] });
1366
-
1367
- var row_component = /*#__PURE__*/Object.freeze({
1368
- __proto__: null,
1369
- RowComponent: RowComponent
1370
- });
1371
-
1372
- class ColumnComponent {
1373
- constructor(uiComponent) {
1374
- this.uiComponent = uiComponent;
1375
- }
1376
- ngOnInit() {
1377
- // console.debug('column.uiComponent: ', this.uiComponent);
1378
- }
1379
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: ColumnComponent, deps: [{ token: 'uiComponent' }], target: i0.ɵɵFactoryTarget.Component }); }
1380
- 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"] }] }); }
1381
- }
1382
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: ColumnComponent, decorators: [{
1383
- type: Component,
1384
- 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"] }]
1385
- }], ctorParameters: () => [{ type: undefined, decorators: [{
1386
- type: Inject,
1387
- args: ['uiComponent']
1388
- }] }] });
1389
-
1390
- var column_component = /*#__PURE__*/Object.freeze({
1391
- __proto__: null,
1392
- ColumnComponent: ColumnComponent
1393
- });
1394
-
1395
- var UITextStyle;
1396
- (function (UITextStyle) {
1397
- UITextStyle["LARGE_TITLE"] = "large_title";
1398
- UITextStyle["TITLE_1"] = "title_1";
1399
- UITextStyle["TITLE_2"] = "title_2";
1400
- UITextStyle["TITLE_3"] = "title_3";
1401
- UITextStyle["CALLOUT"] = "callout";
1402
- UITextStyle["HEADLINE"] = "headline";
1403
- UITextStyle["SUBHEADLINE"] = "subheadline";
1404
- UITextStyle["BODY"] = "body";
1405
- UITextStyle["CAPTION_1"] = "caption_1";
1406
- UITextStyle["CAPTION_2"] = "caption_2";
1407
- UITextStyle["FOOTNOTE"] = "footnote";
1408
- })(UITextStyle || (UITextStyle = {}));
1409
-
1410
- class FontSizeMappingService {
1411
- constructor() {
1412
- this.baseFontSize = inject(SDUI_FONT_ADJUST, { optional: true }) ?? 0;
1413
- this.mapping = {
1414
- caption_2: `${13 + this.baseFontSize}px`,
1415
- caption_1: `${14 + this.baseFontSize}px`,
1416
- body: `${16 + this.baseFontSize}px`,
1417
- title_2: `${16 + this.baseFontSize}px`,
1418
- title_1: `${21 + this.baseFontSize}px`,
1419
- callout: `${19 + this.baseFontSize}px`,
1420
- headline: `${18 + this.baseFontSize}px`,
1421
- large_title: `${35 + this.baseFontSize}px`,
1422
- subheadline: `${16 + this.baseFontSize}px`,
1423
- footnote: `${12 + this.baseFontSize}px`,
1424
- };
1425
- }
1426
- getMapping() {
1427
- return this.mapping;
1428
- }
1429
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: FontSizeMappingService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
1430
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: FontSizeMappingService, providedIn: 'root' }); }
1431
- }
1432
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: FontSizeMappingService, decorators: [{
1433
- type: Injectable,
1434
- args: [{ providedIn: 'root' }]
1435
- }], ctorParameters: () => [] });
1436
-
1437
- function getTextStyleMappingFontSize() {
1438
- return inject(FontSizeMappingService).getMapping();
1439
- }
1440
- const textStyleMappingFontWeight = {
1441
- [UITextStyle.BODY]: 'regular',
1442
- [UITextStyle.LARGE_TITLE]: 'bold',
1443
- [UITextStyle.TITLE_1]: 'bold',
1444
- [UITextStyle.TITLE_2]: 'bold',
1445
- [UITextStyle.TITLE_3]: 'bold',
1446
- [UITextStyle.CALLOUT]: 'regular',
1447
- [UITextStyle.HEADLINE]: 'bold',
1448
- [UITextStyle.SUBHEADLINE]: 'bold',
1449
- [UITextStyle.CAPTION_1]: 'regular',
1450
- [UITextStyle.CAPTION_2]: 'regular',
1451
- [UITextStyle.FOOTNOTE]: 'regular',
1452
- };
1453
- const textStyleMappingLineHeight = {
1454
- [UITextStyle.BODY]: '18px',
1455
- [UITextStyle.LARGE_TITLE]: '37px',
1456
- [UITextStyle.TITLE_1]: '23px',
1457
- [UITextStyle.TITLE_2]: '23px',
1458
- [UITextStyle.TITLE_3]: '23px',
1459
- [UITextStyle.CALLOUT]: '21px',
1460
- [UITextStyle.HEADLINE]: '20px',
1461
- [UITextStyle.SUBHEADLINE]: '18px',
1462
- [UITextStyle.CAPTION_1]: '16px',
1463
- [UITextStyle.CAPTION_2]: '15px',
1464
- [UITextStyle.FOOTNOTE]: '14px',
1465
- };
1466
-
1467
- class LabelComponent {
1468
- constructor(uiComponent, renderer, fontSizeMappingService) {
1469
- this.uiComponent = uiComponent;
1470
- this.renderer = renderer;
1471
- this.fontSizeMappingService = fontSizeMappingService;
1472
- }
1473
- ngOnInit() {
1474
- // console.debug('label.uiComponent: ', this.uiComponent);
1475
- }
1476
- ngAfterViewInit() {
1477
- if (this.uiComponent.element) {
1478
- this.applyElement(this.uiComponent.element);
1479
- }
1480
- }
1481
- applyElement(element) {
1482
- if (element.textColor) {
1483
- const color = colorMapping[element.textColor];
1484
- this.renderer.setStyle(this.spanElementRef.nativeElement, 'color', color);
1485
- }
1486
- if (element.textStyle) {
1487
- const textStyleMappingFontSize = this.fontSizeMappingService.getMapping();
1488
- const fontSize = textStyleMappingFontSize[element.textStyle];
1489
- const fontWeight = textStyleMappingFontWeight[element.textStyle];
1490
- const lineHeight = textStyleMappingLineHeight[element.textStyle];
1491
- //TODO: Substituir por classe no futuro.
1492
- this.renderer.setStyle(this.spanElementRef.nativeElement, 'font-weight', fontWeight);
1493
- this.renderer.setStyle(this.spanElementRef.nativeElement, 'font-size', fontSize);
1494
- this.renderer.setStyle(this.spanElementRef.nativeElement, 'line-height', lineHeight);
1495
- }
1496
- const maxLines = element.maxLines ?? 1;
1497
- if (element.maxLines) {
1498
- this.renderer.setStyle(this.spanElementRef.nativeElement, 'display', '-webkit-box');
1499
- this.renderer.setStyle(this.spanElementRef.nativeElement, '-webkit-box-orient', 'vertical');
1500
- this.renderer.setStyle(this.spanElementRef.nativeElement, 'overflow', 'hidden');
1501
- this.renderer.setStyle(this.spanElementRef.nativeElement, 'text-overflow', 'ellipsis');
1502
- this.renderer.setStyle(this.spanElementRef.nativeElement, '-webkit-line-clamp', maxLines);
1503
- }
1504
- if (element.opacity) {
1505
- const opacity = element.opacity;
1506
- this.renderer.setStyle(this.spanElementRef.nativeElement, 'opacity', opacity);
1507
- }
1508
- if (element.alignment) {
1509
- const alignment = element.alignment.alignment;
1510
- switch (alignment) {
1511
- case UIAlignmentType.START: {
1512
- this.renderer.setStyle(this.spanElementRef.nativeElement, 'text-align', 'left');
1513
- break;
1514
- }
1515
- case UIAlignmentType.CENTER: {
1516
- this.renderer.setStyle(this.spanElementRef.nativeElement, 'text-align', 'center');
1517
- break;
1518
- }
1519
- case UIAlignmentType.END: {
1520
- this.renderer.setStyle(this.spanElementRef.nativeElement, 'text-align', 'right');
1521
- break;
1522
- }
1523
- }
1524
- }
1525
- }
1526
- 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 }); }
1527
- 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"] }] }); }
1528
- }
1529
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: LabelComponent, decorators: [{
1530
- type: Component,
1531
- 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"] }]
1532
- }], ctorParameters: () => [{ type: undefined, decorators: [{
1533
- type: Inject,
1534
- args: ['uiComponent']
1535
- }] }, { type: i0.Renderer2 }, { type: FontSizeMappingService }], propDecorators: { spanElementRef: [{
1536
- type: ViewChild,
1537
- args: ['spanElement']
1538
- }] } });
1539
-
1540
- var label_component = /*#__PURE__*/Object.freeze({
1541
- __proto__: null,
1542
- LabelComponent: LabelComponent
1543
- });
1544
-
1545
- class SpaceComponent {
1546
- constructor(uiComponent) {
1547
- this.uiComponent = uiComponent;
1548
- }
1549
- ngOnInit() {
1550
- // console.debug('space.uiComponent: ', this.uiComponent);
1551
- }
1552
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: SpaceComponent, deps: [{ token: 'uiComponent' }], target: i0.ɵɵFactoryTarget.Component }); }
1553
- 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"] }); }
1554
- }
1555
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: SpaceComponent, decorators: [{
1556
- type: Component,
1557
- 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"] }]
1558
- }], ctorParameters: () => [{ type: undefined, decorators: [{
1559
- type: Inject,
1560
- args: ['uiComponent']
1561
- }] }] });
1562
-
1563
- var space_component = /*#__PURE__*/Object.freeze({
1564
- __proto__: null,
1565
- SpaceComponent: SpaceComponent
1566
- });
1567
-
1568
- class ZStackComponent {
1569
- constructor(uiComponent) {
1570
- this.uiComponent = uiComponent;
1571
- }
1572
- ngOnInit() {
1573
- // console.debug('zstack.uiComponent: ', this.uiComponent);
1574
- }
1575
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: ZStackComponent, deps: [{ token: 'uiComponent' }], target: i0.ɵɵFactoryTarget.Component }); }
1576
- 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"] }] }); }
1577
- }
1578
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: ZStackComponent, decorators: [{
1579
- type: Component,
1580
- 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"] }]
1581
- }], ctorParameters: () => [{ type: undefined, decorators: [{
1582
- type: Inject,
1583
- args: ['uiComponent']
1584
- }] }] });
1585
-
1586
- var zstack_component = /*#__PURE__*/Object.freeze({
1587
- __proto__: null,
1588
- ZStackComponent: ZStackComponent
1589
- });
1590
-
1591
- class RowDivisorComponent {
1592
- constructor(uiComponent) {
1593
- this.uiComponent = uiComponent;
1594
- }
1595
- ngOnInit() {
1596
- // console.debug('rowDivisor.uiComponent: ', this.uiComponent);
1597
- }
1598
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: RowDivisorComponent, deps: [{ token: 'uiComponent' }], target: i0.ɵɵFactoryTarget.Component }); }
1599
- 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"] }] }); }
1600
- }
1601
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: RowDivisorComponent, decorators: [{
1602
- type: Component,
1603
- 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"] }]
1604
- }], ctorParameters: () => [{ type: undefined, decorators: [{
1605
- type: Inject,
1606
- args: ['uiComponent']
1607
- }] }] });
1608
-
1609
- var rowDivisor_component = /*#__PURE__*/Object.freeze({
1610
- __proto__: null,
1611
- RowDivisorComponent: RowDivisorComponent
1612
- });
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 }] });
1613
631
 
1614
632
  var UIAsset;
1615
633
  (function (UIAsset) {
@@ -2346,6 +1364,1033 @@ const assetMapping = {
2346
1364
  [UIAsset.IC_SUPPORT_PROFILE]: 'assets/images/ic-support-profile.svg',
2347
1365
  };
2348
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
+
2349
2394
  class ButtonComponent {
2350
2395
  constructor(uiComponent, renderer, fontSizeMappingService) {
2351
2396
  this.uiComponent = uiComponent;
@@ -3270,6 +3315,7 @@ class SduiModule {
3270
3315
  // UIComposite
3271
3316
  UIScreenComponent,
3272
3317
  UINavigationComponent,
3318
+ FabComponent,
3273
3319
  // Layout
3274
3320
  SingleColumnLayoutComponent,
3275
3321
  CenteredContentLayoutComponent,
@@ -3308,6 +3354,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
3308
3354
  // UIComposite
3309
3355
  UIScreenComponent,
3310
3356
  UINavigationComponent,
3357
+ FabComponent,
3311
3358
  // Layout
3312
3359
  SingleColumnLayoutComponent,
3313
3360
  CenteredContentLayoutComponent,