coer-elements 0.0.23 → 0.0.24
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, 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', 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"] }]
|
227
|
+
}] });
|
228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RUeXBlOiAnd2FybmluZycgfCAnZGFuZ2VyJyB8ICdzdWNjZXNzJyB8ICdpbmZvJyA9ICd3YXJuaW5nJyxcclxuICAgICAgICBpY29uOiBzdHJpbmcgfCBudWxsID0gbnVsbCkge1xyXG4gICAgICAgIHJldHVybiBuZXcgUHJvbWlzZTxib29sZWFuPihSZXNvbHZlID0+IHtcclxuICAgICAgICAgICAgbGV0IGNvbG9yOiBzdHJpbmc7XHJcbiAgICAgICAgICAgIGxldCBpY29uVHlwZTogJ3dhcm5pbmcnIHwgJ2Vycm9yJyB8ICdzdWNjZXNzJyB8ICdpbmZvJztcclxuICAgICAgICAgICAgc3dpdGNoKGFsZXJ0VHlwZSkge1xyXG4gICAgICAgICAgICAgICAgY2FzZSAnZGFuZ2VyJzoge1xyXG4gICAgICAgICAgICAgICAgICAgIGlmIChUb29scy5Jc051bGwoaWNvbikpIGljb24gPSAnYmktZXhjbGFtYXRpb24tb2N0YWdvbic7XHJcbiAgICAgICAgICAgICAgICAgICAgaWNvblR5cGUgPSAnZXJyb3InO1xyXG4gICAgICAgICAgICAgICAgICAgIGNvbG9yID0gJyNkYzM1NDUnOyAvL3JlZFxyXG4gICAgICAgICAgICAgICAgICAgIGJyZWFrO1xyXG4gICAgICAgICAgICAgICAgfTtcclxuXHJcbiAgICAgICAgICAgICAgICBjYXNlICdzdWNjZXNzJzoge1xyXG4gICAgICAgICAgICAgICAgICAgIGlmIChUb29scy5Jc051bGwoaWNvbikpIGljb24gPSAnYmktY2hlY2stY2lyY2xlJztcclxuICAgICAgICAgICAgICAgICAgICBpY29uVHlwZSA9ICdpbmZvJztcclxuICAgICAgICAgICAgICAgICAgICBjb2xvciA9ICcjMTk4NzU0JzsgLy9ncmVlblxyXG4gICAgICAgICAgICAgICAgICAgIGJyZWFrO1xyXG4gICAgICAgICAgICAgICAgfTtcclxuXHJcbiAgICAgICAgICAgICAgICBjYXNlICdpbmZvJzoge1xyXG4gICAgICAgICAgICAgICAgICAgIGlmIChUb29scy5Jc051bGwoaWNvbikpIGljb24gPSAnYmktaW5mby1jaXJjbGUnO1xyXG4gICAgICAgICAgICAgICAgICAgIGljb25UeXBlID0gJ2Vycm9yJztcclxuICAgICAgICAgICAgICAgICAgICBjb2xvciA9ICcjMGQ2ZWZkJzsgLy9ibHVlXHJcbiAgICAgICAgICAgICAgICAgICAgYnJlYWtcclxuICAgICAgICAgICAgICAgIH07XHJcblxyXG4gICAgICAgICAgICAgICAgZGVmYXVsdDoge1xyXG4gICAgICAgICAgICAgICAgICAgIGlmIChUb29scy5Jc051bGwoaWNvbikpIGljb24gPSAnYmktZXhjbGFtYXRpb24tdHJpYW5nbGUtZmlsbCc7XHJcbiAgICAgICAgICAgICAgICAgICAgaWNvblR5cGUgPSAnd2FybmluZyc7XHJcbiAgICAgICAgICAgICAgICAgICAgY29sb3IgPSAnI2ZmYzEwNyc7IC8veWVsbG93XHJcbiAgICAgICAgICAgICAgICAgICAgYnJlYWs7XHJcbiAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgIH1cclxuXHJcbiAgICAgICAgICAgIHN3aXRjaChpY29uKSB7XHJcbiAgICAgICAgICAgICAgICBjYXNlICdkZWxldGUnOiBpY29uID0gJ2ZhLXJlZ3VsYXIgZmEtdHJhc2gtY2FuJzsgYnJlYWs7XHJcbiAgICAgICAgICAgIH1cclxuXHJcbiAgICAgICAgICAgIFN3YWwuZmlyZSh7XHJcbiAgICAgICAgICAgICAgICBpY29uOiBpY29uVHlwZSxcclxuICAgICAgICAgICAgICAgIGljb25Db2xvcjogJ3RyYW5zcGFyZW50JyxcclxuICAgICAgICAgICAgICAgIGljb25IdG1sOiBgPGkgY2xhc3M9XCIke2ljb259XCIgc3R5bGU9XCJjb2xvcjogJHtjb2xvcn07XCI+PC9pPmAsXHJcbiAgICAgICAgICAgICAgICBodG1sOiBtZXNzYWdlLFxyXG4gICAgICAgICAgICAgICAgc2hvd0NvbmZpcm1CdXR0b246IHRydWUsXHJcbiAgICAgICAgICAgICAgICBjb25maXJtQnV0dG9uVGV4dDogJ1llcycsXHJcbiAgICAgICAgICAgICAgICBjb25maXJtQnV0dG9uQ29sb3I6IGNvbG9yLFxyXG4gICAgICAgICAgICAgICAgZm9jdXNDb25maXJtOiB0cnVlLFxyXG4gICAgICAgICAgICAgICAgc2hvd0RlbnlCdXR0b246IHRydWUsXHJcbiAgICAgICAgICAgICAgICBkZW55QnV0dG9uQ29sb3I6IGNvbG9yLFxyXG4gICAgICAgICAgICAgICAgZm9jdXNEZW55OiBmYWxzZSxcclxuICAgICAgICAgICAgICAgIHJldmVyc2VCdXR0b25zOiB0cnVlLFxyXG4gICAgICAgICAgICAgICAgYWxsb3dPdXRzaWRlQ2xpY2s6IGZhbHNlLFxyXG4gICAgICAgICAgICAgICAgYWxsb3dFc2NhcGVLZXk6IGZhbHNlLFxyXG4gICAgICAgICAgICAgICAgYWxsb3dFbnRlcktleTogdHJ1ZSxcclxuICAgICAgICAgICAgICAgIGN1c3RvbUNsYXNzOiB7XHJcbiAgICAgICAgICAgICAgICAgICAgZGVueUJ1dHRvbjogJ3N3ZWV0LWFsZXJ0LWJ1dHRvbicsXHJcbiAgICAgICAgICAgICAgICAgICAgY29uZmlybUJ1dHRvbjogJ3N3ZWV0LWFsZXJ0LWJ1dHRvbidcclxuICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgfSkudGhlbigoeyB2YWx1ZSB9KSA9PiBzZXRUaW1lb3V0KCgpID0+IFJlc29sdmUodmFsdWUpKSk7XHJcbiAgICAgICAgfSk7XHJcbiAgICB9XHJcblxyXG5cclxuICAgIC8qKiAqL1xyXG4gICAgcHJpdmF0ZSBTZXRJY29uKGVsZW1lbnQ6IEhUTUxFbGVtZW50LCBpY29uOiBzdHJpbmcpOiB2b2lkIHtcclxuICAgICAgICBmb3IgKGNvbnN0IGl0ZW0gb2YgWy4uLmVsZW1lbnQuY2xhc3NMaXN0LnZhbHVlLnNwbGl0KCcgJyldKSB7XHJcbiAgICAgICAgICAgIGl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Z2VcIj48L3ByZT5cclxuICAgICAgICA8L2Rpdj5cclxuICAgIDwvZGl2PlxyXG48L2FzaWRlPiJdfQ==
|
@@ -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,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY29udHJvbC12YWx1ZS5jbGFzcy5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uL3Byb2plY3RzL2NvZXItZWxlbWVudHMvdG9vbHMvbGli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clxuICAgICAgICB0aGlzLl9VcGRhdGVWYWx1ZSA9IGNhbGxiYWNrO1xyXG4gICAgfVxyXG5cclxuXHJcbiAgICAvKiogKi9cclxuICAgIHB1YmxpYyByZWdpc3Rlck9uVG91Y2hlZChjYWxsYmFjazogRnVuY3Rpb24pOiB2b2lkIHtcclxuICAgICAgICB0aGlzLl9Jc1RvdWNoZWQgPSBjYWxsYmFjaztcclxuICAgIH1cclxuXHJcbiAgICBcclxuICAgIC8qKiAqL1xyXG4gICAgcHVibGljIHNldERpc2FibGVkU3RhdGUoaXNEaXNhYmxlZDogYm9vbGVhbik6IHZvaWQge31cclxufSJdfQ==
|
@@ -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');
|
27
|
+
}
|
28
|
+
}
|
29
|
+
//# sourceMappingURL=data:application/json;base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LmxvY2FsKHRydWUpLmZvcm1hdCgnREQgTU1NIFlZWVknKTtcclxuICAgIH1cclxufSJdfQ==
|
@@ -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
|
+
};
|
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uICAgICAgICBjb25zdCBFWFRFTlNJT04gPSBGaWxlcy5HZXRFeHRlbnNpb24oZmlsZSk7XHJcblxyXG4gICAgICAgIHJldHVybiBUb29scy5Jc05vdE51bGwoRVhURU5TSU9OKVxyXG4gICAgICAgICAgICA/IHRoaXMuRVhDRUxfRVhURU5TSU9OUy5pbmNsdWRlcyhFWFRFTlNJT04hKVxyXG4gICAgICAgICAgICA6IGZhbHNlO1xyXG4gICAgfVxyXG5cclxuXHJcbiAgICAvKiogUmVhZCBleGNlbCBmaWxlICovXHJcbiAgICBwdWJsaWMgc3RhdGljIFJlYWRFeGNlbDxUPihmaWxlOiBGaWxlKSB7XHJcbiAgICAgICAgcmV0dXJuIG5ldyBQcm9taXNlPHsgY29sdW1uczogc3RyaW5nW107IHJvd3M6IFRbXTsgfT4oUmVzb2x2ZSA9PiB7XHJcbiAgICAgICAgICAgIGxldCBjb2x1bW5zOiBzdHJpbmdbXSA9IFtdO1xyXG4gICAgICAgICAgICBsZXQgcm93czogVFtdID0gW107XHJcblxyXG4gICAgICAgICAgICBjb25zdCByZWFkZXIgPSBuZXcgRmlsZVJlYWRlcigpO1xyXG4gICAgICAgICAgICByZWFkZXIucmVhZEFzQXJyYXlCdWZmZXIoZmlsZSk7XHJcblxyXG4gICAgICAgICAgICByZWFkZXIub25sb2FkID0gKCkgPT4ge1xyXG4gICAgICAgICAgICAgICAgY29uc3QgZGF0YUJ5dGVzID0gbmV3IFVpbnQ4QXJyYXkocmVhZGVyLnJlc3VsdCBhcyBhbnkpO1xyXG5cclxuICAgICAgICAgICAgICAgIGlmIChkYXRhQnl0ZXMpIHtcclxuICAgICAgICAgICAgICAgICAgICBjb25zdCB3b3JrYm9vayA9IFhMU1gucmVhZChkYXRhQnl0ZXMsIHt9KTtcclxuICAgICAgICAgICAgICAgICAgICBjb25zdCBzaGVldCA9IHdvcmtib29rLlNoZWV0c1t3b3JrYm9vay5TaGVldE5hbWVzWzBdXTtcclxuICAgICAgICAgICAgICAgICAgICBsZXQgZGF0YVNoZWV0OiBhbnlbXSA9IFhMU1gudXRpbHMuc2hlZXRfdG9fanNvbihzaGVldCwge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICBoZWFkZXI6IFsnQScsICdCJywgJ0MnLCAnRCcsICdFJywgJ0YnLCAnRycsICdIJywgJ0knLCAnSicsICdLJywgJ0wnLCAnTScsICdOJywgJ08nLCAnUCcsICdRJywgJ1InLCAnUycsICdUJywgJ1UnLCAnVicsICdXJywgJ1gnLCAnWScsICdaJ11cclxuICAgICAgICAgICAgICAgICAgICB9KTtcclxuXHJcbiAgICAgICAgICAgICAgICAgICAgLy9HZXQgSGVhZGVyc1xyXG4gICAgICAgICAgICAgICAgICAgIGZvcihjb25zdCBjb2x1bW4gaW4gZGF0YVNoZWV0WzBdKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGNvbHVtbnMucHVzaChUb29scy5GaXJzdENoYXJUb0xvd2VyKFN0cmluZyhkYXRhU2hlZXRbMF1bY29sdW1uXSkucmVwbGFjZUFsbCgnICcsICcnKSkpO1xyXG4gICAgICAgICAgICAgICAgICAgIH1cclxuXHJcbiAgICAgICAgICAgICAgICAgICAgLy9HZXQgUm93c1xyXG4gICAgICAgICAgICAgICAgICAgIHJvd3MgPSBYTFNYLnV0aWxzLnNoZWV0X3RvX2pzb24oc2hlZXQsIHsgaGVhZGVyOiBjb2x1bW5zIH0pO1xyXG4gICAgICAgICAgICAgICAgICAgIHJvd3Muc2hpZnQoKTtcclxuXHJcbiAgICAgICAgICAgICAgICAgICAgcm93cyA9IHJvd3MubWFwKHJvdyA9PiB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGNvbnN0IGl0ZW0gPSBUb29scy5CcmVha1JlZmVyZW5jZTxhbnk+KHJvdyk7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGRlbGV0ZSBpdGVtWydfX3Jvd051bV9fJ107XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBpdGVtO1xyXG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ICAgICAgIH1cclxuICAgICAgICB9XHJcblxyXG4gICAgICAgIGVsc2Uge1xyXG4gICAgICAgICAgICBmaWxlTmFtZSArPSAnLnhsc3gnO1xyXG4gICAgICAgIH1cclxuXHJcbiAgICAgICAgY29uc3QgV09SS19TSEVFVCA9IFhMU1gudXRpbHMuanNvbl90b19zaGVldChkYXRhKTtcclxuICAgICAgICBjb25zdCBXT1JLX0JPT0sgPSBYTFNYLnV0aWxzLmJvb2tfbmV3KCk7XHJcbiAgICAgICAgWExTWC51dGlscy5ib29rX2FwcGVuZF9zaGVldChXT1JLX0JPT0ssIFdPUktfU0hFRVQsIHNoZWV0TmFtZSk7XHJcbiAgICAgICAgWExTWC53cml0ZUZpbGUoV09SS19CT09LLCBmaWxlTmFtZSk7XHJcbiAgICB9XHJcblxyXG5cclxuICAgIC8qKiBDb252ZXJ0IGZpbGUgdG8gc3RyaW5nIGJhc2U2NCAqL1xyXG4gICAgcHVibGljIHN0YXRpYyBDb252ZXJ0VG9CYXNlNjQoZmlsZTogRmlsZSkge1xyXG4gICAgICAgIHJldHVybiBuZXcgUHJvbWlzZTxzdHJpbmc+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,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibWVudS5jbGFzcy5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uL3Byb2plY3RzL2NvZXItZWxlbWVudHMvdG9vbHMvbGliL21lbnUuY2xhc3MudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBRUEsTUFBTSxPQUFPLElBQUk7YUFFVyxZQUFPLEdBQUcsYUFBYSxDQUFDO0lBRWhELE1BQU07SUFDQyxNQUFNLENBQUMsR0FBRyxDQUFDLElBQXlCO1FBQ3ZDLElBQUksT0FBTyxHQUFHLGNBQWMsQ0FBQyxPQUFPLENBQUMsSUFBSSxDQUFDLE9BQU8sQ0FBUSxDQUFDO1FBQzFELElBQUksT0FBTztZQUFFLE9BQU8sR0FBRyxJQUFJLENBQUMsS0FBSyxDQUFDLE9BQU8sQ0FBQyxDQUFDO1FBQzNDLE9BQU8sR0FBRyxNQUFNLENBQUMsTUFBTSxDQUFDLEVBQUUsRUFBRSxPQUFPLEVBQUUsRUFBRSxJQUFJLEVBQUUsQ0FBQyxDQUFDO1FBQy9DLGNBQWMsQ0FBQyxPQUFPLENBQUMsSUFBSSxDQUFDLE9BQU8sRUFBRSxJQUFJLENB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