cmat 0.0.4 → 0.0.6

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.
Files changed (25) hide show
  1. package/components/chip-input/chip-input.component.d.ts +3 -1
  2. package/components/navigation/vertical/components/aside/aside.component.d.ts +5 -2
  3. package/components/navigation/vertical/components/basic/basic.component.d.ts +5 -2
  4. package/components/navigation/vertical/components/collapsable/collapsable.component.d.ts +5 -2
  5. package/components/navigation/vertical/components/divider/divider.component.d.ts +5 -2
  6. package/components/navigation/vertical/components/group/group.component.d.ts +5 -2
  7. package/components/navigation/vertical/components/spacer/spacer.component.d.ts +5 -2
  8. package/components/navigation/vertical/vertical.component.d.ts +4 -1
  9. package/esm2022/components/chip-input/chip-input.component.mjs +10 -4
  10. package/esm2022/components/navigation/vertical/components/aside/aside.component.mjs +13 -4
  11. package/esm2022/components/navigation/vertical/components/basic/basic.component.mjs +13 -4
  12. package/esm2022/components/navigation/vertical/components/collapsable/collapsable.component.mjs +13 -4
  13. package/esm2022/components/navigation/vertical/components/divider/divider.component.mjs +13 -4
  14. package/esm2022/components/navigation/vertical/components/group/group.component.mjs +13 -4
  15. package/esm2022/components/navigation/vertical/components/spacer/spacer.component.mjs +13 -4
  16. package/esm2022/components/navigation/vertical/vertical.component.mjs +12 -3
  17. package/esm2022/services/config/urlStateConfig.service.mjs +2 -2
  18. package/fesm2022/cmat-components-chip-input.mjs +9 -3
  19. package/fesm2022/cmat-components-chip-input.mjs.map +1 -1
  20. package/fesm2022/cmat-components-navigation.mjs +78 -15
  21. package/fesm2022/cmat-components-navigation.mjs.map +1 -1
  22. package/fesm2022/cmat-services-config.mjs +1 -1
  23. package/fesm2022/cmat-services-config.mjs.map +1 -1
  24. package/package.json +72 -72
  25. package/services/config/urlStateConfig.service.d.ts +1 -1
@@ -12,7 +12,7 @@ export class CmatUrlStateConfigService {
12
12
  get config$() {
13
13
  return this._config.asObservable();
14
14
  }
15
- set config(value) {
15
+ config(value) {
16
16
  // Merge the new config over to the current config
17
17
  const config = merge({}, this._config.getValue(), value);
18
18
  // Execute the observable
@@ -27,4 +27,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.4", ngImpor
27
27
  providedIn: 'root'
28
28
  }]
29
29
  }], ctorParameters: () => [] });
