coer-elements 0.0.23 → 0.0.25
Sign up to get free protection for your applications and to get access to all the features.
- package/components/index.d.ts +5 -0
- package/components/lib/coer-button/coer-button.component.d.ts +44 -0
- package/components/lib/coer-checkbox/coer-checkbox.component.d.ts +28 -0
- package/components/lib/coer-filebox/coer-filebox.component.d.ts +33 -0
- package/components/lib/coer-form/coer-form.component.d.ts +33 -0
- package/components/lib/coer-grid/coer-grid.component.d.ts +53 -0
- package/components/lib/coer-grid/coer-grid.extension.d.ts +103 -0
- package/components/lib/coer-grid/coer-grid.templates.d.ts +9 -0
- package/components/lib/coer-modal/coer-modal.component.d.ts +38 -0
- package/components/lib/coer-numberbox/coer-numberbox.component.d.ts +55 -0
- package/components/lib/coer-page-title/coer-page-title.component.d.ts +12 -0
- package/components/lib/coer-selectbox/coer-selectbox.component.d.ts +75 -0
- package/components/lib/coer-switch/coer-switch.component.d.ts +31 -0
- package/components/lib/coer-tab/coer-tab.component.d.ts +35 -0
- package/components/lib/coer-textarea/coer-textarea.component.d.ts +51 -0
- package/components/lib/coer-textbox/coer-textbox.component.d.ts +57 -0
- package/components/lib/components.module.d.ts +30 -0
- package/components/public-api.d.ts +15 -0
- package/directives/index.d.ts +5 -0
- package/directives/lib/coer-ref.directive.d.ts +14 -0
- package/directives/lib/directives.module.d.ts +8 -0
- package/directives/lib/life-cycle.directive.d.ts +16 -0
- package/directives/public-api.d.ts +3 -0
- package/esm2022/components/coer-elements-components.mjs +5 -0
- package/esm2022/components/lib/coer-button/coer-button.component.mjs +133 -0
- package/esm2022/components/lib/coer-checkbox/coer-checkbox.component.mjs +83 -0
- package/esm2022/components/lib/coer-filebox/coer-filebox.component.mjs +102 -0
- package/esm2022/components/lib/coer-form/coer-form.component.mjs +101 -0
- package/esm2022/components/lib/coer-grid/coer-grid.component.mjs +512 -0
- package/esm2022/components/lib/coer-grid/coer-grid.extension.mjs +408 -0
- package/esm2022/components/lib/coer-grid/coer-grid.templates.mjs +30 -0
- package/esm2022/components/lib/coer-modal/coer-modal.component.mjs +107 -0
- package/esm2022/components/lib/coer-numberbox/coer-numberbox.component.mjs +258 -0
- package/esm2022/components/lib/coer-page-title/coer-page-title.component.mjs +44 -0
- package/esm2022/components/lib/coer-selectbox/coer-selectbox.component.mjs +338 -0
- package/esm2022/components/lib/coer-switch/coer-switch.component.mjs +93 -0
- package/esm2022/components/lib/coer-tab/coer-tab.component.mjs +116 -0
- package/esm2022/components/lib/coer-textarea/coer-textarea.component.mjs +156 -0
- package/esm2022/components/lib/coer-textbox/coer-textbox.component.mjs +195 -0
- package/esm2022/components/lib/components.module.mjs +129 -0
- package/esm2022/components/public-api.mjs +16 -0
- package/esm2022/directives/coer-elements-directives.mjs +5 -0
- package/esm2022/directives/lib/coer-ref.directive.mjs +23 -0
- package/esm2022/directives/lib/directives.module.mjs +25 -0
- package/esm2022/directives/lib/life-cycle.directive.mjs +33 -0
- package/esm2022/directives/public-api.mjs +4 -0
- package/esm2022/interfaces/coer-elements-interfaces.mjs +5 -0
- package/esm2022/interfaces/lib/app-source.interface.mjs +2 -0
- package/esm2022/interfaces/lib/coer-filebox/file-image.interface.mjs +2 -0
- package/esm2022/interfaces/lib/coer-filebox/file.interface.mjs +2 -0
- package/esm2022/interfaces/lib/coer-grid/grid-button-by-row.interface.mjs +2 -0
- package/esm2022/interfaces/lib/coer-grid/grid-checkbox.interface.mjs +2 -0
- package/esm2022/interfaces/lib/coer-grid/grid-coer-numberbox.interface.mjs +2 -0
- package/esm2022/interfaces/lib/coer-grid/grid-coer-selectbox.interface.mjs +2 -0
- package/esm2022/interfaces/lib/coer-grid/grid-coer-switch.interface.mjs +2 -0
- package/esm2022/interfaces/lib/coer-grid/grid-coer-textbox.interface.mjs +2 -0
- package/esm2022/interfaces/lib/coer-grid/grid-column.interface.mjs +2 -0
- package/esm2022/interfaces/lib/coer-grid/grid-data-source.interface.mjs +2 -0
- package/esm2022/interfaces/lib/coer-grid/grid-header-button.interface.mjs +2 -0
- package/esm2022/interfaces/lib/coer-grid/grid-header-export-button.interface.mjs +2 -0
- package/esm2022/interfaces/lib/coer-grid/grid-header.interface.mjs +2 -0
- package/esm2022/interfaces/lib/coer-grid/grid-import.interface.mjs +2 -0
- package/esm2022/interfaces/lib/coer-grid/grid-input-checkbox.interface.mjs +2 -0
- package/esm2022/interfaces/lib/coer-grid/grid-input-switch-change.interface.mjs +2 -0
- package/esm2022/interfaces/lib/coer-grid/grid-input-textbox.interface.mjs +2 -0
- package/esm2022/interfaces/lib/coer-grid/grid-item.interface.mjs +2 -0
- package/esm2022/interfaces/lib/coer-grid/grid-keyup-enter.interface.mjs +2 -0
- package/esm2022/interfaces/lib/coer-grid/grid-length.interface.mjs +2 -0
- package/esm2022/interfaces/lib/coer-grid/grid-search.interface.mjs +2 -0
- package/esm2022/interfaces/lib/coer-grid/grid-sort.interface.mjs +2 -0
- package/esm2022/interfaces/lib/coer-menu/menu-option-selected.interface.mjs +2 -0
- package/esm2022/interfaces/lib/coer-menu/menu-selected.interface.mjs +2 -0
- package/esm2022/interfaces/lib/coer-menu/menu.interface.mjs +2 -0
- package/esm2022/interfaces/lib/coer-ref.interface.mjs +2 -0
- package/esm2022/interfaces/lib/page-title/breadcrumb.interface.mjs +2 -0
- package/esm2022/interfaces/lib/page-title/go-back.interface.mjs +2 -0
- package/esm2022/interfaces/lib/screen-size.interface.mjs +2 -0
- package/esm2022/interfaces/lib/service/http-request.interface.mjs +2 -0
- package/esm2022/interfaces/lib/service/http-response.interface.mjs +2 -0
- package/esm2022/interfaces/lib/service/patch.interface.mjs +2 -0
- package/esm2022/interfaces/public-api.mjs +39 -0
- package/esm2022/pipes/coer-elements-pipes.mjs +5 -0
- package/esm2022/pipes/lib/html.pipe.mjs +18 -0
- package/esm2022/pipes/lib/no-image.pipe.mjs +23 -0
- package/esm2022/pipes/lib/numeric-format.pipe.mjs +15 -0
- package/esm2022/pipes/lib/pipes.module.mjs +31 -0
- package/esm2022/pipes/public-api.mjs +5 -0
- package/esm2022/signals/coer-elements-signals.mjs +5 -0
- package/esm2022/signals/lib/breakpoint.signal.mjs +4 -0
- package/esm2022/signals/lib/is-loading.signal.mjs +3 -0
- package/esm2022/signals/lib/is-menu-open.signal.mjs +3 -0
- package/esm2022/signals/lib/is-modal-open.signal.mjs +3 -0
- package/esm2022/signals/lib/menu.signal.mjs +3 -0
- package/esm2022/signals/public-api.mjs +6 -0
- package/esm2022/tools/coer-elements-tools.mjs +5 -0
- package/esm2022/tools/lib/breadcrumbs.class.mjs +63 -0
- package/esm2022/tools/lib/coer-alert/coer-alert.component.mjs +228 -0
- package/esm2022/tools/lib/control-value.class.mjs +46 -0
- package/esm2022/tools/lib/date-time.class.mjs +29 -0
- package/esm2022/tools/lib/files.class.mjs +91 -0
- package/esm2022/tools/lib/menu.class.mjs +23 -0
- package/esm2022/tools/lib/page.class.mjs +156 -0
- package/esm2022/tools/lib/screen.class.mjs +51 -0
- package/esm2022/tools/lib/service.class.mjs +247 -0
- package/esm2022/tools/lib/source.class.mjs +80 -0
- package/esm2022/tools/lib/tools.mjs +220 -0
- package/esm2022/tools/public-api.mjs +12 -0
- package/fesm2022/coer-elements-components.mjs +2718 -0
- package/fesm2022/coer-elements-components.mjs.map +1 -0
- package/fesm2022/coer-elements-directives.mjs +82 -0
- package/fesm2022/coer-elements-directives.mjs.map +1 -0
- package/fesm2022/coer-elements-interfaces.mjs +6 -0
- package/fesm2022/coer-elements-interfaces.mjs.map +1 -0
- package/fesm2022/coer-elements-pipes.mjs +83 -0
- package/fesm2022/coer-elements-pipes.mjs.map +1 -0
- package/fesm2022/coer-elements-signals.mjs +19 -0
- package/fesm2022/coer-elements-signals.mjs.map +1 -0
- package/fesm2022/coer-elements-tools.mjs +1223 -0
- package/fesm2022/coer-elements-tools.mjs.map +1 -0
- package/interfaces/index.d.ts +5 -0
- package/interfaces/lib/app-source.interface.d.ts +4 -0
- package/interfaces/lib/coer-filebox/file-image.interface.d.ts +14 -0
- package/interfaces/lib/coer-filebox/file.interface.d.ts +5 -0
- package/interfaces/lib/coer-grid/grid-button-by-row.interface.d.ts +6 -0
- package/interfaces/lib/coer-grid/grid-checkbox.interface.d.ts +5 -0
- package/interfaces/lib/coer-grid/grid-coer-numberbox.interface.d.ts +12 -0
- package/interfaces/lib/coer-grid/grid-coer-selectbox.interface.d.ts +9 -0
- package/interfaces/lib/coer-grid/grid-coer-switch.interface.d.ts +6 -0
- package/interfaces/lib/coer-grid/grid-coer-textbox.interface.d.ts +11 -0
- package/interfaces/lib/coer-grid/grid-column.interface.d.ts +22 -0
- package/interfaces/lib/coer-grid/grid-data-source.interface.d.ts +6 -0
- package/interfaces/lib/coer-grid/grid-header-button.interface.d.ts +8 -0
- package/interfaces/lib/coer-grid/grid-header-export-button.interface.d.ts +10 -0
- package/interfaces/lib/coer-grid/grid-header.interface.d.ts +5 -0
- package/interfaces/lib/coer-grid/grid-import.interface.d.ts +4 -0
- package/interfaces/lib/coer-grid/grid-input-checkbox.interface.d.ts +5 -0
- package/interfaces/lib/coer-grid/grid-input-switch-change.interface.d.ts +5 -0
- package/interfaces/lib/coer-grid/grid-input-textbox.interface.d.ts +5 -0
- package/interfaces/lib/coer-grid/grid-item.interface.d.ts +5 -0
- package/interfaces/lib/coer-grid/grid-keyup-enter.interface.d.ts +6 -0
- package/interfaces/lib/coer-grid/grid-length.interface.d.ts +5 -0
- package/interfaces/lib/coer-grid/grid-search.interface.d.ts +4 -0
- package/interfaces/lib/coer-grid/grid-sort.interface.d.ts +5 -0
- package/interfaces/lib/coer-menu/menu-option-selected.interface.d.ts +9 -0
- package/interfaces/lib/coer-menu/menu-selected.interface.d.ts +10 -0
- package/interfaces/lib/coer-menu/menu.interface.d.ts +6 -0
- package/interfaces/lib/coer-ref.interface.d.ts +10 -0
- package/interfaces/lib/page-title/breadcrumb.interface.d.ts +6 -0
- package/interfaces/lib/page-title/go-back.interface.d.ts +6 -0
- package/interfaces/lib/screen-size.interface.d.ts +5 -0
- package/interfaces/lib/service/http-request.interface.d.ts +10 -0
- package/interfaces/lib/service/http-response.interface.d.ts +6 -0
- package/interfaces/lib/service/patch.interface.d.ts +5 -0
- package/interfaces/public-api.d.ts +33 -0
- package/package.json +37 -1
- package/pipes/index.d.ts +5 -0
- package/pipes/lib/html.pipe.d.ts +10 -0
- package/pipes/lib/no-image.pipe.d.ts +7 -0
- package/pipes/lib/numeric-format.pipe.d.ts +7 -0
- package/pipes/lib/pipes.module.d.ts +9 -0
- package/pipes/public-api.d.ts +4 -0
- package/signals/index.d.ts +5 -0
- package/signals/lib/breakpoint.signal.d.ts +1 -0
- package/signals/lib/is-loading.signal.d.ts +1 -0
- package/signals/lib/is-menu-open.signal.d.ts +1 -0
- package/signals/lib/is-modal-open.signal.d.ts +1 -0
- package/signals/lib/menu.signal.d.ts +2 -0
- package/signals/public-api.d.ts +5 -0
- package/tools/index.d.ts +5 -0
- package/tools/lib/breadcrumbs.class.d.ts +18 -0
- package/tools/lib/coer-alert/coer-alert.component.d.ts +23 -0
- package/tools/lib/control-value.class.d.ts +25 -0
- package/tools/lib/date-time.class.d.ts +13 -0
- package/tools/lib/files.class.d.ts +16 -0
- package/tools/lib/menu.class.d.ts +8 -0
- package/tools/lib/page.class.d.ts +60 -0
- package/tools/lib/screen.class.d.ts +13 -0
- package/tools/lib/service.class.d.ts +39 -0
- package/tools/lib/source.class.d.ts +20 -0
- package/tools/lib/tools.d.ts +34 -0
- package/tools/public-api.d.ts +11 -0
@@ -0,0 +1,228 @@
|
|
1
|
+
import { Component } from '@angular/core';
|
2
|
+
import { Tools } from '../tools';
|
3
|
+
import * as bootstrap from 'bootstrap';
|
4
|
+
import Swal from 'sweetalert2';
|
5
|
+
import * as i0 from "@angular/core";
|
6
|
+
export class CoerAlert {
|
7
|
+
/** */
|
8
|
+
Success(message = null, title = null, icon = null, autohide = 3000) {
|
9
|
+
//Title
|
10
|
+
if (Tools.IsOnlyWhiteSpace(title))
|
11
|
+
title = 'Success';
|
12
|
+
const alertSuccessTitle = document.getElementById('alert-success-title');
|
13
|
+
alertSuccessTitle.textContent = title;
|
14
|
+
//Icon
|
15
|
+
icon = this.GetIcon(title, icon, 'bi-check-circle fa-beat');
|
16
|
+
const alertSuccessIcon = document.getElementById('alert-success-icon');
|
17
|
+
this.SetIcon(alertSuccessIcon, icon);
|
18
|
+
//Message
|
19
|
+
if (Tools.IsNull(message))
|
20
|
+
message = '';
|
21
|
+
const alertSuccessMessage = document.getElementById('alert-success-message');
|
22
|
+
alertSuccessMessage.innerHTML = message;
|
23
|
+
//Toast
|
24
|
+
const alertSuccess = document.getElementById('alert-success');
|
25
|
+
this.SetAutoHide(alertSuccess, autohide);
|
26
|
+
const toast = bootstrap.Toast.getOrCreateInstance(alertSuccess);
|
27
|
+
toast.show();
|
28
|
+
}
|
29
|
+
/** */
|
30
|
+
Error(message = null, title = null, icon = null, autohide = 3000) {
|
31
|
+
//Title
|
32
|
+
if (Tools.IsOnlyWhiteSpace(title))
|
33
|
+
title = 'Error';
|
34
|
+
const alertErrorTitle = document.getElementById('alert-error-title');
|
35
|
+
alertErrorTitle.textContent = title;
|
36
|
+
//Icon
|
37
|
+
icon = this.GetIcon(title, icon, 'bi-exclamation-octagon fa-beat');
|
38
|
+
const alertErrorIcon = document.getElementById('alert-error-icon');
|
39
|
+
this.SetIcon(alertErrorIcon, icon);
|
40
|
+
//Message
|
41
|
+
if (Tools.IsNull(message))
|
42
|
+
message = '';
|
43
|
+
const alertErrorBody = document.getElementById('alert-error-message');
|
44
|
+
alertErrorBody.innerHTML = message;
|
45
|
+
//Toast
|
46
|
+
const alertError = document.getElementById('alert-error');
|
47
|
+
this.SetAutoHide(alertError, autohide);
|
48
|
+
const toast = bootstrap.Toast.getOrCreateInstance(alertError);
|
49
|
+
toast.show();
|
50
|
+
}
|
51
|
+
/** */
|
52
|
+
Info(message = null, title = null, icon = null, autohide = 3000) {
|
53
|
+
//Title
|
54
|
+
if (Tools.IsOnlyWhiteSpace(title))
|
55
|
+
title = 'Info';
|
56
|
+
const alertInfoTitle = document.getElementById('alert-info-title');
|
57
|
+
alertInfoTitle.textContent = title;
|
58
|
+
//Icon
|
59
|
+
icon = this.GetIcon(title, icon, 'bi-info-circle fa-beat');
|
60
|
+
const alertInfoIcon = document.getElementById('alert-info-icon');
|
61
|
+
this.SetIcon(alertInfoIcon, icon);
|
62
|
+
//Message
|
63
|
+
if (Tools.IsNull(message))
|
64
|
+
message = '';
|
65
|
+
const alertInfoBody = document.getElementById('alert-info-message');
|
66
|
+
alertInfoBody.innerHTML = message;
|
67
|
+
//Toast
|
68
|
+
const alertInfo = document.getElementById('alert-info');
|
69
|
+
this.SetAutoHide(alertInfo, autohide);
|
70
|
+
const toast = bootstrap.Toast.getOrCreateInstance(alertInfo);
|
71
|
+
toast.show();
|
72
|
+
}
|
73
|
+
/** */
|
74
|
+
Warning(message = null, title = null, icon = null, autohide = 3000) {
|
75
|
+
//Title
|
76
|
+
if (Tools.IsOnlyWhiteSpace(title))
|
77
|
+
title = 'Warning';
|
78
|
+
const alertWarningTitle = document.getElementById('alert-warning-title');
|
79
|
+
alertWarningTitle.textContent = title;
|
80
|
+
//Icon
|
81
|
+
icon = this.GetIcon(title, icon, 'bi-exclamation-triangle-fill fa-beat');
|
82
|
+
const alertWarningIcon = document.getElementById('alert-warning-icon');
|
83
|
+
this.SetIcon(alertWarningIcon, icon);
|
84
|
+
//Message
|
85
|
+
if (Tools.IsNull(message))
|
86
|
+
message = '';
|
87
|
+
const alertWarningBody = document.getElementById('alert-warning-message');
|
88
|
+
alertWarningBody.innerHTML = message;
|
89
|
+
//Toast
|
90
|
+
const alertWarning = document.getElementById('alert-warning');
|
91
|
+
this.SetAutoHide(alertWarning, autohide);
|
92
|
+
const toast = bootstrap.Toast.getOrCreateInstance(alertWarning);
|
93
|
+
toast.show();
|
94
|
+
}
|
95
|
+
/** */
|
96
|
+
Close(alert) {
|
97
|
+
return new Promise(Resolve => {
|
98
|
+
const element = document.getElementById(alert);
|
99
|
+
const toast = bootstrap.Toast.getOrCreateInstance(element);
|
100
|
+
toast.hide();
|
101
|
+
setTimeout(() => { Resolve(); }, 200);
|
102
|
+
});
|
103
|
+
}
|
104
|
+
/** */
|
105
|
+
Confirm(message = 'Proceed?', alertType = 'warning', icon = null) {
|
106
|
+
return new Promise(Resolve => {
|
107
|
+
let color;
|
108
|
+
let iconType;
|
109
|
+
switch (alertType) {
|
110
|
+
case 'danger':
|
111
|
+
{
|
112
|
+
if (Tools.IsNull(icon))
|
113
|
+
icon = 'bi-exclamation-octagon';
|
114
|
+
iconType = 'error';
|
115
|
+
color = '#dc3545'; //red
|
116
|
+
break;
|
117
|
+
}
|
118
|
+
;
|
119
|
+
case 'success':
|
120
|
+
{
|
121
|
+
if (Tools.IsNull(icon))
|
122
|
+
icon = 'bi-check-circle';
|
123
|
+
iconType = 'info';
|
124
|
+
color = '#198754'; //green
|
125
|
+
break;
|
126
|
+
}
|
127
|
+
;
|
128
|
+
case 'info':
|
129
|
+
{
|
130
|
+
if (Tools.IsNull(icon))
|
131
|
+
icon = 'bi-info-circle';
|
132
|
+
iconType = 'error';
|
133
|
+
color = '#0d6efd'; //blue
|
134
|
+
break;
|
135
|
+
}
|
136
|
+
;
|
137
|
+
default: {
|
138
|
+
if (Tools.IsNull(icon))
|
139
|
+
icon = 'bi-exclamation-triangle-fill';
|
140
|
+
iconType = 'warning';
|
141
|
+
color = '#ffc107'; //yellow
|
142
|
+
break;
|
143
|
+
}
|
144
|
+
}
|
145
|
+
switch (icon) {
|
146
|
+
case 'delete':
|
147
|
+
icon = 'fa-regular fa-trash-can';
|
148
|
+
break;
|
149
|
+
}
|
150
|
+
Swal.fire({
|
151
|
+
icon: iconType,
|
152
|
+
iconColor: 'transparent',
|
153
|
+
iconHtml: `<i class="${icon}" style="color: ${color};"></i>`,
|
154
|
+
html: message,
|
155
|
+
showConfirmButton: true,
|
156
|
+
confirmButtonText: 'Yes',
|
157
|
+
confirmButtonColor: color,
|
158
|
+
focusConfirm: true,
|
159
|
+
showDenyButton: true,
|
160
|
+
denyButtonColor: color,
|
161
|
+
focusDeny: false,
|
162
|
+
reverseButtons: true,
|
163
|
+
allowOutsideClick: false,
|
164
|
+
allowEscapeKey: false,
|
165
|
+
allowEnterKey: true,
|
166
|
+
customClass: {
|
167
|
+
denyButton: 'sweet-alert-button',
|
168
|
+
confirmButton: 'sweet-alert-button'
|
169
|
+
}
|
170
|
+
}).then(({ value }) => setTimeout(() => Resolve(value)));
|
171
|
+
});
|
172
|
+
}
|
173
|
+
/** */
|
174
|
+
SetIcon(element, icon) {
|
175
|
+
for (const item of [...element.classList.value.split(' ')]) {
|
176
|
+
if (item.length > 0) {
|
177
|
+
element.classList.remove(item);
|
178
|
+
element.classList.remove('q');
|
179
|
+
}
|
180
|
+
}
|
181
|
+
icon = icon.trim();
|
182
|
+
const hasWhiteSpaces = / /;
|
183
|
+
if (hasWhiteSpaces.test(icon)) {
|
184
|
+
const classes = icon.split(' ');
|
185
|
+
for (const icon of classes)
|
186
|
+
element.classList.add(icon);
|
187
|
+
}
|
188
|
+
else
|
189
|
+
element.classList.add(icon);
|
190
|
+
}
|
191
|
+
/** */
|
192
|
+
SetAutoHide(element, autohide) {
|
193
|
+
element.removeAttribute('data-bs-autohide');
|
194
|
+
element.removeAttribute('data-bs-delay');
|
195
|
+
if (autohide && autohide > 0) {
|
196
|
+
if (autohide < 1000)
|
197
|
+
autohide = 1000;
|
198
|
+
element.setAttribute('data-bs-autohide', 'true');
|
199
|
+
element.setAttribute('data-bs-delay', String(autohide));
|
200
|
+
}
|
201
|
+
else
|
202
|
+
element.setAttribute('data-bs-autohide', 'false');
|
203
|
+
}
|
204
|
+
/** */
|
205
|
+
GetIcon(title, icon, iconDefault) {
|
206
|
+
if (icon == null || icon == '') {
|
207
|
+
title = title.replaceAll(' ', '').toUpperCase();
|
208
|
+
switch (title) {
|
209
|
+
case 'ENABLED': return 'fa-solid fa-thumbs-up fa-flip-horizontal';
|
210
|
+
case 'ACTIVE': return 'fa-solid fa-thumbs-up fa-flip-horizontal';
|
211
|
+
case 'ACTIVED': return 'fa-solid fa-thumbs-up fa-flip-horizontal';
|
212
|
+
case 'DISABLE': return 'fa-solid fa-thumbs-down fa-flip-horizontal';
|
213
|
+
case 'DISABLED': return 'fa-solid fa-thumbs-down fa-flip-horizontal';
|
214
|
+
case 'DELETE': return 'fa-regular fa-trash-can';
|
215
|
+
case 'DELETED': return 'fa-regular fa-trash-can';
|
216
|
+
default: return iconDefault;
|
217
|
+
}
|
218
|
+
}
|
219
|
+
return icon;
|
220
|
+
}
|
221
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: CoerAlert, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
222
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.12", type: CoerAlert, isStandalone: true, selector: "coer-alert", ngImport: i0, template: "<aside class=\"toast-container coer-alert\">\r\n <!-- Success -->\r\n <div id=\"alert-success\" role=\"alert\" aria-live=\"assertive\" aria-atomic=\"true\" class=\"toast\">\r\n <div class=\"toast-header\">\r\n <i id=\"alert-success-icon\"></i>\r\n <strong id=\"alert-success-title\"></strong>\r\n <button type=\"button\" (click)=\"Close('alert-success')\" class=\"btn-close btn-close-white\"></button>\r\n </div>\r\n\r\n <div class=\"toast-body\">\r\n <pre id=\"alert-success-message\"></pre>\r\n </div>\r\n </div>\r\n\r\n\r\n <!-- Error -->\r\n <div id=\"alert-error\" role=\"alert\" aria-live=\"assertive\" aria-atomic=\"true\" class=\"toast\">\r\n <div class=\"toast-header\">\r\n <i id=\"alert-error-icon\"></i>\r\n <strong id=\"alert-error-title\"></strong>\r\n <button type=\"button\" (click)=\"Close('alert-error')\" class=\"btn-close btn-close-white\"></button>\r\n </div>\r\n\r\n <div class=\"toast-body\">\r\n <pre id=\"alert-error-message\"></pre>\r\n </div>\r\n </div>\r\n\r\n\r\n <!-- Info -->\r\n <div id=\"alert-info\" role=\"alert\" aria-live=\"assertive\" aria-atomic=\"true\" class=\"toast\">\r\n <div class=\"toast-header\">\r\n <i id=\"alert-info-icon\"></i>\r\n <strong id=\"alert-info-title\"></strong>\r\n <button type=\"button\" (click)=\"Close('alert-info')\" class=\"btn-close btn-close-white\"></button>\r\n </div>\r\n\r\n <div class=\"toast-body\">\r\n <pre id=\"alert-info-message\"></pre>\r\n </div>\r\n </div>\r\n\r\n\r\n <!-- Warning -->\r\n <div id=\"alert-warning\" role=\"alert\" aria-live=\"assertive\" aria-atomic=\"true\" class=\"toast\">\r\n <div class=\"toast-header\">\r\n <i id=\"alert-warning-icon\"></i>\r\n <strong id=\"alert-warning-title\"></strong>\r\n <button type=\"button\" (click)=\"Close('alert-warning')\" class=\"btn-close\"></button>\r\n </div>\r\n\r\n <div class=\"toast-body\">\r\n <pre id=\"alert-warning-message\"></pre>\r\n </div>\r\n </div>\r\n</aside>", styles: ["*{--blue: #0d6efd;--gray: #6c757d;--green: #198754;--yellow: #ffc107;--red: #dc3545;--white: #f5f5f5;--black: #252525;--orange: #fd6031}.text-blue{color:#0d6efd!important}.text-blue-bold{color:#0d6efd!important;font-weight:700!important}.background-blue{background-color:#0d6efd!important}.background-border-blue{background-color:#0d6efd!important;border-color:#0d6efd!important}.border-blue{border-color:#0d6efd!important}.text-gray{color:#6c757d!important}.text-gray-bold{color:#6c757d!important;font-weight:700!important}.background-gray{background-color:#6c757d!important}.background-border-gray{background-color:#6c757d!important;border-color:#6c757d!important}.border-gray{border-color:#6c757d!important}.text-green{color:#198754!important}.text-green-bold{color:#198754!important;font-weight:700!important}.background-green{background-color:#198754!important}.background-border-green{background-color:#198754!important;border-color:#198754!important}.border-green{border-color:#198754!important}.text-yellow{color:#ffc107!important}.text-yellow-bold{color:#ffc107!important;font-weight:700!important}.background-yellow{background-color:#ffc107!important}.background-border-yellow{background-color:#ffc107!important;border-color:#ffc107!important}.border-yellow{border-color:#ffc107!important}.text-red{color:#dc3545!important}.text-red-bold{color:#dc3545!important;font-weight:700!important}.background-red{background-color:#dc3545!important}.background-border-red{background-color:#dc3545!important;border-color:#dc3545!important}.border-red{border-color:#dc3545!important}.text-white{color:#f5f5f5!important}.text-white-bold{color:#f5f5f5!important;font-weight:700!important}.background-white{background-color:#f5f5f5!important}.background-border-white{background-color:#f5f5f5!important;border-color:#f5f5f5!important}.border-white{border-color:#f5f5f5!important}.text-black{color:#252525!important}.text-black-bold{color:#252525!important;font-weight:700!important}.background-black{background-color:#252525!important}.background-border-black{background-color:#252525!important;border-color:#252525!important}.border-black{border-color:#252525!important}.text-orange{color:#fd6031!important}.text-orange-bold{color:#fd6031!important;font-weight:700!important}.background-orange{background-color:#fd6031!important}.background-border-orange{background-color:#fd6031!important;border-color:#fd6031!important}.border-orange{border-color:#fd6031!important}aside.toast-container{position:fixed;bottom:0;right:0;padding:15px!important;z-index:2000!important}aside.toast-container i,aside.toast-container svg{display:flex;align-items:center}aside.toast-container strong{margin:0 auto 0 5px}aside.toast-container div.toast,aside.toast-container div.toast-header{border-top-left-radius:10px;border-top-right-radius:10px;color:#f5f5f5}aside.toast-container div.toast,aside.toast-container div.toast-body{border-bottom-left-radius:10px;border-bottom-right-radius:10px;color:#f5f5f5}aside.toast-container div.toast-body{min-height:36px}aside.toast-container pre{font-family:Roboto,RobotoFallback,Noto Kufi Arabic,Helvetica,Arial,sans-serif;white-space:pre-wrap;font-size:medium}aside.toast-container button{margin:0 2px!important;width:10px!important;height:10px!important;box-shadow:none!important;outline:none!important;border:none!important}aside.toast-container div#alert-success div.toast-header,aside.toast-container div#alert-success div.toast-body{background-color:#198754}aside.toast-container div#alert-info div.toast-header,aside.toast-container div#alert-info div.toast-body{background-color:#0d6efd}aside.toast-container div#alert-error div.toast-header,aside.toast-container div#alert-error div.toast-body{background-color:#dc3545}aside.toast-container div#alert-warning div.toast-header,aside.toast-container div#alert-warning div.toast-body{background-color:#ffc107;border-color:#252525;color:#252525}aside.toast-container div#alert-success:hover,aside.toast-container div#alert-info:hover,aside.toast-container div#alert-error:hover,aside.toast-container div#alert-warning:hover{transform:scale(1.01);box-shadow:2px 2px 10px #789;cursor:default}button.sweet-alert-button{width:100px!important;height:40px!important;display:flex!important;align-items:center!important;justify-content:center!important;margin:0 5px!important;outline:none!important;border:none!important;box-shadow:none!important}aside.toast-container>*{border:none!important;z-index:2000!important;margin:15px 0 0!important}\n"] }); }
|
223
|
+
}
|
224
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: CoerAlert, decorators: [{
|
225
|
+
type: Component,
|
226
|
+
args: [{ selector: 'coer-alert', standalone: true, template: "<aside class=\"toast-container coer-alert\">\r\n <!-- Success -->\r\n <div id=\"alert-success\" role=\"alert\" aria-live=\"assertive\" aria-atomic=\"true\" class=\"toast\">\r\n <div class=\"toast-header\">\r\n <i id=\"alert-success-icon\"></i>\r\n <strong id=\"alert-success-title\"></strong>\r\n <button type=\"button\" (click)=\"Close('alert-success')\" class=\"btn-close btn-close-white\"></button>\r\n </div>\r\n\r\n <div class=\"toast-body\">\r\n <pre id=\"alert-success-message\"></pre>\r\n </div>\r\n </div>\r\n\r\n\r\n <!-- Error -->\r\n <div id=\"alert-error\" role=\"alert\" aria-live=\"assertive\" aria-atomic=\"true\" class=\"toast\">\r\n <div class=\"toast-header\">\r\n <i id=\"alert-error-icon\"></i>\r\n <strong id=\"alert-error-title\"></strong>\r\n <button type=\"button\" (click)=\"Close('alert-error')\" class=\"btn-close btn-close-white\"></button>\r\n </div>\r\n\r\n <div class=\"toast-body\">\r\n <pre id=\"alert-error-message\"></pre>\r\n </div>\r\n </div>\r\n\r\n\r\n <!-- Info -->\r\n <div id=\"alert-info\" role=\"alert\" aria-live=\"assertive\" aria-atomic=\"true\" class=\"toast\">\r\n <div class=\"toast-header\">\r\n <i id=\"alert-info-icon\"></i>\r\n <strong id=\"alert-info-title\"></strong>\r\n <button type=\"button\" (click)=\"Close('alert-info')\" class=\"btn-close btn-close-white\"></button>\r\n </div>\r\n\r\n <div class=\"toast-body\">\r\n <pre id=\"alert-info-message\"></pre>\r\n </div>\r\n </div>\r\n\r\n\r\n <!-- Warning -->\r\n <div id=\"alert-warning\" role=\"alert\" aria-live=\"assertive\" aria-atomic=\"true\" class=\"toast\">\r\n <div class=\"toast-header\">\r\n <i id=\"alert-warning-icon\"></i>\r\n <strong id=\"alert-warning-title\"></strong>\r\n <button type=\"button\" (click)=\"Close('alert-warning')\" class=\"btn-close\"></button>\r\n </div>\r\n\r\n <div class=\"toast-body\">\r\n <pre id=\"alert-warning-message\"></pre>\r\n </div>\r\n </div>\r\n</aside>", styles: ["*{--blue: #0d6efd;--gray: #6c757d;--green: #198754;--yellow: #ffc107;--red: #dc3545;--white: #f5f5f5;--black: #252525;--orange: #fd6031}.text-blue{color:#0d6efd!important}.text-blue-bold{color:#0d6efd!important;font-weight:700!important}.background-blue{background-color:#0d6efd!important}.background-border-blue{background-color:#0d6efd!important;border-color:#0d6efd!important}.border-blue{border-color:#0d6efd!important}.text-gray{color:#6c757d!important}.text-gray-bold{color:#6c757d!important;font-weight:700!important}.background-gray{background-color:#6c757d!important}.background-border-gray{background-color:#6c757d!important;border-color:#6c757d!important}.border-gray{border-color:#6c757d!important}.text-green{color:#198754!important}.text-green-bold{color:#198754!important;font-weight:700!important}.background-green{background-color:#198754!important}.background-border-green{background-color:#198754!important;border-color:#198754!important}.border-green{border-color:#198754!important}.text-yellow{color:#ffc107!important}.text-yellow-bold{color:#ffc107!important;font-weight:700!important}.background-yellow{background-color:#ffc107!important}.background-border-yellow{background-color:#ffc107!important;border-color:#ffc107!important}.border-yellow{border-color:#ffc107!important}.text-red{color:#dc3545!important}.text-red-bold{color:#dc3545!important;font-weight:700!important}.background-red{background-color:#dc3545!important}.background-border-red{background-color:#dc3545!important;border-color:#dc3545!important}.border-red{border-color:#dc3545!important}.text-white{color:#f5f5f5!important}.text-white-bold{color:#f5f5f5!important;font-weight:700!important}.background-white{background-color:#f5f5f5!important}.background-border-white{background-color:#f5f5f5!important;border-color:#f5f5f5!important}.border-white{border-color:#f5f5f5!important}.text-black{color:#252525!important}.text-black-bold{color:#252525!important;font-weight:700!important}.background-black{background-color:#252525!important}.background-border-black{background-color:#252525!important;border-color:#252525!important}.border-black{border-color:#252525!important}.text-orange{color:#fd6031!important}.text-orange-bold{color:#fd6031!important;font-weight:700!important}.background-orange{background-color:#fd6031!important}.background-border-orange{background-color:#fd6031!important;border-color:#fd6031!important}.border-orange{border-color:#fd6031!important}aside.toast-container{position:fixed;bottom:0;right:0;padding:15px!important;z-index:2000!important}aside.toast-container i,aside.toast-container svg{display:flex;align-items:center}aside.toast-container strong{margin:0 auto 0 5px}aside.toast-container div.toast,aside.toast-container div.toast-header{border-top-left-radius:10px;border-top-right-radius:10px;color:#f5f5f5}aside.toast-container div.toast,aside.toast-container div.toast-body{border-bottom-left-radius:10px;border-bottom-right-radius:10px;color:#f5f5f5}aside.toast-container div.toast-body{min-height:36px}aside.toast-container pre{font-family:Roboto,RobotoFallback,Noto Kufi Arabic,Helvetica,Arial,sans-serif;white-space:pre-wrap;font-size:medium}aside.toast-container button{margin:0 2px!important;width:10px!important;height:10px!important;box-shadow:none!important;outline:none!important;border:none!important}aside.toast-container div#alert-success div.toast-header,aside.toast-container div#alert-success div.toast-body{background-color:#198754}aside.toast-container div#alert-info div.toast-header,aside.toast-container div#alert-info div.toast-body{background-color:#0d6efd}aside.toast-container div#alert-error div.toast-header,aside.toast-container div#alert-error div.toast-body{background-color:#dc3545}aside.toast-container div#alert-warning div.toast-header,aside.toast-container div#alert-warning div.toast-body{background-color:#ffc107;border-color:#252525;color:#252525}aside.toast-container div#alert-success:hover,aside.toast-container div#alert-info:hover,aside.toast-container div#alert-error:hover,aside.toast-container div#alert-warning:hover{transform:scale(1.01);box-shadow:2px 2px 10px #789;cursor:default}button.sweet-alert-button{width:100px!important;height:40px!important;display:flex!important;align-items:center!important;justify-content:center!important;margin:0 5px!important;outline:none!important;border:none!important;box-shadow:none!important}aside.toast-container>*{border:none!important;z-index:2000!important;margin:15px 0 0!important}\n"] }]
|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aW5nID0gJ1Byb2NlZWQ/JyxcclxuICAgICAgICBhbGVydFR5cGU6ICd3YXJuaW5nJyB8ICdkYW5nZXInIHwgJ3N1Y2Nlc3MnIHwgJ2luZm8nID0gJ3dhcm5pbmcnLFxyXG4gICAgICAgIGljb246IHN0cmluZyB8IG51bGwgPSBudWxsKSB7XHJcbiAgICAgICAgcmV0dXJuIG5ldyBQcm9taXNlPGJvb2xlYW4+KFJlc29sdmUgPT4ge1xyXG4gICAgICAgICAgICBsZXQgY29sb3I6IHN0cmluZztcclxuICAgICAgICAgICAgbGV0IGljb25UeXBlOiAnd2FybmluZycgfCAnZXJyb3InIHwgJ3N1Y2Nlc3MnIHwgJ2luZm8nO1xyXG4gICAgICAgICAgICBzd2l0Y2goYWxlcnRUeXBlKSB7XHJcbiAgICAgICAgICAgICAgICBjYXNlICdkYW5nZXInOiB7XHJcbiAgICAgICAgICAgICAgICAgICAgaWYgKFRvb2xzLklzTnVsbChpY29uKSkgaWNvbiA9ICdiaS1leGNsYW1hdGlvbi1vY3RhZ29uJztcclxuICAgICAgICAgICAgICAgICAgICBpY29uVHlwZSA9ICdlcnJvcic7XHJcbiAgICAgICAgICAgICAgICAgICAgY29sb3IgPSAnI2RjMzU0NSc7IC8vcmVkXHJcbiAgICAgICAgICAgICAgICAgICAgYnJlYWs7XHJcbiAgICAgICAgICAgICAgICB9O1xyXG5cclxuICAgICAgICAgICAgICAgIGNhc2UgJ3N1Y2Nlc3MnOiB7XHJcbiAgICAgICAgICAgICAgICAgICAgaWYgKFRvb2xzLklzTnVsbChpY29uKSkgaWNvbiA9ICdiaS1jaGVjay1jaXJjbGUnO1xyXG4gICAgICAgICAgICAgICAgICAgIGljb25UeXBlID0gJ2luZm8nO1xyXG4gICAgICAgICAgICAgICAgICAgIGNvbG9yID0gJyMxOTg3NTQnOyAvL2dyZWVuXHJcbiAgICAgICAgICAgICAgICAgICAgYnJlYWs7XHJcbiAgICAgICAgICAgICAgICB9O1xyXG5cclxuICAgICAgICAgICAgICAgIGNhc2UgJ2luZm8nOiB7XHJcbiAgICAgICAgICAgICAgICAgICAgaWYgKFRvb2xzLklzTnVsbChpY29uKSkgaWNvbiA9ICdiaS1pbmZvLWNpcmNsZSc7XHJcbiAgICAgICAgICAgICAgICAgICAgaWNvblR5cGUgPSAnZXJyb3InO1xyXG4gICAgICAgICAgICAgICAgICAgIGNvbG9yID0gJyMwZDZlZmQnOyAvL2JsdWVcclxuICAgICAgICAgICAgICAgICAgICBicmVha1xyXG4gICAgICAgICAgICAgICAgfTtcclxuXHJcbiAgICAgICAgICAgICAgICBkZWZhdWx0OiB7XHJcbiAgICAgICAgICAgICAgICAgICAgaWYgKFRvb2xzLklzTnVsbChpY29uKSkgaWNvbiA9ICdiaS1leGNsYW1hdGlvbi10cmlhbmdsZS1maWxsJztcclxuICAgICAgICAgICAgICAgICAgICBpY29uVHlwZSA9ICd3YXJuaW5nJztcclxuICAgICAgICAgICAgICAgICAgICBjb2xvciA9ICcjZmZjMTA3JzsgLy95ZWxsb3dcclxuICAgICAgICAgICAgICAgICAgICBicmVhaztcclxuICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgfVxyXG5cclxuICAgICAgICAgICAgc3dpdGNoKGljb24pIHtcclxuICAgICAgICAgICAgICAgIGNhc2UgJ2RlbGV0ZSc6IGljb24gPSAnZmEtcmVndWxhciBmYS10cmFzaC1jYW4nOyBicmVhaztcclxuICAgICAgICAgICAgfVxyXG5cclxuICAgICAgICAgICAgU3dhbC5maXJlKHtcclxuICAgICAgICAgICAgICAgIGljb246IGljb25UeXBlLFxyXG4gICAgICAgICAgICAgICAgaWNvbkNvbG9yOiAndHJhbnNwYXJlbnQnLFxyXG4gICAgICAgICAgICAgICAgaWNvbkh0bWw6IGA8aSBjbGFzcz1cIiR7aWNvbn1cIiBzdHlsZT1cImNvbG9yOiAke2NvbG9yfTtcIj48L2k+YCxcclxuICAgICAgICAgICAgICAgIGh0bWw6IG1lc3NhZ2UsXHJcbiAgICAgICAgICAgICAgICBzaG93Q29uZmlybUJ1dHRvbjogdHJ1ZSxcclxuICAgICAgICAgICAgICAgIGNvbmZpcm1CdXR0b25UZXh0OiAnWWVzJyxcclxuICAgICAgICAgICAgICAgIGNvbmZpcm1CdXR0b25Db2xvcjogY29sb3IsXHJcbiAgICAgICAgICAgICAgICBmb2N1c0NvbmZpcm06IHRydWUsXHJcbiAgICAgICAgICAgICAgICBzaG93RGVueUJ1dHRvbjogdHJ1ZSxcclxuICAgICAgICAgICAgICAgIGRlbnlCdXR0b25Db2xvcjogY29sb3IsXHJcbiAgICAgICAgICAgICAgICBmb2N1c0Rlbnk6IGZhbHNlLFxyXG4gICAgICAgICAgICAgICAgcmV2ZXJzZUJ1dHRvbnM6IHRydWUsXHJcbiAgICAgICAgICAgICAgICBhbGxvd091dHNpZGVDbGljazogZmFsc2UsXHJcbiAgICAgICAgICAgICAgICBhbGxvd0VzY2FwZUtleTogZmFsc2UsXHJcbiAgICAgICAgICAgICAgICBhbGxvd0VudGVyS2V5OiB0cnVlLFxyXG4gICAgICAgICAgICAgICAgY3VzdG9tQ2xhc3M6IHtcclxuICAgICAgICAgICAgICAgICAgICBkZW55QnV0dG9uOiAnc3dlZXQtYWxlcnQtYnV0dG9uJyxcclxuICAgICAgICAgICAgICAgICAgICBjb25maXJtQnV0dG9uOiAnc3dlZXQtYWxlcnQtYnV0dG9uJ1xyXG4gICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICB9KS50aGVuKCh7IHZhbHVlIH0pID0+IHNldFRpbWVvdXQoKCkgPT4gUmVzb2x2ZSh2YWx1ZSkpKTtcclxuICAgICAgICB9KTtcclxuICAgIH1cclxuXHJcblxyXG4gICAgLyoqICovXHJcbiAgICBwcml2YXRlIFNldEljb24oZWxlbWVudDogSFRNTEVsZW1lbnQsIGljb246IHN0cmluZyk6IHZvaWQge1xyXG4gICAgICAgIGZvciAoY29uc3QgaXRlbSBvZiBbLi4uZWxlbWVudC5jbGFzc0xpc3QudmFsdWUu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AgICAgICAgPHByZSBpZD1cImFsZXJ0LXdhcm5pbmctbWVzc2FnZVwiPjwvcHJlPlxyXG4gICAgICAgIDwvZGl2PlxyXG4gICAgPC9kaXY+XHJcbjwvYXNpZGU+Il19
|
@@ -0,0 +1,46 @@
|
|
1
|
+
import { NG_VALUE_ACCESSOR } from "@angular/forms";
|
2
|
+
import { forwardRef } from "@angular/core";
|
3
|
+
export const CONTROL_VALUE = (component) => {
|
4
|
+
return {
|
5
|
+
provide: NG_VALUE_ACCESSOR,
|
6
|
+
useExisting: forwardRef(() => component),
|
7
|
+
multi: true
|
8
|
+
};
|
9
|
+
};
|
10
|
+
export class ControlValue {
|
11
|
+
constructor() {
|
12
|
+
this._isTouched = false;
|
13
|
+
}
|
14
|
+
get isTouched() {
|
15
|
+
return this._isTouched;
|
16
|
+
}
|
17
|
+
/** */
|
18
|
+
SetValue(value) {
|
19
|
+
if (typeof this._UpdateValue === 'function') {
|
20
|
+
this._UpdateValue(value);
|
21
|
+
}
|
22
|
+
this._value = value;
|
23
|
+
}
|
24
|
+
/** */
|
25
|
+
SetTouched(isTouched) {
|
26
|
+
if (typeof this._IsTouched === 'function') {
|
27
|
+
this._IsTouched(isTouched);
|
28
|
+
}
|
29
|
+
this._isTouched = isTouched;
|
30
|
+
}
|
31
|
+
/** */
|
32
|
+
writeValue(value) {
|
33
|
+
this._value = value;
|
34
|
+
}
|
35
|
+
/** */
|
36
|
+
registerOnChange(callback) {
|
37
|
+
this._UpdateValue = callback;
|
38
|
+
}
|
39
|
+
/** */
|
40
|
+
registerOnTouched(callback) {
|
41
|
+
this._IsTouched = callback;
|
42
|
+
}
|
43
|
+
/** */
|
44
|
+
setDisabledState(isDisabled) { }
|
45
|
+
}
|
46
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY29udHJvbC12YWx1ZS5jbGFzcy5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4u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kNoYW5nZShjYWxsYmFjazogRnVuY3Rpb24pOiB2b2lkIHtcclxuICAgICAgICB0aGlzLl9VcGRhdGVWYWx1ZSA9IGNhbGxiYWNrO1xyXG4gICAgfVxyXG5cclxuXHJcbiAgICAvKiogKi9cclxuICAgIHB1YmxpYyByZWdpc3Rlck9uVG91Y2hlZChjYWxsYmFjazogRnVuY3Rpb24pOiB2b2lkIHtcclxuICAgICAgICB0aGlzLl9Jc1RvdWNoZWQgPSBjYWxsYmFjaztcclxuICAgIH1cclxuXHJcbiAgICBcclxuICAgIC8qKiAqL1xyXG4gICAgcHVibGljIHNldERpc2FibGVkU3RhdGUoaXNEaXNhYmxlZDogYm9vbGVhbik6IHZvaWQge31cclxufSJdfQ==
|
@@ -0,0 +1,29 @@
|
|
1
|
+
import moment from "moment";
|
2
|
+
export class DateTime {
|
3
|
+
/** Get UTC Offset */
|
4
|
+
static GetOffset() {
|
5
|
+
return moment().utcOffset();
|
6
|
+
}
|
7
|
+
/** YYYY-MM-DD HH:mm:ss */
|
8
|
+
static GetFormatDB(date) {
|
9
|
+
if ((typeof date === 'string'))
|
10
|
+
date = date.replaceAll('/', '-');
|
11
|
+
return moment(date).format('YYYY-MM-DD HH:mm:ss');
|
12
|
+
}
|
13
|
+
/** Convert UTC Date to Local Zone */
|
14
|
+
static ToLocalZone(date) {
|
15
|
+
date = DateTime.GetFormatDB(date);
|
16
|
+
return moment(date).add(DateTime.GetOffset(), 'minutes').format('YYYY-MM-DD HH:mm:ss');
|
17
|
+
}
|
18
|
+
/** Convert Local Zone Date to UTC */
|
19
|
+
static ToUTC(date) {
|
20
|
+
date = DateTime.GetFormatDB(date);
|
21
|
+
return moment(date).subtract(DateTime.GetOffset(), 'minutes').format('YYYY-MM-DD HH:mm:ss');
|
22
|
+
}
|
23
|
+
/** DD MMM YYYY */
|
24
|
+
static GetDateFormat(date) {
|
25
|
+
date = DateTime.GetFormatDB(date);
|
26
|
+
return moment(date).parseZone().local(true).format('DD MMM YYYY');
|
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ICAgICByZXR1cm4gbW9tZW50KGRhdGUpLnBhcnNlWm9uZSgpLmxvY2FsKHRydWUpLmZvcm1hdCgnREQgTU1NIFlZWVknKTtcclxuICAgIH1cclxufSJdfQ==
|
@@ -0,0 +1,91 @@
|
|
1
|
+
import { Tools } from "./tools";
|
2
|
+
import * as XLSX from 'xlsx';
|
3
|
+
export class Files {
|
4
|
+
static { this.EXCEL_EXTENSIONS = ['xls', 'xlsx', 'csv']; }
|
5
|
+
/** Get Extension File */
|
6
|
+
static GetExtension(file) {
|
7
|
+
const fileName = file.name;
|
8
|
+
if (fileName.includes('.')) {
|
9
|
+
let worlds = fileName.split('.');
|
10
|
+
if (worlds.length > 0) {
|
11
|
+
let extension = worlds.pop();
|
12
|
+
extension = extension.trim().toLowerCase();
|
13
|
+
if (extension.length > 0)
|
14
|
+
return extension;
|
15
|
+
}
|
16
|
+
}
|
17
|
+
return null;
|
18
|
+
}
|
19
|
+
/** Is Excel File */
|
20
|
+
static IsExcel(file) {
|
21
|
+
const EXTENSION = Files.GetExtension(file);
|
22
|
+
return Tools.IsNotNull(EXTENSION)
|
23
|
+
? this.EXCEL_EXTENSIONS.includes(EXTENSION)
|
24
|
+
: false;
|
25
|
+
}
|
26
|
+
/** Read excel file */
|
27
|
+
static ReadExcel(file) {
|
28
|
+
return new Promise(Resolve => {
|
29
|
+
let columns = [];
|
30
|
+
let rows = [];
|
31
|
+
const reader = new FileReader();
|
32
|
+
reader.readAsArrayBuffer(file);
|
33
|
+
reader.onload = () => {
|
34
|
+
const dataBytes = new Uint8Array(reader.result);
|
35
|
+
if (dataBytes) {
|
36
|
+
const workbook = XLSX.read(dataBytes, {});
|
37
|
+
const sheet = workbook.Sheets[workbook.SheetNames[0]];
|
38
|
+
let dataSheet = XLSX.utils.sheet_to_json(sheet, {
|
39
|
+
header: ['A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z']
|
40
|
+
});
|
41
|
+
//Get Headers
|
42
|
+
for (const column in dataSheet[0]) {
|
43
|
+
columns.push(Tools.FirstCharToLower(String(dataSheet[0][column]).replaceAll(' ', '')));
|
44
|
+
}
|
45
|
+
//Get Rows
|
46
|
+
rows = XLSX.utils.sheet_to_json(sheet, { header: columns });
|
47
|
+
rows.shift();
|
48
|
+
rows = rows.map(row => {
|
49
|
+
const item = Tools.BreakReference(row);
|
50
|
+
delete item['__rowNum__'];
|
51
|
+
return item;
|
52
|
+
});
|
53
|
+
}
|
54
|
+
Resolve({ columns, rows });
|
55
|
+
};
|
56
|
+
reader.onerror = () => { Resolve({ columns, rows }); };
|
57
|
+
});
|
58
|
+
}
|
59
|
+
/** Export to excel file */
|
60
|
+
static ExportExcel(data, fileName = 'coer_report', sheetName = 'Sheet1') {
|
61
|
+
sheetName = Tools.CleanUpBlanks(sheetName);
|
62
|
+
fileName = Tools.CleanUpBlanks(fileName);
|
63
|
+
if (fileName.endsWith('.xls') || fileName.endsWith('.xlsx') || fileName.endsWith('.csv')) {
|
64
|
+
if (fileName.includes('.xls')) {
|
65
|
+
fileName = fileName.replaceAll('.xls', '.xlsx');
|
66
|
+
}
|
67
|
+
if (fileName.includes('.csv')) {
|
68
|
+
fileName = fileName.replaceAll('.csv', '.xlsx');
|
69
|
+
}
|
70
|
+
}
|
71
|
+
else {
|
72
|
+
fileName += '.xlsx';
|
73
|
+
}
|
74
|
+
const WORK_SHEET = XLSX.utils.json_to_sheet(data);
|
75
|
+
const WORK_BOOK = XLSX.utils.book_new();
|
76
|
+
XLSX.utils.book_append_sheet(WORK_BOOK, WORK_SHEET, sheetName);
|
77
|
+
XLSX.writeFile(WORK_BOOK, fileName);
|
78
|
+
}
|
79
|
+
/** Convert file to string base64 */
|
80
|
+
static ConvertToBase64(file) {
|
81
|
+
return new Promise(Resolve => {
|
82
|
+
const reader = new FileReader();
|
83
|
+
reader.readAsDataURL(file);
|
84
|
+
reader.onload = () => {
|
85
|
+
Resolve(reader.result?.toString() || '');
|
86
|
+
};
|
87
|
+
reader.onerror = () => Resolve('');
|
88
|
+
});
|
89
|
+
}
|
90
|
+
}
|
91
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZmlsZXMuY2xhc3MuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi9wcm9qZWN0cy9jb2VyLWVsZW1lbnRzL3Rvb2xzL2xpYi9maWxlcy5jbGFzcy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEVBQUUsS0FBSyxFQUFFLE1BQU0sU0FBUyxDQUFDO0FBQ2hDLE9BQU8sS0FBSyxJQUFJLE1BQU0sTUFBTSxDQUFDO0FBRTdCLE1BQU0sT0FBTyxLQUFLO2FBQ1MscUJBQWdCLEdBQWEsQ0FBQyxLQUFLLEVBQUUsTUFBTSxFQUFFLEtBQUssQ0FBQyxDQUFDO0lBRTNFLHlCQUF5QjtJQUNsQixNQUFNLENBQUMsWUFBWSxDQUFDLElBQVU7UUFDakMsTUFBTSxRQUFRLEdBQUcsSUFBSSxDQUFDLElBQUksQ0FBQztRQUUzQixJQUFJLFFBQVEsQ0FBQyxRQUFRLENBQUMsR0FBRyxDQUFDLEVBQUUsQ0FBQztZQUN6QixJQUFJLE1BQU0sR0FBRyxRQUFRLENBQUMsS0FBSyxDQUFDLEdBQUcsQ0FBYSxDQUFDO1lBRTdDLElBQUksTUFBTSxDQUFDLE1BQU0sR0FBRyxDQUFDLEVBQUUsQ0FBQztnQkFDcEIsSUFBSSxTQUFTLEdBQUcsTUFBTSxDQUFDLEdBQUcsRUFBRyxDQUFDO2dCQUM5QixTQUFTLEdBQUcsU0FBUyxDQUFDLElBQUksRUFBRSxDQUFDLFdBQVcsRUFBRSxDQUFDO2dCQUMzQyxJQUFJLFNBQVMsQ0FBQyxNQUFNLEdBQUcsQ0FBQztvQ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yBJc0V4Y2VsKGZpbGU6IEZpbGUpOiBib29sZWFuIHtcclxuICAgICAgICBjb25zdCBFWFRFTlNJT04gPSBGaWxlcy5HZXRFeHRlbnNpb24oZmlsZSk7XHJcblxyXG4gICAgICAgIHJldHVybiBUb29scy5Jc05vdE51bGwoRVhURU5TSU9OKVxyXG4gICAgICAgICAgICA/IHRoaXMuRVhDRUxfRVhURU5TSU9OUy5pbmNsdWRlcyhFWFRFTlNJT04hKVxyXG4gICAgICAgICAgICA6IGZhbHNlO1xyXG4gICAgfVxyXG5cclxuXHJcbiAgICAvKiogUmVhZCBleGNlbCBmaWxlICovXHJcbiAgICBwdWJsaWMgc3RhdGljIFJlYWRFeGNlbDxUPihmaWxlOiBGaWxlKSB7XHJcbiAgICAgICAgcmV0dXJuIG5ldyBQcm9taXNlPHsgY29sdW1uczogc3RyaW5nW107IHJvd3M6IFRbXTsgfT4oUmVzb2x2ZSA9PiB7XHJcbiAgICAgICAgICAgIGxldCBjb2x1bW5zOiBzdHJpbmdbXSA9IFtdO1xyXG4gICAgICAgICAgICBsZXQgcm93czogVFtdID0gW107XHJcblxyXG4gICAgICAgICAgICBjb25zdCByZWFkZXIgPSBuZXcgRmlsZVJlYWRlcigpO1xyXG4gICAgICAgICAgICByZWFkZXIucmVhZEFzQXJyYXlCdWZmZXIoZmlsZSk7XHJcblxyXG4gICAgICAgICAgICByZWFkZXIub25sb2FkID0gKCkgPT4ge1xyXG4gICAgICAgICAgICAgICAgY29uc3QgZGF0YUJ5dGVzID0gbmV3IFVpbnQ4QXJyYXkocmVhZGVyLnJlc3VsdCBhcyBhbnkpO1xyXG5cclxuICAgICAgICAgICAgICAgIGlmIChkYXRhQnl0ZXMpIHtcclxuICAgICAgICAgICAgICAgICAgICBjb25zdCB3b3JrYm9vayA9IFhMU1gucmVhZChkYXRhQnl0ZXMsIHt9KTtcclxuICAgICAgICAgICAgICAgICAgICBjb25zdCBzaGVldCA9IHdvcmtib29rLlNoZWV0c1t3b3JrYm9vay5TaGVldE5hbWVzWzBdXTtcclxuICAgICAgICAgICAgICAgICAgICBsZXQgZGF0YVNoZWV0OiBhbnlbXSA9IFhMU1gudXRpbHMuc2hlZXRfdG9fanNvbihzaGVldCwge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICBoZWFkZXI6IFsnQScsICdCJywgJ0MnLCAnRCcsICdFJywgJ0YnLCAnRycsICdIJywgJ0knLCAnSicsICdLJywgJ0wnLCAnTScsICdOJywgJ08nLCAnUCcsICdRJywgJ1InLCAnUycsICdUJywgJ1UnLCAnVicsICdXJywgJ1gnLCAnWScsICdaJ11cclxuICAgICAgICAgICAgICAgICAgICB9KTtcclxuXHJcbiAgICAgICAgICAgICAgICAgICAgLy9HZXQgSGVhZGVyc1xyXG4gICAgICAgICAgICAgICAgICAgIGZvcihjb25zdCBjb2x1bW4gaW4gZGF0YVNoZWV0WzBdKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGNvbHVtbnMucHVzaChUb29scy5GaXJzdENoYXJUb0xvd2VyKFN0cmluZyhkYXRhU2hlZXRbMF1bY29sdW1uXSkucmVwbGFjZUFsbCgnICcsICcnKSkpO1xyXG4gICAgICAgICAgICAgICAgICAgIH1cclxuXHJcbiAgICAgICAgICAgICAgICAgICAgLy9HZXQgUm93c1xyXG4gICAgICAgICAgICAgICAgICAgIHJvd3MgPSBYTFNYLnV0aWxzLnNoZWV0X3RvX2pzb24oc2hlZXQsIHsgaGVhZGVyOiBjb2x1bW5zIH0pO1xyXG4gICAgICAgICAgICAgICAgICAgIHJvd3Muc2hpZnQoKTtcclxuXHJcbiAgICAgICAgICAgICAgICAgICAgcm93cyA9IHJvd3MubWFwKHJvdyA9PiB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGNvbnN0IGl0ZW0gPSBUb29scy5CcmVha1JlZmVyZW5jZTxhbnk+KHJvdyk7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGRlbGV0ZSBpdGVtWydfX3Jvd051bV9fJ107XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBpdGVtO1xyXG4gICAgICAgICAgICAgICAgICAgIH0pO1xyXG4gICAgICAgICAgICAgICAgfVxyXG5cclxuICAgICAgICAgICAgICAgIFJlc29sdmUoeyBjb2x1bW5zLCByb3dzIH0pO1xyXG4gICAgICAgICAgICB9XHJcblxyXG4gICAgICAgICAgICByZWFkZXIub25lcnJvciA9ICgpID0+IHsgUmVzb2x2ZSh7IGNvbHVtbnMsIHJvd3MgfSkgfVxyXG4gICAgICAgIH0pO1xyXG4gICAgfVxyXG5cclxuXHJcbiAgICAvKiogRXhwb3J0IHRvIGV4Y2VsIGZpbGUgKi9cclxuICAgIHB1YmxpYyBzdGF0aWMgRXhwb3J0RXhjZWw8VD4oZGF0YTogVFtdLCBmaWxlTmFtZTogc3RyaW5nID0gJ2NvZXJfcmVwb3J0Jywgc2hlZXROYW1lOiBzdHJpbmcgPSAnU2hlZXQxJykge1xyXG4gICAgICAgIHNoZWV0TmFtZSA9IFRvb2xzLkNsZWFuVXBCbGFua3Moc2hlZXROYW1lKTtcclxuICAgICAgICBmaWxlTmFtZSA9IFRvb2xzLkNsZWFuVXBCbGFua3MoZmlsZU5hbWUpO1xyXG5cclxuICAgICAgICBpZihmaWxlTmFtZS5lbmRzV2l0aCgnLnhscycpIHx8IGZpbGVOYW1lLmVuZHNXaXRoKCcueGxzeCcpIHx8IGZpbGVOYW1lLmVuZHNXaXRoKCcuY3N2JykpIHtcclxuICAgICAgICAgICAgaWYgKGZpbGVOYW1lLmluY2x1ZGVzKCcueGxzJykpIHtcclxuICAgICAgICAgICAgICAgIGZpbGVOYW1lID0gZmlsZU5hbWUucmVwbGFjZUFsbCgnLnhscycsICcueGxzeCcpO1xyXG4gICAgICAgICAgICB9XHJcblxyXG4gICAgICAgICAgICBpZiAoZmlsZU5hbWUuaW5jbHVkZXMoJy5jc3YnKSkge1xyXG4gICAgICAgICAgICAgICAgZmlsZU5hbWUgPSBmaWxlTmFtZS5yZXBsYWNlQWxsKCcuY3N2JywgJy54bHN4Jyk7XHJcbiAgICAgICAgICAgIH1cclxuICAgICAgICB9XHJcblxyXG4gICAgICAgIGVsc2Uge1xyXG4gICAgICAgICAgICBmaWxlTmFtZSArPSAnLnhsc3gnO1xyXG4gICAgICAgIH1cclxuXHJcbiAgICAgICAgY29uc3QgV09SS19TSEVFVCA9IFhMU1gudXRpbHMuanNvbl90b19zaGVldChkYXRhKTtcclxuICAgICAgICBjb25zdCBXT1JLX0JPT0sgPSBYTFNYLnV0aWxzLmJvb2tfbmV3KCk7XHJcbiAgICAgICAgWExTWC51dGlscy5ib29rX2FwcGVuZF9zaGVldChXT1JLX0JPT0ssIFdPUktfU0hFRVQsIHNoZWV0TmFtZSk7XHJcbiAgICAgICAgWExTWC53cml0ZUZpbGUoV09SS19CT09LLCBmaWxlTmFtZSk7XHJcbiAgICB9XHJcblxyXG5cclxuICAgIC8qKiBDb252ZXJ0IGZpbGUgdG8gc3RyaW5nIGJhc2U2NCAqL1xyXG4gICAgcHVibGljIHN0YXRpYyBDb252ZXJ0VG9CYXNlNjQoZmlsZTogRmlsZSkge1xyXG4gICAgICAgIHJldHVybiBuZXcgUHJvbWlzZTxzdHJpbmc+KFJlc29sdmUgPT4ge1xyXG4gICAgICAgICAgICBjb25zdCByZWFkZXIgPSBuZXcgRmlsZVJlYWRlcigpO1xyXG4gICAgICAgICAgICByZWFkZXIucmVhZEFzRGF0YVVSTChmaWxlKTtcclxuXHJcbiAgICAgICAgICAgIHJlYWRlci5vbmxvYWQgPSAoKSA9PiB7XHJcbiAgICAgICAgICAgICAgICBSZXNvbHZlKHJlYWRlci5yZXN1bHQ/LnRvU3RyaW5nKCkgfHwgJycpO1xyXG4gICAgICAgICAgICB9XHJcblxyXG4gICAgICAgICAgICByZWFkZXIub25lcnJvciA9ICgpID0+IFJlc29sdmUoJycpO1xyXG4gICAgICAgIH0pO1xyXG4gICAgfVxyXG59Il19
|
@@ -0,0 +1,23 @@
|
|
1
|
+
export class Menu {
|
2
|
+
static { this.storage = 'COER-System'; }
|
3
|
+
/** */
|
4
|
+
static Set(menu) {
|
5
|
+
let storage = sessionStorage.getItem(this.storage);
|
6
|
+
if (storage)
|
7
|
+
storage = JSON.parse(storage);
|
8
|
+
storage = Object.assign({}, storage, { menu });
|
9
|
+
sessionStorage.setItem(this.storage, JSON.stringify(storage));
|
10
|
+
}
|
11
|
+
/** */
|
12
|
+
static Get() {
|
13
|
+
let storage = sessionStorage.getItem(this.storage);
|
14
|
+
if (storage) {
|
15
|
+
storage = JSON.parse(storage);
|
16
|
+
if (storage.hasOwnProperty('menu')) {
|
17
|
+
return storage.menu;
|
18
|
+
}
|
19
|
+
}
|
20
|
+
return null;
|
21
|
+
}
|
22
|
+
}
|
23
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibWVudS5jbGFzcy5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uL3Byb2plY3RzL2NvZXItZWxlbWVudHMvdG9vbHMvbGliL21lbnUuY2xhc3MudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBRUEsTUFBTSxPQUFPLElBQUk7YUFFVyxZQUFPLEdBQUcsYUFBYSxDQUFDO0lBRWhELE1BQU07SUFDQyxNQUFNLENBQUMsR0FBRyxDQUFDLElBQXlCO1FBQ3ZDLElBQUksT0FBTyxHQUFHLGNBQWMsQ0FBQyxPQUFPLENBQUMsSUFBSSxDQUFDLE9BQU8sQ0FBUSxDQUFDO1FBQzFELElBQUksT0FBTztZQUFFLE9BQU8sR0FBRyxJQUFJLENBQUMsS0FBSyxDQUFDLE9BQU8sQ0FBQyxDQUFDO1FBQzNDLE9BQU8sR0FBRyxNQUFNLENBQUMsTUFBTSxDQUFDLEVBQUUsRUFBRSxPQUFPLEVBQUUsRUFBRSxJQUFJLEVBQUUsQ0FBQyxDQUFDO1FBQy9DLGNBQWMsQ0FBQyxPQU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