@ng-doc/app 16.7.0 → 16.7.2
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/playground/base-playground.d.ts +8 -3
- package/components/playground/playground-form.d.ts +1 -2
- package/components/playground/playground-properties/playground-properties.component.d.ts +2 -1
- package/components/playground/playground-property/playground-property.component.d.ts +3 -2
- package/components/playground/playground.component.d.ts +6 -4
- package/esm2022/components/playground/base-playground.mjs +31 -2
- package/esm2022/components/playground/playground-demo/playground-demo.component.mjs +6 -10
- package/esm2022/components/playground/playground-form.mjs +1 -1
- package/esm2022/components/playground/playground-properties/playground-properties.component.mjs +9 -5
- package/esm2022/components/playground/playground-property/playground-property.component.mjs +12 -12
- package/esm2022/components/playground/playground.component.mjs +17 -11
- package/esm2022/interfaces/type-control.mjs +1 -1
- package/esm2022/type-controls/boolean-control/boolean-control.component.mjs +7 -1
- package/esm2022/type-controls/number-control/number-control.component.mjs +8 -10
- package/esm2022/type-controls/string-control/string-control.component.mjs +8 -10
- package/esm2022/type-controls/type-alias-control/type-alias-control.component.mjs +8 -10
- package/fesm2022/ng-doc-app-components-playground.mjs +91 -58
- package/fesm2022/ng-doc-app-components-playground.mjs.map +1 -1
- package/fesm2022/ng-doc-app-type-controls-boolean-control.mjs +6 -0
- package/fesm2022/ng-doc-app-type-controls-boolean-control.mjs.map +1 -1
- package/fesm2022/ng-doc-app-type-controls-number-control.mjs +7 -9
- package/fesm2022/ng-doc-app-type-controls-number-control.mjs.map +1 -1
- package/fesm2022/ng-doc-app-type-controls-string-control.mjs +7 -9
- package/fesm2022/ng-doc-app-type-controls-string-control.mjs.map +1 -1
- package/fesm2022/ng-doc-app-type-controls-type-alias-control.mjs +7 -9
- package/fesm2022/ng-doc-app-type-controls-type-alias-control.mjs.map +1 -1
- package/interfaces/type-control.d.ts +2 -2
- package/package.json +3 -3
- package/type-controls/boolean-control/boolean-control.component.d.ts +4 -1
- package/type-controls/number-control/number-control.component.d.ts +3 -4
- package/type-controls/string-control/string-control.component.d.ts +2 -3
- package/type-controls/type-alias-control/type-alias-control.component.d.ts +3 -4
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import { NgIf } from '@angular/common';
|
|
2
2
|
import * as i0 from '@angular/core';
|
|
3
|
-
import { Component, ChangeDetectionStrategy } from '@angular/core';
|
|
3
|
+
import { Component, ChangeDetectionStrategy, Input } from '@angular/core';
|
|
4
4
|
import * as i2 from '@angular/forms';
|
|
5
5
|
import { FormsModule } from '@angular/forms';
|
|
6
|
-
import { extractValue } from '@ng-doc/core/helpers/extract-value';
|
|
7
6
|
import { NgDocInputWrapperComponent, NgDocInputNumberDirective, NgDocButtonIconComponent, NgDocFocusableDirective, NgDocIconComponent } from '@ng-doc/ui-kit';
|
|
8
7
|
import * as i1 from 'flex-controls';
|
|
9
8
|
import { FlControl, FlControlSilencerModule } from 'flex-controls';
|
|
@@ -12,14 +11,11 @@ class NgDocNumberControlComponent extends FlControl {
|
|
|
12
11
|
constructor() {
|
|
13
12
|
super();
|
|
14
13
|
}
|
|
15
|
-
get defaultValue() {
|
|
16
|
-
return this.default ? extractValue(this.default) : null;
|
|
17
|
-
}
|
|
18
14
|
changeModel(value) {
|
|
19
|
-
this.updateModel(value === null && this.default ? this.
|
|
15
|
+
this.updateModel(value === null && this.default ? this.default : value);
|
|
20
16
|
}
|
|
21
17
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.0", ngImport: i0, type: NgDocNumberControlComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
22
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.0.0", type: NgDocNumberControlComponent, isStandalone: true, selector: "ng-doc-number-control", usesInheritance: true, ngImport: i0, template: "<ng-doc-input-wrapper flControlSilencer [rightContent]=\"rightContent\">\n\t<input ngDocInputNumber type=\"number\" [ngModel]=\"model\" (ngModelChange)=\"changeModel($event)\">\n\t<ng-template #rightContent>\n\t\t<button\n\t\t\tng-doc-button-icon\n\t\t\tsize=\"large\"\n\t\t\t[ngDocFocusable]=\"false\"\n\t\t\t[disabled]=\"disabled\"\n\t\t\t[rounded]=\"false\"\n\t\t\t(click)=\"updateModel(
|
|
18
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.0.0", type: NgDocNumberControlComponent, isStandalone: true, selector: "ng-doc-number-control", inputs: { default: "default" }, usesInheritance: true, ngImport: i0, template: "<ng-doc-input-wrapper flControlSilencer [rightContent]=\"rightContent\">\n\t<input ngDocInputNumber type=\"number\" [ngModel]=\"model\" (ngModelChange)=\"changeModel($event)\">\n\t<ng-template #rightContent>\n\t\t<button\n\t\t\tng-doc-button-icon\n\t\t\tsize=\"large\"\n\t\t\t[ngDocFocusable]=\"false\"\n\t\t\t[disabled]=\"disabled\"\n\t\t\t[rounded]=\"false\"\n\t\t\t(click)=\"updateModel(default ?? null)\"\n\t\t\t(focusout)=\"onTouched()\"\n\t\t\t*ngIf=\"model && model !== default\"\n\t\t>\n\t\t\t<ng-doc-icon icon=\"x\"></ng-doc-icon>\n\t\t</button>\n\t</ng-template>\n</ng-doc-input-wrapper>\n", styles: [":host{display:block;width:100%}\n"], dependencies: [{ kind: "component", type: NgDocInputWrapperComponent, selector: "ng-doc-input-wrapper", inputs: ["blurContent", "blurContext", "leftContent", "rightContent", "align"] }, { kind: "ngmodule", type: FlControlSilencerModule }, { kind: "directive", type: i1.FlControlSilencerDirective, selector: "[flControlSilencer]" }, { kind: "directive", type: NgDocInputNumberDirective, selector: "input[ngDocInputNumber]" }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i2.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.NumberValueAccessor, selector: "input[type=number][formControlName],input[type=number][formControl],input[type=number][ngModel]" }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: NgDocButtonIconComponent, selector: "button[ng-doc-button-icon], a[ng-doc-button-icon]", inputs: ["size", "rounded"] }, { kind: "directive", type: NgDocFocusableDirective, selector: "[ngDocFocusable]", inputs: ["ngDocFocusable"], exportAs: ["ngDocFocusable"] }, { kind: "component", type: NgDocIconComponent, selector: "ng-doc-icon", inputs: ["icon", "size"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
23
19
|
}
|
|
24
20
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.0", ngImport: i0, type: NgDocNumberControlComponent, decorators: [{
|
|
25
21
|
type: Component,
|
|
@@ -32,8 +28,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.0", ngImpor
|
|
|
32
28
|
NgDocButtonIconComponent,
|
|
33
29
|
NgDocFocusableDirective,
|
|
34
30
|
NgDocIconComponent,
|
|
35
|
-
], template: "<ng-doc-input-wrapper flControlSilencer [rightContent]=\"rightContent\">\n\t<input ngDocInputNumber type=\"number\" [ngModel]=\"model\" (ngModelChange)=\"changeModel($event)\">\n\t<ng-template #rightContent>\n\t\t<button\n\t\t\tng-doc-button-icon\n\t\t\tsize=\"large\"\n\t\t\t[ngDocFocusable]=\"false\"\n\t\t\t[disabled]=\"disabled\"\n\t\t\t[rounded]=\"false\"\n\t\t\t(click)=\"updateModel(
|
|
36
|
-
}], ctorParameters: function () { return []; }
|
|
31
|
+
], template: "<ng-doc-input-wrapper flControlSilencer [rightContent]=\"rightContent\">\n\t<input ngDocInputNumber type=\"number\" [ngModel]=\"model\" (ngModelChange)=\"changeModel($event)\">\n\t<ng-template #rightContent>\n\t\t<button\n\t\t\tng-doc-button-icon\n\t\t\tsize=\"large\"\n\t\t\t[ngDocFocusable]=\"false\"\n\t\t\t[disabled]=\"disabled\"\n\t\t\t[rounded]=\"false\"\n\t\t\t(click)=\"updateModel(default ?? null)\"\n\t\t\t(focusout)=\"onTouched()\"\n\t\t\t*ngIf=\"model && model !== default\"\n\t\t>\n\t\t\t<ng-doc-icon icon=\"x\"></ng-doc-icon>\n\t\t</button>\n\t</ng-template>\n</ng-doc-input-wrapper>\n", styles: [":host{display:block;width:100%}\n"] }]
|
|
32
|
+
}], ctorParameters: function () { return []; }, propDecorators: { default: [{
|
|
33
|
+
type: Input
|
|
34
|
+
}] } });
|
|
37
35
|
|
|
38
36
|
/**
|
|
39
37
|
* Generated bundle index. Do not edit.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ng-doc-app-type-controls-number-control.mjs","sources":["../../../../libs/app/type-controls/number-control/number-control.component.ts","../../../../libs/app/type-controls/number-control/number-control.component.html","../../../../libs/app/type-controls/number-control/ng-doc-app-type-controls-number-control.ts"],"sourcesContent":["import {NgIf} from '@angular/common';\nimport {ChangeDetectionStrategy, Component} from '@angular/core';\nimport {FormsModule} from '@angular/forms';\nimport {NgDocTypeControl} from '@ng-doc/app/interfaces';\nimport {
|
|
1
|
+
{"version":3,"file":"ng-doc-app-type-controls-number-control.mjs","sources":["../../../../libs/app/type-controls/number-control/number-control.component.ts","../../../../libs/app/type-controls/number-control/number-control.component.html","../../../../libs/app/type-controls/number-control/ng-doc-app-type-controls-number-control.ts"],"sourcesContent":["import {NgIf} from '@angular/common';\nimport {ChangeDetectionStrategy, Component, Input} from '@angular/core';\nimport {FormsModule} from '@angular/forms';\nimport {NgDocTypeControl} from '@ng-doc/app/interfaces';\nimport {\n\tNgDocButtonIconComponent,\n\tNgDocFocusableDirective,\n\tNgDocIconComponent,\n\tNgDocInputNumberDirective,\n\tNgDocInputWrapperComponent,\n} from '@ng-doc/ui-kit';\nimport {FlControl, FlControlSilencerModule} from 'flex-controls';\n\n@Component({\n\tselector: 'ng-doc-number-control',\n\ttemplateUrl: './number-control.component.html',\n\tstyleUrls: ['./number-control.component.scss'],\n\tchangeDetection: ChangeDetectionStrategy.OnPush,\n\tstandalone: true,\n\timports: [\n\t\tNgDocInputWrapperComponent,\n\t\tFlControlSilencerModule,\n\t\tNgDocInputNumberDirective,\n\t\tFormsModule,\n\t\tNgIf,\n\t\tNgDocButtonIconComponent,\n\t\tNgDocFocusableDirective,\n\t\tNgDocIconComponent,\n\t],\n})\nexport class NgDocNumberControlComponent extends FlControl<number> implements NgDocTypeControl<number> {\n\t@Input()\n\tdefault?: number;\n\n\tconstructor() {\n\t\tsuper();\n\t}\n\n\tchangeModel(value: number | null): void {\n\t\tthis.updateModel(value === null && this.default ? this.default : value);\n\t}\n}\n","<ng-doc-input-wrapper flControlSilencer [rightContent]=\"rightContent\">\n\t<input ngDocInputNumber type=\"number\" [ngModel]=\"model\" (ngModelChange)=\"changeModel($event)\">\n\t<ng-template #rightContent>\n\t\t<button\n\t\t\tng-doc-button-icon\n\t\t\tsize=\"large\"\n\t\t\t[ngDocFocusable]=\"false\"\n\t\t\t[disabled]=\"disabled\"\n\t\t\t[rounded]=\"false\"\n\t\t\t(click)=\"updateModel(default ?? null)\"\n\t\t\t(focusout)=\"onTouched()\"\n\t\t\t*ngIf=\"model && model !== default\"\n\t\t>\n\t\t\t<ng-doc-icon icon=\"x\"></ng-doc-icon>\n\t\t</button>\n\t</ng-template>\n</ng-doc-input-wrapper>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;AAaA,MAiBa,2BAA4B,SAAQ,SAAiB,CAAA;AAIjE,IAAA,WAAA,GAAA;AACC,QAAA,KAAK,EAAE,CAAC;KACR;AAED,IAAA,WAAW,CAAC,KAAoB,EAAA;QAC/B,IAAI,CAAC,WAAW,CA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AA,aAAA,EAAA,MAAA,EAAA,CAAA,MAAA,EAAA,MAAA,CAAA,EAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,CAAA,CAAA,EAAA;;2FAGP,2BAA2B,EAAA,UAAA,EAAA,CAAA;kBAjBvC,SAAS;AACC,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,uBAAuB,mBAGhB,uBAAuB,CAAC,MAAM,EAAA,UAAA,EACnC,IAAI,EACP,OAAA,EAAA;wBACR,0BAA0B;wBAC1B,uBAAuB;wBACvB,yBAAyB;wBACzB,WAAW;wBACX,IAAI;wBACJ,wBAAwB;wBACxB,uBAAuB;wBACvB,kBAAkB;AAClB,qBAAA,EAAA,QAAA,EAAA,ylBAAA,EAAA,MAAA,EAAA,CAAA,mCAAA,CAAA,EAAA,CAAA;0EAID,OAAO,EAAA,CAAA;sBADN,KAAK;;;AE/BP;;AAEG;;;;"}
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import { NgIf } from '@angular/common';
|
|
2
2
|
import * as i0 from '@angular/core';
|
|
3
|
-
import { Component, ChangeDetectionStrategy } from '@angular/core';
|
|
3
|
+
import { Component, ChangeDetectionStrategy, Input } from '@angular/core';
|
|
4
4
|
import * as i1 from '@angular/forms';
|
|
5
5
|
import { FormsModule } from '@angular/forms';
|
|
6
|
-
import { extractValue } from '@ng-doc/core/helpers/extract-value';
|
|
7
6
|
import { NgDocInputWrapperComponent, NgDocInputStringDirective, NgDocButtonIconComponent, NgDocFocusableDirective, NgDocIconComponent } from '@ng-doc/ui-kit';
|
|
8
7
|
import * as i2 from 'flex-controls';
|
|
9
8
|
import { FlControl, FlControlSilencerModule } from 'flex-controls';
|
|
@@ -12,17 +11,14 @@ class NgDocStringControlComponent extends FlControl {
|
|
|
12
11
|
constructor() {
|
|
13
12
|
super();
|
|
14
13
|
}
|
|
15
|
-
get defaultValue() {
|
|
16
|
-
return this.default ? extractValue(this.default) : null;
|
|
17
|
-
}
|
|
18
14
|
changeModel(value) {
|
|
19
|
-
this.updateModel(value === null && this.default ? this.
|
|
15
|
+
this.updateModel(value === null && this.default ? this.default : value);
|
|
20
16
|
}
|
|
21
17
|
writeValue(value) {
|
|
22
18
|
super.writeValue(value);
|
|
23
19
|
}
|
|
24
20
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.0", ngImport: i0, type: NgDocStringControlComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
25
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.0.0", type: NgDocStringControlComponent, isStandalone: true, selector: "ng-doc-string-control", usesInheritance: true, ngImport: i0, template: "<ng-doc-input-wrapper [rightContent]=\"rightContent\" flControlSilencer>\n\t<input ngDocInputString [ngModel]=\"model\" (ngModelChange)=\"changeModel($event)\">\n\t<ng-template #rightContent>\n\t\t<button\n\t\t\tng-doc-button-icon\n\t\t\tsize=\"large\"\n\t\t\t[ngDocFocusable]=\"false\"\n\t\t\t[disabled]=\"disabled\"\n\t\t\t[rounded]=\"false\"\n\t\t\t(click)=\"updateModel(
|
|
21
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.0.0", type: NgDocStringControlComponent, isStandalone: true, selector: "ng-doc-string-control", inputs: { default: "default" }, usesInheritance: true, ngImport: i0, template: "<ng-doc-input-wrapper [rightContent]=\"rightContent\" flControlSilencer>\n\t<input ngDocInputString [ngModel]=\"model\" (ngModelChange)=\"changeModel($event)\">\n\t<ng-template #rightContent>\n\t\t<button\n\t\t\tng-doc-button-icon\n\t\t\tsize=\"large\"\n\t\t\t[ngDocFocusable]=\"false\"\n\t\t\t[disabled]=\"disabled\"\n\t\t\t[rounded]=\"false\"\n\t\t\t(click)=\"updateModel(default ?? null)\"\n\t\t\t(focusout)=\"onTouched()\"\n\t\t\t*ngIf=\"model && model !== default\"\n\t\t>\n\t\t\t<ng-doc-icon icon=\"x\"></ng-doc-icon>\n\t\t</button>\n\t</ng-template>\n</ng-doc-input-wrapper>\n", styles: [":host{display:block;width:100%}\n"], dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: NgDocInputWrapperComponent, selector: "ng-doc-input-wrapper", inputs: ["blurContent", "blurContext", "leftContent", "rightContent", "align"] }, { kind: "ngmodule", type: FlControlSilencerModule }, { kind: "directive", type: i2.FlControlSilencerDirective, selector: "[flControlSilencer]" }, { kind: "directive", type: NgDocInputStringDirective, selector: "input[ngDocInputString]" }, { kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: NgDocButtonIconComponent, selector: "button[ng-doc-button-icon], a[ng-doc-button-icon]", inputs: ["size", "rounded"] }, { kind: "directive", type: NgDocFocusableDirective, selector: "[ngDocFocusable]", inputs: ["ngDocFocusable"], exportAs: ["ngDocFocusable"] }, { kind: "component", type: NgDocIconComponent, selector: "ng-doc-icon", inputs: ["icon", "size"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
26
22
|
}
|
|
27
23
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.0", ngImport: i0, type: NgDocStringControlComponent, decorators: [{
|
|
28
24
|
type: Component,
|
|
@@ -35,8 +31,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.0", ngImpor
|
|
|
35
31
|
NgDocButtonIconComponent,
|
|
36
32
|
NgDocFocusableDirective,
|
|
37
33
|
NgDocIconComponent,
|
|
38
|
-
], template: "<ng-doc-input-wrapper [rightContent]=\"rightContent\" flControlSilencer>\n\t<input ngDocInputString [ngModel]=\"model\" (ngModelChange)=\"changeModel($event)\">\n\t<ng-template #rightContent>\n\t\t<button\n\t\t\tng-doc-button-icon\n\t\t\tsize=\"large\"\n\t\t\t[ngDocFocusable]=\"false\"\n\t\t\t[disabled]=\"disabled\"\n\t\t\t[rounded]=\"false\"\n\t\t\t(click)=\"updateModel(
|
|
39
|
-
}], ctorParameters: function () { return []; }
|
|
34
|
+
], template: "<ng-doc-input-wrapper [rightContent]=\"rightContent\" flControlSilencer>\n\t<input ngDocInputString [ngModel]=\"model\" (ngModelChange)=\"changeModel($event)\">\n\t<ng-template #rightContent>\n\t\t<button\n\t\t\tng-doc-button-icon\n\t\t\tsize=\"large\"\n\t\t\t[ngDocFocusable]=\"false\"\n\t\t\t[disabled]=\"disabled\"\n\t\t\t[rounded]=\"false\"\n\t\t\t(click)=\"updateModel(default ?? null)\"\n\t\t\t(focusout)=\"onTouched()\"\n\t\t\t*ngIf=\"model && model !== default\"\n\t\t>\n\t\t\t<ng-doc-icon icon=\"x\"></ng-doc-icon>\n\t\t</button>\n\t</ng-template>\n</ng-doc-input-wrapper>\n", styles: [":host{display:block;width:100%}\n"] }]
|
|
35
|
+
}], ctorParameters: function () { return []; }, propDecorators: { default: [{
|
|
36
|
+
type: Input
|
|
37
|
+
}] } });
|
|
40
38
|
|
|
41
39
|
/**
|
|
42
40
|
* Generated bundle index. Do not edit.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ng-doc-app-type-controls-string-control.mjs","sources":["../../../../libs/app/type-controls/string-control/string-control.component.ts","../../../../libs/app/type-controls/string-control/string-control.component.html","../../../../libs/app/type-controls/string-control/ng-doc-app-type-controls-string-control.ts"],"sourcesContent":["import {NgIf} from '@angular/common';\nimport {ChangeDetectionStrategy, Component} from '@angular/core';\nimport {FormsModule} from '@angular/forms';\nimport {NgDocTypeControl} from '@ng-doc/app/interfaces';\nimport {
|
|
1
|
+
{"version":3,"file":"ng-doc-app-type-controls-string-control.mjs","sources":["../../../../libs/app/type-controls/string-control/string-control.component.ts","../../../../libs/app/type-controls/string-control/string-control.component.html","../../../../libs/app/type-controls/string-control/ng-doc-app-type-controls-string-control.ts"],"sourcesContent":["import {NgIf} from '@angular/common';\nimport {ChangeDetectionStrategy, Component, Input} from '@angular/core';\nimport {FormsModule} from '@angular/forms';\nimport {NgDocTypeControl} from '@ng-doc/app/interfaces';\nimport {\n\tNgDocButtonIconComponent,\n\tNgDocFocusableDirective,\n\tNgDocIconComponent,\n\tNgDocInputStringDirective,\n\tNgDocInputWrapperComponent,\n} from '@ng-doc/ui-kit';\nimport {FlControl, FlControlSilencerModule} from 'flex-controls';\n\n@Component({\n\tselector: 'ng-doc-string-control',\n\ttemplateUrl: './string-control.component.html',\n\tstyleUrls: ['./string-control.component.scss'],\n\tchangeDetection: ChangeDetectionStrategy.OnPush,\n\tstandalone: true,\n\timports: [\n\t\tFormsModule,\n\t\tNgDocInputWrapperComponent,\n\t\tFlControlSilencerModule,\n\t\tNgDocInputStringDirective,\n\t\tNgIf,\n\t\tNgDocButtonIconComponent,\n\t\tNgDocFocusableDirective,\n\t\tNgDocIconComponent,\n\t],\n})\nexport class NgDocStringControlComponent extends FlControl<string> implements NgDocTypeControl<string> {\n\t@Input()\n\tdefault?: string;\n\n\tconstructor() {\n\t\tsuper();\n\t}\n\n\tchangeModel(value: string | null): void {\n\t\tthis.updateModel(value === null && this.default ? this.default : value);\n\t}\n\n\toverride writeValue(value: string | null) {\n\t\tsuper.writeValue(value);\n\t}\n}\n","<ng-doc-input-wrapper [rightContent]=\"rightContent\" flControlSilencer>\n\t<input ngDocInputString [ngModel]=\"model\" (ngModelChange)=\"changeModel($event)\">\n\t<ng-template #rightContent>\n\t\t<button\n\t\t\tng-doc-button-icon\n\t\t\tsize=\"large\"\n\t\t\t[ngDocFocusable]=\"false\"\n\t\t\t[disabled]=\"disabled\"\n\t\t\t[rounded]=\"false\"\n\t\t\t(click)=\"updateModel(default ?? null)\"\n\t\t\t(focusout)=\"onTouched()\"\n\t\t\t*ngIf=\"model && model !== default\"\n\t\t>\n\t\t\t<ng-doc-icon icon=\"x\"></ng-doc-icon>\n\t\t</button>\n\t</ng-template>\n</ng-doc-input-wrapper>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;AAaA,MAiBa,2BAA4B,SAAQ,SAAiB,CAAA;AAIjE,IAAA,WAAA,GAAA;AACC,QAAA,KAAK,EAAE,CAAC;KACR;AAED,IAAA,WAAW,CAAC,KAAoB,EAAA;QAC/B,IAAI,CAAC,WAAW,CAAC,KAAK,KAAK,IAAI,IAAI,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC,OAAO,GAAG,KAAK,CAAC,CAAC;KACxE;AAEQ,IAAA,UAAU,CAAC,KAAoB,EAAA;AACvC,QAAA,KAAK,CAAC,UAAU,CAAC,KAAK,CAAC,CAAC;KACxB;8GAdW,2BAA2B,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA,EAAA;AAA3B,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,2BAA2B,wIC9BxC,ykBAiBA,EAAA,MAAA,EAAA,CAAA,mCAAA,CAAA,EAAA,YAAA,EAAA,CAAA,EAAA,IAAA,EAAA,UAAA,EAAA,IAAA,EDGE,WAAW,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAAA,EAAA,CAAA,oBAAA,EAAA,QAAA,EAAA,8MAAA,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAAA,EAAA,CA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A,QAAA,EAAA,uBAAuB,mBAGhB,uBAAuB,CAAC,MAAM,EAAA,UAAA,EACnC,IAAI,EACP,OAAA,EAAA;wBACR,WAAW;wBACX,0BAA0B;wBAC1B,uBAAuB;wBACvB,yBAAyB;wBACzB,IAAI;wBACJ,wBAAwB;wBACxB,uBAAuB;wBACvB,kBAAkB;AAClB,qBAAA,EAAA,QAAA,EAAA,ykBAAA,EAAA,MAAA,EAAA,CAAA,mCAAA,CAAA,EAAA,CAAA;0EAID,OAAO,EAAA,CAAA;sBADN,KAAK;;;AE/BP;;AAEG;;;;"}
|
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
import { NgFor, NgIf, NgTemplateOutlet } from '@angular/common';
|
|
2
2
|
import * as i0 from '@angular/core';
|
|
3
|
-
import { Component, ChangeDetectionStrategy } from '@angular/core';
|
|
3
|
+
import { Component, ChangeDetectionStrategy, Input } from '@angular/core';
|
|
4
4
|
import * as i1 from '@angular/forms';
|
|
5
5
|
import { FormsModule } from '@angular/forms';
|
|
6
6
|
import { NgDocKindIconComponent } from '@ng-doc/app/components/kind-icon';
|
|
7
7
|
import { NgDocExtractValuePipe } from '@ng-doc/app/pipes/extract-value';
|
|
8
|
-
import { extractValue } from '@ng-doc/core/helpers/extract-value';
|
|
9
8
|
import { NgDocComboboxComponent, NgDocDataDirective, NgDocListComponent, NgDocOptionComponent, NgDocTextComponent, NgDocTextLeftDirective, NgDocTooltipDirective, NgDocTextRightDirective, NgDocButtonIconComponent, NgDocFocusableDirective, NgDocIconComponent } from '@ng-doc/ui-kit';
|
|
10
9
|
import { FlControl } from 'flex-controls';
|
|
11
10
|
|
|
@@ -13,17 +12,14 @@ class NgDocTypeAliasControlComponent extends FlControl {
|
|
|
13
12
|
constructor() {
|
|
14
13
|
super();
|
|
15
14
|
}
|
|
16
|
-
get defaultValue() {
|
|
17
|
-
return this.default ? extractValue(this.default) : null;
|
|
18
|
-
}
|
|
19
15
|
typeOf(value) {
|
|
20
16
|
return typeof value;
|
|
21
17
|
}
|
|
22
18
|
changeModel(value) {
|
|
23
|
-
this.updateModel(value === null && this.default ? this.
|
|
19
|
+
this.updateModel(value === null && this.default ? this.default : value);
|
|
24
20
|
}
|
|
25
21
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.0", ngImport: i0, type: NgDocTypeAliasControlComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
26
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.0.0", type: NgDocTypeAliasControlComponent, isStandalone: true, selector: "ng-doc-type-alias-control", usesInheritance: true, ngImport: i0, template: "<ng-doc-combobox [ngModel]=\"model\"\n\t\t\t\t [readonly]=\"true\"\n\t\t\t\t [valueContent]=\"valueTemplate\"\n\t\t\t\t [clearButton]=\"false\"\n\t\t\t\t [rightContent]=\"rightContent\"\n\t\t\t\t (ngModelChange)=\"changeModel($event)\">\n\t<ng-doc-list *ngDocData>\n\t\t<ng-container *ngFor=\"let option of options\">\n\t\t\t<ng-container *ngIf=\"option | ngDocExtractValue as value\">\n\t\t\t\t<ng-doc-option [value]=\"value\">\n\t\t\t\t\t<ng-container *ngTemplateOutlet=\"valueTemplate; context: {$implicit: value}\"></ng-container>\n\t\t\t\t</ng-doc-option>\n\t\t\t</ng-container>\n\t\t</ng-container>\n\t</ng-doc-list>\n\t<ng-template let-value #valueTemplate>\n\t\t<div ng-doc-text>\n\t\t\t<ng-doc-kind-icon [kind]=\"typeOf(value)\"\n\t\t\t\t\t\t\t [type]=\"'type'\"\n\t\t\t\t\t\t\t [ngDocTooltip]=\"typeOf(value)\"\n\t\t\t\t\t\t\t positions=\"left-center\"\n\t\t\t\t\t\t\t ngDocTextLeft>\n\t\t\t</ng-doc-kind-icon>\n\t\t\t<div>{{value}}</div>\n\t\t\t<span ng-doc-text\n\t\t\t\t color=\"muted\"\n\t\t\t\t size=\"small\"\n\t\t\t\t *ngIf=\"value ===
|
|
22
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.0.0", type: NgDocTypeAliasControlComponent, isStandalone: true, selector: "ng-doc-type-alias-control", inputs: { default: "default" }, usesInheritance: true, ngImport: i0, template: "<ng-doc-combobox [ngModel]=\"model\"\n\t\t\t\t [readonly]=\"true\"\n\t\t\t\t [valueContent]=\"valueTemplate\"\n\t\t\t\t [clearButton]=\"false\"\n\t\t\t\t [rightContent]=\"rightContent\"\n\t\t\t\t (ngModelChange)=\"changeModel($event)\">\n\t<ng-doc-list *ngDocData>\n\t\t<ng-container *ngFor=\"let option of options\">\n\t\t\t<ng-container *ngIf=\"option | ngDocExtractValue as value\">\n\t\t\t\t<ng-doc-option [value]=\"value\">\n\t\t\t\t\t<ng-container *ngTemplateOutlet=\"valueTemplate; context: {$implicit: value}\"></ng-container>\n\t\t\t\t</ng-doc-option>\n\t\t\t</ng-container>\n\t\t</ng-container>\n\t</ng-doc-list>\n\t<ng-template let-value #valueTemplate>\n\t\t<div ng-doc-text>\n\t\t\t<ng-doc-kind-icon [kind]=\"typeOf(value)\"\n\t\t\t\t\t\t\t [type]=\"'type'\"\n\t\t\t\t\t\t\t [ngDocTooltip]=\"typeOf(value)\"\n\t\t\t\t\t\t\t positions=\"left-center\"\n\t\t\t\t\t\t\t ngDocTextLeft>\n\t\t\t</ng-doc-kind-icon>\n\t\t\t<div>{{value}}</div>\n\t\t\t<span ng-doc-text\n\t\t\t\t color=\"muted\"\n\t\t\t\t size=\"small\"\n\t\t\t\t *ngIf=\"value === default\" ngDocTextRight>[default]</span>\n\t\t</div>\n\t</ng-template>\n\t<ng-template #rightContent>\n\t\t<button\n\t\t\tng-doc-button-icon\n\t\t\tsize=\"large\"\n\t\t\t[ngDocFocusable]=\"false\"\n\t\t\t[disabled]=\"disabled\"\n\t\t\t[rounded]=\"false\"\n\t\t\t(click)=\"updateModel(default ?? null)\"\n\t\t\t(focusout)=\"onTouched()\"\n\t\t\t*ngIf=\"model && model !== default\"\n\t\t>\n\t\t\t<ng-doc-icon icon=\"x\"></ng-doc-icon>\n\t\t</button>\n\t</ng-template>\n</ng-doc-combobox>\n", styles: [":host{display:block;width:100%}\n"], dependencies: [{ kind: "component", type: NgDocComboboxComponent, selector: "ng-doc-combobox", inputs: ["readonly", "placeholder", "clearButton", "rightContent", "valueContent"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: NgDocDataDirective, selector: "[ngDocData]" }, { kind: "component", type: NgDocListComponent, selector: "ng-doc-list" }, { kind: "directive", type: NgFor, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: NgDocOptionComponent, selector: "ng-doc-option" }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: NgDocTextComponent, selector: "[ng-doc-text]", inputs: ["size", "color", "align", "absoluteContent"] }, { kind: "component", type: NgDocKindIconComponent, selector: "ng-doc-kind-icon", inputs: ["kind", "type"] }, { kind: "directive", type: NgDocTextLeftDirective, selector: "[ngDocTextLeft]" }, { kind: "directive", type: NgDocTooltipDirective, selector: "[ngDocTooltip]", inputs: ["ngDocTooltip", "delay", "displayOrigin", "pointerOrigin", "positions", "canOpen", "panelClass", "minHeight", "maxHeight", "height", "minWidth", "maxWidth", "width"], outputs: ["beforeOpen", "afterOpen", "beforeClose", "afterClose"], exportAs: ["ngDocTooltip"] }, { kind: "directive", type: NgDocTextRightDirective, selector: "[ngDocTextRight]" }, { kind: "component", type: NgDocButtonIconComponent, selector: "button[ng-doc-button-icon], a[ng-doc-button-icon]", inputs: ["size", "rounded"] }, { kind: "directive", type: NgDocFocusableDirective, selector: "[ngDocFocusable]", inputs: ["ngDocFocusable"], exportAs: ["ngDocFocusable"] }, { kind: "component", type: NgDocIconComponent, selector: "ng-doc-icon", inputs: ["icon", "size"] }, { kind: "pipe", type: NgDocExtractValuePipe, name: "ngDocExtractValue" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
27
23
|
}
|
|
28
24
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.0", ngImport: i0, type: NgDocTypeAliasControlComponent, decorators: [{
|
|
29
25
|
type: Component,
|
|
@@ -45,8 +41,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.0", ngImpor
|
|
|
45
41
|
NgDocFocusableDirective,
|
|
46
42
|
NgDocIconComponent,
|
|
47
43
|
NgDocExtractValuePipe,
|
|
48
|
-
], template: "<ng-doc-combobox [ngModel]=\"model\"\n\t\t\t\t [readonly]=\"true\"\n\t\t\t\t [valueContent]=\"valueTemplate\"\n\t\t\t\t [clearButton]=\"false\"\n\t\t\t\t [rightContent]=\"rightContent\"\n\t\t\t\t (ngModelChange)=\"changeModel($event)\">\n\t<ng-doc-list *ngDocData>\n\t\t<ng-container *ngFor=\"let option of options\">\n\t\t\t<ng-container *ngIf=\"option | ngDocExtractValue as value\">\n\t\t\t\t<ng-doc-option [value]=\"value\">\n\t\t\t\t\t<ng-container *ngTemplateOutlet=\"valueTemplate; context: {$implicit: value}\"></ng-container>\n\t\t\t\t</ng-doc-option>\n\t\t\t</ng-container>\n\t\t</ng-container>\n\t</ng-doc-list>\n\t<ng-template let-value #valueTemplate>\n\t\t<div ng-doc-text>\n\t\t\t<ng-doc-kind-icon [kind]=\"typeOf(value)\"\n\t\t\t\t\t\t\t [type]=\"'type'\"\n\t\t\t\t\t\t\t [ngDocTooltip]=\"typeOf(value)\"\n\t\t\t\t\t\t\t positions=\"left-center\"\n\t\t\t\t\t\t\t ngDocTextLeft>\n\t\t\t</ng-doc-kind-icon>\n\t\t\t<div>{{value}}</div>\n\t\t\t<span ng-doc-text\n\t\t\t\t color=\"muted\"\n\t\t\t\t size=\"small\"\n\t\t\t\t *ngIf=\"value ===
|
|
49
|
-
}], ctorParameters: function () { return []; }
|
|
44
|
+
], template: "<ng-doc-combobox [ngModel]=\"model\"\n\t\t\t\t [readonly]=\"true\"\n\t\t\t\t [valueContent]=\"valueTemplate\"\n\t\t\t\t [clearButton]=\"false\"\n\t\t\t\t [rightContent]=\"rightContent\"\n\t\t\t\t (ngModelChange)=\"changeModel($event)\">\n\t<ng-doc-list *ngDocData>\n\t\t<ng-container *ngFor=\"let option of options\">\n\t\t\t<ng-container *ngIf=\"option | ngDocExtractValue as value\">\n\t\t\t\t<ng-doc-option [value]=\"value\">\n\t\t\t\t\t<ng-container *ngTemplateOutlet=\"valueTemplate; context: {$implicit: value}\"></ng-container>\n\t\t\t\t</ng-doc-option>\n\t\t\t</ng-container>\n\t\t</ng-container>\n\t</ng-doc-list>\n\t<ng-template let-value #valueTemplate>\n\t\t<div ng-doc-text>\n\t\t\t<ng-doc-kind-icon [kind]=\"typeOf(value)\"\n\t\t\t\t\t\t\t [type]=\"'type'\"\n\t\t\t\t\t\t\t [ngDocTooltip]=\"typeOf(value)\"\n\t\t\t\t\t\t\t positions=\"left-center\"\n\t\t\t\t\t\t\t ngDocTextLeft>\n\t\t\t</ng-doc-kind-icon>\n\t\t\t<div>{{value}}</div>\n\t\t\t<span ng-doc-text\n\t\t\t\t color=\"muted\"\n\t\t\t\t size=\"small\"\n\t\t\t\t *ngIf=\"value === default\" ngDocTextRight>[default]</span>\n\t\t</div>\n\t</ng-template>\n\t<ng-template #rightContent>\n\t\t<button\n\t\t\tng-doc-button-icon\n\t\t\tsize=\"large\"\n\t\t\t[ngDocFocusable]=\"false\"\n\t\t\t[disabled]=\"disabled\"\n\t\t\t[rounded]=\"false\"\n\t\t\t(click)=\"updateModel(default ?? null)\"\n\t\t\t(focusout)=\"onTouched()\"\n\t\t\t*ngIf=\"model && model !== default\"\n\t\t>\n\t\t\t<ng-doc-icon icon=\"x\"></ng-doc-icon>\n\t\t</button>\n\t</ng-template>\n</ng-doc-combobox>\n", styles: [":host{display:block;width:100%}\n"] }]
|
|
45
|
+
}], ctorParameters: function () { return []; }, propDecorators: { default: [{
|
|
46
|
+
type: Input
|
|
47
|
+
}] } });
|
|
50
48
|
|
|
51
49
|
/**
|
|
52
50
|
* Generated bundle index. Do not edit.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ng-doc-app-type-controls-type-alias-control.mjs","sources":["../../../../libs/app/type-controls/type-alias-control/type-alias-control.component.ts","../../../../libs/app/type-controls/type-alias-control/type-alias-control.component.html","../../../../libs/app/type-controls/type-alias-control/ng-doc-app-type-controls-type-alias-control.ts"],"sourcesContent":["import {NgFor, NgIf, NgTemplateOutlet} from '@angular/common';\nimport {ChangeDetectionStrategy, Component} from '@angular/core';\nimport {FormsModule} from '@angular/forms';\nimport {NgDocKindIconComponent} from '@ng-doc/app/components/kind-icon';\nimport {NgDocTypeControl} from '@ng-doc/app/interfaces';\nimport {NgDocExtractValuePipe} from '@ng-doc/app/pipes/extract-value';\nimport {
|
|
1
|
+
{"version":3,"file":"ng-doc-app-type-controls-type-alias-control.mjs","sources":["../../../../libs/app/type-controls/type-alias-control/type-alias-control.component.ts","../../../../libs/app/type-controls/type-alias-control/type-alias-control.component.html","../../../../libs/app/type-controls/type-alias-control/ng-doc-app-type-controls-type-alias-control.ts"],"sourcesContent":["import {NgFor, NgIf, NgTemplateOutlet} from '@angular/common';\nimport {ChangeDetectionStrategy, Component, Input} from '@angular/core';\nimport {FormsModule} from '@angular/forms';\nimport {NgDocKindIconComponent} from '@ng-doc/app/components/kind-icon';\nimport {NgDocTypeControl} from '@ng-doc/app/interfaces';\nimport {NgDocExtractValuePipe} from '@ng-doc/app/pipes/extract-value';\nimport {\n\tNgDocButtonIconComponent,\n\tNgDocComboboxComponent,\n\tNgDocDataDirective,\n\tNgDocFocusableDirective,\n\tNgDocIconComponent,\n\tNgDocListComponent,\n\tNgDocOptionComponent,\n\tNgDocTextComponent,\n\tNgDocTextLeftDirective,\n\tNgDocTextRightDirective,\n\tNgDocTooltipDirective,\n} from '@ng-doc/ui-kit';\nimport {FlControl} from 'flex-controls';\n\n@Component({\n\tselector: 'ng-doc-type-alias-control',\n\ttemplateUrl: './type-alias-control.component.html',\n\tstyleUrls: ['./type-alias-control.component.scss'],\n\tchangeDetection: ChangeDetectionStrategy.OnPush,\n\tstandalone: true,\n\timports: [\n\t\tNgDocComboboxComponent,\n\t\tFormsModule,\n\t\tNgDocDataDirective,\n\t\tNgDocListComponent,\n\t\tNgFor,\n\t\tNgIf,\n\t\tNgDocOptionComponent,\n\t\tNgTemplateOutlet,\n\t\tNgDocTextComponent,\n\t\tNgDocKindIconComponent,\n\t\tNgDocTextLeftDirective,\n\t\tNgDocTooltipDirective,\n\t\tNgDocTextRightDirective,\n\t\tNgDocButtonIconComponent,\n\t\tNgDocFocusableDirective,\n\t\tNgDocIconComponent,\n\t\tNgDocExtractValuePipe,\n\t],\n})\nexport class NgDocTypeAliasControlComponent<T> extends FlControl<T> implements NgDocTypeControl<T> {\n\t@Input()\n\tdefault?: T;\n\n\toptions?: string[];\n\n\tconstructor() {\n\t\tsuper();\n\t}\n\n\ttypeOf(value: unknown): string {\n\t\treturn typeof value;\n\t}\n\n\tchangeModel(value: T | null): void {\n\t\tthis.updateModel(value === null && this.default ? this.default : value);\n\t}\n}\n","<ng-doc-combobox [ngModel]=\"model\"\n\t\t\t\t [readonly]=\"true\"\n\t\t\t\t [valueContent]=\"valueTemplate\"\n\t\t\t\t [clearButton]=\"false\"\n\t\t\t\t [rightContent]=\"rightContent\"\n\t\t\t\t (ngModelChange)=\"changeModel($event)\">\n\t<ng-doc-list *ngDocData>\n\t\t<ng-container *ngFor=\"let option of options\">\n\t\t\t<ng-container *ngIf=\"option | ngDocExtractValue as value\">\n\t\t\t\t<ng-doc-option [value]=\"value\">\n\t\t\t\t\t<ng-container *ngTemplateOutlet=\"valueTemplate; context: {$implicit: value}\"></ng-container>\n\t\t\t\t</ng-doc-option>\n\t\t\t</ng-container>\n\t\t</ng-container>\n\t</ng-doc-list>\n\t<ng-template let-value #valueTemplate>\n\t\t<div ng-doc-text>\n\t\t\t<ng-doc-kind-icon [kind]=\"typeOf(value)\"\n\t\t\t\t\t\t\t [type]=\"'type'\"\n\t\t\t\t\t\t\t [ngDocTooltip]=\"typeOf(value)\"\n\t\t\t\t\t\t\t positions=\"left-center\"\n\t\t\t\t\t\t\t ngDocTextLeft>\n\t\t\t</ng-doc-kind-icon>\n\t\t\t<div>{{value}}</div>\n\t\t\t<span ng-doc-text\n\t\t\t\t color=\"muted\"\n\t\t\t\t size=\"small\"\n\t\t\t\t *ngIf=\"value === default\" ngDocTextRight>[default]</span>\n\t\t</div>\n\t</ng-template>\n\t<ng-template #rightContent>\n\t\t<button\n\t\t\tng-doc-button-icon\n\t\t\tsize=\"large\"\n\t\t\t[ngDocFocusable]=\"false\"\n\t\t\t[disabled]=\"disabled\"\n\t\t\t[rounded]=\"false\"\n\t\t\t(click)=\"updateModel(default ?? null)\"\n\t\t\t(focusout)=\"onTouched()\"\n\t\t\t*ngIf=\"model && model !== default\"\n\t\t>\n\t\t\t<ng-doc-icon icon=\"x\"></ng-doc-icon>\n\t\t</button>\n\t</ng-template>\n</ng-doc-combobox>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;AAqBA,MA0Ba,8BAAkC,SAAQ,SAAY,CAAA;AAMlE,IAAA,WAAA,GAAA;AACC,QAAA,KAAK,EAAE,CAAC;KACR;AAED,IAAA,MAAM,CAAC,KAAc,EAAA;QACpB,OAAO,OAAO,KAAK,CAAC;KACpB;AAED,IAAA,WAAW,CAAC,KAAe,EAAA;QAC1B,IAAI,CAAC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MAAA,EAAA,SAAA,CAAA,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAAA,uBAAuB,EACvB,QAAA,EAAA,kBAAA,EAAA,MAAA,EAAA,CAAA,gBAAA,CAAA,EAAA,QAAA,EAAA,CAAA,gBAAA,CAAA,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAAA,kBAAkB,6EAClB,qBAAqB,EAAA,IAAA,EAAA,mBAAA,EAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,CAAA,CAAA,EAAA;;2FAGV,8BAA8B,EAAA,UAAA,EAAA,CAAA;kBA1B1C,SAAS;AACC,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,2BAA2B,mBAGpB,uBAAuB,CAAC,MAAM,EAAA,UAAA,EACnC,IAAI,EACP,OAAA,EAAA;wBACR,sBAAsB;wBACtB,WAAW;wBACX,kBAAkB;wBAClB,kBAAkB;wBAClB,KAAK;wBACL,IAAI;wBACJ,oBAAoB;wBACpB,gBAAgB;wBAChB,kBAAkB;wBAClB,sBAAsB;wBACtB,sBAAsB;wBACtB,qBAAqB;wBACrB,uBAAuB;wBACvB,wBAAwB;wBACxB,uBAAuB;wBACvB,kBAAkB;wBAClB,qBAAqB;AACrB,qBAAA,EAAA,QAAA,EAAA,+gDAAA,EAAA,MAAA,EAAA,CAAA,mCAAA,CAAA,EAAA,CAAA;0EAID,OAAO,EAAA,CAAA;sBADN,KAAK;;;AEhDP;;AAEG;;;;"}
|
|
@@ -2,7 +2,7 @@ import { ControlValueAccessor } from '@angular/forms';
|
|
|
2
2
|
/**
|
|
3
3
|
* Interface describing Type Control
|
|
4
4
|
*/
|
|
5
|
-
export interface NgDocTypeControl extends ControlValueAccessor {
|
|
5
|
+
export interface NgDocTypeControl<T = unknown> extends ControlValueAccessor {
|
|
6
6
|
/**
|
|
7
7
|
* The name of the input for which it is created
|
|
8
8
|
*/
|
|
@@ -14,7 +14,7 @@ export interface NgDocTypeControl extends ControlValueAccessor {
|
|
|
14
14
|
/**
|
|
15
15
|
* The default value of the input
|
|
16
16
|
*/
|
|
17
|
-
default?:
|
|
17
|
+
default?: T;
|
|
18
18
|
/**
|
|
19
19
|
* The list of possible values, it usually works only for Type Aliases which has several values
|
|
20
20
|
*/
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ng-doc/app",
|
|
3
|
-
"version": "16.7.
|
|
3
|
+
"version": "16.7.2",
|
|
4
4
|
"peerDependencies": {
|
|
5
5
|
"@angular/common": ">=16.0.0",
|
|
6
6
|
"@angular/core": ">=16.0.0",
|
|
@@ -12,8 +12,8 @@
|
|
|
12
12
|
},
|
|
13
13
|
"dependencies": {
|
|
14
14
|
"tslib": "^2.3.0",
|
|
15
|
-
"@ng-doc/core": "16.7.
|
|
16
|
-
"@ng-doc/ui-kit": "16.7.
|
|
15
|
+
"@ng-doc/core": "16.7.2",
|
|
16
|
+
"@ng-doc/ui-kit": "16.7.2",
|
|
17
17
|
"@orama/plugin-match-highlight": "1.0.2",
|
|
18
18
|
"@orama/stemmers": "1.0.2",
|
|
19
19
|
"highlight.js": "11.5.1"
|
|
@@ -1,10 +1,13 @@
|
|
|
1
1
|
import { NgDocTypeControl } from '@ng-doc/app/interfaces';
|
|
2
2
|
import { FlControlHost } from 'flex-controls';
|
|
3
3
|
import * as i0 from "@angular/core";
|
|
4
|
-
export declare class NgDocBooleanControlComponent extends FlControlHost<
|
|
4
|
+
export declare class NgDocBooleanControlComponent extends FlControlHost<boolean | undefined> implements NgDocTypeControl<boolean | undefined> {
|
|
5
|
+
default?: boolean;
|
|
5
6
|
name: string;
|
|
6
7
|
description: string;
|
|
7
8
|
constructor();
|
|
9
|
+
get defaultValue(): boolean | undefined;
|
|
10
|
+
updateModel(obj: boolean | null | undefined): void;
|
|
8
11
|
static ɵfac: i0.ɵɵFactoryDeclaration<NgDocBooleanControlComponent, never>;
|
|
9
12
|
static ɵcmp: i0.ɵɵComponentDeclaration<NgDocBooleanControlComponent, "ng-doc-boolean-control", never, {}, {}, never, never, true, never>;
|
|
10
13
|
}
|
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
import { NgDocTypeControl } from '@ng-doc/app/interfaces';
|
|
2
2
|
import { FlControl } from 'flex-controls';
|
|
3
3
|
import * as i0 from "@angular/core";
|
|
4
|
-
export declare class NgDocNumberControlComponent extends FlControl<number> implements NgDocTypeControl {
|
|
5
|
-
default
|
|
4
|
+
export declare class NgDocNumberControlComponent extends FlControl<number> implements NgDocTypeControl<number> {
|
|
5
|
+
default?: number;
|
|
6
6
|
constructor();
|
|
7
|
-
get defaultValue(): number | null;
|
|
8
7
|
changeModel(value: number | null): void;
|
|
9
8
|
static ɵfac: i0.ɵɵFactoryDeclaration<NgDocNumberControlComponent, never>;
|
|
10
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<NgDocNumberControlComponent, "ng-doc-number-control", never, {}, {}, never, never, true, never>;
|
|
9
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<NgDocNumberControlComponent, "ng-doc-number-control", never, { "default": { "alias": "default"; "required": false; }; }, {}, never, never, true, never>;
|
|
11
10
|
}
|
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
import { NgDocTypeControl } from '@ng-doc/app/interfaces';
|
|
2
2
|
import { FlControl } from 'flex-controls';
|
|
3
3
|
import * as i0 from "@angular/core";
|
|
4
|
-
export declare class NgDocStringControlComponent extends FlControl<string> implements NgDocTypeControl {
|
|
4
|
+
export declare class NgDocStringControlComponent extends FlControl<string> implements NgDocTypeControl<string> {
|
|
5
5
|
default?: string;
|
|
6
6
|
constructor();
|
|
7
|
-
get defaultValue(): string | null;
|
|
8
7
|
changeModel(value: string | null): void;
|
|
9
8
|
writeValue(value: string | null): void;
|
|
10
9
|
static ɵfac: i0.ɵɵFactoryDeclaration<NgDocStringControlComponent, never>;
|
|
11
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<NgDocStringControlComponent, "ng-doc-string-control", never, {}, {}, never, never, true, never>;
|
|
10
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<NgDocStringControlComponent, "ng-doc-string-control", never, { "default": { "alias": "default"; "required": false; }; }, {}, never, never, true, never>;
|
|
12
11
|
}
|
|
@@ -1,13 +1,12 @@
|
|
|
1
1
|
import { NgDocTypeControl } from '@ng-doc/app/interfaces';
|
|
2
2
|
import { FlControl } from 'flex-controls';
|
|
3
3
|
import * as i0 from "@angular/core";
|
|
4
|
-
export declare class NgDocTypeAliasControlComponent<T> extends FlControl<T> implements NgDocTypeControl {
|
|
5
|
-
default?:
|
|
4
|
+
export declare class NgDocTypeAliasControlComponent<T> extends FlControl<T> implements NgDocTypeControl<T> {
|
|
5
|
+
default?: T;
|
|
6
6
|
options?: string[];
|
|
7
7
|
constructor();
|
|
8
|
-
get defaultValue(): T | null;
|
|
9
8
|
typeOf(value: unknown): string;
|
|
10
9
|
changeModel(value: T | null): void;
|
|
11
10
|
static ɵfac: i0.ɵɵFactoryDeclaration<NgDocTypeAliasControlComponent<any>, never>;
|
|
12
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<NgDocTypeAliasControlComponent<any>, "ng-doc-type-alias-control", never, {}, {}, never, never, true, never>;
|
|
11
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<NgDocTypeAliasControlComponent<any>, "ng-doc-type-alias-control", never, { "default": { "alias": "default"; "required": false; }; }, {}, never, never, true, never>;
|
|
13
12
|
}
|