coer-elements 0.0.10 → 0.0.12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/components/index.d.ts +1 -0
- package/components/lib/coer-button/coer-button.component.d.ts +44 -0
- package/components/lib/components.module.d.ts +6 -4
- package/esm2022/components/index.mjs +2 -1
- package/esm2022/components/lib/coer-button/coer-button.component.mjs +133 -0
- package/esm2022/components/lib/components.module.mjs +15 -9
- package/esm2022/interfaces/index.mjs +7 -0
- package/esm2022/interfaces/lib/app-source.interface.mjs +2 -0
- package/esm2022/interfaces/lib/breadcrumb.interface.mjs +2 -0
- package/esm2022/interfaces/lib/coer-ref.interface.mjs +2 -0
- package/esm2022/interfaces/lib/go-back.interface.mjs +2 -0
- package/esm2022/interfaces/lib/patch.interface.mjs +2 -0
- package/esm2022/interfaces/lib/screen-size.interface.mjs +2 -0
- package/esm2022/public_api.mjs +2 -1
- package/esm2022/signals/index.mjs +4 -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-modal-open.signal.mjs +3 -0
- package/esm2022/tools/index.mjs +9 -2
- package/esm2022/tools/lib/breadcrumbs.class.mjs +63 -0
- package/esm2022/tools/lib/control-value.class.mjs +46 -0
- package/esm2022/tools/lib/date-time.class.mjs +22 -0
- package/esm2022/tools/lib/files.class.mjs +91 -0
- package/esm2022/tools/lib/generi-tools.mjs +199 -0
- package/esm2022/tools/lib/page.class.mjs +156 -0
- package/esm2022/tools/lib/screen.class.mjs +43 -0
- package/esm2022/tools/lib/source.class.mjs +80 -0
- package/fesm2022/coer-elements.mjs +836 -54
- package/fesm2022/coer-elements.mjs.map +1 -1
- package/interfaces/index.d.ts +6 -0
- package/interfaces/lib/app-source.interface.d.ts +4 -0
- package/interfaces/lib/breadcrumb.interface.d.ts +6 -0
- package/interfaces/lib/coer-ref.interface.d.ts +10 -0
- package/interfaces/lib/go-back.interface.d.ts +6 -0
- package/interfaces/lib/patch.interface.d.ts +5 -0
- package/interfaces/lib/screen-size.interface.d.ts +5 -0
- package/package.json +1 -1
- package/public_api.d.ts +1 -0
- package/signals/index.d.ts +3 -0
- package/signals/lib/breakpoint.signal.d.ts +1 -0
- package/signals/lib/is-loading.signal.d.ts +1 -0
- package/signals/lib/is-modal-open.signal.d.ts +1 -0
- package/src/interfaces/index.ts +6 -0
- package/src/interfaces/lib/app-source.interface.ts +4 -0
- package/src/interfaces/lib/breadcrumb.interface.ts +6 -0
- package/src/interfaces/lib/coer-ref.interface.ts +11 -0
- package/src/interfaces/lib/go-back.interface.ts +6 -0
- package/src/interfaces/lib/patch.interface.ts +5 -0
- package/src/interfaces/lib/screen-size.interface.ts +5 -0
- package/tools/index.d.ts +8 -1
- package/tools/lib/breadcrumbs.class.d.ts +18 -0
- package/tools/lib/date-time.class.d.ts +11 -0
- package/tools/lib/files.class.d.ts +16 -0
- package/tools/lib/generi-tools.d.ts +32 -0
- package/tools/lib/page.class.d.ts +60 -0
- package/tools/lib/screen.class.d.ts +11 -0
- package/tools/lib/source.class.d.ts +20 -0
- package/esm2022/tools/lib/controlValue.mjs +0 -46
- /package/tools/lib/{controlValue.d.ts → control-value.class.d.ts} +0 -0
@@ -1,10 +1,18 @@
|
|
1
1
|
import * as i0 from '@angular/core';
|
2
|
-
import { Component,
|
2
|
+
import { Component, signal, forwardRef, inject, Inject, input, EventEmitter, computed, Input, Output, NgModule } from '@angular/core';
|
3
|
+
import * as i1 from '@angular/common';
|
3
4
|
import { CommonModule } from '@angular/common';
|
4
|
-
import
|
5
|
-
import {
|
5
|
+
import * as i2 from '@angular/router';
|
6
|
+
import { Router, ActivatedRoute, RouterModule } from '@angular/router';
|
7
|
+
import { NG_VALUE_ACCESSOR, FormsModule, ReactiveFormsModule } from '@angular/forms';
|
8
|
+
import * as i3 from '@angular/material/button';
|
9
|
+
import { MatButtonModule } from '@angular/material/button';
|
6
10
|
import * as bootstrap from 'bootstrap';
|
11
|
+
import { Tooltip } from 'bootstrap';
|
7
12
|
import Swal from 'sweetalert2';
|
13
|
+
import moment from 'moment';
|
14
|
+
import * as XLSX from 'xlsx';
|
15
|
+
import { Observable } from 'rxjs';
|
8
16
|
|
9
17
|
class CoerAlert {
|
10
18
|
/** */
|
@@ -229,7 +237,813 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImpo
|
|
229
237
|
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: [".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"] }]
|
230
238
|
}] });
|
231
239
|
|
232
|
-
|
240
|
+
const reference_signal = signal({});
|
241
|
+
const Tools = {
|
242
|
+
/** Generate a Guid */
|
243
|
+
GetGuid: (seed = 'coer-system') => {
|
244
|
+
let time = new Date().getTime();
|
245
|
+
seed = seed.toString().trim();
|
246
|
+
return seed + `-xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx`.replace(/[xy]/g, (c) => {
|
247
|
+
const random = (time + Math.random() * 16) % 16 | 0;
|
248
|
+
time = Math.floor(time / 16);
|
249
|
+
return (c == 'x' ? random : (random & 0x3 | 0x8)).toString(16);
|
250
|
+
});
|
251
|
+
},
|
252
|
+
/** Returns true if the value is null or undefined, false otherwise */
|
253
|
+
IsNull: (value) => {
|
254
|
+
if (value === undefined)
|
255
|
+
return true;
|
256
|
+
if (value === null)
|
257
|
+
return true;
|
258
|
+
return false;
|
259
|
+
},
|
260
|
+
/** Returns true if the value is not null or undefined, false otherwise */
|
261
|
+
IsNotNull: (value) => {
|
262
|
+
if (value === undefined)
|
263
|
+
return false;
|
264
|
+
if (value === null)
|
265
|
+
return false;
|
266
|
+
return true;
|
267
|
+
},
|
268
|
+
/** Returns true if the value is null or undefined or contains only whitespace, false otherwise */
|
269
|
+
IsOnlyWhiteSpace: (value) => {
|
270
|
+
if (value === undefined)
|
271
|
+
return true;
|
272
|
+
if (value === null)
|
273
|
+
return true;
|
274
|
+
if (value.toString().trim() === '')
|
275
|
+
return true;
|
276
|
+
return false;
|
277
|
+
},
|
278
|
+
/** Break reference of a object or array */
|
279
|
+
BreakReference: (object) => {
|
280
|
+
if (object === undefined)
|
281
|
+
return undefined;
|
282
|
+
if (object === null)
|
283
|
+
return null;
|
284
|
+
const OBJECT = JSON.parse(JSON.stringify(object));
|
285
|
+
return (Array.isArray(OBJECT)) ? [...OBJECT] : { ...OBJECT };
|
286
|
+
},
|
287
|
+
/** Clean extra whitespaces */
|
288
|
+
CleanUpBlanks: (text) => {
|
289
|
+
if (Tools.IsNull(text))
|
290
|
+
return '';
|
291
|
+
let worlds = String(text).split(' ');
|
292
|
+
worlds = worlds.filter(x => x.length > 0);
|
293
|
+
return worlds.join(' ');
|
294
|
+
},
|
295
|
+
/** Get properties of an object */
|
296
|
+
GetObjectProperties: (obj) => {
|
297
|
+
const properties = [];
|
298
|
+
if (Tools.IsNull(obj))
|
299
|
+
return properties;
|
300
|
+
for (const property in obj)
|
301
|
+
properties.push(String(property));
|
302
|
+
return properties;
|
303
|
+
},
|
304
|
+
/**
|
305
|
+
* Set an index and merge more arrays of the same type
|
306
|
+
* */
|
307
|
+
SetIndex: (array, ...args) => {
|
308
|
+
let index = 0;
|
309
|
+
for (const arg of args) {
|
310
|
+
array = Tools.BreakReference(array).concat(Tools.BreakReference(arg));
|
311
|
+
}
|
312
|
+
return Tools.BreakReference(array).map(item => Object.assign({ index: index++ }, item));
|
313
|
+
},
|
314
|
+
/** Set First Char To Lower */
|
315
|
+
FirstCharToLower: (text) => {
|
316
|
+
if (Tools.IsNull(text))
|
317
|
+
return '';
|
318
|
+
const textArray = [];
|
319
|
+
for (let i = 0; i < text.length; i++) {
|
320
|
+
if (i === 0)
|
321
|
+
textArray.push(text[i].toLowerCase());
|
322
|
+
else
|
323
|
+
textArray.push(text[i]);
|
324
|
+
}
|
325
|
+
return textArray.join('');
|
326
|
+
},
|
327
|
+
/** Set First Char To Upper */
|
328
|
+
FirstCharToUpper: (text) => {
|
329
|
+
if (Tools.IsNull(text))
|
330
|
+
return '';
|
331
|
+
const textArray = [];
|
332
|
+
for (let i = 0; i < text.length; i++) {
|
333
|
+
if (i === 0)
|
334
|
+
textArray.push(text[i].toUpperCase());
|
335
|
+
else
|
336
|
+
textArray.push(text[i]);
|
337
|
+
}
|
338
|
+
return textArray.join('');
|
339
|
+
},
|
340
|
+
/** Sort an array in ascending order by property */
|
341
|
+
SortBy: (array, property, propertyType = 'string') => {
|
342
|
+
switch (propertyType) {
|
343
|
+
case 'string': {
|
344
|
+
return array.sort((x, y) => {
|
345
|
+
if (String(x[property]).toUpperCase().trim() < String(y[property]).toUpperCase().trim())
|
346
|
+
return -1;
|
347
|
+
else if (String(x[property]).toUpperCase().trim() > String(y[property]).toUpperCase().trim())
|
348
|
+
return 1;
|
349
|
+
else
|
350
|
+
return 0;
|
351
|
+
});
|
352
|
+
}
|
353
|
+
case 'number': {
|
354
|
+
return array.sort((x, y) => Number(x[property] - Number(y[property])));
|
355
|
+
}
|
356
|
+
}
|
357
|
+
},
|
358
|
+
/** Sort an array in descending order by property */
|
359
|
+
SortByDesc: (array, property, propertyType = 'string') => {
|
360
|
+
switch (propertyType) {
|
361
|
+
case 'string': {
|
362
|
+
return array.sort((x, y) => {
|
363
|
+
if (String(x[property]).toUpperCase().trim() < String(y[property]).toUpperCase().trim())
|
364
|
+
return 1;
|
365
|
+
else if (String(x[property]).toUpperCase().trim() > String(y[property]).toUpperCase().trim())
|
366
|
+
return -1;
|
367
|
+
else
|
368
|
+
return 0;
|
369
|
+
});
|
370
|
+
}
|
371
|
+
case 'number': {
|
372
|
+
return array.sort((x, y) => Number(Number(y[property])) - x[property]);
|
373
|
+
}
|
374
|
+
}
|
375
|
+
},
|
376
|
+
/** Return a string with forman numeric */
|
377
|
+
GetNumericFormat: (value, decimals = 0) => {
|
378
|
+
if (value == undefined
|
379
|
+
|| value == null
|
380
|
+
|| value.toString().trim() == ''
|
381
|
+
|| isNaN(Number(value))) {
|
382
|
+
return '0';
|
383
|
+
}
|
384
|
+
let valueInteger = '';
|
385
|
+
let valueDecimal = '';
|
386
|
+
value = value.toString().replaceAll(' ', '');
|
387
|
+
if (value.includes('.') || (decimals > 0)) {
|
388
|
+
valueInteger = value.includes('.') ? value.split('.')[0] : value;
|
389
|
+
if (decimals > 0) {
|
390
|
+
const PADDING = decimals - valueDecimal.length;
|
391
|
+
valueDecimal = value.includes('.') ? value.split('.')[1] : '';
|
392
|
+
for (let i = 0; i < PADDING; i++)
|
393
|
+
valueDecimal += '0';
|
394
|
+
valueDecimal = valueDecimal.substring(0, decimals);
|
395
|
+
valueDecimal = `.${valueDecimal}`;
|
396
|
+
}
|
397
|
+
}
|
398
|
+
else {
|
399
|
+
valueInteger = value;
|
400
|
+
}
|
401
|
+
let counter = 0;
|
402
|
+
const VALUE_INTEGER_ARRAY = [];
|
403
|
+
for (const char of valueInteger.split('').reverse()) {
|
404
|
+
if (counter == 3) {
|
405
|
+
VALUE_INTEGER_ARRAY.push(',');
|
406
|
+
counter = 0;
|
407
|
+
}
|
408
|
+
VALUE_INTEGER_ARRAY.push(char);
|
409
|
+
++counter;
|
410
|
+
}
|
411
|
+
valueInteger = VALUE_INTEGER_ARRAY.reverse().join('');
|
412
|
+
return `${valueInteger}${valueDecimal}`;
|
413
|
+
},
|
414
|
+
/** Wait the time indicated */
|
415
|
+
Sleep: (milliseconds = 0, reference = null) => {
|
416
|
+
if (Tools.IsNull(reference)) {
|
417
|
+
return new Promise(Resolve => setTimeout(Resolve, milliseconds));
|
418
|
+
}
|
419
|
+
else
|
420
|
+
return new Promise(Resolve => {
|
421
|
+
reference = reference.replaceAll(' ', '_').toLowerCase();
|
422
|
+
if (reference_signal().hasOwnProperty(reference)) {
|
423
|
+
clearInterval(reference_signal()[reference]);
|
424
|
+
}
|
425
|
+
reference_signal.set(Object.assign(reference_signal(), {
|
426
|
+
[reference]: setTimeout(() => {
|
427
|
+
Resolve();
|
428
|
+
clearInterval(reference_signal()[reference]);
|
429
|
+
const _reference = { ...reference_signal() };
|
430
|
+
delete _reference[reference];
|
431
|
+
reference_signal.set({ ..._reference });
|
432
|
+
}, milliseconds)
|
433
|
+
}));
|
434
|
+
});
|
435
|
+
}
|
436
|
+
};
|
437
|
+
|
438
|
+
class Breadcrumbs {
|
439
|
+
static { this.storage = 'COER-System'; }
|
440
|
+
/** */
|
441
|
+
static Add(page, path) {
|
442
|
+
const breadcrumbs = this.Get();
|
443
|
+
const paths = breadcrumbs.map(item => item.path);
|
444
|
+
if (!paths.includes(path)) {
|
445
|
+
breadcrumbs.push({ page, path });
|
446
|
+
this.Save(breadcrumbs);
|
447
|
+
}
|
448
|
+
}
|
449
|
+
/** */
|
450
|
+
static Get() {
|
451
|
+
let storage = sessionStorage.getItem(this.storage);
|
452
|
+
if (storage) {
|
453
|
+
storage = JSON.parse(storage);
|
454
|
+
if (storage.hasOwnProperty('breadcrumbs')) {
|
455
|
+
return Tools.BreakReference(storage.breadcrumbs);
|
456
|
+
}
|
457
|
+
}
|
458
|
+
return [];
|
459
|
+
}
|
460
|
+
/** */
|
461
|
+
static GetFirst() {
|
462
|
+
const breadcrumbs = this.Get();
|
463
|
+
return (breadcrumbs.length > 0) ? breadcrumbs.shift() : null;
|
464
|
+
}
|
465
|
+
/** */
|
466
|
+
static Save(breadcrumbs) {
|
467
|
+
let storage = sessionStorage.getItem(this.storage);
|
468
|
+
if (storage)
|
469
|
+
storage = JSON.parse(storage);
|
470
|
+
storage = Object.assign({}, storage, { breadcrumbs });
|
471
|
+
sessionStorage.setItem(this.storage, JSON.stringify(storage));
|
472
|
+
}
|
473
|
+
/** */
|
474
|
+
static Remove(path) {
|
475
|
+
let breadcrumbs = this.Get();
|
476
|
+
const index = breadcrumbs.findIndex(x => x.path.toLowerCase().trim() === path.toLowerCase().trim());
|
477
|
+
if (index >= 0) {
|
478
|
+
breadcrumbs = Tools.BreakReference(breadcrumbs).splice(0, index + 1);
|
479
|
+
this.Save(breadcrumbs);
|
480
|
+
}
|
481
|
+
}
|
482
|
+
/** */
|
483
|
+
static SetLast(page, path) {
|
484
|
+
const breadcrumbs = this.Get();
|
485
|
+
if (breadcrumbs.length > 0) {
|
486
|
+
breadcrumbs[breadcrumbs.length - 1] = { page, path };
|
487
|
+
this.Save(breadcrumbs);
|
488
|
+
}
|
489
|
+
}
|
490
|
+
/** */
|
491
|
+
static RemoveLast() {
|
492
|
+
const breadcrumbs = this.Get();
|
493
|
+
if (breadcrumbs.length > 0) {
|
494
|
+
breadcrumbs.pop();
|
495
|
+
this.Save(breadcrumbs);
|
496
|
+
}
|
497
|
+
}
|
498
|
+
}
|
499
|
+
|
500
|
+
const CONTROL_VALUE = (component) => {
|
501
|
+
return {
|
502
|
+
provide: NG_VALUE_ACCESSOR,
|
503
|
+
useExisting: forwardRef(() => component),
|
504
|
+
multi: true
|
505
|
+
};
|
506
|
+
};
|
507
|
+
class ControlValue {
|
508
|
+
constructor() {
|
509
|
+
this._isTouched = false;
|
510
|
+
}
|
511
|
+
get isTouched() {
|
512
|
+
return this._isTouched;
|
513
|
+
}
|
514
|
+
/** */
|
515
|
+
SetValue(value) {
|
516
|
+
if (typeof this._UpdateValue === 'function') {
|
517
|
+
this._UpdateValue(value);
|
518
|
+
}
|
519
|
+
this._value = value;
|
520
|
+
}
|
521
|
+
/** */
|
522
|
+
SetTouched(isTouched) {
|
523
|
+
if (typeof this._IsTouched === 'function') {
|
524
|
+
this._IsTouched(isTouched);
|
525
|
+
}
|
526
|
+
this._isTouched = isTouched;
|
527
|
+
}
|
528
|
+
/** */
|
529
|
+
writeValue(value) {
|
530
|
+
this._value = value;
|
531
|
+
}
|
532
|
+
/** */
|
533
|
+
registerOnChange(callback) {
|
534
|
+
this._UpdateValue = callback;
|
535
|
+
}
|
536
|
+
/** */
|
537
|
+
registerOnTouched(callback) {
|
538
|
+
this._IsTouched = callback;
|
539
|
+
}
|
540
|
+
/** */
|
541
|
+
setDisabledState(isDisabled) { }
|
542
|
+
}
|
543
|
+
|
544
|
+
class DateTime {
|
545
|
+
/** Get UTC Offset */
|
546
|
+
static GetOffset() {
|
547
|
+
return moment().utcOffset();
|
548
|
+
}
|
549
|
+
/** Convert UTC Date to Local Zone */
|
550
|
+
static ToLocalZone(utcDate) {
|
551
|
+
return moment(utcDate).add(DateTime.GetOffset(), 'minutes').format('YYYY-MM-DD HH:mm:ss');
|
552
|
+
}
|
553
|
+
/** Convert Local Zone Date to UTC */
|
554
|
+
static ToUTC(utcDate) {
|
555
|
+
return moment(utcDate).subtract(DateTime.GetOffset(), 'minutes').format('YYYY-MM-DD HH:mm:ss');
|
556
|
+
}
|
557
|
+
/** DD MMM YYYY */
|
558
|
+
static GetDateFormat(date) {
|
559
|
+
if ((typeof date === 'string'))
|
560
|
+
date = date.replaceAll('/', '-');
|
561
|
+
return moment(date).parseZone().local(true).format('DD MMM YYYY');
|
562
|
+
}
|
563
|
+
}
|
564
|
+
|
565
|
+
class Files {
|
566
|
+
static { this.EXCEL_EXTENSIONS = ['xls', 'xlsx', 'csv']; }
|
567
|
+
/** Get Extension File */
|
568
|
+
static GetExtension(file) {
|
569
|
+
const fileName = file.name;
|
570
|
+
if (fileName.includes('.')) {
|
571
|
+
let worlds = fileName.split('.');
|
572
|
+
if (worlds.length > 0) {
|
573
|
+
let extension = worlds.pop();
|
574
|
+
extension = extension.trim().toLowerCase();
|
575
|
+
if (extension.length > 0)
|
576
|
+
return extension;
|
577
|
+
}
|
578
|
+
}
|
579
|
+
return null;
|
580
|
+
}
|
581
|
+
/** Is Excel File */
|
582
|
+
static IsExcel(file) {
|
583
|
+
const EXTENSION = Files.GetExtension(file);
|
584
|
+
return Tools.IsNotNull(EXTENSION)
|
585
|
+
? this.EXCEL_EXTENSIONS.includes(EXTENSION)
|
586
|
+
: false;
|
587
|
+
}
|
588
|
+
/** Read excel file */
|
589
|
+
static ReadExcel(file) {
|
590
|
+
return new Promise(Resolve => {
|
591
|
+
let columns = [];
|
592
|
+
let rows = [];
|
593
|
+
const reader = new FileReader();
|
594
|
+
reader.readAsArrayBuffer(file);
|
595
|
+
reader.onload = () => {
|
596
|
+
const dataBytes = new Uint8Array(reader.result);
|
597
|
+
if (dataBytes) {
|
598
|
+
const workbook = XLSX.read(dataBytes, {});
|
599
|
+
const sheet = workbook.Sheets[workbook.SheetNames[0]];
|
600
|
+
let dataSheet = XLSX.utils.sheet_to_json(sheet, {
|
601
|
+
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']
|
602
|
+
});
|
603
|
+
//Get Headers
|
604
|
+
for (const column in dataSheet[0]) {
|
605
|
+
columns.push(Tools.FirstCharToLower(String(dataSheet[0][column]).replaceAll(' ', '')));
|
606
|
+
}
|
607
|
+
//Get Rows
|
608
|
+
rows = XLSX.utils.sheet_to_json(sheet, { header: columns });
|
609
|
+
rows.shift();
|
610
|
+
rows = rows.map(row => {
|
611
|
+
const item = Tools.BreakReference(row);
|
612
|
+
delete item['__rowNum__'];
|
613
|
+
return item;
|
614
|
+
});
|
615
|
+
}
|
616
|
+
Resolve({ columns, rows });
|
617
|
+
};
|
618
|
+
reader.onerror = () => { Resolve({ columns, rows }); };
|
619
|
+
});
|
620
|
+
}
|
621
|
+
/** Export to excel file */
|
622
|
+
static ExportExcel(data, fileName = 'coer_report', sheetName = 'Sheet1') {
|
623
|
+
sheetName = Tools.CleanUpBlanks(sheetName);
|
624
|
+
fileName = Tools.CleanUpBlanks(fileName);
|
625
|
+
if (fileName.endsWith('.xls') || fileName.endsWith('.xlsx') || fileName.endsWith('.csv')) {
|
626
|
+
if (fileName.includes('.xls')) {
|
627
|
+
fileName = fileName.replaceAll('.xls', '.xlsx');
|
628
|
+
}
|
629
|
+
if (fileName.includes('.csv')) {
|
630
|
+
fileName = fileName.replaceAll('.csv', '.xlsx');
|
631
|
+
}
|
632
|
+
}
|
633
|
+
else {
|
634
|
+
fileName += '.xlsx';
|
635
|
+
}
|
636
|
+
const WORK_SHEET = XLSX.utils.json_to_sheet(data);
|
637
|
+
const WORK_BOOK = XLSX.utils.book_new();
|
638
|
+
XLSX.utils.book_append_sheet(WORK_BOOK, WORK_SHEET, sheetName);
|
639
|
+
XLSX.writeFile(WORK_BOOK, fileName);
|
640
|
+
}
|
641
|
+
/** Convert file to string base64 */
|
642
|
+
static ConvertToBase64(file) {
|
643
|
+
return new Promise(Resolve => {
|
644
|
+
const reader = new FileReader();
|
645
|
+
reader.readAsDataURL(file);
|
646
|
+
reader.onload = () => {
|
647
|
+
Resolve(reader.result?.toString() || '');
|
648
|
+
};
|
649
|
+
reader.onerror = () => Resolve('');
|
650
|
+
});
|
651
|
+
}
|
652
|
+
}
|
653
|
+
|
654
|
+
class Source {
|
655
|
+
static { this.storage = 'COER-System'; }
|
656
|
+
/** */
|
657
|
+
static Set(page) {
|
658
|
+
const ROUTER = inject(Router);
|
659
|
+
let path = ROUTER.url;
|
660
|
+
if (path.includes('?'))
|
661
|
+
path = path.split('?')[0];
|
662
|
+
Breadcrumbs.Add(page, path);
|
663
|
+
const breadcrumbs = Breadcrumbs.Get();
|
664
|
+
if (breadcrumbs.length >= 2) {
|
665
|
+
breadcrumbs.pop();
|
666
|
+
const breadcrumb = breadcrumbs.pop();
|
667
|
+
this.Save({ page: breadcrumb.page, path: breadcrumb.path });
|
668
|
+
}
|
669
|
+
else
|
670
|
+
this.Save(null);
|
671
|
+
}
|
672
|
+
/** */
|
673
|
+
static Save(source) {
|
674
|
+
let storage = sessionStorage.getItem(this.storage);
|
675
|
+
if (storage)
|
676
|
+
storage = JSON.parse(storage);
|
677
|
+
storage = Object.assign({}, storage, { source });
|
678
|
+
sessionStorage.setItem(this.storage, JSON.stringify(storage));
|
679
|
+
}
|
680
|
+
/** */
|
681
|
+
static Get() {
|
682
|
+
let storage = sessionStorage.getItem(this.storage);
|
683
|
+
if (storage) {
|
684
|
+
storage = JSON.parse(storage);
|
685
|
+
if (storage.hasOwnProperty('source')) {
|
686
|
+
return storage.source;
|
687
|
+
}
|
688
|
+
}
|
689
|
+
return null;
|
690
|
+
}
|
691
|
+
/** */
|
692
|
+
static GetRoot() {
|
693
|
+
const breadcrumbs = Breadcrumbs.Get();
|
694
|
+
return (breadcrumbs.length > 0) ? breadcrumbs.shift() : null;
|
695
|
+
}
|
696
|
+
/** */
|
697
|
+
static SetPageResponse(pageResponse) {
|
698
|
+
let storage = sessionStorage.getItem(this.storage);
|
699
|
+
storage = JSON.parse(storage);
|
700
|
+
storage = Object.assign({}, storage, { pageResponse });
|
701
|
+
sessionStorage.setItem(this.storage, JSON.stringify(storage));
|
702
|
+
}
|
703
|
+
/** */
|
704
|
+
static GetPageResponse() {
|
705
|
+
let storage = sessionStorage.getItem(this.storage);
|
706
|
+
if (storage) {
|
707
|
+
storage = JSON.parse(storage);
|
708
|
+
if (storage.hasOwnProperty('pageResponse')) {
|
709
|
+
return Tools.BreakReference(storage.pageResponse);
|
710
|
+
}
|
711
|
+
}
|
712
|
+
return null;
|
713
|
+
}
|
714
|
+
/** */
|
715
|
+
static ClearPageResponse() {
|
716
|
+
let storage = sessionStorage.getItem(this.storage);
|
717
|
+
storage = JSON.parse(storage);
|
718
|
+
if (storage.hasOwnProperty('pageResponse')) {
|
719
|
+
delete storage.pageResponse;
|
720
|
+
}
|
721
|
+
storage = Object.assign({}, storage);
|
722
|
+
sessionStorage.setItem(this.storage, JSON.stringify(storage));
|
723
|
+
}
|
724
|
+
/** */
|
725
|
+
static Reset() {
|
726
|
+
sessionStorage.removeItem(this.storage);
|
727
|
+
}
|
728
|
+
}
|
729
|
+
|
730
|
+
class Page {
|
731
|
+
constructor(page) {
|
732
|
+
//Injection
|
733
|
+
this.alert = inject(CoerAlert);
|
734
|
+
this.router = inject(Router);
|
735
|
+
this.activatedRoute = inject(ActivatedRoute);
|
736
|
+
/** */
|
737
|
+
this.isUpdate = false;
|
738
|
+
/** */
|
739
|
+
this.isLoading = false;
|
740
|
+
/** */
|
741
|
+
this.isReadyPage = false;
|
742
|
+
/** */
|
743
|
+
this.enableAnimations = false;
|
744
|
+
/** */
|
745
|
+
this.breadcrumbs = [];
|
746
|
+
/** */
|
747
|
+
this.pageResponse = null;
|
748
|
+
/** */
|
749
|
+
this.goBack = { show: false };
|
750
|
+
//Private Variables
|
751
|
+
this._page = '';
|
752
|
+
this._source = null;
|
753
|
+
this._preventDestroy = false;
|
754
|
+
/** */
|
755
|
+
this.GoBack = (path) => (() => {
|
756
|
+
if (path)
|
757
|
+
Breadcrumbs.Remove(path);
|
758
|
+
else
|
759
|
+
Breadcrumbs.RemoveLast();
|
760
|
+
});
|
761
|
+
this.SetPageName(page);
|
762
|
+
this.SetSource();
|
763
|
+
this.GetSource();
|
764
|
+
this.GetNavigation();
|
765
|
+
this.SetGoBack();
|
766
|
+
this.GetPageResponse();
|
767
|
+
}
|
768
|
+
ngAfterViewInit() {
|
769
|
+
this.routeParams = this.activatedRoute.snapshot.params;
|
770
|
+
this.queryParams = this.activatedRoute.snapshot.queryParams;
|
771
|
+
setTimeout(() => {
|
772
|
+
this.isReadyPage = true;
|
773
|
+
this.RunPage();
|
774
|
+
setTimeout(() => { this.enableAnimations = true; }, 1000);
|
775
|
+
});
|
776
|
+
}
|
777
|
+
ngOnDestroy() {
|
778
|
+
if (!this._preventDestroy)
|
779
|
+
Source.ClearPageResponse();
|
780
|
+
}
|
781
|
+
/** Main method. Starts after ngAfterViewInit() */
|
782
|
+
RunPage() { }
|
783
|
+
;
|
784
|
+
/** Rename the last breadcrumb and update the url id */
|
785
|
+
SetPageName(name, id = null) {
|
786
|
+
this._page = name;
|
787
|
+
let path = this.router.url;
|
788
|
+
if (path.includes('?'))
|
789
|
+
path = path.split('?')[0];
|
790
|
+
if (id) {
|
791
|
+
const PATH_ARRAY = path.split('/');
|
792
|
+
const PATH_ID = Tools.BreakReference(PATH_ARRAY).pop();
|
793
|
+
if (PATH_ID) {
|
794
|
+
PATH_ARRAY[PATH_ARRAY.length - 1] = String(id);
|
795
|
+
path = PATH_ARRAY.join('/');
|
796
|
+
}
|
797
|
+
}
|
798
|
+
if (this.breadcrumbs.length > 0) {
|
799
|
+
this.breadcrumbs[this.breadcrumbs.length - 1].page = name;
|
800
|
+
this.breadcrumbs[this.breadcrumbs.length - 1].path = path;
|
801
|
+
Breadcrumbs.SetLast(name, path);
|
802
|
+
}
|
803
|
+
this.router.navigateByUrl(path);
|
804
|
+
}
|
805
|
+
/** */
|
806
|
+
SetSource() {
|
807
|
+
Source.Set(this._page);
|
808
|
+
}
|
809
|
+
/** */
|
810
|
+
GetSource() {
|
811
|
+
this._source = Source.Get();
|
812
|
+
}
|
813
|
+
/** */
|
814
|
+
GetPageResponse() {
|
815
|
+
this.pageResponse = Source.GetPageResponse();
|
816
|
+
}
|
817
|
+
/** */
|
818
|
+
GetNavigation() {
|
819
|
+
if (this._source) {
|
820
|
+
this.breadcrumbs = Breadcrumbs.Get().map(item => Object.assign({
|
821
|
+
page: item.page,
|
822
|
+
path: item.path,
|
823
|
+
click: this.GoBack(item.path)
|
824
|
+
}));
|
825
|
+
}
|
826
|
+
else
|
827
|
+
this.breadcrumbs = [{ page: this._page }];
|
828
|
+
}
|
829
|
+
/** */
|
830
|
+
SetGoBack() {
|
831
|
+
if (this._source) {
|
832
|
+
this.goBack = {
|
833
|
+
show: true,
|
834
|
+
path: this._source.path,
|
835
|
+
click: this.GoBack()
|
836
|
+
};
|
837
|
+
}
|
838
|
+
}
|
839
|
+
/** Navigate to previous page */
|
840
|
+
GoToSource(pageResponse = null) {
|
841
|
+
if (this._source) {
|
842
|
+
Breadcrumbs.RemoveLast();
|
843
|
+
this.SetPageResponse(pageResponse);
|
844
|
+
Tools.Sleep().then(_ => this.router.navigateByUrl(this._source.path));
|
845
|
+
}
|
846
|
+
}
|
847
|
+
;
|
848
|
+
/** */
|
849
|
+
SetPageResponse(pageResponse = null) {
|
850
|
+
if (Tools.IsNotNull(pageResponse)) {
|
851
|
+
this._preventDestroy = true;
|
852
|
+
Source.SetPageResponse(pageResponse);
|
853
|
+
}
|
854
|
+
}
|
855
|
+
;
|
856
|
+
/** */
|
857
|
+
ReloadPage() {
|
858
|
+
Breadcrumbs.RemoveLast();
|
859
|
+
setTimeout(() => window.location.reload());
|
860
|
+
}
|
861
|
+
/** */
|
862
|
+
Log(value, log = null) {
|
863
|
+
if (Tools.IsNotNull(log))
|
864
|
+
console.log({ log, value });
|
865
|
+
else
|
866
|
+
console.log(value);
|
867
|
+
}
|
868
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: Page, deps: [{ token: String }], target: i0.ɵɵFactoryTarget.Component }); }
|
869
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.12", type: Page, selector: "ng-component", ngImport: i0, template: '', isInline: true }); }
|
870
|
+
}
|
871
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: Page, decorators: [{
|
872
|
+
type: Component,
|
873
|
+
args: [{ template: '' }]
|
874
|
+
}], ctorParameters: () => [{ type: undefined, decorators: [{
|
875
|
+
type: Inject,
|
876
|
+
args: [String]
|
877
|
+
}] }] });
|
878
|
+
|
879
|
+
class Screen {
|
880
|
+
static get WINDOW_WIDTH() {
|
881
|
+
return window.innerWidth;
|
882
|
+
}
|
883
|
+
static get WINDOW_HEIGHT() {
|
884
|
+
return window.innerHeight;
|
885
|
+
}
|
886
|
+
static get DEVICE_WIDTH() {
|
887
|
+
return window.screen.width;
|
888
|
+
}
|
889
|
+
static get DEVICE_HEIGHT() {
|
890
|
+
return window.screen.height;
|
891
|
+
}
|
892
|
+
static get BREAKPOINT() {
|
893
|
+
if (window.innerWidth < 576)
|
894
|
+
return 'xs';
|
895
|
+
else if (window.innerWidth >= 576 && window.innerWidth < 768)
|
896
|
+
return 'sm';
|
897
|
+
else if (window.innerWidth >= 768 && window.innerWidth < 992)
|
898
|
+
return 'md';
|
899
|
+
else if (window.innerWidth >= 992 && window.innerWidth < 1200)
|
900
|
+
return 'lg';
|
901
|
+
else if (window.innerWidth >= 1200 && window.innerWidth < 1400)
|
902
|
+
return 'xl';
|
903
|
+
else
|
904
|
+
return 'xxl';
|
905
|
+
}
|
906
|
+
/** */
|
907
|
+
static { this.Resize = new Observable(subscriber => {
|
908
|
+
window.addEventListener("load", () => {
|
909
|
+
window.dispatchEvent(new Event('resize'));
|
910
|
+
});
|
911
|
+
window.onresize = () => {
|
912
|
+
subscriber.next({
|
913
|
+
width: this.WINDOW_WIDTH,
|
914
|
+
height: this.WINDOW_HEIGHT,
|
915
|
+
breakpoin: this.BREAKPOINT
|
916
|
+
});
|
917
|
+
};
|
918
|
+
}); }
|
919
|
+
}
|
920
|
+
|
921
|
+
class CoerButton {
|
922
|
+
constructor() {
|
923
|
+
//Variables
|
924
|
+
this._id = Tools.GetGuid('coer-button');
|
925
|
+
this._tooltip = '';
|
926
|
+
//Inputs
|
927
|
+
this.id = '';
|
928
|
+
this.color = input('default');
|
929
|
+
this.type = input('filled');
|
930
|
+
this.icon = input('');
|
931
|
+
this.iconPosition = input('left');
|
932
|
+
this.animation = input(false);
|
933
|
+
this.isLoading = input(false);
|
934
|
+
this.isDisabled = input(false);
|
935
|
+
this.isInvisible = input(false);
|
936
|
+
this.width = input('125px');
|
937
|
+
this.minWidth = input('30px');
|
938
|
+
this.height = input('40px');
|
939
|
+
this.minHeight = input('30px');
|
940
|
+
this.marginTop = input('0px');
|
941
|
+
this.marginRight = input('0px');
|
942
|
+
this.marginBottom = input('0px');
|
943
|
+
this.marginLeft = input('0px');
|
944
|
+
this.path = input([]);
|
945
|
+
this.tooltipPosition = input('left');
|
946
|
+
//Outputs
|
947
|
+
this.onClick = new EventEmitter();
|
948
|
+
//computed
|
949
|
+
this._isEnable = computed(() => {
|
950
|
+
return !this.isLoading() && !this.isDisabled() && !this.isInvisible();
|
951
|
+
});
|
952
|
+
//computed
|
953
|
+
this._icon = computed(() => {
|
954
|
+
switch (this.icon()) {
|
955
|
+
case 'new': return 'fa-solid fa-plus fa-lg';
|
956
|
+
case 'save': return 'fa-solid fa-floppy-disk fa-lg';
|
957
|
+
case 'cancel': return 'fa-solid fa-xmark fa-lg';
|
958
|
+
case 'import': return 'fa-solid fa-file-arrow-up fa-lg';
|
959
|
+
case 'excel': return 'bi bi-filetype-xlsx fa-lg';
|
960
|
+
case 'menu': return 'fa-solid fa-bars';
|
961
|
+
case 'delete': return 'fa-solid fa-trash-can';
|
962
|
+
case 'edit': return 'fa-solid fa-pen fa-lg';
|
963
|
+
case 'go': return 'bi bi-box-arrow-right';
|
964
|
+
case 'back': return 'bi bi-box-arrow-left';
|
965
|
+
default: return '';
|
966
|
+
}
|
967
|
+
});
|
968
|
+
}
|
969
|
+
set tooltip(value) {
|
970
|
+
this._tooltip = value;
|
971
|
+
if (value && this._tooltipElement) {
|
972
|
+
this._tooltipElement.setContent({ '.tooltip-inner': this._tooltip });
|
973
|
+
}
|
974
|
+
}
|
975
|
+
ngOnInit() {
|
976
|
+
this.SetToolTip();
|
977
|
+
this.SetEvents();
|
978
|
+
}
|
979
|
+
ngOnDestroy() {
|
980
|
+
if (this._tooltipElement) {
|
981
|
+
Tools.Sleep().then(() => this._tooltipElement.dispose());
|
982
|
+
}
|
983
|
+
}
|
984
|
+
/** */
|
985
|
+
SetEvents() {
|
986
|
+
Tools.Sleep().then(() => {
|
987
|
+
this._element = document.getElementById(`${this._id}-inner-button`);
|
988
|
+
if (Tools.IsNotNull(this._element)) {
|
989
|
+
this._element.addEventListener('focus', () => {
|
990
|
+
if (!this._isEnable())
|
991
|
+
this.Blur();
|
992
|
+
});
|
993
|
+
}
|
994
|
+
});
|
995
|
+
}
|
996
|
+
SetToolTip() {
|
997
|
+
Tools.Sleep().then(() => {
|
998
|
+
const htmlElement = document.getElementById(`${this._id}-container`);
|
999
|
+
if (Tools.IsNotNull(htmlElement)) {
|
1000
|
+
htmlElement.addEventListener('mouseleave', () => {
|
1001
|
+
if (Tools.IsNotNull(htmlElement) && Tools.IsNotNull(this._tooltipElement)) {
|
1002
|
+
this._tooltipElement.hide();
|
1003
|
+
}
|
1004
|
+
});
|
1005
|
+
this._tooltipElement = new Tooltip(htmlElement, {
|
1006
|
+
html: true,
|
1007
|
+
title: this._tooltip,
|
1008
|
+
placement: this.tooltipPosition
|
1009
|
+
});
|
1010
|
+
}
|
1011
|
+
});
|
1012
|
+
}
|
1013
|
+
/** */
|
1014
|
+
Click(event) {
|
1015
|
+
if (this._isEnable()) {
|
1016
|
+
this.onClick.emit(event);
|
1017
|
+
}
|
1018
|
+
this.Blur();
|
1019
|
+
}
|
1020
|
+
/** */
|
1021
|
+
Focus(timeout = 0) {
|
1022
|
+
Tools.Sleep(timeout).then(() => {
|
1023
|
+
if (this._isEnable())
|
1024
|
+
this._element.focus();
|
1025
|
+
});
|
1026
|
+
}
|
1027
|
+
/** */
|
1028
|
+
Blur() {
|
1029
|
+
Tools.Sleep().then(() => {
|
1030
|
+
this._element.blur();
|
1031
|
+
});
|
1032
|
+
}
|
1033
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: CoerButton, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
1034
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.3.12", type: CoerButton, selector: "coer-button", inputs: { id: { classPropertyName: "id", publicName: "id", isSignal: false, isRequired: false, transformFunction: null }, color: { classPropertyName: "color", publicName: "color", isSignal: true, isRequired: false, transformFunction: null }, type: { classPropertyName: "type", publicName: "type", isSignal: true, isRequired: false, transformFunction: null }, icon: { classPropertyName: "icon", publicName: "icon", isSignal: true, isRequired: false, transformFunction: null }, iconPosition: { classPropertyName: "iconPosition", publicName: "iconPosition", isSignal: true, isRequired: false, transformFunction: null }, animation: { classPropertyName: "animation", publicName: "animation", isSignal: true, isRequired: false, transformFunction: null }, isLoading: { classPropertyName: "isLoading", publicName: "isLoading", isSignal: true, isRequired: false, transformFunction: null }, isDisabled: { classPropertyName: "isDisabled", publicName: "isDisabled", isSignal: true, isRequired: false, transformFunction: null }, isInvisible: { classPropertyName: "isInvisible", publicName: "isInvisible", isSignal: true, isRequired: false, transformFunction: null }, width: { classPropertyName: "width", publicName: "width", isSignal: true, isRequired: false, transformFunction: null }, minWidth: { classPropertyName: "minWidth", publicName: "minWidth", isSignal: true, isRequired: false, transformFunction: null }, height: { classPropertyName: "height", publicName: "height", isSignal: true, isRequired: false, transformFunction: null }, minHeight: { classPropertyName: "minHeight", publicName: "minHeight", isSignal: true, isRequired: false, transformFunction: null }, marginTop: { classPropertyName: "marginTop", publicName: "marginTop", isSignal: true, isRequired: false, transformFunction: null }, marginRight: { classPropertyName: "marginRight", publicName: "marginRight", isSignal: true, isRequired: false, transformFunction: null }, marginBottom: { classPropertyName: "marginBottom", publicName: "marginBottom", isSignal: true, isRequired: false, transformFunction: null }, marginLeft: { classPropertyName: "marginLeft", publicName: "marginLeft", isSignal: true, isRequired: false, transformFunction: null }, path: { classPropertyName: "path", publicName: "path", isSignal: true, isRequired: false, transformFunction: null }, tooltipPosition: { classPropertyName: "tooltipPosition", publicName: "tooltipPosition", isSignal: true, isRequired: false, transformFunction: null }, tooltip: { classPropertyName: "tooltip", publicName: "tooltip", isSignal: false, isRequired: false, transformFunction: null } }, outputs: { onClick: "onClick" }, ngImport: i0, template: "<div [ngClass]=\"{ 'coer-button': true, 'invisible': isInvisible() }\">\r\n <a [id]=\"_id + '-container'\"\r\n [routerLink]=\"(path().length > 0 && _isEnable()) ? path() : null\"\r\n [ngClass]=\"{ 'loading': isLoading(), 'animate__animated animate__zoomIn': true, 'animate__disabled': !animation() }\"\r\n [ngStyle]=\"{ 'margin-top': marginTop(), 'margin-right': marginRight(), 'margin-bottom': marginBottom(), 'margin-left': marginLeft() }\">\r\n @if(type() =='filled' || type() == 'outline') {\r\n <button mat-button\r\n [id]=\"_id + '-inner-button'\"\r\n type=\"button\"\r\n (click)=\"Click($event)\"\r\n [ngClass]=\"{\r\n 'primary-filled': (color() == 'primary' && type() =='filled'),\r\n 'secondary-filled': (color() == 'secondary' && type() =='filled'),\r\n 'success-filled': (color() == 'success' && type() =='filled'),\r\n 'warning-filled': (color() == 'warning' && type() =='filled'),\r\n 'danger-filled': (color() == 'danger' && type() =='filled'),\r\n 'navigation-filled': (color() == 'navigation' && type() =='filled'),\r\n 'primary-outline': (color() == 'primary' && type() =='outline'),\r\n 'secondary-outline': (color() == 'secondary' && type() =='outline'),\r\n 'success-outline': (color() == 'success' && type() =='outline'),\r\n 'warning-outline': (color() == 'warning' && type() =='outline'),\r\n 'danger-outline': (color() == 'danger' && type() =='outline'),\r\n 'navigation-outline': (color() == 'navigation'),\r\n 'readonly': isDisabled(),\r\n 'cursor-wait': isLoading()\r\n }\"\r\n [ngStyle]=\"{\r\n 'width': width(),\r\n 'min-width': minWidth(),\r\n 'height': height(),\r\n 'min-height': minHeight()\r\n }\">\r\n <span class=\"slot\" *ngIf=\"!isLoading(); else loading\" >\r\n <span *ngIf=\"(iconPosition() == 'left')\">\r\n <i [class]=\"_icon()\"></i>\r\n </span>\r\n\r\n <span [ngClass]=\"{ 'ms-2': (iconPosition() == 'left'), 'me-2': (iconPosition() == 'right') }\">\r\n <ng-content></ng-content>\r\n </span>\r\n\r\n <span *ngIf=\"(iconPosition() == 'right')\">\r\n <i [class]=\"_icon()\"></i>\r\n </span>\r\n </span>\r\n\r\n <ng-template #loading>\r\n <span class=\"slot fa-fade\">\r\n <span class=\"me-2\"> Loading </span>\r\n <i class=\"spinner-border\"></i>\r\n </span>\r\n </ng-template>\r\n </button>\r\n }\r\n\r\n @else {\r\n @if (type() == 'icon') {\r\n <button mat-icon-button\r\n [id]=\"_id + '-inner-button'\"\r\n (click)=\"Click($event)\"\r\n [ngClass]=\"{\r\n 'primary-filled': (color() == 'primary'),\r\n 'secondary-filled': (color() == 'secondary'),\r\n 'success-filled': (color() == 'success'),\r\n 'warning-filled': (color() == 'warning'),\r\n 'danger-filled': (color() == 'danger'),\r\n 'navigation-filled': (color() == 'navigation'),\r\n 'readonly': (isDisabled() || isLoading()),\r\n 'cursor-wait': isLoading()\r\n }\">\r\n <i [class]=\"_icon()\"></i>\r\n </button>\r\n }\r\n\r\n @else if (type() == 'icon-outline') {\r\n <button mat-icon-button\r\n [id]=\"_id + '-inner-button'\"\r\n (click)=\"Click($event)\"\r\n [ngClass]=\"{\r\n 'primary-outline': (color() == 'primary'),\r\n 'secondary-outline': (color() == 'secondary'),\r\n 'success-outline': (color() == 'success'),\r\n 'warning-outline': (color() == 'warning'),\r\n 'danger-outline': (color() == 'danger'),\r\n 'navigation-outline': (color() == 'navigation'),\r\n 'readonly': (isDisabled() || isLoading()),\r\n 'cursor-wait': isLoading()\r\n }\">\r\n <i [class]=\"_icon()\"></i>\r\n </button>\r\n }\r\n\r\n @else if (type() == 'icon-no-border') {\r\n <button mat-icon-button\r\n [id]=\"_id + '-inner-button'\"\r\n (click)=\"Click($event)\"\r\n [ngClass]=\"{\r\n 'primary-outline': (color() == 'primary'),\r\n 'secondary-outline': (color() == 'secondary'),\r\n 'success-outline': (color() == 'success'),\r\n 'warning-outline': (color() == 'warning'),\r\n 'danger-outline': (color() == 'danger'),\r\n 'navigation-outline': (color() == 'navigation'),\r\n 'readonly': (isDisabled() || isLoading()),\r\n 'icon-no-border': true\r\n }\">\r\n <i [class]=\"_icon()\"></i>\r\n </button>\r\n }\r\n }\r\n </a>\r\n</div>", styles: [".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}coer-button{display:contents!important}div.coer-button{display:contents!important}div.coer-button a{display:inline-block!important}div.coer-button a.animate__disabled{animation-duration:0s!important}div.coer-button button{font-size:17px!important;white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important}div.coer-button .slot{width:100px!important;display:flex!important;align-items:center!important;justify-content:center!important;text-overflow:ellipsis!important;overflow:hidden!important}div.coer-button button.primary-filled{background-color:#0d6efd!important;color:#f5f5f5!important}div.coer-button button.secondary-filled{background-color:#6c757d!important;color:#f5f5f5!important}div.coer-button button.success-filled{background-color:#198754!important;color:#f5f5f5!important}div.coer-button button.warning-filled{background-color:#ffc107!important;color:#252525!important}div.coer-button button.danger-filled{background-color:#dc3545!important;color:#f5f5f5!important}div.coer-button button.navigation-filled{background-color:#fd6031!important;color:#f5f5f5!important}div.coer-button button.primary-outline{background-color:#fff!important;border:1px solid #0d6efd!important;color:#0d6efd!important}div.coer-button button.secondary-outline{background-color:#fff!important;border:1px solid #6c757d!important;color:#6c757d!important}div.coer-button button.success-outline{background-color:#fff!important;border:1px solid #198754!important;color:#198754!important}div.coer-button button.warning-outline{background-color:#fff!important;border:1px solid #ffc107!important;color:#ffc107!important}div.coer-button button.danger-outline{background-color:#fff!important;border:1px solid #dc3545!important;color:#dc3545!important}div.coer-button button.navigation-outline{background-color:#fff!important;border:1px solid #fd6031!important;color:#fd6031!important}div.coer-button button.primary-filled:not(.readonly):hover,div.coer-button button.primary-filled:not(.readonly):focus,div.coer-button button.primary-outline:not(.readonly):hover,div.coer-button button.primary-outline:not(.readonly):focus,div.coer-button button.secondary-filled:not(.readonly):hover,div.coer-button button.secondary-filled:not(.readonly):focus,div.coer-button button.secondary-outline:not(.readonly):hover,div.coer-button button.secondary-outline:not(.readonly):focus,div.coer-button button.success-filled:not(.readonly):hover,div.coer-button button.success-filled:not(.readonly):focus,div.coer-button button.success-outline:not(.readonly):hover,div.coer-button button.success-outline:not(.readonly):focus,div.coer-button button.warning-filled:not(.readonly):hover,div.coer-button button.warning-filled:not(.readonly):focus,div.coer-button button.warning-outline:not(.readonly):hover,div.coer-button button.warning-outline:not(.readonly):focus,div.coer-button button.danger-filled:not(.readonly):hover,div.coer-button button.danger-filled:not(.readonly):focus,div.coer-button button.danger-outline:not(.readonly):hover,div.coer-button button.danger-outline:not(.readonly):focus{filter:brightness(1.1)!important}div.coer-button button.primary-filled:not(.readonly):focus,div.coer-button button.primary-outline:not(.readonly):focus{box-shadow:0 0 20px #0d6efd!important}div.coer-button button.secondary-filled:not(.readonly):focus,div.coer-button button.secondary-outline:not(.readonly):focus{box-shadow:0 0 20px #6c757d!important}div.coer-button button.success-filled:not(.readonly):focus,div.coer-button button.success-outline:not(.readonly):focus{box-shadow:0 0 20px #198754!important}div.coer-button button.warning-filled:not(.readonly):focus,div.coer-button button.warning-outline:not(.readonly):focus{box-shadow:0 0 20px #ffc107!important}div.coer-button button.danger-filled:not(.readonly):focus,div.coer-button button.danger-outline:not(.readonly):focus{box-shadow:0 0 20px #dc3545!important}div.coer-button button.navigation-filled:not(.readonly):focus,div.coer-button button.navigation-outline:not(.readonly):focus{box-shadow:0 0 20px #fd6031!important}div.coer-button button.mdc-icon-button.mat-mdc-icon-button{width:40px!important;height:40px!important;padding:0!important}div.coer-button button.mdc-icon-button.mat-mdc-icon-button.icon-no-border{width:25px!important;height:25px!important;background-color:transparent!important;border:none!important;overflow:visible!important}div.coer-button button.mdc-icon-button.mat-mdc-icon-button.icon-no-border *{font-size:medium!important}div.coer-button button.mdc-icon-button.mat-mdc-icon-button.icon-no-border i.bi-box-arrow-left,div.coer-button button.mdc-icon-button.mat-mdc-icon-button.icon-no-border i.bi-box-arrow-in-right{font-size:20px!important}div.coer-button button.readonly,div.coer-button button.readonly:hover,div.coer-button button.readonly:focus{background-color:#dfdede!important;border-color:#dfdede!important;color:#fff!important}div.coer-button coer-button[ishidden=true],div.coer-button coer-button[ng-reflect-invisible=true]{position:relative!important;top:10000vh;left:10000vw}div.coer-button a.loading{cursor:wait!important}div.coer-button i{vertical-align:middle!important}div.coer-button i.spinner-border{width:15px!important;height:15px!important;font-size:16px!important}div.coer-button span{font-weight:700!important}div#coer-tool-bar coer-button *{color:#fd6031!important}\n"], dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "directive", type: i2.RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "component", type: i3.MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", exportAs: ["matButton"] }, { kind: "component", type: i3.MatIconButton, selector: "button[mat-icon-button]", exportAs: ["matButton"] }] }); }
|
1035
|
+
}
|
1036
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: CoerButton, decorators: [{
|
1037
|
+
type: Component,
|
1038
|
+
args: [{ selector: 'coer-button', template: "<div [ngClass]=\"{ 'coer-button': true, 'invisible': isInvisible() }\">\r\n <a [id]=\"_id + '-container'\"\r\n [routerLink]=\"(path().length > 0 && _isEnable()) ? path() : null\"\r\n [ngClass]=\"{ 'loading': isLoading(), 'animate__animated animate__zoomIn': true, 'animate__disabled': !animation() }\"\r\n [ngStyle]=\"{ 'margin-top': marginTop(), 'margin-right': marginRight(), 'margin-bottom': marginBottom(), 'margin-left': marginLeft() }\">\r\n @if(type() =='filled' || type() == 'outline') {\r\n <button mat-button\r\n [id]=\"_id + '-inner-button'\"\r\n type=\"button\"\r\n (click)=\"Click($event)\"\r\n [ngClass]=\"{\r\n 'primary-filled': (color() == 'primary' && type() =='filled'),\r\n 'secondary-filled': (color() == 'secondary' && type() =='filled'),\r\n 'success-filled': (color() == 'success' && type() =='filled'),\r\n 'warning-filled': (color() == 'warning' && type() =='filled'),\r\n 'danger-filled': (color() == 'danger' && type() =='filled'),\r\n 'navigation-filled': (color() == 'navigation' && type() =='filled'),\r\n 'primary-outline': (color() == 'primary' && type() =='outline'),\r\n 'secondary-outline': (color() == 'secondary' && type() =='outline'),\r\n 'success-outline': (color() == 'success' && type() =='outline'),\r\n 'warning-outline': (color() == 'warning' && type() =='outline'),\r\n 'danger-outline': (color() == 'danger' && type() =='outline'),\r\n 'navigation-outline': (color() == 'navigation'),\r\n 'readonly': isDisabled(),\r\n 'cursor-wait': isLoading()\r\n }\"\r\n [ngStyle]=\"{\r\n 'width': width(),\r\n 'min-width': minWidth(),\r\n 'height': height(),\r\n 'min-height': minHeight()\r\n }\">\r\n <span class=\"slot\" *ngIf=\"!isLoading(); else loading\" >\r\n <span *ngIf=\"(iconPosition() == 'left')\">\r\n <i [class]=\"_icon()\"></i>\r\n </span>\r\n\r\n <span [ngClass]=\"{ 'ms-2': (iconPosition() == 'left'), 'me-2': (iconPosition() == 'right') }\">\r\n <ng-content></ng-content>\r\n </span>\r\n\r\n <span *ngIf=\"(iconPosition() == 'right')\">\r\n <i [class]=\"_icon()\"></i>\r\n </span>\r\n </span>\r\n\r\n <ng-template #loading>\r\n <span class=\"slot fa-fade\">\r\n <span class=\"me-2\"> Loading </span>\r\n <i class=\"spinner-border\"></i>\r\n </span>\r\n </ng-template>\r\n </button>\r\n }\r\n\r\n @else {\r\n @if (type() == 'icon') {\r\n <button mat-icon-button\r\n [id]=\"_id + '-inner-button'\"\r\n (click)=\"Click($event)\"\r\n [ngClass]=\"{\r\n 'primary-filled': (color() == 'primary'),\r\n 'secondary-filled': (color() == 'secondary'),\r\n 'success-filled': (color() == 'success'),\r\n 'warning-filled': (color() == 'warning'),\r\n 'danger-filled': (color() == 'danger'),\r\n 'navigation-filled': (color() == 'navigation'),\r\n 'readonly': (isDisabled() || isLoading()),\r\n 'cursor-wait': isLoading()\r\n }\">\r\n <i [class]=\"_icon()\"></i>\r\n </button>\r\n }\r\n\r\n @else if (type() == 'icon-outline') {\r\n <button mat-icon-button\r\n [id]=\"_id + '-inner-button'\"\r\n (click)=\"Click($event)\"\r\n [ngClass]=\"{\r\n 'primary-outline': (color() == 'primary'),\r\n 'secondary-outline': (color() == 'secondary'),\r\n 'success-outline': (color() == 'success'),\r\n 'warning-outline': (color() == 'warning'),\r\n 'danger-outline': (color() == 'danger'),\r\n 'navigation-outline': (color() == 'navigation'),\r\n 'readonly': (isDisabled() || isLoading()),\r\n 'cursor-wait': isLoading()\r\n }\">\r\n <i [class]=\"_icon()\"></i>\r\n </button>\r\n }\r\n\r\n @else if (type() == 'icon-no-border') {\r\n <button mat-icon-button\r\n [id]=\"_id + '-inner-button'\"\r\n (click)=\"Click($event)\"\r\n [ngClass]=\"{\r\n 'primary-outline': (color() == 'primary'),\r\n 'secondary-outline': (color() == 'secondary'),\r\n 'success-outline': (color() == 'success'),\r\n 'warning-outline': (color() == 'warning'),\r\n 'danger-outline': (color() == 'danger'),\r\n 'navigation-outline': (color() == 'navigation'),\r\n 'readonly': (isDisabled() || isLoading()),\r\n 'icon-no-border': true\r\n }\">\r\n <i [class]=\"_icon()\"></i>\r\n </button>\r\n }\r\n }\r\n </a>\r\n</div>", styles: [".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}coer-button{display:contents!important}div.coer-button{display:contents!important}div.coer-button a{display:inline-block!important}div.coer-button a.animate__disabled{animation-duration:0s!important}div.coer-button button{font-size:17px!important;white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important}div.coer-button .slot{width:100px!important;display:flex!important;align-items:center!important;justify-content:center!important;text-overflow:ellipsis!important;overflow:hidden!important}div.coer-button button.primary-filled{background-color:#0d6efd!important;color:#f5f5f5!important}div.coer-button button.secondary-filled{background-color:#6c757d!important;color:#f5f5f5!important}div.coer-button button.success-filled{background-color:#198754!important;color:#f5f5f5!important}div.coer-button button.warning-filled{background-color:#ffc107!important;color:#252525!important}div.coer-button button.danger-filled{background-color:#dc3545!important;color:#f5f5f5!important}div.coer-button button.navigation-filled{background-color:#fd6031!important;color:#f5f5f5!important}div.coer-button button.primary-outline{background-color:#fff!important;border:1px solid #0d6efd!important;color:#0d6efd!important}div.coer-button button.secondary-outline{background-color:#fff!important;border:1px solid #6c757d!important;color:#6c757d!important}div.coer-button button.success-outline{background-color:#fff!important;border:1px solid #198754!important;color:#198754!important}div.coer-button button.warning-outline{background-color:#fff!important;border:1px solid #ffc107!important;color:#ffc107!important}div.coer-button button.danger-outline{background-color:#fff!important;border:1px solid #dc3545!important;color:#dc3545!important}div.coer-button button.navigation-outline{background-color:#fff!important;border:1px solid #fd6031!important;color:#fd6031!important}div.coer-button button.primary-filled:not(.readonly):hover,div.coer-button button.primary-filled:not(.readonly):focus,div.coer-button button.primary-outline:not(.readonly):hover,div.coer-button button.primary-outline:not(.readonly):focus,div.coer-button button.secondary-filled:not(.readonly):hover,div.coer-button button.secondary-filled:not(.readonly):focus,div.coer-button button.secondary-outline:not(.readonly):hover,div.coer-button button.secondary-outline:not(.readonly):focus,div.coer-button button.success-filled:not(.readonly):hover,div.coer-button button.success-filled:not(.readonly):focus,div.coer-button button.success-outline:not(.readonly):hover,div.coer-button button.success-outline:not(.readonly):focus,div.coer-button button.warning-filled:not(.readonly):hover,div.coer-button button.warning-filled:not(.readonly):focus,div.coer-button button.warning-outline:not(.readonly):hover,div.coer-button button.warning-outline:not(.readonly):focus,div.coer-button button.danger-filled:not(.readonly):hover,div.coer-button button.danger-filled:not(.readonly):focus,div.coer-button button.danger-outline:not(.readonly):hover,div.coer-button button.danger-outline:not(.readonly):focus{filter:brightness(1.1)!important}div.coer-button button.primary-filled:not(.readonly):focus,div.coer-button button.primary-outline:not(.readonly):focus{box-shadow:0 0 20px #0d6efd!important}div.coer-button button.secondary-filled:not(.readonly):focus,div.coer-button button.secondary-outline:not(.readonly):focus{box-shadow:0 0 20px #6c757d!important}div.coer-button button.success-filled:not(.readonly):focus,div.coer-button button.success-outline:not(.readonly):focus{box-shadow:0 0 20px #198754!important}div.coer-button button.warning-filled:not(.readonly):focus,div.coer-button button.warning-outline:not(.readonly):focus{box-shadow:0 0 20px #ffc107!important}div.coer-button button.danger-filled:not(.readonly):focus,div.coer-button button.danger-outline:not(.readonly):focus{box-shadow:0 0 20px #dc3545!important}div.coer-button button.navigation-filled:not(.readonly):focus,div.coer-button button.navigation-outline:not(.readonly):focus{box-shadow:0 0 20px #fd6031!important}div.coer-button button.mdc-icon-button.mat-mdc-icon-button{width:40px!important;height:40px!important;padding:0!important}div.coer-button button.mdc-icon-button.mat-mdc-icon-button.icon-no-border{width:25px!important;height:25px!important;background-color:transparent!important;border:none!important;overflow:visible!important}div.coer-button button.mdc-icon-button.mat-mdc-icon-button.icon-no-border *{font-size:medium!important}div.coer-button button.mdc-icon-button.mat-mdc-icon-button.icon-no-border i.bi-box-arrow-left,div.coer-button button.mdc-icon-button.mat-mdc-icon-button.icon-no-border i.bi-box-arrow-in-right{font-size:20px!important}div.coer-button button.readonly,div.coer-button button.readonly:hover,div.coer-button button.readonly:focus{background-color:#dfdede!important;border-color:#dfdede!important;color:#fff!important}div.coer-button coer-button[ishidden=true],div.coer-button coer-button[ng-reflect-invisible=true]{position:relative!important;top:10000vh;left:10000vw}div.coer-button a.loading{cursor:wait!important}div.coer-button i{vertical-align:middle!important}div.coer-button i.spinner-border{width:15px!important;height:15px!important;font-size:16px!important}div.coer-button span{font-weight:700!important}div#coer-tool-bar coer-button *{color:#fd6031!important}\n"] }]
|
1039
|
+
}], propDecorators: { id: [{
|
1040
|
+
type: Input
|
1041
|
+
}], tooltip: [{
|
1042
|
+
type: Input
|
1043
|
+
}], onClick: [{
|
1044
|
+
type: Output
|
1045
|
+
}] } });
|
1046
|
+
|
233
1047
|
//import { CoerCheckbox } from './coer-checkbox/coer-checkbox.component';
|
234
1048
|
//import { CoerFilebox } from './coer-filebox/coer-filebox.component';
|
235
1049
|
//import { CoerForm } from './coer-form/coer-form.component';
|
@@ -244,14 +1058,20 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImpo
|
|
244
1058
|
//import { CoerTextBox } from './coer-textbox/coer-textbox.component';
|
245
1059
|
class ComponentsModule {
|
246
1060
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: ComponentsModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
247
|
-
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "17.3.12", ngImport: i0, type: ComponentsModule, declarations: [CoerAlert
|
1061
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "17.3.12", ngImport: i0, type: ComponentsModule, declarations: [CoerAlert,
|
1062
|
+
CoerButton], imports: [CommonModule,
|
248
1063
|
RouterModule,
|
249
1064
|
FormsModule,
|
250
|
-
ReactiveFormsModule
|
1065
|
+
ReactiveFormsModule,
|
1066
|
+
//PipesModule,
|
1067
|
+
MatButtonModule], exports: [CoerAlert,
|
1068
|
+
CoerButton] }); }
|
251
1069
|
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: ComponentsModule, imports: [CommonModule,
|
252
1070
|
RouterModule,
|
253
1071
|
FormsModule,
|
254
|
-
ReactiveFormsModule
|
1072
|
+
ReactiveFormsModule,
|
1073
|
+
//PipesModule,
|
1074
|
+
MatButtonModule] }); }
|
255
1075
|
}
|
256
1076
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: ComponentsModule, decorators: [{
|
257
1077
|
type: NgModule,
|
@@ -262,7 +1082,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImpo
|
|
262
1082
|
FormsModule,
|
263
1083
|
ReactiveFormsModule,
|
264
1084
|
//PipesModule,
|
265
|
-
|
1085
|
+
MatButtonModule,
|
266
1086
|
//MatCheckboxModule,
|
267
1087
|
//MatInputModule,
|
268
1088
|
//MatFormFieldModule,
|
@@ -272,7 +1092,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImpo
|
|
272
1092
|
],
|
273
1093
|
declarations: [
|
274
1094
|
CoerAlert,
|
275
|
-
|
1095
|
+
CoerButton,
|
276
1096
|
//CoerCheckbox,
|
277
1097
|
//CoerFilebox,
|
278
1098
|
//CoerForm,
|
@@ -288,7 +1108,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImpo
|
|
288
1108
|
],
|
289
1109
|
exports: [
|
290
1110
|
CoerAlert,
|
291
|
-
|
1111
|
+
CoerButton,
|
292
1112
|
//CoerCheckbox,
|
293
1113
|
//CoerFilebox,
|
294
1114
|
//CoerForm,
|
@@ -305,53 +1125,15 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImpo
|
|
305
1125
|
}]
|
306
1126
|
}] });
|
307
1127
|
|
308
|
-
const
|
309
|
-
|
310
|
-
|
311
|
-
|
312
|
-
|
313
|
-
};
|
314
|
-
};
|
315
|
-
class ControlValue {
|
316
|
-
constructor() {
|
317
|
-
this._isTouched = false;
|
318
|
-
}
|
319
|
-
get isTouched() {
|
320
|
-
return this._isTouched;
|
321
|
-
}
|
322
|
-
/** */
|
323
|
-
SetValue(value) {
|
324
|
-
if (typeof this._UpdateValue === 'function') {
|
325
|
-
this._UpdateValue(value);
|
326
|
-
}
|
327
|
-
this._value = value;
|
328
|
-
}
|
329
|
-
/** */
|
330
|
-
SetTouched(isTouched) {
|
331
|
-
if (typeof this._IsTouched === 'function') {
|
332
|
-
this._IsTouched(isTouched);
|
333
|
-
}
|
334
|
-
this._isTouched = isTouched;
|
335
|
-
}
|
336
|
-
/** */
|
337
|
-
writeValue(value) {
|
338
|
-
this._value = value;
|
339
|
-
}
|
340
|
-
/** */
|
341
|
-
registerOnChange(callback) {
|
342
|
-
this._UpdateValue = callback;
|
343
|
-
}
|
344
|
-
/** */
|
345
|
-
registerOnTouched(callback) {
|
346
|
-
this._IsTouched = callback;
|
347
|
-
}
|
348
|
-
/** */
|
349
|
-
setDisabledState(isDisabled) { }
|
350
|
-
}
|
1128
|
+
const breakpointSIGNAL = signal(Screen?.BREAKPOINT || 'xs');
|
1129
|
+
|
1130
|
+
const isLoadingSIG = signal(false);
|
1131
|
+
|
1132
|
+
const isModalOpenSIG = signal(false);
|
351
1133
|
|
352
1134
|
/**
|
353
1135
|
* Generated bundle index. Do not edit.
|
354
1136
|
*/
|
355
1137
|
|
356
|
-
export { CONTROL_VALUE, CoerAlert, ComponentsModule, ControlValue };
|
1138
|
+
export { Breadcrumbs, CONTROL_VALUE, CoerAlert, CoerButton, ComponentsModule, ControlValue, DateTime, Files, Page, Screen, Source, Tools, breakpointSIGNAL, isLoadingSIG, isModalOpenSIG };
|
357
1139
|
//# sourceMappingURL=coer-elements.mjs.map
|