cmat 0.0.8 → 0.0.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/components/custom-formly/public-api.d.ts +5 -0
- package/components/custom-formly/types/cascade/cascade.component.d.ts +38 -0
- package/components/custom-formly/types/color-picker/color-picker.component.d.ts +7 -0
- package/components/custom-formly/types/date-range/date-range.component.d.ts +20 -0
- package/components/custom-formly/types/datepicker/datepicker.component.d.ts +41 -0
- package/components/custom-formly/types/upload/upload.component.d.ts +31 -0
- package/esm2022/components/custom-formly/public-api.mjs +6 -1
- package/esm2022/components/custom-formly/types/cascade/cascade.component.mjs +71 -0
- package/esm2022/components/custom-formly/types/color-picker/color-picker.component.mjs +15 -0
- package/esm2022/components/custom-formly/types/date-range/date-range.component.mjs +25 -0
- package/esm2022/components/custom-formly/types/datepicker/datepicker.component.mjs +51 -0
- package/esm2022/components/custom-formly/types/upload/upload.component.mjs +58 -0
- package/fesm2022/cmat-components-custom-formly.mjs +229 -39
- package/fesm2022/cmat-components-custom-formly.mjs.map +1 -1
- package/package.json +17 -17
|
@@ -13,36 +13,42 @@ import { MatExpansionModule } from '@angular/material/expansion';
|
|
|
13
13
|
import * as i3 from '@angular/material/button';
|
|
14
14
|
import { MatButtonModule } from '@angular/material/button';
|
|
15
15
|
import { FieldType } from '@ngx-formly/material/form-field';
|
|
16
|
+
import * as i2$1 from '@angular/forms';
|
|
17
|
+
import { ReactiveFormsModule, FormsModule, FormControl, FormGroup } from '@angular/forms';
|
|
18
|
+
import { Subject, takeUntil, BehaviorSubject, ReplaySubject, of, take } from 'rxjs';
|
|
19
|
+
import { CmatCascadeListComponent } from 'cmat/components/cascade';
|
|
20
|
+
import * as i1$2 from '@angular/common/http';
|
|
21
|
+
import * as i2 from 'cmat/services/media-watcher';
|
|
16
22
|
import { NgClass, AsyncPipe, NgStyle, NgTemplateOutlet } from '@angular/common';
|
|
17
|
-
import * as i2 from '@angular/material/checkbox';
|
|
23
|
+
import * as i2$2 from '@angular/material/checkbox';
|
|
18
24
|
import { MatCheckboxModule, MatCheckbox } from '@angular/material/checkbox';
|
|
19
25
|
import * as i3$1 from '@angular/material/core';
|
|
20
26
|
import { MatRippleModule } from '@angular/material/core';
|
|
21
|
-
import {
|
|
22
|
-
import { takeUntil } from 'rxjs/operators';
|
|
27
|
+
import { takeUntil as takeUntil$1 } from 'rxjs/operators';
|
|
23
28
|
import { CmatSecurePipe } from 'cmat/pipes/secure';
|
|
24
|
-
import * as i1$2 from '@angular/common/http';
|
|
25
|
-
import * as i2$1 from '@angular/forms';
|
|
26
|
-
import { ReactiveFormsModule, FormControl, FormGroup, FormsModule } from '@angular/forms';
|
|
27
29
|
import { CmatChipInputComponent } from 'cmat/components/chip-input';
|
|
28
|
-
import
|
|
29
|
-
import {
|
|
30
|
+
import { CmatMaterialColorPickerComponent } from 'cmat/components/material-color-picker';
|
|
31
|
+
import { CmatDateRangeComponent } from 'cmat/components/date-range';
|
|
30
32
|
import * as i1$3 from '@angular/material/input';
|
|
31
33
|
import { MatInputModule } from '@angular/material/input';
|
|
34
|
+
import { CmatDatetimepickerToggleComponent, CmatDatetimepickerInputDirective, CmatDatetimepickerComponent } from 'cmat/components/material-datetimepicker';
|
|
35
|
+
import * as i3$2 from '@angular/material/form-field';
|
|
36
|
+
import * as i3$3 from '@ngx-formly/core/select';
|
|
37
|
+
import { FormlySelectModule } from '@ngx-formly/core/select';
|
|
32
38
|
import { CmatDigitOnlyDirective } from 'cmat/directives/digit-only';
|
|
33
39
|
import { CmatRatingComponent } from 'cmat/components/rating';
|
|
34
|
-
import * as i2$
|
|
40
|
+
import * as i2$3 from '@angular/material/radio';
|
|
35
41
|
import { MatRadioGroup, MatRadioModule } from '@angular/material/radio';
|
|
36
|
-
import * as i2$
|
|
42
|
+
import * as i2$4 from '@angular/material/select';
|
|
37
43
|
import { MatSelectModule } from '@angular/material/select';
|
|
38
44
|
import { CmatSelectSearchComponent } from 'cmat/components/select-search';
|
|
39
45
|
import { CmatSelectTreeComponent } from 'cmat/components/select-tree';
|
|
40
|
-
import * as i2$
|
|
46
|
+
import * as i2$5 from '@angular/material/stepper';
|
|
41
47
|
import { MatStepperModule } from '@angular/material/stepper';
|
|
42
48
|
import { CdkDrag } from '@angular/cdk/drag-drop';
|
|
43
49
|
import * as i6 from '@angular/material/dialog';
|
|
44
50
|
import { MatDialog, MatDialogModule } from '@angular/material/dialog';
|
|
45
|
-
import * as i3$
|
|
51
|
+
import * as i3$4 from '@angular/material/table';
|
|
46
52
|
import { MatTableModule } from '@angular/material/table';
|
|
47
53
|
import * as i7 from '@angular/material/tooltip';
|
|
48
54
|
import { MatTooltipModule } from '@angular/material/tooltip';
|
|
@@ -50,7 +56,8 @@ import * as i1$5 from '@angular/material/tabs';
|
|
|
50
56
|
import { MatTabsModule } from '@angular/material/tabs';
|
|
51
57
|
import { TemplatePortal } from '@angular/cdk/portal';
|
|
52
58
|
import { isArray as isArray$1 } from 'lodash';
|
|
53
|
-
import * as i2$
|
|
59
|
+
import * as i2$6 from '@angular/cdk/overlay';
|
|
60
|
+
import { CmatUploadQueueComponent } from 'cmat/components/upload';
|
|
54
61
|
|
|
55
62
|
function addonsExtension(field) {
|
|
56
63
|
if (!field.props || (field.wrappers && field.wrappers.indexOf('addons') !== -1)) {
|
|
@@ -210,6 +217,68 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.7", ngImpor
|
|
|
210
217
|
args: [{ selector: 'cmat-button-type', changeDetection: ChangeDetectionStrategy.OnPush, standalone: true, imports: [MatButtonModule], template: "<button class=\"print:hidden\" mat-raised-button [type]=\"props.type\" [color]=\"props.color\" [disabled]=\"disabled\" (click)=\"onClick($event)\">\r\n {{ to.label }}\r\n</button>" }]
|
|
211
218
|
}] });
|
|
212
219
|
|
|
220
|
+
class CmatCascadeTypeComponent extends FieldType {
|
|
221
|
+
constructor(_http, _changeDetectorRef, _cmatMediaWatcherService) {
|
|
222
|
+
super();
|
|
223
|
+
this._http = _http;
|
|
224
|
+
this._changeDetectorRef = _changeDetectorRef;
|
|
225
|
+
this._cmatMediaWatcherService = _cmatMediaWatcherService;
|
|
226
|
+
this.defaultOptions = {
|
|
227
|
+
props: {
|
|
228
|
+
clearable: false,
|
|
229
|
+
fullLevels: true,
|
|
230
|
+
changeOnSelect: false
|
|
231
|
+
},
|
|
232
|
+
};
|
|
233
|
+
this.urlData = [];
|
|
234
|
+
this._unsubscribeAll = new Subject();
|
|
235
|
+
}
|
|
236
|
+
ngOnInit() {
|
|
237
|
+
const url = this.props?.domain?.url;
|
|
238
|
+
if (url && this.props?.domain?.code && this.props?.domain?.key && this.props?.domain?.value) {
|
|
239
|
+
this._http.get(url).pipe(takeUntil(this._unsubscribeAll)).subscribe((data) => {
|
|
240
|
+
if (data) {
|
|
241
|
+
const datas = data.filter((i) => {
|
|
242
|
+
if (this.field.props?.domain?.key)
|
|
243
|
+
return i[this.field.props?.domain?.key] === this.field.props?.domain?.code;
|
|
244
|
+
return false;
|
|
245
|
+
});
|
|
246
|
+
if (datas && this.field.props?.domain?.value) {
|
|
247
|
+
this.urlData = datas[0][this.field.props?.domain?.value];
|
|
248
|
+
}
|
|
249
|
+
else {
|
|
250
|
+
this.urlData = [];
|
|
251
|
+
}
|
|
252
|
+
}
|
|
253
|
+
else {
|
|
254
|
+
this.urlData = [];
|
|
255
|
+
}
|
|
256
|
+
this._changeDetectorRef.markForCheck();
|
|
257
|
+
});
|
|
258
|
+
}
|
|
259
|
+
else {
|
|
260
|
+
this.urlData = [];
|
|
261
|
+
this._changeDetectorRef.markForCheck();
|
|
262
|
+
}
|
|
263
|
+
this._cmatMediaWatcherService.onMediaChange$
|
|
264
|
+
.pipe(takeUntil(this._unsubscribeAll))
|
|
265
|
+
.subscribe(({ matchingAliases }) => {
|
|
266
|
+
this.isHandSet = !matchingAliases.includes('lg');
|
|
267
|
+
this._changeDetectorRef.markForCheck();
|
|
268
|
+
});
|
|
269
|
+
}
|
|
270
|
+
ngOnDestroy() {
|
|
271
|
+
this._unsubscribeAll.next(void 0);
|
|
272
|
+
this._unsubscribeAll.complete();
|
|
273
|
+
}
|
|
274
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.7", ngImport: i0, type: CmatCascadeTypeComponent, deps: [{ token: i1$2.HttpClient }, { token: i0.ChangeDetectorRef }, { token: i2.CmatMediaWatcherService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
275
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.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: i2$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2$1.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i2$1.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", "touchUi", "placeholder", "value", "required", "disabled"], exportAs: ["cmatCascadeList"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
276
|
+
}
|
|
277
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.7", ngImport: i0, type: CmatCascadeTypeComponent, decorators: [{
|
|
278
|
+
type: Component,
|
|
279
|
+
args: [{ selector: 'cmat-cascade-type', changeDetection: ChangeDetectionStrategy.OnPush, standalone: true, 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"] }]
|
|
280
|
+
}], ctorParameters: () => [{ type: i1$2.HttpClient }, { type: i0.ChangeDetectorRef }, { type: i2.CmatMediaWatcherService }] });
|
|
281
|
+
|
|
213
282
|
class CmatCheckListTypeComponent extends FieldType {
|
|
214
283
|
constructor(_http) {
|
|
215
284
|
super();
|
|
@@ -234,13 +303,13 @@ class CmatCheckListTypeComponent extends FieldType {
|
|
|
234
303
|
}
|
|
235
304
|
ngOnInit() {
|
|
236
305
|
if (this.field.props?.options && !isArray(this.field.props?.options)) {
|
|
237
|
-
this.field.props?.options.pipe(takeUntil(this._unsubscribeAll)).subscribe((data) => {
|
|
306
|
+
this.field.props?.options.pipe(takeUntil$1(this._unsubscribeAll)).subscribe((data) => {
|
|
238
307
|
this.optionsData = data;
|
|
239
308
|
});
|
|
240
309
|
}
|
|
241
310
|
const url = this.field.props?.domain?.url;
|
|
242
311
|
if (url && this.field.props?.domain?.code && this.field.props?.domain?.key && this.field.props?.domain?.value) {
|
|
243
|
-
this._http.get(url).pipe(takeUntil(this._unsubscribeAll)).subscribe((data) => {
|
|
312
|
+
this._http.get(url).pipe(takeUntil$1(this._unsubscribeAll)).subscribe((data) => {
|
|
244
313
|
if (data) {
|
|
245
314
|
const datas = data.filter((i) => {
|
|
246
315
|
if (this.field.props?.domain?.key)
|
|
@@ -266,7 +335,7 @@ class CmatCheckListTypeComponent extends FieldType {
|
|
|
266
335
|
this.filteredData = this.datas;
|
|
267
336
|
this._filteredItems.next(this.filteredData);
|
|
268
337
|
}
|
|
269
|
-
this.formControl.valueChanges.pipe(takeUntil(this._unsubscribeAll)).subscribe((value) => {
|
|
338
|
+
this.formControl.valueChanges.pipe(takeUntil$1(this._unsubscribeAll)).subscribe((value) => {
|
|
270
339
|
this.checklist = value || [];
|
|
271
340
|
this._getAllCheckCountState();
|
|
272
341
|
});
|
|
@@ -349,7 +418,7 @@ class CmatCheckListTypeComponent extends FieldType {
|
|
|
349
418
|
}
|
|
350
419
|
}
|
|
351
420
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.7", ngImport: i0, type: CmatCheckListTypeComponent, deps: [{ token: i1$2.HttpClient }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
352
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.3.7", 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 border shadow 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 class=\"w-full min-w-0 py-1 border-0\" type=\"text\" placeholder=\"\u8F93\u5165\u8FC7\u6EE4\u4FE1\u606F\"\r\n (input)=\"filterByQuery(query.value)\" #query>\r\n </div>\r\n </div>\r\n </div>\r\n <div class=\"border-t overflow-y-auto lg:overflow-y-hidden lg:hover: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\" [color]=\"'primary'\" disableRipple\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: i2.MatCheckbox, selector: "mat-checkbox", inputs: ["aria-label", "aria-labelledby", "aria-describedby", "id", "required", "labelPosition", "name", "value", "disableRipple", "tabIndex", "color", "checked", "disabled", "indeterminate"], outputs: ["change", "indeterminateChange"], exportAs: ["matCheckbox"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i4.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 }); }
|
|
421
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.3.7", 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 border shadow 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 class=\"w-full min-w-0 py-1 border-0\" type=\"text\" placeholder=\"\u8F93\u5165\u8FC7\u6EE4\u4FE1\u606F\"\r\n (input)=\"filterByQuery(query.value)\" #query>\r\n </div>\r\n </div>\r\n </div>\r\n <div class=\"border-t overflow-y-auto lg:overflow-y-hidden lg:hover: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\" [color]=\"'primary'\" disableRipple\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: i2$2.MatCheckbox, selector: "mat-checkbox", inputs: ["aria-label", "aria-labelledby", "aria-describedby", "id", "required", "labelPosition", "name", "value", "disableRipple", "tabIndex", "color", "checked", "disabled", "indeterminate"], outputs: ["change", "indeterminateChange"], exportAs: ["matCheckbox"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i4.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 }); }
|
|
353
422
|
}
|
|
354
423
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.7", ngImport: i0, type: CmatCheckListTypeComponent, decorators: [{
|
|
355
424
|
type: Component,
|
|
@@ -368,7 +437,7 @@ class CmatChipsInputTypeComponent extends FieldType {
|
|
|
368
437
|
ngOnInit() {
|
|
369
438
|
const url = this.props?.domain?.url;
|
|
370
439
|
if (url && this.props?.domain?.code && this.props?.domain?.key && this.props?.domain?.value) {
|
|
371
|
-
this._http.get(url).pipe(takeUntil
|
|
440
|
+
this._http.get(url).pipe(takeUntil(this._unsubscribeAll)).subscribe((data) => {
|
|
372
441
|
if (data) {
|
|
373
442
|
const datas = data.filter((i) => {
|
|
374
443
|
if (this.field.props?.domain?.key)
|
|
@@ -403,6 +472,74 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.7", ngImpor
|
|
|
403
472
|
args: [{ selector: 'cmat-chips-input-type', changeDetection: ChangeDetectionStrategy.OnPush, standalone: true, 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"] }]
|
|
404
473
|
}], ctorParameters: () => [{ type: i1$2.HttpClient }] });
|
|
405
474
|
|
|
475
|
+
class CmatColorPickerTypeComponent extends FieldType$1 {
|
|
476
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.7", ngImport: i0, type: CmatColorPickerTypeComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
477
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.7", 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: i2$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2$1.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 }); }
|
|
478
|
+
}
|
|
479
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.7", ngImport: i0, type: CmatColorPickerTypeComponent, decorators: [{
|
|
480
|
+
type: Component,
|
|
481
|
+
args: [{ selector: 'cmat-color-picker-type', changeDetection: ChangeDetectionStrategy.OnPush, standalone: true, 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"] }]
|
|
482
|
+
}] });
|
|
483
|
+
|
|
484
|
+
class CmatDateRangeTypeComponent extends FieldType {
|
|
485
|
+
constructor() {
|
|
486
|
+
super(...arguments);
|
|
487
|
+
this.defaultOptions = {
|
|
488
|
+
props: {
|
|
489
|
+
dateFormat: 'YYYY/MM/DD',
|
|
490
|
+
timeFormat: '24',
|
|
491
|
+
timeRange: true
|
|
492
|
+
},
|
|
493
|
+
};
|
|
494
|
+
}
|
|
495
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.7", ngImport: i0, type: CmatDateRangeTypeComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
496
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.7", 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: ["readonly", "dateFormat", "timeFormat", "timeRange", "range"], outputs: ["rangeChanged"], exportAs: ["cmatDateRange"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i2$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2$1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
497
|
+
}
|
|
498
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.7", ngImport: i0, type: CmatDateRangeTypeComponent, decorators: [{
|
|
499
|
+
type: Component,
|
|
500
|
+
args: [{ selector: 'cmat-date-range-type', changeDetection: ChangeDetectionStrategy.OnPush, standalone: true, 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"] }]
|
|
501
|
+
}] });
|
|
502
|
+
|
|
503
|
+
class CmatDatepickerTypeComponent extends FieldType {
|
|
504
|
+
constructor(_changeDetectorRef, _cmatMediaWatcherService) {
|
|
505
|
+
super();
|
|
506
|
+
this._changeDetectorRef = _changeDetectorRef;
|
|
507
|
+
this._cmatMediaWatcherService = _cmatMediaWatcherService;
|
|
508
|
+
this.defaultOptions = {
|
|
509
|
+
props: {
|
|
510
|
+
startView: 'month',
|
|
511
|
+
mode: 'auto',
|
|
512
|
+
togglePosition: 'left',
|
|
513
|
+
timeInterval: 5,
|
|
514
|
+
type: 'datetime',
|
|
515
|
+
multiYearSelector: false,
|
|
516
|
+
disabled: false,
|
|
517
|
+
timeInput: true,
|
|
518
|
+
twelvehour: false
|
|
519
|
+
}
|
|
520
|
+
};
|
|
521
|
+
this._unsubscribeAll = new Subject();
|
|
522
|
+
}
|
|
523
|
+
ngOnInit() {
|
|
524
|
+
this._cmatMediaWatcherService.onMediaChange$
|
|
525
|
+
.pipe(takeUntil(this._unsubscribeAll))
|
|
526
|
+
.subscribe(({ matchingAliases }) => {
|
|
527
|
+
this.isHandSet = !matchingAliases.includes('lg');
|
|
528
|
+
this._changeDetectorRef.markForCheck();
|
|
529
|
+
});
|
|
530
|
+
}
|
|
531
|
+
ngOnDestroy() {
|
|
532
|
+
this._unsubscribeAll.next(void 0);
|
|
533
|
+
this._unsubscribeAll.complete();
|
|
534
|
+
}
|
|
535
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.7", ngImport: i0, type: CmatDatepickerTypeComponent, deps: [{ token: i0.ChangeDetectorRef }, { token: i2.CmatMediaWatcherService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
536
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.3.7", type: CmatDatepickerTypeComponent, isStandalone: true, selector: "cmat-datepicker-type", usesInheritance: true, ngImport: i0, template: "@if(props.togglePosition==='left'){\r\n<cmat-datetimepicker-toggle [for]=\"datetimePicker\" [disabled]=\"disabled\" matPrefix></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 [cmatDatetimepicker]=\"datetimePicker\" [required]=\"required\" [formControl]=\"formControl\" autocomplete=\"false\"\r\n [placeholder]=\"placeholder\" matInput />\r\n\r\n@if(props.togglePosition==='right'){\r\n<cmat-datetimepicker-toggle [for]=\"datetimePicker\" [disabled]=\"disabled\" matSuffix></cmat-datetimepicker-toggle>\r\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$3.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly"], exportAs: ["matInput"] }, { kind: "directive", type: i3$2.MatPrefix, selector: "[matPrefix], [matIconPrefix], [matTextPrefix]", inputs: ["matTextPrefix"] }, { kind: "directive", type: i3$2.MatSuffix, selector: "[matSuffix], [matIconSuffix], [matTextSuffix]", inputs: ["matTextSuffix"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i2$1.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: i2$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2$1.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: i2$1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
537
|
+
}
|
|
538
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.7", ngImport: i0, type: CmatDatepickerTypeComponent, decorators: [{
|
|
539
|
+
type: Component,
|
|
540
|
+
args: [{ selector: 'cmat-datepicker-type', changeDetection: ChangeDetectionStrategy.OnPush, standalone: true, imports: [CmatDatetimepickerToggleComponent, CmatDatetimepickerInputDirective, CmatDatetimepickerComponent, MatInputModule, FormsModule, ReactiveFormsModule], template: "@if(props.togglePosition==='left'){\r\n<cmat-datetimepicker-toggle [for]=\"datetimePicker\" [disabled]=\"disabled\" matPrefix></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 [cmatDatetimepicker]=\"datetimePicker\" [required]=\"required\" [formControl]=\"formControl\" autocomplete=\"false\"\r\n [placeholder]=\"placeholder\" matInput />\r\n\r\n@if(props.togglePosition==='right'){\r\n<cmat-datetimepicker-toggle [for]=\"datetimePicker\" [disabled]=\"disabled\" matSuffix></cmat-datetimepicker-toggle>\r\n}" }]
|
|
541
|
+
}], ctorParameters: () => [{ type: i0.ChangeDetectorRef }, { type: i2.CmatMediaWatcherService }] });
|
|
542
|
+
|
|
406
543
|
class CmatMultiCheckboxTypeComponent extends FieldType {
|
|
407
544
|
constructor(_http) {
|
|
408
545
|
super();
|
|
@@ -436,7 +573,7 @@ class CmatMultiCheckboxTypeComponent extends FieldType {
|
|
|
436
573
|
ngOnInit() {
|
|
437
574
|
const url = this.field.props?.domain?.url;
|
|
438
575
|
if (url && this.field.props?.domain?.code && this.field.props?.domain?.key && this.field.props?.domain?.value) {
|
|
439
|
-
this._http.get(url).pipe(takeUntil
|
|
576
|
+
this._http.get(url).pipe(takeUntil(this._unsubscribeAll)).subscribe((data) => {
|
|
440
577
|
if (data) {
|
|
441
578
|
const datas = data.filter((i) => {
|
|
442
579
|
if (this.field.props?.domain?.key)
|
|
@@ -472,7 +609,7 @@ class CmatMultiCheckboxTypeComponent extends FieldType {
|
|
|
472
609
|
return index;
|
|
473
610
|
}
|
|
474
611
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.7", ngImport: i0, type: CmatMultiCheckboxTypeComponent, deps: [{ token: i1$2.HttpClient }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
475
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.3.7", 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: i2.MatCheckbox, selector: "mat-checkbox", inputs: ["aria-label", "aria-labelledby", "aria-describedby", "id", "required", "labelPosition", "name", "value", "disableRipple", "tabIndex", "color", "checked", "disabled", "indeterminate"], outputs: ["change", "indeterminateChange"], exportAs: ["matCheckbox"] }, { kind: "pipe", type: AsyncPipe, name: "async" }, { kind: "ngmodule", type: FormlySelectModule }, { kind: "pipe", type: i3$
|
|
612
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.3.7", 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: i2$2.MatCheckbox, selector: "mat-checkbox", inputs: ["aria-label", "aria-labelledby", "aria-describedby", "id", "required", "labelPosition", "name", "value", "disableRipple", "tabIndex", "color", "checked", "disabled", "indeterminate"], outputs: ["change", "indeterminateChange"], exportAs: ["matCheckbox"] }, { kind: "pipe", type: AsyncPipe, name: "async" }, { kind: "ngmodule", type: FormlySelectModule }, { kind: "pipe", type: i3$3.FormlySelectOptionsPipe, name: "formlySelectOptions" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
476
613
|
}
|
|
477
614
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.7", ngImport: i0, type: CmatMultiCheckboxTypeComponent, decorators: [{
|
|
478
615
|
type: Component,
|
|
@@ -542,7 +679,7 @@ class CmatRadioTypeComponent extends FieldType {
|
|
|
542
679
|
ngOnInit() {
|
|
543
680
|
const url = this.field.props?.domain?.url;
|
|
544
681
|
if (url && this.field.props?.domain?.code && this.field.props?.domain?.key && this.field.props?.domain?.value) {
|
|
545
|
-
this._http.get(url).pipe(takeUntil
|
|
682
|
+
this._http.get(url).pipe(takeUntil(this._unsubscribeAll)).subscribe((data) => {
|
|
546
683
|
if (data) {
|
|
547
684
|
const datas = data.filter((i) => {
|
|
548
685
|
if (this.field.props?.domain?.key)
|
|
@@ -586,7 +723,7 @@ class CmatRadioTypeComponent extends FieldType {
|
|
|
586
723
|
return index;
|
|
587
724
|
}
|
|
588
725
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.7", ngImport: i0, type: CmatRadioTypeComponent, deps: [{ token: i1$2.HttpClient }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
589
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.3.7", 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: i2$
|
|
726
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.3.7", 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: i2$3.MatRadioGroup, selector: "mat-radio-group", inputs: ["color", "name", "labelPosition", "value", "selected", "disabled", "required"], outputs: ["change"], exportAs: ["matRadioGroup"] }, { kind: "component", type: i2$3.MatRadioButton, selector: "mat-radio-button", inputs: ["id", "name", "aria-label", "aria-labelledby", "aria-describedby", "disableRipple", "tabIndex", "checked", "value", "labelPosition", "disabled", "required", "color"], outputs: ["change"], exportAs: ["matRadioButton"] }, { kind: "pipe", type: AsyncPipe, name: "async" }, { kind: "ngmodule", type: FormlySelectModule }, { kind: "pipe", type: i3$3.FormlySelectOptionsPipe, name: "formlySelectOptions" }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i2$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2$1.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i2$1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
590
727
|
}
|
|
591
728
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.7", ngImport: i0, type: CmatRadioTypeComponent, decorators: [{
|
|
592
729
|
type: Component,
|
|
@@ -645,13 +782,13 @@ class CmatSelectTypeComponent extends FieldType {
|
|
|
645
782
|
}
|
|
646
783
|
ngOnInit() {
|
|
647
784
|
if (this.field.props?.options && !isArray(this.field.props?.options)) {
|
|
648
|
-
this.field.props?.options.pipe(takeUntil
|
|
785
|
+
this.field.props?.options.pipe(takeUntil(this._unsubscribeAll)).subscribe((data) => {
|
|
649
786
|
this.optionsData = data;
|
|
650
787
|
});
|
|
651
788
|
}
|
|
652
789
|
const url = this.field.props?.domain?.url;
|
|
653
790
|
if (url && this.field.props?.domain?.code && this.field.props?.domain?.key && this.field.props?.domain?.value) {
|
|
654
|
-
this._http.get(url).pipe(takeUntil
|
|
791
|
+
this._http.get(url).pipe(takeUntil(this._unsubscribeAll)).subscribe((data) => {
|
|
655
792
|
if (data) {
|
|
656
793
|
const datas = data.filter((i) => {
|
|
657
794
|
if (this.field.props?.domain?.key)
|
|
@@ -677,7 +814,7 @@ class CmatSelectTypeComponent extends FieldType {
|
|
|
677
814
|
this.filteredCache = this.datas.slice();
|
|
678
815
|
this.filteredCustomDetails.next(this.filteredCache);
|
|
679
816
|
}
|
|
680
|
-
of(this.props.multiple).pipe(takeUntil
|
|
817
|
+
of(this.props.multiple).pipe(takeUntil(this._unsubscribeAll))
|
|
681
818
|
.subscribe(() => {
|
|
682
819
|
if (!isArray(this.formControl.value)) {
|
|
683
820
|
const value = [this.formControl.value];
|
|
@@ -685,14 +822,14 @@ class CmatSelectTypeComponent extends FieldType {
|
|
|
685
822
|
}
|
|
686
823
|
});
|
|
687
824
|
this.multiFilterCtrl.valueChanges
|
|
688
|
-
.pipe(takeUntil
|
|
825
|
+
.pipe(takeUntil(this._unsubscribeAll))
|
|
689
826
|
.subscribe(() => {
|
|
690
827
|
this.filterMulti();
|
|
691
828
|
if (this.props.multiple)
|
|
692
829
|
this.setToggleAllCheckboxState();
|
|
693
830
|
});
|
|
694
831
|
this.formControl.valueChanges
|
|
695
|
-
.pipe(takeUntil
|
|
832
|
+
.pipe(takeUntil(this._unsubscribeAll))
|
|
696
833
|
.subscribe(() => {
|
|
697
834
|
if (this.props.multiple)
|
|
698
835
|
this.setToggleAllCheckboxState();
|
|
@@ -712,7 +849,7 @@ class CmatSelectTypeComponent extends FieldType {
|
|
|
712
849
|
return this.props.attributes?.['aria-label'];
|
|
713
850
|
}
|
|
714
851
|
toggleSelectAll(selectAllValue) {
|
|
715
|
-
this.filteredCustomDetails.pipe(take(1), takeUntil
|
|
852
|
+
this.filteredCustomDetails.pipe(take(1), takeUntil(this._unsubscribeAll))
|
|
716
853
|
.subscribe((val) => {
|
|
717
854
|
if (selectAllValue) {
|
|
718
855
|
this.formControl.setValue(val.filter(o => !o.disabled));
|
|
@@ -764,7 +901,7 @@ class CmatSelectTypeComponent extends FieldType {
|
|
|
764
901
|
return o1 && o2 ? o1?.label === o2?.label && o1?.value === o2?.value : o1 === o2;
|
|
765
902
|
}
|
|
766
903
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.7", ngImport: i0, type: CmatSelectTypeComponent, deps: [{ token: i1$2.HttpClient }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
767
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.3.7", type: CmatSelectTypeComponent, isStandalone: true, selector: "cmat-select-search-type", usesInheritance: true, ngImport: i0, template: "@if(props.multiple){\r\n<mat-select #multiSelect [id]=\"id\" [formControl]=\"formControl\" [placeholder]=\"props.placeholder??''\" multiple\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 lg:overflow-y-hidden lg:hover: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 (props.canNull) {\r\n <mat-option>\u7A7A</mat-option>\r\n }\r\n @for (i of customDetails; track trackByFn($index)) {\r\n @if(i.group){\r\n <mat-optgroup [label]=\"i.label\">\r\n @for (child of i.group; track trackByFn($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 }\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 lg:overflow-y-hidden lg:hover: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 (props.canNull) {\r\n <mat-option>\u7A7A</mat-option>\r\n }\r\n @for (i of customDetails; track trackByFn($index)) {\r\n @if(i.group){\r\n <mat-optgroup [label]=\"i.label\">\r\n @for (child of i.group; track trackByFn($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 }\r\n }\r\n</mat-select>\r\n}\r\n", styles: [":host{width:100%}\n"], dependencies: [{ kind: "ngmodule", type: MatCheckboxModule }, { kind: "ngmodule", type: MatSelectModule }, { kind: "component", type: i2$
|
|
904
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.3.7", type: CmatSelectTypeComponent, isStandalone: true, selector: "cmat-select-search-type", usesInheritance: true, ngImport: i0, template: "@if(props.multiple){\r\n<mat-select #multiSelect [id]=\"id\" [formControl]=\"formControl\" [placeholder]=\"props.placeholder??''\" multiple\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 lg:overflow-y-hidden lg:hover: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 (props.canNull) {\r\n <mat-option>\u7A7A</mat-option>\r\n }\r\n @for (i of customDetails; track trackByFn($index)) {\r\n @if(i.group){\r\n <mat-optgroup [label]=\"i.label\">\r\n @for (child of i.group; track trackByFn($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 }\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 lg:overflow-y-hidden lg:hover: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 (props.canNull) {\r\n <mat-option>\u7A7A</mat-option>\r\n }\r\n @for (i of customDetails; track trackByFn($index)) {\r\n @if(i.group){\r\n <mat-optgroup [label]=\"i.label\">\r\n @for (child of i.group; track trackByFn($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 }\r\n }\r\n</mat-select>\r\n}\r\n", styles: [":host{width:100%}\n"], dependencies: [{ kind: "ngmodule", type: MatCheckboxModule }, { kind: "ngmodule", type: MatSelectModule }, { kind: "component", type: i2$4.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"], outputs: ["openedChange", "opened", "closed", "selectionChange", "valueChange"], exportAs: ["matSelect"] }, { kind: "component", type: i3$1.MatOption, selector: "mat-option", inputs: ["value", "id", "disabled"], outputs: ["onSelectionChange"], exportAs: ["matOption"] }, { kind: "component", type: i3$1.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: i2$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2$1.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i2$1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "pipe", type: AsyncPipe, name: "async" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
768
905
|
}
|
|
769
906
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.7", ngImport: i0, type: CmatSelectTypeComponent, decorators: [{
|
|
770
907
|
type: Component,
|
|
@@ -792,7 +929,7 @@ class CmatSelectTreeTypeComponent extends FieldType$1 {
|
|
|
792
929
|
ngOnInit() {
|
|
793
930
|
const url = this.field.props?.domain?.url;
|
|
794
931
|
if (url && this.field.props?.domain?.code && this.field.props?.domain?.key && this.field.props?.domain?.value) {
|
|
795
|
-
this._http.get(url).pipe(takeUntil
|
|
932
|
+
this._http.get(url).pipe(takeUntil(this._unsubscribeAll)).subscribe((data) => {
|
|
796
933
|
if (data) {
|
|
797
934
|
const datas = data.filter((i) => {
|
|
798
935
|
if (this.field.props?.domain?.key)
|
|
@@ -842,7 +979,7 @@ class CmatStepperHorizontalTypeComponent extends FieldType$2 {
|
|
|
842
979
|
return index;
|
|
843
980
|
}
|
|
844
981
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.7", ngImport: i0, type: CmatStepperHorizontalTypeComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
845
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.3.7", 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 [svgIcon]=\"'heroicons_solid:pencil'\" class=\"icon-size-4\"></mat-icon>\r\n </ng-template>\r\n <ng-template matStepperIcon=\"done\">\r\n <mat-icon [svgIcon]=\"'heroicons_outline:check'\" class=\"icon-size-4\"></mat-icon>\r\n </ng-template>\r\n\r\n @for (step of field.fieldGroup; track trackByFn($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 space-x-2\">\r\n @if($index !== 0){\r\n <button matStepperPrevious mat-raised-button color=\"primary\" type=\"button\">\u4E0A\u4E00\u6B65</button>\r\n }\r\n\r\n @if(!$last){\r\n <button matStepperNext mat-raised-button 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$4.FormlyField, selector: "formly-field", inputs: ["field"] }, { kind: "ngmodule", type: MatStepperModule }, { kind: "component", type: i2$
|
|
982
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.3.7", 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 [svgIcon]=\"'heroicons_solid:pencil'\" class=\"icon-size-4\"></mat-icon>\r\n </ng-template>\r\n <ng-template matStepperIcon=\"done\">\r\n <mat-icon [svgIcon]=\"'heroicons_outline:check'\" class=\"icon-size-4\"></mat-icon>\r\n </ng-template>\r\n\r\n @for (step of field.fieldGroup; track trackByFn($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 space-x-2\">\r\n @if($index !== 0){\r\n <button matStepperPrevious mat-raised-button color=\"primary\" type=\"button\">\u4E0A\u4E00\u6B65</button>\r\n }\r\n\r\n @if(!$last){\r\n <button matStepperNext mat-raised-button 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$4.FormlyField, selector: "formly-field", inputs: ["field"] }, { kind: "ngmodule", type: MatStepperModule }, { kind: "component", type: i2$5.MatStep, selector: "mat-step", inputs: ["color"], exportAs: ["matStep"] }, { kind: "directive", type: i2$5.MatStepLabel, selector: "[matStepLabel]" }, { kind: "component", type: i2$5.MatStepper, selector: "mat-stepper, mat-vertical-stepper, mat-horizontal-stepper, [matStepper]", inputs: ["disableRipple", "color", "labelPosition", "headerPosition", "animationDuration"], outputs: ["animationDone"], exportAs: ["matStepper", "matVerticalStepper", "matHorizontalStepper"] }, { kind: "directive", type: i2$5.MatStepperNext, selector: "button[matStepperNext]" }, { kind: "directive", type: i2$5.MatStepperPrevious, selector: "button[matStepperPrevious]" }, { kind: "directive", type: i2$5.MatStepperIcon, selector: "ng-template[matStepperIcon]", inputs: ["matStepperIcon"] }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i3.MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", exportAs: ["matButton"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i4.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
846
983
|
}
|
|
847
984
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.7", ngImport: i0, type: CmatStepperHorizontalTypeComponent, decorators: [{
|
|
848
985
|
type: Component,
|
|
@@ -862,7 +999,7 @@ class CmatStepperVerticalTypeComponent extends FieldType$2 {
|
|
|
862
999
|
return index;
|
|
863
1000
|
}
|
|
864
1001
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.7", ngImport: i0, type: CmatStepperVerticalTypeComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
865
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.3.7", 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 [svgIcon]=\"'heroicons_solid:pencil'\" class=\"icon-size-4\"></mat-icon>\r\n </ng-template>\r\n <ng-template matStepperIcon=\"done\">\r\n <mat-icon [svgIcon]=\"'heroicons_outline:check'\" class=\"icon-size-4\"></mat-icon>\r\n </ng-template>\r\n\r\n @for (step of field.fieldGroup; track trackByFn($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 space-x-2\">\r\n @if($index!==0){\r\n <button matStepperPrevious mat-raised-button color=\"primary\" type=\"button\">\u4E0A\u4E00\u6B65</button>\r\n }\r\n\r\n @if(!$last){\r\n <button matStepperNext mat-raised-button 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$4.FormlyField, selector: "formly-field", inputs: ["field"] }, { kind: "ngmodule", type: MatStepperModule }, { kind: "component", type: i2$
|
|
1002
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.3.7", 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 [svgIcon]=\"'heroicons_solid:pencil'\" class=\"icon-size-4\"></mat-icon>\r\n </ng-template>\r\n <ng-template matStepperIcon=\"done\">\r\n <mat-icon [svgIcon]=\"'heroicons_outline:check'\" class=\"icon-size-4\"></mat-icon>\r\n </ng-template>\r\n\r\n @for (step of field.fieldGroup; track trackByFn($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 space-x-2\">\r\n @if($index!==0){\r\n <button matStepperPrevious mat-raised-button color=\"primary\" type=\"button\">\u4E0A\u4E00\u6B65</button>\r\n }\r\n\r\n @if(!$last){\r\n <button matStepperNext mat-raised-button 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$4.FormlyField, selector: "formly-field", inputs: ["field"] }, { kind: "ngmodule", type: MatStepperModule }, { kind: "component", type: i2$5.MatStep, selector: "mat-step", inputs: ["color"], exportAs: ["matStep"] }, { kind: "directive", type: i2$5.MatStepLabel, selector: "[matStepLabel]" }, { kind: "component", type: i2$5.MatStepper, selector: "mat-stepper, mat-vertical-stepper, mat-horizontal-stepper, [matStepper]", inputs: ["disableRipple", "color", "labelPosition", "headerPosition", "animationDuration"], outputs: ["animationDone"], exportAs: ["matStepper", "matVerticalStepper", "matHorizontalStepper"] }, { kind: "directive", type: i2$5.MatStepperNext, selector: "button[matStepperNext]" }, { kind: "directive", type: i2$5.MatStepperPrevious, selector: "button[matStepperPrevious]" }, { kind: "directive", type: i2$5.MatStepperIcon, selector: "ng-template[matStepperIcon]", inputs: ["matStepperIcon"] }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i3.MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", exportAs: ["matButton"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i4.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
866
1003
|
}
|
|
867
1004
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.7", ngImport: i0, type: CmatStepperVerticalTypeComponent, decorators: [{
|
|
868
1005
|
type: Component,
|
|
@@ -953,7 +1090,7 @@ class CmatTableTypeComponent extends FieldArrayType {
|
|
|
953
1090
|
return index;
|
|
954
1091
|
}
|
|
955
1092
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.7", ngImport: i0, type: CmatTableTypeComponent, deps: [{ token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
956
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.3.7", 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-0 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 flex-shrink-0 items-center mt-6 sm:mt-0 sm:ml-4 print:hidden\">\r\n <button class=\"ml-4\" mat-flat-button [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<table mat-table [dataSource]=\"model||[]\" class=\"mat-elevation-z w-full\" [tabIndex]=\"props.tabindex\" #table>\r\n @for (column of columns; track trackByFn($index)) {\r\n <ng-container [matColumnDef]=\"column.key\">\r\n <th mat-header-cell *matHeaderCellDef> {{ column.label }} </th>\r\n <td mat-cell *matCellDef=\"let element; let i = index\">{{element[column.key]}}</td>\r\n </ng-container>\r\n }\r\n\r\n <ng-container matColumnDef=\"_actions_\">\r\n <th mat-header-cell *matHeaderCellDef class=\"print:hidden\">\u64CD\u4F5C</th>\r\n <td mat-cell *matCellDef=\"let element; let i = index\" class=\"print:hidden\">\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 mat-icon-button (click)=\"editRow(element,i)\" [matTooltip]=\"'\u7F16\u8F91'\">\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 mat-icon-button (click)=\"deleteRow(i)\" [matTooltip]=\"'\u79FB\u9664'\">\r\n <mat-icon class=\"icon-size-5\" color=\"warn\" [svgIcon]=\"'heroicons_solid:trash'\"></mat-icon>\r\n </button>\r\n </td>\r\n </ng-container>\r\n\r\n <tr mat-header-row *matHeaderRowDef=\"displayedColumns\"></tr>\r\n <tr mat-row *matRowDef=\"let row; columns: displayedColumns;\" class=\"group\"></tr>\r\n</table>\r\n\r\n\r\n<ng-template #inlineTable>\r\n <div class=\"overflow-y-auto lg:overflow-y-hidden lg:hover: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 mat-raised-button color=\"primary\" cdkFocusInitial (click)=\"confirm()\">\r\n \u786E\u5B9A\r\n </button>\r\n <button mat-button 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-_actions_{width:8rem;text-align:center}\n"], dependencies: [{ kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i3.MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", exportAs: ["matButton"] }, { kind: "component", type: i3.MatIconButton, selector: "button[mat-icon-button]", exportAs: ["matButton"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i4.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "ngmodule", type: MatTableModule }, { kind: "component", type: i3$
|
|
1093
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.3.7", 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-0 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 flex-shrink-0 items-center mt-6 sm:mt-0 sm:ml-4 print:hidden\">\r\n <button class=\"ml-4\" mat-flat-button [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<table mat-table [dataSource]=\"model||[]\" class=\"mat-elevation-z w-full\" [tabIndex]=\"props.tabindex\" #table>\r\n @for (column of columns; track trackByFn($index)) {\r\n <ng-container [matColumnDef]=\"column.key\">\r\n <th mat-header-cell *matHeaderCellDef> {{ column.label }} </th>\r\n <td mat-cell *matCellDef=\"let element; let i = index\">{{element[column.key]}}</td>\r\n </ng-container>\r\n }\r\n\r\n <ng-container matColumnDef=\"_actions_\">\r\n <th mat-header-cell *matHeaderCellDef class=\"print:hidden\">\u64CD\u4F5C</th>\r\n <td mat-cell *matCellDef=\"let element; let i = index\" class=\"print:hidden\">\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 mat-icon-button (click)=\"editRow(element,i)\" [matTooltip]=\"'\u7F16\u8F91'\">\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 mat-icon-button (click)=\"deleteRow(i)\" [matTooltip]=\"'\u79FB\u9664'\">\r\n <mat-icon class=\"icon-size-5\" color=\"warn\" [svgIcon]=\"'heroicons_solid:trash'\"></mat-icon>\r\n </button>\r\n </td>\r\n </ng-container>\r\n\r\n <tr mat-header-row *matHeaderRowDef=\"displayedColumns\"></tr>\r\n <tr mat-row *matRowDef=\"let row; columns: displayedColumns;\" class=\"group\"></tr>\r\n</table>\r\n\r\n\r\n<ng-template #inlineTable>\r\n <div class=\"overflow-y-auto lg:overflow-y-hidden lg:hover: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 mat-raised-button color=\"primary\" cdkFocusInitial (click)=\"confirm()\">\r\n \u786E\u5B9A\r\n </button>\r\n <button mat-button 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-_actions_{width:8rem;text-align:center}\n"], dependencies: [{ kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i3.MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", exportAs: ["matButton"] }, { kind: "component", type: i3.MatIconButton, selector: "button[mat-icon-button]", exportAs: ["matButton"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i4.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "ngmodule", type: MatTableModule }, { kind: "component", type: i3$4.MatTable, selector: "mat-table, table[mat-table]", exportAs: ["matTable"] }, { kind: "directive", type: i3$4.MatHeaderCellDef, selector: "[matHeaderCellDef]" }, { kind: "directive", type: i3$4.MatHeaderRowDef, selector: "[matHeaderRowDef]", inputs: ["matHeaderRowDef", "matHeaderRowDefSticky"] }, { kind: "directive", type: i3$4.MatColumnDef, selector: "[matColumnDef]", inputs: ["matColumnDef"] }, { kind: "directive", type: i3$4.MatCellDef, selector: "[matCellDef]" }, { kind: "directive", type: i3$4.MatRowDef, selector: "[matRowDef]", inputs: ["matRowDefColumns", "matRowDefWhen"] }, { kind: "directive", type: i3$4.MatHeaderCell, selector: "mat-header-cell, th[mat-header-cell]" }, { kind: "directive", type: i3$4.MatCell, selector: "mat-cell, td[mat-cell]" }, { kind: "component", type: i3$4.MatHeaderRow, selector: "mat-header-row, tr[mat-header-row]", exportAs: ["matHeaderRow"] }, { kind: "component", type: i3$4.MatRow, selector: "mat-row, tr[mat-row]", exportAs: ["matRow"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i2$1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i2$1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "ngmodule", type: FormlyModule }, { kind: "component", type: i1$4.FormlyForm, selector: "formly-form", inputs: ["form", "model", "fields", "options"], outputs: ["modelChange"] }, { kind: "directive", type: CdkDrag, selector: "[cdkDrag]", inputs: ["cdkDragData", "cdkDragLockAxis", "cdkDragRootElement", "cdkDragBoundary", "cdkDragStartDelay", "cdkDragFreeDragPosition", "cdkDragDisabled", "cdkDragConstrainPosition", "cdkDragPreviewClass", "cdkDragPreviewContainer"], outputs: ["cdkDragStarted", "cdkDragReleased", "cdkDragEnded", "cdkDragEntered", "cdkDragExited", "cdkDragDropped", "cdkDragMoved"], exportAs: ["cdkDrag"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i2$1.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 }); }
|
|
957
1094
|
}
|
|
958
1095
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.7", ngImport: i0, type: CmatTableTypeComponent, decorators: [{
|
|
959
1096
|
type: Component,
|
|
@@ -1002,13 +1139,13 @@ class CmatTagsTypeComponent extends FieldType {
|
|
|
1002
1139
|
}
|
|
1003
1140
|
ngOnInit() {
|
|
1004
1141
|
if (this.field.props?.options && !isArray$1(this.field.props?.options)) {
|
|
1005
|
-
this.field.props?.options.pipe(takeUntil
|
|
1142
|
+
this.field.props?.options.pipe(takeUntil(this._unsubscribeAll)).subscribe((data) => {
|
|
1006
1143
|
this.optionsData = data;
|
|
1007
1144
|
});
|
|
1008
1145
|
}
|
|
1009
1146
|
const url = this.field.props?.domain?.url;
|
|
1010
1147
|
if (url && this.field.props?.domain?.code && this.field.props?.domain?.key && this.field.props?.domain?.value) {
|
|
1011
|
-
this._http.get(url).pipe(takeUntil
|
|
1148
|
+
this._http.get(url).pipe(takeUntil(this._unsubscribeAll)).subscribe((data) => {
|
|
1012
1149
|
if (data) {
|
|
1013
1150
|
const datas = data.filter((i) => {
|
|
1014
1151
|
if (this.field.props?.domain?.key)
|
|
@@ -1101,13 +1238,13 @@ class CmatTagsTypeComponent extends FieldType {
|
|
|
1101
1238
|
isCheck(tag) {
|
|
1102
1239
|
return this.formControl.value?.filter((i) => i.value === tag.value).length > 0;
|
|
1103
1240
|
}
|
|
1104
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.7", ngImport: i0, type: CmatTagsTypeComponent, deps: [{ token: i1$2.HttpClient }, { token: i2$
|
|
1105
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.3.7", 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 trackByFn($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 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\"\r\n (click)=\"openTagsPanel()\" role=\"presentation\" #tagsPanelOrigin>\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 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-0\" type=\"text\" placeholder=\"\u8F93\u5165\u6807\u7B7E\u540D\"\r\n (input)=\"filterTags($event)\" [maxLength]=\"30\">\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\">\r\n @if ((filteredItems$ | async); as filteredItems) {\r\n @if(filteredItems.length>0){\r\n @for (tag of filteredItems; track trackByFn($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 (click)=\"toggleTag(tag)\" matRipple>\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: i4.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "ngmodule", type: MatCheckboxModule }, { kind: "component", type: i2.MatCheckbox, selector: "mat-checkbox", inputs: ["aria-label", "aria-labelledby", "aria-describedby", "id", "required", "labelPosition", "name", "value", "disableRipple", "tabIndex", "color", "checked", "disabled", "indeterminate"], outputs: ["change", "indeterminateChange"], exportAs: ["matCheckbox"] }, { kind: "pipe", type: AsyncPipe, name: "async" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
1241
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.7", ngImport: i0, type: CmatTagsTypeComponent, deps: [{ token: i1$2.HttpClient }, { token: i2$6.Overlay }, { token: i0.ViewContainerRef }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1242
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.3.7", 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 trackByFn($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 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\"\r\n (click)=\"openTagsPanel()\" role=\"presentation\" #tagsPanelOrigin>\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 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-0\" type=\"text\" placeholder=\"\u8F93\u5165\u6807\u7B7E\u540D\"\r\n (input)=\"filterTags($event)\" [maxLength]=\"30\">\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\">\r\n @if ((filteredItems$ | async); as filteredItems) {\r\n @if(filteredItems.length>0){\r\n @for (tag of filteredItems; track trackByFn($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 (click)=\"toggleTag(tag)\" matRipple>\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: i4.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "ngmodule", type: MatCheckboxModule }, { kind: "component", type: i2$2.MatCheckbox, selector: "mat-checkbox", inputs: ["aria-label", "aria-labelledby", "aria-describedby", "id", "required", "labelPosition", "name", "value", "disableRipple", "tabIndex", "color", "checked", "disabled", "indeterminate"], outputs: ["change", "indeterminateChange"], exportAs: ["matCheckbox"] }, { kind: "pipe", type: AsyncPipe, name: "async" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
1106
1243
|
}
|
|
1107
1244
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.7", ngImport: i0, type: CmatTagsTypeComponent, decorators: [{
|
|
1108
1245
|
type: Component,
|
|
1109
1246
|
args: [{ selector: 'cmat-tags-type', changeDetection: ChangeDetectionStrategy.OnPush, standalone: true, 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 trackByFn($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 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\"\r\n (click)=\"openTagsPanel()\" role=\"presentation\" #tagsPanelOrigin>\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 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-0\" type=\"text\" placeholder=\"\u8F93\u5165\u6807\u7B7E\u540D\"\r\n (input)=\"filterTags($event)\" [maxLength]=\"30\">\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\">\r\n @if ((filteredItems$ | async); as filteredItems) {\r\n @if(filteredItems.length>0){\r\n @for (tag of filteredItems; track trackByFn($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 (click)=\"toggleTag(tag)\" matRipple>\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"] }]
|
|
1110
|
-
}], ctorParameters: () => [{ type: i1$2.HttpClient }, { type: i2$
|
|
1247
|
+
}], ctorParameters: () => [{ type: i1$2.HttpClient }, { type: i2$6.Overlay }, { type: i0.ViewContainerRef }, { type: i0.ChangeDetectorRef }], propDecorators: { _tagsPanelOrigin: [{
|
|
1111
1248
|
type: ViewChild,
|
|
1112
1249
|
args: ['tagsPanelOrigin']
|
|
1113
1250
|
}], _tagsPanel: [{
|
|
@@ -1133,9 +1270,62 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.7", ngImpor
|
|
|
1133
1270
|
args: [{ selector: 'cmat-textarea-type', changeDetection: ChangeDetectionStrategy.OnPush, standalone: true, 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"] }]
|
|
1134
1271
|
}] });
|
|
1135
1272
|
|
|
1273
|
+
class CmatUploadTypeComponent extends FieldType {
|
|
1274
|
+
constructor() {
|
|
1275
|
+
super(...arguments);
|
|
1276
|
+
this.defaultOptions = {
|
|
1277
|
+
props: {
|
|
1278
|
+
fileAlias: 'fileData',
|
|
1279
|
+
filePath: 'path',
|
|
1280
|
+
fileCategory: '分类',
|
|
1281
|
+
multiple: true,
|
|
1282
|
+
accept: '',
|
|
1283
|
+
editMode: true,
|
|
1284
|
+
autoUpload: true
|
|
1285
|
+
}
|
|
1286
|
+
};
|
|
1287
|
+
}
|
|
1288
|
+
upload(id) {
|
|
1289
|
+
if (this.model['uploadId']) {
|
|
1290
|
+
this.model['uploadId'].push(id);
|
|
1291
|
+
}
|
|
1292
|
+
else {
|
|
1293
|
+
this.model['uploadId'] = [id];
|
|
1294
|
+
}
|
|
1295
|
+
}
|
|
1296
|
+
remove(id) {
|
|
1297
|
+
if (this.model['removeId']) {
|
|
1298
|
+
this.model['removeId'].push(id);
|
|
1299
|
+
}
|
|
1300
|
+
else {
|
|
1301
|
+
this.model['removeId'] = [id];
|
|
1302
|
+
}
|
|
1303
|
+
}
|
|
1304
|
+
updateData(i) {
|
|
1305
|
+
const data = Array.isArray(i) ? i : [];
|
|
1306
|
+
this.formControl.setValue(data.map((j) => {
|
|
1307
|
+
if (j.id)
|
|
1308
|
+
return {
|
|
1309
|
+
id: j.id,
|
|
1310
|
+
name: j.name,
|
|
1311
|
+
type: j.type,
|
|
1312
|
+
size: j.size
|
|
1313
|
+
};
|
|
1314
|
+
else
|
|
1315
|
+
return j;
|
|
1316
|
+
}));
|
|
1317
|
+
}
|
|
1318
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.7", ngImport: i0, type: CmatUploadTypeComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
1319
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.7", 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", "required", "autoUpload", "multiple", "accept", "title", "editMode", "filesData"], outputs: ["outputRemoveIdEvent", "outputUploadIdEvent", "outputFilesDataEvent"], exportAs: ["cmatUploadQueue"] }, { kind: "ngmodule", type: ReactiveFormsModule }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
1320
|
+
}
|
|
1321
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.7", ngImport: i0, type: CmatUploadTypeComponent, decorators: [{
|
|
1322
|
+
type: Component,
|
|
1323
|
+
args: [{ selector: 'cmat-upload-type', changeDetection: ChangeDetectionStrategy.OnPush, standalone: true, 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"] }]
|
|
1324
|
+
}] });
|
|
1325
|
+
|
|
1136
1326
|
/**
|
|
1137
1327
|
* Generated bundle index. Do not edit.
|
|
1138
1328
|
*/
|
|
1139
1329
|
|
|
1140
|
-
export { CmatAddonsWrapperComponent, CmatButtonTypeComponent, CmatCardWrapperComponent, CmatCheckListTypeComponent, CmatChipsInputTypeComponent, CmatExpansionWrapperComponent, CmatMultiCheckboxTypeComponent, CmatNumberTypeComponent, CmatPanelWrapperComponent, CmatRadioTypeComponent, CmatRatingTypeComponent, CmatRepeatTypeComponent, CmatSelectTreeTypeComponent, CmatSelectTypeComponent, CmatStepperHorizontalTypeComponent, CmatStepperVerticalTypeComponent, CmatTabTypeComponent, CmatTableTypeComponent, CmatTagsTypeComponent, CmatTextareaTypeComponent, addonsExtension };
|
|
1330
|
+
export { CmatAddonsWrapperComponent, CmatButtonTypeComponent, CmatCardWrapperComponent, CmatCascadeTypeComponent, CmatCheckListTypeComponent, CmatChipsInputTypeComponent, CmatColorPickerTypeComponent, CmatDateRangeTypeComponent, CmatDatepickerTypeComponent, CmatExpansionWrapperComponent, CmatMultiCheckboxTypeComponent, CmatNumberTypeComponent, CmatPanelWrapperComponent, CmatRadioTypeComponent, CmatRatingTypeComponent, CmatRepeatTypeComponent, CmatSelectTreeTypeComponent, CmatSelectTypeComponent, CmatStepperHorizontalTypeComponent, CmatStepperVerticalTypeComponent, CmatTabTypeComponent, CmatTableTypeComponent, CmatTagsTypeComponent, CmatTextareaTypeComponent, CmatUploadTypeComponent, addonsExtension };
|
|
1141
1331
|
//# sourceMappingURL=cmat-components-custom-formly.mjs.map
|