cmat 0.0.78 → 0.0.79
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/fesm2022/cmat-components-adapter.mjs +9 -46
- package/fesm2022/cmat-components-adapter.mjs.map +1 -1
- package/fesm2022/cmat-components-breadcrumb.mjs +104 -205
- package/fesm2022/cmat-components-breadcrumb.mjs.map +1 -1
- package/fesm2022/cmat-components-card.mjs +4 -8
- package/fesm2022/cmat-components-card.mjs.map +1 -1
- package/fesm2022/cmat-components-carousel.mjs +12 -12
- package/fesm2022/cmat-components-cascade.mjs +14 -20
- package/fesm2022/cmat-components-cascade.mjs.map +1 -1
- package/fesm2022/cmat-components-chip-input.mjs +21 -21
- package/fesm2022/cmat-components-chip-input.mjs.map +1 -1
- package/fesm2022/cmat-components-code-editor.mjs +4 -22
- package/fesm2022/cmat-components-code-editor.mjs.map +1 -1
- package/fesm2022/cmat-components-custom-formly.mjs +153 -220
- package/fesm2022/cmat-components-custom-formly.mjs.map +1 -1
- package/fesm2022/cmat-components-date-range.mjs +5 -177
- package/fesm2022/cmat-components-date-range.mjs.map +1 -1
- package/fesm2022/cmat-components-date-time-display.mjs +3 -15
- package/fesm2022/cmat-components-date-time-display.mjs.map +1 -1
- package/fesm2022/cmat-components-drawer.mjs +6 -96
- package/fesm2022/cmat-components-drawer.mjs.map +1 -1
- package/fesm2022/cmat-components-empty-state.mjs +4 -25
- package/fesm2022/cmat-components-empty-state.mjs.map +1 -1
- package/fesm2022/cmat-components-file-preview.mjs +3 -21
- package/fesm2022/cmat-components-file-preview.mjs.map +1 -1
- package/fesm2022/cmat-components-filter-toolbar.mjs +7 -50
- package/fesm2022/cmat-components-filter-toolbar.mjs.map +1 -1
- package/fesm2022/cmat-components-form-actions.mjs +3 -9
- package/fesm2022/cmat-components-form-actions.mjs.map +1 -1
- package/fesm2022/cmat-components-fullscreen.mjs +4 -4
- package/fesm2022/cmat-components-fullscreen.mjs.map +1 -1
- package/fesm2022/cmat-components-highlight.mjs +6 -31
- package/fesm2022/cmat-components-highlight.mjs.map +1 -1
- package/fesm2022/cmat-components-image-viewer.mjs +3 -12
- package/fesm2022/cmat-components-image-viewer.mjs.map +1 -1
- package/fesm2022/cmat-components-inline-loading.mjs +3 -12
- package/fesm2022/cmat-components-inline-loading.mjs.map +1 -1
- package/fesm2022/cmat-components-json-editor.mjs +10 -13
- package/fesm2022/cmat-components-json-editor.mjs.map +1 -1
- package/fesm2022/cmat-components-knob-input.mjs +18 -12
- package/fesm2022/cmat-components-knob-input.mjs.map +1 -1
- package/fesm2022/cmat-components-masonry.mjs +3 -9
- package/fesm2022/cmat-components-masonry.mjs.map +1 -1
- package/fesm2022/cmat-components-material-color-picker.mjs +3 -23
- package/fesm2022/cmat-components-material-color-picker.mjs.map +1 -1
- package/fesm2022/cmat-components-material-datetimepicker.mjs +49 -397
- package/fesm2022/cmat-components-material-datetimepicker.mjs.map +1 -1
- package/fesm2022/cmat-components-navigation.mjs +183 -725
- package/fesm2022/cmat-components-navigation.mjs.map +1 -1
- package/fesm2022/cmat-components-opt-input.mjs +7 -10
- package/fesm2022/cmat-components-opt-input.mjs.map +1 -1
- package/fesm2022/cmat-components-org-chart.mjs +11 -11
- package/fesm2022/cmat-components-org-chart.mjs.map +1 -1
- package/fesm2022/cmat-components-page-header.mjs +8 -19
- package/fesm2022/cmat-components-page-header.mjs.map +1 -1
- package/fesm2022/cmat-components-pagination.mjs +96 -93
- package/fesm2022/cmat-components-pagination.mjs.map +1 -1
- package/fesm2022/cmat-components-password-strength.mjs +10 -11
- package/fesm2022/cmat-components-password-strength.mjs.map +1 -1
- package/fesm2022/cmat-components-popover.mjs +15 -149
- package/fesm2022/cmat-components-popover.mjs.map +1 -1
- package/fesm2022/cmat-components-progress-bar.mjs +9 -16
- package/fesm2022/cmat-components-progress-bar.mjs.map +1 -1
- package/fesm2022/cmat-components-qrcode.mjs +5 -11
- package/fesm2022/cmat-components-qrcode.mjs.map +1 -1
- package/fesm2022/cmat-components-rating.mjs +3 -3
- package/fesm2022/cmat-components-rich-text-editor.mjs +4 -25
- package/fesm2022/cmat-components-rich-text-editor.mjs.map +1 -1
- package/fesm2022/cmat-components-select-search.mjs +46 -72
- package/fesm2022/cmat-components-select-search.mjs.map +1 -1
- package/fesm2022/cmat-components-select-table.mjs +193 -150
- package/fesm2022/cmat-components-select-table.mjs.map +1 -1
- package/fesm2022/cmat-components-select-tree.mjs +124 -78
- package/fesm2022/cmat-components-select-tree.mjs.map +1 -1
- package/fesm2022/cmat-components-skeleton.mjs +4 -22
- package/fesm2022/cmat-components-skeleton.mjs.map +1 -1
- package/fesm2022/cmat-components-speed-dial.mjs +9 -11
- package/fesm2022/cmat-components-speed-dial.mjs.map +1 -1
- package/fesm2022/cmat-components-status-tag.mjs +3 -18
- package/fesm2022/cmat-components-status-tag.mjs.map +1 -1
- package/fesm2022/cmat-components-table-toolbar.mjs +3 -15
- package/fesm2022/cmat-components-table-toolbar.mjs.map +1 -1
- package/fesm2022/cmat-components-timeline.mjs +18 -21
- package/fesm2022/cmat-components-timeline.mjs.map +1 -1
- package/fesm2022/cmat-components-toast.mjs +16 -14
- package/fesm2022/cmat-components-toast.mjs.map +1 -1
- package/fesm2022/cmat-components-transfer-picker.mjs +103 -80
- package/fesm2022/cmat-components-transfer-picker.mjs.map +1 -1
- package/fesm2022/cmat-components-treetable.mjs +6 -6
- package/fesm2022/cmat-components-upload.mjs +21 -36
- package/fesm2022/cmat-components-upload.mjs.map +1 -1
- package/fesm2022/cmat-components-x6-angular-shape.mjs +0 -1
- package/fesm2022/cmat-components-x6-angular-shape.mjs.map +1 -1
- package/fesm2022/cmat-directives-animate-on-scroll.mjs +6 -27
- package/fesm2022/cmat-directives-animate-on-scroll.mjs.map +1 -1
- package/fesm2022/cmat-directives-arrow-cursor.mjs +7 -9
- package/fesm2022/cmat-directives-arrow-cursor.mjs.map +1 -1
- package/fesm2022/cmat-directives-autofocus.mjs +3 -3
- package/fesm2022/cmat-directives-data-exporter.mjs +24 -33
- package/fesm2022/cmat-directives-data-exporter.mjs.map +1 -1
- package/fesm2022/cmat-directives-debounce.mjs +14 -17
- package/fesm2022/cmat-directives-debounce.mjs.map +1 -1
- package/fesm2022/cmat-directives-digit-only.mjs +6 -23
- package/fesm2022/cmat-directives-digit-only.mjs.map +1 -1
- package/fesm2022/cmat-directives-equal-validator.mjs +3 -3
- package/fesm2022/cmat-directives-seamless-auto-scroll.mjs +4 -11
- package/fesm2022/cmat-directives-seamless-auto-scroll.mjs.map +1 -1
- package/fesm2022/cmat-lib-mock-api.mjs +6 -43
- package/fesm2022/cmat-lib-mock-api.mjs.map +1 -1
- package/fesm2022/cmat-pipes-bytes.mjs +3 -3
- package/fesm2022/cmat-pipes-date-format.mjs +3 -3
- package/fesm2022/cmat-pipes-find-by-key.mjs +3 -5
- package/fesm2022/cmat-pipes-find-by-key.mjs.map +1 -1
- package/fesm2022/cmat-pipes-group-by.mjs +3 -3
- package/fesm2022/cmat-pipes-keys.mjs +3 -3
- package/fesm2022/cmat-pipes-secure.mjs +8 -12
- package/fesm2022/cmat-pipes-secure.mjs.map +1 -1
- package/fesm2022/cmat-pipes-uppercase.mjs +3 -3
- package/fesm2022/cmat-services-alert.mjs +3 -3
- package/fesm2022/cmat-services-config.mjs +50 -26
- package/fesm2022/cmat-services-config.mjs.map +1 -1
- package/fesm2022/cmat-services-confirmation.mjs +9 -11
- package/fesm2022/cmat-services-confirmation.mjs.map +1 -1
- package/fesm2022/cmat-services-data.mjs +56 -101
- package/fesm2022/cmat-services-data.mjs.map +1 -1
- package/fesm2022/cmat-services-export-as.mjs +4 -32
- package/fesm2022/cmat-services-export-as.mjs.map +1 -1
- package/fesm2022/cmat-services-loading.mjs +49 -40
- package/fesm2022/cmat-services-loading.mjs.map +1 -1
- package/fesm2022/cmat-services-local-storage.mjs +3 -3
- package/fesm2022/cmat-services-media-watcher.mjs +19 -25
- package/fesm2022/cmat-services-media-watcher.mjs.map +1 -1
- package/fesm2022/cmat-services-platform.mjs +3 -10
- package/fesm2022/cmat-services-platform.mjs.map +1 -1
- package/fesm2022/cmat-services-splash-screen.mjs +8 -13
- package/fesm2022/cmat-services-splash-screen.mjs.map +1 -1
- package/fesm2022/cmat-services-title.mjs +8 -12
- package/fesm2022/cmat-services-title.mjs.map +1 -1
- package/fesm2022/cmat-services-translation.mjs +3 -3
- package/fesm2022/cmat-services-utils.mjs +5 -27
- package/fesm2022/cmat-services-utils.mjs.map +1 -1
- package/fesm2022/cmat-validators.mjs +0 -8
- package/fesm2022/cmat-validators.mjs.map +1 -1
- package/fesm2022/cmat.mjs +3159 -3441
- package/fesm2022/cmat.mjs.map +1 -1
- package/package.json +1 -1
- package/tailwind/plugins/helpers.js +1 -10
- package/tailwind/plugins/scrollbar/index.js +0 -1
- package/tailwind/plugins/scrollbar/typedefs.js +1 -7
- package/tailwind/plugins/scrollbar/utilities.js +9 -58
- package/tailwind/plugins/scrollbar/variants.js +2 -17
- package/tailwind/plugins/theming.js +1 -57
- package/tailwind/utils/generate-contrasts.js +1 -12
- package/tailwind/utils/generate-palette.js +1 -32
- package/types/cmat-components-adapter.d.ts +0 -25
- package/types/cmat-components-breadcrumb.d.ts +25 -175
- package/types/cmat-components-carousel.d.ts +0 -18
- package/types/cmat-components-cascade.d.ts +1 -1
- package/types/cmat-components-chip-input.d.ts +4 -3
- package/types/cmat-components-code-editor.d.ts +0 -18
- package/types/cmat-components-custom-formly.d.ts +22 -28
- package/types/cmat-components-date-range.d.ts +0 -71
- package/types/cmat-components-date-time-display.d.ts +0 -15
- package/types/cmat-components-drawer.d.ts +0 -42
- package/types/cmat-components-empty-state.d.ts +0 -21
- package/types/cmat-components-file-preview.d.ts +0 -18
- package/types/cmat-components-filter-toolbar.d.ts +3 -43
- package/types/cmat-components-form-actions.d.ts +0 -6
- package/types/cmat-components-image-viewer.d.ts +0 -12
- package/types/cmat-components-inline-loading.d.ts +0 -9
- package/types/cmat-components-knob-input.d.ts +1 -1
- package/types/cmat-components-material-datetimepicker.d.ts +0 -263
- package/types/cmat-components-navigation.d.ts +24 -164
- package/types/cmat-components-opt-input.d.ts +1 -1
- package/types/cmat-components-page-header.d.ts +2 -16
- package/types/cmat-components-pagination.d.ts +22 -24
- package/types/cmat-components-popover.d.ts +1 -109
- package/types/cmat-components-progress-bar.d.ts +3 -4
- package/types/cmat-components-rich-text-editor.d.ts +0 -21
- package/types/cmat-components-select-search.d.ts +3 -19
- package/types/cmat-components-select-table.d.ts +17 -4
- package/types/cmat-components-select-tree.d.ts +20 -19
- package/types/cmat-components-skeleton.d.ts +0 -18
- package/types/cmat-components-status-tag.d.ts +0 -15
- package/types/cmat-components-table-toolbar.d.ts +0 -12
- package/types/cmat-components-timeline.d.ts +3 -4
- package/types/cmat-components-toast.d.ts +1 -0
- package/types/cmat-components-transfer-picker.d.ts +23 -27
- package/types/cmat-components-upload.d.ts +7 -10
- package/types/cmat-components-x6-angular-shape.d.ts +0 -1
- package/types/cmat-directives-arrow-cursor.d.ts +1 -1
- package/types/cmat-directives-debounce.d.ts +3 -4
- package/types/cmat-pipes-secure.d.ts +3 -4
- package/types/cmat-services-config.d.ts +35 -13
- package/types/cmat-services-data.d.ts +13 -12
- package/types/cmat-services-export-as.d.ts +0 -22
- package/types/cmat-services-loading.d.ts +15 -10
- package/types/cmat-services-media-watcher.d.ts +10 -13
- package/types/cmat-services-splash-screen.d.ts +2 -4
- package/types/cmat-services-title.d.ts +3 -5
- package/types/cmat.d.ts +655 -1308
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { isNil, isString, isArray, isUndefined } from 'lodash-es';
|
|
2
2
|
import * as i0 from '@angular/core';
|
|
3
|
-
import { ViewChild, Component, ChangeDetectionStrategy, inject, Renderer2, ElementRef, ViewEncapsulation, ChangeDetectorRef, ViewChildren, ViewContainerRef } from '@angular/core';
|
|
3
|
+
import { ViewChild, Component, ChangeDetectionStrategy, inject, Renderer2, ElementRef, ViewEncapsulation, ChangeDetectorRef, DestroyRef, signal, ViewChildren, ViewContainerRef } from '@angular/core';
|
|
4
4
|
import * as i2 from '@angular/material/icon';
|
|
5
5
|
import { MatIconModule } from '@angular/material/icon';
|
|
6
6
|
import * as i1$3 from '@ngx-formly/core';
|
|
@@ -21,14 +21,13 @@ import * as i3 from '@angular/material/button';
|
|
|
21
21
|
import { MatButtonModule } from '@angular/material/button';
|
|
22
22
|
import { FieldType } from '@ngx-formly/material/form-field';
|
|
23
23
|
import { HttpClient, HttpEventType } from '@angular/common/http';
|
|
24
|
+
import { takeUntilDestroyed, toObservable } from '@angular/core/rxjs-interop';
|
|
24
25
|
import { CmatCascadeListComponent } from 'cmat/components/cascade';
|
|
25
26
|
import { CmatMediaWatcherService } from 'cmat/services/media-watcher';
|
|
26
|
-
import { Subject, takeUntil, BehaviorSubject, ReplaySubject, of, take } from 'rxjs';
|
|
27
27
|
import * as i1$5 from '@angular/material/checkbox';
|
|
28
28
|
import { MatCheckboxModule, MatCheckbox } from '@angular/material/checkbox';
|
|
29
29
|
import * as i3$1 from '@angular/material/core';
|
|
30
30
|
import { MatRippleModule } from '@angular/material/core';
|
|
31
|
-
import { takeUntil as takeUntil$1 } from 'rxjs/operators';
|
|
32
31
|
import { CmatChipInputComponent } from 'cmat/components/chip-input';
|
|
33
32
|
import { CmatMaterialColorPickerComponent } from 'cmat/components/material-color-picker';
|
|
34
33
|
import { CmatDateRangeComponent } from 'cmat/components/date-range';
|
|
@@ -44,6 +43,7 @@ import { MatRadioModule, MatRadioGroup } from '@angular/material/radio';
|
|
|
44
43
|
import * as i1$8 from '@angular/material/select';
|
|
45
44
|
import { MatSelectModule } from '@angular/material/select';
|
|
46
45
|
import { CmatSelectSearchComponent } from 'cmat/components/select-search';
|
|
46
|
+
import { ReplaySubject, of, take } from 'rxjs';
|
|
47
47
|
import { CmatSelectTreeComponent } from 'cmat/components/select-tree';
|
|
48
48
|
import { CmatSelectTableComponent } from 'cmat/components/select-table';
|
|
49
49
|
import * as i2$3 from '@angular/material/stepper';
|
|
@@ -95,8 +95,8 @@ class CmatAddonsWrapperComponent extends FieldWrapper {
|
|
|
95
95
|
this.props.suffix = this.matSuffix;
|
|
96
96
|
}
|
|
97
97
|
}
|
|
98
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.
|
|
99
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.
|
|
98
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: CmatAddonsWrapperComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
99
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.8", type: CmatAddonsWrapperComponent, isStandalone: true, selector: "cmat-addons-wrapper", viewQueries: [{ propertyName: "matPrefix", first: true, predicate: ["matPrefix"], descendants: true, static: true }, { propertyName: "matSuffix", first: true, predicate: ["matSuffix"], descendants: true, static: true }], usesInheritance: true, ngImport: i0, template: `
|
|
100
100
|
<ng-template #matPrefix>
|
|
101
101
|
@if(props.addonLeft){
|
|
102
102
|
<span>
|
|
@@ -127,7 +127,7 @@ class CmatAddonsWrapperComponent extends FieldWrapper {
|
|
|
127
127
|
</ng-template>
|
|
128
128
|
`, isInline: true, dependencies: [{ kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i2.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "ngmodule", type: FormlyMaterialModule }] }); }
|
|
129
129
|
}
|
|
130
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.
|
|
130
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: CmatAddonsWrapperComponent, decorators: [{
|
|
131
131
|
type: Component,
|
|
132
132
|
args: [{
|
|
133
133
|
selector: 'cmat-addons-wrapper',
|
|
@@ -172,28 +172,28 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.7", ngImpor
|
|
|
172
172
|
}] } });
|
|
173
173
|
|
|
174
174
|
class CmatCardWrapperComponent extends FieldWrapper {
|
|
175
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.
|
|
176
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.
|
|
175
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: CmatCardWrapperComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
176
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.8", type: CmatCardWrapperComponent, isStandalone: true, selector: "cmat-card-wrapper", usesInheritance: true, ngImport: i0, template: "<mat-card class=\"dark:bg-white/5\">\r\n @if(props.label){\r\n <mat-card-title class=\"p-4\">{{ props.label }}</mat-card-title>\r\n }\r\n \r\n <mat-card-content>\r\n <ng-container #fieldComponent></ng-container>\r\n </mat-card-content> \r\n</mat-card>", dependencies: [{ kind: "ngmodule", type: MatCardModule }, { kind: "component", type: i1.MatCard, selector: "mat-card", inputs: ["appearance"], exportAs: ["matCard"] }, { kind: "directive", type: i1.MatCardContent, selector: "mat-card-content" }, { kind: "directive", type: i1.MatCardTitle, selector: "mat-card-title, [mat-card-title], [matCardTitle]" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
177
177
|
}
|
|
178
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.
|
|
178
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: CmatCardWrapperComponent, decorators: [{
|
|
179
179
|
type: Component,
|
|
180
180
|
args: [{ selector: 'cmat-card-wrapper', changeDetection: ChangeDetectionStrategy.OnPush, imports: [MatCardModule], template: "<mat-card class=\"dark:bg-white/5\">\r\n @if(props.label){\r\n <mat-card-title class=\"p-4\">{{ props.label }}</mat-card-title>\r\n }\r\n \r\n <mat-card-content>\r\n <ng-container #fieldComponent></ng-container>\r\n </mat-card-content> \r\n</mat-card>" }]
|
|
181
181
|
}] });
|
|
182
182
|
|
|
183
183
|
class CmatExpansionWrapperComponent extends FieldWrapper {
|
|
184
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.
|
|
185
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.
|
|
184
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: CmatExpansionWrapperComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
185
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.8", type: CmatExpansionWrapperComponent, isStandalone: true, selector: "cmat-expansion-wrapper", usesInheritance: true, ngImport: i0, template: "<mat-expansion-panel [expanded]=\"true\">\r\n <mat-expansion-panel-header>\r\n <mat-panel-title>\r\n {{ to.label }}\r\n </mat-panel-title>\r\n <mat-panel-description>\r\n {{ to.description }}\r\n </mat-panel-description>\r\n </mat-expansion-panel-header>\r\n <ng-template #fieldComponent matExpansionPanelContent></ng-template>\r\n</mat-expansion-panel>", dependencies: [{ kind: "ngmodule", type: MatExpansionModule }, { kind: "component", type: i1$1.MatExpansionPanel, selector: "mat-expansion-panel", inputs: ["hideToggle", "togglePosition"], outputs: ["afterExpand", "afterCollapse"], exportAs: ["matExpansionPanel"] }, { kind: "component", type: i1$1.MatExpansionPanelHeader, selector: "mat-expansion-panel-header", inputs: ["expandedHeight", "collapsedHeight", "tabIndex"] }, { kind: "directive", type: i1$1.MatExpansionPanelTitle, selector: "mat-panel-title" }, { kind: "directive", type: i1$1.MatExpansionPanelDescription, selector: "mat-panel-description" }, { kind: "directive", type: i1$1.MatExpansionPanelContent, selector: "ng-template[matExpansionPanelContent]" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
186
186
|
}
|
|
187
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.
|
|
187
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: CmatExpansionWrapperComponent, decorators: [{
|
|
188
188
|
type: Component,
|
|
189
189
|
args: [{ selector: 'cmat-expansion-wrapper', changeDetection: ChangeDetectionStrategy.OnPush, imports: [MatExpansionModule], template: "<mat-expansion-panel [expanded]=\"true\">\r\n <mat-expansion-panel-header>\r\n <mat-panel-title>\r\n {{ to.label }}\r\n </mat-panel-title>\r\n <mat-panel-description>\r\n {{ to.description }}\r\n </mat-panel-description>\r\n </mat-expansion-panel-header>\r\n <ng-template #fieldComponent matExpansionPanelContent></ng-template>\r\n</mat-expansion-panel>" }]
|
|
190
190
|
}] });
|
|
191
191
|
|
|
192
192
|
class CmatPanelWrapperComponent extends FieldWrapper {
|
|
193
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.
|
|
194
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.
|
|
193
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: CmatPanelWrapperComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
194
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.8", type: CmatPanelWrapperComponent, isStandalone: true, selector: "cmat-panel-wrapper", usesInheritance: true, ngImport: i0, template: "<h3 class=\"px-2\">{{ to.label }}</h3>\r\n<div>\r\n <ng-container #fieldComponent></ng-container>\r\n</div>", changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
195
195
|
}
|
|
196
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.
|
|
196
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: CmatPanelWrapperComponent, decorators: [{
|
|
197
197
|
type: Component,
|
|
198
198
|
args: [{ selector: 'cmat-panel-wrapper', changeDetection: ChangeDetectionStrategy.OnPush, imports: [], template: "<h3 class=\"px-2\">{{ to.label }}</h3>\r\n<div>\r\n <ng-container #fieldComponent></ng-container>\r\n</div>" }]
|
|
199
199
|
}] });
|
|
@@ -214,7 +214,6 @@ class CmatFormFieldWrapperComponent extends FieldWrapper {
|
|
|
214
214
|
});
|
|
215
215
|
}
|
|
216
216
|
ngAfterViewInit() {
|
|
217
|
-
// temporary fix for https://github.com/angular/material2/issues/7891
|
|
218
217
|
if (this.formField.appearance !== 'outline' && this.props.hideFieldUnderline === true) {
|
|
219
218
|
const underlineElement = this.formField._elementRef.nativeElement.querySelector('.mat-form-field-underline');
|
|
220
219
|
underlineElement && this._renderer.removeChild(underlineElement.parentNode, underlineElement);
|
|
@@ -224,10 +223,10 @@ class CmatFormFieldWrapperComponent extends FieldWrapper {
|
|
|
224
223
|
delete this.field._formField;
|
|
225
224
|
this._focusMonitor.stopMonitoring(this._elementRef);
|
|
226
225
|
}
|
|
227
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.
|
|
228
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.
|
|
226
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: CmatFormFieldWrapperComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
227
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.8", type: CmatFormFieldWrapperComponent, isStandalone: true, selector: "cmat-form-field-wrapper", viewQueries: [{ propertyName: "formField", first: true, predicate: MatFormField, descendants: true, static: true }], usesInheritance: true, ngImport: i0, template: "<mat-form-field [hideRequiredMarker]=\"true\" [floatLabel]=\"$any(props.floatLabel)\" [appearance]=\"$any(props.appearance)\"\r\n [subscriptSizing]=\"$any(props.subscriptSizing)\" [color]=\"props.color ?? 'primary'\">\r\n <ng-container #fieldComponent></ng-container>\r\n @if(props.label && props.hideLabel !== true){\r\n <mat-label>\r\n {{ props.label }}\r\n @if(props.required && props.hideRequiredMarker !== true){\r\n <span aria-hidden=\"true\" class=\"mat-form-field-required-marker mat-mdc-form-field-required-marker\">*</span>\r\n }\r\n </mat-label>\r\n }\r\n\r\n @if(props.textPrefix){\r\n <ng-container matTextPrefix>\r\n <ng-container [ngTemplateOutlet]=\"props.textPrefix\" [ngTemplateOutletContext]=\"{ field: field }\"></ng-container>\r\n </ng-container>\r\n }\r\n\r\n @if(props.prefix){\r\n <ng-container matPrefix>\r\n <ng-container [ngTemplateOutlet]=\"props.prefix\" [ngTemplateOutletContext]=\"{ field: field }\"></ng-container>\r\n </ng-container>\r\n }\r\n\r\n @if(props.textSuffix){\r\n <ng-container matTextSuffix>\r\n <ng-container [ngTemplateOutlet]=\"props.textSuffix\" [ngTemplateOutletContext]=\"{ field: field }\"></ng-container>\r\n </ng-container>\r\n }\r\n\r\n @if(props.suffix){\r\n <ng-container matSuffix>\r\n <ng-container [ngTemplateOutlet]=\"props.suffix\" [ngTemplateOutletContext]=\"{ field: field }\"></ng-container>\r\n </ng-container>\r\n }\r\n\r\n @if(props.showValidationMessage){\r\n <mat-error>\r\n <formly-validation-message [field]=\"field\"></formly-validation-message>\r\n </mat-error>\r\n }\r\n\r\n @if(props.description || props.hintStart){\r\n <mat-hint>\r\n <ng-container [ngTemplateOutlet]=\"stringOrTemplate\" [ngTemplateOutletContext]=\"{ content: props.description || props.hintStart }\">\r\n </ng-container>\r\n </mat-hint>\r\n }\r\n\r\n @if(props.hintEnd){\r\n <mat-hint align=\"end\">\r\n <ng-container [ngTemplateOutlet]=\"stringOrTemplate\" [ngTemplateOutletContext]=\"{ content: props.hintEnd }\">\r\n </ng-container>\r\n </mat-hint>\r\n }\r\n</mat-form-field>\r\n\r\n<ng-template #stringOrTemplate let-content=\"content\">\r\n @if(!content.createEmbeddedView){\r\n <ng-container>{{ content }}</ng-container>\r\n }@else {\r\n <ng-container [ngTemplateOutlet]=\"content\" [ngTemplateOutletContext]=\"{ field: field }\"></ng-container>\r\n }\r\n</ng-template>", styles: ["cmat-form-field-wrapper .mat-mdc-form-field,cmat-form-field-wrapper .mat-form-field{width:100%}\n"], dependencies: [{ kind: "ngmodule", type: MatFormFieldModule }, { kind: "component", type: i1$2.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i1$2.MatLabel, selector: "mat-label" }, { kind: "directive", type: i1$2.MatHint, selector: "mat-hint", inputs: ["align", "id"] }, { kind: "directive", type: i1$2.MatError, selector: "mat-error, [matError]", inputs: ["id"] }, { kind: "directive", type: i1$2.MatPrefix, selector: "[matPrefix], [matIconPrefix], [matTextPrefix]", inputs: ["matTextPrefix"] }, { kind: "directive", type: i1$2.MatSuffix, selector: "[matSuffix], [matIconSuffix], [matTextSuffix]", inputs: ["matTextSuffix"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i2$1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "ngmodule", type: FormlyModule }, { kind: "component", type: i1$3.LegacyFormlyValidationMessage, selector: "formly-validation-message" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
229
228
|
}
|
|
230
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.
|
|
229
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: CmatFormFieldWrapperComponent, decorators: [{
|
|
231
230
|
type: Component,
|
|
232
231
|
args: [{ selector: 'cmat-form-field-wrapper', changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, imports: [MatFormFieldModule, ReactiveFormsModule, CommonModule, FormlyModule], template: "<mat-form-field [hideRequiredMarker]=\"true\" [floatLabel]=\"$any(props.floatLabel)\" [appearance]=\"$any(props.appearance)\"\r\n [subscriptSizing]=\"$any(props.subscriptSizing)\" [color]=\"props.color ?? 'primary'\">\r\n <ng-container #fieldComponent></ng-container>\r\n @if(props.label && props.hideLabel !== true){\r\n <mat-label>\r\n {{ props.label }}\r\n @if(props.required && props.hideRequiredMarker !== true){\r\n <span aria-hidden=\"true\" class=\"mat-form-field-required-marker mat-mdc-form-field-required-marker\">*</span>\r\n }\r\n </mat-label>\r\n }\r\n\r\n @if(props.textPrefix){\r\n <ng-container matTextPrefix>\r\n <ng-container [ngTemplateOutlet]=\"props.textPrefix\" [ngTemplateOutletContext]=\"{ field: field }\"></ng-container>\r\n </ng-container>\r\n }\r\n\r\n @if(props.prefix){\r\n <ng-container matPrefix>\r\n <ng-container [ngTemplateOutlet]=\"props.prefix\" [ngTemplateOutletContext]=\"{ field: field }\"></ng-container>\r\n </ng-container>\r\n }\r\n\r\n @if(props.textSuffix){\r\n <ng-container matTextSuffix>\r\n <ng-container [ngTemplateOutlet]=\"props.textSuffix\" [ngTemplateOutletContext]=\"{ field: field }\"></ng-container>\r\n </ng-container>\r\n }\r\n\r\n @if(props.suffix){\r\n <ng-container matSuffix>\r\n <ng-container [ngTemplateOutlet]=\"props.suffix\" [ngTemplateOutletContext]=\"{ field: field }\"></ng-container>\r\n </ng-container>\r\n }\r\n\r\n @if(props.showValidationMessage){\r\n <mat-error>\r\n <formly-validation-message [field]=\"field\"></formly-validation-message>\r\n </mat-error>\r\n }\r\n\r\n @if(props.description || props.hintStart){\r\n <mat-hint>\r\n <ng-container [ngTemplateOutlet]=\"stringOrTemplate\" [ngTemplateOutletContext]=\"{ content: props.description || props.hintStart }\">\r\n </ng-container>\r\n </mat-hint>\r\n }\r\n\r\n @if(props.hintEnd){\r\n <mat-hint align=\"end\">\r\n <ng-container [ngTemplateOutlet]=\"stringOrTemplate\" [ngTemplateOutletContext]=\"{ content: props.hintEnd }\">\r\n </ng-container>\r\n </mat-hint>\r\n }\r\n</mat-form-field>\r\n\r\n<ng-template #stringOrTemplate let-content=\"content\">\r\n @if(!content.createEmbeddedView){\r\n <ng-container>{{ content }}</ng-container>\r\n }@else {\r\n <ng-container [ngTemplateOutlet]=\"content\" [ngTemplateOutletContext]=\"{ field: field }\"></ng-container>\r\n }\r\n</ng-template>", styles: ["cmat-form-field-wrapper .mat-mdc-form-field,cmat-form-field-wrapper .mat-form-field{width:100%}\n"] }]
|
|
233
232
|
}], ctorParameters: () => [], propDecorators: { formField: [{
|
|
@@ -265,10 +264,10 @@ class CmatButtonTypeComponent extends FieldType {
|
|
|
265
264
|
console.error('Error executing function from string:', error);
|
|
266
265
|
}
|
|
267
266
|
}
|
|
268
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.
|
|
269
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.
|
|
267
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: CmatButtonTypeComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
268
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.8", type: CmatButtonTypeComponent, isStandalone: true, selector: "cmat-button-type", usesInheritance: true, ngImport: i0, template: "<button class=\"print:hidden\" matButton=\"filled\" [type]=\"props.type\" [color]=\"props.color\" [disabled]=\"disabled\" (click)=\"onClick($event)\">\r\n {{ props.label }}\r\n</button>", dependencies: [{ kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i3.MatButton, selector: " button[matButton], a[matButton], button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button], a[mat-button], a[mat-raised-button], a[mat-flat-button], a[mat-stroked-button] ", inputs: ["matButton"], exportAs: ["matButton", "matAnchor"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
270
269
|
}
|
|
271
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.
|
|
270
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: CmatButtonTypeComponent, decorators: [{
|
|
272
271
|
type: Component,
|
|
273
272
|
args: [{ selector: 'cmat-button-type', changeDetection: ChangeDetectionStrategy.OnPush, imports: [MatButtonModule], template: "<button class=\"print:hidden\" matButton=\"filled\" [type]=\"props.type\" [color]=\"props.color\" [disabled]=\"disabled\" (click)=\"onClick($event)\">\r\n {{ props.label }}\r\n</button>" }]
|
|
274
273
|
}], ctorParameters: () => [] });
|
|
@@ -287,12 +286,12 @@ class CmatCascadeTypeComponent extends FieldType {
|
|
|
287
286
|
this._http = inject(HttpClient);
|
|
288
287
|
this._changeDetectorRef = inject(ChangeDetectorRef);
|
|
289
288
|
this._cmatMediaWatcherService = inject(CmatMediaWatcherService);
|
|
290
|
-
this.
|
|
289
|
+
this._destroyRef = inject(DestroyRef);
|
|
291
290
|
}
|
|
292
291
|
ngOnInit() {
|
|
293
292
|
const url = this.props?.domain?.url;
|
|
294
293
|
if (url && this.props?.domain?.code && this.props?.domain?.key && this.props?.domain?.value) {
|
|
295
|
-
this._http.get(url).pipe(
|
|
294
|
+
this._http.get(url).pipe(takeUntilDestroyed(this._destroyRef)).subscribe((data) => {
|
|
296
295
|
if (data) {
|
|
297
296
|
const datas = data.filter((i) => {
|
|
298
297
|
if (this.field.props?.domain?.key)
|
|
@@ -317,20 +316,16 @@ class CmatCascadeTypeComponent extends FieldType {
|
|
|
317
316
|
this._changeDetectorRef.markForCheck();
|
|
318
317
|
}
|
|
319
318
|
this._cmatMediaWatcherService.onMediaChange$
|
|
320
|
-
.pipe(
|
|
319
|
+
.pipe(takeUntilDestroyed(this._destroyRef))
|
|
321
320
|
.subscribe(({ matchingAliases }) => {
|
|
322
321
|
this.isHandSet = !matchingAliases.includes('lg');
|
|
323
322
|
this._changeDetectorRef.markForCheck();
|
|
324
323
|
});
|
|
325
324
|
}
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
this._unsubscribeAll.complete();
|
|
329
|
-
}
|
|
330
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.7", ngImport: i0, type: CmatCascadeTypeComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
331
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.7", type: CmatCascadeTypeComponent, isStandalone: true, selector: "cmat-cascade-type", usesInheritance: true, ngImport: i0, template: "<cmat-cascade-list [formControl]=\"formControl\" [clearable]=\"props.clearable\" [fullLevels]=\"props.fullLevels\"\r\n [changeOnSelect]=\"props.changeOnSelect\" [placeholder]=\"placeholder\" [options]=\"urlData\" [tabIndex]=\"props.tabindex\"\r\n [required]=\"required\" [touchUi]=\"isHandSet\"></cmat-cascade-list>", styles: [":host{width:100%}\n"], dependencies: [{ kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1$4.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$4.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i1$4.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "component", type: CmatCascadeListComponent, selector: "cmat-cascade-list", inputs: ["id", "options", "clearable", "fullLevels", "changeOnSelect", "allowLabelValue", "touchUi", "placeholder", "value", "required", "disabled"], exportAs: ["cmatCascadeList"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
325
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: CmatCascadeTypeComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
326
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.8", type: CmatCascadeTypeComponent, isStandalone: true, selector: "cmat-cascade-type", usesInheritance: true, ngImport: i0, template: "<cmat-cascade-list [formControl]=\"formControl\" [clearable]=\"props.clearable\" [fullLevels]=\"props.fullLevels\"\r\n [changeOnSelect]=\"props.changeOnSelect\" [placeholder]=\"placeholder\" [options]=\"urlData\" [tabIndex]=\"props.tabindex\"\r\n [required]=\"required\" [touchUi]=\"isHandSet\"></cmat-cascade-list>", styles: [":host{width:100%}\n"], dependencies: [{ kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1$4.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$4.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i1$4.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "component", type: CmatCascadeListComponent, selector: "cmat-cascade-list", inputs: ["id", "options", "clearable", "fullLevels", "changeOnSelect", "allowLabelValue", "touchUi", "placeholder", "value", "required", "disabled"], exportAs: ["cmatCascadeList"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
332
327
|
}
|
|
333
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.
|
|
328
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: CmatCascadeTypeComponent, decorators: [{
|
|
334
329
|
type: Component,
|
|
335
330
|
args: [{ selector: 'cmat-cascade-type', changeDetection: ChangeDetectionStrategy.OnPush, imports: [ReactiveFormsModule, CmatCascadeListComponent], template: "<cmat-cascade-list [formControl]=\"formControl\" [clearable]=\"props.clearable\" [fullLevels]=\"props.fullLevels\"\r\n [changeOnSelect]=\"props.changeOnSelect\" [placeholder]=\"placeholder\" [options]=\"urlData\" [tabIndex]=\"props.tabindex\"\r\n [required]=\"required\" [touchUi]=\"isHandSet\"></cmat-cascade-list>", styles: [":host{width:100%}\n"] }]
|
|
336
331
|
}], ctorParameters: () => [] });
|
|
@@ -343,11 +338,12 @@ class CmatCheckListTypeComponent extends FieldType {
|
|
|
343
338
|
this.checklist = [];
|
|
344
339
|
this.filteredData = [];
|
|
345
340
|
this._http = inject(HttpClient);
|
|
346
|
-
this.
|
|
347
|
-
this.
|
|
341
|
+
this._destroyRef = inject(DestroyRef);
|
|
342
|
+
this._filteredItems = signal(null, ...(ngDevMode ? [{ debugName: "_filteredItems" }] : /* istanbul ignore next */ []));
|
|
343
|
+
this._filteredItems$ = toObservable(this._filteredItems);
|
|
348
344
|
}
|
|
349
345
|
get filteredItems$() {
|
|
350
|
-
return this._filteredItems
|
|
346
|
+
return this._filteredItems$;
|
|
351
347
|
}
|
|
352
348
|
get datas() {
|
|
353
349
|
if (isArray(this.field.props?.options)) {
|
|
@@ -359,13 +355,13 @@ class CmatCheckListTypeComponent extends FieldType {
|
|
|
359
355
|
}
|
|
360
356
|
ngOnInit() {
|
|
361
357
|
if (this.field.props?.options && !isArray(this.field.props?.options)) {
|
|
362
|
-
this.field.props?.options.pipe(
|
|
358
|
+
this.field.props?.options.pipe(takeUntilDestroyed(this._destroyRef)).subscribe((data) => {
|
|
363
359
|
this.optionsData = data;
|
|
364
360
|
});
|
|
365
361
|
}
|
|
366
362
|
const url = this.field.props?.domain?.url;
|
|
367
363
|
if (url && this.field.props?.domain?.code && this.field.props?.domain?.key && this.field.props?.domain?.value) {
|
|
368
|
-
this._http.get(url).pipe(
|
|
364
|
+
this._http.get(url).pipe(takeUntilDestroyed(this._destroyRef)).subscribe((data) => {
|
|
369
365
|
if (data) {
|
|
370
366
|
const datas = data.filter((i) => {
|
|
371
367
|
if (this.field.props?.domain?.key)
|
|
@@ -383,29 +379,25 @@ class CmatCheckListTypeComponent extends FieldType {
|
|
|
383
379
|
this.urlData = [];
|
|
384
380
|
}
|
|
385
381
|
this.filteredData = this.datas;
|
|
386
|
-
this._filteredItems.
|
|
382
|
+
this._filteredItems.set(this.filteredData);
|
|
387
383
|
});
|
|
388
384
|
}
|
|
389
385
|
else {
|
|
390
386
|
this.urlData = [];
|
|
391
387
|
this.filteredData = this.datas;
|
|
392
|
-
this._filteredItems.
|
|
388
|
+
this._filteredItems.set(this.filteredData);
|
|
393
389
|
}
|
|
394
|
-
this.formControl.valueChanges.pipe(
|
|
390
|
+
this.formControl.valueChanges.pipe(takeUntilDestroyed(this._destroyRef)).subscribe((value) => {
|
|
395
391
|
this.checklist = value ?? [];
|
|
396
392
|
this._getAllCheckCountState();
|
|
397
393
|
});
|
|
398
394
|
}
|
|
399
|
-
ngOnDestroy() {
|
|
400
|
-
this._unsubscribeAll.next(void (0));
|
|
401
|
-
this._unsubscribeAll.complete();
|
|
402
|
-
}
|
|
403
395
|
trackByFn(index, item) {
|
|
404
396
|
return item.id ?? index;
|
|
405
397
|
}
|
|
406
398
|
filterByQuery(event) {
|
|
407
399
|
this.filteredData = this.datas.filter(data => data.value.toString().toLowerCase().includes(event) ?? data.label.toLowerCase().includes(event));
|
|
408
|
-
this._filteredItems.
|
|
400
|
+
this._filteredItems.set(this.filteredData);
|
|
409
401
|
this._getAllCheckCountState();
|
|
410
402
|
}
|
|
411
403
|
toggleCheckList(data, event) {
|
|
@@ -471,10 +463,10 @@ class CmatCheckListTypeComponent extends FieldType {
|
|
|
471
463
|
}
|
|
472
464
|
}
|
|
473
465
|
}
|
|
474
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.
|
|
475
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.
|
|
466
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: CmatCheckListTypeComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
467
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.8", type: CmatCheckListTypeComponent, isStandalone: true, selector: "cmat-checklist-type", usesInheritance: true, ngImport: i0, template: "<div class=\"flex flex-col\">\r\n <div class=\"p-2\">\r\n @if(props.label){\r\n <legend class=\"text-lg\">\r\n {{ props.label }}\r\n @if(props.required){\r\n <span>*</span>\r\n }\r\n </legend>\r\n }\r\n @if(props.description){\r\n <p>{{ props.description }}</p>\r\n }\r\n </div>\r\n\r\n <div class=\"w-full h-full rounded-sm border shadow-sm bg-card\" [tabIndex]=\"props.tabindex\">\r\n <div class=\"flex items-center m-1 mr-2 min-h-12 print:hidden\">\r\n @if (props.showAllCheck&&!props.disabled) {\r\n <div>\r\n <mat-checkbox class=\"flex items-center h-10 min-h-10 m-1\" [color]=\"'primary'\" [checked]=\"isChecked\"\r\n [indeterminate]=\"isIndeterminate\" (change)=\"allCheckChange($event.checked)\">\r\n </mat-checkbox>\r\n </div>\r\n }\r\n <div class=\"flex items-center w-full\">\r\n <mat-icon class=\"icon-size-5\" [svgIcon]=\"'heroicons_solid:magnifying-glass'\"></mat-icon>\r\n <div class=\"ml-2\">\r\n <input #query class=\"w-full min-w-0 py-1 border-none\" type=\"text\"\r\n placeholder=\"\u8F93\u5165\u8FC7\u6EE4\u4FE1\u606F\" (input)=\"filterByQuery(query.value)\">\r\n </div>\r\n </div>\r\n </div>\r\n <div class=\"border-t overflow-y-auto scrollbar-custom\"\r\n [ngClass]=\"props.controlMaxHeight?'max-h-64 sm:max-h-128 lg:max-h-64':''\">\r\n @if ((filteredItems$ | async); as filteredItems) {\r\n @if(filteredItems.length>0){\r\n @for (data of filteredItems; track trackByFn($index, data)) {\r\n <div role=\"presentation\" class=\"flex items-center pl-2 pr-4 py-2 cursor-pointer hover:bg-hover\" matRipple\r\n (click)=\"toggleCheckList(data,$event)\">\r\n <mat-checkbox class=\"flex items-center h-10 min-h-10 pointer-events-none\" disableRipple [color]=\"'primary'\"\r\n [checked]=\"isCheck(data)\" [value]=\"data\" [disabled]=\"data.disabled||props.disabled\">\r\n <div class=\"flex flex-col flex-auto\">\r\n <div class=\"font-medium leading-5 truncate\">{{data.label}}</div>\r\n </div>\r\n </mat-checkbox>\r\n </div>\r\n }\r\n } @else {\r\n <div\r\n class=\"flex flex-auto flex-col items-center justify-center bg-slate-100 dark:bg-transparent h-64 sm:h-128 lg:h-64\">\r\n <mat-icon class=\"icon-size-24\" [svgIcon]=\"'heroicons_outline:document-magnifying-glass'\"></mat-icon>\r\n <div class=\"mt-4 text-2xl font-bold tracking-tight text-secondary\">\u6CA1\u6709\u6570\u636E!</div>\r\n </div>\r\n }\r\n }\r\n </div>\r\n </div>\r\n</div>", styles: [":host{width:100%}\n"], dependencies: [{ kind: "ngmodule", type: MatCheckboxModule }, { kind: "component", type: i1$5.MatCheckbox, selector: "mat-checkbox", inputs: ["aria-label", "aria-labelledby", "aria-describedby", "aria-expanded", "aria-controls", "aria-owns", "id", "required", "labelPosition", "name", "value", "disableRipple", "tabIndex", "color", "disabledInteractive", "checked", "disabled", "indeterminate"], outputs: ["change", "indeterminateChange"], exportAs: ["matCheckbox"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i2.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "ngmodule", type: MatRippleModule }, { kind: "directive", type: i3$1.MatRipple, selector: "[mat-ripple], [matRipple]", inputs: ["matRippleColor", "matRippleUnbounded", "matRippleCentered", "matRippleRadius", "matRippleAnimation", "matRippleDisabled", "matRippleTrigger"], exportAs: ["matRipple"] }, { kind: "pipe", type: AsyncPipe, name: "async" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
476
468
|
}
|
|
477
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.
|
|
469
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: CmatCheckListTypeComponent, decorators: [{
|
|
478
470
|
type: Component,
|
|
479
471
|
args: [{ selector: 'cmat-checklist-type', encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, imports: [MatCheckboxModule, MatIconModule, NgClass, MatRippleModule, AsyncPipe], template: "<div class=\"flex flex-col\">\r\n <div class=\"p-2\">\r\n @if(props.label){\r\n <legend class=\"text-lg\">\r\n {{ props.label }}\r\n @if(props.required){\r\n <span>*</span>\r\n }\r\n </legend>\r\n }\r\n @if(props.description){\r\n <p>{{ props.description }}</p>\r\n }\r\n </div>\r\n\r\n <div class=\"w-full h-full rounded-sm border shadow-sm bg-card\" [tabIndex]=\"props.tabindex\">\r\n <div class=\"flex items-center m-1 mr-2 min-h-12 print:hidden\">\r\n @if (props.showAllCheck&&!props.disabled) {\r\n <div>\r\n <mat-checkbox class=\"flex items-center h-10 min-h-10 m-1\" [color]=\"'primary'\" [checked]=\"isChecked\"\r\n [indeterminate]=\"isIndeterminate\" (change)=\"allCheckChange($event.checked)\">\r\n </mat-checkbox>\r\n </div>\r\n }\r\n <div class=\"flex items-center w-full\">\r\n <mat-icon class=\"icon-size-5\" [svgIcon]=\"'heroicons_solid:magnifying-glass'\"></mat-icon>\r\n <div class=\"ml-2\">\r\n <input #query class=\"w-full min-w-0 py-1 border-none\" type=\"text\"\r\n placeholder=\"\u8F93\u5165\u8FC7\u6EE4\u4FE1\u606F\" (input)=\"filterByQuery(query.value)\">\r\n </div>\r\n </div>\r\n </div>\r\n <div class=\"border-t overflow-y-auto scrollbar-custom\"\r\n [ngClass]=\"props.controlMaxHeight?'max-h-64 sm:max-h-128 lg:max-h-64':''\">\r\n @if ((filteredItems$ | async); as filteredItems) {\r\n @if(filteredItems.length>0){\r\n @for (data of filteredItems; track trackByFn($index, data)) {\r\n <div role=\"presentation\" class=\"flex items-center pl-2 pr-4 py-2 cursor-pointer hover:bg-hover\" matRipple\r\n (click)=\"toggleCheckList(data,$event)\">\r\n <mat-checkbox class=\"flex items-center h-10 min-h-10 pointer-events-none\" disableRipple [color]=\"'primary'\"\r\n [checked]=\"isCheck(data)\" [value]=\"data\" [disabled]=\"data.disabled||props.disabled\">\r\n <div class=\"flex flex-col flex-auto\">\r\n <div class=\"font-medium leading-5 truncate\">{{data.label}}</div>\r\n </div>\r\n </mat-checkbox>\r\n </div>\r\n }\r\n } @else {\r\n <div\r\n class=\"flex flex-auto flex-col items-center justify-center bg-slate-100 dark:bg-transparent h-64 sm:h-128 lg:h-64\">\r\n <mat-icon class=\"icon-size-24\" [svgIcon]=\"'heroicons_outline:document-magnifying-glass'\"></mat-icon>\r\n <div class=\"mt-4 text-2xl font-bold tracking-tight text-secondary\">\u6CA1\u6709\u6570\u636E!</div>\r\n </div>\r\n }\r\n }\r\n </div>\r\n </div>\r\n</div>", styles: [":host{width:100%}\n"] }]
|
|
480
472
|
}], ctorParameters: () => [] });
|
|
@@ -483,7 +475,7 @@ class CmatChipsInputTypeComponent extends FieldType {
|
|
|
483
475
|
constructor() {
|
|
484
476
|
super();
|
|
485
477
|
this._http = inject(HttpClient);
|
|
486
|
-
this.
|
|
478
|
+
this._destroyRef = inject(DestroyRef);
|
|
487
479
|
}
|
|
488
480
|
get autocompleteText() {
|
|
489
481
|
return this.autocompleteUrlData?.length > 0 ? this.autocompleteUrlData : this.props?.autocompleteText?.split(',') ?? [];
|
|
@@ -491,7 +483,7 @@ class CmatChipsInputTypeComponent extends FieldType {
|
|
|
491
483
|
ngOnInit() {
|
|
492
484
|
const url = this.props?.domain?.url;
|
|
493
485
|
if (url && this.props?.domain?.code && this.props?.domain?.key && this.props?.domain?.value) {
|
|
494
|
-
this._http.get(url).pipe(
|
|
486
|
+
this._http.get(url).pipe(takeUntilDestroyed(this._destroyRef)).subscribe((data) => {
|
|
495
487
|
if (data) {
|
|
496
488
|
const datas = data.filter((i) => {
|
|
497
489
|
if (this.field.props?.domain?.key)
|
|
@@ -514,23 +506,19 @@ class CmatChipsInputTypeComponent extends FieldType {
|
|
|
514
506
|
this.autocompleteUrlData = [];
|
|
515
507
|
}
|
|
516
508
|
}
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
this._unsubscribeAll.complete();
|
|
520
|
-
}
|
|
521
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.7", ngImport: i0, type: CmatChipsInputTypeComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
522
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.7", type: CmatChipsInputTypeComponent, isStandalone: true, selector: "cmat-chips-input-type", usesInheritance: true, ngImport: i0, template: "<cmat-chip-input [hasAutocomplete]=\"props.hasAutocomplete??false\" [formControl]=\"formControl\"\r\n [placeholder]=\"placeholder\" [selectableOptions]=\"autocompleteText\" [tabIndex]=\"props.tabindex\" [required]=\"required\"></cmat-chip-input>", styles: [":host{width:100%}\n"], dependencies: [{ kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1$4.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$4.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i1$4.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "component", type: CmatChipInputComponent, selector: "cmat-chip-input", inputs: ["id", "selectableOptions", "hasAutocomplete", "outputIsString", "separatorKey", "placeholder", "value", "required", "disabled"], exportAs: ["cmatChipInput"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
509
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: CmatChipsInputTypeComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
510
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.8", type: CmatChipsInputTypeComponent, isStandalone: true, selector: "cmat-chips-input-type", usesInheritance: true, ngImport: i0, template: "<cmat-chip-input [hasAutocomplete]=\"props.hasAutocomplete??false\" [formControl]=\"formControl\"\r\n [placeholder]=\"placeholder\" [selectableOptions]=\"autocompleteText\" [tabIndex]=\"props.tabindex\" [required]=\"required\"></cmat-chip-input>", styles: [":host{width:100%}\n"], dependencies: [{ kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1$4.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$4.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i1$4.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "component", type: CmatChipInputComponent, selector: "cmat-chip-input", inputs: ["id", "selectableOptions", "hasAutocomplete", "outputIsString", "separatorKey", "placeholder", "value", "required", "disabled"], exportAs: ["cmatChipInput"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
523
511
|
}
|
|
524
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.
|
|
512
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: CmatChipsInputTypeComponent, decorators: [{
|
|
525
513
|
type: Component,
|
|
526
514
|
args: [{ selector: 'cmat-chips-input-type', changeDetection: ChangeDetectionStrategy.OnPush, imports: [ReactiveFormsModule, CmatChipInputComponent], template: "<cmat-chip-input [hasAutocomplete]=\"props.hasAutocomplete??false\" [formControl]=\"formControl\"\r\n [placeholder]=\"placeholder\" [selectableOptions]=\"autocompleteText\" [tabIndex]=\"props.tabindex\" [required]=\"required\"></cmat-chip-input>", styles: [":host{width:100%}\n"] }]
|
|
527
515
|
}], ctorParameters: () => [] });
|
|
528
516
|
|
|
529
517
|
class CmatColorPickerTypeComponent extends FieldType$1 {
|
|
530
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.
|
|
531
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.
|
|
518
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: CmatColorPickerTypeComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
519
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.8", type: CmatColorPickerTypeComponent, isStandalone: true, selector: "cmat-color-picker-type", usesInheritance: true, ngImport: i0, template: "<cmat-material-color-picker [title]=\"props.label??''\" [formControl]=\"formControl\" [readonly]=\"disabled\"\r\n [tabindex]=\"props.tabindex\"></cmat-material-color-picker>", styles: [":host{width:100%}\n"], dependencies: [{ kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1$4.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$4.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "component", type: CmatMaterialColorPickerComponent, selector: "cmat-material-color-picker", inputs: ["color", "title", "readonly"], outputs: ["colorChanged"], exportAs: ["cmatMaterialColorPicker"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
532
520
|
}
|
|
533
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.
|
|
521
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: CmatColorPickerTypeComponent, decorators: [{
|
|
534
522
|
type: Component,
|
|
535
523
|
args: [{ selector: 'cmat-color-picker-type', changeDetection: ChangeDetectionStrategy.OnPush, imports: [ReactiveFormsModule, CmatMaterialColorPickerComponent], template: "<cmat-material-color-picker [title]=\"props.label??''\" [formControl]=\"formControl\" [readonly]=\"disabled\"\r\n [tabindex]=\"props.tabindex\"></cmat-material-color-picker>", styles: [":host{width:100%}\n"] }]
|
|
536
524
|
}] });
|
|
@@ -546,10 +534,10 @@ class CmatDateRangeTypeComponent extends FieldType {
|
|
|
546
534
|
},
|
|
547
535
|
};
|
|
548
536
|
}
|
|
549
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.
|
|
550
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.
|
|
537
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: CmatDateRangeTypeComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
538
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.8", type: CmatDateRangeTypeComponent, isStandalone: true, selector: "cmat-date-range-type", usesInheritance: true, ngImport: i0, template: "<cmat-date-range [dateFormat]=\"props.dateFormat\" [timeFormat]=\"props.timeFormat\" [timeRange]=\"props.timeRange\" \r\n[formControl]=\"formControl\" [tabindex]=\"props.tabindex\" [readonly]=\"disabled\">\r\n</cmat-date-range>", styles: [":host{width:100%}\n"], dependencies: [{ kind: "component", type: CmatDateRangeComponent, selector: "cmat-date-range", inputs: ["controlClass", "initData", "readonly", "dateFormat", "timeFormat", "timeRange", "range"], outputs: ["rangeChanged"], exportAs: ["cmatDateRange"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1$4.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$4.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
551
539
|
}
|
|
552
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.
|
|
540
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: CmatDateRangeTypeComponent, decorators: [{
|
|
553
541
|
type: Component,
|
|
554
542
|
args: [{ selector: 'cmat-date-range-type', changeDetection: ChangeDetectionStrategy.OnPush, imports: [CmatDateRangeComponent, ReactiveFormsModule], template: "<cmat-date-range [dateFormat]=\"props.dateFormat\" [timeFormat]=\"props.timeFormat\" [timeRange]=\"props.timeRange\" \r\n[formControl]=\"formControl\" [tabindex]=\"props.tabindex\" [readonly]=\"disabled\">\r\n</cmat-date-range>", styles: [":host{width:100%}\n"] }]
|
|
555
543
|
}] });
|
|
@@ -572,24 +560,20 @@ class CmatDatepickerTypeComponent extends FieldType {
|
|
|
572
560
|
};
|
|
573
561
|
this._changeDetectorRef = inject(ChangeDetectorRef);
|
|
574
562
|
this._cmatMediaWatcherService = inject(CmatMediaWatcherService);
|
|
575
|
-
this.
|
|
563
|
+
this._destroyRef = inject(DestroyRef);
|
|
576
564
|
}
|
|
577
565
|
ngOnInit() {
|
|
578
566
|
this._cmatMediaWatcherService.onMediaChange$
|
|
579
|
-
.pipe(
|
|
567
|
+
.pipe(takeUntilDestroyed(this._destroyRef))
|
|
580
568
|
.subscribe(({ matchingAliases }) => {
|
|
581
569
|
this.isHandSet = !matchingAliases.includes('lg');
|
|
582
570
|
this._changeDetectorRef.markForCheck();
|
|
583
571
|
});
|
|
584
572
|
}
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
this._unsubscribeAll.complete();
|
|
588
|
-
}
|
|
589
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.7", ngImport: i0, type: CmatDatepickerTypeComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
590
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.7", type: CmatDatepickerTypeComponent, isStandalone: true, selector: "cmat-datepicker-type", usesInheritance: true, ngImport: i0, template: "@if(props.togglePosition==='left'){\r\n<cmat-datetimepicker-toggle matPrefix [for]=\"datetimePicker\" [disabled]=\"disabled\"></cmat-datetimepicker-toggle>\r\n}\r\n\r\n<cmat-datetimepicker #datetimePicker openOnFocus=\"true\" [startView]=\"props.startView\" [mode]=\"props.mode\"\r\n [timeInterval]=\"props.timeInterval\" [twelvehour]=\"props.twelvehour\" [type]=\"props.type\"\r\n [multiYearSelector]=\"props.multiYearSelector\" [timeInput]=\"props.timeInput\" [touchUi]=\"isHandSet\"\r\n [disabled]=\"disabled\"></cmat-datetimepicker>\r\n\r\n<input autocomplete=\"false\" matInput [cmatDatetimepicker]=\"datetimePicker\" [required]=\"required\"\r\n [formControl]=\"formControl\" [placeholder]=\"placeholder\" />\r\n\r\n@if(props.togglePosition==='right'){\r\n<cmat-datetimepicker-toggle matSuffix [for]=\"datetimePicker\" [disabled]=\"disabled\"></cmat-datetimepicker-toggle>\r\n}", styles: [":host{width:100%;display:flex}\n"], dependencies: [{ kind: "component", type: CmatDatetimepickerToggleComponent, selector: "cmat-datetimepicker-toggle", inputs: ["for", "tabIndex", "aria-label", "disableRipple", "disabled"], exportAs: ["cmatDatetimepickerToggle"] }, { kind: "directive", type: CmatDatetimepickerInputDirective, selector: "input[cmatDatetimepicker]", inputs: ["cmatDatetimepicker", "cmatDatepickerFilter", "value", "min", "max", "disabled"], outputs: ["dateChange", "dateInput"], exportAs: ["cmatDatepickerInput"] }, { kind: "component", type: CmatDatetimepickerComponent, selector: "cmat-datetimepicker", inputs: ["startView", "mode", "timeInterval", "preventSameDateTimeSelection", "xPosition", "yPosition", "multiYearSelector", "twelvehour", "panelClass", "opened", "color", "startAt", "type", "timeInput", "touchUi", "disabled", "restoreFocus"], outputs: ["selectedChanged", "openedStream", "closedStream", "viewChanged"], exportAs: ["cmatDatetimepicker"] }, { kind: "ngmodule", type: MatInputModule }, { kind: "directive", type: i1$6.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly", "disabledInteractive"], exportAs: ["matInput"] }, { kind: "directive", type: i1$2.MatPrefix, selector: "[matPrefix], [matIconPrefix], [matTextPrefix]", inputs: ["matTextPrefix"] }, { kind: "directive", type: i1$2.MatSuffix, selector: "[matSuffix], [matIconSuffix], [matTextSuffix]", inputs: ["matTextSuffix"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1$4.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1$4.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$4.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1$4.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
573
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: CmatDatepickerTypeComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
574
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.8", type: CmatDatepickerTypeComponent, isStandalone: true, selector: "cmat-datepicker-type", usesInheritance: true, ngImport: i0, template: "@if(props.togglePosition==='left'){\r\n<cmat-datetimepicker-toggle matPrefix [for]=\"datetimePicker\" [disabled]=\"disabled\"></cmat-datetimepicker-toggle>\r\n}\r\n\r\n<cmat-datetimepicker #datetimePicker openOnFocus=\"true\" [startView]=\"props.startView\" [mode]=\"props.mode\"\r\n [timeInterval]=\"props.timeInterval\" [twelvehour]=\"props.twelvehour\" [type]=\"props.type\"\r\n [multiYearSelector]=\"props.multiYearSelector\" [timeInput]=\"props.timeInput\" [touchUi]=\"isHandSet\"\r\n [disabled]=\"disabled\"></cmat-datetimepicker>\r\n\r\n<input autocomplete=\"false\" matInput [cmatDatetimepicker]=\"datetimePicker\" [required]=\"required\"\r\n [formControl]=\"formControl\" [placeholder]=\"placeholder\" />\r\n\r\n@if(props.togglePosition==='right'){\r\n<cmat-datetimepicker-toggle matSuffix [for]=\"datetimePicker\" [disabled]=\"disabled\"></cmat-datetimepicker-toggle>\r\n}", styles: [":host{width:100%;display:flex}\n"], dependencies: [{ kind: "component", type: CmatDatetimepickerToggleComponent, selector: "cmat-datetimepicker-toggle", inputs: ["for", "tabIndex", "aria-label", "disableRipple", "disabled"], exportAs: ["cmatDatetimepickerToggle"] }, { kind: "directive", type: CmatDatetimepickerInputDirective, selector: "input[cmatDatetimepicker]", inputs: ["cmatDatetimepicker", "cmatDatepickerFilter", "value", "min", "max", "disabled"], outputs: ["dateChange", "dateInput"], exportAs: ["cmatDatepickerInput"] }, { kind: "component", type: CmatDatetimepickerComponent, selector: "cmat-datetimepicker", inputs: ["startView", "mode", "timeInterval", "preventSameDateTimeSelection", "xPosition", "yPosition", "multiYearSelector", "twelvehour", "panelClass", "opened", "color", "startAt", "type", "timeInput", "touchUi", "disabled", "restoreFocus"], outputs: ["selectedChanged", "openedStream", "closedStream", "viewChanged"], exportAs: ["cmatDatetimepicker"] }, { kind: "ngmodule", type: MatInputModule }, { kind: "directive", type: i1$6.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly", "disabledInteractive"], exportAs: ["matInput"] }, { kind: "directive", type: i1$2.MatPrefix, selector: "[matPrefix], [matIconPrefix], [matTextPrefix]", inputs: ["matTextPrefix"] }, { kind: "directive", type: i1$2.MatSuffix, selector: "[matSuffix], [matIconSuffix], [matTextSuffix]", inputs: ["matTextSuffix"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1$4.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1$4.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$4.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1$4.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
591
575
|
}
|
|
592
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.
|
|
576
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: CmatDatepickerTypeComponent, decorators: [{
|
|
593
577
|
type: Component,
|
|
594
578
|
args: [{ selector: 'cmat-datepicker-type', changeDetection: ChangeDetectionStrategy.OnPush, imports: [CmatDatetimepickerToggleComponent, CmatDatetimepickerInputDirective, CmatDatetimepickerComponent, MatInputModule, FormsModule, ReactiveFormsModule], template: "@if(props.togglePosition==='left'){\r\n<cmat-datetimepicker-toggle matPrefix [for]=\"datetimePicker\" [disabled]=\"disabled\"></cmat-datetimepicker-toggle>\r\n}\r\n\r\n<cmat-datetimepicker #datetimePicker openOnFocus=\"true\" [startView]=\"props.startView\" [mode]=\"props.mode\"\r\n [timeInterval]=\"props.timeInterval\" [twelvehour]=\"props.twelvehour\" [type]=\"props.type\"\r\n [multiYearSelector]=\"props.multiYearSelector\" [timeInput]=\"props.timeInput\" [touchUi]=\"isHandSet\"\r\n [disabled]=\"disabled\"></cmat-datetimepicker>\r\n\r\n<input autocomplete=\"false\" matInput [cmatDatetimepicker]=\"datetimePicker\" [required]=\"required\"\r\n [formControl]=\"formControl\" [placeholder]=\"placeholder\" />\r\n\r\n@if(props.togglePosition==='right'){\r\n<cmat-datetimepicker-toggle matSuffix [for]=\"datetimePicker\" [disabled]=\"disabled\"></cmat-datetimepicker-toggle>\r\n}", styles: [":host{width:100%;display:flex}\n"] }]
|
|
595
579
|
}], ctorParameters: () => [] });
|
|
@@ -606,11 +590,12 @@ class CmatMultiCheckboxTypeComponent extends FieldType {
|
|
|
606
590
|
},
|
|
607
591
|
};
|
|
608
592
|
this._http = inject(HttpClient);
|
|
609
|
-
this.
|
|
610
|
-
this.
|
|
593
|
+
this._destroyRef = inject(DestroyRef);
|
|
594
|
+
this._urlData = signal([], ...(ngDevMode ? [{ debugName: "_urlData" }] : /* istanbul ignore next */ []));
|
|
595
|
+
this._urlData$ = toObservable(this._urlData);
|
|
611
596
|
}
|
|
612
597
|
get urlData$() {
|
|
613
|
-
return this._urlData
|
|
598
|
+
return this._urlData$;
|
|
614
599
|
}
|
|
615
600
|
onChange(value, checked) {
|
|
616
601
|
this.formControl.markAsDirty();
|
|
@@ -627,7 +612,7 @@ class CmatMultiCheckboxTypeComponent extends FieldType {
|
|
|
627
612
|
ngOnInit() {
|
|
628
613
|
const url = this.field.props?.domain?.url;
|
|
629
614
|
if (url && this.field.props?.domain?.code && this.field.props?.domain?.key && this.field.props?.domain?.value) {
|
|
630
|
-
this._http.get(url).pipe(
|
|
615
|
+
this._http.get(url).pipe(takeUntilDestroyed(this._destroyRef)).subscribe((data) => {
|
|
631
616
|
if (data) {
|
|
632
617
|
const datas = data.filter((i) => {
|
|
633
618
|
if (this.field.props?.domain?.key)
|
|
@@ -635,25 +620,21 @@ class CmatMultiCheckboxTypeComponent extends FieldType {
|
|
|
635
620
|
return false;
|
|
636
621
|
});
|
|
637
622
|
if (datas && this.field.props?.domain?.value) {
|
|
638
|
-
this._urlData.
|
|
623
|
+
this._urlData.set(datas[0][this.field.props?.domain?.value]);
|
|
639
624
|
}
|
|
640
625
|
else {
|
|
641
|
-
this._urlData.
|
|
626
|
+
this._urlData.set([]);
|
|
642
627
|
}
|
|
643
628
|
}
|
|
644
629
|
else {
|
|
645
|
-
this._urlData.
|
|
630
|
+
this._urlData.set([]);
|
|
646
631
|
}
|
|
647
632
|
});
|
|
648
633
|
}
|
|
649
634
|
else {
|
|
650
|
-
this._urlData.
|
|
635
|
+
this._urlData.set([]);
|
|
651
636
|
}
|
|
652
637
|
}
|
|
653
|
-
ngOnDestroy() {
|
|
654
|
-
this._unsubscribeAll.next(void 0);
|
|
655
|
-
this._unsubscribeAll.complete();
|
|
656
|
-
}
|
|
657
638
|
isChecked(option) {
|
|
658
639
|
const value = this.formControl.value;
|
|
659
640
|
return value && (this.props.type === 'array' ? value.includes(option.value) : value[option.value]);
|
|
@@ -661,10 +642,10 @@ class CmatMultiCheckboxTypeComponent extends FieldType {
|
|
|
661
642
|
trackByFn(index) {
|
|
662
643
|
return index;
|
|
663
644
|
}
|
|
664
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.
|
|
665
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.
|
|
645
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: CmatMultiCheckboxTypeComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
646
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.8", type: CmatMultiCheckboxTypeComponent, isStandalone: true, selector: "cmat-multicheckbox-type", viewQueries: [{ propertyName: "checkboxes", predicate: MatCheckbox, descendants: true }], usesInheritance: true, ngImport: i0, template: "@if ((urlData$ | async); as urlData) {\r\n@for (option of (urlData.length > 0 ? urlData : (props.options | formlySelectOptions : field | async)); track\r\ntrackByFn($index)) {\r\n<mat-checkbox [tabIndex]=\"props.tabindex\" [color]=\"props.color\" [labelPosition]=\"props.labelPosition\"\r\n [checked]=\"isChecked(option)\" [disabled]=\"formControl.disabled || option.disabled\"\r\n (change)=\"onChange(option.value, $event.checked)\">\r\n {{ option.label }}\r\n</mat-checkbox>\r\n}\r\n}", styles: [":host{width:100%}\n"], dependencies: [{ kind: "ngmodule", type: MatCheckboxModule }, { kind: "component", type: i1$5.MatCheckbox, selector: "mat-checkbox", inputs: ["aria-label", "aria-labelledby", "aria-describedby", "aria-expanded", "aria-controls", "aria-owns", "id", "required", "labelPosition", "name", "value", "disableRipple", "tabIndex", "color", "disabledInteractive", "checked", "disabled", "indeterminate"], outputs: ["change", "indeterminateChange"], exportAs: ["matCheckbox"] }, { kind: "ngmodule", type: FormlySelectModule }, { kind: "pipe", type: AsyncPipe, name: "async" }, { kind: "pipe", type: i2$2.LegacyFormlySelectOptionsPipe, name: "formlySelectOptions" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
666
647
|
}
|
|
667
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.
|
|
648
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: CmatMultiCheckboxTypeComponent, decorators: [{
|
|
668
649
|
type: Component,
|
|
669
650
|
args: [{ selector: 'cmat-multicheckbox-type', changeDetection: ChangeDetectionStrategy.OnPush, imports: [MatCheckboxModule, AsyncPipe, FormlySelectModule], template: "@if ((urlData$ | async); as urlData) {\r\n@for (option of (urlData.length > 0 ? urlData : (props.options | formlySelectOptions : field | async)); track\r\ntrackByFn($index)) {\r\n<mat-checkbox [tabIndex]=\"props.tabindex\" [color]=\"props.color\" [labelPosition]=\"props.labelPosition\"\r\n [checked]=\"isChecked(option)\" [disabled]=\"formControl.disabled || option.disabled\"\r\n (change)=\"onChange(option.value, $event.checked)\">\r\n {{ option.label }}\r\n</mat-checkbox>\r\n}\r\n}", styles: [":host{width:100%}\n"] }]
|
|
670
651
|
}], ctorParameters: () => [], propDecorators: { checkboxes: [{
|
|
@@ -683,10 +664,10 @@ class CmatNumberTypeComponent extends FieldType {
|
|
|
683
664
|
},
|
|
684
665
|
};
|
|
685
666
|
}
|
|
686
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.
|
|
687
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.
|
|
667
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: CmatNumberTypeComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
668
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.8", type: CmatNumberTypeComponent, isStandalone: true, selector: "cmat-number-type", usesInheritance: true, ngImport: i0, template: "<input matInput cmatDigitOnly [formControl]=\"formControl\" [readonly]=\"props.readonly\" [placeholder]=\"placeholder\" [tabIndex]=\"props.tabindex\" [required]=\"required\" [decimal]=\"props.decimal\" [allowNegatives]=\"true\" [allowPaste]=\"true\"\r\n [min]=\"props.min\" [max]=\"props.max\" [errorStateMatcher]=\"errorStateMatcher\">\r\n\r\n", styles: [":host{width:100%}\n"], dependencies: [{ kind: "directive", type: CmatDigitOnlyDirective, selector: "[cmatDigitOnly]", inputs: ["decimal", "decimalSeparator", "allowNegatives", "allowPaste", "negativeSign", "min", "max", "pattern"] }, { kind: "ngmodule", type: MatInputModule }, { kind: "directive", type: i1$6.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly", "disabledInteractive"], exportAs: ["matInput"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1$4.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1$4.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$4.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i1$4.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
688
669
|
}
|
|
689
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.
|
|
670
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: CmatNumberTypeComponent, decorators: [{
|
|
690
671
|
type: Component,
|
|
691
672
|
args: [{ selector: 'cmat-number-type', changeDetection: ChangeDetectionStrategy.OnPush, imports: [CmatDigitOnlyDirective, MatInputModule, ReactiveFormsModule], template: "<input matInput cmatDigitOnly [formControl]=\"formControl\" [readonly]=\"props.readonly\" [placeholder]=\"placeholder\" [tabIndex]=\"props.tabindex\" [required]=\"required\" [decimal]=\"props.decimal\" [allowNegatives]=\"true\" [allowPaste]=\"true\"\r\n [min]=\"props.min\" [max]=\"props.max\" [errorStateMatcher]=\"errorStateMatcher\">\r\n\r\n", styles: [":host{width:100%}\n"] }]
|
|
692
673
|
}] });
|
|
@@ -703,10 +684,10 @@ class CmatRatingTypeComponent extends FieldType {
|
|
|
703
684
|
},
|
|
704
685
|
};
|
|
705
686
|
}
|
|
706
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.
|
|
707
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.
|
|
687
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: CmatRatingTypeComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
688
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.8", type: CmatRatingTypeComponent, isStandalone: true, selector: "cmat-rating-type", usesInheritance: true, ngImport: i0, template: "@if(props.customColor&&props.customColor.indexOf('#')>-1){\r\n<div [ngStyle]=\"{'color': props.customColor}\">\r\n <cmat-rating [formControl]=\"formControl\" [tabIndex]=\"props.tabindex\" [stars]=\"props.stars\"\r\n [readonly]=\"props.readonly\" [hover]=\"props.hover\" [half]=\"props.half\" [showMode]=\"props.showMode\"></cmat-rating>\r\n</div>\r\n}@else{\r\n<cmat-rating [formControl]=\"formControl\" [tabIndex]=\"props.tabindex\" [stars]=\"props.stars\" [readonly]=\"props.readonly\"\r\n [hover]=\"props.hover\" [half]=\"props.half\" [color]=\"props.customColor\" [showMode]=\"props.showMode\"></cmat-rating>\r\n}", styles: [":host{width:100%}\n"], dependencies: [{ kind: "component", type: CmatRatingComponent, selector: "cmat-rating", inputs: ["id", "stars", "readonly", "hover", "half", "color", "showMode", "placeholder", "value", "required", "disabled"], outputs: ["valueChange"], exportAs: ["cmatRating"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1$4.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$4.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "directive", type: NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
708
689
|
}
|
|
709
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.
|
|
690
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: CmatRatingTypeComponent, decorators: [{
|
|
710
691
|
type: Component,
|
|
711
692
|
args: [{ selector: 'cmat-rating-type', changeDetection: ChangeDetectionStrategy.OnPush, imports: [CmatRatingComponent, ReactiveFormsModule, NgStyle], template: "@if(props.customColor&&props.customColor.indexOf('#')>-1){\r\n<div [ngStyle]=\"{'color': props.customColor}\">\r\n <cmat-rating [formControl]=\"formControl\" [tabIndex]=\"props.tabindex\" [stars]=\"props.stars\"\r\n [readonly]=\"props.readonly\" [hover]=\"props.hover\" [half]=\"props.half\" [showMode]=\"props.showMode\"></cmat-rating>\r\n</div>\r\n}@else{\r\n<cmat-rating [formControl]=\"formControl\" [tabIndex]=\"props.tabindex\" [stars]=\"props.stars\" [readonly]=\"props.readonly\"\r\n [hover]=\"props.hover\" [half]=\"props.half\" [color]=\"props.customColor\" [showMode]=\"props.showMode\"></cmat-rating>\r\n}", styles: [":host{width:100%}\n"] }]
|
|
712
693
|
}] });
|
|
@@ -723,16 +704,17 @@ class CmatRadioTypeComponent extends FieldType {
|
|
|
723
704
|
},
|
|
724
705
|
};
|
|
725
706
|
this._http = inject(HttpClient);
|
|
726
|
-
this._urlData =
|
|
727
|
-
this.
|
|
707
|
+
this._urlData = signal([], ...(ngDevMode ? [{ debugName: "_urlData" }] : /* istanbul ignore next */ []));
|
|
708
|
+
this._destroyRef = inject(DestroyRef);
|
|
709
|
+
this._urlData$ = toObservable(this._urlData);
|
|
728
710
|
}
|
|
729
711
|
get urlData$() {
|
|
730
|
-
return this._urlData
|
|
712
|
+
return this._urlData$;
|
|
731
713
|
}
|
|
732
714
|
ngOnInit() {
|
|
733
715
|
const url = this.field.props?.domain?.url;
|
|
734
716
|
if (url && this.field.props?.domain?.code && this.field.props?.domain?.key && this.field.props?.domain?.value) {
|
|
735
|
-
this._http.get(url).pipe(
|
|
717
|
+
this._http.get(url).pipe(takeUntilDestroyed(this._destroyRef)).subscribe((data) => {
|
|
736
718
|
if (data) {
|
|
737
719
|
const datas = data.filter((i) => {
|
|
738
720
|
if (this.field.props?.domain?.key)
|
|
@@ -740,19 +722,19 @@ class CmatRadioTypeComponent extends FieldType {
|
|
|
740
722
|
return false;
|
|
741
723
|
});
|
|
742
724
|
if (datas && this.field.props?.domain?.value) {
|
|
743
|
-
this._urlData.
|
|
725
|
+
this._urlData.set(datas[0][this.field.props?.domain?.value]);
|
|
744
726
|
}
|
|
745
727
|
else {
|
|
746
|
-
this._urlData.
|
|
728
|
+
this._urlData.set([]);
|
|
747
729
|
}
|
|
748
730
|
}
|
|
749
731
|
else {
|
|
750
|
-
this._urlData.
|
|
732
|
+
this._urlData.set([]);
|
|
751
733
|
}
|
|
752
734
|
});
|
|
753
735
|
}
|
|
754
736
|
else {
|
|
755
|
-
this._urlData.
|
|
737
|
+
this._urlData.set([]);
|
|
756
738
|
}
|
|
757
739
|
}
|
|
758
740
|
ngAfterViewInit() {
|
|
@@ -768,16 +750,14 @@ class CmatRadioTypeComponent extends FieldType {
|
|
|
768
750
|
ngOnDestroy() {
|
|
769
751
|
super.ngOnDestroy();
|
|
770
752
|
this.focusObserver?.unsubscribe();
|
|
771
|
-
this._unsubscribeAll.next(void 0);
|
|
772
|
-
this._unsubscribeAll.complete();
|
|
773
753
|
}
|
|
774
754
|
trackByFn(index) {
|
|
775
755
|
return index;
|
|
776
756
|
}
|
|
777
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.
|
|
778
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.
|
|
757
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: CmatRadioTypeComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
758
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.8", type: CmatRadioTypeComponent, isStandalone: true, selector: "cmat-radio-type", viewQueries: [{ propertyName: "radioGroup", first: true, predicate: MatRadioGroup, descendants: true, static: true }], usesInheritance: true, ngImport: i0, template: "<mat-radio-group [formControl]=\"formControl\" [required]=\"required\" [tabindex]=\"props.tabindex\">\r\n @if ((urlData$ | async); as urlData) {\r\n @for (option of (urlData.length > 0 ? urlData : (props.options | formlySelectOptions : field | async)); track\r\n trackByFn($index)) {\r\n <mat-radio-button [color]=\"props.color\" [labelPosition]=\"props.labelPosition\" [disabled]=\"option.disabled\"\r\n [value]=\"option.value\">\r\n {{ option.label }}\r\n </mat-radio-button>\r\n }\r\n }\r\n</mat-radio-group>", styles: [":host{width:100%}\n"], dependencies: [{ kind: "ngmodule", type: MatRadioModule }, { kind: "directive", type: i1$7.MatRadioGroup, selector: "mat-radio-group", inputs: ["color", "name", "labelPosition", "value", "selected", "disabled", "required", "disabledInteractive"], outputs: ["change"], exportAs: ["matRadioGroup"] }, { kind: "component", type: i1$7.MatRadioButton, selector: "mat-radio-button", inputs: ["id", "name", "aria-label", "aria-labelledby", "aria-describedby", "disableRipple", "tabIndex", "checked", "value", "labelPosition", "disabled", "required", "color", "disabledInteractive"], outputs: ["change"], exportAs: ["matRadioButton"] }, { kind: "ngmodule", type: FormlySelectModule }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1$4.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$4.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i1$4.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "pipe", type: AsyncPipe, name: "async" }, { kind: "pipe", type: i2$2.LegacyFormlySelectOptionsPipe, name: "formlySelectOptions" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
779
759
|
}
|
|
780
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.
|
|
760
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: CmatRadioTypeComponent, decorators: [{
|
|
781
761
|
type: Component,
|
|
782
762
|
args: [{ selector: 'cmat-radio-type', changeDetection: ChangeDetectionStrategy.OnPush, imports: [MatRadioModule, AsyncPipe, FormlySelectModule, ReactiveFormsModule], template: "<mat-radio-group [formControl]=\"formControl\" [required]=\"required\" [tabindex]=\"props.tabindex\">\r\n @if ((urlData$ | async); as urlData) {\r\n @for (option of (urlData.length > 0 ? urlData : (props.options | formlySelectOptions : field | async)); track\r\n trackByFn($index)) {\r\n <mat-radio-button [color]=\"props.color\" [labelPosition]=\"props.labelPosition\" [disabled]=\"option.disabled\"\r\n [value]=\"option.value\">\r\n {{ option.label }}\r\n </mat-radio-button>\r\n }\r\n }\r\n</mat-radio-group>", styles: [":host{width:100%}\n"] }]
|
|
783
763
|
}], ctorParameters: () => [], propDecorators: { radioGroup: [{
|
|
@@ -794,10 +774,10 @@ class CmatRepeatTypeComponent extends FieldArrayType {
|
|
|
794
774
|
},
|
|
795
775
|
};
|
|
796
776
|
}
|
|
797
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.
|
|
798
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.
|
|
777
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: CmatRepeatTypeComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
778
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.8", type: CmatRepeatTypeComponent, isStandalone: true, selector: "cmat-repeat-type", usesInheritance: true, ngImport: i0, template: "<div class=\"mb-2\" [tabIndex]=\"props.tabindex\">\r\n @if(props.label){\r\n <legend class=\"text-lg\">\r\n {{ props.label }}\r\n @if(props.required){\r\n <span>*</span>\r\n }\r\n </legend>\r\n }\r\n\r\n @if(props.description){\r\n <p>{{ props.description }}</p>\r\n }\r\n\r\n <div class=\"mb-2 h-1 border-solid border-b-2\"></div>\r\n <div class=\"flex flex-col repeat-body\">\r\n @for (field of field.fieldGroup; track $index) {\r\n <div class=\"flex flex-row repeat-item\">\r\n <formly-field class=\"repeat-field\" [field]=\"field\"></formly-field>\r\n @if(!props.disabled){\r\n <div class=\"flex items-center pl-2 print:hidden\">\r\n <button matIconButton color=\"warn\" matTooltip=\"\u5220\u9664\" (click)=\"remove($index)\">\r\n <mat-icon color=\"warn\" [svgIcon]=\"'heroicons_outline:trash'\"></mat-icon>\r\n </button>\r\n </div>\r\n }\r\n </div>\r\n }\r\n </div>\r\n\r\n @if(!props.disabled){\r\n <div class=\"mt-2 print:hidden\">\r\n <button matButton=\"filled\" color=\"primary\" (click)=\"add()\">{{ props.addText}}</button>\r\n </div>\r\n }\r\n\r\n</div>", styles: [":host{width:100%}::ng-deep .repeat-body .repeat-item:not(:first-child) .repeat-field .mat-mdc-form-field-infix .mat-mdc-floating-label{display:none!important}::ng-deep .repeat-body .repeat-item:not(:first-child) .repeat-field .mat-mdc-form-field-subscript-wrapper{display:none!important}::ng-deep .repeat-body .repeat-item:not(:first-child) .repeat-field .mat-mdc-text-field-wrapper{margin-top:8px}\n"], dependencies: [{ kind: "ngmodule", type: FormlyModule }, { kind: "component", type: i1$3.LegacyFormlyField, selector: "formly-field" }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i2.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i3.MatButton, selector: " button[matButton], a[matButton], button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button], a[mat-button], a[mat-raised-button], a[mat-flat-button], a[mat-stroked-button] ", inputs: ["matButton"], exportAs: ["matButton", "matAnchor"] }, { kind: "component", type: i3.MatIconButton, selector: "button[mat-icon-button], a[mat-icon-button], button[matIconButton], a[matIconButton]", exportAs: ["matButton", "matAnchor"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
799
779
|
}
|
|
800
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.
|
|
780
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: CmatRepeatTypeComponent, decorators: [{
|
|
801
781
|
type: Component,
|
|
802
782
|
args: [{ selector: 'cmat-repeat-type', changeDetection: ChangeDetectionStrategy.OnPush, imports: [FormlyModule, MatIconModule, MatButtonModule], template: "<div class=\"mb-2\" [tabIndex]=\"props.tabindex\">\r\n @if(props.label){\r\n <legend class=\"text-lg\">\r\n {{ props.label }}\r\n @if(props.required){\r\n <span>*</span>\r\n }\r\n </legend>\r\n }\r\n\r\n @if(props.description){\r\n <p>{{ props.description }}</p>\r\n }\r\n\r\n <div class=\"mb-2 h-1 border-solid border-b-2\"></div>\r\n <div class=\"flex flex-col repeat-body\">\r\n @for (field of field.fieldGroup; track $index) {\r\n <div class=\"flex flex-row repeat-item\">\r\n <formly-field class=\"repeat-field\" [field]=\"field\"></formly-field>\r\n @if(!props.disabled){\r\n <div class=\"flex items-center pl-2 print:hidden\">\r\n <button matIconButton color=\"warn\" matTooltip=\"\u5220\u9664\" (click)=\"remove($index)\">\r\n <mat-icon color=\"warn\" [svgIcon]=\"'heroicons_outline:trash'\"></mat-icon>\r\n </button>\r\n </div>\r\n }\r\n </div>\r\n }\r\n </div>\r\n\r\n @if(!props.disabled){\r\n <div class=\"mt-2 print:hidden\">\r\n <button matButton=\"filled\" color=\"primary\" (click)=\"add()\">{{ props.addText}}</button>\r\n </div>\r\n }\r\n\r\n</div>", styles: [":host{width:100%}::ng-deep .repeat-body .repeat-item:not(:first-child) .repeat-field .mat-mdc-form-field-infix .mat-mdc-floating-label{display:none!important}::ng-deep .repeat-body .repeat-item:not(:first-child) .repeat-field .mat-mdc-form-field-subscript-wrapper{display:none!important}::ng-deep .repeat-body .repeat-item:not(:first-child) .repeat-field .mat-mdc-text-field-wrapper{margin-top:8px}\n"] }]
|
|
803
783
|
}] });
|
|
@@ -818,8 +798,8 @@ class CmatSelectTypeComponent extends FieldType {
|
|
|
818
798
|
this.isChecked = false;
|
|
819
799
|
this.multiFilterCtrl = new FormControl('');
|
|
820
800
|
this._http = inject(HttpClient);
|
|
801
|
+
this._destroyRef = inject(DestroyRef);
|
|
821
802
|
this._urlData = [];
|
|
822
|
-
this._unsubscribeAll = new Subject();
|
|
823
803
|
}
|
|
824
804
|
get datas() {
|
|
825
805
|
if (isArray(this.field.props?.options)) {
|
|
@@ -831,13 +811,13 @@ class CmatSelectTypeComponent extends FieldType {
|
|
|
831
811
|
}
|
|
832
812
|
ngOnInit() {
|
|
833
813
|
if (this.field.props?.options && !isArray(this.field.props?.options)) {
|
|
834
|
-
this.field.props?.options.pipe(
|
|
814
|
+
this.field.props?.options.pipe(takeUntilDestroyed(this._destroyRef)).subscribe((data) => {
|
|
835
815
|
this.optionsData = data;
|
|
836
816
|
});
|
|
837
817
|
}
|
|
838
818
|
const url = this.field.props?.domain?.url;
|
|
839
819
|
if (url && this.field.props?.domain?.code && this.field.props?.domain?.key && this.field.props?.domain?.value) {
|
|
840
|
-
this._http.get(url).pipe(
|
|
820
|
+
this._http.get(url).pipe(takeUntilDestroyed(this._destroyRef)).subscribe((data) => {
|
|
841
821
|
if (data) {
|
|
842
822
|
const datas = data.filter((i) => {
|
|
843
823
|
if (this.field.props?.domain?.key)
|
|
@@ -863,7 +843,7 @@ class CmatSelectTypeComponent extends FieldType {
|
|
|
863
843
|
this.filteredCache = this.datas.slice();
|
|
864
844
|
this.filteredCustomDetails.next(this.filteredCache);
|
|
865
845
|
}
|
|
866
|
-
of(this.props.multiple).pipe(
|
|
846
|
+
of(this.props.multiple).pipe(takeUntilDestroyed(this._destroyRef))
|
|
867
847
|
.subscribe((multiple) => {
|
|
868
848
|
if (!isUndefined(this.formControl.value) && !isArray(this.formControl.value) && multiple) {
|
|
869
849
|
const value = [this.formControl.value];
|
|
@@ -871,23 +851,19 @@ class CmatSelectTypeComponent extends FieldType {
|
|
|
871
851
|
}
|
|
872
852
|
});
|
|
873
853
|
this.multiFilterCtrl.valueChanges
|
|
874
|
-
.pipe(
|
|
854
|
+
.pipe(takeUntilDestroyed(this._destroyRef))
|
|
875
855
|
.subscribe(() => {
|
|
876
856
|
this.filterMulti();
|
|
877
857
|
if (this.props.multiple)
|
|
878
858
|
this.setToggleAllCheckboxState();
|
|
879
859
|
});
|
|
880
860
|
this.formControl.valueChanges
|
|
881
|
-
.pipe(
|
|
861
|
+
.pipe(takeUntilDestroyed(this._destroyRef))
|
|
882
862
|
.subscribe(() => {
|
|
883
863
|
if (this.props.multiple)
|
|
884
864
|
this.setToggleAllCheckboxState();
|
|
885
865
|
});
|
|
886
866
|
}
|
|
887
|
-
ngOnDestroy() {
|
|
888
|
-
this._unsubscribeAll.next(void (0));
|
|
889
|
-
this._unsubscribeAll.complete();
|
|
890
|
-
}
|
|
891
867
|
getAriaLabelledby() {
|
|
892
868
|
if (this.props.attributes?.['aria-labelledby']) {
|
|
893
869
|
return this.props.attributes['aria-labelledby'];
|
|
@@ -898,7 +874,7 @@ class CmatSelectTypeComponent extends FieldType {
|
|
|
898
874
|
return this.props.attributes?.['aria-label'];
|
|
899
875
|
}
|
|
900
876
|
toggleSelectAll(selectAllValue) {
|
|
901
|
-
this.filteredCustomDetails.pipe(take(1),
|
|
877
|
+
this.filteredCustomDetails.pipe(take(1), takeUntilDestroyed(this._destroyRef))
|
|
902
878
|
.subscribe((val) => {
|
|
903
879
|
if (selectAllValue) {
|
|
904
880
|
this.formControl.setValue(val.filter(o => !o.disabled));
|
|
@@ -947,10 +923,10 @@ class CmatSelectTypeComponent extends FieldType {
|
|
|
947
923
|
compareWithFn(o1, o2) {
|
|
948
924
|
return o1 && o2 ? o1?.label === o2?.label && o1?.value === o2?.value : o1 === o2;
|
|
949
925
|
}
|
|
950
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.
|
|
951
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.
|
|
926
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: CmatSelectTypeComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
927
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.8", type: CmatSelectTypeComponent, isStandalone: true, selector: "cmat-select-search-type", usesInheritance: true, ngImport: i0, template: "@if(props.multiple){\r\n<mat-select #multiSelect multiple [id]=\"id\" [formControl]=\"formControl\" [placeholder]=\"props.placeholder??''\"\r\n [required]=\"required\" [tabIndex]=\"props.tabindex\" [compareWith]=\"compareWithFn\"\r\n [errorStateMatcher]=\"errorStateMatcher\" [aria-label]=\"getAriaLabel()\" [aria-labelledby]=\"getAriaLabelledby()\"\r\n [disableOptionCentering]=\"props.disableOptionCentering\"\r\n [typeaheadDebounceInterval]=\"props.typeaheadDebounceInterval\"\r\n [panelClass]=\"'overflow-y-auto scrollbar-custom'\">\r\n @if ((filteredCustomDetails | async); as customDetails) {\r\n @if (props.search) {\r\n <mat-option>\r\n <cmat-select-search [formControl]=\"multiFilterCtrl\" [showToggleAllCheckbox]=\"props.showToggleAllCheckbox\"\r\n [toggleAllCheckboxIndeterminate]=\"isIndeterminate\" [toggleAllCheckboxChecked]=\"isChecked\"\r\n (toggleAll)=\"toggleSelectAll($event)\">\r\n </cmat-select-search>\r\n </mat-option>\r\n }\r\n @if (customDetails?.length!==0&&props.canNull&&!props.multiple) {\r\n <mat-option>\u7A7A</mat-option>\r\n }\r\n @for (i of customDetails; track $index) {\r\n @if(i.label){\r\n @if(i.group){\r\n <mat-optgroup [label]=\"i.label\">\r\n @for (child of i.group; track $index) {\r\n <mat-option [value]=\"child\" [disabled]=\"child.disabled\">\r\n {{ child.label }}\r\n </mat-option>\r\n }\r\n </mat-optgroup>\r\n }@else {\r\n <mat-option [value]=\"i\" [disabled]=\"i.disabled\">{{i.label}}</mat-option>\r\n }\r\n }@else {\r\n <mat-option [value]=\"i\">{{i}}</mat-option>\r\n }\r\n }\r\n }\r\n</mat-select>\r\n}@else {\r\n<mat-select #multiSelect [id]=\"id\" [formControl]=\"formControl\" [placeholder]=\"props.placeholder??''\"\r\n [required]=\"required\" [tabIndex]=\"props.tabindex\" [compareWith]=\"compareWithFn\"\r\n [errorStateMatcher]=\"errorStateMatcher\" [aria-label]=\"getAriaLabel()\" [aria-labelledby]=\"getAriaLabelledby()\"\r\n [disableOptionCentering]=\"props.disableOptionCentering\"\r\n [typeaheadDebounceInterval]=\"props.typeaheadDebounceInterval\"\r\n [panelClass]=\"'overflow-y-auto scrollbar-custom'\">\r\n @if ((filteredCustomDetails | async); as customDetails) {\r\n @if (props.search) {\r\n <mat-option>\r\n <cmat-select-search [formControl]=\"multiFilterCtrl\" [showToggleAllCheckbox]=\"props.showToggleAllCheckbox\"\r\n [toggleAllCheckboxIndeterminate]=\"isIndeterminate\" [toggleAllCheckboxChecked]=\"isChecked\"\r\n (toggleAll)=\"toggleSelectAll($event)\">\r\n </cmat-select-search>\r\n </mat-option>\r\n }\r\n @if (customDetails?.length!==0&&props.canNull&&!props.multiple) {\r\n <mat-option>\u7A7A</mat-option>\r\n }\r\n @for (i of customDetails; track $index) {\r\n @if(i.label){\r\n @if(i.group){\r\n <mat-optgroup [label]=\"i.label\">\r\n @for (child of i.group; track $index) {\r\n <mat-option [value]=\"child\" [disabled]=\"child.disabled\">\r\n {{ child.label }}\r\n </mat-option>\r\n }\r\n </mat-optgroup>\r\n }@else {\r\n <mat-option [value]=\"i\" [disabled]=\"i.disabled\">{{i.label}}</mat-option>\r\n }\r\n }@else {\r\n <mat-option [value]=\"i\">{{i}}</mat-option>\r\n }\r\n }\r\n }\r\n</mat-select>\r\n}", styles: [":host{width:100%}\n"], dependencies: [{ kind: "ngmodule", type: MatCheckboxModule }, { kind: "ngmodule", type: MatSelectModule }, { kind: "component", type: i1$8.MatSelect, selector: "mat-select", inputs: ["aria-describedby", "panelClass", "disabled", "disableRipple", "tabIndex", "hideSingleSelectionIndicator", "placeholder", "required", "multiple", "disableOptionCentering", "compareWith", "value", "aria-label", "aria-labelledby", "errorStateMatcher", "typeaheadDebounceInterval", "sortComparator", "id", "panelWidth", "canSelectNullableOptions"], outputs: ["openedChange", "opened", "closed", "selectionChange", "valueChange"], exportAs: ["matSelect"] }, { kind: "component", type: i1$8.MatOption, selector: "mat-option", inputs: ["value", "id", "disabled"], outputs: ["onSelectionChange"], exportAs: ["matOption"] }, { kind: "component", type: i1$8.MatOptgroup, selector: "mat-optgroup", inputs: ["label", "disabled"], exportAs: ["matOptgroup"] }, { kind: "component", type: CmatSelectSearchComponent, selector: "cmat-select-search", inputs: ["placeholderLabel", "type", "noEntriesFoundLabel", "showNoFoundLabel", "clearSearchInput", "searching", "disableInitialFocus", "enableClearOnEscapePressed", "preventHomeEndKeyPropagation", "disableScrollToActiveOnOptionsChanged", "ariaLabel", "showToggleAllCheckbox", "toggleAllCheckboxChecked", "toggleAllCheckboxIndeterminate", "toggleAllCheckboxTooltipMessage", "toggleAllCheckboxTooltipPosition", "hideClearSearchButton", "alwaysRestoreSelectedOptionsMulti"], outputs: ["toggleAll"], exportAs: ["cmatSelectSearch"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1$4.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$4.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i1$4.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "pipe", type: AsyncPipe, name: "async" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
952
928
|
}
|
|
953
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.
|
|
929
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: CmatSelectTypeComponent, decorators: [{
|
|
954
930
|
type: Component,
|
|
955
931
|
args: [{ selector: 'cmat-select-search-type', changeDetection: ChangeDetectionStrategy.OnPush, imports: [MatCheckboxModule, MatSelectModule, CmatSelectSearchComponent, ReactiveFormsModule, AsyncPipe], template: "@if(props.multiple){\r\n<mat-select #multiSelect multiple [id]=\"id\" [formControl]=\"formControl\" [placeholder]=\"props.placeholder??''\"\r\n [required]=\"required\" [tabIndex]=\"props.tabindex\" [compareWith]=\"compareWithFn\"\r\n [errorStateMatcher]=\"errorStateMatcher\" [aria-label]=\"getAriaLabel()\" [aria-labelledby]=\"getAriaLabelledby()\"\r\n [disableOptionCentering]=\"props.disableOptionCentering\"\r\n [typeaheadDebounceInterval]=\"props.typeaheadDebounceInterval\"\r\n [panelClass]=\"'overflow-y-auto scrollbar-custom'\">\r\n @if ((filteredCustomDetails | async); as customDetails) {\r\n @if (props.search) {\r\n <mat-option>\r\n <cmat-select-search [formControl]=\"multiFilterCtrl\" [showToggleAllCheckbox]=\"props.showToggleAllCheckbox\"\r\n [toggleAllCheckboxIndeterminate]=\"isIndeterminate\" [toggleAllCheckboxChecked]=\"isChecked\"\r\n (toggleAll)=\"toggleSelectAll($event)\">\r\n </cmat-select-search>\r\n </mat-option>\r\n }\r\n @if (customDetails?.length!==0&&props.canNull&&!props.multiple) {\r\n <mat-option>\u7A7A</mat-option>\r\n }\r\n @for (i of customDetails; track $index) {\r\n @if(i.label){\r\n @if(i.group){\r\n <mat-optgroup [label]=\"i.label\">\r\n @for (child of i.group; track $index) {\r\n <mat-option [value]=\"child\" [disabled]=\"child.disabled\">\r\n {{ child.label }}\r\n </mat-option>\r\n }\r\n </mat-optgroup>\r\n }@else {\r\n <mat-option [value]=\"i\" [disabled]=\"i.disabled\">{{i.label}}</mat-option>\r\n }\r\n }@else {\r\n <mat-option [value]=\"i\">{{i}}</mat-option>\r\n }\r\n }\r\n }\r\n</mat-select>\r\n}@else {\r\n<mat-select #multiSelect [id]=\"id\" [formControl]=\"formControl\" [placeholder]=\"props.placeholder??''\"\r\n [required]=\"required\" [tabIndex]=\"props.tabindex\" [compareWith]=\"compareWithFn\"\r\n [errorStateMatcher]=\"errorStateMatcher\" [aria-label]=\"getAriaLabel()\" [aria-labelledby]=\"getAriaLabelledby()\"\r\n [disableOptionCentering]=\"props.disableOptionCentering\"\r\n [typeaheadDebounceInterval]=\"props.typeaheadDebounceInterval\"\r\n [panelClass]=\"'overflow-y-auto scrollbar-custom'\">\r\n @if ((filteredCustomDetails | async); as customDetails) {\r\n @if (props.search) {\r\n <mat-option>\r\n <cmat-select-search [formControl]=\"multiFilterCtrl\" [showToggleAllCheckbox]=\"props.showToggleAllCheckbox\"\r\n [toggleAllCheckboxIndeterminate]=\"isIndeterminate\" [toggleAllCheckboxChecked]=\"isChecked\"\r\n (toggleAll)=\"toggleSelectAll($event)\">\r\n </cmat-select-search>\r\n </mat-option>\r\n }\r\n @if (customDetails?.length!==0&&props.canNull&&!props.multiple) {\r\n <mat-option>\u7A7A</mat-option>\r\n }\r\n @for (i of customDetails; track $index) {\r\n @if(i.label){\r\n @if(i.group){\r\n <mat-optgroup [label]=\"i.label\">\r\n @for (child of i.group; track $index) {\r\n <mat-option [value]=\"child\" [disabled]=\"child.disabled\">\r\n {{ child.label }}\r\n </mat-option>\r\n }\r\n </mat-optgroup>\r\n }@else {\r\n <mat-option [value]=\"i\" [disabled]=\"i.disabled\">{{i.label}}</mat-option>\r\n }\r\n }@else {\r\n <mat-option [value]=\"i\">{{i}}</mat-option>\r\n }\r\n }\r\n }\r\n</mat-select>\r\n}", styles: [":host{width:100%}\n"] }]
|
|
956
932
|
}], ctorParameters: () => [] });
|
|
@@ -971,12 +947,12 @@ class CmatSelectTreeTypeComponent extends FieldType$1 {
|
|
|
971
947
|
this.urlData = [];
|
|
972
948
|
this._http = inject(HttpClient);
|
|
973
949
|
this._changeDetectorRef = inject(ChangeDetectorRef);
|
|
974
|
-
this.
|
|
950
|
+
this._destroyRef = inject(DestroyRef);
|
|
975
951
|
}
|
|
976
952
|
ngOnInit() {
|
|
977
953
|
const url = this.field.props?.domain?.url;
|
|
978
954
|
if (url && this.field.props?.domain?.code && this.field.props?.domain?.key && this.field.props?.domain?.value) {
|
|
979
|
-
this._http.get(url).pipe(
|
|
955
|
+
this._http.get(url).pipe(takeUntilDestroyed(this._destroyRef)).subscribe((data) => {
|
|
980
956
|
if (data) {
|
|
981
957
|
const datas = data.filter((i) => {
|
|
982
958
|
if (this.field.props?.domain?.key)
|
|
@@ -1001,14 +977,10 @@ class CmatSelectTreeTypeComponent extends FieldType$1 {
|
|
|
1001
977
|
this._changeDetectorRef.markForCheck();
|
|
1002
978
|
}
|
|
1003
979
|
}
|
|
1004
|
-
|
|
1005
|
-
|
|
1006
|
-
this._unsubscribeAll.complete();
|
|
1007
|
-
}
|
|
1008
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.7", ngImport: i0, type: CmatSelectTreeTypeComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1009
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.7", type: CmatSelectTreeTypeComponent, isStandalone: true, selector: "cmat-select-tree-type", usesInheritance: true, ngImport: i0, template: "<cmat-select-tree [formControl]=\"formControl\" [dataSource]=\"urlData\" [customTriggerLabelTemplate]=\"'${name}'\"\r\n [multiple]=\"props.multiple\" [overallSearchEnabled]=\"props.search\" [canNull]=\"props.canNull\"\r\n [showToggleAllCheckbox]=\"props.showToggleAllCheckbox\" [expandable]=\"props.expandable\" [placeholder]=\"placeholder\"\r\n [tabIndex]=\"props.tabindex\" [required]=\"required\"></cmat-select-tree>", styles: [":host{width:100%}\n"], dependencies: [{ kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1$4.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$4.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i1$4.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "component", type: CmatSelectTreeComponent, selector: "cmat-select-tree", inputs: ["id", "dataSource", "noEntriesFoundLabel", "showNoFoundLabel", "multiple", "overallSearchEnabled", "canNull", "customTriggerLabelFn", "customTriggerLabelTemplate", "expandable", "showToggleAllCheckbox", "compareWith", "placeholder", "value", "required", "disabled"], exportAs: ["cmatSelectTree"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
980
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: CmatSelectTreeTypeComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
981
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.8", type: CmatSelectTreeTypeComponent, isStandalone: true, selector: "cmat-select-tree-type", usesInheritance: true, ngImport: i0, template: "<cmat-select-tree [formControl]=\"formControl\" [dataSource]=\"urlData\" [customTriggerLabelTemplate]=\"'${name}'\"\r\n [multiple]=\"props.multiple\" [overallSearchEnabled]=\"props.search\" [canNull]=\"props.canNull\"\r\n [showToggleAllCheckbox]=\"props.showToggleAllCheckbox\" [expandable]=\"props.expandable\" [placeholder]=\"placeholder\"\r\n [tabIndex]=\"props.tabindex\" [required]=\"required\"></cmat-select-tree>", styles: [":host{width:100%}\n"], dependencies: [{ kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1$4.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$4.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i1$4.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "component", type: CmatSelectTreeComponent, selector: "cmat-select-tree", inputs: ["id", "dataSource", "noEntriesFoundLabel", "showNoFoundLabel", "multiple", "overallSearchEnabled", "canNull", "customTriggerLabelFn", "customTriggerLabelTemplate", "expandable", "showToggleAllCheckbox", "compareWith", "placeholder", "value", "required", "disabled"], exportAs: ["cmatSelectTree"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
1010
982
|
}
|
|
1011
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.
|
|
983
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: CmatSelectTreeTypeComponent, decorators: [{
|
|
1012
984
|
type: Component,
|
|
1013
985
|
args: [{ selector: 'cmat-select-tree-type', changeDetection: ChangeDetectionStrategy.OnPush, imports: [ReactiveFormsModule, CmatSelectTreeComponent], template: "<cmat-select-tree [formControl]=\"formControl\" [dataSource]=\"urlData\" [customTriggerLabelTemplate]=\"'${name}'\"\r\n [multiple]=\"props.multiple\" [overallSearchEnabled]=\"props.search\" [canNull]=\"props.canNull\"\r\n [showToggleAllCheckbox]=\"props.showToggleAllCheckbox\" [expandable]=\"props.expandable\" [placeholder]=\"placeholder\"\r\n [tabIndex]=\"props.tabindex\" [required]=\"required\"></cmat-select-tree>", styles: [":host{width:100%}\n"] }]
|
|
1014
986
|
}], ctorParameters: () => [] });
|
|
@@ -1027,12 +999,12 @@ class CmatSelectTableTypeComponent extends FieldType$1 {
|
|
|
1027
999
|
this.urlData = { columns: [], data: [] };
|
|
1028
1000
|
this._http = inject(HttpClient);
|
|
1029
1001
|
this._changeDetectorRef = inject(ChangeDetectorRef);
|
|
1030
|
-
this.
|
|
1002
|
+
this._destroyRef = inject(DestroyRef);
|
|
1031
1003
|
}
|
|
1032
1004
|
ngOnInit() {
|
|
1033
1005
|
const url = this.field.props?.domain?.url;
|
|
1034
1006
|
if (url && this.field.props?.domain?.code && this.field.props?.domain?.key && this.field.props?.domain?.value) {
|
|
1035
|
-
this._http.get(url).pipe(
|
|
1007
|
+
this._http.get(url).pipe(takeUntilDestroyed(this._destroyRef)).subscribe((data) => {
|
|
1036
1008
|
if (data) {
|
|
1037
1009
|
const datas = data.filter((i) => {
|
|
1038
1010
|
if (this.field.props?.domain?.key)
|
|
@@ -1057,14 +1029,10 @@ class CmatSelectTableTypeComponent extends FieldType$1 {
|
|
|
1057
1029
|
this._changeDetectorRef.markForCheck();
|
|
1058
1030
|
}
|
|
1059
1031
|
}
|
|
1060
|
-
|
|
1061
|
-
|
|
1062
|
-
this._unsubscribeAll.complete();
|
|
1063
|
-
}
|
|
1064
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.7", ngImport: i0, type: CmatSelectTableTypeComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1065
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.7", type: CmatSelectTableTypeComponent, isStandalone: true, selector: "cmat-select-table-type", usesInheritance: true, ngImport: i0, template: "<cmat-select-table [formControl]=\"formControl\" [dataSource]=\"urlData\" [customTriggerLabelTemplate]=\"'${name}'\"\r\n [multiple]=\"props.multiple\" [overallSearchEnabled]=\"props.search\" [canNull]=\"props.canNull\"\r\n [placeholder]=\"placeholder\" [tabIndex]=\"props.tabindex\" [required]=\"required\"></cmat-select-table>", styles: [":host{width:100%}\n"], dependencies: [{ kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1$4.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$4.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i1$4.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "component", type: CmatSelectTableComponent, selector: "cmat-select-table", inputs: ["id", "dataSource", "noEntriesFoundLabel", "showNoFoundLabel", "isPhone", "multiple", "overallSearchEnabled", "overallSearchVisible", "resetSortOnOpen", "resetFiltersOnOpen", "customTriggerLabelFn", "triggerLabelSort", "customTriggerLabelTemplate", "canNull", "defaultSort", "resetOptionAction", "keyParam", "compareWith", "placeholder", "value", "required", "disabled"], outputs: ["closed"], exportAs: ["cmatSelectTable"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
1032
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: CmatSelectTableTypeComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1033
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.8", type: CmatSelectTableTypeComponent, isStandalone: true, selector: "cmat-select-table-type", usesInheritance: true, ngImport: i0, template: "<cmat-select-table [formControl]=\"formControl\" [dataSource]=\"urlData\" [customTriggerLabelTemplate]=\"'${name}'\"\r\n [multiple]=\"props.multiple\" [overallSearchEnabled]=\"props.search\" [canNull]=\"props.canNull\"\r\n [placeholder]=\"placeholder\" [tabIndex]=\"props.tabindex\" [required]=\"required\"></cmat-select-table>", styles: [":host{width:100%}\n"], dependencies: [{ kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1$4.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$4.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i1$4.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "component", type: CmatSelectTableComponent, selector: "cmat-select-table", inputs: ["id", "dataSource", "noEntriesFoundLabel", "showNoFoundLabel", "isPhone", "multiple", "overallSearchEnabled", "overallSearchVisible", "resetSortOnOpen", "resetFiltersOnOpen", "customTriggerLabelFn", "triggerLabelSort", "customTriggerLabelTemplate", "canNull", "defaultSort", "resetOptionAction", "keyParam", "compareWith", "placeholder", "value", "required", "disabled"], outputs: ["closed"], exportAs: ["cmatSelectTable"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
1066
1034
|
}
|
|
1067
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.
|
|
1035
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: CmatSelectTableTypeComponent, decorators: [{
|
|
1068
1036
|
type: Component,
|
|
1069
1037
|
args: [{ selector: 'cmat-select-table-type', changeDetection: ChangeDetectionStrategy.OnPush, imports: [ReactiveFormsModule, CmatSelectTableComponent], template: "<cmat-select-table [formControl]=\"formControl\" [dataSource]=\"urlData\" [customTriggerLabelTemplate]=\"'${name}'\"\r\n [multiple]=\"props.multiple\" [overallSearchEnabled]=\"props.search\" [canNull]=\"props.canNull\"\r\n [placeholder]=\"placeholder\" [tabIndex]=\"props.tabindex\" [required]=\"required\"></cmat-select-table>", styles: [":host{width:100%}\n"] }]
|
|
1070
1038
|
}], ctorParameters: () => [] });
|
|
@@ -1078,10 +1046,10 @@ class CmatStepperHorizontalTypeComponent extends FieldType$2 {
|
|
|
1078
1046
|
}
|
|
1079
1047
|
return field.fieldGroup ? field.fieldGroup.every(f => this.isValid(f)) : true;
|
|
1080
1048
|
}
|
|
1081
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.
|
|
1082
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.
|
|
1049
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: CmatStepperHorizontalTypeComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
1050
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.8", type: CmatStepperHorizontalTypeComponent, isStandalone: true, selector: "cmat-stepper-horizontal-type", usesInheritance: true, ngImport: i0, template: "<mat-horizontal-stepper [linear]=\"props.isLinear\" [tabIndex]=\"props.tabindex\">\r\n\r\n <ng-template matStepperIcon=\"edit\">\r\n <mat-icon class=\"icon-size-4\" [svgIcon]=\"'heroicons_solid:pencil'\"></mat-icon>\r\n </ng-template>\r\n <ng-template matStepperIcon=\"done\">\r\n <mat-icon class=\"icon-size-4\" [svgIcon]=\"'heroicons_outline:check'\"></mat-icon>\r\n </ng-template>\r\n\r\n @for (step of field.fieldGroup; track $index) {\r\n <mat-step [stepControl]=\"step.formControl!\" [editable]=\"step.props?.isEditable||$last\" [optional]=\"step.props?.isOptional\">\r\n <ng-template matStepLabel>{{ step.props?.label||'' }}</ng-template>\r\n <div class=\"py-2\">\r\n <formly-field [field]=\"step\"></formly-field>\r\n </div>\r\n <div class=\"mt-2 flex flex-row gap-2\">\r\n @if($index !== 0){\r\n <button matStepperPrevious matButton=\"filled\" color=\"primary\" type=\"button\">\u4E0A\u4E00\u6B65</button>\r\n }\r\n\r\n @if(!$last){\r\n <button matStepperNext matButton=\"filled\" color=\"primary\" type=\"button\" [disabled]=\"!isValid(step)\">\r\n \u4E0B\u4E00\u6B65\r\n </button>\r\n }\r\n </div>\r\n </mat-step>\r\n }\r\n\r\n</mat-horizontal-stepper>", styles: [":host{width:100%}\n"], dependencies: [{ kind: "ngmodule", type: FormlyModule }, { kind: "component", type: i1$3.LegacyFormlyField, selector: "formly-field" }, { kind: "ngmodule", type: MatStepperModule }, { kind: "component", type: i2$3.MatStep, selector: "mat-step", inputs: ["color"], exportAs: ["matStep"] }, { kind: "directive", type: i2$3.MatStepLabel, selector: "[matStepLabel]" }, { kind: "component", type: i2$3.MatStepper, selector: "mat-stepper, mat-vertical-stepper, mat-horizontal-stepper, [matStepper]", inputs: ["disableRipple", "color", "labelPosition", "headerPosition", "headerPrefix", "animationDuration"], outputs: ["animationDone"], exportAs: ["matStepper", "matVerticalStepper", "matHorizontalStepper"] }, { kind: "directive", type: i2$3.MatStepperNext, selector: "button[matStepperNext]" }, { kind: "directive", type: i2$3.MatStepperPrevious, selector: "button[matStepperPrevious]" }, { kind: "directive", type: i2$3.MatStepperIcon, selector: "ng-template[matStepperIcon]", inputs: ["matStepperIcon"] }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i3.MatButton, selector: " button[matButton], a[matButton], button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button], a[mat-button], a[mat-raised-button], a[mat-flat-button], a[mat-stroked-button] ", inputs: ["matButton"], exportAs: ["matButton", "matAnchor"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i2.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
1083
1051
|
}
|
|
1084
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.
|
|
1052
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: CmatStepperHorizontalTypeComponent, decorators: [{
|
|
1085
1053
|
type: Component,
|
|
1086
1054
|
args: [{ selector: 'cmat-stepper-horizontal-type', changeDetection: ChangeDetectionStrategy.OnPush, imports: [FormlyModule, MatStepperModule, MatButtonModule, ReactiveFormsModule, MatIconModule], template: "<mat-horizontal-stepper [linear]=\"props.isLinear\" [tabIndex]=\"props.tabindex\">\r\n\r\n <ng-template matStepperIcon=\"edit\">\r\n <mat-icon class=\"icon-size-4\" [svgIcon]=\"'heroicons_solid:pencil'\"></mat-icon>\r\n </ng-template>\r\n <ng-template matStepperIcon=\"done\">\r\n <mat-icon class=\"icon-size-4\" [svgIcon]=\"'heroicons_outline:check'\"></mat-icon>\r\n </ng-template>\r\n\r\n @for (step of field.fieldGroup; track $index) {\r\n <mat-step [stepControl]=\"step.formControl!\" [editable]=\"step.props?.isEditable||$last\" [optional]=\"step.props?.isOptional\">\r\n <ng-template matStepLabel>{{ step.props?.label||'' }}</ng-template>\r\n <div class=\"py-2\">\r\n <formly-field [field]=\"step\"></formly-field>\r\n </div>\r\n <div class=\"mt-2 flex flex-row gap-2\">\r\n @if($index !== 0){\r\n <button matStepperPrevious matButton=\"filled\" color=\"primary\" type=\"button\">\u4E0A\u4E00\u6B65</button>\r\n }\r\n\r\n @if(!$last){\r\n <button matStepperNext matButton=\"filled\" color=\"primary\" type=\"button\" [disabled]=\"!isValid(step)\">\r\n \u4E0B\u4E00\u6B65\r\n </button>\r\n }\r\n </div>\r\n </mat-step>\r\n }\r\n\r\n</mat-horizontal-stepper>", styles: [":host{width:100%}\n"] }]
|
|
1087
1055
|
}] });
|
|
@@ -1095,10 +1063,10 @@ class CmatStepperVerticalTypeComponent extends FieldType$2 {
|
|
|
1095
1063
|
}
|
|
1096
1064
|
return field.fieldGroup ? field.fieldGroup.every(f => this.isValid(f)) : true;
|
|
1097
1065
|
}
|
|
1098
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.
|
|
1099
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.
|
|
1066
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: CmatStepperVerticalTypeComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
1067
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.8", type: CmatStepperVerticalTypeComponent, isStandalone: true, selector: "cmat-stepper-vertical-type", usesInheritance: true, ngImport: i0, template: "<mat-vertical-stepper [linear]=\"props.isLinear\" [tabIndex]=\"props.tabindex\">\r\n <ng-template matStepperIcon=\"edit\">\r\n <mat-icon class=\"icon-size-4\" [svgIcon]=\"'heroicons_solid:pencil'\"></mat-icon>\r\n </ng-template>\r\n <ng-template matStepperIcon=\"done\">\r\n <mat-icon class=\"icon-size-4\" [svgIcon]=\"'heroicons_outline:check'\"></mat-icon>\r\n </ng-template>\r\n\r\n @for (step of field.fieldGroup; track $index) {\r\n <mat-step [stepControl]=\"step.formControl!\" [editable]=\"step.props?.isEditable||$last\" [optional]=\"step.props?.isOptional\">\r\n <ng-template matStepLabel>{{ step.props?.label||'' }}</ng-template>\r\n <div class=\"py-2\">\r\n <formly-field [field]=\"step\"></formly-field>\r\n </div>\r\n\r\n <div class=\"mt-2 flex flex-row gap-2\">\r\n @if($index!==0){\r\n <button matStepperPrevious matButton=\"filled\" color=\"primary\" type=\"button\">\u4E0A\u4E00\u6B65</button>\r\n }\r\n\r\n @if(!$last){\r\n <button matStepperNext matButton=\"filled\" color=\"primary\" type=\"button\" [disabled]=\"!isValid(step)\">\r\n \u4E0B\u4E00\u6B65\r\n </button>\r\n }\r\n </div>\r\n </mat-step>\r\n }\r\n</mat-vertical-stepper>", styles: [":host{width:100%}\n"], dependencies: [{ kind: "ngmodule", type: FormlyModule }, { kind: "component", type: i1$3.LegacyFormlyField, selector: "formly-field" }, { kind: "ngmodule", type: MatStepperModule }, { kind: "component", type: i2$3.MatStep, selector: "mat-step", inputs: ["color"], exportAs: ["matStep"] }, { kind: "directive", type: i2$3.MatStepLabel, selector: "[matStepLabel]" }, { kind: "component", type: i2$3.MatStepper, selector: "mat-stepper, mat-vertical-stepper, mat-horizontal-stepper, [matStepper]", inputs: ["disableRipple", "color", "labelPosition", "headerPosition", "headerPrefix", "animationDuration"], outputs: ["animationDone"], exportAs: ["matStepper", "matVerticalStepper", "matHorizontalStepper"] }, { kind: "directive", type: i2$3.MatStepperNext, selector: "button[matStepperNext]" }, { kind: "directive", type: i2$3.MatStepperPrevious, selector: "button[matStepperPrevious]" }, { kind: "directive", type: i2$3.MatStepperIcon, selector: "ng-template[matStepperIcon]", inputs: ["matStepperIcon"] }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i3.MatButton, selector: " button[matButton], a[matButton], button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button], a[mat-button], a[mat-raised-button], a[mat-flat-button], a[mat-stroked-button] ", inputs: ["matButton"], exportAs: ["matButton", "matAnchor"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i2.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
1100
1068
|
}
|
|
1101
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.
|
|
1069
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: CmatStepperVerticalTypeComponent, decorators: [{
|
|
1102
1070
|
type: Component,
|
|
1103
1071
|
args: [{ selector: 'cmat-stepper-vertical-type', changeDetection: ChangeDetectionStrategy.OnPush, imports: [FormlyModule, MatStepperModule, MatButtonModule, ReactiveFormsModule, MatIconModule], template: "<mat-vertical-stepper [linear]=\"props.isLinear\" [tabIndex]=\"props.tabindex\">\r\n <ng-template matStepperIcon=\"edit\">\r\n <mat-icon class=\"icon-size-4\" [svgIcon]=\"'heroicons_solid:pencil'\"></mat-icon>\r\n </ng-template>\r\n <ng-template matStepperIcon=\"done\">\r\n <mat-icon class=\"icon-size-4\" [svgIcon]=\"'heroicons_outline:check'\"></mat-icon>\r\n </ng-template>\r\n\r\n @for (step of field.fieldGroup; track $index) {\r\n <mat-step [stepControl]=\"step.formControl!\" [editable]=\"step.props?.isEditable||$last\" [optional]=\"step.props?.isOptional\">\r\n <ng-template matStepLabel>{{ step.props?.label||'' }}</ng-template>\r\n <div class=\"py-2\">\r\n <formly-field [field]=\"step\"></formly-field>\r\n </div>\r\n\r\n <div class=\"mt-2 flex flex-row gap-2\">\r\n @if($index!==0){\r\n <button matStepperPrevious matButton=\"filled\" color=\"primary\" type=\"button\">\u4E0A\u4E00\u6B65</button>\r\n }\r\n\r\n @if(!$last){\r\n <button matStepperNext matButton=\"filled\" color=\"primary\" type=\"button\" [disabled]=\"!isValid(step)\">\r\n \u4E0B\u4E00\u6B65\r\n </button>\r\n }\r\n </div>\r\n </mat-step>\r\n }\r\n</mat-vertical-stepper>", styles: [":host{width:100%}\n"] }]
|
|
1104
1072
|
}] });
|
|
@@ -1183,10 +1151,10 @@ class CmatTableTypeComponent extends FieldArrayType {
|
|
|
1183
1151
|
this._changeDetectorRef.markForCheck();
|
|
1184
1152
|
this._dialogRef.close();
|
|
1185
1153
|
}
|
|
1186
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.
|
|
1187
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.
|
|
1154
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: CmatTableTypeComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1155
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.8", type: CmatTableTypeComponent, isStandalone: true, selector: "cmat-table-type", viewQueries: [{ propertyName: "dialogRef", first: true, predicate: ["dialogRef"], descendants: true }, { propertyName: "table", first: true, predicate: ["table"], descendants: true }], usesInheritance: true, ngImport: i0, template: "<div class=\"relative flex flex-col sm:flex-row flex-none sm:items-center sm:justify-between p-2 border-b mb-1\">\r\n <div>\r\n @if(props.label){\r\n <legend class=\"text-lg\">\r\n {{ props.label }}\r\n @if(props.required){\r\n <span>*</span>\r\n }\r\n </legend>\r\n }\r\n @if(props.description){\r\n <p>{{ props.description }}</p>\r\n }\r\n </div>\r\n\r\n @if(!props.disabled){\r\n <div class=\"flex shrink-0 items-center mt-6 sm:mt-0 sm:ml-4 print:hidden\">\r\n <button class=\"ml-4\" matButton=\"filled\" [color]=\"'primary'\" (click)=\"addRow()\">\r\n <mat-icon [svgIcon]=\"'heroicons_outline:plus'\"></mat-icon>\r\n <span class=\"ml-2\">{{props.addText}}</span>\r\n </button>\r\n </div>\r\n }\r\n</div>\r\n\r\n\r\n<table #table mat-table class=\"w-full\" [dataSource]=\"model||[]\" [tabIndex]=\"props.tabindex\">\r\n @for (column of columns; track $index) {\r\n <ng-container [matColumnDef]=\"column.key\">\r\n <th *matHeaderCellDef mat-header-cell> {{ column.label }} </th>\r\n <td *matCellDef=\"let element; let i = index\" mat-cell>\r\n <div class=\" has-label-on-mobile\" [attr.data-label]=\"column.label +':'\">\r\n {{element[column.key]}}\r\n </div>\r\n </td>\r\n </ng-container>\r\n }\r\n\r\n <ng-container matColumnDef=\"operate\" stickyEnd>\r\n <th *matHeaderCellDef mat-header-cell class=\"print:hidden\">\u64CD\u4F5C</th>\r\n <td *matCellDef=\"let element; let i = index\" mat-cell class=\"w-24 print:hidden\">\r\n <div class=\"flex flex-col lg:w-full\">\r\n <div class=\"relative flex flex-row gap-2 lg:m-2 justify-center\">\r\n <button type=\"button\" class=\"w-8 min-h-8 h-8 max-w-8 lg:opacity-0 lg:group-hover:opacity-100\"\r\n matIconButton [matTooltip]=\"'\u7F16\u8F91'\" (click)=\"editRow(element,i)\">\r\n <mat-icon class=\"icon-size-5\" color=\"primary\" [svgIcon]=\"'heroicons_solid:pencil-square'\">\r\n </mat-icon>\r\n </button>\r\n \r\n <button type=\"button\" class=\"w-8 min-h-8 h-8 max-w-8 lg:opacity-0 lg:group-hover:opacity-100\"\r\n matIconButton [matTooltip]=\"'\u79FB\u9664'\" (click)=\"deleteRow(i)\">\r\n <mat-icon class=\"icon-size-5\" color=\"warn\" [svgIcon]=\"'heroicons_solid:trash'\"></mat-icon>\r\n </button>\r\n </div>\r\n </div>\r\n </td>\r\n </ng-container>\r\n\r\n <tr *matHeaderRowDef=\"displayedColumns\" mat-header-row></tr>\r\n <tr *matRowDef=\"let row; columns: displayedColumns;\" mat-row class=\"group\"></tr>\r\n</table>\r\n\r\n<ng-template #inlineTable>\r\n <div class=\"overflow-y-auto scrollbar-custom w-full\">\r\n <form [formGroup]=\"inlineform\">\r\n <formly-form [fields]=\"fieldArray\" [model]=\"currentMode\" [form]=\"inlineform\"></formly-form>\r\n </form>\r\n </div>\r\n</ng-template>\r\n\r\n<ng-template #dialogRef>\r\n <div mat-dialog-title cdkDrag class=\"-mt-6\" cdkDragRootElement=\".cdk-overlay-pane\" cdkDragHandle>\r\n <h2 class=\"pointer-events-none text-xl\">{{ props.label +'\u8BE6\u7EC6\u9875'}}</h2>\r\n </div>\r\n\r\n <mat-dialog-content>\r\n <ng-container *ngTemplateOutlet=\"inlineTable\"></ng-container>\r\n </mat-dialog-content>\r\n\r\n <mat-dialog-actions>\r\n <div class=\"w-full flex justify-end items-center\">\r\n <button matButton=\"filled\" color=\"primary\" cdkFocusInitial (click)=\"confirm()\">\r\n \u786E\u5B9A\r\n </button>\r\n <button matButton=\"outlined\" mat-dialog-close>\r\n \u53D6\u6D88\r\n </button>\r\n </div>\r\n </mat-dialog-actions>\r\n</ng-template>", styles: [":host{width:100%}.mat-column-operate{width:8rem;text-align:center}\n"], dependencies: [{ kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i3.MatButton, selector: " button[matButton], a[matButton], button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button], a[mat-button], a[mat-raised-button], a[mat-flat-button], a[mat-stroked-button] ", inputs: ["matButton"], exportAs: ["matButton", "matAnchor"] }, { kind: "component", type: i3.MatIconButton, selector: "button[mat-icon-button], a[mat-icon-button], button[matIconButton], a[matIconButton]", exportAs: ["matButton", "matAnchor"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i2.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "ngmodule", type: MatTableModule }, { kind: "component", type: i3$2.MatTable, selector: "mat-table, table[mat-table]", exportAs: ["matTable"] }, { kind: "directive", type: i3$2.MatHeaderCellDef, selector: "[matHeaderCellDef]" }, { kind: "directive", type: i3$2.MatHeaderRowDef, selector: "[matHeaderRowDef]", inputs: ["matHeaderRowDef", "matHeaderRowDefSticky"] }, { kind: "directive", type: i3$2.MatColumnDef, selector: "[matColumnDef]", inputs: ["matColumnDef"] }, { kind: "directive", type: i3$2.MatCellDef, selector: "[matCellDef]" }, { kind: "directive", type: i3$2.MatRowDef, selector: "[matRowDef]", inputs: ["matRowDefColumns", "matRowDefWhen"] }, { kind: "directive", type: i3$2.MatHeaderCell, selector: "mat-header-cell, th[mat-header-cell]" }, { kind: "directive", type: i3$2.MatCell, selector: "mat-cell, td[mat-cell]" }, { kind: "component", type: i3$2.MatHeaderRow, selector: "mat-header-row, tr[mat-header-row]", exportAs: ["matHeaderRow"] }, { kind: "component", type: i3$2.MatRow, selector: "mat-row, tr[mat-row]", exportAs: ["matRow"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1$4.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1$4.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],[formArray],form:not([ngNoForm]),[ngForm]" }, { kind: "ngmodule", type: FormlyModule }, { kind: "component", type: i1$3.LegacyFormlyForm, selector: "formly-form" }, { kind: "directive", type: CdkDrag, selector: "[cdkDrag]", inputs: ["cdkDragData", "cdkDragLockAxis", "cdkDragRootElement", "cdkDragBoundary", "cdkDragStartDelay", "cdkDragFreeDragPosition", "cdkDragDisabled", "cdkDragConstrainPosition", "cdkDragPreviewClass", "cdkDragPreviewContainer", "cdkDragScale"], outputs: ["cdkDragStarted", "cdkDragReleased", "cdkDragEnded", "cdkDragEntered", "cdkDragExited", "cdkDragDropped", "cdkDragMoved"], exportAs: ["cdkDrag"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1$4.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "ngmodule", type: MatDialogModule }, { kind: "directive", type: i6.MatDialogClose, selector: "[mat-dialog-close], [matDialogClose]", inputs: ["aria-label", "type", "mat-dialog-close", "matDialogClose"], exportAs: ["matDialogClose"] }, { kind: "directive", type: i6.MatDialogTitle, selector: "[mat-dialog-title], [matDialogTitle]", inputs: ["id"], exportAs: ["matDialogTitle"] }, { kind: "directive", type: i6.MatDialogActions, selector: "[mat-dialog-actions], mat-dialog-actions, [matDialogActions]", inputs: ["align"] }, { kind: "directive", type: i6.MatDialogContent, selector: "[mat-dialog-content], mat-dialog-content, [matDialogContent]" }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "ngmodule", type: MatTooltipModule }, { kind: "directive", type: i7.MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
1188
1156
|
}
|
|
1189
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.
|
|
1157
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: CmatTableTypeComponent, decorators: [{
|
|
1190
1158
|
type: Component,
|
|
1191
1159
|
args: [{ selector: 'cmat-table-type', changeDetection: ChangeDetectionStrategy.OnPush, imports: [MatButtonModule, MatIconModule, MatTableModule, FormsModule, FormlyModule, CdkDrag,
|
|
1192
1160
|
ReactiveFormsModule, MatDialogModule, NgTemplateOutlet, MatTooltipModule], template: "<div class=\"relative flex flex-col sm:flex-row flex-none sm:items-center sm:justify-between p-2 border-b mb-1\">\r\n <div>\r\n @if(props.label){\r\n <legend class=\"text-lg\">\r\n {{ props.label }}\r\n @if(props.required){\r\n <span>*</span>\r\n }\r\n </legend>\r\n }\r\n @if(props.description){\r\n <p>{{ props.description }}</p>\r\n }\r\n </div>\r\n\r\n @if(!props.disabled){\r\n <div class=\"flex shrink-0 items-center mt-6 sm:mt-0 sm:ml-4 print:hidden\">\r\n <button class=\"ml-4\" matButton=\"filled\" [color]=\"'primary'\" (click)=\"addRow()\">\r\n <mat-icon [svgIcon]=\"'heroicons_outline:plus'\"></mat-icon>\r\n <span class=\"ml-2\">{{props.addText}}</span>\r\n </button>\r\n </div>\r\n }\r\n</div>\r\n\r\n\r\n<table #table mat-table class=\"w-full\" [dataSource]=\"model||[]\" [tabIndex]=\"props.tabindex\">\r\n @for (column of columns; track $index) {\r\n <ng-container [matColumnDef]=\"column.key\">\r\n <th *matHeaderCellDef mat-header-cell> {{ column.label }} </th>\r\n <td *matCellDef=\"let element; let i = index\" mat-cell>\r\n <div class=\" has-label-on-mobile\" [attr.data-label]=\"column.label +':'\">\r\n {{element[column.key]}}\r\n </div>\r\n </td>\r\n </ng-container>\r\n }\r\n\r\n <ng-container matColumnDef=\"operate\" stickyEnd>\r\n <th *matHeaderCellDef mat-header-cell class=\"print:hidden\">\u64CD\u4F5C</th>\r\n <td *matCellDef=\"let element; let i = index\" mat-cell class=\"w-24 print:hidden\">\r\n <div class=\"flex flex-col lg:w-full\">\r\n <div class=\"relative flex flex-row gap-2 lg:m-2 justify-center\">\r\n <button type=\"button\" class=\"w-8 min-h-8 h-8 max-w-8 lg:opacity-0 lg:group-hover:opacity-100\"\r\n matIconButton [matTooltip]=\"'\u7F16\u8F91'\" (click)=\"editRow(element,i)\">\r\n <mat-icon class=\"icon-size-5\" color=\"primary\" [svgIcon]=\"'heroicons_solid:pencil-square'\">\r\n </mat-icon>\r\n </button>\r\n \r\n <button type=\"button\" class=\"w-8 min-h-8 h-8 max-w-8 lg:opacity-0 lg:group-hover:opacity-100\"\r\n matIconButton [matTooltip]=\"'\u79FB\u9664'\" (click)=\"deleteRow(i)\">\r\n <mat-icon class=\"icon-size-5\" color=\"warn\" [svgIcon]=\"'heroicons_solid:trash'\"></mat-icon>\r\n </button>\r\n </div>\r\n </div>\r\n </td>\r\n </ng-container>\r\n\r\n <tr *matHeaderRowDef=\"displayedColumns\" mat-header-row></tr>\r\n <tr *matRowDef=\"let row; columns: displayedColumns;\" mat-row class=\"group\"></tr>\r\n</table>\r\n\r\n<ng-template #inlineTable>\r\n <div class=\"overflow-y-auto scrollbar-custom w-full\">\r\n <form [formGroup]=\"inlineform\">\r\n <formly-form [fields]=\"fieldArray\" [model]=\"currentMode\" [form]=\"inlineform\"></formly-form>\r\n </form>\r\n </div>\r\n</ng-template>\r\n\r\n<ng-template #dialogRef>\r\n <div mat-dialog-title cdkDrag class=\"-mt-6\" cdkDragRootElement=\".cdk-overlay-pane\" cdkDragHandle>\r\n <h2 class=\"pointer-events-none text-xl\">{{ props.label +'\u8BE6\u7EC6\u9875'}}</h2>\r\n </div>\r\n\r\n <mat-dialog-content>\r\n <ng-container *ngTemplateOutlet=\"inlineTable\"></ng-container>\r\n </mat-dialog-content>\r\n\r\n <mat-dialog-actions>\r\n <div class=\"w-full flex justify-end items-center\">\r\n <button matButton=\"filled\" color=\"primary\" cdkFocusInitial (click)=\"confirm()\">\r\n \u786E\u5B9A\r\n </button>\r\n <button matButton=\"outlined\" mat-dialog-close>\r\n \u53D6\u6D88\r\n </button>\r\n </div>\r\n </mat-dialog-actions>\r\n</ng-template>", styles: [":host{width:100%}.mat-column-operate{width:8rem;text-align:center}\n"] }]
|
|
@@ -1199,10 +1167,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.7", ngImpor
|
|
|
1199
1167
|
}] } });
|
|
1200
1168
|
|
|
1201
1169
|
class CmatTabTypeComponent extends FieldType$1 {
|
|
1202
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.
|
|
1203
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.
|
|
1170
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: CmatTabTypeComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
1171
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.8", type: CmatTabTypeComponent, isStandalone: true, selector: "cmat-tab-type", usesInheritance: true, ngImport: i0, template: "<mat-tab-group [tabIndex]=\"props.tabindex\">\r\n @for (tab of field.fieldGroup; track $index) {\r\n <mat-tab [label]=\"tab.props?.label||''\" [disabled]=\"tab.props?.disabled\">\r\n <div class=\"py-2\">\r\n <formly-field [field]=\"tab\"></formly-field>\r\n </div>\r\n </mat-tab>\r\n }\r\n</mat-tab-group>", styles: [":host{width:100%}\n"], dependencies: [{ kind: "ngmodule", type: MatTabsModule }, { kind: "component", type: i1$9.MatTab, selector: "mat-tab", inputs: ["disabled", "label", "aria-label", "aria-labelledby", "labelClass", "bodyClass", "id"], exportAs: ["matTab"] }, { kind: "component", type: i1$9.MatTabGroup, selector: "mat-tab-group", inputs: ["color", "fitInkBarToContent", "mat-stretch-tabs", "mat-align-tabs", "dynamicHeight", "selectedIndex", "headerPosition", "animationDuration", "contentTabIndex", "disablePagination", "disableRipple", "preserveContent", "backgroundColor", "aria-label", "aria-labelledby"], outputs: ["selectedIndexChange", "focusChange", "animationDone", "selectedTabChange"], exportAs: ["matTabGroup"] }, { kind: "ngmodule", type: FormlyModule }, { kind: "component", type: i1$3.LegacyFormlyField, selector: "formly-field" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
1204
1172
|
}
|
|
1205
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.
|
|
1173
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: CmatTabTypeComponent, decorators: [{
|
|
1206
1174
|
type: Component,
|
|
1207
1175
|
args: [{ selector: 'cmat-tab-type', changeDetection: ChangeDetectionStrategy.OnPush, imports: [MatTabsModule, FormlyModule], template: "<mat-tab-group [tabIndex]=\"props.tabindex\">\r\n @for (tab of field.fieldGroup; track $index) {\r\n <mat-tab [label]=\"tab.props?.label||''\" [disabled]=\"tab.props?.disabled\">\r\n <div class=\"py-2\">\r\n <formly-field [field]=\"tab\"></formly-field>\r\n </div>\r\n </mat-tab>\r\n }\r\n</mat-tab-group>", styles: [":host{width:100%}\n"] }]
|
|
1208
1176
|
}] });
|
|
@@ -1214,11 +1182,12 @@ class CmatTagsTypeComponent extends FieldType {
|
|
|
1214
1182
|
this._overlay = inject(Overlay);
|
|
1215
1183
|
this._viewContainerRef = inject(ViewContainerRef);
|
|
1216
1184
|
this._changeDetectorRef = inject(ChangeDetectorRef);
|
|
1217
|
-
this.
|
|
1218
|
-
this.
|
|
1185
|
+
this._destroyRef = inject(DestroyRef);
|
|
1186
|
+
this._filteredItems = signal(null, ...(ngDevMode ? [{ debugName: "_filteredItems" }] : /* istanbul ignore next */ []));
|
|
1187
|
+
this._filteredItems$ = toObservable(this._filteredItems);
|
|
1219
1188
|
}
|
|
1220
1189
|
get filteredItems$() {
|
|
1221
|
-
return this._filteredItems
|
|
1190
|
+
return this._filteredItems$;
|
|
1222
1191
|
}
|
|
1223
1192
|
get tags() {
|
|
1224
1193
|
if (isArray(this.field.props?.options)) {
|
|
@@ -1230,13 +1199,13 @@ class CmatTagsTypeComponent extends FieldType {
|
|
|
1230
1199
|
}
|
|
1231
1200
|
ngOnInit() {
|
|
1232
1201
|
if (this.field.props?.options && !isArray(this.field.props?.options)) {
|
|
1233
|
-
this.field.props?.options.pipe(
|
|
1202
|
+
this.field.props?.options.pipe(takeUntilDestroyed(this._destroyRef)).subscribe((data) => {
|
|
1234
1203
|
this.optionsData = data;
|
|
1235
1204
|
});
|
|
1236
1205
|
}
|
|
1237
1206
|
const url = this.field.props?.domain?.url;
|
|
1238
1207
|
if (url && this.field.props?.domain?.code && this.field.props?.domain?.key && this.field.props?.domain?.value) {
|
|
1239
|
-
this._http.get(url).pipe(
|
|
1208
|
+
this._http.get(url).pipe(takeUntilDestroyed(this._destroyRef)).subscribe((data) => {
|
|
1240
1209
|
if (data) {
|
|
1241
1210
|
const datas = data.filter((i) => {
|
|
1242
1211
|
if (this.field.props?.domain?.key)
|
|
@@ -1253,18 +1222,14 @@ class CmatTagsTypeComponent extends FieldType {
|
|
|
1253
1222
|
else {
|
|
1254
1223
|
this.urlData = [];
|
|
1255
1224
|
}
|
|
1256
|
-
this._filteredItems.
|
|
1225
|
+
this._filteredItems.set(this.tags);
|
|
1257
1226
|
});
|
|
1258
1227
|
}
|
|
1259
1228
|
else {
|
|
1260
1229
|
this.urlData = [];
|
|
1261
|
-
this._filteredItems.
|
|
1230
|
+
this._filteredItems.set(this.tags);
|
|
1262
1231
|
}
|
|
1263
1232
|
}
|
|
1264
|
-
ngOnDestroy() {
|
|
1265
|
-
this._unsubscribeAll.next(void 0);
|
|
1266
|
-
this._unsubscribeAll.complete();
|
|
1267
|
-
}
|
|
1268
1233
|
openTagsPanel() {
|
|
1269
1234
|
this._tagsPanelOverlayRef = this._overlay.create({
|
|
1270
1235
|
backdropClass: '',
|
|
@@ -1289,25 +1254,19 @@ class CmatTagsTypeComponent extends FieldType {
|
|
|
1289
1254
|
});
|
|
1290
1255
|
const templatePortal = new TemplatePortal(this._tagsPanel, this._viewContainerRef);
|
|
1291
1256
|
this._tagsPanelOverlayRef.attach(templatePortal);
|
|
1292
|
-
// Subscribe to the backdrop click
|
|
1293
1257
|
this._tagsPanelOverlayRef.backdropClick().subscribe(() => {
|
|
1294
|
-
// If overlay exists and attached...
|
|
1295
1258
|
if (this._tagsPanelOverlayRef?.hasAttached()) {
|
|
1296
|
-
// Detach it
|
|
1297
1259
|
this._tagsPanelOverlayRef.detach();
|
|
1298
|
-
|
|
1299
|
-
this._filteredItems.next(this.tags);
|
|
1260
|
+
this._filteredItems.set(this.tags);
|
|
1300
1261
|
}
|
|
1301
|
-
// If template portal exists and attached...
|
|
1302
1262
|
if (templatePortal?.isAttached) {
|
|
1303
|
-
// Detach it
|
|
1304
1263
|
templatePortal.detach();
|
|
1305
1264
|
}
|
|
1306
1265
|
});
|
|
1307
1266
|
}
|
|
1308
1267
|
filterTags(event) {
|
|
1309
1268
|
const value = event.target.value.toLowerCase();
|
|
1310
|
-
this._filteredItems.
|
|
1269
|
+
this._filteredItems.set(this.tags.filter(tag => tag.label.toString().toLowerCase().includes(value) ?? tag.value.toString().toLowerCase().includes(value)));
|
|
1311
1270
|
}
|
|
1312
1271
|
toggleTag(tag) {
|
|
1313
1272
|
if (tag.disabled)
|
|
@@ -1326,10 +1285,10 @@ class CmatTagsTypeComponent extends FieldType {
|
|
|
1326
1285
|
isCheck(tag) {
|
|
1327
1286
|
return this.formControl.value?.filter((i) => i.value === tag.value).length > 0;
|
|
1328
1287
|
}
|
|
1329
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.
|
|
1330
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.
|
|
1288
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: CmatTagsTypeComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1289
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.8", type: CmatTagsTypeComponent, isStandalone: true, selector: "cmat-tags-type", viewQueries: [{ propertyName: "_tagsPanelOrigin", first: true, predicate: ["tagsPanelOrigin"], descendants: true }, { propertyName: "_tagsPanel", first: true, predicate: ["tagsPanel"], descendants: true }], usesInheritance: true, ngImport: i0, template: "<div class=\"text-lg mb-2\">\r\n {{ props.label }}\r\n @if(props.required){\r\n <span>*</span>\r\n }\r\n</div>\r\n<div class=\"flex flex-wrap items-center -m-2\" [tabIndex]=\"props.tabindex\">\r\n <ng-container>\r\n @for (selectedItem of formControl.value; track $index) {\r\n <div\r\n class=\"flex items-center justify-center px-4 m-1.5 rounded-full leading-9 text-gray-500 bg-slate-100 dark:text-gray-300 dark:bg-slate-700\">\r\n <span class=\"text-md font-medium whitespace-nowrap\">{{selectedItem.label}}</span>\r\n </div>\r\n }\r\n\r\n <div #tagsPanelOrigin\r\n class=\"flex items-center justify-center px-4 m-1.5 rounded-full leading-9 cursor-pointer text-gray-500 bg-slate-100 dark:text-gray-300 dark:bg-slate-700 print:hidden\" role=\"presentation\" (click)=\"openTagsPanel()\">\r\n\r\n @if(formControl.value?.length&&!disabled){\r\n <mat-icon class=\"icon-size-5\" [svgIcon]=\"'heroicons_solid:pencil-square'\"></mat-icon>\r\n <span class=\"ml-1.5 text-md font-medium whitespace-nowrap\">\u7F16\u8F91</span>\r\n }\r\n\r\n @if(!formControl.value?.length&&!disabled){\r\n <mat-icon class=\"icon-size-5\" [svgIcon]=\"'heroicons_solid:plus-circle'\"></mat-icon>\r\n <span class=\"ml-1.5 text-md font-medium whitespace-nowrap\">\u65B0\u589E</span>\r\n }\r\n\r\n <ng-template #tagsPanel>\r\n <div class=\"w-60 rounded-sm border shadow-md bg-card\">\r\n <div class=\"flex items-center m-3 mr-2\">\r\n <div class=\"flex items-center\">\r\n <mat-icon class=\"icon-size-5\" [svgIcon]=\"'heroicons_solid:magnifying-glass'\">\r\n </mat-icon>\r\n <div class=\"ml-2\">\r\n <input class=\"w-full min-w-0 py-1 border-none\" type=\"text\" placeholder=\"\u8F93\u5165\u6807\u7B7E\u540D\"\r\n [maxLength]=\"30\" (input)=\"filterTags($event)\">\r\n </div>\r\n </div>\r\n </div>\r\n <div class=\"flex flex-col max-h-64 py-2 border-t overflow-y-auto scrollbar-custom\">\r\n @if ((filteredItems$ | async); as filteredItems) {\r\n @if(filteredItems.length>0){\r\n @for (tag of filteredItems; track $index) {\r\n <div role=\"presentation\"\r\n class=\"flex items-center h-10 min-h-10 pl-1 pr-4 cursor-pointer hover:bg-hover\"\r\n matRipple (click)=\"toggleTag(tag)\">\r\n <mat-checkbox class=\"flex items-center h-10 min-h-10\" [color]=\"'primary'\"\r\n [disabled]=\"tag.disabled\" [checked]=\"isCheck(tag)\">\r\n {{tag.label}}\r\n </mat-checkbox>\r\n </div>\r\n }\r\n }@else {\r\n <div class=\"flex flex-auto flex-col justify-center px-4 h-10 min-h-10\">\r\n \u65E0\u7ED3\u679C\r\n </div>\r\n }\r\n }\r\n </div>\r\n </div>\r\n </ng-template>\r\n </div>\r\n </ng-container>\r\n</div>", styles: [":host{width:100%}\n"], dependencies: [{ kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i2.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "ngmodule", type: MatCheckboxModule }, { kind: "component", type: i1$5.MatCheckbox, selector: "mat-checkbox", inputs: ["aria-label", "aria-labelledby", "aria-describedby", "aria-expanded", "aria-controls", "aria-owns", "id", "required", "labelPosition", "name", "value", "disableRipple", "tabIndex", "color", "disabledInteractive", "checked", "disabled", "indeterminate"], outputs: ["change", "indeterminateChange"], exportAs: ["matCheckbox"] }, { kind: "pipe", type: AsyncPipe, name: "async" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
1331
1290
|
}
|
|
1332
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.
|
|
1291
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: CmatTagsTypeComponent, decorators: [{
|
|
1333
1292
|
type: Component,
|
|
1334
1293
|
args: [{ selector: 'cmat-tags-type', changeDetection: ChangeDetectionStrategy.OnPush, imports: [MatIconModule, MatCheckboxModule, AsyncPipe], template: "<div class=\"text-lg mb-2\">\r\n {{ props.label }}\r\n @if(props.required){\r\n <span>*</span>\r\n }\r\n</div>\r\n<div class=\"flex flex-wrap items-center -m-2\" [tabIndex]=\"props.tabindex\">\r\n <ng-container>\r\n @for (selectedItem of formControl.value; track $index) {\r\n <div\r\n class=\"flex items-center justify-center px-4 m-1.5 rounded-full leading-9 text-gray-500 bg-slate-100 dark:text-gray-300 dark:bg-slate-700\">\r\n <span class=\"text-md font-medium whitespace-nowrap\">{{selectedItem.label}}</span>\r\n </div>\r\n }\r\n\r\n <div #tagsPanelOrigin\r\n class=\"flex items-center justify-center px-4 m-1.5 rounded-full leading-9 cursor-pointer text-gray-500 bg-slate-100 dark:text-gray-300 dark:bg-slate-700 print:hidden\" role=\"presentation\" (click)=\"openTagsPanel()\">\r\n\r\n @if(formControl.value?.length&&!disabled){\r\n <mat-icon class=\"icon-size-5\" [svgIcon]=\"'heroicons_solid:pencil-square'\"></mat-icon>\r\n <span class=\"ml-1.5 text-md font-medium whitespace-nowrap\">\u7F16\u8F91</span>\r\n }\r\n\r\n @if(!formControl.value?.length&&!disabled){\r\n <mat-icon class=\"icon-size-5\" [svgIcon]=\"'heroicons_solid:plus-circle'\"></mat-icon>\r\n <span class=\"ml-1.5 text-md font-medium whitespace-nowrap\">\u65B0\u589E</span>\r\n }\r\n\r\n <ng-template #tagsPanel>\r\n <div class=\"w-60 rounded-sm border shadow-md bg-card\">\r\n <div class=\"flex items-center m-3 mr-2\">\r\n <div class=\"flex items-center\">\r\n <mat-icon class=\"icon-size-5\" [svgIcon]=\"'heroicons_solid:magnifying-glass'\">\r\n </mat-icon>\r\n <div class=\"ml-2\">\r\n <input class=\"w-full min-w-0 py-1 border-none\" type=\"text\" placeholder=\"\u8F93\u5165\u6807\u7B7E\u540D\"\r\n [maxLength]=\"30\" (input)=\"filterTags($event)\">\r\n </div>\r\n </div>\r\n </div>\r\n <div class=\"flex flex-col max-h-64 py-2 border-t overflow-y-auto scrollbar-custom\">\r\n @if ((filteredItems$ | async); as filteredItems) {\r\n @if(filteredItems.length>0){\r\n @for (tag of filteredItems; track $index) {\r\n <div role=\"presentation\"\r\n class=\"flex items-center h-10 min-h-10 pl-1 pr-4 cursor-pointer hover:bg-hover\"\r\n matRipple (click)=\"toggleTag(tag)\">\r\n <mat-checkbox class=\"flex items-center h-10 min-h-10\" [color]=\"'primary'\"\r\n [disabled]=\"tag.disabled\" [checked]=\"isCheck(tag)\">\r\n {{tag.label}}\r\n </mat-checkbox>\r\n </div>\r\n }\r\n }@else {\r\n <div class=\"flex flex-auto flex-col justify-center px-4 h-10 min-h-10\">\r\n \u65E0\u7ED3\u679C\r\n </div>\r\n }\r\n }\r\n </div>\r\n </div>\r\n </ng-template>\r\n </div>\r\n </ng-container>\r\n</div>", styles: [":host{width:100%}\n"] }]
|
|
1335
1294
|
}], ctorParameters: () => [], propDecorators: { _tagsPanelOrigin: [{
|
|
@@ -1350,10 +1309,10 @@ class CmatTextareaTypeComponent extends FieldType$1 {
|
|
|
1350
1309
|
},
|
|
1351
1310
|
};
|
|
1352
1311
|
}
|
|
1353
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.
|
|
1354
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.
|
|
1312
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: CmatTextareaTypeComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
1313
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.8", type: CmatTextareaTypeComponent, isStandalone: true, selector: "cmat-textarea-type", usesInheritance: true, ngImport: i0, template: "<textarea matInput [placeholder]=\"placeholder\" \r\n [readonly]=\"props.readonly\" [errorStateMatcher]=\"errorStateMatcher\"\r\n [cols]=\"props.cols\"\r\n [rows]=\"props.rows\"\r\n [tabindex]=\"props.tabindex\"\r\n [formControl]=\"formControl\" [required]=\"required\">\r\n</textarea>", styles: [":host{width:100%}\n"], dependencies: [{ kind: "ngmodule", type: MatInputModule }, { kind: "directive", type: i1$6.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly", "disabledInteractive"], exportAs: ["matInput"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1$4.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1$4.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$4.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i1$4.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
1355
1314
|
}
|
|
1356
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.
|
|
1315
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: CmatTextareaTypeComponent, decorators: [{
|
|
1357
1316
|
type: Component,
|
|
1358
1317
|
args: [{ selector: 'cmat-textarea-type', changeDetection: ChangeDetectionStrategy.OnPush, imports: [MatInputModule, ReactiveFormsModule], template: "<textarea matInput [placeholder]=\"placeholder\" \r\n [readonly]=\"props.readonly\" [errorStateMatcher]=\"errorStateMatcher\"\r\n [cols]=\"props.cols\"\r\n [rows]=\"props.rows\"\r\n [tabindex]=\"props.tabindex\"\r\n [formControl]=\"formControl\" [required]=\"required\">\r\n</textarea>", styles: [":host{width:100%}\n"] }]
|
|
1359
1318
|
}] });
|
|
@@ -1413,10 +1372,10 @@ class CmatUploadTypeComponent extends FieldType {
|
|
|
1413
1372
|
}
|
|
1414
1373
|
return baseControl;
|
|
1415
1374
|
}
|
|
1416
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.
|
|
1417
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.
|
|
1375
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: CmatUploadTypeComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
1376
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.8", type: CmatUploadTypeComponent, isStandalone: true, selector: "cmat-upload-type", usesInheritance: true, ngImport: i0, template: "<cmat-upload-queue [tabindex]=\"props.tabindex\" [fileAlias]=\"props.fileAlias\"\r\n [filePath]=\"props.filePath\" [required]=\"required\" [fileCategory]=\"props.fileCategory\" [multiple]=\"props.multiple\"\r\n [accept]=\"props.accept\" [title]=\"props.label??'\u9644\u4EF6'\" [editMode]=\"props.editMode&&!disabled\" [filesData]=\"formControl.value\"\r\n [autoUpload]=\"props.autoUpload\" (outputUploadIdEvent)=\"upload($event)\" (outputRemoveIdEvent)=\"remove($event)\" (outputFilesDataEvent)=\"updateData($event)\">\r\n</cmat-upload-queue>", styles: [":host{width:100%}\n"], dependencies: [{ kind: "component", type: CmatUploadQueueComponent, selector: "cmat-upload-queue", inputs: ["fileAlias", "filePath", "fileCategory", "isPublic", "required", "autoUpload", "multiple", "accept", "title", "editMode", "filesData"], outputs: ["outputRemoveIdEvent", "outputUploadIdEvent", "outputFilesDataEvent"], exportAs: ["cmatUploadQueue"] }, { kind: "ngmodule", type: ReactiveFormsModule }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
1418
1377
|
}
|
|
1419
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.
|
|
1378
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: CmatUploadTypeComponent, decorators: [{
|
|
1420
1379
|
type: Component,
|
|
1421
1380
|
args: [{ selector: 'cmat-upload-type', changeDetection: ChangeDetectionStrategy.OnPush, imports: [CmatUploadQueueComponent, ReactiveFormsModule], template: "<cmat-upload-queue [tabindex]=\"props.tabindex\" [fileAlias]=\"props.fileAlias\"\r\n [filePath]=\"props.filePath\" [required]=\"required\" [fileCategory]=\"props.fileCategory\" [multiple]=\"props.multiple\"\r\n [accept]=\"props.accept\" [title]=\"props.label??'\u9644\u4EF6'\" [editMode]=\"props.editMode&&!disabled\" [filesData]=\"formControl.value\"\r\n [autoUpload]=\"props.autoUpload\" (outputUploadIdEvent)=\"upload($event)\" (outputRemoveIdEvent)=\"remove($event)\" (outputFilesDataEvent)=\"updateData($event)\">\r\n</cmat-upload-queue>", styles: [":host{width:100%}\n"] }]
|
|
1422
1381
|
}] });
|
|
@@ -1462,18 +1421,14 @@ class CmatQuillTypeComponent extends FieldType {
|
|
|
1462
1421
|
this._fileService = inject(CmatFilesUtilService);
|
|
1463
1422
|
this._urlStateConfigService = inject(CmatUrlStateConfigService);
|
|
1464
1423
|
this._changeDetectorRef = inject(ChangeDetectorRef);
|
|
1424
|
+
this._destroyRef = inject(DestroyRef);
|
|
1465
1425
|
this._imgIds = [];
|
|
1466
|
-
this._unsubscribeAll = new Subject();
|
|
1467
1426
|
this._urlStateConfigService.config$
|
|
1468
|
-
.pipe(
|
|
1427
|
+
.pipe(takeUntilDestroyed(this._destroyRef))
|
|
1469
1428
|
.subscribe((config) => {
|
|
1470
1429
|
this._config = config;
|
|
1471
1430
|
});
|
|
1472
1431
|
}
|
|
1473
|
-
ngOnDestroy() {
|
|
1474
|
-
this._unsubscribeAll.next(void 0);
|
|
1475
|
-
this._unsubscribeAll.complete();
|
|
1476
|
-
}
|
|
1477
1432
|
ngAfterViewInit() {
|
|
1478
1433
|
const icons = Quill.import('ui/icons');
|
|
1479
1434
|
icons['word'] = `
|
|
@@ -1501,7 +1456,7 @@ class CmatQuillTypeComponent extends FieldType {
|
|
|
1501
1456
|
const formData = new FormData();
|
|
1502
1457
|
formData.set('fileData', file, file.name);
|
|
1503
1458
|
formData.append('fileInfo', JSON.stringify(fileModel));
|
|
1504
|
-
this._fileService.uploadFile(formData).pipe(
|
|
1459
|
+
this._fileService.uploadFile(formData).pipe(takeUntilDestroyed(this._destroyRef)).subscribe((event) => {
|
|
1505
1460
|
if (event.type === HttpEventType.Response) {
|
|
1506
1461
|
this._editorInstance.insertEmbed(this._editorInstance.getSelection(true).index, this._getMediaType(file.type), `${this._config.fileUrl}/download/quill/${event.body.id}`);
|
|
1507
1462
|
this._editorInstance.setSelection(this._editorInstance.getSelection(true).index + 1);
|
|
@@ -1550,21 +1505,16 @@ class CmatQuillTypeComponent extends FieldType {
|
|
|
1550
1505
|
}
|
|
1551
1506
|
async _wordFileHandler() {
|
|
1552
1507
|
try {
|
|
1553
|
-
// 获取 Quill Delta 内容
|
|
1554
1508
|
const delta = this._editorInstance.getContents();
|
|
1555
|
-
// 转换为 docx 文档结构
|
|
1556
1509
|
const children = await this._convertDeltaToDocxChildren(delta);
|
|
1557
|
-
// 创建文档
|
|
1558
1510
|
const doc = new Document({
|
|
1559
1511
|
sections: [{
|
|
1560
1512
|
properties: {},
|
|
1561
1513
|
children: children
|
|
1562
1514
|
}]
|
|
1563
1515
|
});
|
|
1564
|
-
// 生成 Blob
|
|
1565
1516
|
const blob = await Packer.toBlob(doc);
|
|
1566
|
-
|
|
1567
|
-
FileSaver.saveAs(blob, `${this.placeholder ?? '富文本内容下载_'}${dayjs().format('YYYYMMDDHHmmss')}.docx`);
|
|
1517
|
+
FileSaver.saveAs(blob, `${this.placeholder ?? '富文本内容下载'}${dayjs().format('YYYYMMDDHHmmss')}.docx`);
|
|
1568
1518
|
}
|
|
1569
1519
|
catch (error) {
|
|
1570
1520
|
console.error('Word 导出失败:', error);
|
|
@@ -1576,7 +1526,6 @@ class CmatQuillTypeComponent extends FieldType {
|
|
|
1576
1526
|
let currentListLevel = 0;
|
|
1577
1527
|
let isList = false;
|
|
1578
1528
|
for (const op of delta.ops) {
|
|
1579
|
-
// 处理图片
|
|
1580
1529
|
if (op.insert?.image) {
|
|
1581
1530
|
if (currentRun.length > 0) {
|
|
1582
1531
|
children.push(new Paragraph({ children: currentRun }));
|
|
@@ -1588,30 +1537,24 @@ class CmatQuillTypeComponent extends FieldType {
|
|
|
1588
1537
|
alignment: AlignmentType.CENTER
|
|
1589
1538
|
}));
|
|
1590
1539
|
}
|
|
1591
|
-
// 处理文本
|
|
1592
1540
|
else if (typeof op.insert === 'string') {
|
|
1593
1541
|
const text = op.insert;
|
|
1594
|
-
// 换行符 - 新建段落
|
|
1595
1542
|
if (text === '\n') {
|
|
1596
1543
|
if (currentRun.length > 0) {
|
|
1597
1544
|
children.push(this._createParagraph(currentRun, op.attributes, isList, currentListLevel));
|
|
1598
1545
|
currentRun = [];
|
|
1599
1546
|
}
|
|
1600
1547
|
else {
|
|
1601
|
-
// 空行
|
|
1602
1548
|
children.push(new Paragraph({ children: [new TextRun({ text: '' })] }));
|
|
1603
1549
|
}
|
|
1604
|
-
// 重置列表状态
|
|
1605
1550
|
if (!op.attributes?.list) {
|
|
1606
1551
|
isList = false;
|
|
1607
1552
|
currentListLevel = 0;
|
|
1608
1553
|
}
|
|
1609
1554
|
}
|
|
1610
|
-
// 普通文本
|
|
1611
1555
|
else {
|
|
1612
1556
|
const textRun = this._createTextRun(text, op.attributes);
|
|
1613
1557
|
currentRun.push(textRun);
|
|
1614
|
-
// 检测列表
|
|
1615
1558
|
if (op.attributes?.list) {
|
|
1616
1559
|
isList = true;
|
|
1617
1560
|
currentListLevel = op.attributes.list === 'bullet' ? 0 :
|
|
@@ -1620,7 +1563,6 @@ class CmatQuillTypeComponent extends FieldType {
|
|
|
1620
1563
|
}
|
|
1621
1564
|
}
|
|
1622
1565
|
}
|
|
1623
|
-
// 处理剩余文本
|
|
1624
1566
|
if (currentRun.length > 0) {
|
|
1625
1567
|
children.push(this._createParagraph(currentRun, null, isList, currentListLevel));
|
|
1626
1568
|
}
|
|
@@ -1643,14 +1585,12 @@ class CmatQuillTypeComponent extends FieldType {
|
|
|
1643
1585
|
children: runs,
|
|
1644
1586
|
alignment: this._mapAlignment(attributes?.align),
|
|
1645
1587
|
};
|
|
1646
|
-
// 处理标题
|
|
1647
1588
|
if (attributes?.header) {
|
|
1648
1589
|
const headerLevel = parseInt(attributes.header);
|
|
1649
1590
|
if (headerLevel >= 1 && headerLevel <= 6) {
|
|
1650
1591
|
paragraphOptions.heading = HeadingLevel[`HEADING_${headerLevel}`];
|
|
1651
1592
|
}
|
|
1652
1593
|
}
|
|
1653
|
-
// 处理列表
|
|
1654
1594
|
if (isList && attributes?.list) {
|
|
1655
1595
|
paragraphOptions.bullet = {
|
|
1656
1596
|
level: listLevel ?? 0
|
|
@@ -1660,7 +1600,6 @@ class CmatQuillTypeComponent extends FieldType {
|
|
|
1660
1600
|
}
|
|
1661
1601
|
async _createImageRun(imageUrl) {
|
|
1662
1602
|
const imageBuffer = await this._getImageBuffer(imageUrl);
|
|
1663
|
-
// 根据 URL 后缀判断图片类型,默认 PNG
|
|
1664
1603
|
let type = 'png';
|
|
1665
1604
|
if (imageUrl.toLowerCase().endsWith('.svg')) {
|
|
1666
1605
|
type = 'svg';
|
|
@@ -1674,7 +1613,6 @@ class CmatQuillTypeComponent extends FieldType {
|
|
|
1674
1613
|
const dimensions = await this._getImageDimensions(imageUrl);
|
|
1675
1614
|
const maxWidth = 500;
|
|
1676
1615
|
const maxHeight = 400;
|
|
1677
|
-
// 按比例缩放
|
|
1678
1616
|
const scale = Math.min(maxWidth / dimensions.width, maxHeight / dimensions.height, 1);
|
|
1679
1617
|
return new ImageRun({
|
|
1680
1618
|
data: imageBuffer,
|
|
@@ -1690,7 +1628,6 @@ class CmatQuillTypeComponent extends FieldType {
|
|
|
1690
1628
|
});
|
|
1691
1629
|
}
|
|
1692
1630
|
async _getImageBuffer(imageUrl) {
|
|
1693
|
-
// 如果已经是 Base64
|
|
1694
1631
|
if (imageUrl.startsWith('data:image')) {
|
|
1695
1632
|
const base64 = imageUrl.split(',')[1];
|
|
1696
1633
|
return this._base64ToUint8Array(base64);
|
|
@@ -1709,7 +1646,6 @@ class CmatQuillTypeComponent extends FieldType {
|
|
|
1709
1646
|
}
|
|
1710
1647
|
catch (error) {
|
|
1711
1648
|
console.error('图片加载失败:', imageUrl, error);
|
|
1712
|
-
// 返回空图片占位
|
|
1713
1649
|
return new Uint8Array(0);
|
|
1714
1650
|
}
|
|
1715
1651
|
}
|
|
@@ -1720,7 +1656,6 @@ class CmatQuillTypeComponent extends FieldType {
|
|
|
1720
1656
|
resolve({ width: img.width, height: img.height });
|
|
1721
1657
|
};
|
|
1722
1658
|
img.onerror = () => {
|
|
1723
|
-
// 默认尺寸
|
|
1724
1659
|
resolve({ width: 400, height: 300 });
|
|
1725
1660
|
};
|
|
1726
1661
|
img.src = imageUrl;
|
|
@@ -1760,11 +1695,9 @@ class CmatQuillTypeComponent extends FieldType {
|
|
|
1760
1695
|
_parseColor(color) {
|
|
1761
1696
|
if (!color)
|
|
1762
1697
|
return undefined;
|
|
1763
|
-
// 处理 hex 颜色 #RRGGBB -> RRGGBB
|
|
1764
1698
|
if (color.startsWith('#')) {
|
|
1765
1699
|
return color.substring(1).toUpperCase();
|
|
1766
1700
|
}
|
|
1767
|
-
// 处理 rgb/rgba
|
|
1768
1701
|
const rgbMatch = /rgba?\((\d+),\s*(\d+),\s*(\d+)/.exec(color);
|
|
1769
1702
|
if (rgbMatch) {
|
|
1770
1703
|
const r = parseInt(rgbMatch[1]).toString(16).padStart(2, '0');
|
|
@@ -1806,10 +1739,10 @@ class CmatQuillTypeComponent extends FieldType {
|
|
|
1806
1739
|
}
|
|
1807
1740
|
return baseControl;
|
|
1808
1741
|
}
|
|
1809
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.
|
|
1810
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.
|
|
1742
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: CmatQuillTypeComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1743
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.8", type: CmatQuillTypeComponent, isStandalone: true, selector: "cmat-quill-type", viewQueries: [{ propertyName: "imgInput", first: true, predicate: ["imgInput"], descendants: true }, { propertyName: "videoInput", first: true, predicate: ["videoInput"], descendants: true }], usesInheritance: true, ngImport: i0, template: "<quill-editor class=\"w-full\" defaultEmptyValue=\"\" [formControl]=\"formControl\" [required]=\"required\" [placeholder]=\"placeholder\" [tabindex]=\"props.tabindex\"\r\n [readOnly]=\"disabled\" [modules]=\"quillModules\" (onEditorCreated)=\"editorCreated($event)\"\r\n (onContentChanged)=\"contentChanged($event)\">\r\n \r\n <input #imgInput type=\"file\" accept=\"image/png,image/jpeg,image/jpg,image/gif\" class=\"hidden\" (change)=\"fileChangeEvent(imgInput.files?.[0])\" />\r\n <input #videoInput type=\"file\" accept=\"video/mpeg,video/mp4,audio/mp4\" class=\"hidden\" (change)=\"fileChangeEvent(videoInput.files?.[0])\" />\r\n</quill-editor>", styles: [":host{display:block;width:100%}\n"], dependencies: [{ kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1$4.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$4.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i1$4.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "ngmodule", type: QuillModule }, { kind: "component", type: i2$4.QuillEditorComponent, selector: "quill-editor" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
1811
1744
|
}
|
|
1812
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.
|
|
1745
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: CmatQuillTypeComponent, decorators: [{
|
|
1813
1746
|
type: Component,
|
|
1814
1747
|
args: [{ selector: 'cmat-quill-type', changeDetection: ChangeDetectionStrategy.OnPush, imports: [ReactiveFormsModule, QuillModule], template: "<quill-editor class=\"w-full\" defaultEmptyValue=\"\" [formControl]=\"formControl\" [required]=\"required\" [placeholder]=\"placeholder\" [tabindex]=\"props.tabindex\"\r\n [readOnly]=\"disabled\" [modules]=\"quillModules\" (onEditorCreated)=\"editorCreated($event)\"\r\n (onContentChanged)=\"contentChanged($event)\">\r\n \r\n <input #imgInput type=\"file\" accept=\"image/png,image/jpeg,image/jpg,image/gif\" class=\"hidden\" (change)=\"fileChangeEvent(imgInput.files?.[0])\" />\r\n <input #videoInput type=\"file\" accept=\"video/mpeg,video/mp4,audio/mp4\" class=\"hidden\" (change)=\"fileChangeEvent(videoInput.files?.[0])\" />\r\n</quill-editor>", styles: [":host{display:block;width:100%}\n"] }]
|
|
1815
1748
|
}], ctorParameters: () => [], propDecorators: { imgInput: [{
|
|
@@ -1838,10 +1771,10 @@ class CmatKnobTypeComponent extends FieldType {
|
|
|
1838
1771
|
},
|
|
1839
1772
|
};
|
|
1840
1773
|
}
|
|
1841
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.
|
|
1842
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.
|
|
1774
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: CmatKnobTypeComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
1775
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.8", type: CmatKnobTypeComponent, isStandalone: true, selector: "cmat-knob-type", usesInheritance: true, ngImport: i0, template: "<cmat-knob-input [formControl]=\"formControl\" [tabIndex]=\"props.tabindex\" [valueColor]=\"props.valueColor\"\r\n [rangeColor]=\"props.rangeColor\" [textColor]=\"props.textColor\" [valueTemplate]=\"props.valueTemplate\"\r\n [name]=\"props.name\" [size]=\"props.size\" [step]=\"props.step\" [min]=\"props.min\" [max]=\"props.max\"\r\n [strokeWidth]=\"props.strokeWidth\" [showValue]=\"props.showValue\">\r\n</cmat-knob-input>", styles: [":host{width:100%}\n"], dependencies: [{ kind: "component", type: CmatKnobInputComponent, selector: "cmat-knob-input", inputs: ["id", "valueColor", "rangeColor", "textColor", "valueTemplate", "name", "size", "step", "min", "max", "strokeWidth", "showValue", "placeholder", "value", "required", "disabled"], outputs: ["valueChange"], exportAs: ["cmatKnobInput"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1$4.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$4.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
1843
1776
|
}
|
|
1844
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.
|
|
1777
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: CmatKnobTypeComponent, decorators: [{
|
|
1845
1778
|
type: Component,
|
|
1846
1779
|
args: [{ selector: 'cmat-knob-type', changeDetection: ChangeDetectionStrategy.OnPush, imports: [CmatKnobInputComponent, ReactiveFormsModule], template: "<cmat-knob-input [formControl]=\"formControl\" [tabIndex]=\"props.tabindex\" [valueColor]=\"props.valueColor\"\r\n [rangeColor]=\"props.rangeColor\" [textColor]=\"props.textColor\" [valueTemplate]=\"props.valueTemplate\"\r\n [name]=\"props.name\" [size]=\"props.size\" [step]=\"props.step\" [min]=\"props.min\" [max]=\"props.max\"\r\n [strokeWidth]=\"props.strokeWidth\" [showValue]=\"props.showValue\">\r\n</cmat-knob-input>", styles: [":host{width:100%}\n"] }]
|
|
1847
1780
|
}] });
|
|
@@ -1857,10 +1790,10 @@ class CmatSliderTypeComponent extends FieldType$1 {
|
|
|
1857
1790
|
}
|
|
1858
1791
|
};
|
|
1859
1792
|
}
|
|
1860
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.
|
|
1861
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.
|
|
1793
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: CmatSliderTypeComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
1794
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.8", type: CmatSliderTypeComponent, isStandalone: true, selector: "cmat-slider-type", usesInheritance: true, ngImport: i0, template: "<mat-slider class=\"w-full\" [id]=\"id\" [tabIndex]=\"props.tabindex\" [color]=\"props.color\"\r\n [displayWith]=\"props.displayWith!\" [max]=\"props.max\" [min]=\"props.min\" [step]=\"props.step\" [discrete]=\"props.discrete\"\r\n [showTickMarks]=\"props.showTickMarks\" (input)=\"props.input && props.input(field, $event)\"\r\n (change)=\"props.change && props.change(field, $event)\">\r\n <input matSliderThumb [formControl]=\"formControl\" />\r\n</mat-slider>", styles: [":host{width:100%}:host .mdc-slider__input{padding:0!important}\n"], dependencies: [{ kind: "ngmodule", type: MatSliderModule }, { kind: "component", type: i1$a.MatSlider, selector: "mat-slider", inputs: ["disabled", "discrete", "showTickMarks", "min", "color", "disableRipple", "max", "step", "displayWith"], exportAs: ["matSlider"] }, { kind: "directive", type: i1$a.MatSliderThumb, selector: "input[matSliderThumb]", inputs: ["value"], outputs: ["valueChange", "dragStart", "dragEnd"], exportAs: ["matSliderThumb"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1$4.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1$4.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$4.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
1862
1795
|
}
|
|
1863
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.
|
|
1796
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: CmatSliderTypeComponent, decorators: [{
|
|
1864
1797
|
type: Component,
|
|
1865
1798
|
args: [{ selector: 'cmat-slider-type', changeDetection: ChangeDetectionStrategy.OnPush, imports: [MatSliderModule, ReactiveFormsModule], template: "<mat-slider class=\"w-full\" [id]=\"id\" [tabIndex]=\"props.tabindex\" [color]=\"props.color\"\r\n [displayWith]=\"props.displayWith!\" [max]=\"props.max\" [min]=\"props.min\" [step]=\"props.step\" [discrete]=\"props.discrete\"\r\n [showTickMarks]=\"props.showTickMarks\" (input)=\"props.input && props.input(field, $event)\"\r\n (change)=\"props.change && props.change(field, $event)\">\r\n <input matSliderThumb [formControl]=\"formControl\" />\r\n</mat-slider>", styles: [":host{width:100%}:host .mdc-slider__input{padding:0!important}\n"] }]
|
|
1866
1799
|
}] });
|