30
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidXJsU3RhdGVDb25maWcuc2VydmljZS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uL3Byb2plY3RzL2NtYXQvc2VydmljZXMvY29uZmlnL3VybFN0YXRlQ29uZmlnLnNlcnZpY2UudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxFQUFFLFVBQVUsRUFBRSxNQUFNLGVBQWUsQ0FBQztBQUMzQyxPQUFPLEVBQUUsZUFBZSxFQUFjLE1BQU0sTUFBTSxDQUFDO0FBQ25ELE9BQU8sRUFBRSxLQUFLLEVBQUUsTUFBTSxXQUFXLENBQUM7O0FBTWxDLE1BQU0sT0FBTyx5QkFBeUI7SUFNbEM7UUFMUSxZQUFPLEdBQXFDLElBQUksZUFBZSxDQUFrQjtZQUNyRixPQUFPLEVBQUUsRUFBRTtZQUNYLGlCQUFpQixFQUFFLEtBQUs7U0FDM0IsQ0FBQyxDQUFDO0lBSUgsQ0FBQztJQUVELElBQUksT0FBTztRQUNQLE9BQU8sSUFBSSxDQUFDLE9BQU8sQ0FBQyxZQUFZLEVBQUUsQ0FBQztJQUN2QyxDQUFDO0lBRUQsSUFBSSxNQUFNLENBQUMsS0FBc0I7UUFDN0Isa0RBQWtEO1FBQ2xELE1BQU0sTUFBTSxHQUFHLEtBQUssQ0FBQyxFQUFFLEVBQUUsSUFBSSxDQUFDLE9BQU8sQ0FBQyxRQUFRLEVBQUUsRUFBRSxLQUFLLENBQUMsQ0FBQztRQUV6RCx5QkFBeUI7UUFDekIs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JsZTxJVXJsU3RhdGVDb25maWc+IHtcclxuICAgICAgICByZXR1cm4gdGhpcy5fY29uZmlnLmFzT2JzZXJ2YWJsZSgpO1xyXG4gICAgfVxyXG5cclxuICAgIGNvbmZpZyh2YWx1ZTogSVVybFN0YXRlQ29uZmlnKTp2b2lkIHtcclxuICAgICAgICAvLyBNZXJnZSB0aGUgbmV3IGNvbmZpZyBvdmVyIHRvIHRoZSBjdXJyZW50IGNvbmZpZ1xyXG4gICAgICAgIGNvbnN0IGNvbmZpZyA9IG1lcmdlKHt9LCB0aGlzLl9jb25maWcuZ2V0VmFsdWUoKSwgdmFsdWUpO1xyXG5cclxuICAgICAgICAvLyBFeGVjdXRlIHRoZSBvYnNlcnZhYmxlXHJcbiAgICAgICAgdGhpcy5fY29uZmlnLm5leHQoY29uZmlnKTtcclxuICAgIH1cclxufVxyXG4iXX0=
@@ -23,6 +23,8 @@ class CmatChipInputComponent {
23
23
  this.hasAutocomplete = false;
24
24
  this.outputIsString = false;
25
25
  this.separatorKey = ',';
26
+ this.hasPrefixIcon = false;
27
+ this.prefixIcon = 'heroicons_solid:pencil-square';
26
28
  this.inputControl = new FormControl();
27
29
  this.selectedOptions$ = new BehaviorSubject([]);
28
30
  this.separatorKeysCodes = [ENTER, COMMA];
@@ -111,13 +113,13 @@ class CmatChipInputComponent {
111
113
  return this.selectableOptions.filter(v => v.toLowerCase().includes(filterValue));
112
114
  }
113
115
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.2.4", ngImport: i0, type: CmatChipInputComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
114
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.2.4", type: CmatChipInputComponent, isStandalone: true, selector: "cmat-chip-input", inputs: { label: "label", selectableOptions: "selectableOptions", hasAutocomplete: "hasAutocomplete", outputIsString: "outputIsString", separatorKey: "separatorKey" }, providers: [
116
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.2.4", type: CmatChipInputComponent, isStandalone: true, selector: "cmat-chip-input", inputs: { label: "label", selectableOptions: "selectableOptions", hasAutocomplete: "hasAutocomplete", outputIsString: "outputIsString", separatorKey: "separatorKey", hasPrefixIcon: "hasPrefixIcon", prefixIcon: "prefixIcon" }, providers: [
115
117
  {
116
118
  provide: NG_VALUE_ACCESSOR,
117
119
  useExisting: forwardRef(() => CmatChipInputComponent),
118
120
  multi: true
119
121
  }
120
- ], viewQueries: [{ propertyName: "inputElementRef", first: true, predicate: ["input"], descendants: true }], exportAs: ["cmatChipInput"], ngImport: i0, template: "<mat-form-field subscriptSizing=\"dynamic\" class=\"w-full\">\n <mat-label>{{label}}</mat-label>\n <mat-chip-grid #chipList class=\"items-center\">\n @for (option of selectedOptions$ | async; track trackByFn($index)) {\n <mat-chip-row selectable (removed)=\"onRemove(option)\">\n {{ option }}\n <button matChipRemove>\n <mat-icon class=\"icon-size-5\" [svgIcon]=\"'mat_solid:cancel'\"></mat-icon>\n </button>\n </mat-chip-row>\n }\n\n @if (hasAutocomplete) {\n <input #input matInput [formControl]=\"inputControl\" [placeholder]=\"'\u5F00\u59CB\u9009\u62E9...'\"\n [matAutocomplete]=\"autoComplete\" [matChipInputFor]=\"chipList\"\n [matChipInputSeparatorKeyCodes]=\"separatorKeysCodes\" (matChipInputTokenEnd)=\"onAdd($event)\" />\n <mat-autocomplete #autoComplete=\"matAutocomplete\" (optionSelected)=\"onSelected($event)\">\n @for (option of filteredOptions$ | async; track trackByFn($index)) {\n <mat-option [value]=\"option\">\n {{ option }}\n </mat-option>\n }\n </mat-autocomplete>\n } @else {\n <input #input [formControl]=\"inputControl\" [placeholder]=\"'\u5F00\u59CB\u586B\u5199...'\" [matChipInputFor]=\"chipList\"\n [matChipInputSeparatorKeyCodes]=\"separatorKeysCodes\" (matChipInputTokenEnd)=\"onAdd($event)\" />\n }\n </mat-chip-grid>\n\n </mat-form-field>\n\n", dependencies: [{ kind: "ngmodule", type: MatFormFieldModule }, { kind: "component", type: i1.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i1.MatLabel, selector: "mat-label" }, { kind: "ngmodule", type: MatChipsModule }, { kind: "component", type: i2.MatChipGrid, selector: "mat-chip-grid", inputs: ["disabled", "placeholder", "required", "value", "errorStateMatcher"], outputs: ["change", "valueChange"] }, { kind: "directive", type: i2.MatChipInput, selector: "input[matChipInputFor]", inputs: ["matChipInputFor", "matChipInputAddOnBlur", "matChipInputSeparatorKeyCodes", "placeholder", "id", "disabled"], outputs: ["matChipInputTokenEnd"], exportAs: ["matChipInput", "matChipInputFor"] }, { kind: "directive", type: i2.MatChipRemove, selector: "[matChipRemove]" }, { kind: "component", type: i2.MatChipRow, selector: "mat-chip-row, [mat-chip-row], mat-basic-chip-row, [mat-basic-chip-row]", inputs: ["editable"], outputs: ["edited"] }, { kind: "pipe", type: AsyncPipe, name: "async" }, { kind: "ngmodule", type: MatInputModule }, { kind: "directive", type: i3.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: "ngmodule", type: MatAutocompleteModule }, { kind: "component", type: i4.MatAutocomplete, selector: "mat-autocomplete", inputs: ["aria-label", "aria-labelledby", "displayWith", "autoActiveFirstOption", "autoSelectActiveOption", "requireSelection", "panelWidth", "disableRipple", "class", "hideSingleSelectionIndicator"], outputs: ["optionSelected", "opened", "closed", "optionActivated"], exportAs: ["matAutocomplete"] }, { kind: "component", type: i5.MatOption, selector: "mat-option", inputs: ["value", "id", "disabled"], outputs: ["onSelectionChange"], exportAs: ["matOption"] }, { kind: "directive", type: i4.MatAutocompleteTrigger, selector: "input[matAutocomplete], textarea[matAutocomplete]", inputs: ["matAutocomplete", "matAutocompletePosition", "matAutocompleteConnectedTo", "autocomplete", "matAutocompleteDisabled"], exportAs: ["matAutocompleteTrigger"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i6.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i7.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: i7.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i7.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
122
+ ], viewQueries: [{ propertyName: "inputElementRef", first: true, predicate: ["input"], descendants: true }], exportAs: ["cmatChipInput"], ngImport: i0, template: "<mat-form-field subscriptSizing=\"dynamic\" class=\"w-full\">\n <mat-label>{{label}}</mat-label>\n @if(hasPrefixIcon){\n <mat-icon matPrefix class=\"hidden sm:flex icon-size-5\" [svgIcon]=\"prefixIcon\">\n </mat-icon>\n }\n <mat-chip-grid #chipList class=\"items-center\">\n @for (option of selectedOptions$ | async; track trackByFn($index)) {\n <mat-chip-row selectable (removed)=\"onRemove(option)\">\n {{ option }}\n <button matChipRemove>\n <mat-icon class=\"icon-size-5\" [svgIcon]=\"'mat_solid:cancel'\"></mat-icon>\n </button>\n </mat-chip-row>\n }\n\n @if (hasAutocomplete) {\n <input #input matInput [formControl]=\"inputControl\" [placeholder]=\"'\u5F00\u59CB\u9009\u62E9...'\" [matAutocomplete]=\"autoComplete\"\n [matChipInputFor]=\"chipList\" [matChipInputSeparatorKeyCodes]=\"separatorKeysCodes\"\n (matChipInputTokenEnd)=\"onAdd($event)\" />\n <mat-autocomplete #autoComplete=\"matAutocomplete\" (optionSelected)=\"onSelected($event)\">\n @for (option of filteredOptions$ | async; track trackByFn($index)) {\n <mat-option [value]=\"option\">\n {{ option }}\n </mat-option>\n }\n </mat-autocomplete>\n } @else {\n <input #input [formControl]=\"inputControl\" [placeholder]=\"'\u5F00\u59CB\u586B\u5199...'\" [matChipInputFor]=\"chipList\"\n [matChipInputSeparatorKeyCodes]=\"separatorKeysCodes\" (matChipInputTokenEnd)=\"onAdd($event)\" />\n }\n </mat-chip-grid>\n\n</mat-form-field>", dependencies: [{ kind: "ngmodule", type: MatFormFieldModule }, { kind: "component", type: i1.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i1.MatLabel, selector: "mat-label" }, { kind: "directive", type: i1.MatPrefix, selector: "[matPrefix], [matIconPrefix], [matTextPrefix]", inputs: ["matTextPrefix"] }, { kind: "ngmodule", type: MatChipsModule }, { kind: "component", type: i2.MatChipGrid, selector: "mat-chip-grid", inputs: ["disabled", "placeholder", "required", "value", "errorStateMatcher"], outputs: ["change", "valueChange"] }, { kind: "directive", type: i2.MatChipInput, selector: "input[matChipInputFor]", inputs: ["matChipInputFor", "matChipInputAddOnBlur", "matChipInputSeparatorKeyCodes", "placeholder", "id", "disabled"], outputs: ["matChipInputTokenEnd"], exportAs: ["matChipInput", "matChipInputFor"] }, { kind: "directive", type: i2.MatChipRemove, selector: "[matChipRemove]" }, { kind: "component", type: i2.MatChipRow, selector: "mat-chip-row, [mat-chip-row], mat-basic-chip-row, [mat-basic-chip-row]", inputs: ["editable"], outputs: ["edited"] }, { kind: "pipe", type: AsyncPipe, name: "async" }, { kind: "ngmodule", type: MatInputModule }, { kind: "directive", type: i3.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: "ngmodule", type: MatAutocompleteModule }, { kind: "component", type: i4.MatAutocomplete, selector: "mat-autocomplete", inputs: ["aria-label", "aria-labelledby", "displayWith", "autoActiveFirstOption", "autoSelectActiveOption", "requireSelection", "panelWidth", "disableRipple", "class", "hideSingleSelectionIndicator"], outputs: ["optionSelected", "opened", "closed", "optionActivated"], exportAs: ["matAutocomplete"] }, { kind: "component", type: i5.MatOption, selector: "mat-option", inputs: ["value", "id", "disabled"], outputs: ["onSelectionChange"], exportAs: ["matOption"] }, { kind: "directive", type: i4.MatAutocompleteTrigger, selector: "input[matAutocomplete], textarea[matAutocomplete]", inputs: ["matAutocomplete", "matAutocompletePosition", "matAutocompleteConnectedTo", "autocomplete", "matAutocompleteDisabled"], exportAs: ["matAutocompleteTrigger"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i6.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i7.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: i7.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i7.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
121
123
  }
122
124
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.4", ngImport: i0, type: CmatChipInputComponent, decorators: [{
123
125
  type: Component,
@@ -127,7 +129,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.4", ngImpor
127
129
  useExisting: forwardRef(() => CmatChipInputComponent),
128
130
  multi: true
129
131
  }
130
- ], exportAs: 'cmatChipInput', imports: [MatFormFieldModule, MatChipsModule, AsyncPipe, MatInputModule, MatAutocompleteModule, MatIconModule, FormsModule, ReactiveFormsModule], encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, template: "<mat-form-field subscriptSizing=\"dynamic\" class=\"w-full\">\n <mat-label>{{label}}</mat-label>\n <mat-chip-grid #chipList class=\"items-center\">\n @for (option of selectedOptions$ | async; track trackByFn($index)) {\n <mat-chip-row selectable (removed)=\"onRemove(option)\">\n {{ option }}\n <button matChipRemove>\n <mat-icon class=\"icon-size-5\" [svgIcon]=\"'mat_solid:cancel'\"></mat-icon>\n </button>\n </mat-chip-row>\n }\n\n @if (hasAutocomplete) {\n <input #input matInput [formControl]=\"inputControl\" [placeholder]=\"'\u5F00\u59CB\u9009\u62E9...'\"\n [matAutocomplete]=\"autoComplete\" [matChipInputFor]=\"chipList\"\n [matChipInputSeparatorKeyCodes]=\"separatorKeysCodes\" (matChipInputTokenEnd)=\"onAdd($event)\" />\n <mat-autocomplete #autoComplete=\"matAutocomplete\" (optionSelected)=\"onSelected($event)\">\n @for (option of filteredOptions$ | async; track trackByFn($index)) {\n <mat-option [value]=\"option\">\n {{ option }}\n </mat-option>\n }\n </mat-autocomplete>\n } @else {\n <input #input [formControl]=\"inputControl\" [placeholder]=\"'\u5F00\u59CB\u586B\u5199...'\" [matChipInputFor]=\"chipList\"\n [matChipInputSeparatorKeyCodes]=\"separatorKeysCodes\" (matChipInputTokenEnd)=\"onAdd($event)\" />\n }\n </mat-chip-grid>\n\n </mat-form-field>\n\n" }]
132
+ ], exportAs: 'cmatChipInput', imports: [MatFormFieldModule, MatChipsModule, AsyncPipe, MatInputModule, MatAutocompleteModule, MatIconModule, FormsModule, ReactiveFormsModule], encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, template: "<mat-form-field subscriptSizing=\"dynamic\" class=\"w-full\">\n <mat-label>{{label}}</mat-label>\n @if(hasPrefixIcon){\n <mat-icon matPrefix class=\"hidden sm:flex icon-size-5\" [svgIcon]=\"prefixIcon\">\n </mat-icon>\n }\n <mat-chip-grid #chipList class=\"items-center\">\n @for (option of selectedOptions$ | async; track trackByFn($index)) {\n <mat-chip-row selectable (removed)=\"onRemove(option)\">\n {{ option }}\n <button matChipRemove>\n <mat-icon class=\"icon-size-5\" [svgIcon]=\"'mat_solid:cancel'\"></mat-icon>\n </button>\n </mat-chip-row>\n }\n\n @if (hasAutocomplete) {\n <input #input matInput [formControl]=\"inputControl\" [placeholder]=\"'\u5F00\u59CB\u9009\u62E9...'\" [matAutocomplete]=\"autoComplete\"\n [matChipInputFor]=\"chipList\" [matChipInputSeparatorKeyCodes]=\"separatorKeysCodes\"\n (matChipInputTokenEnd)=\"onAdd($event)\" />\n <mat-autocomplete #autoComplete=\"matAutocomplete\" (optionSelected)=\"onSelected($event)\">\n @for (option of filteredOptions$ | async; track trackByFn($index)) {\n <mat-option [value]=\"option\">\n {{ option }}\n </mat-option>\n }\n </mat-autocomplete>\n } @else {\n <input #input [formControl]=\"inputControl\" [placeholder]=\"'\u5F00\u59CB\u586B\u5199...'\" [matChipInputFor]=\"chipList\"\n [matChipInputSeparatorKeyCodes]=\"separatorKeysCodes\" (matChipInputTokenEnd)=\"onAdd($event)\" />\n }\n </mat-chip-grid>\n\n</mat-form-field>" }]
131
133
  }], ctorParameters: () => [], propDecorators: { inputElementRef: [{
132
134
  type: ViewChild,
133
135
  args: ['input']
@@ -141,6 +143,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.4", ngImpor
141
143
  type: Input
142
144
  }], separatorKey: [{
143
145
  type: Input
146
+ }], hasPrefixIcon: [{
147
+ type: Input
148
+ }], prefixIcon: [{
149
+ type: Input
144
150
  }] } });
