coer-elements 0.0.9 → 0.0.10
Sign up to get free protection for your applications and to get access to all the features.
- package/esm2022/public_api.mjs +2 -1
- package/esm2022/tools/index.mjs +2 -0
- package/esm2022/tools/lib/controlValue.mjs +46 -0
- package/fesm2022/coer-elements.mjs +47 -3
- package/fesm2022/coer-elements.mjs.map +1 -1
- package/package.json +1 -1
- package/public_api.d.ts +1 -0
- package/tools/index.d.ts +1 -0
- package/tools/lib/controlValue.d.ts +25 -0
package/esm2022/public_api.mjs
CHANGED
@@ -1,2 +1,3 @@
|
|
1
1
|
export * from './components';
|
2
|
-
|
2
|
+
export * from './tools';
|
3
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicHVibGljX2FwaS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uL3Byb2plY3RzL2NvZXItZWxlbWVudHMvc3JjL3B1YmxpY19hcGkudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsY0FBYyxjQUFjLENBQUM7QUFDN0IsY0FBYyxTQUFTLENBQUMiLCJzb3VyY2VzQ29udGVudCI6WyJleHBvcnQgKiBmcm9tICcuL2NvbXBvbmVudHMnO1xyXG5leHBvcnQgKiBmcm9tICcuL3Rvb2xzJzsiXX0=
|
@@ -0,0 +1,2 @@
|
|
1
|
+
export * from './lib/controlValue';
|
2
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi9wcm9qZWN0cy9jb2VyLWVsZW1lbnRzL3NyYy90b29scy9pbmRleC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxjQUFjLG9CQUFvQixDQUFBIiwic291cmNlc0NvbnRlbnQiOlsiZXhwb3J0ICogZnJvbSAnLi9saWIvY29udHJvbFZhbHVlJyJdfQ==
|
@@ -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,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY29udHJvbFZhbHVlLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vcHJvamVjdHMvY29lci1lbGVtZW50cy9zcmMvdG9vbHMvbGliL2NvbnRyb2xWYWx1ZS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEVBQXdCLGlCQUFpQixFQUFFLE1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iAqL1xyXG4gICAgcHVibGljIHJlZ2lzdGVyT25Ub3VjaGVkKGNhbGxiYWNrOiBGdW5jdGlvbik6IHZvaWQge1xyXG4gICAgICAgIHRoaXMuX0lzVG91Y2hlZCA9IGNhbGxiYWNrO1xyXG4gICAgfVxyXG5cclxuICAgIFxyXG4gICAgLyoqICovXHJcbiAgICBwdWJsaWMgc2V0RGlzYWJsZWRTdGF0ZShpc0Rpc2FibGVkOiBib29sZWFuKTogdm9pZCB7fVxyXG59Il19
|
@@ -1,8 +1,8 @@
|
|
1
1
|
import * as i0 from '@angular/core';
|
2
|
-
import { Component, NgModule } from '@angular/core';
|
2
|
+
import { Component, NgModule, forwardRef } from '@angular/core';
|
3
3
|
import { CommonModule } from '@angular/common';
|
4
4
|
import { RouterModule } from '@angular/router';
|
5
|
-
import { FormsModule, ReactiveFormsModule } from '@angular/forms';
|
5
|
+
import { FormsModule, ReactiveFormsModule, NG_VALUE_ACCESSOR } from '@angular/forms';
|
6
6
|
import * as bootstrap from 'bootstrap';
|
7
7
|
import Swal from 'sweetalert2';
|
8
8
|
|
@@ -305,9 +305,53 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImpo
|
|
305
305
|
}]
|
306
306
|
}] });
|
307
307
|
|
308
|
+
const CONTROL_VALUE = (component) => {
|
309
|
+
return {
|
310
|
+
provide: NG_VALUE_ACCESSOR,
|
311
|
+
useExisting: forwardRef(() => component),
|
312
|
+
multi: true
|
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
|
+
}
|
351
|
+
|
308
352
|
/**
|
309
353
|
* Generated bundle index. Do not edit.
|
310
354
|
*/
|
311
355
|
|
312
|
-
export { CoerAlert, ComponentsModule };
|
356
|
+
export { CONTROL_VALUE, CoerAlert, ComponentsModule, ControlValue };
|
313
357
|
//# sourceMappingURL=coer-elements.mjs.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"coer-elements.mjs","sources":["../../../projects/coer-elements/src/components/lib/coer-alert/coer-alert.component.ts","../../../projects/coer-elements/src/components/lib/coer-alert/coer-alert.component.html","../../../projects/coer-elements/src/components/lib/components.module.ts","../../../projects/coer-elements/src/coer-elements.ts"],"sourcesContent":["import { Component } from '@angular/core';\r\nimport * as bootstrap from 'bootstrap';\r\nimport Swal from 'sweetalert2'\r\n\r\n@Component({\r\n selector: 'coer-alert',\r\n templateUrl: './coer-alert.component.html',\r\n styleUrls: ['./coer-alert.component.scss']\r\n})\r\nexport class CoerAlert {\r\n\r\n /** */\r\n public Success(message: string | null = null, title: string | null = null, icon: string | null = null, autohide: number | null = 3000): void {\r\n //Title\r\n if (!title || title == '') title = 'Success';\r\n const alertSuccessTitle = document.getElementById('alert-success-title')!;\r\n alertSuccessTitle.textContent = title;\r\n\r\n //Icon\r\n icon = this.GetIcon(title, icon, 'bi-check-circle fa-beat');\r\n const alertSuccessIcon = document.getElementById('alert-success-icon')!;\r\n this.SetIcon(alertSuccessIcon, icon);\r\n\r\n //Message\r\n if (!message) message = '';\r\n const alertSuccessMessage = document.getElementById('alert-success-message')!;\r\n alertSuccessMessage.innerHTML = message;\r\n\r\n //Toast\r\n const alertSuccess = document.getElementById('alert-success')!;\r\n this.SetAutoHide(alertSuccess, autohide);\r\n\r\n const toast = bootstrap.Toast.getOrCreateInstance(alertSuccess);\r\n toast.show();\r\n }\r\n\r\n\r\n /** */\r\n public Error(message: string | null = null, title: string | null = null, icon: string | null = null, autohide: number | null = 3000): void {\r\n //Title\r\n if (!title || title == '') title = 'Error';\r\n const alertErrorTitle = document.getElementById('alert-error-title')!;\r\n alertErrorTitle.textContent = title;\r\n\r\n //Icon\r\n icon = this.GetIcon(title, icon, 'bi-exclamation-octagon fa-beat');\r\n const alertErrorIcon = document.getElementById('alert-error-icon')!;\r\n this.SetIcon(alertErrorIcon, icon);\r\n\r\n //Message\r\n if (!message) message = '';\r\n const alertErrorBody = document.getElementById('alert-error-message')!;\r\n alertErrorBody.innerHTML = message;\r\n\r\n //Toast\r\n const alertError = document.getElementById('alert-error')!;\r\n this.SetAutoHide(alertError, autohide);\r\n\r\n const toast = bootstrap.Toast.getOrCreateInstance(alertError);\r\n toast.show();\r\n }\r\n\r\n\r\n /** */\r\n public Info(message: string | null = null, title: string | null = null, icon: string | null = null, autohide: number | null = 3000): void {\r\n //Title\r\n if (!title || title == '') title = 'Info';\r\n const alertInfoTitle = document.getElementById('alert-info-title')!;\r\n alertInfoTitle.textContent = title;\r\n\r\n //Icon\r\n icon = this.GetIcon(title, icon, 'bi-info-circle fa-beat');\r\n const alertInfoIcon = document.getElementById('alert-info-icon')!;\r\n this.SetIcon(alertInfoIcon, icon);\r\n\r\n //Message\r\n if (!message) message = '';\r\n const alertInfoBody = document.getElementById('alert-info-message')!;\r\n alertInfoBody.innerHTML = message;\r\n\r\n //Toast\r\n const alertInfo = document.getElementById('alert-info')!;\r\n this.SetAutoHide(alertInfo, autohide);\r\n\r\n const toast = bootstrap.Toast.getOrCreateInstance(alertInfo);\r\n toast.show();\r\n }\r\n\r\n\r\n /** */\r\n public Warning(message: string | null = null, title: string | null = null, icon: string | null = null, autohide: number | null = 3000): void {\r\n //Title\r\n if (!title || title == '') title = 'Warning';\r\n const alertWarningTitle = document.getElementById('alert-warning-title')!;\r\n alertWarningTitle.textContent = title;\r\n\r\n //Icon\r\n icon = this.GetIcon(title, icon, 'bi-exclamation-triangle-fill fa-beat');\r\n const alertWarningIcon = document.getElementById('alert-warning-icon')!;\r\n this.SetIcon(alertWarningIcon, icon);\r\n\r\n //Message\r\n if (!message) message = '';\r\n const alertWarningBody = document.getElementById('alert-warning-message')!;\r\n alertWarningBody.innerHTML = message;\r\n\r\n //Toast\r\n const alertWarning = document.getElementById('alert-warning')!;\r\n this.SetAutoHide(alertWarning, autohide);\r\n\r\n const toast = bootstrap.Toast.getOrCreateInstance(alertWarning);\r\n toast.show();\r\n }\r\n\r\n\r\n /** */\r\n protected Close(alert: 'alert-success' | 'alert-error' | 'alert-info' | 'alert-warning') {\r\n return new Promise<void>(Resolve => {\r\n const element = document.getElementById(alert)!;\r\n const toast = bootstrap.Toast.getOrCreateInstance(element);\r\n toast.hide();\r\n\r\n setTimeout(() => { Resolve() }, 200);\r\n })\r\n }\r\n\r\n\r\n /** */\r\n public Confirm(\r\n message: string = 'Proceed?',\r\n alertType: 'warning' | 'danger' | 'success' | 'info' = 'warning',\r\n icon: string | null = null) {\r\n return new Promise<boolean>(Resolve => {\r\n let color: string;\r\n let iconType: 'warning' | 'error' | 'success' | 'info';\r\n switch(alertType) {\r\n case 'danger': {\r\n if (icon == null) icon = 'bi-exclamation-octagon';\r\n iconType = 'error';\r\n color = '#dc3545'; //red\r\n break;\r\n };\r\n\r\n case 'success': {\r\n if (icon == null) icon = 'bi-check-circle';\r\n iconType = 'info';\r\n color = '#198754'; //green\r\n break;\r\n };\r\n\r\n case 'info': {\r\n if (icon == null) icon = 'bi-info-circle';\r\n iconType = 'error';\r\n color = '#0d6efd'; //blue\r\n break\r\n };\r\n\r\n default: {\r\n if (icon == null) icon = 'bi-exclamation-triangle-fill';\r\n iconType = 'warning';\r\n color = '#ffc107'; //yellow\r\n break;\r\n }\r\n }\r\n\r\n switch(icon) {\r\n case 'delete': icon = 'fa-regular fa-trash-can'; break;\r\n }\r\n\r\n Swal.fire({\r\n icon: iconType,\r\n iconColor: 'transparent',\r\n iconHtml: `<i class=\"${icon}\" style=\"color: ${color};\"></i>`,\r\n html: message,\r\n showConfirmButton: true,\r\n confirmButtonText: 'Yes',\r\n confirmButtonColor: color,\r\n focusConfirm: true,\r\n showDenyButton: true,\r\n denyButtonColor: color,\r\n focusDeny: false,\r\n reverseButtons: true,\r\n allowOutsideClick: false,\r\n allowEscapeKey: false,\r\n allowEnterKey: true,\r\n customClass: {\r\n denyButton: 'sweet-alert-button',\r\n confirmButton: 'sweet-alert-button'\r\n }\r\n }).then(({ value }) => setTimeout(() => Resolve(value)));\r\n });\r\n }\r\n\r\n\r\n /** */\r\n private SetIcon(element: HTMLElement, icon: string): void {\r\n for (const item of [...element.classList.value.split(' ')]) {\r\n if (item.length > 0) {\r\n element.classList.remove(item);\r\n element.classList.remove('q');\r\n }\r\n }\r\n\r\n icon = icon.trim();\r\n const hasWhiteSpaces: RegExp = / /;\r\n if (hasWhiteSpaces.test(icon)) {\r\n const classes = icon.split(' ');\r\n for (const icon of classes) element.classList.add(icon);\r\n }\r\n\r\n else element.classList.add(icon);\r\n }\r\n\r\n\r\n /** */\r\n private SetAutoHide(element: HTMLElement, autohide: number | null): void {\r\n element.removeAttribute('data-bs-autohide');\r\n element.removeAttribute('data-bs-delay');\r\n\r\n if (autohide && autohide > 0) {\r\n if (autohide < 1000) autohide = 1000;\r\n element.setAttribute('data-bs-autohide', 'true');\r\n element.setAttribute('data-bs-delay', String(autohide));\r\n }\r\n\r\n else element.setAttribute('data-bs-autohide', 'false');\r\n }\r\n\r\n\r\n /** */\r\n private GetIcon(title: string, icon: string | null, iconDefault: string): string {\r\n if (icon == null || icon == '') {\r\n title = title.replaceAll(' ', '').toUpperCase();\r\n\r\n switch(title) {\r\n case 'ENABLED': return 'fa-solid fa-thumbs-up fa-flip-horizontal';\r\n case 'ACTIVE': return 'fa-solid fa-thumbs-up fa-flip-horizontal';\r\n case 'ACTIVED': return 'fa-solid fa-thumbs-up fa-flip-horizontal';\r\n case 'DISABLE': return 'fa-solid fa-thumbs-down fa-flip-horizontal';\r\n case 'DISABLED': return 'fa-solid fa-thumbs-down fa-flip-horizontal';\r\n case 'DELETE': return 'fa-regular fa-trash-can';\r\n case 'DELETED': return 'fa-regular fa-trash-can';\r\n default: return iconDefault;\r\n }\r\n }\r\n\r\n return icon;\r\n }\r\n}","<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>","import { NgModule } from '@angular/core';\r\nimport { CommonModule } from '@angular/common';\r\nimport { RouterModule } from '@angular/router';\r\nimport { FormsModule, ReactiveFormsModule } from '@angular/forms';\r\n//import { DirectivesModule } from 'src/app/shared/directives/directives.module';\r\n//import { PipesModule } from 'src/app/shared/pipes/pipes.module';\r\n\r\n//Angular Material\r\n//import { MatButtonModule } from '@angular/material/button';\r\n//import { MatCheckboxModule } from '@angular/material/checkbox';\r\n//import { MatInputModule } from '@angular/material/input';\r\n//import { MatFormFieldModule } from '@angular/material/form-field';\r\n//import { MatSlideToggleModule } from '@angular/material/slide-toggle';\r\n//import { MatTabsModule } from '@angular/material/tabs';\r\n\r\n//Components\r\nimport { CoerAlert } from './coer-alert/coer-alert.component';\r\n//import { CoerButton } from './coer-button/coer-button.component';\r\n//import { CoerCheckbox } from './coer-checkbox/coer-checkbox.component';\r\n//import { CoerFilebox } from './coer-filebox/coer-filebox.component';\r\n//import { CoerForm } from './coer-form/coer-form.component';\r\n//import { CoerGrid } from './coer-grid/coer-grid.component';\r\n//import { CoerModal } from './coer-modal/coer-modal.component';\r\n//import { CoerNumberBox } from './coer-numberbox/coer-numberbox.component';\r\n//import { CoerPageTitle } from './coer-page-title/coer-page-title.component';\r\n//import { CoerSelectbox } from './coer-selectbox/coer-selectbox.component';\r\n//import { CoerSwitch } from './coer-switch/coer-switch.component';\r\n//import { CoerTab } from './coer-tab/coer-tab.component';\r\n//import { CoerTextarea } from './coer-textarea/coer-textarea.component';\r\n//import { CoerTextBox } from './coer-textbox/coer-textbox.component';\r\n\r\n@NgModule({\r\n imports: [\r\n CommonModule,\r\n RouterModule,\r\n FormsModule,\r\n ReactiveFormsModule,\r\n //PipesModule,\r\n //MatButtonModule,\r\n //MatCheckboxModule,\r\n //MatInputModule,\r\n //MatFormFieldModule,\r\n //MatSlideToggleModule,\r\n //MatTabsModule,\r\n //DirectivesModule\r\n ],\r\n declarations: [\r\n CoerAlert,\r\n //CoerButton,\r\n //CoerCheckbox,\r\n //CoerFilebox,\r\n //CoerForm,\r\n //CoerGrid,\r\n //CoerModal,\r\n //CoerNumberBox,\r\n //CoerPageTitle,\r\n //CoerSelectbox,\r\n //CoerSwitch,\r\n //CoerTextarea,\r\n //CoerTab,\r\n //CoerTextBox,\r\n ],\r\n exports: [\r\n CoerAlert,\r\n //CoerButton,\r\n //CoerCheckbox,\r\n //CoerFilebox,\r\n //CoerForm,\r\n //CoerGrid,\r\n //CoerModal,\r\n //CoerNumberBox,\r\n //CoerPageTitle,\r\n //CoerSelectbox,\r\n //CoerSwitch,\r\n //CoerTextarea,\r\n //CoerTab,\r\n //CoerTextBox,\r\n ]\r\n})\r\nexport class ComponentsModule { }\r\n//export * from './coer-alert/coer-alert.component';\r\n//export * from './coer-button/coer-button.component';\r\n//export * from './coer-checkbox/coer-checkbox.component';\r\n//export * from './coer-filebox/coer-filebox.component';\r\n//export * from './coer-filebox/coer-filebox.interface';\r\n//export * from './coer-form/coer-form.component';\r\n//export * from './coer-grid/coer-grid.component';\r\n//export * from './coer-grid/coer-grid.interface';\r\n//export * from './coer-grid/coer-grid.templates';\r\n//export * from './coer-modal/coer-modal.component';\r\n//export * from './coer-numberbox/coer-numberbox.component';\r\n//export * from './coer-page-title/coer-page-title.component';\r\n//export * from './coer-page-title/pageTitle.interface';\r\n//export * from './coer-selectbox/coer-selectbox.component';\r\n//export * from './coer-switch/coer-switch.component';\r\n//export * from './coer-tab/coer-tab.component';\r\n//export * from './coer-textbox/coer-textbox.component';","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":[],"mappings":";;;;;;;;MASa,SAAS,CAAA;;IAGX,OAAO,CAAC,OAAyB,GAAA,IAAI,EAAE,KAAA,GAAuB,IAAI,EAAE,IAAsB,GAAA,IAAI,EAAE,QAAA,GAA0B,IAAI,EAAA;;AAEjI,QAAA,IAAI,CAAC,KAAK,IAAI,KAAK,IAAI,EAAE;YAAE,KAAK,GAAG,SAAS,CAAC;QAC7C,MAAM,iBAAiB,GAAG,QAAQ,CAAC,cAAc,CAAC,qBAAqB,CAAE,CAAC;AAC1E,QAAA,iBAAiB,CAAC,WAAW,GAAG,KAAK,CAAC;;QAGtC,IAAI,GAAG,IAAI,CAAC,OAAO,CAAC,KAAK,EAAE,IAAI,EAAE,yBAAyB,CAAC,CAAC;QAC5D,MAAM,gBAAgB,GAAG,QAAQ,CAAC,cAAc,CAAC,oBAAoB,CAAE,CAAC;AACxE,QAAA,IAAI,CAAC,OAAO,CAAC,gBAAgB,EAAE,IAAI,CAAC,CAAC;;AAGrC,QAAA,IAAI,CAAC,OAAO;YAAE,OAAO,GAAG,EAAE,CAAC;QAC3B,MAAM,mBAAmB,GAAG,QAAQ,CAAC,cAAc,CAAC,uBAAuB,CAAE,CAAC;AAC9E,QAAA,mBAAmB,CAAC,SAAS,GAAG,OAAO,CAAC;;QAGxC,MAAM,YAAY,GAAG,QAAQ,CAAC,cAAc,CAAC,eAAe,CAAE,CAAC;AAC/D,QAAA,IAAI,CAAC,WAAW,CAAC,YAAY,EAAE,QAAQ,CAAC,CAAC;QAEzC,MAAM,KAAK,GAAG,SAAS,CAAC,KAAK,CAAC,mBAAmB,CAAC,YAAY,CAAC,CAAC;QAChE,KAAK,CAAC,IAAI,EAAE,CAAC;KAChB;;IAIM,KAAK,CAAC,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BACL,SAAS;;;;;;;;;;;;;;AAcZ,qBAAA;AACJ,iBAAA,CAAA;;;AC9ED;;AAEG;;;;"}
|
1
|
+
{"version":3,"file":"coer-elements.mjs","sources":["../../../projects/coer-elements/src/components/lib/coer-alert/coer-alert.component.ts","../../../projects/coer-elements/src/components/lib/coer-alert/coer-alert.component.html","../../../projects/coer-elements/src/components/lib/components.module.ts","../../../projects/coer-elements/src/tools/lib/controlValue.ts","../../../projects/coer-elements/src/coer-elements.ts"],"sourcesContent":["import { Component } from '@angular/core';\r\nimport * as bootstrap from 'bootstrap';\r\nimport Swal from 'sweetalert2'\r\n\r\n@Component({\r\n selector: 'coer-alert',\r\n templateUrl: './coer-alert.component.html',\r\n styleUrls: ['./coer-alert.component.scss']\r\n})\r\nexport class CoerAlert {\r\n\r\n /** */\r\n public Success(message: string | null = null, title: string | null = null, icon: string | null = null, autohide: number | null = 3000): void {\r\n //Title\r\n if (!title || title == '') title = 'Success';\r\n const alertSuccessTitle = document.getElementById('alert-success-title')!;\r\n alertSuccessTitle.textContent = title;\r\n\r\n //Icon\r\n icon = this.GetIcon(title, icon, 'bi-check-circle fa-beat');\r\n const alertSuccessIcon = document.getElementById('alert-success-icon')!;\r\n this.SetIcon(alertSuccessIcon, icon);\r\n\r\n //Message\r\n if (!message) message = '';\r\n const alertSuccessMessage = document.getElementById('alert-success-message')!;\r\n alertSuccessMessage.innerHTML = message;\r\n\r\n //Toast\r\n const alertSuccess = document.getElementById('alert-success')!;\r\n this.SetAutoHide(alertSuccess, autohide);\r\n\r\n const toast = bootstrap.Toast.getOrCreateInstance(alertSuccess);\r\n toast.show();\r\n }\r\n\r\n\r\n /** */\r\n public Error(message: string | null = null, title: string | null = null, icon: string | null = null, autohide: number | null = 3000): void {\r\n //Title\r\n if (!title || title == '') title = 'Error';\r\n const alertErrorTitle = document.getElementById('alert-error-title')!;\r\n alertErrorTitle.textContent = title;\r\n\r\n //Icon\r\n icon = this.GetIcon(title, icon, 'bi-exclamation-octagon fa-beat');\r\n const alertErrorIcon = document.getElementById('alert-error-icon')!;\r\n this.SetIcon(alertErrorIcon, icon);\r\n\r\n //Message\r\n if (!message) message = '';\r\n const alertErrorBody = document.getElementById('alert-error-message')!;\r\n alertErrorBody.innerHTML = message;\r\n\r\n //Toast\r\n const alertError = document.getElementById('alert-error')!;\r\n this.SetAutoHide(alertError, autohide);\r\n\r\n const toast = bootstrap.Toast.getOrCreateInstance(alertError);\r\n toast.show();\r\n }\r\n\r\n\r\n /** */\r\n public Info(message: string | null = null, title: string | null = null, icon: string | null = null, autohide: number | null = 3000): void {\r\n //Title\r\n if (!title || title == '') title = 'Info';\r\n const alertInfoTitle = document.getElementById('alert-info-title')!;\r\n alertInfoTitle.textContent = title;\r\n\r\n //Icon\r\n icon = this.GetIcon(title, icon, 'bi-info-circle fa-beat');\r\n const alertInfoIcon = document.getElementById('alert-info-icon')!;\r\n this.SetIcon(alertInfoIcon, icon);\r\n\r\n //Message\r\n if (!message) message = '';\r\n const alertInfoBody = document.getElementById('alert-info-message')!;\r\n alertInfoBody.innerHTML = message;\r\n\r\n //Toast\r\n const alertInfo = document.getElementById('alert-info')!;\r\n this.SetAutoHide(alertInfo, autohide);\r\n\r\n const toast = bootstrap.Toast.getOrCreateInstance(alertInfo);\r\n toast.show();\r\n }\r\n\r\n\r\n /** */\r\n public Warning(message: string | null = null, title: string | null = null, icon: string | null = null, autohide: number | null = 3000): void {\r\n //Title\r\n if (!title || title == '') title = 'Warning';\r\n const alertWarningTitle = document.getElementById('alert-warning-title')!;\r\n alertWarningTitle.textContent = title;\r\n\r\n //Icon\r\n icon = this.GetIcon(title, icon, 'bi-exclamation-triangle-fill fa-beat');\r\n const alertWarningIcon = document.getElementById('alert-warning-icon')!;\r\n this.SetIcon(alertWarningIcon, icon);\r\n\r\n //Message\r\n if (!message) message = '';\r\n const alertWarningBody = document.getElementById('alert-warning-message')!;\r\n alertWarningBody.innerHTML = message;\r\n\r\n //Toast\r\n const alertWarning = document.getElementById('alert-warning')!;\r\n this.SetAutoHide(alertWarning, autohide);\r\n\r\n const toast = bootstrap.Toast.getOrCreateInstance(alertWarning);\r\n toast.show();\r\n }\r\n\r\n\r\n /** */\r\n protected Close(alert: 'alert-success' | 'alert-error' | 'alert-info' | 'alert-warning') {\r\n return new Promise<void>(Resolve => {\r\n const element = document.getElementById(alert)!;\r\n const toast = bootstrap.Toast.getOrCreateInstance(element);\r\n toast.hide();\r\n\r\n setTimeout(() => { Resolve() }, 200);\r\n })\r\n }\r\n\r\n\r\n /** */\r\n public Confirm(\r\n message: string = 'Proceed?',\r\n alertType: 'warning' | 'danger' | 'success' | 'info' = 'warning',\r\n icon: string | null = null) {\r\n return new Promise<boolean>(Resolve => {\r\n let color: string;\r\n let iconType: 'warning' | 'error' | 'success' | 'info';\r\n switch(alertType) {\r\n case 'danger': {\r\n if (icon == null) icon = 'bi-exclamation-octagon';\r\n iconType = 'error';\r\n color = '#dc3545'; //red\r\n break;\r\n };\r\n\r\n case 'success': {\r\n if (icon == null) icon = 'bi-check-circle';\r\n iconType = 'info';\r\n color = '#198754'; //green\r\n break;\r\n };\r\n\r\n case 'info': {\r\n if (icon == null) icon = 'bi-info-circle';\r\n iconType = 'error';\r\n color = '#0d6efd'; //blue\r\n break\r\n };\r\n\r\n default: {\r\n if (icon == null) icon = 'bi-exclamation-triangle-fill';\r\n iconType = 'warning';\r\n color = '#ffc107'; //yellow\r\n break;\r\n }\r\n }\r\n\r\n switch(icon) {\r\n case 'delete': icon = 'fa-regular fa-trash-can'; break;\r\n }\r\n\r\n Swal.fire({\r\n icon: iconType,\r\n iconColor: 'transparent',\r\n iconHtml: `<i class=\"${icon}\" style=\"color: ${color};\"></i>`,\r\n html: message,\r\n showConfirmButton: true,\r\n confirmButtonText: 'Yes',\r\n confirmButtonColor: color,\r\n focusConfirm: true,\r\n showDenyButton: true,\r\n denyButtonColor: color,\r\n focusDeny: false,\r\n reverseButtons: true,\r\n allowOutsideClick: false,\r\n allowEscapeKey: false,\r\n allowEnterKey: true,\r\n customClass: {\r\n denyButton: 'sweet-alert-button',\r\n confirmButton: 'sweet-alert-button'\r\n }\r\n }).then(({ value }) => setTimeout(() => Resolve(value)));\r\n });\r\n }\r\n\r\n\r\n /** */\r\n private SetIcon(element: HTMLElement, icon: string): void {\r\n for (const item of [...element.classList.value.split(' ')]) {\r\n if (item.length > 0) {\r\n element.classList.remove(item);\r\n element.classList.remove('q');\r\n }\r\n }\r\n\r\n icon = icon.trim();\r\n const hasWhiteSpaces: RegExp = / /;\r\n if (hasWhiteSpaces.test(icon)) {\r\n const classes = icon.split(' ');\r\n for (const icon of classes) element.classList.add(icon);\r\n }\r\n\r\n else element.classList.add(icon);\r\n }\r\n\r\n\r\n /** */\r\n private SetAutoHide(element: HTMLElement, autohide: number | null): void {\r\n element.removeAttribute('data-bs-autohide');\r\n element.removeAttribute('data-bs-delay');\r\n\r\n if (autohide && autohide > 0) {\r\n if (autohide < 1000) autohide = 1000;\r\n element.setAttribute('data-bs-autohide', 'true');\r\n element.setAttribute('data-bs-delay', String(autohide));\r\n }\r\n\r\n else element.setAttribute('data-bs-autohide', 'false');\r\n }\r\n\r\n\r\n /** */\r\n private GetIcon(title: string, icon: string | null, iconDefault: string): string {\r\n if (icon == null || icon == '') {\r\n title = title.replaceAll(' ', '').toUpperCase();\r\n\r\n switch(title) {\r\n case 'ENABLED': return 'fa-solid fa-thumbs-up fa-flip-horizontal';\r\n case 'ACTIVE': return 'fa-solid fa-thumbs-up fa-flip-horizontal';\r\n case 'ACTIVED': return 'fa-solid fa-thumbs-up fa-flip-horizontal';\r\n case 'DISABLE': return 'fa-solid fa-thumbs-down fa-flip-horizontal';\r\n case 'DISABLED': return 'fa-solid fa-thumbs-down fa-flip-horizontal';\r\n case 'DELETE': return 'fa-regular fa-trash-can';\r\n case 'DELETED': return 'fa-regular fa-trash-can';\r\n default: return iconDefault;\r\n }\r\n }\r\n\r\n return icon;\r\n }\r\n}","<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>","import { NgModule } from '@angular/core';\r\nimport { CommonModule } from '@angular/common';\r\nimport { RouterModule } from '@angular/router';\r\nimport { FormsModule, ReactiveFormsModule } from '@angular/forms';\r\n//import { DirectivesModule } from 'src/app/shared/directives/directives.module';\r\n//import { PipesModule } from 'src/app/shared/pipes/pipes.module';\r\n\r\n//Angular Material\r\n//import { MatButtonModule } from '@angular/material/button';\r\n//import { MatCheckboxModule } from '@angular/material/checkbox';\r\n//import { MatInputModule } from '@angular/material/input';\r\n//import { MatFormFieldModule } from '@angular/material/form-field';\r\n//import { MatSlideToggleModule } from '@angular/material/slide-toggle';\r\n//import { MatTabsModule } from '@angular/material/tabs';\r\n\r\n//Components\r\nimport { CoerAlert } from './coer-alert/coer-alert.component';\r\n//import { CoerButton } from './coer-button/coer-button.component';\r\n//import { CoerCheckbox } from './coer-checkbox/coer-checkbox.component';\r\n//import { CoerFilebox } from './coer-filebox/coer-filebox.component';\r\n//import { CoerForm } from './coer-form/coer-form.component';\r\n//import { CoerGrid } from './coer-grid/coer-grid.component';\r\n//import { CoerModal } from './coer-modal/coer-modal.component';\r\n//import { CoerNumberBox } from './coer-numberbox/coer-numberbox.component';\r\n//import { CoerPageTitle } from './coer-page-title/coer-page-title.component';\r\n//import { CoerSelectbox } from './coer-selectbox/coer-selectbox.component';\r\n//import { CoerSwitch } from './coer-switch/coer-switch.component';\r\n//import { CoerTab } from './coer-tab/coer-tab.component';\r\n//import { CoerTextarea } from './coer-textarea/coer-textarea.component';\r\n//import { CoerTextBox } from './coer-textbox/coer-textbox.component';\r\n\r\n@NgModule({\r\n imports: [\r\n CommonModule,\r\n RouterModule,\r\n FormsModule,\r\n ReactiveFormsModule,\r\n //PipesModule,\r\n //MatButtonModule,\r\n //MatCheckboxModule,\r\n //MatInputModule,\r\n //MatFormFieldModule,\r\n //MatSlideToggleModule,\r\n //MatTabsModule,\r\n //DirectivesModule\r\n ],\r\n declarations: [\r\n CoerAlert,\r\n //CoerButton,\r\n //CoerCheckbox,\r\n //CoerFilebox,\r\n //CoerForm,\r\n //CoerGrid,\r\n //CoerModal,\r\n //CoerNumberBox,\r\n //CoerPageTitle,\r\n //CoerSelectbox,\r\n //CoerSwitch,\r\n //CoerTextarea,\r\n //CoerTab,\r\n //CoerTextBox,\r\n ],\r\n exports: [\r\n CoerAlert,\r\n //CoerButton,\r\n //CoerCheckbox,\r\n //CoerFilebox,\r\n //CoerForm,\r\n //CoerGrid,\r\n //CoerModal,\r\n //CoerNumberBox,\r\n //CoerPageTitle,\r\n //CoerSelectbox,\r\n //CoerSwitch,\r\n //CoerTextarea,\r\n //CoerTab,\r\n //CoerTextBox,\r\n ]\r\n})\r\nexport class ComponentsModule { }\r\n//export * from './coer-alert/coer-alert.component';\r\n//export * from './coer-button/coer-button.component';\r\n//export * from './coer-checkbox/coer-checkbox.component';\r\n//export * from './coer-filebox/coer-filebox.component';\r\n//export * from './coer-filebox/coer-filebox.interface';\r\n//export * from './coer-form/coer-form.component';\r\n//export * from './coer-grid/coer-grid.component';\r\n//export * from './coer-grid/coer-grid.interface';\r\n//export * from './coer-grid/coer-grid.templates';\r\n//export * from './coer-modal/coer-modal.component';\r\n//export * from './coer-numberbox/coer-numberbox.component';\r\n//export * from './coer-page-title/coer-page-title.component';\r\n//export * from './coer-page-title/pageTitle.interface';\r\n//export * from './coer-selectbox/coer-selectbox.component';\r\n//export * from './coer-switch/coer-switch.component';\r\n//export * from './coer-tab/coer-tab.component';\r\n//export * from './coer-textbox/coer-textbox.component';","import { ControlValueAccessor, NG_VALUE_ACCESSOR } from \"@angular/forms\";\r\nimport { forwardRef } from \"@angular/core\";\r\n\r\nexport const CONTROL_VALUE = <T>(component: T) => {\r\n return {\r\n provide: NG_VALUE_ACCESSOR,\r\n useExisting: forwardRef(() => component),\r\n multi: true\r\n }\r\n}\r\n\r\n\r\nexport class ControlValue implements ControlValueAccessor {\r\n\r\n //Variables\r\n protected _value: any;\r\n private _isTouched: boolean = false;\r\n protected _UpdateValue!: Function;\r\n private _IsTouched!: Function;\r\n\r\n\r\n public get isTouched() {\r\n return this._isTouched;\r\n }\r\n\r\n\r\n /** */\r\n protected SetValue(value: any): void {\r\n if(typeof this._UpdateValue === 'function') {\r\n this._UpdateValue(value);\r\n }\r\n\r\n this._value = value;\r\n }\r\n\r\n\r\n /** */\r\n public SetTouched(isTouched: boolean): void {\r\n if(typeof this._IsTouched === 'function') {\r\n this._IsTouched(isTouched);\r\n }\r\n\r\n this._isTouched = isTouched;\r\n }\r\n\r\n\r\n /** */\r\n public writeValue(value: any): void {\r\n this._value = value;\r\n }\r\n\r\n\r\n /** */\r\n public registerOnChange(callback: Function): void {\r\n this._UpdateValue = callback;\r\n }\r\n\r\n\r\n /** */\r\n public registerOnTouched(callback: Function): void {\r\n this._IsTouched = callback;\r\n }\r\n\r\n \r\n /** */\r\n public setDisabledState(isDisabled: boolean): void {}\r\n}","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":[],"mappings":";;;;;;;;MASa,SAAS,CAAA;;IAGX,OAAO,CAAC,OAAyB,GAAA,IAAI,EAAE,KAAA,GAAuB,IAAI,EAAE,IAAsB,GAAA,IAAI,EAAE,QAAA,GAA0B,IAAI,EAAA;;AAEjI,QAAA,IAAI,CAAC,KAAK,IAAI,KAAK,IAAI,EAAE;YAAE,KAAK,GAAG,SAAS,CAAC;QAC7C,MAAM,iBAAiB,GAAG,QAAQ,CAAC,cAAc,CAAC,qBAAqB,CAAE,CAAC;AAC1E,QAAA,iBAAiB,CAAC,WAAW,GAAG,KAAK,CAAC;;QAGtC,IAAI,GAAG,IAAI,CAAC,OAAO,CAAC,KAAK,EAAE,IAAI,EAAE,yBAAyB,CAAC,CAAC;QAC5D,MAAM,gBAAgB,GAAG,QAAQ,CAAC,cAAc,CAAC,oBAAoB,CAAE,CAAC;AACxE,QAAA,IAAI,CAAC,OAAO,CAAC,gBAAgB,EAAE,IAAI,CAAC,CAAC;;AAGrC,QAAA,IAAI,CAAC,OAAO;YAAE,OAAO,GAAG,EAAE,CAAC;QAC3B,MAAM,mBAAmB,GAAG,QAAQ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,IAAA,UAAU,CAAC,KAAU,EAAA;AACxB,QAAA,IAAI,CAAC,MAAM,GAAG,KAAK,CAAC;KACvB;;AAIM,IAAA,gBAAgB,CAAC,QAAkB,EAAA;AACtC,QAAA,IAAI,CAAC,YAAY,GAAG,QAAQ,CAAC;KAChC;;AAIM,IAAA,iBAAiB,CAAC,QAAkB,EAAA;AACvC,QAAA,IAAI,CAAC,UAAU,GAAG,QAAQ,CAAC;KAC9B;;IAIM,gBAAgB,CAAC,UAAmB,EAAA,GAAU;AACxD;;AClED;;AAEG;;;;"}
|
package/package.json
CHANGED
package/public_api.d.ts
CHANGED
package/tools/index.d.ts
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
export * from './lib/controlValue';
|
@@ -0,0 +1,25 @@
|
|
1
|
+
import { ControlValueAccessor } from "@angular/forms";
|
2
|
+
export declare const CONTROL_VALUE: <T>(component: T) => {
|
3
|
+
provide: import("@angular/core").InjectionToken<readonly ControlValueAccessor[]>;
|
4
|
+
useExisting: import("@angular/core").Type<any>;
|
5
|
+
multi: boolean;
|
6
|
+
};
|
7
|
+
export declare class ControlValue implements ControlValueAccessor {
|
8
|
+
protected _value: any;
|
9
|
+
private _isTouched;
|
10
|
+
protected _UpdateValue: Function;
|
11
|
+
private _IsTouched;
|
12
|
+
get isTouched(): boolean;
|
13
|
+
/** */
|
14
|
+
protected SetValue(value: any): void;
|
15
|
+
/** */
|
16
|
+
SetTouched(isTouched: boolean): void;
|
17
|
+
/** */
|
18
|
+
writeValue(value: any): void;
|
19
|
+
/** */
|
20
|
+
registerOnChange(callback: Function): void;
|
21
|
+
/** */
|
22
|
+
registerOnTouched(callback: Function): void;
|
23
|
+
/** */
|
24
|
+
setDisabledState(isDisabled: boolean): void;
|
25
|
+
}
|