gentera-rdnd 0.2.2 → 0.2.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/fesm2022/gentera-rdnd.mjs +794 -0
- package/fesm2022/gentera-rdnd.mjs.map +1 -0
- package/index.d.ts +552 -0
- package/package.json +17 -9
- package/ng-package.json +0 -7
- package/src/lib/components/button/button.component.html +0 -21
- package/src/lib/components/button/button.component.scss +0 -41
- package/src/lib/components/button/button.component.ts +0 -82
- package/src/lib/components/input/Readme.md +0 -33
- package/src/lib/components/input/input.component.html +0 -50
- package/src/lib/components/input/input.component.scss +0 -86
- package/src/lib/components/input/input.component.ts +0 -133
- package/src/lib/components/modal/modal.component.html +0 -51
- package/src/lib/components/modal/modal.component.scss +0 -50
- package/src/lib/components/modal/modal.component.ts +0 -41
- package/src/lib/components/rdnd-active-indicator/rdnd-active-indicator.component.css +0 -24
- package/src/lib/components/rdnd-active-indicator/rdnd-active-indicator.component.html +0 -12
- package/src/lib/components/rdnd-active-indicator/rdnd-active-indicator.component.ts +0 -18
- package/src/lib/components/rdnd-loader/rdnd-loader.component.html +0 -129
- package/src/lib/components/rdnd-loader/rdnd-loader.component.scss +0 -33
- package/src/lib/components/rdnd-loader/rdnd-loader.component.ts +0 -27
- package/src/lib/components/rdnd-navbar/rdnd-navbar.component.html +0 -19
- package/src/lib/components/rdnd-navbar/rdnd-navbar.component.scss +0 -40
- package/src/lib/components/rdnd-navbar/rdnd-navbar.component.ts +0 -59
- package/src/lib/components/rdnd-sidebar/rdnd-sidebar.component.html +0 -144
- package/src/lib/components/rdnd-sidebar/rdnd-sidebar.component.scss +0 -221
- package/src/lib/components/rdnd-sidebar/rdnd-sidebar.component.ts +0 -65
- package/src/lib/components/screen-title/screen-title.component.html +0 -5
- package/src/lib/components/screen-title/screen-title.component.scss +0 -15
- package/src/lib/components/screen-title/screen-title.component.ts +0 -20
- package/src/lib/config/rdnd-config.token.ts +0 -6
- package/src/lib/gentera-rdnd.component.ts +0 -16
- package/src/lib/gentera-rdnd.service.ts +0 -9
- package/src/lib/hooks/button.service.ts +0 -31
- package/src/lib/hooks/input.service.ts +0 -73
- package/src/lib/hooks/modal.service.ts +0 -112
- package/src/lib/services/storage.service.ts +0 -31
- package/src/lib/styles/colors.scss +0 -63
- package/src/lib/styles/colors.ts +0 -55
- package/src/lib/styles/fonts.scss +0 -93
- package/src/lib/styles/sizes.scss +0 -10
- package/src/lib/styles/themes.ts +0 -114
- package/src/lib/styles/z_indexes.scss +0 -3
- package/src/lib/types/Loader-config.types.ts +0 -8
- package/src/lib/types/Sidebar.types.ts +0 -6
- package/src/public-api.ts +0 -31
- package/tsconfig.lib.json +0 -25
- package/tsconfig.lib.prod.json +0 -11
- package/tsconfig.spec.json +0 -15
|
@@ -0,0 +1,794 @@
|
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
import { Input, Component, output, InjectionToken, Optional, Inject, Injectable, EventEmitter, Output } from '@angular/core';
|
|
3
|
+
import { NgStyle, NgClass, NgIf, CommonModule } from '@angular/common';
|
|
4
|
+
import * as i2 from '@fortawesome/angular-fontawesome';
|
|
5
|
+
import { FaIconComponent, FontAwesomeModule } from '@fortawesome/angular-fontawesome';
|
|
6
|
+
import { faBarsStaggered, faSignOut, faTimes, faArrowRight, faChevronDown, faChevronUp, faCircle, faEyeSlash, faCircleInfo, faCircleCheck, faCircleQuestion } from '@fortawesome/free-solid-svg-icons';
|
|
7
|
+
import { RouterLink } from '@angular/router';
|
|
8
|
+
import { BehaviorSubject, Subscription } from 'rxjs';
|
|
9
|
+
import * as i3 from '@angular/forms';
|
|
10
|
+
import { FormControl, ReactiveFormsModule } from '@angular/forms';
|
|
11
|
+
import { faTriangleExclamation } from '@fortawesome/free-solid-svg-icons/faTriangleExclamation';
|
|
12
|
+
|
|
13
|
+
const colors = {
|
|
14
|
+
black: '#171717',
|
|
15
|
+
'black-light': '#343434',
|
|
16
|
+
'black-dark': '#000000',
|
|
17
|
+
'black-navy': '#191a21',
|
|
18
|
+
'xs-dark-gray': '#5A5A5A',
|
|
19
|
+
'dark-gray': '#9E9E9E',
|
|
20
|
+
'medium-gray': '#AFAFAF',
|
|
21
|
+
gray: '#C4C4C4',
|
|
22
|
+
'light-gray': '#C6C6C6',
|
|
23
|
+
'xs-light-gray': '#DFDFDF',
|
|
24
|
+
'xxs-light-gray': '#F2F2F2',
|
|
25
|
+
'soft-white': '#EEEEEE',
|
|
26
|
+
green: '#28a746',
|
|
27
|
+
'green-medium': '#208B6A',
|
|
28
|
+
'green-dark': '#156a29',
|
|
29
|
+
'green-xs-dark': 'rgb(33, 97, 90)',
|
|
30
|
+
'green-1': '#009F74',
|
|
31
|
+
'green-2': '#00B987',
|
|
32
|
+
'green-3': '#19C496',
|
|
33
|
+
'green-light': '#84ce94',
|
|
34
|
+
'green-4': '#50D8B3',
|
|
35
|
+
'green-5': '#83E6B8',
|
|
36
|
+
"blue-info": '#7390EC',
|
|
37
|
+
blue: '#3360fa',
|
|
38
|
+
'blue-dark': '#1a389e',
|
|
39
|
+
'blue-light': '#3390fa',
|
|
40
|
+
'blue-gray-soft': '#E5EAEDFF',
|
|
41
|
+
'blue-gray-light': 'rgb(244,247,250)',
|
|
42
|
+
orange: '#F77C00',
|
|
43
|
+
'orange-light': '#F7B500',
|
|
44
|
+
yellow: '#F09D00',
|
|
45
|
+
"yellow-normal": '#FFBC57',
|
|
46
|
+
'yellow-light': '#FFC400',
|
|
47
|
+
purple: '#6459be',
|
|
48
|
+
'purple-light': 'rgb(149, 138, 242)',
|
|
49
|
+
red: '#E60018',
|
|
50
|
+
'red-light': '#e74364',
|
|
51
|
+
'red-medium': '#c51628',
|
|
52
|
+
"white": "#FFFFFF",
|
|
53
|
+
"magentaStart": "#C2185B",
|
|
54
|
+
"magentaEnd": "#7E0083",
|
|
55
|
+
'magenta-normal': '#B41364',
|
|
56
|
+
disabled: '#C6C6C6',
|
|
57
|
+
"disabledText": "#9E9E9E",
|
|
58
|
+
};
|
|
59
|
+
|
|
60
|
+
class RdndScreenTitle {
|
|
61
|
+
title;
|
|
62
|
+
align = 'CENTER';
|
|
63
|
+
color = colors["magentaEnd"];
|
|
64
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.1", ngImport: i0, type: RdndScreenTitle, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
65
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.2.1", type: RdndScreenTitle, isStandalone: true, selector: "rdnd-screen-title", inputs: { title: "title", align: "align", color: "color" }, ngImport: i0, template: "<h1 [class]=\" 'align-' + align \" [ngStyle]=\"{\n color: color\n}\">\n {{ title }}\n</h1>\n", styles: ["h1{font-size:24px;font-family:Poppins,sans-serif;font-weight:400;width:100%}h1.align-LEFT{text-align:left}h1.align-CENTER{text-align:center}\n"], dependencies: [{ kind: "directive", type: NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }] });
|
|
66
|
+
}
|
|
67
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.1", ngImport: i0, type: RdndScreenTitle, decorators: [{
|
|
68
|
+
type: Component,
|
|
69
|
+
args: [{ selector: 'rdnd-screen-title', standalone: true, imports: [
|
|
70
|
+
NgClass,
|
|
71
|
+
NgStyle
|
|
72
|
+
], template: "<h1 [class]=\" 'align-' + align \" [ngStyle]=\"{\n color: color\n}\">\n {{ title }}\n</h1>\n", styles: ["h1{font-size:24px;font-family:Poppins,sans-serif;font-weight:400;width:100%}h1.align-LEFT{text-align:left}h1.align-CENTER{text-align:center}\n"] }]
|
|
73
|
+
}], propDecorators: { title: [{
|
|
74
|
+
type: Input
|
|
75
|
+
}], align: [{
|
|
76
|
+
type: Input
|
|
77
|
+
}], color: [{
|
|
78
|
+
type: Input
|
|
79
|
+
}] } });
|
|
80
|
+
|
|
81
|
+
class RdndNavbar {
|
|
82
|
+
// Icons
|
|
83
|
+
faBarsStaggered = faBarsStaggered;
|
|
84
|
+
faSignOut = faSignOut;
|
|
85
|
+
faTimes = faTimes;
|
|
86
|
+
// States
|
|
87
|
+
showLoader = false;
|
|
88
|
+
// Inputs & Outputs
|
|
89
|
+
userName = "";
|
|
90
|
+
imageUrl = "";
|
|
91
|
+
backgroundStart = "#C2185B";
|
|
92
|
+
backgroundEnd = "#7E0083";
|
|
93
|
+
showSidebar = false;
|
|
94
|
+
onSignOut = output();
|
|
95
|
+
onToggleSidebar = output();
|
|
96
|
+
// Functions
|
|
97
|
+
toggleMenu = () => {
|
|
98
|
+
this.showSidebar = !this.showSidebar;
|
|
99
|
+
this.onToggleSidebar.emit();
|
|
100
|
+
};
|
|
101
|
+
closeMenu = () => {
|
|
102
|
+
this.showSidebar = false;
|
|
103
|
+
};
|
|
104
|
+
handleSignOut = () => {
|
|
105
|
+
this.onSignOut.emit();
|
|
106
|
+
};
|
|
107
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.1", ngImport: i0, type: RdndNavbar, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
108
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.2.1", type: RdndNavbar, isStandalone: true, selector: "rdnd-navbar", inputs: { userName: "userName", imageUrl: "imageUrl", backgroundStart: "backgroundStart", backgroundEnd: "backgroundEnd", showSidebar: "showSidebar" }, outputs: { onSignOut: "onSignOut", onToggleSidebar: "onToggleSidebar" }, ngImport: i0, template: "<nav [ngStyle]=\"{'background': 'linear-gradient(to right, ' + backgroundStart + ', ' + backgroundEnd + ')'}\">\n\n <div class=\"rdnd-nav-container\">\n <button (click)=\"toggleMenu()\" >\n <fa-icon [icon]=\"showSidebar ? faTimes : faBarsStaggered\"></fa-icon>\n </button>\n\n @if (imageUrl) {\n <a [routerLink]=\"['/']\">\n <img src=\"{{imageUrl}}\" alt=\"\">\n </a>\n }\n\n <button (click)=\"handleSignOut()\">\n <fa-icon [icon]=\"faSignOut\"></fa-icon>\n </button>\n </div>\n\n</nav>\n", styles: ["nav{width:100%;height:40px;padding:0 16px}nav .rdnd-nav-container{display:flex;flex-direction:row;justify-content:space-between;align-items:center}nav .rdnd-nav-container a img{height:30px}nav .rdnd-nav-container button{appearance:none;cursor:pointer;background-color:transparent;border:0;outline:none;height:40px;width:40px;color:#fff;font-size:18px;transition:all .3s ease}nav .rdnd-nav-container button:hover{opacity:.6}\n"], dependencies: [{ kind: "component", type: FaIconComponent, selector: "fa-icon", inputs: ["icon", "title", "animation", "mask", "flip", "size", "pull", "border", "inverse", "symbol", "rotate", "fixedWidth", "transform", "a11yRole"], outputs: ["iconChange", "titleChange", "animationChange", "maskChange", "flipChange", "sizeChange", "pullChange", "borderChange", "inverseChange", "symbolChange", "rotateChange", "fixedWidthChange", "transformChange", "a11yRoleChange"] }, { kind: "directive", type: NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "directive", type: RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }] });
|
|
109
|
+
}
|
|
110
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.1", ngImport: i0, type: RdndNavbar, decorators: [{
|
|
111
|
+
type: Component,
|
|
112
|
+
args: [{ selector: 'rdnd-navbar', standalone: true, imports: [
|
|
113
|
+
FaIconComponent,
|
|
114
|
+
NgStyle,
|
|
115
|
+
RouterLink
|
|
116
|
+
], template: "<nav [ngStyle]=\"{'background': 'linear-gradient(to right, ' + backgroundStart + ', ' + backgroundEnd + ')'}\">\n\n <div class=\"rdnd-nav-container\">\n <button (click)=\"toggleMenu()\" >\n <fa-icon [icon]=\"showSidebar ? faTimes : faBarsStaggered\"></fa-icon>\n </button>\n\n @if (imageUrl) {\n <a [routerLink]=\"['/']\">\n <img src=\"{{imageUrl}}\" alt=\"\">\n </a>\n }\n\n <button (click)=\"handleSignOut()\">\n <fa-icon [icon]=\"faSignOut\"></fa-icon>\n </button>\n </div>\n\n</nav>\n", styles: ["nav{width:100%;height:40px;padding:0 16px}nav .rdnd-nav-container{display:flex;flex-direction:row;justify-content:space-between;align-items:center}nav .rdnd-nav-container a img{height:30px}nav .rdnd-nav-container button{appearance:none;cursor:pointer;background-color:transparent;border:0;outline:none;height:40px;width:40px;color:#fff;font-size:18px;transition:all .3s ease}nav .rdnd-nav-container button:hover{opacity:.6}\n"] }]
|
|
117
|
+
}], propDecorators: { userName: [{
|
|
118
|
+
type: Input
|
|
119
|
+
}], imageUrl: [{
|
|
120
|
+
type: Input
|
|
121
|
+
}], backgroundStart: [{
|
|
122
|
+
type: Input
|
|
123
|
+
}], backgroundEnd: [{
|
|
124
|
+
type: Input
|
|
125
|
+
}], showSidebar: [{
|
|
126
|
+
type: Input
|
|
127
|
+
}] } });
|
|
128
|
+
|
|
129
|
+
class RdndSidebar {
|
|
130
|
+
// Inputs
|
|
131
|
+
show = false;
|
|
132
|
+
user;
|
|
133
|
+
entries = [];
|
|
134
|
+
backgroundStart = '#C2185B';
|
|
135
|
+
backgroundEnd = '#7E0083';
|
|
136
|
+
activeRoute = '/';
|
|
137
|
+
// Outputs
|
|
138
|
+
onClickEntry = output();
|
|
139
|
+
faArrowRight = faArrowRight;
|
|
140
|
+
faChevronDown = faChevronDown;
|
|
141
|
+
faChevronUp = faChevronUp;
|
|
142
|
+
faCircle = faCircle;
|
|
143
|
+
openSections = new Set();
|
|
144
|
+
handleClick = () => {
|
|
145
|
+
this.onClickEntry.emit();
|
|
146
|
+
};
|
|
147
|
+
toggleSection(name) {
|
|
148
|
+
this.openSections.has(name)
|
|
149
|
+
? this.openSections.delete(name)
|
|
150
|
+
: this.openSections.add(name);
|
|
151
|
+
}
|
|
152
|
+
isSectionOpen(section) {
|
|
153
|
+
const hasActiveChild = section.entries?.some(entry => this.activeRoute === `/${section.url}${entry.url}`);
|
|
154
|
+
return hasActiveChild || this.openSections.has(section.name);
|
|
155
|
+
}
|
|
156
|
+
isActiveRoute(itemRoute) {
|
|
157
|
+
return this.activeRoute === itemRoute;
|
|
158
|
+
}
|
|
159
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.1", ngImport: i0, type: RdndSidebar, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
160
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.2.1", type: RdndSidebar, isStandalone: true, selector: "rdnd-sidebar", inputs: { show: "show", user: "user", entries: "entries", backgroundStart: "backgroundStart", backgroundEnd: "backgroundEnd", activeRoute: "activeRoute" }, outputs: { onClickEntry: "onClickEntry" }, ngImport: i0, template: "@if (show) {\n <div\n class=\"background-overlay\"\n (click)=\"handleClick()\"\n [ngClass]=\"show ? 'open' : 'closed'\">\n </div>\n}\n\n<aside\n id=\"sidebar\"\n class=\"sidebar\"\n [ngClass]=\"show ? 'open' : 'closed'\"\n [ngStyle]=\"{\n 'background': 'linear-gradient(to bottom, ' + backgroundStart + ', ' + backgroundEnd + ')'\n }\"\n>\n\n @if (user) {\n\n <div class=\"user-details\">\n @if (user.photo) {\n <img src=\"{{user.photo}}\" alt='{{user.name}}' class=\"user-image\">\n } @else {\n <div class=\"user-image\">\n <svg version=\"1.1\" id=\"Capa_1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\"\n x=\"0px\" y=\"0px\"\n viewBox=\"0 0 554 481\" style=\"enable-background:new 0 0 554 481;\" xml:space=\"preserve\">\n<style type=\"text/css\">\n\t.st0 {\n fill: none;\n }\n\n .st1 {\n fill: #E85E16;\n }\n\n .st2 {\n fill: #9D0046;\n }\n\n .st3 {\n fill: #592275;\n }\n\n .st4 {\n fill: #CD0058;\n }\n\n .st5 {\n fill: #00587F;\n }\n\n .st6 {\n fill: #229B7D;\n }\n</style>\n <rect class=\"st0\" width=\"554\" height=\"481\"/>\n <g>\n\t<path id=\"naranja\" class=\"st1\" d=\"M277.4,128.4c74.7-40.1,146.4-40,154.5-40c8.1,48,13.7,67-7.9,121.3\n\t\tc-24.2,43.8-169.9,71.1-169.9,71.1l0,0c2.7-5.3-3.7-67.7-3.7-67.7S248.6,141.8,277.4,128.4\"/>\n <path id=\"roja\" class=\"st2\" d=\"M449.8,205.7c-2.6,16-11.6,58-43.6,101.2s-99.9,85.5-138,96s-35.3,8-51.6,8\n\t\tc-10-28.6-11.3-33.9-4.9-81.3s22.9-61.8,56.5-80c24.4-10.7,48.7-17.3,73.1-25.3C379.4,213.7,417.4,208.3,449.8,205.7\"/>\n <path id=\"morada\" class=\"st3\" d=\"M236.8,95.1c18.8-8.3,43.1-16.7,70-25.2c-7.8,18.8-10.1,42.8-15.2,66.9\n\t\tc-6.6,43.2-12.8,104.4-40.2,136.6C217.9,313,127.3,348.2,127,347.6l-2.5,0c-14.4-50.4-20.6-93-15.7-125\n\t\tC116,166.4,150.6,131.2,236.8,95.1L236.8,95.1\"/>\n <path id=\"fushia\" class=\"st4\" d=\"M425.5,246h13.6c-13.5,37.3-31.4,76.2-72,105.6c-69,48.9-98.8,50.7-98.8,50.7S341.4,254,425.5,246\n\t\t\"/>\n <path id=\"azul\" class=\"st5\" d=\"M122.5,344.1L122.5,344.1c13.6,45.3,48.8,69.3,100.3,66.6c24.4-48,44-108.8,52.1-164.7\n\t\tC218,272.7,165.9,312.1,122.5,344.1\"/>\n <path id=\"verde\" class=\"st6\" d=\"M277,232.3c5.4-37.3,10.8-72,16.2-103.9C206.5,171,144.2,251,122.5,344.3\n\t\tc43.4-32,95.2-70.3,152.1-97\"/>\n</g>\n</svg>\n </div>\n }\n\n <div class=\"data\">\n <span>\n <fa-icon [icon]=\"faCircle\" class=\"icon\"></fa-icon>\n {{ user.name }}\n </span>\n <span class=\"email\">\n {{ user.email }}\n </span>\n </div>\n\n </div>\n\n }\n\n <ul class=\"entries\">\n @for (item of entries; track item.name) {\n\n @if (item.type === 'ENTRY') {\n <li>\n <a\n [routerLink]=\"[item.url]\"\n class=\"entry\"\n (click)=\"handleClick()\"\n [ngClass]=\"{\n activeRoute: activeRoute === item.url\n }\"\n >\n <fa-icon [icon]=\"faArrowRight\"/>\n {{ item.name }}\n </a>\n </li>\n } @else if (item.type === 'SECTION') {\n <li class=\"section\">\n\n <div class=\"section-title\" (click)=\"toggleSection(item.name)\">\n <fa-icon\n [icon]=\"isSectionOpen(item) ? faChevronUp : faChevronDown\"\n class=\"chevron\"\n />\n <span>{{ item.name }}</span>\n </div>\n\n @if (isSectionOpen(item)) {\n <ul class=\"section-entries\">\n @for (entry of item.entries; track entry.name) {\n <li>\n <a\n [routerLink]=\"[item.url + entry.url]\"\n (click)=\"handleClick()\"\n class=\"entry\"\n [ngClass]=\"{\n activeRoute: isActiveRoute('/' + item.url + entry.url)\n }\"\n >\n <fa-icon [icon]=\"faArrowRight\" class=\"icon\"/>\n {{ entry.name }}\n </a>\n </li>\n }\n <hr/>\n </ul>\n }\n </li>\n }\n }\n\n </ul>\n</aside>\n", styles: ["@keyframes fadeIn{0%{opacity:0}to{opacity:1}}@keyframes fadeOut{0%{opacity:1;display:flex}to{opacity:0;display:none}}div.background-overlay{position:fixed;top:40px;left:0;width:100%;height:calc(100% - 40px);background-color:#000c;transition:all .3s ease-in-out;-webkit-backdrop-filter:blur(5px);backdrop-filter:blur(5px);z-index:89}div.background-overlay.closed{opacity:0;visibility:hidden;animation:fadeOut .3s ease-in-out}div.background-overlay.open{opacity:1;visibility:visible;animation:fadeIn .3s ease-in-out}aside.sidebar{border-top:1px solid white;position:fixed;top:40px;height:calc(100% - 40px);overflow-y:auto;width:100%;max-width:400px;padding:0 0 16px;display:grid;grid-template-rows:auto 1fr auto;gap:10px;box-sizing:border-box;transition:left .3s ease-in-out;box-shadow:-2px 0 55px #0000004d;z-index:90}aside.sidebar.open{left:0}aside.sidebar.closed{left:-100%}aside.sidebar .user-details{border-top:1px solid rgba(242,242,242,.22);border-bottom:1px solid rgba(242,242,242,.22);margin:0 20px;padding:10px 0;display:grid;grid-template-columns:70px 1fr;grid-template-rows:70px;column-gap:20px;place-items:start;place-content:center;box-sizing:border-box}aside.sidebar .user-details .user-image{background-color:#fff;border:2px solid white;width:70px;height:70px;grid-column:1;grid-row:1/3;border-radius:50%;display:flex;place-items:center;place-content:center}aside.sidebar .user-details .data{grid-row:1;grid-column:2;height:100%;display:flex;flex-direction:column;justify-content:center;margin:auto 0;gap:8px}aside.sidebar .user-details .data span{height:fit-content;margin:0;padding:0;grid-column:2;display:flex;align-items:center;color:#fff;font-size:16px}aside.sidebar .user-details .data span .icon{font-size:8px;color:#65a518;margin-right:4px}aside.sidebar .user-details .data span.email{font-size:12px}aside.sidebar .entries{width:100%;box-sizing:border-box;display:flex;flex-direction:column;align-items:flex-start;justify-content:flex-start}aside.sidebar .entries li{width:100%;box-sizing:border-box}aside.sidebar .entries li .entry{width:100%;margin:0;padding:14px 20px;box-sizing:border-box;background-color:transparent;transition:all .3s ease;color:#fff;text-decoration:none;display:flex;flex-direction:row;align-items:center;justify-content:flex-start;gap:10px;font-size:14px}aside.sidebar .entries li .entry:hover{background-color:#0000004d}aside.sidebar .entries li .entry.activeRoute{background-color:#0000001a}aside.sidebar .entries li.section{width:100%;box-sizing:border-box}aside.sidebar .entries li.section .section-title{width:100%;margin:0;padding:14px 20px;color:#fff;display:flex;flex-direction:row;align-items:center;justify-content:flex-start;gap:14px;-webkit-user-select:none;user-select:none;cursor:pointer;font-size:14px}aside.sidebar .entries li.section .section-title .chevron{font-size:12px}aside.sidebar .entries li.section .section-title:hover{background-color:#ffffff0d}aside.sidebar .entries li.section .section-entries{animation:fadeIn .3s ease-in-out}aside.sidebar .entries li.section .section-entries .entry{padding:14px 30px}aside.sidebar .entries li.section .section-entries .entry .icon{font-size:10px}aside.sidebar .entries li.section .section-entries hr{width:calc(100% - 40px);margin:auto;padding:0 20px 0 30px;color:#fff3;box-sizing:border-box}\n"], dependencies: [{ kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "directive", type: RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "component", type: FaIconComponent, selector: "fa-icon", inputs: ["icon", "title", "animation", "mask", "flip", "size", "pull", "border", "inverse", "symbol", "rotate", "fixedWidth", "transform", "a11yRole"], outputs: ["iconChange", "titleChange", "animationChange", "maskChange", "flipChange", "sizeChange", "pullChange", "borderChange", "inverseChange", "symbolChange", "rotateChange", "fixedWidthChange", "transformChange", "a11yRoleChange"] }] });
|
|
161
|
+
}
|
|
162
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.1", ngImport: i0, type: RdndSidebar, decorators: [{
|
|
163
|
+
type: Component,
|
|
164
|
+
args: [{ selector: 'rdnd-sidebar', standalone: true, imports: [
|
|
165
|
+
NgClass,
|
|
166
|
+
NgStyle,
|
|
167
|
+
RouterLink,
|
|
168
|
+
FaIconComponent,
|
|
169
|
+
], template: "@if (show) {\n <div\n class=\"background-overlay\"\n (click)=\"handleClick()\"\n [ngClass]=\"show ? 'open' : 'closed'\">\n </div>\n}\n\n<aside\n id=\"sidebar\"\n class=\"sidebar\"\n [ngClass]=\"show ? 'open' : 'closed'\"\n [ngStyle]=\"{\n 'background': 'linear-gradient(to bottom, ' + backgroundStart + ', ' + backgroundEnd + ')'\n }\"\n>\n\n @if (user) {\n\n <div class=\"user-details\">\n @if (user.photo) {\n <img src=\"{{user.photo}}\" alt='{{user.name}}' class=\"user-image\">\n } @else {\n <div class=\"user-image\">\n <svg version=\"1.1\" id=\"Capa_1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\"\n x=\"0px\" y=\"0px\"\n viewBox=\"0 0 554 481\" style=\"enable-background:new 0 0 554 481;\" xml:space=\"preserve\">\n<style type=\"text/css\">\n\t.st0 {\n fill: none;\n }\n\n .st1 {\n fill: #E85E16;\n }\n\n .st2 {\n fill: #9D0046;\n }\n\n .st3 {\n fill: #592275;\n }\n\n .st4 {\n fill: #CD0058;\n }\n\n .st5 {\n fill: #00587F;\n }\n\n .st6 {\n fill: #229B7D;\n }\n</style>\n <rect class=\"st0\" width=\"554\" height=\"481\"/>\n <g>\n\t<path id=\"naranja\" class=\"st1\" d=\"M277.4,128.4c74.7-40.1,146.4-40,154.5-40c8.1,48,13.7,67-7.9,121.3\n\t\tc-24.2,43.8-169.9,71.1-169.9,71.1l0,0c2.7-5.3-3.7-67.7-3.7-67.7S248.6,141.8,277.4,128.4\"/>\n <path id=\"roja\" class=\"st2\" d=\"M449.8,205.7c-2.6,16-11.6,58-43.6,101.2s-99.9,85.5-138,96s-35.3,8-51.6,8\n\t\tc-10-28.6-11.3-33.9-4.9-81.3s22.9-61.8,56.5-80c24.4-10.7,48.7-17.3,73.1-25.3C379.4,213.7,417.4,208.3,449.8,205.7\"/>\n <path id=\"morada\" class=\"st3\" d=\"M236.8,95.1c18.8-8.3,43.1-16.7,70-25.2c-7.8,18.8-10.1,42.8-15.2,66.9\n\t\tc-6.6,43.2-12.8,104.4-40.2,136.6C217.9,313,127.3,348.2,127,347.6l-2.5,0c-14.4-50.4-20.6-93-15.7-125\n\t\tC116,166.4,150.6,131.2,236.8,95.1L236.8,95.1\"/>\n <path id=\"fushia\" class=\"st4\" d=\"M425.5,246h13.6c-13.5,37.3-31.4,76.2-72,105.6c-69,48.9-98.8,50.7-98.8,50.7S341.4,254,425.5,246\n\t\t\"/>\n <path id=\"azul\" class=\"st5\" d=\"M122.5,344.1L122.5,344.1c13.6,45.3,48.8,69.3,100.3,66.6c24.4-48,44-108.8,52.1-164.7\n\t\tC218,272.7,165.9,312.1,122.5,344.1\"/>\n <path id=\"verde\" class=\"st6\" d=\"M277,232.3c5.4-37.3,10.8-72,16.2-103.9C206.5,171,144.2,251,122.5,344.3\n\t\tc43.4-32,95.2-70.3,152.1-97\"/>\n</g>\n</svg>\n </div>\n }\n\n <div class=\"data\">\n <span>\n <fa-icon [icon]=\"faCircle\" class=\"icon\"></fa-icon>\n {{ user.name }}\n </span>\n <span class=\"email\">\n {{ user.email }}\n </span>\n </div>\n\n </div>\n\n }\n\n <ul class=\"entries\">\n @for (item of entries; track item.name) {\n\n @if (item.type === 'ENTRY') {\n <li>\n <a\n [routerLink]=\"[item.url]\"\n class=\"entry\"\n (click)=\"handleClick()\"\n [ngClass]=\"{\n activeRoute: activeRoute === item.url\n }\"\n >\n <fa-icon [icon]=\"faArrowRight\"/>\n {{ item.name }}\n </a>\n </li>\n } @else if (item.type === 'SECTION') {\n <li class=\"section\">\n\n <div class=\"section-title\" (click)=\"toggleSection(item.name)\">\n <fa-icon\n [icon]=\"isSectionOpen(item) ? faChevronUp : faChevronDown\"\n class=\"chevron\"\n />\n <span>{{ item.name }}</span>\n </div>\n\n @if (isSectionOpen(item)) {\n <ul class=\"section-entries\">\n @for (entry of item.entries; track entry.name) {\n <li>\n <a\n [routerLink]=\"[item.url + entry.url]\"\n (click)=\"handleClick()\"\n class=\"entry\"\n [ngClass]=\"{\n activeRoute: isActiveRoute('/' + item.url + entry.url)\n }\"\n >\n <fa-icon [icon]=\"faArrowRight\" class=\"icon\"/>\n {{ entry.name }}\n </a>\n </li>\n }\n <hr/>\n </ul>\n }\n </li>\n }\n }\n\n </ul>\n</aside>\n", styles: ["@keyframes fadeIn{0%{opacity:0}to{opacity:1}}@keyframes fadeOut{0%{opacity:1;display:flex}to{opacity:0;display:none}}div.background-overlay{position:fixed;top:40px;left:0;width:100%;height:calc(100% - 40px);background-color:#000c;transition:all .3s ease-in-out;-webkit-backdrop-filter:blur(5px);backdrop-filter:blur(5px);z-index:89}div.background-overlay.closed{opacity:0;visibility:hidden;animation:fadeOut .3s ease-in-out}div.background-overlay.open{opacity:1;visibility:visible;animation:fadeIn .3s ease-in-out}aside.sidebar{border-top:1px solid white;position:fixed;top:40px;height:calc(100% - 40px);overflow-y:auto;width:100%;max-width:400px;padding:0 0 16px;display:grid;grid-template-rows:auto 1fr auto;gap:10px;box-sizing:border-box;transition:left .3s ease-in-out;box-shadow:-2px 0 55px #0000004d;z-index:90}aside.sidebar.open{left:0}aside.sidebar.closed{left:-100%}aside.sidebar .user-details{border-top:1px solid rgba(242,242,242,.22);border-bottom:1px solid rgba(242,242,242,.22);margin:0 20px;padding:10px 0;display:grid;grid-template-columns:70px 1fr;grid-template-rows:70px;column-gap:20px;place-items:start;place-content:center;box-sizing:border-box}aside.sidebar .user-details .user-image{background-color:#fff;border:2px solid white;width:70px;height:70px;grid-column:1;grid-row:1/3;border-radius:50%;display:flex;place-items:center;place-content:center}aside.sidebar .user-details .data{grid-row:1;grid-column:2;height:100%;display:flex;flex-direction:column;justify-content:center;margin:auto 0;gap:8px}aside.sidebar .user-details .data span{height:fit-content;margin:0;padding:0;grid-column:2;display:flex;align-items:center;color:#fff;font-size:16px}aside.sidebar .user-details .data span .icon{font-size:8px;color:#65a518;margin-right:4px}aside.sidebar .user-details .data span.email{font-size:12px}aside.sidebar .entries{width:100%;box-sizing:border-box;display:flex;flex-direction:column;align-items:flex-start;justify-content:flex-start}aside.sidebar .entries li{width:100%;box-sizing:border-box}aside.sidebar .entries li .entry{width:100%;margin:0;padding:14px 20px;box-sizing:border-box;background-color:transparent;transition:all .3s ease;color:#fff;text-decoration:none;display:flex;flex-direction:row;align-items:center;justify-content:flex-start;gap:10px;font-size:14px}aside.sidebar .entries li .entry:hover{background-color:#0000004d}aside.sidebar .entries li .entry.activeRoute{background-color:#0000001a}aside.sidebar .entries li.section{width:100%;box-sizing:border-box}aside.sidebar .entries li.section .section-title{width:100%;margin:0;padding:14px 20px;color:#fff;display:flex;flex-direction:row;align-items:center;justify-content:flex-start;gap:14px;-webkit-user-select:none;user-select:none;cursor:pointer;font-size:14px}aside.sidebar .entries li.section .section-title .chevron{font-size:12px}aside.sidebar .entries li.section .section-title:hover{background-color:#ffffff0d}aside.sidebar .entries li.section .section-entries{animation:fadeIn .3s ease-in-out}aside.sidebar .entries li.section .section-entries .entry{padding:14px 30px}aside.sidebar .entries li.section .section-entries .entry .icon{font-size:10px}aside.sidebar .entries li.section .section-entries hr{width:calc(100% - 40px);margin:auto;padding:0 20px 0 30px;color:#fff3;box-sizing:border-box}\n"] }]
|
|
170
|
+
}], propDecorators: { show: [{
|
|
171
|
+
type: Input
|
|
172
|
+
}], user: [{
|
|
173
|
+
type: Input
|
|
174
|
+
}], entries: [{
|
|
175
|
+
type: Input
|
|
176
|
+
}], backgroundStart: [{
|
|
177
|
+
type: Input
|
|
178
|
+
}], backgroundEnd: [{
|
|
179
|
+
type: Input
|
|
180
|
+
}], activeRoute: [{
|
|
181
|
+
type: Input
|
|
182
|
+
}] } });
|
|
183
|
+
|
|
184
|
+
// src/lib/config/rdnd-config.token.ts
|
|
185
|
+
const RDND_CONFIG = new InjectionToken('RDND_CONFIG');
|
|
186
|
+
|
|
187
|
+
class RdndLoaderComponent {
|
|
188
|
+
show = false;
|
|
189
|
+
loaderType = 'gentera';
|
|
190
|
+
constructor(config) {
|
|
191
|
+
const type = config?.loader?.loaderType;
|
|
192
|
+
if (type === 'gentera' || type === 'compartamos') {
|
|
193
|
+
this.loaderType = type;
|
|
194
|
+
}
|
|
195
|
+
}
|
|
196
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.1", ngImport: i0, type: RdndLoaderComponent, deps: [{ token: RDND_CONFIG, optional: true }], target: i0.ɵɵFactoryTarget.Component });
|
|
197
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.2.1", type: RdndLoaderComponent, isStandalone: true, selector: "rdnd-loader", inputs: { show: "show" }, ngImport: i0, template: "@if (show) {\n <div class=\"loader\">\n @if (loaderType === 'compartamos') {\n <div class=\"svg-wrapper\">\n <svg xmlns=\"http://www.w3.org/2000/svg\" version=\"1.1\" xmlns:cc=\"http://creativecommons.org/ns#\"\n xmlns:dc=\"http://purl.org/dc/elements/1.1/\" xmlns:inkscape=\"http://www.inkscape.org/namespaces/inkscape\"\n xmlns:rdf=\"http://www.w3.org/1999/02/22-rdf-syntax-ns#\"\n xmlns:sodipodi=\"http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd\" xmlns:svg=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 1629.3 720\">\n <defs>\n <style>\n .cls-1 {\n fill: #fff;\n }\n\n .cls-2 {\n fill: #8d104b;\n }\n\n .cls-3 {\n fill: #f7961c;\n }\n </style>\n </defs>\n <!-- Generator: Adobe Illustrator 28.7.1, SVG Export Plug-In . SVG Version: 1.2.0 Build 142) -->\n <g>\n <g id=\"Capa_1\">\n <path id=\"path16\" class=\"cls-3\"\n d=\"M664.5,84.3c-7,1.3-43.6-10.4-43.6-10.4,0,0,26.2,19.3,28.4,22.7,2.2,3.5-7.9,33-7.9,33,0,0,19.3-22.3,26.6-29,4.4-4,14.6-2.1,19.5-.9,4.9,1.2,53.4,14.5,101.8-14.4,31.6-18.9,31.5-23,31.5-23,0,0-26.5-21.5-69.6-16.6-43.2,5-79.8,37.1-86.8,38.4\"/>\n <path id=\"path18\" class=\"cls-2\"\n d=\"M507.7,668.9c-8.4,2.3-52.7,1.7-52.7,1.7,0,0,31,14,33.5,17,2.4,2.9-10.4,32.4-10.4,32.4,0,0,20.7-21.3,29.6-28.8,5.4-4.5,17.1-5.9,26.7-6.7,5.9-.5,63.8,5.2,122.8-29.6,38.5-22.7,38.5-26.6,38.5-26.6,0,0-37.8-20.3-89.8-8.8-51.9,11.5-89.7,47.1-98.1,49.5\"/>\n <path id=\"path20\" class=\"cls-3\"\n d=\"M1368.2,125.5c-11.8,2.3-72.1-3.5-72.1-3.5,0,0,40.7,22.6,43.8,26.9,3,4.2-17.9,43.1-17.9,43.1,0,0,30.6-26.8,43.7-35.9,7.9-5.6,24.1-6.1,37.1-6.1s86.5,14.3,171-26.6c55.2-26.8,55.5-32.1,55.5-32.1,0,0-49.3-32-121.6-22.2-72.2,9.9-127.7,54.2-139.5,56.5\"/>\n <path id=\"path22\" class=\"cls-3\"\n d=\"M77.2,575.8c-12.3,2.6-77.2-17-77.2-17,0,0,46.9,33.2,50.8,39.3,3.8,6.1-13,58.5-13,58.5,0,0,33.4-39.9,46.1-51.8,7.7-7.3,25.8-4.1,34.4-2.1,8.7,1.9,94.7,24,179.3-28.3,55.2-34.1,54.9-41.4,54.9-41.4,0,0-47.3-37.2-123.3-27.2-76,10-139.7,67.8-152.1,70.3\"/>\n <path id=\"path24\" class=\"cls-2\"\n d=\"M1194.7,50.2c-7.7,1.5-45.8-10.6-45.8-10.6,0,0,27.1,19.3,28.4,23,1.5,4.1-10.4,31.9-10.4,31.9,0,0,22.4-22,30.8-28.6,5.1-4,16.2-2.5,21.5-1.5,5.4,1,59.2,12.3,113.8-17.2,32.8-17.7,34.9-22.9,34.9-22.9,0,0-27.9-19.8-75.7-13.6-47.7,6.1-89.7,38.1-97.5,39.6\"/>\n <path id=\"path26\" class=\"cls-1\"\n d=\"M1062.8,620.1c0,38.8-36.7,62.4-79.1,62.4s-31.5-2.1-50.6-2.1l31.5-198.2c20.9,0,26.7-2.6,46.7-2.6,37.1,0,54.7,19.4,54.7,43.5s-19.4,43.2-44.7,49.1c23,5,41.5,26.1,41.5,47.9M1040.8,620.7c0-19.1-13.8-38.3-56.4-38.3s-11.2.3-17.7.9l-11.8,74.1c-.9,5.6,7.4,8,29.7,8s56.2-17.1,56.2-44.8M1044.6,525.4c0-16.8-12.1-29.5-36.8-29.5s-26.2,2.4-27.3,8.2c-4.4,22.1-8.8,48.3-11.2,62.1h11.2c46.7-1.2,64.1-18,64.1-40.9\"/>\n <path id=\"path28\" class=\"cls-1\"\n d=\"M1171.1,680.4c-2.3-9.4-2.3-17.7-1.5-27.3-9.7,14.1-25,30.2-47.4,30.2s-38.5-20.8-38.5-45.8c0-41.5,32.6-95.6,79.1-95.6s20,4.7,39.4,4.7c-10.3,49.7-16.8,97.6-16.8,118.5s.5,12.4,1.2,15.3h-15.6.1ZM1162,557.4c-31.8,0-58.5,39.7-58.5,78.2s8,31.3,22,31.3c25.3,0,44.1-32.1,49.5-63.3l5.9-34.1c.9-6.7-3.2-12-18.8-12\"/>\n <path id=\"path30\" class=\"cls-1\"\n d=\"M1247.1,574.5l-16.8,105.8h-17.6l20.9-131.1c25.9,0,32.4-7.4,52.7-7.4s40.5,9.1,40.5,34.4-.3,7-.9,10.9l-14.6,93.2h-17.7l14.1-88.8c.6-3.5.9-6.8.9-9.7,0-17.1-7.3-24.4-26.7-24.4s-33.5,9.4-34.7,17.1\"/>\n <path id=\"path32\" class=\"cls-1\"\n d=\"M1418.6,557.7c-33.2,0-56.2,28.2-56.2,72.7s15,38.5,37.4,38.5,17-.8,24.1-2.6l-2.3,15.6c-7.6,1.7-15,2.6-21.7,2.6-35,0-57.2-17.9-57.2-53.8s32.1-88.8,78.9-88.8,14.7.5,21.7,1.8l-2.6,17.3c-7.3-2.3-15-3.2-22-3.2\"/>\n <path id=\"path34\" class=\"cls-1\"\n d=\"M1560.5,593.9c0,46.8-27.1,90.6-68.9,90.6s-45-18.8-45-52.1c0-47.1,27.6-90.6,68.8-90.6s45.1,19.1,45.1,52M1465.7,631.2c0,26.1,9.5,37.9,28.2,37.9s47.3-32.6,47.3-73.5-8.5-38.2-27.6-38.2c-27.1,0-48,33-48,73.8\"/>\n <path id=\"path36\" class=\"cls-1\"\n d=\"M179.3,400.2c-12.4,5.9-27.1,8.9-41.2,8.9-54.4,0-101.3-28.8-101.3-102.7s48.3-104.9,102.8-104.9,28,1.8,39.8,5.3v34.5c-12-5-25.4-8-40-8-38.3,0-65.7,19.4-65.7,72.2s29.7,71.6,65.9,71.6,27.4-2.4,39.8-7.7v30.9\"/>\n <path id=\"path38\" class=\"cls-1\"\n d=\"M228.5,335.5c0,29.7,12.9,44.4,29.1,44.4s28-13.5,28-44.4-13-44.2-29.5-44.2-27.6,13.2-27.6,44.2M320.3,335.5c0,43.2-25,73.3-63.6,73.3s-63.3-30.1-63.3-73.3,25.3-72.7,63.3-72.7,63.6,28.8,63.6,72.7\"/>\n <path id=\"path40\" class=\"cls-1\"\n d=\"M522.5,404.6h-32.5v-88c0-18.2-7-25-21.7-25s-21.2,3.5-21.2,10.2c.3,3.2.9,7.4.9,11.8v91h-32.4v-88c0-18.5-7.4-25-20-25s-21.8,2.9-21.8,12.9v100.1h-32.4v-134.9c28.6,0,37.7-6.5,58.9-6.5s26.8,4.4,33.8,10.6c10.6-6.8,24.1-10.6,41.5-10.6,28,0,46.9,12.7,46.9,48.9v92.5\"/>\n <path id=\"path42\" class=\"cls-1\"\n d=\"M597.2,290.4c-10.8,0-17.8,4.7-17.8,9.5v70.6c0,5,7.8,9.4,17.8,9.4,20.5,0,32.3-13.5,32.3-44.2s-11.8-45.3-32.3-45.3M546.3,477.9c.6-30.9,1.2-61.5,1.2-100.1v-110.4c20,0,32.7-4.7,52.3-4.7,35.7,0,65.4,25.6,65.4,73.6s-31.8,71.5-61.2,71.5-20-3-24.5-6.2v76.2h-33.2\"/>\n <path id=\"path44\" class=\"cls-1\"\n d=\"M753,337.8c-26.8.8-40.6,9.1-40.6,24.7s8.3,18,20.9,18,17.4-3.2,18.6-7.4c.9-4.4,1.1-17.6,1.1-35.3M753,313.7v-5.3c0-11.2-7.6-17.9-21.4-17.9s-28.3,2.7-43,9.4v-30.3c15.3-4.4,29.1-6.7,45.6-6.7,31.8,0,51.5,12.9,51.5,45.3s-.9,42.4-.9,64.2.6,24.2,1.5,31.5c-23.6,0-36.2,3.8-56.2,3.8-34.1,0-51.2-15.8-51.2-42.6s22.4-49.8,74.1-51.2\"/>\n <path id=\"path46\" class=\"cls-1\"\n d=\"M810.8,404.6v-137.8h30.6v13c8.2-13,22.1-17.4,35.6-17.4s10.5.6,15,1.2v34.1c-5.6-2.6-14.5-3.8-22.7-3.8-13.2,0-25,5.3-25.7,16.8-.6,23.2-.6,58.8-.6,93.9h-32.4\"/>\n <path id=\"path48\" class=\"cls-1\"\n d=\"M937.9,266.8h39.7v28.3h-39.7c0,29.1-.3,49.2-.3,70.7s6.2,14.4,17.1,14.4,15.9-1.5,22.9-5.3v28.5c-9.7,3.6-19.7,5.3-31.5,5.3-23.5,0-40.9-10.9-40.9-36.5v-130.4l32.7-19.4v44.4\"/>\n <path id=\"path50\" class=\"cls-1\"\n d=\"M1068.6,337.8c-26.8.8-40.6,9.1-40.6,24.7s8.2,18,20.9,18,17.3-3.2,18.5-7.4c.9-4.4,1.2-17.6,1.2-35.3M1068.6,313.7v-5.3c0-11.2-7.7-17.9-21.5-17.9s-28.3,2.7-43,9.4v-30.3c15.3-4.4,29-6.7,45.6-6.7,31.8,0,51.5,12.9,51.5,45.3s-.9,42.4-.9,64.2.6,24.2,1.5,31.5c-23.5,0-36.2,3.8-56.3,3.8-34.1,0-51.2-15.8-51.2-42.6s22.4-49.8,74.2-51.2\"/>\n <path id=\"path52\" class=\"cls-1\"\n d=\"M1307.8,404.6h-32.4v-88c0-18.2-7.1-25-21.8-25s-21.2,3.5-21.2,10.2c.2,3.2.9,7.4.9,11.8v91h-32.4v-88c0-18.5-7.4-25-20-25s-21.8,2.9-21.8,12.9v100.1h-32.3v-134.9c28.5,0,37.7-6.5,58.8-6.5s26.8,4.4,33.9,10.6c10.6-6.8,24.1-10.6,41.5-10.6,28,0,46.8,12.7,46.8,48.9v92.5\"/>\n <path id=\"path54\" class=\"cls-1\"\n d=\"M1363,335.5c0,29.7,13,44.4,29.2,44.4s27.9-13.5,27.9-44.4-12.9-44.2-29.4-44.2-27.8,13.2-27.8,44.2M1454.9,335.5c0,43.2-25,73.3-63.6,73.3s-63.3-30.1-63.3-73.3,25.4-72.7,63.3-72.7,63.6,28.8,63.6,72.7\"/>\n <path id=\"path56\" class=\"cls-1\"\n d=\"M1522.2,262.7c10.9,0,20,.8,31.8,4.1v30.7c-13.8-5.6-23.6-7.1-33-7.1s-18.2,4.7-18.2,11.8c0,21.2,57.6,19.1,57.6,61.5s-16.5,45-54.7,45-24.4-1.2-35.9-4.7v-28.8c11.2,3.8,24.4,5.6,33.8,5.6,15.6,0,23.5-5.9,23.5-15,0-23.3-58-19.7-58-60.1s20.1-43,53-43\"/>\n </g>\n </g>\n </svg>\n </div>\n } @else {\n <div class=\"svg-wrapper\">\n <svg version=\"1.1\" id=\"Capa_1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\"\n x=\"0px\" y=\"0px\"\n viewBox=\"0 0 554 481\" style=\"enable-background:new 0 0 554 481;\" xml:space=\"preserve\">\n<style type=\"text/css\">\n\t.st0 {\n fill: none;\n }\n\n .st1 {\n fill: #E85E16;\n }\n\n .st2 {\n fill: #9D0046;\n }\n\n .st3 {\n fill: #592275;\n }\n\n .st4 {\n fill: #CD0058;\n }\n\n .st5 {\n fill: #00587F;\n }\n\n .st6 {\n fill: #229B7D;\n }\n</style>\n <rect class=\"st0\" width=\"554\" height=\"481\"/>\n <g>\n\t<path id=\"naranja\" class=\"st1\" d=\"M277.4,128.4c74.7-40.1,146.4-40,154.5-40c8.1,48,13.7,67-7.9,121.3\n\t\tc-24.2,43.8-169.9,71.1-169.9,71.1l0,0c2.7-5.3-3.7-67.7-3.7-67.7S248.6,141.8,277.4,128.4\"/>\n <path id=\"roja\" class=\"st2\" d=\"M449.8,205.7c-2.6,16-11.6,58-43.6,101.2s-99.9,85.5-138,96s-35.3,8-51.6,8\n\t\tc-10-28.6-11.3-33.9-4.9-81.3s22.9-61.8,56.5-80c24.4-10.7,48.7-17.3,73.1-25.3C379.4,213.7,417.4,208.3,449.8,205.7\"/>\n <path id=\"morada\" class=\"st3\" d=\"M236.8,95.1c18.8-8.3,43.1-16.7,70-25.2c-7.8,18.8-10.1,42.8-15.2,66.9\n\t\tc-6.6,43.2-12.8,104.4-40.2,136.6C217.9,313,127.3,348.2,127,347.6l-2.5,0c-14.4-50.4-20.6-93-15.7-125\n\t\tC116,166.4,150.6,131.2,236.8,95.1L236.8,95.1\"/>\n <path id=\"fushia\" class=\"st4\" d=\"M425.5,246h13.6c-13.5,37.3-31.4,76.2-72,105.6c-69,48.9-98.8,50.7-98.8,50.7S341.4,254,425.5,246\n\t\t\"/>\n <path id=\"azul\" class=\"st5\" d=\"M122.5,344.1L122.5,344.1c13.6,45.3,48.8,69.3,100.3,66.6c24.4-48,44-108.8,52.1-164.7\n\t\tC218,272.7,165.9,312.1,122.5,344.1\"/>\n <path id=\"verde\" class=\"st6\" d=\"M277,232.3c5.4-37.3,10.8-72,16.2-103.9C206.5,171,144.2,251,122.5,344.3\n\t\tc43.4-32,95.2-70.3,152.1-97\"/>\n</g>\n</svg>\n\n </div>\n }\n </div>\n}\n", styles: ["@keyframes bounce{0%{opacity:.1}to{opacity:1}}.loader{position:fixed;z-index:100000000000000000;inset:0;background-color:#000c;-webkit-backdrop-filter:blur(5px);backdrop-filter:blur(5px);display:flex;place-items:center;place-content:center}.loader .svg-wrapper{width:80px;animation:bounce 1s ease-in-out infinite alternate}.loader .svg-wrapper svg{width:100%;height:auto;display:block}\n"] });
|
|
198
|
+
}
|
|
199
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.1", ngImport: i0, type: RdndLoaderComponent, decorators: [{
|
|
200
|
+
type: Component,
|
|
201
|
+
args: [{ selector: 'rdnd-loader', standalone: true, imports: [], template: "@if (show) {\n <div class=\"loader\">\n @if (loaderType === 'compartamos') {\n <div class=\"svg-wrapper\">\n <svg xmlns=\"http://www.w3.org/2000/svg\" version=\"1.1\" xmlns:cc=\"http://creativecommons.org/ns#\"\n xmlns:dc=\"http://purl.org/dc/elements/1.1/\" xmlns:inkscape=\"http://www.inkscape.org/namespaces/inkscape\"\n xmlns:rdf=\"http://www.w3.org/1999/02/22-rdf-syntax-ns#\"\n xmlns:sodipodi=\"http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd\" xmlns:svg=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 1629.3 720\">\n <defs>\n <style>\n .cls-1 {\n fill: #fff;\n }\n\n .cls-2 {\n fill: #8d104b;\n }\n\n .cls-3 {\n fill: #f7961c;\n }\n </style>\n </defs>\n <!-- Generator: Adobe Illustrator 28.7.1, SVG Export Plug-In . SVG Version: 1.2.0 Build 142) -->\n <g>\n <g id=\"Capa_1\">\n <path id=\"path16\" class=\"cls-3\"\n d=\"M664.5,84.3c-7,1.3-43.6-10.4-43.6-10.4,0,0,26.2,19.3,28.4,22.7,2.2,3.5-7.9,33-7.9,33,0,0,19.3-22.3,26.6-29,4.4-4,14.6-2.1,19.5-.9,4.9,1.2,53.4,14.5,101.8-14.4,31.6-18.9,31.5-23,31.5-23,0,0-26.5-21.5-69.6-16.6-43.2,5-79.8,37.1-86.8,38.4\"/>\n <path id=\"path18\" class=\"cls-2\"\n d=\"M507.7,668.9c-8.4,2.3-52.7,1.7-52.7,1.7,0,0,31,14,33.5,17,2.4,2.9-10.4,32.4-10.4,32.4,0,0,20.7-21.3,29.6-28.8,5.4-4.5,17.1-5.9,26.7-6.7,5.9-.5,63.8,5.2,122.8-29.6,38.5-22.7,38.5-26.6,38.5-26.6,0,0-37.8-20.3-89.8-8.8-51.9,11.5-89.7,47.1-98.1,49.5\"/>\n <path id=\"path20\" class=\"cls-3\"\n d=\"M1368.2,125.5c-11.8,2.3-72.1-3.5-72.1-3.5,0,0,40.7,22.6,43.8,26.9,3,4.2-17.9,43.1-17.9,43.1,0,0,30.6-26.8,43.7-35.9,7.9-5.6,24.1-6.1,37.1-6.1s86.5,14.3,171-26.6c55.2-26.8,55.5-32.1,55.5-32.1,0,0-49.3-32-121.6-22.2-72.2,9.9-127.7,54.2-139.5,56.5\"/>\n <path id=\"path22\" class=\"cls-3\"\n d=\"M77.2,575.8c-12.3,2.6-77.2-17-77.2-17,0,0,46.9,33.2,50.8,39.3,3.8,6.1-13,58.5-13,58.5,0,0,33.4-39.9,46.1-51.8,7.7-7.3,25.8-4.1,34.4-2.1,8.7,1.9,94.7,24,179.3-28.3,55.2-34.1,54.9-41.4,54.9-41.4,0,0-47.3-37.2-123.3-27.2-76,10-139.7,67.8-152.1,70.3\"/>\n <path id=\"path24\" class=\"cls-2\"\n d=\"M1194.7,50.2c-7.7,1.5-45.8-10.6-45.8-10.6,0,0,27.1,19.3,28.4,23,1.5,4.1-10.4,31.9-10.4,31.9,0,0,22.4-22,30.8-28.6,5.1-4,16.2-2.5,21.5-1.5,5.4,1,59.2,12.3,113.8-17.2,32.8-17.7,34.9-22.9,34.9-22.9,0,0-27.9-19.8-75.7-13.6-47.7,6.1-89.7,38.1-97.5,39.6\"/>\n <path id=\"path26\" class=\"cls-1\"\n d=\"M1062.8,620.1c0,38.8-36.7,62.4-79.1,62.4s-31.5-2.1-50.6-2.1l31.5-198.2c20.9,0,26.7-2.6,46.7-2.6,37.1,0,54.7,19.4,54.7,43.5s-19.4,43.2-44.7,49.1c23,5,41.5,26.1,41.5,47.9M1040.8,620.7c0-19.1-13.8-38.3-56.4-38.3s-11.2.3-17.7.9l-11.8,74.1c-.9,5.6,7.4,8,29.7,8s56.2-17.1,56.2-44.8M1044.6,525.4c0-16.8-12.1-29.5-36.8-29.5s-26.2,2.4-27.3,8.2c-4.4,22.1-8.8,48.3-11.2,62.1h11.2c46.7-1.2,64.1-18,64.1-40.9\"/>\n <path id=\"path28\" class=\"cls-1\"\n d=\"M1171.1,680.4c-2.3-9.4-2.3-17.7-1.5-27.3-9.7,14.1-25,30.2-47.4,30.2s-38.5-20.8-38.5-45.8c0-41.5,32.6-95.6,79.1-95.6s20,4.7,39.4,4.7c-10.3,49.7-16.8,97.6-16.8,118.5s.5,12.4,1.2,15.3h-15.6.1ZM1162,557.4c-31.8,0-58.5,39.7-58.5,78.2s8,31.3,22,31.3c25.3,0,44.1-32.1,49.5-63.3l5.9-34.1c.9-6.7-3.2-12-18.8-12\"/>\n <path id=\"path30\" class=\"cls-1\"\n d=\"M1247.1,574.5l-16.8,105.8h-17.6l20.9-131.1c25.9,0,32.4-7.4,52.7-7.4s40.5,9.1,40.5,34.4-.3,7-.9,10.9l-14.6,93.2h-17.7l14.1-88.8c.6-3.5.9-6.8.9-9.7,0-17.1-7.3-24.4-26.7-24.4s-33.5,9.4-34.7,17.1\"/>\n <path id=\"path32\" class=\"cls-1\"\n d=\"M1418.6,557.7c-33.2,0-56.2,28.2-56.2,72.7s15,38.5,37.4,38.5,17-.8,24.1-2.6l-2.3,15.6c-7.6,1.7-15,2.6-21.7,2.6-35,0-57.2-17.9-57.2-53.8s32.1-88.8,78.9-88.8,14.7.5,21.7,1.8l-2.6,17.3c-7.3-2.3-15-3.2-22-3.2\"/>\n <path id=\"path34\" class=\"cls-1\"\n d=\"M1560.5,593.9c0,46.8-27.1,90.6-68.9,90.6s-45-18.8-45-52.1c0-47.1,27.6-90.6,68.8-90.6s45.1,19.1,45.1,52M1465.7,631.2c0,26.1,9.5,37.9,28.2,37.9s47.3-32.6,47.3-73.5-8.5-38.2-27.6-38.2c-27.1,0-48,33-48,73.8\"/>\n <path id=\"path36\" class=\"cls-1\"\n d=\"M179.3,400.2c-12.4,5.9-27.1,8.9-41.2,8.9-54.4,0-101.3-28.8-101.3-102.7s48.3-104.9,102.8-104.9,28,1.8,39.8,5.3v34.5c-12-5-25.4-8-40-8-38.3,0-65.7,19.4-65.7,72.2s29.7,71.6,65.9,71.6,27.4-2.4,39.8-7.7v30.9\"/>\n <path id=\"path38\" class=\"cls-1\"\n d=\"M228.5,335.5c0,29.7,12.9,44.4,29.1,44.4s28-13.5,28-44.4-13-44.2-29.5-44.2-27.6,13.2-27.6,44.2M320.3,335.5c0,43.2-25,73.3-63.6,73.3s-63.3-30.1-63.3-73.3,25.3-72.7,63.3-72.7,63.6,28.8,63.6,72.7\"/>\n <path id=\"path40\" class=\"cls-1\"\n d=\"M522.5,404.6h-32.5v-88c0-18.2-7-25-21.7-25s-21.2,3.5-21.2,10.2c.3,3.2.9,7.4.9,11.8v91h-32.4v-88c0-18.5-7.4-25-20-25s-21.8,2.9-21.8,12.9v100.1h-32.4v-134.9c28.6,0,37.7-6.5,58.9-6.5s26.8,4.4,33.8,10.6c10.6-6.8,24.1-10.6,41.5-10.6,28,0,46.9,12.7,46.9,48.9v92.5\"/>\n <path id=\"path42\" class=\"cls-1\"\n d=\"M597.2,290.4c-10.8,0-17.8,4.7-17.8,9.5v70.6c0,5,7.8,9.4,17.8,9.4,20.5,0,32.3-13.5,32.3-44.2s-11.8-45.3-32.3-45.3M546.3,477.9c.6-30.9,1.2-61.5,1.2-100.1v-110.4c20,0,32.7-4.7,52.3-4.7,35.7,0,65.4,25.6,65.4,73.6s-31.8,71.5-61.2,71.5-20-3-24.5-6.2v76.2h-33.2\"/>\n <path id=\"path44\" class=\"cls-1\"\n d=\"M753,337.8c-26.8.8-40.6,9.1-40.6,24.7s8.3,18,20.9,18,17.4-3.2,18.6-7.4c.9-4.4,1.1-17.6,1.1-35.3M753,313.7v-5.3c0-11.2-7.6-17.9-21.4-17.9s-28.3,2.7-43,9.4v-30.3c15.3-4.4,29.1-6.7,45.6-6.7,31.8,0,51.5,12.9,51.5,45.3s-.9,42.4-.9,64.2.6,24.2,1.5,31.5c-23.6,0-36.2,3.8-56.2,3.8-34.1,0-51.2-15.8-51.2-42.6s22.4-49.8,74.1-51.2\"/>\n <path id=\"path46\" class=\"cls-1\"\n d=\"M810.8,404.6v-137.8h30.6v13c8.2-13,22.1-17.4,35.6-17.4s10.5.6,15,1.2v34.1c-5.6-2.6-14.5-3.8-22.7-3.8-13.2,0-25,5.3-25.7,16.8-.6,23.2-.6,58.8-.6,93.9h-32.4\"/>\n <path id=\"path48\" class=\"cls-1\"\n d=\"M937.9,266.8h39.7v28.3h-39.7c0,29.1-.3,49.2-.3,70.7s6.2,14.4,17.1,14.4,15.9-1.5,22.9-5.3v28.5c-9.7,3.6-19.7,5.3-31.5,5.3-23.5,0-40.9-10.9-40.9-36.5v-130.4l32.7-19.4v44.4\"/>\n <path id=\"path50\" class=\"cls-1\"\n d=\"M1068.6,337.8c-26.8.8-40.6,9.1-40.6,24.7s8.2,18,20.9,18,17.3-3.2,18.5-7.4c.9-4.4,1.2-17.6,1.2-35.3M1068.6,313.7v-5.3c0-11.2-7.7-17.9-21.5-17.9s-28.3,2.7-43,9.4v-30.3c15.3-4.4,29-6.7,45.6-6.7,31.8,0,51.5,12.9,51.5,45.3s-.9,42.4-.9,64.2.6,24.2,1.5,31.5c-23.5,0-36.2,3.8-56.3,3.8-34.1,0-51.2-15.8-51.2-42.6s22.4-49.8,74.2-51.2\"/>\n <path id=\"path52\" class=\"cls-1\"\n d=\"M1307.8,404.6h-32.4v-88c0-18.2-7.1-25-21.8-25s-21.2,3.5-21.2,10.2c.2,3.2.9,7.4.9,11.8v91h-32.4v-88c0-18.5-7.4-25-20-25s-21.8,2.9-21.8,12.9v100.1h-32.3v-134.9c28.5,0,37.7-6.5,58.8-6.5s26.8,4.4,33.9,10.6c10.6-6.8,24.1-10.6,41.5-10.6,28,0,46.8,12.7,46.8,48.9v92.5\"/>\n <path id=\"path54\" class=\"cls-1\"\n d=\"M1363,335.5c0,29.7,13,44.4,29.2,44.4s27.9-13.5,27.9-44.4-12.9-44.2-29.4-44.2-27.8,13.2-27.8,44.2M1454.9,335.5c0,43.2-25,73.3-63.6,73.3s-63.3-30.1-63.3-73.3,25.4-72.7,63.3-72.7,63.6,28.8,63.6,72.7\"/>\n <path id=\"path56\" class=\"cls-1\"\n d=\"M1522.2,262.7c10.9,0,20,.8,31.8,4.1v30.7c-13.8-5.6-23.6-7.1-33-7.1s-18.2,4.7-18.2,11.8c0,21.2,57.6,19.1,57.6,61.5s-16.5,45-54.7,45-24.4-1.2-35.9-4.7v-28.8c11.2,3.8,24.4,5.6,33.8,5.6,15.6,0,23.5-5.9,23.5-15,0-23.3-58-19.7-58-60.1s20.1-43,53-43\"/>\n </g>\n </g>\n </svg>\n </div>\n } @else {\n <div class=\"svg-wrapper\">\n <svg version=\"1.1\" id=\"Capa_1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\"\n x=\"0px\" y=\"0px\"\n viewBox=\"0 0 554 481\" style=\"enable-background:new 0 0 554 481;\" xml:space=\"preserve\">\n<style type=\"text/css\">\n\t.st0 {\n fill: none;\n }\n\n .st1 {\n fill: #E85E16;\n }\n\n .st2 {\n fill: #9D0046;\n }\n\n .st3 {\n fill: #592275;\n }\n\n .st4 {\n fill: #CD0058;\n }\n\n .st5 {\n fill: #00587F;\n }\n\n .st6 {\n fill: #229B7D;\n }\n</style>\n <rect class=\"st0\" width=\"554\" height=\"481\"/>\n <g>\n\t<path id=\"naranja\" class=\"st1\" d=\"M277.4,128.4c74.7-40.1,146.4-40,154.5-40c8.1,48,13.7,67-7.9,121.3\n\t\tc-24.2,43.8-169.9,71.1-169.9,71.1l0,0c2.7-5.3-3.7-67.7-3.7-67.7S248.6,141.8,277.4,128.4\"/>\n <path id=\"roja\" class=\"st2\" d=\"M449.8,205.7c-2.6,16-11.6,58-43.6,101.2s-99.9,85.5-138,96s-35.3,8-51.6,8\n\t\tc-10-28.6-11.3-33.9-4.9-81.3s22.9-61.8,56.5-80c24.4-10.7,48.7-17.3,73.1-25.3C379.4,213.7,417.4,208.3,449.8,205.7\"/>\n <path id=\"morada\" class=\"st3\" d=\"M236.8,95.1c18.8-8.3,43.1-16.7,70-25.2c-7.8,18.8-10.1,42.8-15.2,66.9\n\t\tc-6.6,43.2-12.8,104.4-40.2,136.6C217.9,313,127.3,348.2,127,347.6l-2.5,0c-14.4-50.4-20.6-93-15.7-125\n\t\tC116,166.4,150.6,131.2,236.8,95.1L236.8,95.1\"/>\n <path id=\"fushia\" class=\"st4\" d=\"M425.5,246h13.6c-13.5,37.3-31.4,76.2-72,105.6c-69,48.9-98.8,50.7-98.8,50.7S341.4,254,425.5,246\n\t\t\"/>\n <path id=\"azul\" class=\"st5\" d=\"M122.5,344.1L122.5,344.1c13.6,45.3,48.8,69.3,100.3,66.6c24.4-48,44-108.8,52.1-164.7\n\t\tC218,272.7,165.9,312.1,122.5,344.1\"/>\n <path id=\"verde\" class=\"st6\" d=\"M277,232.3c5.4-37.3,10.8-72,16.2-103.9C206.5,171,144.2,251,122.5,344.3\n\t\tc43.4-32,95.2-70.3,152.1-97\"/>\n</g>\n</svg>\n\n </div>\n }\n </div>\n}\n", styles: ["@keyframes bounce{0%{opacity:.1}to{opacity:1}}.loader{position:fixed;z-index:100000000000000000;inset:0;background-color:#000c;-webkit-backdrop-filter:blur(5px);backdrop-filter:blur(5px);display:flex;place-items:center;place-content:center}.loader .svg-wrapper{width:80px;animation:bounce 1s ease-in-out infinite alternate}.loader .svg-wrapper svg{width:100%;height:auto;display:block}\n"] }]
|
|
202
|
+
}], ctorParameters: () => [{ type: undefined, decorators: [{
|
|
203
|
+
type: Optional
|
|
204
|
+
}, {
|
|
205
|
+
type: Inject,
|
|
206
|
+
args: [RDND_CONFIG]
|
|
207
|
+
}] }], propDecorators: { show: [{
|
|
208
|
+
type: Input
|
|
209
|
+
}] } });
|
|
210
|
+
|
|
211
|
+
class RdndActiveIndicator {
|
|
212
|
+
isActive = false;
|
|
213
|
+
activeDisplay = "Activo";
|
|
214
|
+
inactiveDisplay = "Inactivo";
|
|
215
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.1", ngImport: i0, type: RdndActiveIndicator, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
216
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.2.1", type: RdndActiveIndicator, isStandalone: true, selector: "rdnd-active-indicator", inputs: { isActive: "isActive", activeDisplay: "activeDisplay", inactiveDisplay: "inactiveDisplay" }, ngImport: i0, template: "<div class=\"rdnd-active-indicator-wrapper\" [ngClass]=\"{\n active: isActive,\n inactive: !isActive\n}\">\n <span>\n @if (isActive) {\n {{ activeDisplay }}\n } @else {\n {{ inactiveDisplay }}\n }\n </span>\n</div>\n", styles: [".rdnd-active-indicator-wrapper{width:70px;height:24px;padding:1px 4px;border-radius:4px;display:flex;flex-direction:row;place-content:center;place-items:center;box-sizing:border-box}.rdnd-active-indicator-wrapper.active{background-color:#19c496;color:#156a29}.rdnd-active-indicator-wrapper.inactive{background-color:#f16683;color:#77113a}.rdnd-active-indicator-wrapper span{font-size:12px}\n"], dependencies: [{ kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }] });
|
|
217
|
+
}
|
|
218
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.1", ngImport: i0, type: RdndActiveIndicator, decorators: [{
|
|
219
|
+
type: Component,
|
|
220
|
+
args: [{ selector: 'rdnd-active-indicator', standalone: true, imports: [
|
|
221
|
+
NgClass
|
|
222
|
+
], template: "<div class=\"rdnd-active-indicator-wrapper\" [ngClass]=\"{\n active: isActive,\n inactive: !isActive\n}\">\n <span>\n @if (isActive) {\n {{ activeDisplay }}\n } @else {\n {{ inactiveDisplay }}\n }\n </span>\n</div>\n", styles: [".rdnd-active-indicator-wrapper{width:70px;height:24px;padding:1px 4px;border-radius:4px;display:flex;flex-direction:row;place-content:center;place-items:center;box-sizing:border-box}.rdnd-active-indicator-wrapper.active{background-color:#19c496;color:#156a29}.rdnd-active-indicator-wrapper.inactive{background-color:#f16683;color:#77113a}.rdnd-active-indicator-wrapper span{font-size:12px}\n"] }]
|
|
223
|
+
}], propDecorators: { isActive: [{
|
|
224
|
+
type: Input
|
|
225
|
+
}], activeDisplay: [{
|
|
226
|
+
type: Input
|
|
227
|
+
}], inactiveDisplay: [{
|
|
228
|
+
type: Input
|
|
229
|
+
}] } });
|
|
230
|
+
|
|
231
|
+
const themes = {
|
|
232
|
+
disabled: {
|
|
233
|
+
default: colors.disabled,
|
|
234
|
+
hover: colors.disabled,
|
|
235
|
+
border: 'transparent',
|
|
236
|
+
active: colors.disabled,
|
|
237
|
+
fontColor: colors.disabledText,
|
|
238
|
+
},
|
|
239
|
+
magenta: {
|
|
240
|
+
default: `linear-gradient(to right, ${colors.magentaStart}, ${colors.magentaEnd})`,
|
|
241
|
+
hover: `linear-gradient(to right, ${colors.magentaEnd}, ${colors.magentaStart})`,
|
|
242
|
+
//default: `${colors.magentaStart}`,
|
|
243
|
+
border: 'transparent',
|
|
244
|
+
active: colors.magentaStart, // Color al hacer clic
|
|
245
|
+
fontColor: colors.white, // Texto en blanco
|
|
246
|
+
},
|
|
247
|
+
magentaSolid: {
|
|
248
|
+
default: `${colors.magentaStart}`,
|
|
249
|
+
hover: `${colors.magentaEnd}`,
|
|
250
|
+
border: 'transparent',
|
|
251
|
+
active: colors.magentaStart, // Color al hacer clic
|
|
252
|
+
fontColor: colors.white, // Texto en blanco
|
|
253
|
+
},
|
|
254
|
+
magentaNormal: {
|
|
255
|
+
default: `${colors["magenta-normal"]}`,
|
|
256
|
+
hover: `${colors.magentaEnd}`,
|
|
257
|
+
border: 'transparent',
|
|
258
|
+
active: colors["magenta-normal"], // Color al hacer clic
|
|
259
|
+
fontColor: colors.white, // Texto en blanco
|
|
260
|
+
},
|
|
261
|
+
gray: {
|
|
262
|
+
default: `${colors["light-gray"]}`,
|
|
263
|
+
hover: `linear-gradient(to right, ${colors.magentaEnd}, ${colors.magentaStart})`,
|
|
264
|
+
//default: `${colors.magentaStart}`,
|
|
265
|
+
border: 'transparent',
|
|
266
|
+
active: colors.magentaStart, // Color al hacer clic
|
|
267
|
+
fontColor: colors.white, // Texto en blanco
|
|
268
|
+
},
|
|
269
|
+
green: {
|
|
270
|
+
default: `${colors["green-medium"]}`,
|
|
271
|
+
hover: colors.green,
|
|
272
|
+
border: 'transparent',
|
|
273
|
+
active: colors["green-xs-dark"],
|
|
274
|
+
fontColor: colors.white,
|
|
275
|
+
},
|
|
276
|
+
red: {
|
|
277
|
+
default: `${colors["red-medium"]}`,
|
|
278
|
+
hover: colors.red,
|
|
279
|
+
border: 'transparent',
|
|
280
|
+
active: colors["red"],
|
|
281
|
+
fontColor: colors.white,
|
|
282
|
+
},
|
|
283
|
+
purple: {
|
|
284
|
+
default: `${colors['blue-info']}`,
|
|
285
|
+
hover: colors["purple-light"],
|
|
286
|
+
border: 'transparent',
|
|
287
|
+
active: colors.purple,
|
|
288
|
+
fontColor: colors.white,
|
|
289
|
+
},
|
|
290
|
+
yellow: {
|
|
291
|
+
default: `${colors['yellow-normal']}`,
|
|
292
|
+
hover: colors["yellow"],
|
|
293
|
+
border: 'transparent',
|
|
294
|
+
active: colors["yellow-light"],
|
|
295
|
+
fontColor: colors.white,
|
|
296
|
+
},
|
|
297
|
+
blue: {
|
|
298
|
+
default: `${colors["blue"]}`,
|
|
299
|
+
hover: colors["blue-light"],
|
|
300
|
+
border: 'transparent',
|
|
301
|
+
active: colors["blue-dark"],
|
|
302
|
+
fontColor: colors.white,
|
|
303
|
+
},
|
|
304
|
+
borderedMagenta: {
|
|
305
|
+
default: 'transparent',
|
|
306
|
+
hover: 'transparent',
|
|
307
|
+
border: colors.magentaStart,
|
|
308
|
+
active: 'transparent',
|
|
309
|
+
fontColor: colors.magentaStart
|
|
310
|
+
},
|
|
311
|
+
borderedBlack: {
|
|
312
|
+
default: 'white',
|
|
313
|
+
hover: 'white',
|
|
314
|
+
border: colors.black,
|
|
315
|
+
active: 'white',
|
|
316
|
+
fontColor: colors.black
|
|
317
|
+
},
|
|
318
|
+
transparentMagenta: {
|
|
319
|
+
default: 'transparent',
|
|
320
|
+
hover: 'transparent',
|
|
321
|
+
border: 'transparent',
|
|
322
|
+
active: 'transparent',
|
|
323
|
+
fontColor: colors.magentaStart
|
|
324
|
+
},
|
|
325
|
+
transparentBlack: {
|
|
326
|
+
default: 'transparent',
|
|
327
|
+
hover: 'transparent',
|
|
328
|
+
border: 'transparent',
|
|
329
|
+
active: 'transparent',
|
|
330
|
+
fontColor: colors.black
|
|
331
|
+
},
|
|
332
|
+
transparentGreen: {
|
|
333
|
+
default: 'transparent',
|
|
334
|
+
hover: 'transparent',
|
|
335
|
+
border: 'transparent',
|
|
336
|
+
active: 'transparent',
|
|
337
|
+
fontColor: colors["green-medium"]
|
|
338
|
+
},
|
|
339
|
+
};
|
|
340
|
+
|
|
341
|
+
class ButtonService {
|
|
342
|
+
buttonsState = {};
|
|
343
|
+
ensureButtonExists(id) {
|
|
344
|
+
if (!this.buttonsState[id]) {
|
|
345
|
+
this.buttonsState[id] = new BehaviorSubject(false);
|
|
346
|
+
}
|
|
347
|
+
}
|
|
348
|
+
useButton(id) {
|
|
349
|
+
this.ensureButtonExists(id);
|
|
350
|
+
return {
|
|
351
|
+
disabled$: this.buttonsState[id].asObservable(),
|
|
352
|
+
enable: () => this.buttonsState[id].next(false),
|
|
353
|
+
disable: () => this.buttonsState[id].next(true),
|
|
354
|
+
};
|
|
355
|
+
}
|
|
356
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.1", ngImport: i0, type: ButtonService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
357
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.2.1", ngImport: i0, type: ButtonService, providedIn: 'root' });
|
|
358
|
+
}
|
|
359
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.1", ngImport: i0, type: ButtonService, decorators: [{
|
|
360
|
+
type: Injectable,
|
|
361
|
+
args: [{
|
|
362
|
+
providedIn: 'root',
|
|
363
|
+
}]
|
|
364
|
+
}] });
|
|
365
|
+
|
|
366
|
+
// @ts-ignore
|
|
367
|
+
class RdndButton {
|
|
368
|
+
buttonService;
|
|
369
|
+
id;
|
|
370
|
+
icon;
|
|
371
|
+
text = 'Enviar';
|
|
372
|
+
theme = themes.magenta;
|
|
373
|
+
size = 'full';
|
|
374
|
+
type = 'submit';
|
|
375
|
+
borders = true;
|
|
376
|
+
disabled = false;
|
|
377
|
+
callback = new EventEmitter();
|
|
378
|
+
themes = themes;
|
|
379
|
+
subscription;
|
|
380
|
+
hoverBackgroundColor = this.theme.default;
|
|
381
|
+
buttonControl;
|
|
382
|
+
constructor(buttonService) {
|
|
383
|
+
this.buttonService = buttonService;
|
|
384
|
+
}
|
|
385
|
+
ngOnInit() {
|
|
386
|
+
this.buttonControl = this.buttonService.useButton(this.id);
|
|
387
|
+
this.subscription = new Subscription(() => this.buttonControl.disabled$.subscribe((isDisabled) => {
|
|
388
|
+
this.disabled = isDisabled;
|
|
389
|
+
}));
|
|
390
|
+
}
|
|
391
|
+
ngOnDestroy() {
|
|
392
|
+
if (this.subscription) {
|
|
393
|
+
this.subscription.unsubscribe();
|
|
394
|
+
}
|
|
395
|
+
}
|
|
396
|
+
handleClick(event) {
|
|
397
|
+
event.stopPropagation();
|
|
398
|
+
if (!this.disabled && this.type !== 'submit') {
|
|
399
|
+
this.callback.emit();
|
|
400
|
+
}
|
|
401
|
+
}
|
|
402
|
+
onMouseEnter() {
|
|
403
|
+
if (!this.disabled) {
|
|
404
|
+
this.hoverBackgroundColor = this.theme.hover;
|
|
405
|
+
}
|
|
406
|
+
}
|
|
407
|
+
onMouseLeave() {
|
|
408
|
+
if (!this.disabled) {
|
|
409
|
+
this.hoverBackgroundColor = this.theme.default;
|
|
410
|
+
}
|
|
411
|
+
}
|
|
412
|
+
event = event;
|
|
413
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.1", ngImport: i0, type: RdndButton, deps: [{ token: ButtonService }], target: i0.ɵɵFactoryTarget.Component });
|
|
414
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.2.1", type: RdndButton, isStandalone: true, selector: "rdnd-button", inputs: { id: "id", icon: "icon", text: "text", theme: "theme", size: "size", type: "type", borders: "borders", disabled: "disabled" }, outputs: { callback: "callback" }, ngImport: i0, template: "<button\n [ngClass]=\"{\n 'full': size === 'full',\n 'contained': size === 'contained',\n 'bordered': borders,\n 'disabled': disabled\n }\"\n [style.background]=\"disabled ? themes.disabled.default : theme.default\"\n [style.color]=\"theme.fontColor\"\n [style.border]=\"borders ? '1px solid ' + theme.border : 'none'\"\n [style.cursor]=\"disabled ? 'not-allowed' : 'pointer'\"\n [attr.type]=\"type\"\n [disabled]=\"disabled\"\n\n (mouseleave)=\"onMouseLeave()\"\n (click)=\"handleClick($event)\"\n (mouseenter)=\"onMouseEnter()\"\n>\n <fa-icon *ngIf=\"icon\" [icon]=\"icon\" class=\"icon\"></fa-icon>\n {{ text }}\n</button>\n", styles: ["button{height:36px;display:flex;align-items:center;justify-content:center;gap:4px;padding:10px;font-size:14px;transition:all .3s ease}button.full{width:100%}button.contained{width:fit-content}button.bordered{border-radius:5px}button.disabled{pointer-events:none;background-color:#ddd;border-color:transparent!important;color:#9e9e9e!important}button .icon{transition:all .3s ease}button:hover{opacity:.8}button:active{transform:scale(.99)}\n"], dependencies: [{ kind: "component", type: FaIconComponent, selector: "fa-icon", inputs: ["icon", "title", "animation", "mask", "flip", "size", "pull", "border", "inverse", "symbol", "rotate", "fixedWidth", "transform", "a11yRole"], outputs: ["iconChange", "titleChange", "animationChange", "maskChange", "flipChange", "sizeChange", "pullChange", "borderChange", "inverseChange", "symbolChange", "rotateChange", "fixedWidthChange", "transformChange", "a11yRoleChange"] }, { kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }] });
|
|
415
|
+
}
|
|
416
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.1", ngImport: i0, type: RdndButton, decorators: [{
|
|
417
|
+
type: Component,
|
|
418
|
+
args: [{ selector: 'rdnd-button', standalone: true, imports: [
|
|
419
|
+
FaIconComponent,
|
|
420
|
+
NgIf,
|
|
421
|
+
NgClass
|
|
422
|
+
], template: "<button\n [ngClass]=\"{\n 'full': size === 'full',\n 'contained': size === 'contained',\n 'bordered': borders,\n 'disabled': disabled\n }\"\n [style.background]=\"disabled ? themes.disabled.default : theme.default\"\n [style.color]=\"theme.fontColor\"\n [style.border]=\"borders ? '1px solid ' + theme.border : 'none'\"\n [style.cursor]=\"disabled ? 'not-allowed' : 'pointer'\"\n [attr.type]=\"type\"\n [disabled]=\"disabled\"\n\n (mouseleave)=\"onMouseLeave()\"\n (click)=\"handleClick($event)\"\n (mouseenter)=\"onMouseEnter()\"\n>\n <fa-icon *ngIf=\"icon\" [icon]=\"icon\" class=\"icon\"></fa-icon>\n {{ text }}\n</button>\n", styles: ["button{height:36px;display:flex;align-items:center;justify-content:center;gap:4px;padding:10px;font-size:14px;transition:all .3s ease}button.full{width:100%}button.contained{width:fit-content}button.bordered{border-radius:5px}button.disabled{pointer-events:none;background-color:#ddd;border-color:transparent!important;color:#9e9e9e!important}button .icon{transition:all .3s ease}button:hover{opacity:.8}button:active{transform:scale(.99)}\n"] }]
|
|
423
|
+
}], ctorParameters: () => [{ type: ButtonService }], propDecorators: { id: [{
|
|
424
|
+
type: Input
|
|
425
|
+
}], icon: [{
|
|
426
|
+
type: Input
|
|
427
|
+
}], text: [{
|
|
428
|
+
type: Input
|
|
429
|
+
}], theme: [{
|
|
430
|
+
type: Input
|
|
431
|
+
}], size: [{
|
|
432
|
+
type: Input
|
|
433
|
+
}], type: [{
|
|
434
|
+
type: Input
|
|
435
|
+
}], borders: [{
|
|
436
|
+
type: Input
|
|
437
|
+
}], disabled: [{
|
|
438
|
+
type: Input
|
|
439
|
+
}], callback: [{
|
|
440
|
+
type: Output
|
|
441
|
+
}] } });
|
|
442
|
+
|
|
443
|
+
class InputService {
|
|
444
|
+
inputState = {};
|
|
445
|
+
ensureInputExists(id) {
|
|
446
|
+
if (!this.inputState[id]) {
|
|
447
|
+
this.inputState[id] = {
|
|
448
|
+
valid$: new BehaviorSubject(false),
|
|
449
|
+
errorMessage$: new BehaviorSubject(null),
|
|
450
|
+
};
|
|
451
|
+
}
|
|
452
|
+
}
|
|
453
|
+
useInput(id) {
|
|
454
|
+
this.ensureInputExists(id);
|
|
455
|
+
return {
|
|
456
|
+
isValid: this.inputState[id].valid$,
|
|
457
|
+
valid: this.inputState[id].valid$.asObservable(),
|
|
458
|
+
errorMessage: this.inputState[id].errorMessage$.asObservable(),
|
|
459
|
+
setValid: (isValid) => this.inputState[id].valid$.next(isValid),
|
|
460
|
+
setErrorMessage: (message) => this.inputState[id].errorMessage$.next(message),
|
|
461
|
+
};
|
|
462
|
+
}
|
|
463
|
+
updateInputState(control, id) {
|
|
464
|
+
this.ensureInputExists(id);
|
|
465
|
+
const errors = control.errors;
|
|
466
|
+
if (control.valid) {
|
|
467
|
+
this.inputState[id].valid$.next(true);
|
|
468
|
+
this.inputState[id].errorMessage$.next(null);
|
|
469
|
+
}
|
|
470
|
+
else {
|
|
471
|
+
this.inputState[id].valid$.next(false);
|
|
472
|
+
this.inputState[id].errorMessage$.next(this.getErrorMessage(errors));
|
|
473
|
+
}
|
|
474
|
+
}
|
|
475
|
+
getErrorMessage(errors) {
|
|
476
|
+
if (!errors)
|
|
477
|
+
return null;
|
|
478
|
+
if (errors['required'])
|
|
479
|
+
return 'Este campo es obligatorio';
|
|
480
|
+
if (errors['minlength'])
|
|
481
|
+
return `Mínimo ${errors['minlength'].requiredLength} caracteres requeridos`;
|
|
482
|
+
if (errors['maxlength'])
|
|
483
|
+
return `Máximo ${errors['maxlength'].requiredLength} caracteres permitidos`;
|
|
484
|
+
if (errors['email'])
|
|
485
|
+
return 'Formato de correo inválido';
|
|
486
|
+
return null;
|
|
487
|
+
}
|
|
488
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.1", ngImport: i0, type: InputService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
489
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.2.1", ngImport: i0, type: InputService, providedIn: 'root' });
|
|
490
|
+
}
|
|
491
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.1", ngImport: i0, type: InputService, decorators: [{
|
|
492
|
+
type: Injectable,
|
|
493
|
+
args: [{
|
|
494
|
+
providedIn: 'root',
|
|
495
|
+
}]
|
|
496
|
+
}] });
|
|
497
|
+
|
|
498
|
+
class RdndInput {
|
|
499
|
+
inputService;
|
|
500
|
+
id;
|
|
501
|
+
name;
|
|
502
|
+
type = 'text';
|
|
503
|
+
placeholder = '';
|
|
504
|
+
showLabel = false;
|
|
505
|
+
control;
|
|
506
|
+
value = '';
|
|
507
|
+
validators = [];
|
|
508
|
+
disabled = false;
|
|
509
|
+
valueChange = new EventEmitter();
|
|
510
|
+
onKeyDown = new EventEmitter();
|
|
511
|
+
onPaste = new EventEmitter();
|
|
512
|
+
onFocus = new EventEmitter();
|
|
513
|
+
onBlur = new EventEmitter();
|
|
514
|
+
faEyeSlash = faEyeSlash;
|
|
515
|
+
showPassword = false;
|
|
516
|
+
showError = false;
|
|
517
|
+
constructor(inputService) {
|
|
518
|
+
this.inputService = inputService;
|
|
519
|
+
}
|
|
520
|
+
ngOnInit() {
|
|
521
|
+
if (this.control) {
|
|
522
|
+
this.control.addValidators(this.validators);
|
|
523
|
+
this.control.valueChanges.subscribe((value) => {
|
|
524
|
+
this.valueChange.emit(value);
|
|
525
|
+
this.inputService.updateInputState(this.control, this.id);
|
|
526
|
+
});
|
|
527
|
+
}
|
|
528
|
+
else {
|
|
529
|
+
this.control = new FormControl(this.value, this.validators);
|
|
530
|
+
this.control.valueChanges.subscribe((value) => {
|
|
531
|
+
this.valueChange.emit(value);
|
|
532
|
+
this.inputService.updateInputState(this.control, this.id);
|
|
533
|
+
});
|
|
534
|
+
}
|
|
535
|
+
}
|
|
536
|
+
ngOnChanges(changes) {
|
|
537
|
+
if (this.control) {
|
|
538
|
+
this.control.addValidators(this.validators);
|
|
539
|
+
this.control.valueChanges.subscribe((value) => {
|
|
540
|
+
this.valueChange.emit(value);
|
|
541
|
+
this.inputService.updateInputState(this.control, this.id);
|
|
542
|
+
});
|
|
543
|
+
}
|
|
544
|
+
else {
|
|
545
|
+
this.control = new FormControl(this.value, this.validators);
|
|
546
|
+
this.control.valueChanges.subscribe((value) => {
|
|
547
|
+
this.valueChange.emit(value);
|
|
548
|
+
this.inputService.updateInputState(this.control, this.id);
|
|
549
|
+
});
|
|
550
|
+
}
|
|
551
|
+
}
|
|
552
|
+
getErrorMessage() {
|
|
553
|
+
if (this.control && this.control.errors) {
|
|
554
|
+
const errorKeys = Object.keys(this.control.errors);
|
|
555
|
+
if (errorKeys.length > 0) {
|
|
556
|
+
const firstErrorKey = errorKeys[0];
|
|
557
|
+
return this.control.errors[firstErrorKey];
|
|
558
|
+
}
|
|
559
|
+
}
|
|
560
|
+
return null;
|
|
561
|
+
}
|
|
562
|
+
toggleErrorDisplay() {
|
|
563
|
+
this.showError = !this.showError;
|
|
564
|
+
}
|
|
565
|
+
hasError() {
|
|
566
|
+
return !!this.control && this.control.invalid && (this.control.dirty || this.control.touched);
|
|
567
|
+
}
|
|
568
|
+
handleTogglePassword() {
|
|
569
|
+
this.showPassword = !this.showPassword;
|
|
570
|
+
}
|
|
571
|
+
handleChange(event) {
|
|
572
|
+
const e = event.target;
|
|
573
|
+
this.valueChange.emit(e.value);
|
|
574
|
+
}
|
|
575
|
+
handleKeyDown(event) {
|
|
576
|
+
const allowRegex = /^[a-zA-Z!@#$%^&*()_+\-=\[\]{};':"\\|,.<>\/?]*$/;
|
|
577
|
+
if (this.type === 'number' && !(['Backspace', 'Shift', 'ArrowLeft', 'ArrowRight', 'ArrowUp', 'ArrowDown'].includes(event.key)) && !(event.altKey || event.ctrlKey || event.metaKey || event.shiftKey)) {
|
|
578
|
+
event.key.match(allowRegex) ? event.preventDefault() : this.onKeyDown.emit(event);
|
|
579
|
+
}
|
|
580
|
+
else {
|
|
581
|
+
this.onKeyDown.emit(event);
|
|
582
|
+
}
|
|
583
|
+
}
|
|
584
|
+
handlePaste(event) {
|
|
585
|
+
this.onPaste.emit(event);
|
|
586
|
+
}
|
|
587
|
+
handleFocus(event) {
|
|
588
|
+
this.onFocus.emit(event);
|
|
589
|
+
}
|
|
590
|
+
handleBlur(event) {
|
|
591
|
+
this.onBlur.emit(event);
|
|
592
|
+
}
|
|
593
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.1", ngImport: i0, type: RdndInput, deps: [{ token: InputService }], target: i0.ɵɵFactoryTarget.Component });
|
|
594
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.2.1", type: RdndInput, isStandalone: true, selector: "rdnd-input", inputs: { id: "id", name: "name", type: "type", placeholder: "placeholder", showLabel: "showLabel", control: "control", value: "value", validators: "validators", disabled: "disabled" }, outputs: { valueChange: "valueChange", onKeyDown: "onKeyDown", onPaste: "onPaste", onFocus: "onFocus", onBlur: "onBlur" }, usesOnChanges: true, ngImport: i0, template: "<div [ngClass]=\"{ 'disabled': disabled }\" class=\"input-container\">\n <!-- \u00CDcono de error que aparece por encima del campo si hay error -->\n <span *ngIf=\"hasError()\" class=\"error-icon\" (click)=\"toggleErrorDisplay()\">ⓘ</span>\n\n <!-- Bot\u00F3n de mostrar/ocultar contrase\u00F1a centrado verticalmente -->\n <button *ngIf=\"type === 'password'\" type=\"button\" (click)=\"handleTogglePassword()\" class=\"toggle-button\">\n <fa-icon [icon]=\"faEyeSlash\" class=\"icon\" [class.active]=\"showPassword\"></fa-icon>\n </button>\n\n @if (showLabel) {\n <label class=\"text-small dark-gray\">{{ placeholder }}</label>\n }\n\n\n <!-- Input compatible con FormControl o signals -->\n <input\n *ngIf=\"control; else signalInput\"\n [type]=\"type === 'password' && showPassword ? 'text' : type\"\n [formControl]=\"control\"\n [placeholder]=\"showLabel ? '' : placeholder\"\n [disabled]=\"disabled\"\n (keydown)=\"handleKeyDown($event)\"\n (paste)=\"handlePaste($event)\"\n (focus)=\"handleFocus($event)\"\n (blur)=\"handleBlur($event)\"\n [ngClass]=\"{ 'error-border': hasError() }\"\n />\n\n <!-- Input para signals -->\n <ng-template #signalInput>\n <input\n [type]=\"type === 'password' && showPassword ? 'text' : type\"\n [value]=\"value\"\n [placeholder]=\"showLabel ? '' : placeholder\"\n [disabled]=\"disabled\"\n (input)=\"handleChange($event)\"\n (keydown)=\"handleKeyDown($event)\"\n (paste)=\"handlePaste($event)\"\n (focus)=\"handleFocus($event)\"\n (blur)=\"handleBlur($event)\"\n [ngClass]=\"{ 'error-border': false }\"\n />\n </ng-template>\n\n\n <!-- Mensaje de error que aparece solo cuando se clickea en el \u00EDcono de error -->\n <div *ngIf=\"control?.invalid && control?.dirty && showError\" class=\"error-message\">\n {{ getErrorMessage() }}\n </div>\n</div>\n", styles: [".input-container{width:100%;min-width:100%;box-sizing:border-box;position:relative;display:block}input{position:relative;width:100%;min-width:100%;padding:7px 35px 7px 8px;border-radius:3px;font-family:Poppins,sans-serif;height:36px;font-size:14px;border:1px solid #ccc;outline:none;box-sizing:border-box;transition:all .3s ease;background-color:#fff!important;appearance:none;-moz-appearance:textfield;-webkit-appearance:textfield}input:-webkit-autofill{background-color:#fff!important}input.error-border{border-color:red}input:focus{border:1px solid blue}.error-icon{position:absolute;right:8px;top:1px;bottom:1px;font-size:24px;color:red;cursor:pointer;display:flex;flex-direction:column;justify-content:center;align-items:center;z-index:3;background-color:#fff}.error-message{position:absolute;bottom:0;left:0;color:red;padding:0 0 0 8px;border-radius:4px;font-size:12px;font-family:sans-serif;white-space:nowrap}.toggle-button{position:absolute;right:8px;top:50%;transform:translateY(-50%);background:transparent;border:none;cursor:pointer;z-index:2}.icon{transition:opacity .3s ease}.icon.active{opacity:.5}\n"], dependencies: [{ kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "ngmodule", type: FontAwesomeModule }, { kind: "component", type: i2.FaIconComponent, selector: "fa-icon", inputs: ["icon", "title", "animation", "mask", "flip", "size", "pull", "border", "inverse", "symbol", "rotate", "fixedWidth", "transform", "a11yRole"], outputs: ["iconChange", "titleChange", "animationChange", "maskChange", "flipChange", "sizeChange", "pullChange", "borderChange", "inverseChange", "symbolChange", "rotateChange", "fixedWidthChange", "transformChange", "a11yRoleChange"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i3.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i3.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }] });
|
|
595
|
+
}
|
|
596
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.1", ngImport: i0, type: RdndInput, decorators: [{
|
|
597
|
+
type: Component,
|
|
598
|
+
args: [{ selector: 'rdnd-input', standalone: true, imports: [
|
|
599
|
+
NgIf,
|
|
600
|
+
NgClass,
|
|
601
|
+
FontAwesomeModule,
|
|
602
|
+
ReactiveFormsModule
|
|
603
|
+
], template: "<div [ngClass]=\"{ 'disabled': disabled }\" class=\"input-container\">\n <!-- \u00CDcono de error que aparece por encima del campo si hay error -->\n <span *ngIf=\"hasError()\" class=\"error-icon\" (click)=\"toggleErrorDisplay()\">ⓘ</span>\n\n <!-- Bot\u00F3n de mostrar/ocultar contrase\u00F1a centrado verticalmente -->\n <button *ngIf=\"type === 'password'\" type=\"button\" (click)=\"handleTogglePassword()\" class=\"toggle-button\">\n <fa-icon [icon]=\"faEyeSlash\" class=\"icon\" [class.active]=\"showPassword\"></fa-icon>\n </button>\n\n @if (showLabel) {\n <label class=\"text-small dark-gray\">{{ placeholder }}</label>\n }\n\n\n <!-- Input compatible con FormControl o signals -->\n <input\n *ngIf=\"control; else signalInput\"\n [type]=\"type === 'password' && showPassword ? 'text' : type\"\n [formControl]=\"control\"\n [placeholder]=\"showLabel ? '' : placeholder\"\n [disabled]=\"disabled\"\n (keydown)=\"handleKeyDown($event)\"\n (paste)=\"handlePaste($event)\"\n (focus)=\"handleFocus($event)\"\n (blur)=\"handleBlur($event)\"\n [ngClass]=\"{ 'error-border': hasError() }\"\n />\n\n <!-- Input para signals -->\n <ng-template #signalInput>\n <input\n [type]=\"type === 'password' && showPassword ? 'text' : type\"\n [value]=\"value\"\n [placeholder]=\"showLabel ? '' : placeholder\"\n [disabled]=\"disabled\"\n (input)=\"handleChange($event)\"\n (keydown)=\"handleKeyDown($event)\"\n (paste)=\"handlePaste($event)\"\n (focus)=\"handleFocus($event)\"\n (blur)=\"handleBlur($event)\"\n [ngClass]=\"{ 'error-border': false }\"\n />\n </ng-template>\n\n\n <!-- Mensaje de error que aparece solo cuando se clickea en el \u00EDcono de error -->\n <div *ngIf=\"control?.invalid && control?.dirty && showError\" class=\"error-message\">\n {{ getErrorMessage() }}\n </div>\n</div>\n", styles: [".input-container{width:100%;min-width:100%;box-sizing:border-box;position:relative;display:block}input{position:relative;width:100%;min-width:100%;padding:7px 35px 7px 8px;border-radius:3px;font-family:Poppins,sans-serif;height:36px;font-size:14px;border:1px solid #ccc;outline:none;box-sizing:border-box;transition:all .3s ease;background-color:#fff!important;appearance:none;-moz-appearance:textfield;-webkit-appearance:textfield}input:-webkit-autofill{background-color:#fff!important}input.error-border{border-color:red}input:focus{border:1px solid blue}.error-icon{position:absolute;right:8px;top:1px;bottom:1px;font-size:24px;color:red;cursor:pointer;display:flex;flex-direction:column;justify-content:center;align-items:center;z-index:3;background-color:#fff}.error-message{position:absolute;bottom:0;left:0;color:red;padding:0 0 0 8px;border-radius:4px;font-size:12px;font-family:sans-serif;white-space:nowrap}.toggle-button{position:absolute;right:8px;top:50%;transform:translateY(-50%);background:transparent;border:none;cursor:pointer;z-index:2}.icon{transition:opacity .3s ease}.icon.active{opacity:.5}\n"] }]
|
|
604
|
+
}], ctorParameters: () => [{ type: InputService }], propDecorators: { id: [{
|
|
605
|
+
type: Input
|
|
606
|
+
}], name: [{
|
|
607
|
+
type: Input
|
|
608
|
+
}], type: [{
|
|
609
|
+
type: Input
|
|
610
|
+
}], placeholder: [{
|
|
611
|
+
type: Input
|
|
612
|
+
}], showLabel: [{
|
|
613
|
+
type: Input
|
|
614
|
+
}], control: [{
|
|
615
|
+
type: Input
|
|
616
|
+
}], value: [{
|
|
617
|
+
type: Input
|
|
618
|
+
}], validators: [{
|
|
619
|
+
type: Input
|
|
620
|
+
}], disabled: [{
|
|
621
|
+
type: Input
|
|
622
|
+
}], valueChange: [{
|
|
623
|
+
type: Output
|
|
624
|
+
}], onKeyDown: [{
|
|
625
|
+
type: Output
|
|
626
|
+
}], onPaste: [{
|
|
627
|
+
type: Output
|
|
628
|
+
}], onFocus: [{
|
|
629
|
+
type: Output
|
|
630
|
+
}], onBlur: [{
|
|
631
|
+
type: Output
|
|
632
|
+
}] } });
|
|
633
|
+
|
|
634
|
+
class RdndModal {
|
|
635
|
+
title = '';
|
|
636
|
+
type = 'success';
|
|
637
|
+
theme = themes.magenta;
|
|
638
|
+
confirmText = '';
|
|
639
|
+
cancelText = '';
|
|
640
|
+
close = new EventEmitter();
|
|
641
|
+
themes = themes;
|
|
642
|
+
icon;
|
|
643
|
+
content = '';
|
|
644
|
+
closeModal(result) {
|
|
645
|
+
this.close.emit(result);
|
|
646
|
+
}
|
|
647
|
+
constructor() {
|
|
648
|
+
}
|
|
649
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.1", ngImport: i0, type: RdndModal, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
650
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.2.1", type: RdndModal, isStandalone: true, selector: "rdnd-modal", inputs: { title: "title", type: "type", theme: "theme", confirmText: "confirmText", cancelText: "cancelText" }, outputs: { close: "close" }, ngImport: i0, template: "<div class=\"modal-wrapper\">\n\n <div class=\"container\" (click)=\"$event.stopPropagation()\">\n\n <div class=\"content\">\n\n @if (icon != undefined) {\n <fa-icon [icon]=\"icon\" class=\"icon\" [style.color]=\"theme.default\"\n />\n }\n\n <span class=\"subtitle align-center\">{{ title }}</span>\n\n <div class=\"text align-center\" [innerHTML]=\"content\">\n </div>\n\n\n @if (type !== 'question') {\n <rdnd-button\n [id]=\"'btn-modal'\"\n [type]=\"'button'\"\n (callback)=\"closeModal(true)\"\n [text]=\"'Aceptar'\"\n [theme]=\"theme\"\n [size]=\"'full'\"\n />\n } @else {\n <rdnd-button\n [id]=\"'btn-modal-accept'\"\n [type]=\"'button'\"\n (callback)=\"closeModal(true)\"\n [text]=\"confirmText\"\n [theme]=\"theme\"\n [size]=\"'full'\"\n />\n <rdnd-button\n [id]=\"'btn-modal-cancel'\"\n [type]=\"'button'\"\n (callback)=\"closeModal(false)\"\n [text]=\"cancelText\"\n [theme]=\"themes.borderedMagenta\"\n [size]=\"'full'\"\n />\n }\n\n </div>\n\n\n </div>\n</div>\n\n", styles: [".subtitle{font-family:Poppins,sans-serif;text-align:left;width:100%;font-weight:400;line-height:normal;font-size:18px;color:#000!important;font-weight:500}.subtitle.magenta{color:#c2185b}.subtitle.green{color:#44bb96}.subtitle.gray{color:#9e9e9e}.subtitle.white{color:#fff}.subtitle.white-soft{color:#ffffff78}.subtitle.bold{font-weight:700!important}.text-medium{font-family:Poppins,sans-serif;text-align:left;width:100%;font-weight:400;line-height:normal;font-size:16px;font-weight:500}.text-medium.magenta{color:#c2185b}.text-medium.green{color:#44bb96}.text-medium.gray{color:#9e9e9e}.text-medium.white{color:#fff}.text-medium.white-soft{color:#ffffff78}.text-medium.bold{font-weight:700!important}.text{font-family:Poppins,sans-serif;text-align:left;width:100%;font-weight:400;line-height:normal;font-size:14.5px}.text.magenta{color:#c2185b}.text.green{color:#44bb96}.text.gray{color:#9e9e9e}.text.white{color:#fff}.text.white-soft{color:#ffffff78}.text.bold{font-weight:700!important}.text-small{font-family:Poppins,sans-serif;text-align:left;width:100%;font-weight:400;line-height:normal;font-size:12px}.text-small.magenta{color:#c2185b}.text-small.green{color:#44bb96}.text-small.gray{color:#9e9e9e}.text-small.white{color:#fff}.text-small.white-soft{color:#ffffff78}.text-small.bold{font-weight:700!important}.label{font-family:Poppins,sans-serif;text-align:left;width:100%;font-weight:400;line-height:normal;font-size:14.5px;font-weight:700;margin:0;padding:0}.label.magenta{color:#c2185b}.label.green{color:#44bb96}.label.gray{color:#9e9e9e}.label.white{color:#fff}.label.white-soft{color:#ffffff78}.label.bold{font-weight:700!important}.label-medium{font-family:Poppins,sans-serif;text-align:left;width:100%;font-weight:400;line-height:normal;font-size:16px;font-weight:700;margin:0;padding:0}.label-medium.magenta{color:#c2185b}.label-medium.green{color:#44bb96}.label-medium.gray{color:#9e9e9e}.label-medium.white{color:#fff}.label-medium.white-soft{color:#ffffff78}.label-medium.bold{font-weight:700!important}.label-small{font-family:Poppins,sans-serif;text-align:left;width:100%;font-weight:400;line-height:normal;font-size:12px;font-weight:700;margin:0;padding:0}.label-small.magenta{color:#c2185b}.label-small.green{color:#44bb96}.label-small.gray{color:#9e9e9e}.label-small.white{color:#fff}.label-small.white-soft{color:#ffffff78}.label-small.bold{font-weight:700!important}.align-center{text-align:center}.align-right{text-align:right}@font-face{font-family:Barcode;src:url(/assets/fonts/BarcodeFont.ttf) format(\"truetype\");font-weight:400;font-style:normal}.modal-wrapper{position:fixed;inset:0;z-index:95;background-color:#000000b3;-webkit-backdrop-filter:blur(5px);backdrop-filter:blur(5px);display:flex;justify-content:center;align-items:center;padding:16px}.modal-wrapper .container{width:100%;max-width:720px;background-color:#fff;padding:32px 16px;border-radius:4px;position:relative}.modal-wrapper .container .content{display:flex;flex-direction:column;gap:8px;width:100%;max-width:380px;margin:auto}.modal-wrapper .container .content .icon{margin:auto;font-size:40px;line-height:normal}.modal-wrapper .container .content p{margin:14px 0}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: FontAwesomeModule }, { kind: "component", type: i2.FaIconComponent, selector: "fa-icon", inputs: ["icon", "title", "animation", "mask", "flip", "size", "pull", "border", "inverse", "symbol", "rotate", "fixedWidth", "transform", "a11yRole"], outputs: ["iconChange", "titleChange", "animationChange", "maskChange", "flipChange", "sizeChange", "pullChange", "borderChange", "inverseChange", "symbolChange", "rotateChange", "fixedWidthChange", "transformChange", "a11yRoleChange"] }, { kind: "component", type: RdndButton, selector: "rdnd-button", inputs: ["id", "icon", "text", "theme", "size", "type", "borders", "disabled"], outputs: ["callback"] }] });
|
|
651
|
+
}
|
|
652
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.1", ngImport: i0, type: RdndModal, decorators: [{
|
|
653
|
+
type: Component,
|
|
654
|
+
args: [{ selector: 'rdnd-modal', standalone: true, imports: [
|
|
655
|
+
CommonModule,
|
|
656
|
+
FontAwesomeModule,
|
|
657
|
+
RdndButton,
|
|
658
|
+
RdndScreenTitle,
|
|
659
|
+
], template: "<div class=\"modal-wrapper\">\n\n <div class=\"container\" (click)=\"$event.stopPropagation()\">\n\n <div class=\"content\">\n\n @if (icon != undefined) {\n <fa-icon [icon]=\"icon\" class=\"icon\" [style.color]=\"theme.default\"\n />\n }\n\n <span class=\"subtitle align-center\">{{ title }}</span>\n\n <div class=\"text align-center\" [innerHTML]=\"content\">\n </div>\n\n\n @if (type !== 'question') {\n <rdnd-button\n [id]=\"'btn-modal'\"\n [type]=\"'button'\"\n (callback)=\"closeModal(true)\"\n [text]=\"'Aceptar'\"\n [theme]=\"theme\"\n [size]=\"'full'\"\n />\n } @else {\n <rdnd-button\n [id]=\"'btn-modal-accept'\"\n [type]=\"'button'\"\n (callback)=\"closeModal(true)\"\n [text]=\"confirmText\"\n [theme]=\"theme\"\n [size]=\"'full'\"\n />\n <rdnd-button\n [id]=\"'btn-modal-cancel'\"\n [type]=\"'button'\"\n (callback)=\"closeModal(false)\"\n [text]=\"cancelText\"\n [theme]=\"themes.borderedMagenta\"\n [size]=\"'full'\"\n />\n }\n\n </div>\n\n\n </div>\n</div>\n\n", styles: [".subtitle{font-family:Poppins,sans-serif;text-align:left;width:100%;font-weight:400;line-height:normal;font-size:18px;color:#000!important;font-weight:500}.subtitle.magenta{color:#c2185b}.subtitle.green{color:#44bb96}.subtitle.gray{color:#9e9e9e}.subtitle.white{color:#fff}.subtitle.white-soft{color:#ffffff78}.subtitle.bold{font-weight:700!important}.text-medium{font-family:Poppins,sans-serif;text-align:left;width:100%;font-weight:400;line-height:normal;font-size:16px;font-weight:500}.text-medium.magenta{color:#c2185b}.text-medium.green{color:#44bb96}.text-medium.gray{color:#9e9e9e}.text-medium.white{color:#fff}.text-medium.white-soft{color:#ffffff78}.text-medium.bold{font-weight:700!important}.text{font-family:Poppins,sans-serif;text-align:left;width:100%;font-weight:400;line-height:normal;font-size:14.5px}.text.magenta{color:#c2185b}.text.green{color:#44bb96}.text.gray{color:#9e9e9e}.text.white{color:#fff}.text.white-soft{color:#ffffff78}.text.bold{font-weight:700!important}.text-small{font-family:Poppins,sans-serif;text-align:left;width:100%;font-weight:400;line-height:normal;font-size:12px}.text-small.magenta{color:#c2185b}.text-small.green{color:#44bb96}.text-small.gray{color:#9e9e9e}.text-small.white{color:#fff}.text-small.white-soft{color:#ffffff78}.text-small.bold{font-weight:700!important}.label{font-family:Poppins,sans-serif;text-align:left;width:100%;font-weight:400;line-height:normal;font-size:14.5px;font-weight:700;margin:0;padding:0}.label.magenta{color:#c2185b}.label.green{color:#44bb96}.label.gray{color:#9e9e9e}.label.white{color:#fff}.label.white-soft{color:#ffffff78}.label.bold{font-weight:700!important}.label-medium{font-family:Poppins,sans-serif;text-align:left;width:100%;font-weight:400;line-height:normal;font-size:16px;font-weight:700;margin:0;padding:0}.label-medium.magenta{color:#c2185b}.label-medium.green{color:#44bb96}.label-medium.gray{color:#9e9e9e}.label-medium.white{color:#fff}.label-medium.white-soft{color:#ffffff78}.label-medium.bold{font-weight:700!important}.label-small{font-family:Poppins,sans-serif;text-align:left;width:100%;font-weight:400;line-height:normal;font-size:12px;font-weight:700;margin:0;padding:0}.label-small.magenta{color:#c2185b}.label-small.green{color:#44bb96}.label-small.gray{color:#9e9e9e}.label-small.white{color:#fff}.label-small.white-soft{color:#ffffff78}.label-small.bold{font-weight:700!important}.align-center{text-align:center}.align-right{text-align:right}@font-face{font-family:Barcode;src:url(/assets/fonts/BarcodeFont.ttf) format(\"truetype\");font-weight:400;font-style:normal}.modal-wrapper{position:fixed;inset:0;z-index:95;background-color:#000000b3;-webkit-backdrop-filter:blur(5px);backdrop-filter:blur(5px);display:flex;justify-content:center;align-items:center;padding:16px}.modal-wrapper .container{width:100%;max-width:720px;background-color:#fff;padding:32px 16px;border-radius:4px;position:relative}.modal-wrapper .container .content{display:flex;flex-direction:column;gap:8px;width:100%;max-width:380px;margin:auto}.modal-wrapper .container .content .icon{margin:auto;font-size:40px;line-height:normal}.modal-wrapper .container .content p{margin:14px 0}\n"] }]
|
|
660
|
+
}], ctorParameters: () => [], propDecorators: { title: [{
|
|
661
|
+
type: Input
|
|
662
|
+
}], type: [{
|
|
663
|
+
type: Input
|
|
664
|
+
}], theme: [{
|
|
665
|
+
type: Input
|
|
666
|
+
}], confirmText: [{
|
|
667
|
+
type: Input
|
|
668
|
+
}], cancelText: [{
|
|
669
|
+
type: Input
|
|
670
|
+
}], close: [{
|
|
671
|
+
type: Output
|
|
672
|
+
}] } });
|
|
673
|
+
|
|
674
|
+
class ModalService {
|
|
675
|
+
appRef;
|
|
676
|
+
injector;
|
|
677
|
+
modalRef = null;
|
|
678
|
+
viewContainerRef;
|
|
679
|
+
constructor(appRef, injector) {
|
|
680
|
+
this.appRef = appRef;
|
|
681
|
+
this.injector = injector;
|
|
682
|
+
}
|
|
683
|
+
setViewContainerRef(vcr) {
|
|
684
|
+
this.viewContainerRef = vcr;
|
|
685
|
+
}
|
|
686
|
+
openModal(title, content, type = 'success', confirmText = 'Continuar', cancelText = 'Cancelar') {
|
|
687
|
+
if (this.modalRef || !this.viewContainerRef)
|
|
688
|
+
return Promise.resolve(false);
|
|
689
|
+
this.modalRef = this.viewContainerRef.createComponent(RdndModal);
|
|
690
|
+
this.modalRef.instance.title = title;
|
|
691
|
+
this.modalRef.instance.type = type;
|
|
692
|
+
this.modalRef.instance.theme = this.getStyleTheme(type);
|
|
693
|
+
this.modalRef.instance.content = content;
|
|
694
|
+
this.modalRef.instance.icon = this.getIcon(type);
|
|
695
|
+
this.modalRef.instance.confirmText = confirmText;
|
|
696
|
+
this.modalRef.instance.cancelText = cancelText;
|
|
697
|
+
const result = new Promise((resolve) => {
|
|
698
|
+
this.modalRef.instance.close.subscribe((res) => {
|
|
699
|
+
this.closeModal();
|
|
700
|
+
resolve(res);
|
|
701
|
+
});
|
|
702
|
+
});
|
|
703
|
+
this.appRef.attachView(this.modalRef.hostView);
|
|
704
|
+
const domElem = this.modalRef.hostView.rootNodes[0];
|
|
705
|
+
document.body.appendChild(domElem);
|
|
706
|
+
return result;
|
|
707
|
+
}
|
|
708
|
+
getStyleTheme = (theme) => {
|
|
709
|
+
switch (theme) {
|
|
710
|
+
case "success":
|
|
711
|
+
return themes.green;
|
|
712
|
+
case 'error':
|
|
713
|
+
return themes.magentaNormal;
|
|
714
|
+
case 'question':
|
|
715
|
+
return themes.purple;
|
|
716
|
+
case 'warning':
|
|
717
|
+
return themes.yellow;
|
|
718
|
+
case 'info':
|
|
719
|
+
return themes.purple;
|
|
720
|
+
}
|
|
721
|
+
};
|
|
722
|
+
closeModal() {
|
|
723
|
+
if (this.modalRef) {
|
|
724
|
+
this.appRef.detachView(this.modalRef.hostView);
|
|
725
|
+
this.modalRef.destroy();
|
|
726
|
+
this.modalRef = null;
|
|
727
|
+
}
|
|
728
|
+
}
|
|
729
|
+
getIcon(theme) {
|
|
730
|
+
switch (theme) {
|
|
731
|
+
case 'error':
|
|
732
|
+
return faTriangleExclamation;
|
|
733
|
+
case 'question':
|
|
734
|
+
return faCircleQuestion;
|
|
735
|
+
case "success":
|
|
736
|
+
return faCircleCheck;
|
|
737
|
+
case "warning":
|
|
738
|
+
return faTriangleExclamation;
|
|
739
|
+
case "info":
|
|
740
|
+
return faCircleInfo;
|
|
741
|
+
}
|
|
742
|
+
}
|
|
743
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.1", ngImport: i0, type: ModalService, deps: [{ token: i0.ApplicationRef }, { token: i0.Injector }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
744
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.2.1", ngImport: i0, type: ModalService, providedIn: 'root' });
|
|
745
|
+
}
|
|
746
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.1", ngImport: i0, type: ModalService, decorators: [{
|
|
747
|
+
type: Injectable,
|
|
748
|
+
args: [{
|
|
749
|
+
providedIn: 'root'
|
|
750
|
+
}]
|
|
751
|
+
}], ctorParameters: () => [{ type: i0.ApplicationRef }, { type: i0.Injector }] });
|
|
752
|
+
|
|
753
|
+
class StorageService {
|
|
754
|
+
constructor() {
|
|
755
|
+
}
|
|
756
|
+
save(key, value) {
|
|
757
|
+
sessionStorage.setItem(key, JSON.stringify(value));
|
|
758
|
+
}
|
|
759
|
+
;
|
|
760
|
+
get(key) {
|
|
761
|
+
const data = sessionStorage.getItem(key);
|
|
762
|
+
if (data !== null) {
|
|
763
|
+
return JSON.parse(data);
|
|
764
|
+
}
|
|
765
|
+
else {
|
|
766
|
+
return null;
|
|
767
|
+
}
|
|
768
|
+
}
|
|
769
|
+
delete(key) {
|
|
770
|
+
sessionStorage.removeItem(key);
|
|
771
|
+
}
|
|
772
|
+
wipe() {
|
|
773
|
+
sessionStorage.clear();
|
|
774
|
+
}
|
|
775
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.1", ngImport: i0, type: StorageService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
776
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.2.1", ngImport: i0, type: StorageService, providedIn: 'root' });
|
|
777
|
+
}
|
|
778
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.1", ngImport: i0, type: StorageService, decorators: [{
|
|
779
|
+
type: Injectable,
|
|
780
|
+
args: [{
|
|
781
|
+
providedIn: 'root'
|
|
782
|
+
}]
|
|
783
|
+
}], ctorParameters: () => [] });
|
|
784
|
+
|
|
785
|
+
/*
|
|
786
|
+
* Public API Surface of gentera-rdnd
|
|
787
|
+
*/
|
|
788
|
+
|
|
789
|
+
/**
|
|
790
|
+
* Generated bundle index. Do not edit.
|
|
791
|
+
*/
|
|
792
|
+
|
|
793
|
+
export { ButtonService, InputService, ModalService, RDND_CONFIG, RdndActiveIndicator, RdndButton, RdndInput, RdndLoaderComponent, RdndModal, RdndNavbar, RdndScreenTitle, RdndSidebar, StorageService, themes as rdndThemes };
|
|
794
|
+
//# sourceMappingURL=gentera-rdnd.mjs.map
|