145
151
 
146
152
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"cmat-components-chip-input.mjs","sources":["../../../projects/cmat/components/chip-input/chip-input.component.ts","../../../projects/cmat/components/chip-input/chip-input.component.html","../../../projects/cmat/components/chip-input/cmat-components-chip-input.ts"],"sourcesContent":["import { ChangeDetectionStrategy, Component, ElementRef, Input, OnDestroy, ViewChild, ViewEncapsulation, forwardRef } from '@angular/core';\r\nimport { ControlValueAccessor, FormControl, FormsModule, NG_VALUE_ACCESSOR, ReactiveFormsModule } from '@angular/forms';\r\nimport { BehaviorSubject, Observable, Subject, debounceTime, map, startWith, takeUntil } from 'rxjs';\r\nimport { COMMA, ENTER } from '@angular/cdk/keycodes';\r\nimport { MatAutocompleteModule, MatAutocompleteSelectedEvent } from '@angular/material/autocomplete';\r\nimport { MatChipInputEvent, MatChipsModule } from '@angular/material/chips';\r\nimport { isArray, isEmpty, isNil } from 'lodash';\r\nimport { MatFormFieldModule } from '@angular/material/form-field';\r\n\r\nimport { MatInputModule } from '@angular/material/input';\r\nimport { MatIconModule } from '@angular/material/icon';\r\nimport { AsyncPipe } from '@angular/common';\r\n\r\n@Component({\r\n selector: 'cmat-chip-input',\r\n templateUrl: './chip-input.component.html',\r\n standalone: true,\r\n providers: [\r\n {\r\n provide: NG_VALUE_ACCESSOR,\r\n useExisting: forwardRef(() => CmatChipInputComponent),\r\n multi: true\r\n }\r\n ],\r\n exportAs: 'cmatChipInput',\r\n imports: [MatFormFieldModule, MatChipsModule,AsyncPipe, MatInputModule, MatAutocompleteModule, MatIconModule, FormsModule, ReactiveFormsModule],\r\n encapsulation: ViewEncapsulation.None,\r\n changeDetection: ChangeDetectionStrategy.OnPush\r\n})\r\nexport class CmatChipInputComponent implements ControlValueAccessor, OnDestroy {\r\n @ViewChild('input') inputElementRef: ElementRef<HTMLInputElement>;\r\n @Input() label: string;\r\n @Input() selectableOptions: string[];\r\n @Input() hasAutocomplete: boolean = false;\r\n @Input() outputIsString: boolean = false;\r\n @Input() separatorKey: string = ',';\r\n\r\n inputControl: FormControl<string | null> = new FormControl();\r\n filteredOptions$: Observable<string[] | null>;\r\n selectedOptions$: BehaviorSubject<any> = new BehaviorSubject<any>([]);\r\n separatorKeysCodes: number[] = [ENTER, COMMA];\r\n\r\n private readonly _maxFilteredItems = 50;\r\n private _unsubscribeAll: Subject<any> = new Subject<any>();\r\n\r\n constructor() {\r\n this.filteredOptions$ = this.inputControl.valueChanges.pipe(\r\n startWith(null),\r\n takeUntil(this._unsubscribeAll),\r\n debounceTime(100),\r\n map((value: string | null) => {\r\n if (this.hasAutocomplete) {\r\n const selectable = (value ? this._filter(value) : this.selectableOptions.slice());\r\n const notSelected = !isNil(this.selectedOptions$.value) ? selectable.filter(option => !this.selectedOptions$.value.includes(option)) : selectable;\r\n\r\n return notSelected.slice(0, this._maxFilteredItems);\r\n }\r\n\r\n return null;\r\n }),\r\n );\r\n }\r\n\r\n ngOnDestroy(): void {\r\n this._unsubscribeAll.next(void 0);\r\n this._unsubscribeAll.complete();\r\n }\r\n\r\n registerOnChange(fn: any): void {\r\n this._onModelChange = fn;\r\n }\r\n\r\n registerOnTouched(fn: any): void {\r\n this._onTouchedChange = fn;\r\n }\r\n\r\n writeValue(value: any): void {\r\n if (isArray(value) || isNil(value))\r\n this.selectedOptions$.next(value);\r\n else if (isEmpty(value)) {\r\n this.selectedOptions$.next([]);\r\n }\r\n else {\r\n this.selectedOptions$.next((value as string).split(this.separatorKey));\r\n }\r\n\r\n this.inputControl.setValue(null);\r\n }\r\n\r\n onAdd(event: MatChipInputEvent): void {\r\n const value = (event.value || '').trim();\r\n\r\n if (value && (!this.hasAutocomplete || this.selectableOptions.includes(value))) {\r\n const newValue = isNil(this.selectedOptions$.value) ? [value] : [...this.selectedOptions$.value, value];\r\n this.selectedOptions$.next(newValue);\r\n\r\n if (this.outputIsString) {\r\n this._onModelChange(newValue.join(this.separatorKey));\r\n } else {\r\n this._onModelChange(newValue);\r\n }\r\n }\r\n\r\n event.chipInput!.clear();\r\n\r\n this.inputControl.setValue(null);\r\n }\r\n\r\n onRemove(option: string): void {\r\n const index: number = this.selectedOptions$.value.indexOf(option);\r\n if (index >= 0) {\r\n let newOptions = [...this.selectedOptions$.value];\r\n newOptions.splice(index, 1);\r\n newOptions = newOptions.length > 0 ? newOptions : [];\r\n\r\n this.selectedOptions$.next(newOptions);\r\n\r\n if (this.outputIsString && !isNil(newOptions)) {\r\n this._onModelChange(newOptions.join(this.separatorKey));\r\n } else {\r\n this._onModelChange(newOptions);\r\n }\r\n\r\n this.inputControl.setValue(null);\r\n }\r\n }\r\n\r\n onSelected(event: MatAutocompleteSelectedEvent): void {\r\n const newValue = isNil(this.selectedOptions$.value) ? [event.option.viewValue] : [...this.selectedOptions$.value, event.option.viewValue];\r\n this.selectedOptions$.next(newValue);\r\n\r\n if (this.outputIsString) {\r\n this._onModelChange(newValue.join(this.separatorKey));\r\n } else {\r\n this._onModelChange(newValue);\r\n }\r\n\r\n this.inputElementRef.nativeElement.value = '';\r\n this.inputControl.setValue(null);\r\n }\r\n\r\n trackByFn(index: number): any {\r\n return index;\r\n }\r\n\r\n private _onModelChange: (value: any) => void = () => { };\r\n private _onTouchedChange: () => any = () => { };\r\n\r\n private _filter(value: string): string[] {\r\n const filterValue = value.toLowerCase();\r\n\r\n return this.selectableOptions.filter(v => v.toLowerCase().includes(filterValue));\r\n }\r\n}","<mat-form-field subscriptSizing=\"dynamic\" class=\"w-full\">\n <mat-label>{{label}}</mat-label>\n <mat-chip-grid #chipList class=\"items-center\">\n @for (option of selectedOptions$ | async; track trackByFn($index)) {\n <mat-chip-row selectable (removed)=\"onRemove(option)\">\n {{ option }}\n <button matChipRemove>\n <mat-icon class=\"icon-size-5\" [svgIcon]=\"'mat_solid:cancel'\"></mat-icon>\n </button>\n </mat-chip-row>\n }\n\n @if (hasAutocomplete) {\n <input #input matInput [formControl]=\"inputControl\" [placeholder]=\"'开始选择...'\"\n [matAutocomplete]=\"autoComplete\" [matChipInputFor]=\"chipList\"\n [matChipInputSeparatorKeyCodes]=\"separatorKeysCodes\" (matChipInputTokenEnd)=\"onAdd($event)\" />\n <mat-autocomplete #autoComplete=\"matAutocomplete\" (optionSelected)=\"onSelected($event)\">\n @for (option of filteredOptions$ | async; track trackByFn($index)) {\n <mat-option [value]=\"option\">\n {{ option }}\n </mat-option>\n }\n </mat-autocomplete>\n } @else {\n <input #input [formControl]=\"inputControl\" [placeholder]=\"'开始填写...'\" [matChipInputFor]=\"chipList\"\n [matChipInputSeparatorKeyCodes]=\"separatorKeysCodes\" (matChipInputTokenEnd)=\"onAdd($event)\" />\n }\n </mat-chip-grid>\n\n </mat-form-field>\n\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;MA6Ba,sBAAsB,CAAA;AAgB/B,IAAA,WAAA,GAAA;QAZS,IAAe,CAAA,eAAA,GAAY,KAAK,CAAC;QACjC,IAAc,CAAA,cAAA,GAAY,KAAK,CAAC;QAChC,IAAY,CAAA,YAAA,GAAW,GAAG,CAAC;AAEpC,QAAA,IAAA,CAAA,YAAY,GAA+B,IAAI,WAAW,EAAE,CAAC;AAE7D,QAAA,IAAA,CAAA,gBAAgB,GAAyB,IAAI,eAAe,CAAM,EAAE,CAAC,CAAC;AACtE,QAAA,IAAA,CAAA,kBAAkB,GAAa,CAAC,KAAK,EAAE,KAAK,CAAC,CAAC;QAE7B,IAAiB,CAAA,iBAAA,GAAG,EAAE,CAAC;AAChC,QAAA,IAAA,CAAA,eAAe,GAAiB,IAAI,OAAO,EAAO,CAAC;AAsGnD,QAAA,IAAA,CAAA,cAAc,GAAyB,MAAK,GAAI,CAAC;AACjD,QAAA,IAAA,CAAA,gBAAgB,GAAc,MAAK,GAAI,CAAC;AApG5C,QAAA,IAAI,CAAC,gBAAgB,GAAG,IAAI,CAAC,YAAY,CAAC,YAAY,CAAC,IAAI,CACvD,SAAS,CAAC,IAAI,CAAC,EACf,SAAS,CAAC,IAAI,CAAC,eAAe,CAAC,EAC/B,YA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AAA,CAAA,IAAA,EAAA,CAAA,CAAA,EAAA;;2FAIrI,sBAAsB,EAAA,UAAA,EAAA,CAAA;kBAhBlC,SAAS;+BACI,iBAAiB,EAAA,UAAA,EAEf,IAAI,EACL,SAAA,EAAA;AACP,wBAAA;AACI,4BAAA,OAAO,EAAE,iBAAiB;AAC1B,4BAAA,WAAW,EAAE,UAAU,CAAC,4BAA4B,CAAC;AACrD,4BAAA,KAAK,EAAE,IAAI;AACd,yBAAA;qBACJ,EACS,QAAA,EAAA,eAAe,EAChB,OAAA,EAAA,CAAC,kBAAkB,EAAE,cAAc,EAAC,SAAS,EAAE,cAAc,EAAE,qBAAqB,EAAE,aAAa,EAAE,WAAW,EAAE,mBAAmB,CAAC,EAAA,aAAA,EAChI,iBAAiB,CAAC,IAAI,EAAA,eAAA,EACpB,uBAAuB,CAAC,MAAM,EAAA,QAAA,EAAA,46CAAA,EAAA,CAAA;wDAG3B,eAAe,EAAA,CAAA;sBAAlC,SAAS;uBAAC,OAAO,CAAA;gBACT,KAAK,EAAA,CAAA;sBAAb,KAAK;gBACG,iBAAiB,EAAA,CAAA;sBAAzB,KAAK;gBACG,eAAe,EAAA,CAAA;sBAAvB,KAAK;gBACG,cAAc,EAAA,CAAA;sBAAtB,KAAK;gBACG,YAAY,EAAA,CAAA;sBAApB,KAAK;;;AEnCV;;AAEG;;;;"}
1
+ {"version":3,"file":"cmat-components-chip-input.mjs","sources":["../../../projects/cmat/components/chip-input/chip-input.component.ts","../../../projects/cmat/components/chip-input/chip-input.component.html","../../../projects/cmat/components/chip-input/cmat-components-chip-input.ts"],"sourcesContent":["import { ChangeDetectionStrategy, Component, ElementRef, Input, OnDestroy, ViewChild, ViewEncapsulation, forwardRef } from '@angular/core';\r\nimport { ControlValueAccessor, FormControl, FormsModule, NG_VALUE_ACCESSOR, ReactiveFormsModule } from '@angular/forms';\r\nimport { BehaviorSubject, Observable, Subject, debounceTime, map, startWith, takeUntil } from 'rxjs';\r\nimport { COMMA, ENTER } from '@angular/cdk/keycodes';\r\nimport { MatAutocompleteModule, MatAutocompleteSelectedEvent } from '@angular/material/autocomplete';\r\nimport { MatChipInputEvent, MatChipsModule } from '@angular/material/chips';\r\nimport { isArray, isEmpty, isNil } from 'lodash';\r\nimport { MatFormFieldModule } from '@angular/material/form-field';\r\n\r\nimport { MatInputModule } from '@angular/material/input';\r\nimport { MatIconModule } from '@angular/material/icon';\r\nimport { AsyncPipe } from '@angular/common';\r\n\r\n@Component({\r\n selector: 'cmat-chip-input',\r\n templateUrl: './chip-input.component.html',\r\n standalone: true,\r\n providers: [\r\n {\r\n provide: NG_VALUE_ACCESSOR,\r\n useExisting: forwardRef(() => CmatChipInputComponent),\r\n multi: true\r\n }\r\n ],\r\n exportAs: 'cmatChipInput',\r\n imports: [MatFormFieldModule, MatChipsModule,AsyncPipe, MatInputModule, MatAutocompleteModule, MatIconModule, FormsModule, ReactiveFormsModule],\r\n encapsulation: ViewEncapsulation.None,\r\n changeDetection: ChangeDetectionStrategy.OnPush\r\n})\r\nexport class CmatChipInputComponent implements ControlValueAccessor, OnDestroy {\r\n @ViewChild('input') inputElementRef: ElementRef<HTMLInputElement>;\r\n @Input() label: string;\r\n @Input() selectableOptions: string[];\r\n @Input() hasAutocomplete: boolean = false;\r\n @Input() outputIsString: boolean = false;\r\n @Input() separatorKey: string = ',';\r\n @Input() hasPrefixIcon:boolean=false;\r\n @Input() prefixIcon:string='heroicons_solid:pencil-square';\r\n\r\n inputControl: FormControl<string | null> = new FormControl();\r\n filteredOptions$: Observable<string[] | null>;\r\n selectedOptions$: BehaviorSubject<any> = new BehaviorSubject<any>([]);\r\n separatorKeysCodes: number[] = [ENTER, COMMA];\r\n\r\n private readonly _maxFilteredItems = 50;\r\n private _unsubscribeAll: Subject<any> = new Subject<any>();\r\n\r\n constructor() {\r\n this.filteredOptions$ = this.inputControl.valueChanges.pipe(\r\n startWith(null),\r\n takeUntil(this._unsubscribeAll),\r\n debounceTime(100),\r\n map((value: string | null) => {\r\n if (this.hasAutocomplete) {\r\n const selectable = (value ? this._filter(value) : this.selectableOptions.slice());\r\n const notSelected = !isNil(this.selectedOptions$.value) ? selectable.filter(option => !this.selectedOptions$.value.includes(option)) : selectable;\r\n\r\n return notSelected.slice(0, this._maxFilteredItems);\r\n }\r\n\r\n return null;\r\n }),\r\n );\r\n }\r\n\r\n ngOnDestroy(): void {\r\n this._unsubscribeAll.next(void 0);\r\n this._unsubscribeAll.complete();\r\n }\r\n\r\n registerOnChange(fn: any): void {\r\n this._onModelChange = fn;\r\n }\r\n\r\n registerOnTouched(fn: any): void {\r\n this._onTouchedChange = fn;\r\n }\r\n\r\n writeValue(value: any): void {\r\n if (isArray(value) || isNil(value))\r\n this.selectedOptions$.next(value);\r\n else if (isEmpty(value)) {\r\n this.selectedOptions$.next([]);\r\n }\r\n else {\r\n this.selectedOptions$.next((value as string).split(this.separatorKey));\r\n }\r\n\r\n this.inputControl.setValue(null);\r\n }\r\n\r\n onAdd(event: MatChipInputEvent): void {\r\n const value = (event.value || '').trim();\r\n\r\n if (value && (!this.hasAutocomplete || this.selectableOptions.includes(value))) {\r\n const newValue = isNil(this.selectedOptions$.value) ? [value] : [...this.selectedOptions$.value, value];\r\n this.selectedOptions$.next(newValue);\r\n\r\n if (this.outputIsString) {\r\n this._onModelChange(newValue.join(this.separatorKey));\r\n } else {\r\n this._onModelChange(newValue);\r\n }\r\n }\r\n\r\n event.chipInput!.clear();\r\n\r\n this.inputControl.setValue(null);\r\n }\r\n\r\n onRemove(option: string): void {\r\n const index: number = this.selectedOptions$.value.indexOf(option);\r\n if (index >= 0) {\r\n let newOptions = [...this.selectedOptions$.value];\r\n newOptions.splice(index, 1);\r\n newOptions = newOptions.length > 0 ? newOptions : [];\r\n\r\n this.selectedOptions$.next(newOptions);\r\n\r\n if (this.outputIsString && !isNil(newOptions)) {\r\n this._onModelChange(newOptions.join(this.separatorKey));\r\n } else {\r\n this._onModelChange(newOptions);\r\n }\r\n\r\n this.inputControl.setValue(null);\r\n }\r\n }\r\n\r\n onSelected(event: MatAutocompleteSelectedEvent): void {\r\n const newValue = isNil(this.selectedOptions$.value) ? [event.option.viewValue] : [...this.selectedOptions$.value, event.option.viewValue];\r\n this.selectedOptions$.next(newValue);\r\n\r\n if (this.outputIsString) {\r\n this._onModelChange(newValue.join(this.separatorKey));\r\n } else {\r\n this._onModelChange(newValue);\r\n }\r\n\r\n this.inputElementRef.nativeElement.value = '';\r\n this.inputControl.setValue(null);\r\n }\r\n\r\n trackByFn(index: number): any {\r\n return index;\r\n }\r\n\r\n private _onModelChange: (value: any) => void = () => { };\r\n private _onTouchedChange: () => any = () => { };\r\n\r\n private _filter(value: string): string[] {\r\n const filterValue = value.toLowerCase();\r\n\r\n return this.selectableOptions.filter(v => v.toLowerCase().includes(filterValue));\r\n }\r\n}","<mat-form-field subscriptSizing=\"dynamic\" class=\"w-full\">\n <mat-label>{{label}}</mat-label>\n @if(hasPrefixIcon){\n <mat-icon matPrefix class=\"hidden sm:flex icon-size-5\" [svgIcon]=\"prefixIcon\">\n </mat-icon>\n }\n <mat-chip-grid #chipList class=\"items-center\">\n @for (option of selectedOptions$ | async; track trackByFn($index)) {\n <mat-chip-row selectable (removed)=\"onRemove(option)\">\n {{ option }}\n <button matChipRemove>\n <mat-icon class=\"icon-size-5\" [svgIcon]=\"'mat_solid:cancel'\"></mat-icon>\n </button>\n </mat-chip-row>\n }\n\n @if (hasAutocomplete) {\n <input #input matInput [formControl]=\"inputControl\" [placeholder]=\"'开始选择...'\" [matAutocomplete]=\"autoComplete\"\n [matChipInputFor]=\"chipList\" [matChipInputSeparatorKeyCodes]=\"separatorKeysCodes\"\n (matChipInputTokenEnd)=\"onAdd($event)\" />\n <mat-autocomplete #autoComplete=\"matAutocomplete\" (optionSelected)=\"onSelected($event)\">\n @for (option of filteredOptions$ | async; track trackByFn($index)) {\n <mat-option [value]=\"option\">\n {{ option }}\n </mat-option>\n }\n </mat-autocomplete>\n } @else {\n <input #input [formControl]=\"inputControl\" [placeholder]=\"'开始填写...'\" [matChipInputFor]=\"chipList\"\n [matChipInputSeparatorKeyCodes]=\"separatorKeysCodes\" (matChipInputTokenEnd)=\"onAdd($event)\" />\n }\n </mat-chip-grid>\n\n</mat-form-field>","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;MA6Ba,sBAAsB,CAAA;AAkB/B,IAAA,WAAA,GAAA;QAdS,IAAe,CAAA,eAAA,GAAY,KAAK,CAAC;QACjC,IAAc,CAAA,cAAA,GAAY,KAAK,CAAC;QAChC,IAAY,CAAA,YAAA,GAAW,GAAG,CAAC;QAC3B,IAAa,CAAA,aAAA,GAAS,KAAK,CAAC;QAC5B,IAAU,CAAA,UAAA,GAAQ,+BAA+B,CAAC;AAE3D,QAAA,IAAA,CAAA,YAAY,GAA+B,IAAI,WAAW,EAAE,CAAC;AAE7D,QAAA,IAAA,CAAA,gBAAgB,GAAyB,IAAI,eAAe,CAAM,EAAE,CAAC,CAAC;AACtE,QAAA,IAAA,CAAA,kBAAkB,GAAa,CAAC,KAAK,EAAE,KAAK,CAAC,CAAC;QAE7B,IAAiB,CAAA,iBAAA,GAAG,EAAE,CAAC;AAChC,QAAA,IAAA,CAAA,eAAe,GAAiB,IAAI,OAAO,EAAO,CAAC;AAsGnD,QAAA,IAAA,CAAA,cAAc,GAAyB,MAAK,GAAI,CAAC;AACjD,QAAA,IAAA,CAAA,gBAAgB,GAAc,MAAK,GAAI,CAAC;AApG5C,QAAA,IAAI,CAAC,gBAAgB,GAAG,IAAI,CAAC,YAAY,CAAC,YAAY,CAAC,IAAI,CACvD,SAAS,CAAC,IAAI,CAAC,EACf,SAAS,CAAC,IAAI,CAAC,eAAe,CAAC,EAC/B,YAAY,CAAC,GAAG,CAAC,EACjB,GAAG,CAAC,CAAC,KAAoB,KAAI;YACzB,IAAI,IAAI,CAAC,eAAe,EAAE;gBACtB,MAAM,UAAU,IAAI,KAAK,GAAG,IAAI,CAA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