ng-tailwind 2.24.310 → 2.24.314
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/README.md +24 -24
- package/animations/ngt-angular-animations.d.ts +5 -5
- package/base/ngt-base-ng-model.d.ts +32 -32
- package/bundles/ng-tailwind.umd.js +7318 -7271
- package/bundles/ng-tailwind.umd.js.map +1 -1
- package/components/ngt-action/ngt-action.component.d.ts +13 -13
- package/components/ngt-action/ngt-action.module.d.ts +2 -2
- package/components/ngt-button/ngt-button.component.d.ts +22 -22
- package/components/ngt-button/ngt-button.module.d.ts +2 -2
- package/components/ngt-checkbox/ngt-checkbox.component.d.ts +41 -41
- package/components/ngt-checkbox/ngt-checkbox.module.d.ts +2 -2
- package/components/ngt-content/ngt-content.component.d.ts +9 -9
- package/components/ngt-content/ngt-content.module.d.ts +2 -2
- package/components/ngt-datatable/ngt-datatable.component.d.ts +112 -112
- package/components/ngt-datatable/ngt-datatable.module.d.ts +2 -2
- package/components/ngt-datatable/ngt-tbody/ngt-tbody.component.d.ts +11 -11
- package/components/ngt-datatable/ngt-td/ngt-td.component.d.ts +11 -11
- package/components/ngt-datatable/ngt-td-check/ngt-td-check.component.d.ts +24 -24
- package/components/ngt-datatable/ngt-th/ngt-th.component.d.ts +47 -47
- package/components/ngt-datatable/ngt-th-check/ngt-th-check.component.d.ts +19 -19
- package/components/ngt-datatable/ngt-thead/ngt-thead.component.d.ts +10 -10
- package/components/ngt-datatable/ngt-tr/ngt-tr.component.d.ts +17 -17
- package/components/ngt-date/ngt-date.component.d.ts +71 -71
- package/components/ngt-date/ngt-date.module.d.ts +2 -2
- package/components/ngt-dropdown/ngt-dropdown-container/ngt-dropdown-container.component.d.ts +5 -5
- package/components/ngt-dropdown/ngt-dropdown.component.d.ts +42 -42
- package/components/ngt-dropdown/ngt-dropdown.module.d.ts +2 -2
- package/components/ngt-dropzone/custom-dropzone-preview/custom-dropzone-preview.component.d.ts +11 -11
- package/components/ngt-dropzone/ngt-dropzone-file-viewer/ngt-dropzone-file-viewer.component.d.ts +12 -12
- package/components/ngt-dropzone/ngt-dropzone-view/ngt-dropzone-view.component.d.ts +21 -21
- package/components/ngt-dropzone/ngt-dropzone.component.d.ts +103 -103
- package/components/ngt-dropzone/ngt-dropzone.module.d.ts +2 -2
- package/components/ngt-floating-button/ngt-floating-button.component.d.ts +32 -32
- package/components/ngt-floating-button/ngt-floating-button.module.d.ts +2 -2
- package/components/ngt-form/ngt-form-validation-message/ngt-form-validation-message.component.d.ts +7 -7
- package/components/ngt-form/ngt-form-validation-message/ngt-form-validation-message.module.d.ts +2 -2
- package/components/ngt-form/ngt-form.component.d.ts +52 -52
- package/components/ngt-form/ngt-form.module.d.ts +2 -2
- package/components/ngt-header-nav/ngt-header-nav.component.d.ts +11 -11
- package/components/ngt-header-nav/ngt-header-nav.module.d.ts +2 -2
- package/components/ngt-helper/ngt-helper.component.d.ts +15 -10
- package/components/ngt-helper/ngt-helper.module.d.ts +2 -2
- package/components/ngt-input/ngt-input.component.d.ts +92 -92
- package/components/ngt-input/ngt-input.module.d.ts +2 -2
- package/components/ngt-modal/ngt-modal-body/ngt-modal-body.component.d.ts +2 -2
- package/components/ngt-modal/ngt-modal-footer/ngt-modal-footer.component.d.ts +2 -2
- package/components/ngt-modal/ngt-modal-header/ngt-modal-header.component.d.ts +12 -12
- package/components/ngt-modal/ngt-modal.component.d.ts +19 -19
- package/components/ngt-modal/ngt-modal.module.d.ts +2 -2
- package/components/ngt-multi-select/ngt-multi-select.component.d.ts +97 -97
- package/components/ngt-multi-select/ngt-multi-select.module.d.ts +2 -2
- package/components/ngt-pagination/ngt-pagination.component.d.ts +40 -40
- package/components/ngt-pagination/ngt-pagination.module.d.ts +2 -2
- package/components/ngt-portlet/ngt-portlet-body/ngt-portlet-body.component.d.ts +9 -9
- package/components/ngt-portlet/ngt-portlet-footer/ngt-portlet-footer.component.d.ts +9 -9
- package/components/ngt-portlet/ngt-portlet-header/ngt-portlet-header.component.d.ts +14 -14
- package/components/ngt-portlet/ngt-portlet.component.d.ts +17 -17
- package/components/ngt-portlet/ngt-portlet.module.d.ts +2 -2
- package/components/ngt-radio-button/ngt-radio-button-container/ngt-radio-button-container.component.d.ts +6 -6
- package/components/ngt-radio-button/ngt-radio-button.component.d.ts +27 -27
- package/components/ngt-radio-button/ngt-radio-button.module.d.ts +2 -2
- package/components/ngt-section/ngt-section.component.d.ts +23 -23
- package/components/ngt-section/ngt-section.module.d.ts +2 -2
- package/components/ngt-select/ngt-select.component.d.ts +122 -122
- package/components/ngt-select/ngt-select.directive.d.ts +13 -13
- package/components/ngt-select/ngt-select.module.d.ts +2 -2
- package/components/ngt-shining/ngt-shining.component.d.ts +16 -16
- package/components/ngt-shining/ngt-shining.module.d.ts +2 -2
- package/components/ngt-sidenav/ngt-sidenav.component.d.ts +29 -29
- package/components/ngt-sidenav/ngt-sidenav.module.d.ts +2 -2
- package/components/ngt-slider/ngt-slider.component.d.ts +31 -31
- package/components/ngt-slider/ngt-slider.module.d.ts +2 -2
- package/components/ngt-svg/ngt-svg.component.d.ts +10 -10
- package/components/ngt-svg/ngt-svg.module.d.ts +2 -2
- package/components/ngt-tag/ngt-tag.component.d.ts +10 -10
- package/components/ngt-tag/ngt-tag.module.d.ts +2 -2
- package/components/ngt-textarea/ngt-textarea.component.d.ts +46 -46
- package/components/ngt-textarea/ngt-textarea.module.d.ts +2 -2
- package/components/ngt-validation/ngt-validation.component.d.ts +10 -10
- package/components/ngt-validation/ngt-validation.module.d.ts +2 -2
- package/directives/ngt-stylizable/ngt-stylizable.directive.d.ts +65 -63
- package/directives/ngt-stylizable/ngt-stylizable.module.d.ts +2 -2
- package/enums/size.enum.d.ts +8 -8
- package/esm2015/animations/ngt-angular-animations.js +34 -34
- package/esm2015/base/ngt-base-ng-model.js +90 -90
- package/esm2015/components/ngt-action/ngt-action.component.js +49 -49
- package/esm2015/components/ngt-action/ngt-action.module.js +19 -19
- package/esm2015/components/ngt-button/ngt-button.component.js +106 -106
- package/esm2015/components/ngt-button/ngt-button.module.js +19 -19
- package/esm2015/components/ngt-checkbox/ngt-checkbox.component.js +137 -137
- package/esm2015/components/ngt-checkbox/ngt-checkbox.module.js +19 -19
- package/esm2015/components/ngt-content/ngt-content.component.js +33 -33
- package/esm2015/components/ngt-content/ngt-content.module.js +15 -15
- package/esm2015/components/ngt-datatable/ngt-datatable.component.js +400 -400
- package/esm2015/components/ngt-datatable/ngt-datatable.module.js +58 -58
- package/esm2015/components/ngt-datatable/ngt-tbody/ngt-tbody.component.js +58 -60
- package/esm2015/components/ngt-datatable/ngt-td/ngt-td.component.js +63 -63
- package/esm2015/components/ngt-datatable/ngt-td-check/ngt-td-check.component.js +102 -102
- package/esm2015/components/ngt-datatable/ngt-th/ngt-th.component.js +192 -192
- package/esm2015/components/ngt-datatable/ngt-th-check/ngt-th-check.component.js +87 -87
- package/esm2015/components/ngt-datatable/ngt-thead/ngt-thead.component.js +56 -58
- package/esm2015/components/ngt-datatable/ngt-tr/ngt-tr.component.js +76 -76
- package/esm2015/components/ngt-date/ngt-date.component.js +354 -352
- package/esm2015/components/ngt-date/ngt-date.module.js +25 -25
- package/esm2015/components/ngt-dropdown/ngt-dropdown-container/ngt-dropdown-container.component.js +20 -20
- package/esm2015/components/ngt-dropdown/ngt-dropdown.component.js +165 -165
- package/esm2015/components/ngt-dropdown/ngt-dropdown.module.js +16 -16
- package/esm2015/components/ngt-dropzone/custom-dropzone-preview/custom-dropzone-preview.component.js +47 -47
- package/esm2015/components/ngt-dropzone/ngt-dropzone-file-viewer/ngt-dropzone-file-viewer.component.js +46 -45
- package/esm2015/components/ngt-dropzone/ngt-dropzone-view/ngt-dropzone-view.component.js +67 -67
- package/esm2015/components/ngt-dropzone/ngt-dropzone.component.js +411 -411
- package/esm2015/components/ngt-dropzone/ngt-dropzone.module.js +37 -37
- package/esm2015/components/ngt-floating-button/ngt-floating-button.component.js +94 -94
- package/esm2015/components/ngt-floating-button/ngt-floating-button.module.js +19 -19
- package/esm2015/components/ngt-form/ngt-form-validation-message/ngt-form-validation-message.component.js +23 -23
- package/esm2015/components/ngt-form/ngt-form-validation-message/ngt-form-validation-message.module.js +15 -15
- package/esm2015/components/ngt-form/ngt-form.component.js +181 -181
- package/esm2015/components/ngt-form/ngt-form.module.js +17 -17
- package/esm2015/components/ngt-header-nav/ngt-header-nav.component.js +38 -38
- package/esm2015/components/ngt-header-nav/ngt-header-nav.module.js +15 -15
- package/esm2015/components/ngt-helper/ngt-helper.component.js +44 -24
- package/esm2015/components/ngt-helper/ngt-helper.module.js +19 -19
- package/esm2015/components/ngt-input/ngt-input.component.js +610 -608
- package/esm2015/components/ngt-input/ngt-input.module.js +28 -28
- package/esm2015/components/ngt-modal/ngt-modal-body/ngt-modal-body.component.js +11 -11
- package/esm2015/components/ngt-modal/ngt-modal-footer/ngt-modal-footer.component.js +11 -11
- package/esm2015/components/ngt-modal/ngt-modal-header/ngt-modal-header.component.js +40 -40
- package/esm2015/components/ngt-modal/ngt-modal.component.js +79 -79
- package/esm2015/components/ngt-modal/ngt-modal.module.js +28 -28
- package/esm2015/components/ngt-multi-select/ngt-multi-select.component.js +392 -392
- package/esm2015/components/ngt-multi-select/ngt-multi-select.module.js +33 -33
- package/esm2015/components/ngt-pagination/ngt-pagination.component.js +172 -172
- package/esm2015/components/ngt-pagination/ngt-pagination.module.js +23 -23
- package/esm2015/components/ngt-portlet/ngt-portlet-body/ngt-portlet-body.component.js +32 -32
- package/esm2015/components/ngt-portlet/ngt-portlet-footer/ngt-portlet-footer.component.js +33 -33
- package/esm2015/components/ngt-portlet/ngt-portlet-header/ngt-portlet-header.component.js +47 -45
- package/esm2015/components/ngt-portlet/ngt-portlet.component.js +58 -58
- package/esm2015/components/ngt-portlet/ngt-portlet.module.js +32 -32
- package/esm2015/components/ngt-radio-button/ngt-radio-button-container/ngt-radio-button-container.component.js +19 -19
- package/esm2015/components/ngt-radio-button/ngt-radio-button.component.js +97 -97
- package/esm2015/components/ngt-radio-button/ngt-radio-button.module.js +18 -18
- package/esm2015/components/ngt-section/ngt-section.component.js +98 -98
- package/esm2015/components/ngt-section/ngt-section.module.js +21 -21
- package/esm2015/components/ngt-select/ngt-select.component.js +467 -465
- package/esm2015/components/ngt-select/ngt-select.directive.js +35 -35
- package/esm2015/components/ngt-select/ngt-select.module.js +40 -40
- package/esm2015/components/ngt-shining/ngt-shining.component.js +41 -41
- package/esm2015/components/ngt-shining/ngt-shining.module.js +15 -15
- package/esm2015/components/ngt-sidenav/ngt-sidenav.component.js +123 -123
- package/esm2015/components/ngt-sidenav/ngt-sidenav.module.js +15 -15
- package/esm2015/components/ngt-slider/ngt-slider.component.js +82 -82
- package/esm2015/components/ngt-slider/ngt-slider.module.js +17 -17
- package/esm2015/components/ngt-svg/ngt-svg.component.js +52 -52
- package/esm2015/components/ngt-svg/ngt-svg.module.js +19 -19
- package/esm2015/components/ngt-tag/ngt-tag.component.js +36 -36
- package/esm2015/components/ngt-tag/ngt-tag.module.js +17 -17
- package/esm2015/components/ngt-textarea/ngt-textarea.component.js +211 -209
- package/esm2015/components/ngt-textarea/ngt-textarea.module.js +24 -24
- package/esm2015/components/ngt-validation/ngt-validation.component.js +24 -24
- package/esm2015/components/ngt-validation/ngt-validation.module.js +15 -15
- package/esm2015/directives/ngt-stylizable/ngt-stylizable.directive.js +227 -220
- package/esm2015/directives/ngt-stylizable/ngt-stylizable.module.js +15 -15
- package/esm2015/enums/size.enum.js +11 -11
- package/esm2015/helpers/enum/enum.js +7 -7
- package/esm2015/helpers/form/form.js +14 -14
- package/esm2015/helpers/routing/route.js +11 -11
- package/esm2015/helpers/uuid.js +10 -10
- package/esm2015/ng-tailwind.js +10 -10
- package/esm2015/public-api.js +117 -117
- package/esm2015/services/http/ngt-attachment-http.service.js +3 -3
- package/esm2015/services/http/ngt-http-form.service.js +3 -3
- package/esm2015/services/http/ngt-http-resource.service.js +3 -3
- package/esm2015/services/http/ngt-http-validation.service.js +4 -4
- package/esm2015/services/http/ngt-http.service.js +3 -3
- package/esm2015/services/http/ngt-translate.service.js +3 -3
- package/esm2015/services/ngt-stylizable/ngt-stylizable.service.js +273 -266
- package/fesm2015/ng-tailwind.js +6404 -6365
- package/fesm2015/ng-tailwind.js.map +1 -1
- package/helpers/enum/enum.d.ts +1 -1
- package/helpers/form/form.d.ts +4 -4
- package/helpers/routing/route.d.ts +2 -2
- package/helpers/uuid.d.ts +1 -1
- package/ng-tailwind.d.ts +10 -10
- package/ng-tailwind.metadata.json +1 -1
- package/package.json +1 -1
- package/public-api.d.ts +80 -80
- package/services/http/ngt-attachment-http.service.d.ts +10 -10
- package/services/http/ngt-http-form.service.d.ts +5 -5
- package/services/http/ngt-http-resource.service.d.ts +12 -12
- package/services/http/ngt-http-validation.service.d.ts +10 -10
- package/services/http/ngt-http.service.d.ts +27 -27
- package/services/http/ngt-translate.service.d.ts +27 -27
- package/services/ngt-stylizable/ngt-stylizable.service.d.ts +96 -93
|
@@ -1,106 +1,106 @@
|
|
|
1
|
-
import { Component, Injector, Input, Optional, Self, SkipSelf } from '@angular/core';
|
|
2
|
-
import { NgtStylizableDirective } from '../../directives/ngt-stylizable/ngt-stylizable.directive';
|
|
3
|
-
import { NgtStylizableService } from '../../services/ngt-stylizable/ngt-stylizable.service';
|
|
4
|
-
import { NgtFormComponent } from '../ngt-form/ngt-form.component';
|
|
5
|
-
export class NgtButtonComponent {
|
|
6
|
-
constructor(ngtFormComponent, injector, ngtStylizableDirective) {
|
|
7
|
-
this.ngtFormComponent = ngtFormComponent;
|
|
8
|
-
this.injector = injector;
|
|
9
|
-
this.ngtStylizableDirective = ngtStylizableDirective;
|
|
10
|
-
this.link = false;
|
|
11
|
-
this.type = 'success';
|
|
12
|
-
this.loading = false;
|
|
13
|
-
this.isDisabled = false;
|
|
14
|
-
this.noSubmit = false;
|
|
15
|
-
this.subscriptions = [];
|
|
16
|
-
if (this.ngtStylizableDirective) {
|
|
17
|
-
this.ngtStyle = this.ngtStylizableDirective.getNgtStylizableService();
|
|
18
|
-
}
|
|
19
|
-
else {
|
|
20
|
-
this.ngtStyle = new NgtStylizableService();
|
|
21
|
-
}
|
|
22
|
-
if (this.ngtFormComponent) {
|
|
23
|
-
this.subscriptions.push(this.ngtFormComponent.onLoadingChange.subscribe((loading) => {
|
|
24
|
-
this.loading = loading;
|
|
25
|
-
}));
|
|
26
|
-
}
|
|
27
|
-
}
|
|
28
|
-
onClick(event) {
|
|
29
|
-
if (this.isDisabled || this.loading) {
|
|
30
|
-
event.preventDefault();
|
|
31
|
-
event.stopPropagation();
|
|
32
|
-
}
|
|
33
|
-
}
|
|
34
|
-
ngOnChanges(changes) {
|
|
35
|
-
if (changes.type) {
|
|
36
|
-
if (changes.type.currentValue == 'success') {
|
|
37
|
-
this.ngtStyle.load(this.injector, 'NgtSuccessButton', {
|
|
38
|
-
color: {
|
|
39
|
-
bg: 'bg-green-500',
|
|
40
|
-
text: 'text-white text-sm',
|
|
41
|
-
},
|
|
42
|
-
px: 'px-4',
|
|
43
|
-
py: 'py-2'
|
|
44
|
-
});
|
|
45
|
-
}
|
|
46
|
-
else if (changes.type.currentValue == 'warning') {
|
|
47
|
-
this.ngtStyle.load(this.injector, 'NgtWarningButton', {
|
|
48
|
-
color: {
|
|
49
|
-
bg: 'bg-orange-500',
|
|
50
|
-
text: 'text-white text-sm',
|
|
51
|
-
},
|
|
52
|
-
px: 'px-4',
|
|
53
|
-
py: 'py-2'
|
|
54
|
-
});
|
|
55
|
-
}
|
|
56
|
-
else if (changes.type.currentValue == 'danger') {
|
|
57
|
-
this.ngtStyle.load(this.injector, 'NgtDangerButton', {
|
|
58
|
-
color: {
|
|
59
|
-
bg: 'bg-red-500',
|
|
60
|
-
text: 'text-white text-sm',
|
|
61
|
-
},
|
|
62
|
-
px: 'px-4',
|
|
63
|
-
py: 'py-2'
|
|
64
|
-
});
|
|
65
|
-
}
|
|
66
|
-
else {
|
|
67
|
-
this.ngtStyle.load(this.injector, 'NgtInfoButton', {
|
|
68
|
-
color: {
|
|
69
|
-
bg: 'bg-blue-500',
|
|
70
|
-
text: 'text-white text-sm',
|
|
71
|
-
},
|
|
72
|
-
px: 'px-4',
|
|
73
|
-
py: 'py-2'
|
|
74
|
-
});
|
|
75
|
-
}
|
|
76
|
-
}
|
|
77
|
-
}
|
|
78
|
-
ngOnDestroy() {
|
|
79
|
-
this.destroySubscriptions();
|
|
80
|
-
}
|
|
81
|
-
destroySubscriptions() {
|
|
82
|
-
this.subscriptions.forEach(subscription => subscription.unsubscribe());
|
|
83
|
-
this.subscriptions = [];
|
|
84
|
-
}
|
|
85
|
-
}
|
|
86
|
-
NgtButtonComponent.decorators = [
|
|
87
|
-
{ type: Component, args: [{
|
|
88
|
-
selector: 'ngt-button',
|
|
89
|
-
template: "<ng-template #content>\n <ng-content></ng-content>\n</ng-template>\n\n<div class=\"h-full w-full\" (click)='onClick($event)'>\n <ng-container *ngIf='!link'>\n <button [ngClass]=\"{ 'disabled-button': isDisabled, 'loading-button': loading }\" [disabled]=\"isDisabled\"\n [type]=\"(loading || isDisabled || noSubmit) ? 'button' : 'submit'\"\n class=\"flex justify-center items-center h-full w-full focus:outline-none rounded cursor-pointer {{ ngtStyle.compile(['color.bg', 'color.text', 'color.border', 'px', 'py', 'border']) }}\">\n <ng-container *ngTemplateOutlet=\"content\"></ng-container>\n\n <span *ngIf=\"loading\" class=\"ml-2\">\n <div class=\"div-loader h-5 w-5\"></div>\n </span>\n </button>\n </ng-container>\n\n <ng-container *ngIf='link'>\n <a [routerLink]='href ? href : null' [ngClass]=\"{ 'disabled-button': isDisabled, 'loading-button': loading }\"\n class=\"flex justify-center items-center h-full w-full focus:outline-none rounded cursor-pointer {{ ngtStyle.compile(['color.bg', 'color.text', 'color.border', 'px', 'py', 'border']) }}\">\n <span class=\"w-full\">\n <ng-container *ngTemplateOutlet=\"content\"></ng-container>\n </span>\n\n <span *ngIf=\"loading\" class=\"ml-1\">\n <div class=\"div-loader\"></div>\n </span>\n </a>\n </ng-container>\n</div>",
|
|
90
|
-
styles: [".disabled-button{opacity:.5!important;cursor:not-allowed!important}.loading-button{opacity:.5!important;cursor:wait!important}.div-loader{border:3px solid #edf2f738;border-top-color:#edf2f7;border-radius:50%;-webkit-animation:spin 1s linear infinite;animation:spin 1s linear infinite}@-webkit-keyframes spin{to{transform:rotate(1turn)}}@keyframes spin{to{transform:rotate(1turn)}}"]
|
|
91
|
-
},] }
|
|
92
|
-
];
|
|
93
|
-
NgtButtonComponent.ctorParameters = () => [
|
|
94
|
-
{ type: NgtFormComponent, decorators: [{ type: Optional }, { type: SkipSelf }] },
|
|
95
|
-
{ type: Injector },
|
|
96
|
-
{ type: NgtStylizableDirective, decorators: [{ type: Self }, { type: Optional }] }
|
|
97
|
-
];
|
|
98
|
-
NgtButtonComponent.propDecorators = {
|
|
99
|
-
link: [{ type: Input }],
|
|
100
|
-
href: [{ type: Input }],
|
|
101
|
-
type: [{ type: Input }],
|
|
102
|
-
loading: [{ type: Input }],
|
|
103
|
-
isDisabled: [{ type: Input }],
|
|
104
|
-
noSubmit: [{ type: Input }]
|
|
105
|
-
};
|
|
106
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
1
|
+
import { Component, Injector, Input, Optional, Self, SkipSelf } from '@angular/core';
|
|
2
|
+
import { NgtStylizableDirective } from '../../directives/ngt-stylizable/ngt-stylizable.directive';
|
|
3
|
+
import { NgtStylizableService } from '../../services/ngt-stylizable/ngt-stylizable.service';
|
|
4
|
+
import { NgtFormComponent } from '../ngt-form/ngt-form.component';
|
|
5
|
+
export class NgtButtonComponent {
|
|
6
|
+
constructor(ngtFormComponent, injector, ngtStylizableDirective) {
|
|
7
|
+
this.ngtFormComponent = ngtFormComponent;
|
|
8
|
+
this.injector = injector;
|
|
9
|
+
this.ngtStylizableDirective = ngtStylizableDirective;
|
|
10
|
+
this.link = false;
|
|
11
|
+
this.type = 'success';
|
|
12
|
+
this.loading = false;
|
|
13
|
+
this.isDisabled = false;
|
|
14
|
+
this.noSubmit = false;
|
|
15
|
+
this.subscriptions = [];
|
|
16
|
+
if (this.ngtStylizableDirective) {
|
|
17
|
+
this.ngtStyle = this.ngtStylizableDirective.getNgtStylizableService();
|
|
18
|
+
}
|
|
19
|
+
else {
|
|
20
|
+
this.ngtStyle = new NgtStylizableService();
|
|
21
|
+
}
|
|
22
|
+
if (this.ngtFormComponent) {
|
|
23
|
+
this.subscriptions.push(this.ngtFormComponent.onLoadingChange.subscribe((loading) => {
|
|
24
|
+
this.loading = loading;
|
|
25
|
+
}));
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
onClick(event) {
|
|
29
|
+
if (this.isDisabled || this.loading) {
|
|
30
|
+
event.preventDefault();
|
|
31
|
+
event.stopPropagation();
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
ngOnChanges(changes) {
|
|
35
|
+
if (changes.type) {
|
|
36
|
+
if (changes.type.currentValue == 'success') {
|
|
37
|
+
this.ngtStyle.load(this.injector, 'NgtSuccessButton', {
|
|
38
|
+
color: {
|
|
39
|
+
bg: 'bg-green-500',
|
|
40
|
+
text: 'text-white text-sm',
|
|
41
|
+
},
|
|
42
|
+
px: 'px-4',
|
|
43
|
+
py: 'py-2'
|
|
44
|
+
});
|
|
45
|
+
}
|
|
46
|
+
else if (changes.type.currentValue == 'warning') {
|
|
47
|
+
this.ngtStyle.load(this.injector, 'NgtWarningButton', {
|
|
48
|
+
color: {
|
|
49
|
+
bg: 'bg-orange-500',
|
|
50
|
+
text: 'text-white text-sm',
|
|
51
|
+
},
|
|
52
|
+
px: 'px-4',
|
|
53
|
+
py: 'py-2'
|
|
54
|
+
});
|
|
55
|
+
}
|
|
56
|
+
else if (changes.type.currentValue == 'danger') {
|
|
57
|
+
this.ngtStyle.load(this.injector, 'NgtDangerButton', {
|
|
58
|
+
color: {
|
|
59
|
+
bg: 'bg-red-500',
|
|
60
|
+
text: 'text-white text-sm',
|
|
61
|
+
},
|
|
62
|
+
px: 'px-4',
|
|
63
|
+
py: 'py-2'
|
|
64
|
+
});
|
|
65
|
+
}
|
|
66
|
+
else {
|
|
67
|
+
this.ngtStyle.load(this.injector, 'NgtInfoButton', {
|
|
68
|
+
color: {
|
|
69
|
+
bg: 'bg-blue-500',
|
|
70
|
+
text: 'text-white text-sm',
|
|
71
|
+
},
|
|
72
|
+
px: 'px-4',
|
|
73
|
+
py: 'py-2'
|
|
74
|
+
});
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
ngOnDestroy() {
|
|
79
|
+
this.destroySubscriptions();
|
|
80
|
+
}
|
|
81
|
+
destroySubscriptions() {
|
|
82
|
+
this.subscriptions.forEach(subscription => subscription.unsubscribe());
|
|
83
|
+
this.subscriptions = [];
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
NgtButtonComponent.decorators = [
|
|
87
|
+
{ type: Component, args: [{
|
|
88
|
+
selector: 'ngt-button',
|
|
89
|
+
template: "<ng-template #content>\r\n <ng-content></ng-content>\r\n</ng-template>\r\n\r\n<div class=\"h-full w-full\" (click)='onClick($event)'>\r\n <ng-container *ngIf='!link'>\r\n <button [ngClass]=\"{ 'disabled-button': isDisabled, 'loading-button': loading }\" [disabled]=\"isDisabled\"\r\n [type]=\"(loading || isDisabled || noSubmit) ? 'button' : 'submit'\"\r\n class=\"flex justify-center items-center h-full w-full focus:outline-none rounded cursor-pointer {{ ngtStyle.compile(['color.bg', 'color.text', 'color.border', 'px', 'py', 'border']) }}\">\r\n <ng-container *ngTemplateOutlet=\"content\"></ng-container>\r\n\r\n <span *ngIf=\"loading\" class=\"ml-2\">\r\n <div class=\"div-loader h-5 w-5\"></div>\r\n </span>\r\n </button>\r\n </ng-container>\r\n\r\n <ng-container *ngIf='link'>\r\n <a [routerLink]='href ? href : null' [ngClass]=\"{ 'disabled-button': isDisabled, 'loading-button': loading }\"\r\n class=\"flex justify-center items-center h-full w-full focus:outline-none rounded cursor-pointer {{ ngtStyle.compile(['color.bg', 'color.text', 'color.border', 'px', 'py', 'border']) }}\">\r\n <span class=\"w-full\">\r\n <ng-container *ngTemplateOutlet=\"content\"></ng-container>\r\n </span>\r\n\r\n <span *ngIf=\"loading\" class=\"ml-1\">\r\n <div class=\"div-loader\"></div>\r\n </span>\r\n </a>\r\n </ng-container>\r\n</div>",
|
|
90
|
+
styles: [".disabled-button{opacity:.5!important;cursor:not-allowed!important}.loading-button{opacity:.5!important;cursor:wait!important}.div-loader{border:3px solid #edf2f738;border-top-color:#edf2f7;border-radius:50%;-webkit-animation:spin 1s linear infinite;animation:spin 1s linear infinite}@-webkit-keyframes spin{to{transform:rotate(1turn)}}@keyframes spin{to{transform:rotate(1turn)}}"]
|
|
91
|
+
},] }
|
|
92
|
+
];
|
|
93
|
+
NgtButtonComponent.ctorParameters = () => [
|
|
94
|
+
{ type: NgtFormComponent, decorators: [{ type: Optional }, { type: SkipSelf }] },
|
|
95
|
+
{ type: Injector },
|
|
96
|
+
{ type: NgtStylizableDirective, decorators: [{ type: Self }, { type: Optional }] }
|
|
97
|
+
];
|
|
98
|
+
NgtButtonComponent.propDecorators = {
|
|
99
|
+
link: [{ type: Input }],
|
|
100
|
+
href: [{ type: Input }],
|
|
101
|
+
type: [{ type: Input }],
|
|
102
|
+
loading: [{ type: Input }],
|
|
103
|
+
isDisabled: [{ type: Input }],
|
|
104
|
+
noSubmit: [{ type: Input }]
|
|
105
|
+
};
|
|
106
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibmd0LWJ1dHRvbi5jb21wb25lbnQuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi9wcm9qZWN0cy9uZy10YWlsd2luZC9zcmMvY29tcG9uZW50cy9uZ3QtYnV0dG9uL25ndC1idXR0b24uY29tcG9uZW50LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sRUFBRSxTQUFTLEVBQUUsUUFBUSxFQUFFLEtBQUssRUFBd0IsUUFBUSxFQUFFL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U3R5bGl6YWJsZVNlcnZpY2UoKTtcclxuICAgICAgICB9XHJcblxyXG4gICAgICAgIGlmICh0aGlzLm5ndEZvcm1Db21wb25lbnQpIHtcclxuICAgICAgICAgICAgdGhpcy5zdWJzY3JpcHRpb25zLnB1c2goXHJcbiAgICAgICAgICAgICAgICB0aGlzLm5ndEZvcm1Db21wb25lbnQub25Mb2FkaW5nQ2hhbmdlLnN1YnNjcmliZSgobG9hZGluZzogYm9vbGVhbikgPT4ge1xyXG4gICAgICAgICAgICAgICAgICAgIHRoaXMubG9hZGluZyA9IGxvYWRpbmc7XHJcbiAgICAgICAgICAgICAgICB9KVxyXG4gICAgICAgICAgICApO1xyXG4gICAgICAgIH1cclxuICAgIH1cclxuXHJcbiAgICBwdWJsaWMgb25DbGljayhldmVudDogRXZlbnQpIHtcclxuICAgICAgICBpZiAodGhpcy5pc0Rpc2FibGVkIHx8IHRoaXMubG9hZGluZykge1xyXG4gICAgICAgICAgICBldmVudC5wcmV2ZW50RGVmYXVsdCgpO1xyXG4gICAgICAgICAgICBldmVudC5zdG9wUHJvcGFnYXRpb24oKTtcclxuICAgICAgICB9XHJcbiAgICB9XHJcblxyXG4gICAgcHVibGljIG5nT25DaGFuZ2VzKGNoYW5nZXM6IFNpbXBsZUNoYW5nZXMpIHtcclxuICAgICAgICBpZiAoY2hhbmdlcy50eXBlKSB7XHJcbiAgICAgICAgICAgIGlmIChjaGFuZ2VzLnR5cGUuY3VycmVudFZhbHVlID09ICdzdWNjZXNzJykge1xyXG4gICAgICAgICAgICAgICAgdGhpcy5uZ3RTdHlsZS5sb2FkKHRoaXMuaW5qZWN0b3IsICdOZ3RTdWNjZXNzQnV0dG9uJywge1xyXG4gICAgICAgICAgICAgICAgICAgIGNvbG9yOiB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGJnOiAnYmctZ3JlZW4tNTAwJyxcclxuICAgICAgICAgICAgICAgICAgICAgICAgdGV4dDogJ3RleHQtd2hpdGUgdGV4dC1zbScsXHJcbiAgICAgICAgICAgICAgICAgICAgfSxcclxuICAgICAgICAgICAgICAgICAgICBweDogJ3B4LTQnLFxyXG4gICAgICAgICAgICAgICAgICAgIHB5OiAncHktMidcclxuICAgICAgICAgICAgICAgIH0pO1xyXG4gICAgICAgICAgICB9IGVsc2UgaWYgKGNoYW5nZXMudHlwZS5jdXJyZW50VmFsdWUgPT0gJ3dhcm5pbmcnKSB7XHJcbiAgICAgICAgICAgICAgICB0aGlzLm5ndFN0eWxlLmxvYWQodGhpcy5pbmplY3RvciwgJ05ndFdhcm5pbmdCdXR0b24nLCB7XHJcbiAgICAgICAgICAgICAgICAgICAgY29sb3I6IHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgYmc6ICdiZy1vcmFuZ2UtNTAwJyxcclxuICAgICAgICAgICAgICAgICAgICAgICAgdGV4dDogJ3RleHQtd2hpdGUgdGV4dC1zbScsXHJcbiAgICAgICAgICAgICAgICAgICAgfSxcclxuICAgICAgICAgICAgICAgICAgICBweDogJ3B4LTQnLFxyXG4gICAgICAgICAgICAgICAgICAgIHB5OiAncHktMidcclxuICAgICAgICAgICAgICAgIH0pO1xyXG4gICAgICAgICAgICB9IGVsc2UgaWYgKGNoYW5nZXMudHlwZS5jdXJyZW50VmFsdWUgPT0gJ2RhbmdlcicpIHtcclxuICAgICAgICAgICAgICAgIHRoaXMubmd0U3R5bGUubG9hZCh0aGlzLmluamVjdG9yLCAnTmd0RGFuZ2VyQnV0dG9uJywge1xyXG4gICAgICAgICAgICAgICAgICAgIGNvbG9yOiB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGJnOiAnYmctcmVkLTUwMCcsXHJcbiAgICAgICAgICAgICAgICAgICAgICAgIHRleHQ6ICd0ZXh0LXdoaXRlIHRleHQtc20nLFxyXG4gICAgICAgICAgICAgICAgICAgIH0sXHJcbiAgICAgICAgICAgICAgICAgICAgcHg6ICdweC00JyxcclxuICAgICAgICAgICAgICAgICAgICBweTogJ3B5LTInXHJcbiAgICAgICAgICAgICAgICB9KTtcclxuICAgICAgICAgICAgfSBlbHNlIHtcclxuICAgICAgICAgICAgICAgIHRoaXMubmd0U3R5bGUubG9hZCh0aGlzLmluamVjdG9yLCAnTmd0SW5mb0J1dHRvbicsIHtcclxuICAgICAgICAgICAgICAgICAgICBjb2xvcjoge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICBiZzogJ2JnLWJsdWUtNTAwJyxcclxuICAgICAgICAgICAgICAgICAgICAgICAgdGV4dDogJ3RleHQtd2hpdGUgdGV4dC1zbScsXHJcbiAgICAgICAgICAgICAgICAgICAgfSxcclxuICAgICAgICAgICAgICAgICAgICBweDogJ3B4LTQnLFxyXG4gICAgICAgICAgICAgICAgICAgIHB5OiAncHktMidcclxuICAgICAgICAgICAgICAgIH0pO1xyXG4gICAgICAgICAgICB9XHJcbiAgICAgICAgfVxyXG4gICAgfVxyXG5cclxuICAgIHB1YmxpYyBuZ09uRGVzdHJveSgpIHtcclxuICAgICAgICB0aGlzLmRlc3Ryb3lTdWJzY3JpcHRpb25zKCk7XHJcbiAgICB9XHJcblxyXG4gICAgcHJpdmF0ZSBkZXN0cm95U3Vic2NyaXB0aW9ucygpIHtcclxuICAgICAgICB0aGlzLnN1YnNjcmlwdGlvbnMuZm9yRWFjaChzdWJzY3JpcHRpb24gPT4gc3Vic2NyaXB0aW9uLnVuc3Vic2NyaWJlKCkpO1xyXG4gICAgICAgIHRoaXMuc3Vic2NyaXB0aW9ucyA9IFtdO1xyXG4gICAgfVxyXG59XHJcbiJdfQ==
|
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
import { CommonModule } from '@angular/common';
|
|
2
|
-
import { NgModule } from '@angular/core';
|
|
3
|
-
import { RouterModule } from '@angular/router';
|
|
4
|
-
import { NgtFormModule } from '../ngt-form/ngt-form.module';
|
|
5
|
-
import { NgtButtonComponent } from './ngt-button.component';
|
|
6
|
-
export class NgtButtonModule {
|
|
7
|
-
}
|
|
8
|
-
NgtButtonModule.decorators = [
|
|
9
|
-
{ type: NgModule, args: [{
|
|
10
|
-
declarations: [NgtButtonComponent],
|
|
11
|
-
exports: [NgtButtonComponent],
|
|
12
|
-
imports: [
|
|
13
|
-
CommonModule,
|
|
14
|
-
RouterModule,
|
|
15
|
-
NgtFormModule
|
|
16
|
-
]
|
|
17
|
-
},] }
|
|
18
|
-
];
|
|
19
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
1
|
+
import { CommonModule } from '@angular/common';
|
|
2
|
+
import { NgModule } from '@angular/core';
|
|
3
|
+
import { RouterModule } from '@angular/router';
|
|
4
|
+
import { NgtFormModule } from '../ngt-form/ngt-form.module';
|
|
5
|
+
import { NgtButtonComponent } from './ngt-button.component';
|
|
6
|
+
export class NgtButtonModule {
|
|
7
|
+
}
|
|
8
|
+
NgtButtonModule.decorators = [
|
|
9
|
+
{ type: NgModule, args: [{
|
|
10
|
+
declarations: [NgtButtonComponent],
|
|
11
|
+
exports: [NgtButtonComponent],
|
|
12
|
+
imports: [
|
|
13
|
+
CommonModule,
|
|
14
|
+
RouterModule,
|
|
15
|
+
NgtFormModule
|
|
16
|
+
]
|
|
17
|
+
},] }
|
|
18
|
+
];
|
|
19
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibmd0LWJ1dHRvbi5tb2R1bGUuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi9wcm9qZWN0cy9uZy10YWlsd2luZC9zcmMvY29tcG9uZW50cy9uZ3QtYnV0dG9uL25ndC1idXR0b24ubW9kdWxlLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sRUFBRSxZQUFZLEVBQUUsTUFBTSxpQkFBaUIsQ0FBQztBQUMvQyxPQUFPLEVBQUUsUUFBUSxFQUFFLE1BQU0sZUFBZSxDQUFDO0FBQ3pDLE9BQU8sRUFBRSxZQUFZLEVBQUUsTUFBTSxpQkFBaUIsQ0FBQztBQUU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