ng-tailwind 5.2.3 → 5.2.5
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/components/ngt-action/ngt-action.component.d.ts +30 -30
- package/components/ngt-action/ngt-action.module.d.ts +10 -10
- package/components/ngt-button/ngt-button.component.d.ts +35 -35
- package/components/ngt-button/ngt-button.module.d.ts +10 -10
- package/components/ngt-checkbox/ngt-checkbox.component.d.ts +53 -53
- package/components/ngt-checkbox/ngt-checkbox.module.d.ts +10 -10
- package/components/ngt-content/ngt-content.component.d.ts +12 -12
- package/components/ngt-content/ngt-content.module.d.ts +8 -8
- package/components/ngt-context-menu/ngt-context-menu.component.d.ts +20 -19
- package/components/ngt-context-menu/ngt-context-menu.directive.d.ts +25 -25
- package/components/ngt-context-menu/ngt-context-menu.module.d.ts +10 -10
- package/components/ngt-datatable/ngt-datatable.component.d.ts +125 -125
- package/components/ngt-datatable/ngt-datatable.module.d.ts +25 -25
- package/components/ngt-datatable/ngt-tbody/ngt-tbody.component.d.ts +14 -14
- package/components/ngt-datatable/ngt-td/ngt-td.component.d.ts +14 -14
- package/components/ngt-datatable/ngt-td-check/ngt-td-check.component.d.ts +29 -29
- package/components/ngt-datatable/ngt-th/ngt-th.component.d.ts +55 -55
- package/components/ngt-datatable/ngt-th-check/ngt-th-check.component.d.ts +32 -32
- package/components/ngt-datatable/ngt-thead/ngt-thead.component.d.ts +13 -13
- package/components/ngt-datatable/ngt-tr/ngt-tr.component.d.ts +20 -20
- package/components/ngt-date/ngt-date.component.d.ts +85 -85
- package/components/ngt-date/ngt-date.module.d.ts +13 -13
- package/components/ngt-dropdown/ngt-dropdown-container/ngt-dropdown-container.component.d.ts +8 -8
- package/components/ngt-dropdown/ngt-dropdown.component.d.ts +53 -53
- package/components/ngt-dropdown/ngt-dropdown.module.d.ts +9 -9
- package/components/ngt-dropzone/custom-dropzone-preview/custom-dropzone-preview.component.d.ts +14 -14
- package/components/ngt-dropzone/ngt-dropzone-file-viewer/ngt-dropzone-file-viewer.component.d.ts +25 -25
- package/components/ngt-dropzone/ngt-dropzone-view/ngt-dropzone-view.component.d.ts +35 -35
- package/components/ngt-dropzone/ngt-dropzone.component.d.ts +95 -95
- package/components/ngt-dropzone/ngt-dropzone.meta.d.ts +27 -27
- package/components/ngt-dropzone/ngt-dropzone.module.d.ts +17 -17
- package/components/ngt-floating-button/ngt-floating-button.component.d.ts +35 -35
- package/components/ngt-floating-button/ngt-floating-button.module.d.ts +10 -10
- package/components/ngt-form/ngt-form-validation-message/ngt-form-validation-message.component.d.ts +10 -10
- package/components/ngt-form/ngt-form.component.d.ts +60 -60
- package/components/ngt-form/ngt-form.module.d.ts +9 -9
- package/components/ngt-header-nav/ngt-header-nav.component.d.ts +14 -14
- package/components/ngt-header-nav/ngt-header-nav.module.d.ts +8 -8
- package/components/ngt-helper/ngt-helper.component.d.ts +25 -25
- package/components/ngt-helper/ngt-helper.module.d.ts +10 -10
- package/components/ngt-input/ngt-input.component.d.ts +129 -129
- package/components/ngt-input/ngt-input.module.d.ts +14 -14
- package/components/ngt-modal/ngt-modal-body/ngt-modal-body.component.d.ts +17 -17
- package/components/ngt-modal/ngt-modal-footer/ngt-modal-footer.component.d.ts +12 -12
- package/components/ngt-modal/ngt-modal-header/ngt-modal-header.component.d.ts +15 -15
- package/components/ngt-modal/ngt-modal.component.d.ts +31 -31
- package/components/ngt-modal/ngt-modal.module.d.ts +11 -11
- package/components/ngt-multi-select/ngt-multi-select.component.d.ts +116 -116
- package/components/ngt-multi-select/ngt-multi-select.module.d.ts +15 -15
- package/components/ngt-pagination/ngt-pagination.component.d.ts +43 -43
- package/components/ngt-pagination/ngt-pagination.module.d.ts +12 -12
- package/components/ngt-popover/ngt-popover-tooltip/ngt-popover-tooltip.component.d.ts +21 -21
- package/components/ngt-popover/ngt-popover.component.d.ts +31 -31
- package/components/ngt-popover/ngt-popover.directive.d.ts +31 -31
- package/components/ngt-popover/ngt-popover.module.d.ts +11 -11
- package/components/ngt-portlet/ngt-portlet-body/ngt-portlet-body.component.d.ts +12 -12
- package/components/ngt-portlet/ngt-portlet-footer/ngt-portlet-footer.component.d.ts +12 -12
- package/components/ngt-portlet/ngt-portlet-header/ngt-portlet-header.component.d.ts +18 -18
- package/components/ngt-portlet/ngt-portlet.component.d.ts +20 -20
- package/components/ngt-portlet/ngt-portlet.module.d.ts +13 -13
- package/components/ngt-radio-button/ngt-radio-button-container/ngt-radio-button-container.component.d.ts +9 -9
- package/components/ngt-radio-button/ngt-radio-button.component.d.ts +45 -45
- package/components/ngt-radio-button/ngt-radio-button.module.d.ts +11 -11
- package/components/ngt-section/ngt-section.component.d.ts +38 -38
- package/components/ngt-section/ngt-section.module.d.ts +11 -11
- package/components/ngt-select/ngt-select.component.d.ts +154 -154
- package/components/ngt-select/ngt-select.directive.d.ts +20 -20
- package/components/ngt-select/ngt-select.module.d.ts +16 -16
- package/components/ngt-shining/ngt-shining.component.d.ts +19 -19
- package/components/ngt-shining/ngt-shining.module.d.ts +8 -8
- package/components/ngt-sidenav/ngt-sidenav.component.d.ts +32 -32
- package/components/ngt-sidenav/ngt-sidenav.module.d.ts +8 -8
- package/components/ngt-slider/ngt-slider.component.d.ts +36 -36
- package/components/ngt-slider/ngt-slider.module.d.ts +9 -9
- package/components/ngt-svg/ngt-svg.component.d.ts +13 -13
- package/components/ngt-svg/ngt-svg.module.d.ts +10 -10
- package/components/ngt-tag/ngt-tag.component.d.ts +13 -13
- package/components/ngt-tag/ngt-tag.module.d.ts +9 -9
- package/components/ngt-textarea/ngt-textarea.component.d.ts +49 -49
- package/components/ngt-textarea/ngt-textarea.module.d.ts +13 -13
- package/components/ngt-validation/ngt-validation.component.d.ts +13 -13
- package/components/ngt-validation/ngt-validation.module.d.ts +8 -8
- package/directives/ngt-stylizable/ngt-stylizable.directive.d.ts +70 -68
- package/directives/ngt-stylizable/ngt-stylizable.module.d.ts +8 -8
- package/enums/size.enum.d.ts +8 -8
- package/esm2020/animations/ngt-angular-animations.mjs +34 -34
- package/esm2020/base/ngt-base-ng-model.mjs +90 -90
- package/esm2020/components/ngt-action/ngt-action.component.mjs +96 -96
- package/esm2020/components/ngt-action/ngt-action.module.mjs +28 -28
- package/esm2020/components/ngt-button/ngt-button.component.mjs +142 -142
- package/esm2020/components/ngt-button/ngt-button.module.mjs +28 -28
- package/esm2020/components/ngt-checkbox/ngt-checkbox.component.mjs +192 -192
- package/esm2020/components/ngt-checkbox/ngt-checkbox.module.mjs +28 -28
- package/esm2020/components/ngt-content/ngt-content.component.mjs +32 -32
- package/esm2020/components/ngt-content/ngt-content.module.mjs +20 -20
- package/esm2020/components/ngt-context-menu/ngt-context-menu.component.mjs +25 -25
- package/esm2020/components/ngt-context-menu/ngt-context-menu.directive.mjs +89 -89
- package/esm2020/components/ngt-context-menu/ngt-context-menu.module.mjs +33 -33
- package/esm2020/components/ngt-datatable/ngt-datatable.component.mjs +470 -470
- package/esm2020/components/ngt-datatable/ngt-datatable.module.mjs +99 -99
- package/esm2020/components/ngt-datatable/ngt-tbody/ngt-tbody.component.mjs +57 -57
- package/esm2020/components/ngt-datatable/ngt-td/ngt-td.component.mjs +62 -62
- package/esm2020/components/ngt-datatable/ngt-td-check/ngt-td-check.component.mjs +113 -113
- package/esm2020/components/ngt-datatable/ngt-th/ngt-th.component.mjs +228 -228
- package/esm2020/components/ngt-datatable/ngt-th-check/ngt-th-check.component.mjs +127 -127
- package/esm2020/components/ngt-datatable/ngt-thead/ngt-thead.component.mjs +55 -55
- package/esm2020/components/ngt-datatable/ngt-tr/ngt-tr.component.mjs +86 -86
- package/esm2020/components/ngt-date/ngt-date.component.mjs +435 -435
- package/esm2020/components/ngt-date/ngt-date.module.mjs +40 -40
- package/esm2020/components/ngt-dropdown/ngt-dropdown-container/ngt-dropdown-container.component.mjs +19 -19
- package/esm2020/components/ngt-dropdown/ngt-dropdown.component.mjs +204 -204
- package/esm2020/components/ngt-dropdown/ngt-dropdown.module.mjs +21 -21
- package/esm2020/components/ngt-dropzone/custom-dropzone-preview/custom-dropzone-preview.component.mjs +54 -54
- package/esm2020/components/ngt-dropzone/ngt-dropzone-file-viewer/ngt-dropzone-file-viewer.component.mjs +66 -66
- package/esm2020/components/ngt-dropzone/ngt-dropzone-view/ngt-dropzone-view.component.mjs +94 -94
- package/esm2020/components/ngt-dropzone/ngt-dropzone.component.mjs +496 -496
- package/esm2020/components/ngt-dropzone/ngt-dropzone.meta.mjs +24 -24
- package/esm2020/components/ngt-dropzone/ngt-dropzone.module.mjs +55 -55
- package/esm2020/components/ngt-floating-button/ngt-floating-button.component.mjs +119 -119
- package/esm2020/components/ngt-floating-button/ngt-floating-button.module.mjs +28 -28
- package/esm2020/components/ngt-form/ngt-form-validation-message/ngt-form-validation-message.component.mjs +22 -22
- package/esm2020/components/ngt-form/ngt-form.component.mjs +207 -207
- package/esm2020/components/ngt-form/ngt-form.module.mjs +29 -29
- package/esm2020/components/ngt-header-nav/ngt-header-nav.component.mjs +39 -39
- package/esm2020/components/ngt-header-nav/ngt-header-nav.module.mjs +20 -20
- package/esm2020/components/ngt-helper/ngt-helper.component.mjs +69 -68
- package/esm2020/components/ngt-helper/ngt-helper.module.mjs +28 -28
- package/esm2020/components/ngt-input/ngt-input.component.mjs +844 -844
- package/esm2020/components/ngt-input/ngt-input.module.mjs +47 -47
- package/esm2020/components/ngt-modal/ngt-modal-body/ngt-modal-body.component.mjs +46 -46
- package/esm2020/components/ngt-modal/ngt-modal-footer/ngt-modal-footer.component.mjs +33 -33
- package/esm2020/components/ngt-modal/ngt-modal-header/ngt-modal-header.component.mjs +40 -40
- package/esm2020/components/ngt-modal/ngt-modal.component.mjs +122 -122
- package/esm2020/components/ngt-modal/ngt-modal.module.mjs +39 -39
- package/esm2020/components/ngt-multi-select/ngt-multi-select.component.mjs +503 -503
- package/esm2020/components/ngt-multi-select/ngt-multi-select.module.mjs +52 -52
- package/esm2020/components/ngt-pagination/ngt-pagination.component.mjs +162 -162
- package/esm2020/components/ngt-pagination/ngt-pagination.module.mjs +36 -36
- package/esm2020/components/ngt-popover/ngt-popover-tooltip/ngt-popover-tooltip.component.mjs +58 -58
- package/esm2020/components/ngt-popover/ngt-popover.component.mjs +85 -85
- package/esm2020/components/ngt-popover/ngt-popover.directive.mjs +126 -126
- package/esm2020/components/ngt-popover/ngt-popover.module.mjs +36 -36
- package/esm2020/components/ngt-portlet/ngt-portlet-body/ngt-portlet-body.component.mjs +34 -34
- package/esm2020/components/ngt-portlet/ngt-portlet-footer/ngt-portlet-footer.component.mjs +35 -35
- package/esm2020/components/ngt-portlet/ngt-portlet-header/ngt-portlet-header.component.mjs +57 -57
- package/esm2020/components/ngt-portlet/ngt-portlet.component.mjs +74 -74
- package/esm2020/components/ngt-portlet/ngt-portlet.module.mjs +47 -47
- package/esm2020/components/ngt-radio-button/ngt-radio-button-container/ngt-radio-button-container.component.mjs +19 -19
- package/esm2020/components/ngt-radio-button/ngt-radio-button.component.mjs +153 -153
- package/esm2020/components/ngt-radio-button/ngt-radio-button.module.mjs +29 -29
- package/esm2020/components/ngt-section/ngt-section.component.mjs +151 -151
- package/esm2020/components/ngt-section/ngt-section.module.mjs +32 -32
- package/esm2020/components/ngt-select/ngt-select.component.mjs +670 -670
- package/esm2020/components/ngt-select/ngt-select.directive.mjs +36 -36
- package/esm2020/components/ngt-select/ngt-select.module.mjs +65 -65
- package/esm2020/components/ngt-shining/ngt-shining.component.mjs +40 -40
- package/esm2020/components/ngt-shining/ngt-shining.module.mjs +20 -20
- package/esm2020/components/ngt-sidenav/ngt-sidenav.component.mjs +132 -132
- package/esm2020/components/ngt-sidenav/ngt-sidenav.module.mjs +20 -20
- package/esm2020/components/ngt-slider/ngt-slider.component.mjs +100 -100
- package/esm2020/components/ngt-slider/ngt-slider.module.mjs +24 -24
- package/esm2020/components/ngt-svg/ngt-svg.component.mjs +53 -53
- package/esm2020/components/ngt-svg/ngt-svg.module.mjs +28 -28
- package/esm2020/components/ngt-tag/ngt-tag.component.mjs +37 -37
- package/esm2020/components/ngt-tag/ngt-tag.module.mjs +24 -24
- package/esm2020/components/ngt-textarea/ngt-textarea.component.mjs +238 -238
- package/esm2020/components/ngt-textarea/ngt-textarea.module.mjs +43 -43
- package/esm2020/components/ngt-validation/ngt-validation.component.mjs +26 -26
- package/esm2020/components/ngt-validation/ngt-validation.module.mjs +20 -20
- package/esm2020/directives/ngt-stylizable/ngt-stylizable.directive.mjs +299 -290
- package/esm2020/directives/ngt-stylizable/ngt-stylizable.module.mjs +20 -20
- package/esm2020/enums/size.enum.mjs +11 -11
- package/esm2020/helpers/enum/enum.mjs +7 -7
- package/esm2020/helpers/form/form.mjs +14 -14
- package/esm2020/helpers/input-mask/input-mask.helper.mjs +26 -26
- package/esm2020/helpers/promise/promise-helper.mjs +4 -4
- package/esm2020/helpers/routing/route.mjs +11 -11
- package/esm2020/helpers/uuid.mjs +10 -10
- package/esm2020/ng-tailwind.mjs +4 -4
- package/esm2020/public-api.mjs +127 -127
- package/esm2020/services/http/ngt-attachment-http.service.mjs +3 -3
- package/esm2020/services/http/ngt-http-form.service.mjs +3 -3
- package/esm2020/services/http/ngt-http-resource.service.mjs +3 -3
- package/esm2020/services/http/ngt-http-validation.service.mjs +3 -3
- package/esm2020/services/http/ngt-http.service.mjs +3 -3
- package/esm2020/services/http/ngt-translate.service.mjs +3 -3
- package/esm2020/services/ngt-stylizable/ngt-stylizable.service.mjs +279 -273
- package/esm2020/services/validation/ngt-ability-validation.service.mjs +3 -3
- package/fesm2015/ng-tailwind.mjs +8669 -8653
- package/fesm2015/ng-tailwind.mjs.map +1 -1
- package/fesm2020/ng-tailwind.mjs +8494 -8478
- package/fesm2020/ng-tailwind.mjs.map +1 -1
- package/helpers/enum/enum.d.ts +1 -1
- package/helpers/form/form.d.ts +4 -4
- package/helpers/input-mask/input-mask.helper.d.ts +20 -20
- package/helpers/promise/promise-helper.d.ts +1 -1
- package/helpers/routing/route.d.ts +2 -2
- package/helpers/uuid.d.ts +1 -1
- package/index.d.ts +5 -5
- package/package.json +1 -1
- package/public-api.d.ts +87 -87
- package/services/http/ngt-attachment-http.service.d.ts +9 -9
- 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 +12 -12
- package/services/http/ngt-http.service.d.ts +27 -27
- package/services/http/ngt-translate.service.d.ts +33 -33
- package/services/ngt-stylizable/ngt-stylizable.service.d.ts +99 -96
- package/services/validation/ngt-ability-validation.service.d.ts +5 -5
|
@@ -1,113 +1,113 @@
|
|
|
1
|
-
import { Component, EventEmitter, Input, Optional, Output, Self, SkipSelf, ViewChild, } from '@angular/core';
|
|
2
|
-
import { uuid } from '../../../helpers/uuid';
|
|
3
|
-
import { NgtStylizableService } from '../../../services/ngt-stylizable/ngt-stylizable.service';
|
|
4
|
-
import { NgtCheckboxComponent } from '../../ngt-checkbox/ngt-checkbox.component';
|
|
5
|
-
import * as i0 from "@angular/core";
|
|
6
|
-
import * as i1 from "../../../directives/ngt-stylizable/ngt-stylizable.directive";
|
|
7
|
-
import * as i2 from "../ngt-datatable.component";
|
|
8
|
-
import * as i3 from "@angular/forms";
|
|
9
|
-
import * as i4 from "../../ngt-checkbox/ngt-checkbox.component";
|
|
10
|
-
export class NgtTdCheckComponent {
|
|
11
|
-
constructor(injector, hostElement, ngtStylizableDirective, ngtDataTable) {
|
|
12
|
-
this.injector = injector;
|
|
13
|
-
this.hostElement = hostElement;
|
|
14
|
-
this.ngtStylizableDirective = ngtStylizableDirective;
|
|
15
|
-
this.ngtDataTable = ngtDataTable;
|
|
16
|
-
this.checked = false;
|
|
17
|
-
this.onCheckboxInit = new EventEmitter();
|
|
18
|
-
this.id = uuid();
|
|
19
|
-
this.subscriptions = [];
|
|
20
|
-
this.isFirstChange = true;
|
|
21
|
-
this.bindNgtStyle();
|
|
22
|
-
}
|
|
23
|
-
ngAfterContentInit() {
|
|
24
|
-
if (this.ngtDataTable) {
|
|
25
|
-
this.subscriptions.push(this.ngtDataTable.onToogleAllCheckboxes.subscribe((checked) => {
|
|
26
|
-
this.checked = checked;
|
|
27
|
-
}));
|
|
28
|
-
this.subscriptions.push(this.ngtDataTable.onClearSelectedElements.subscribe(() => {
|
|
29
|
-
this.checked = false;
|
|
30
|
-
}));
|
|
31
|
-
this.onCheckboxInit.emit({
|
|
32
|
-
id: this.id,
|
|
33
|
-
checked: this.checked,
|
|
34
|
-
reference: this.reference
|
|
35
|
-
});
|
|
36
|
-
}
|
|
37
|
-
}
|
|
38
|
-
ngOnDestroy() {
|
|
39
|
-
this.destroySubscriptions();
|
|
40
|
-
}
|
|
41
|
-
onCheckboxChange(checked) {
|
|
42
|
-
if (this.ngtDataTable && !this.isFirstChange) {
|
|
43
|
-
this.ngtDataTable.onToogleCheckbox.emit({
|
|
44
|
-
id: this.id,
|
|
45
|
-
checked: checked,
|
|
46
|
-
reference: this.reference
|
|
47
|
-
});
|
|
48
|
-
}
|
|
49
|
-
this.isFirstChange = false;
|
|
50
|
-
}
|
|
51
|
-
bindNgtStyle() {
|
|
52
|
-
if (this.ngtStylizableDirective) {
|
|
53
|
-
this.ngtStyle = this.ngtStylizableDirective.getNgtStylizableService();
|
|
54
|
-
}
|
|
55
|
-
else {
|
|
56
|
-
this.ngtStyle = new NgtStylizableService();
|
|
57
|
-
}
|
|
58
|
-
this.ngtStyle.load(this.injector, 'NgtTdCheck', {
|
|
59
|
-
py: 'py-4',
|
|
60
|
-
px: 'px-6',
|
|
61
|
-
text: 'text-center',
|
|
62
|
-
border: 'border-b',
|
|
63
|
-
color: {
|
|
64
|
-
border: ''
|
|
65
|
-
}
|
|
66
|
-
});
|
|
67
|
-
this.hostElement.nativeElement.classList += this.ngtStyle.compile([
|
|
68
|
-
'h',
|
|
69
|
-
'px',
|
|
70
|
-
'py',
|
|
71
|
-
'pb',
|
|
72
|
-
'pl',
|
|
73
|
-
'pr',
|
|
74
|
-
'pt',
|
|
75
|
-
'mb',
|
|
76
|
-
'ml',
|
|
77
|
-
'mr',
|
|
78
|
-
'mt',
|
|
79
|
-
'border',
|
|
80
|
-
'color.border',
|
|
81
|
-
]);
|
|
82
|
-
}
|
|
83
|
-
destroySubscriptions() {
|
|
84
|
-
this.subscriptions.forEach(subscription => subscription.unsubscribe());
|
|
85
|
-
this.subscriptions = [];
|
|
86
|
-
}
|
|
87
|
-
}
|
|
88
|
-
NgtTdCheckComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: NgtTdCheckComponent, deps: [{ token: i0.Injector }, { token: i0.ElementRef }, { token: i1.NgtStylizableDirective, optional: true, self: true }, { token: i2.NgtDatatableComponent, optional: true, skipSelf: true }], target: i0.ɵɵFactoryTarget.Component });
|
|
89
|
-
NgtTdCheckComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.8", type: NgtTdCheckComponent, selector: "[ngt-td-check]", inputs: { reference: "reference", isDisabled: "isDisabled", checked: "checked" }, outputs: { onCheckboxInit: "onCheckboxInit" }, viewQueries: [{ propertyName: "checkbox", first: true, predicate: NgtCheckboxComponent, descendants: true, static: true }], ngImport: i0, template: "<ngt-checkbox [(ngModel)]='checked' [isDisabled]=\"isDisabled\" (ngModelChange)='onCheckboxChange($event)'></ngt-checkbox>\
|
|
90
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: NgtTdCheckComponent, decorators: [{
|
|
91
|
-
type: Component,
|
|
92
|
-
args: [{ selector: '[ngt-td-check]', template: "<ngt-checkbox [(ngModel)]='checked' [isDisabled]=\"isDisabled\" (ngModelChange)='onCheckboxChange($event)'></ngt-checkbox>\
|
|
93
|
-
}], ctorParameters: function () { return [{ type: i0.Injector }, { type: i0.ElementRef }, { type: i1.NgtStylizableDirective, decorators: [{
|
|
94
|
-
type: Self
|
|
95
|
-
}, {
|
|
96
|
-
type: Optional
|
|
97
|
-
}] }, { type: i2.NgtDatatableComponent, decorators: [{
|
|
98
|
-
type: Optional
|
|
99
|
-
}, {
|
|
100
|
-
type: SkipSelf
|
|
101
|
-
}] }]; }, propDecorators: { checkbox: [{
|
|
102
|
-
type: ViewChild,
|
|
103
|
-
args: [NgtCheckboxComponent, { static: true }]
|
|
104
|
-
}], reference: [{
|
|
105
|
-
type: Input
|
|
106
|
-
}], isDisabled: [{
|
|
107
|
-
type: Input
|
|
108
|
-
}], checked: [{
|
|
109
|
-
type: Input
|
|
110
|
-
}], onCheckboxInit: [{
|
|
111
|
-
type: Output
|
|
112
|
-
}] } });
|
|
113
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
1
|
+
import { Component, EventEmitter, Input, Optional, Output, Self, SkipSelf, ViewChild, } from '@angular/core';
|
|
2
|
+
import { uuid } from '../../../helpers/uuid';
|
|
3
|
+
import { NgtStylizableService } from '../../../services/ngt-stylizable/ngt-stylizable.service';
|
|
4
|
+
import { NgtCheckboxComponent } from '../../ngt-checkbox/ngt-checkbox.component';
|
|
5
|
+
import * as i0 from "@angular/core";
|
|
6
|
+
import * as i1 from "../../../directives/ngt-stylizable/ngt-stylizable.directive";
|
|
7
|
+
import * as i2 from "../ngt-datatable.component";
|
|
8
|
+
import * as i3 from "@angular/forms";
|
|
9
|
+
import * as i4 from "../../ngt-checkbox/ngt-checkbox.component";
|
|
10
|
+
export class NgtTdCheckComponent {
|
|
11
|
+
constructor(injector, hostElement, ngtStylizableDirective, ngtDataTable) {
|
|
12
|
+
this.injector = injector;
|
|
13
|
+
this.hostElement = hostElement;
|
|
14
|
+
this.ngtStylizableDirective = ngtStylizableDirective;
|
|
15
|
+
this.ngtDataTable = ngtDataTable;
|
|
16
|
+
this.checked = false;
|
|
17
|
+
this.onCheckboxInit = new EventEmitter();
|
|
18
|
+
this.id = uuid();
|
|
19
|
+
this.subscriptions = [];
|
|
20
|
+
this.isFirstChange = true;
|
|
21
|
+
this.bindNgtStyle();
|
|
22
|
+
}
|
|
23
|
+
ngAfterContentInit() {
|
|
24
|
+
if (this.ngtDataTable) {
|
|
25
|
+
this.subscriptions.push(this.ngtDataTable.onToogleAllCheckboxes.subscribe((checked) => {
|
|
26
|
+
this.checked = checked;
|
|
27
|
+
}));
|
|
28
|
+
this.subscriptions.push(this.ngtDataTable.onClearSelectedElements.subscribe(() => {
|
|
29
|
+
this.checked = false;
|
|
30
|
+
}));
|
|
31
|
+
this.onCheckboxInit.emit({
|
|
32
|
+
id: this.id,
|
|
33
|
+
checked: this.checked,
|
|
34
|
+
reference: this.reference
|
|
35
|
+
});
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
ngOnDestroy() {
|
|
39
|
+
this.destroySubscriptions();
|
|
40
|
+
}
|
|
41
|
+
onCheckboxChange(checked) {
|
|
42
|
+
if (this.ngtDataTable && !this.isFirstChange) {
|
|
43
|
+
this.ngtDataTable.onToogleCheckbox.emit({
|
|
44
|
+
id: this.id,
|
|
45
|
+
checked: checked,
|
|
46
|
+
reference: this.reference
|
|
47
|
+
});
|
|
48
|
+
}
|
|
49
|
+
this.isFirstChange = false;
|
|
50
|
+
}
|
|
51
|
+
bindNgtStyle() {
|
|
52
|
+
if (this.ngtStylizableDirective) {
|
|
53
|
+
this.ngtStyle = this.ngtStylizableDirective.getNgtStylizableService();
|
|
54
|
+
}
|
|
55
|
+
else {
|
|
56
|
+
this.ngtStyle = new NgtStylizableService();
|
|
57
|
+
}
|
|
58
|
+
this.ngtStyle.load(this.injector, 'NgtTdCheck', {
|
|
59
|
+
py: 'py-4',
|
|
60
|
+
px: 'px-6',
|
|
61
|
+
text: 'text-center',
|
|
62
|
+
border: 'border-b',
|
|
63
|
+
color: {
|
|
64
|
+
border: ''
|
|
65
|
+
}
|
|
66
|
+
});
|
|
67
|
+
this.hostElement.nativeElement.classList += this.ngtStyle.compile([
|
|
68
|
+
'h',
|
|
69
|
+
'px',
|
|
70
|
+
'py',
|
|
71
|
+
'pb',
|
|
72
|
+
'pl',
|
|
73
|
+
'pr',
|
|
74
|
+
'pt',
|
|
75
|
+
'mb',
|
|
76
|
+
'ml',
|
|
77
|
+
'mr',
|
|
78
|
+
'mt',
|
|
79
|
+
'border',
|
|
80
|
+
'color.border',
|
|
81
|
+
]);
|
|
82
|
+
}
|
|
83
|
+
destroySubscriptions() {
|
|
84
|
+
this.subscriptions.forEach(subscription => subscription.unsubscribe());
|
|
85
|
+
this.subscriptions = [];
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
NgtTdCheckComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: NgtTdCheckComponent, deps: [{ token: i0.Injector }, { token: i0.ElementRef }, { token: i1.NgtStylizableDirective, optional: true, self: true }, { token: i2.NgtDatatableComponent, optional: true, skipSelf: true }], target: i0.ɵɵFactoryTarget.Component });
|
|
89
|
+
NgtTdCheckComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.8", type: NgtTdCheckComponent, selector: "[ngt-td-check]", inputs: { reference: "reference", isDisabled: "isDisabled", checked: "checked" }, outputs: { onCheckboxInit: "onCheckboxInit" }, viewQueries: [{ propertyName: "checkbox", first: true, predicate: NgtCheckboxComponent, descendants: true, static: true }], ngImport: i0, template: "<ngt-checkbox [(ngModel)]='checked' [isDisabled]=\"isDisabled\" (ngModelChange)='onCheckboxChange($event)'></ngt-checkbox>\n<ng-content></ng-content>", dependencies: [{ kind: "directive", type: i3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i3.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i4.NgtCheckboxComponent, selector: "ngt-checkbox", inputs: ["label", "shining", "isDisabled", "isClickDisabled", "name", "mode", "helpTitle", "helpTextColor", "helpText", "helperAutoXReverse"] }] });
|
|
90
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: NgtTdCheckComponent, decorators: [{
|
|
91
|
+
type: Component,
|
|
92
|
+
args: [{ selector: '[ngt-td-check]', template: "<ngt-checkbox [(ngModel)]='checked' [isDisabled]=\"isDisabled\" (ngModelChange)='onCheckboxChange($event)'></ngt-checkbox>\n<ng-content></ng-content>" }]
|
|
93
|
+
}], ctorParameters: function () { return [{ type: i0.Injector }, { type: i0.ElementRef }, { type: i1.NgtStylizableDirective, decorators: [{
|
|
94
|
+
type: Self
|
|
95
|
+
}, {
|
|
96
|
+
type: Optional
|
|
97
|
+
}] }, { type: i2.NgtDatatableComponent, decorators: [{
|
|
98
|
+
type: Optional
|
|
99
|
+
}, {
|
|
100
|
+
type: SkipSelf
|
|
101
|
+
}] }]; }, propDecorators: { checkbox: [{
|
|
102
|
+
type: ViewChild,
|
|
103
|
+
args: [NgtCheckboxComponent, { static: true }]
|
|
104
|
+
}], reference: [{
|
|
105
|
+
type: Input
|
|
106
|
+
}], isDisabled: [{
|
|
107
|
+
type: Input
|
|
108
|
+
}], checked: [{
|
|
109
|
+
type: Input
|
|
110
|
+
}], onCheckboxInit: [{
|
|
111
|
+
type: Output
|
|
112
|
+
}] } });
|
|
113
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibmd0LXRkLWNoZWNrLmNvbXBvbmVudC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uL3Byb2plY3RzL25nLXRhaWx3aW5kL3NyYy9jb21wb25lbnRzL25ndC1kYXRhdGFibGUvbmd0LXRkLWNoZWNrL25ndC10ZC1jaGVjay5jb21wb25lbnQudHMiLCIuLi8uLi8uLi8uLi8uLi8uLi9wcm9qZWN0cy9uZy10YWlsd2luZC9zcmMvY29tcG9uZW50cy9uZ3QtZGF0YXRhYmxlL25ndC10ZC1jaGVjay9uZ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bGVtZW50OiBFbGVtZW50UmVmLFxuICAgICAgICBAU2VsZigpIEBPcHRpb25hbCgpIHByaXZhdGUgbmd0U3R5bGl6YWJsZURpcmVjdGl2ZTogTmd0U3R5bGl6YWJsZURpcmVjdGl2ZSxcbiAgICAgICAgQE9wdGlvbmFsKCkgQFNraXBTZWxmKClcbiAgICAgICAgcHJpdmF0ZSBuZ3REYXRhVGFibGU6IE5ndERhdGF0YWJsZUNvbXBvbmVudFxuICAgICkge1xuICAgICAgICB0aGlzLmJpbmROZ3RTdHlsZSgpO1xuICAgIH1cblxuICAgIHB1YmxpYyBuZ0FmdGVyQ29udGVudEluaXQoKTogdm9pZCB7XG4gICAgICAgIGlmICh0aGlzLm5ndERhdGFUYWJsZSkge1xuICAgICAgICAgICAgdGhpcy5zdWJzY3JpcHRpb25zLnB1c2goXG4gICAgICAgICAgICAgICAgdGhpcy5uZ3REYXRhVGFibGUub25Ub29nbGVBbGxDaGVja2JveGVzLnN1YnNjcmliZSgoY2hlY2tlZDogYm9vbGVhbikgPT4ge1xuICAgICAgICAgICAgICAgICAgICB0aGlzLmNoZWNrZWQgPSBjaGVja2VkO1xuICAgICAgICAgICAgICAgIH0pXG4gICAgICAgICAgICApO1xuXG4gICAgICAgICAgICB0aGlzLnN1YnNjcmlwdGlvbnMucHVzaChcbiAgICAgICAgICAgICAgICB0aGlzLm5ndERhdGFUYWJsZS5vbkNsZWFyU2VsZWN0ZWRFbGVtZW50cy5zdWJzY3JpYmUoKCkgPT4ge1xuICAgICAgICAgICAgICAgICAgICB0aGlzLmNoZWNrZWQgPSBmYWxzZTtcbiAgICAgICAgICAgICAgICB9KVxuICAgICAgICAgICAgKTtcblxuICAgICAgICAgICAgdGhpcy5vbkNoZWNrYm94SW5pdC5lbWl0KHtcbiAgICAgICAgICAgICAgICBpZDogdGhpcy5pZCxcbiAgICAgICAgICAgICAgICBjaGVja2VkOiB0aGlzLmNoZWNrZWQsXG4gICAgICAgICAgICAgICAgcmVmZXJlbmNlOi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ncHgtNicsXG4gICAgICAgICAgICB0ZXh0OiAndGV4dC1jZW50ZXInLFxuICAgICAgICAgICAgYm9yZGVyOiAnYm9yZGVyLWInLFxuICAgICAgICAgICAgY29sb3I6IHtcbiAgICAgICAgICAgICAgICBib3JkZXI6ICcnXG4gICAgICAgICAgICB9XG4gICAgICAgIH0pO1xuXG4gICAgICAgIHRoaXMuaG9zdEVsZW1lbnQubmF0aXZlRWxlbWVudC5jbGFzc0xpc3QgKz0gdGhpcy5uZ3RTdHlsZS5jb21waWxlKFtcbiAgICAgICAgICAgICdoJyxcbiAgICAgICAgICAgICdweCcsXG4gICAgICAgICAgICAncHknLFxuICAgICAgICAgICAgJ3BiJyxcbiAgICAgICAgICAgICdwbCcsXG4gICAgICAgICAgICAncHInLFxuICAgICAgICAgICAgJ3B0JyxcbiAgICAgICAgICAgICdtYicsXG4gICAgICAgICAgICAnbWwnLFxuICAgICAgICAgICAgJ21yJyxcbiAgICAgICAgICAgICdtdCcsXG4gICAgICAgICAgICAnYm9yZGVyJyxcbiAgICAgICAgICAgICdjb2xvci5ib3JkZXInLFxuICAgICAgICBdKTtcbiAgICB9XG5cbiAgICBwcml2YXRlIGRlc3Ryb3lTdWJzY3JpcHRpb25zKCk6IHZvaWQge1xuICAgICAgICB0aGlzLnN1YnNjcmlwdGlvbnMuZm9yRWFjaChzdWJzY3JpcHRpb24gPT4gc3Vic2NyaXB0aW9uLnVuc3Vic2NyaWJlKCkpO1xuICAgICAgICB0aGlzLnN1YnNjcmlwdGlvbnMgPSBbXTtcbiAgICB9XG59XG4iLCI8bmd0LWNoZWNrYm94IFsobmdNb2RlbCldPSdjaGVja2VkJyBbaXNEaXNhYmxlZF09XCJpc0Rpc2FibGVkXCIgKG5nTW9kZWxDaGFuZ2UpPSdvbkNoZWNrYm94Q2hhbmdlKCRldmVudCknPjwvbmd0LWNoZWNrYm94PlxuPG5nLWNvbnRlbnQ+PC9uZy1jb250ZW50PiJdfQ==
|