@ng-doc/app 15.11.3 → 15.12.0
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/index.d.ts +1 -0
- package/components/playground/playground-properties/playground-properties.component.d.ts +12 -3
- package/components/playground/playground-property/playground-property.component.d.ts +6 -7
- package/components/playground/playground-property-control.d.ts +7 -0
- package/components/playground/playground.module.d.ts +1 -1
- package/esm2020/components/playground/index.mjs +2 -1
- package/esm2020/components/playground/playground-properties/playground-properties.component.mjs +76 -7
- package/esm2020/components/playground/playground-property/playground-property.component.mjs +21 -48
- package/esm2020/components/playground/playground-property-control.mjs +2 -0
- package/esm2020/components/playground/playground.module.mjs +10 -4
- package/esm2020/interfaces/type-control-provider-options.mjs +1 -1
- package/esm2020/type-controls/boolean-control/boolean-control.module.mjs +2 -2
- package/esm2020/type-controls/number-control/number-control.module.mjs +2 -2
- package/esm2020/type-controls/string-control/string-control.module.mjs +2 -2
- package/esm2020/type-controls/type-alias-control/type-alias-control.module.mjs +2 -2
- package/fesm2015/ng-doc-app-components-playground.mjs +111 -60
- package/fesm2015/ng-doc-app-components-playground.mjs.map +1 -1
- package/fesm2015/ng-doc-app-type-controls-boolean-control.mjs +1 -1
- package/fesm2015/ng-doc-app-type-controls-boolean-control.mjs.map +1 -1
- package/fesm2015/ng-doc-app-type-controls-number-control.mjs +1 -1
- package/fesm2015/ng-doc-app-type-controls-number-control.mjs.map +1 -1
- package/fesm2015/ng-doc-app-type-controls-string-control.mjs +1 -1
- package/fesm2015/ng-doc-app-type-controls-string-control.mjs.map +1 -1
- package/fesm2015/ng-doc-app-type-controls-type-alias-control.mjs +1 -1
- package/fesm2015/ng-doc-app-type-controls-type-alias-control.mjs.map +1 -1
- package/fesm2020/ng-doc-app-components-playground.mjs +109 -60
- package/fesm2020/ng-doc-app-components-playground.mjs.map +1 -1
- package/fesm2020/ng-doc-app-type-controls-boolean-control.mjs +1 -1
- package/fesm2020/ng-doc-app-type-controls-boolean-control.mjs.map +1 -1
- package/fesm2020/ng-doc-app-type-controls-number-control.mjs +1 -1
- package/fesm2020/ng-doc-app-type-controls-number-control.mjs.map +1 -1
- package/fesm2020/ng-doc-app-type-controls-string-control.mjs +1 -1
- package/fesm2020/ng-doc-app-type-controls-string-control.mjs.map +1 -1
- package/fesm2020/ng-doc-app-type-controls-type-alias-control.mjs +1 -1
- package/fesm2020/ng-doc-app-type-controls-type-alias-control.mjs.map +1 -1
- package/interfaces/type-control-provider-options.d.ts +5 -0
- package/package.json +3 -3
|
@@ -7,7 +7,7 @@ import { NgDocButtonIconModule, NgDocClearControlModule, NgDocFocusableModule, N
|
|
|
7
7
|
import { FlControlSilencerModule } from 'flex-controls';
|
|
8
8
|
import { NgDocStringControlComponent } from './string-control.component';
|
|
9
9
|
import * as i0 from "@angular/core";
|
|
10
|
-
const provider = provideTypeControl('string', NgDocStringControlComponent);
|
|
10
|
+
const provider = provideTypeControl('string', NgDocStringControlComponent, { order: 20 });
|
|
11
11
|
export class NgDocStringControlModule {
|
|
12
12
|
}
|
|
13
13
|
NgDocStringControlModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.4", ngImport: i0, type: NgDocStringControlModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
@@ -51,4 +51,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.4", ngImpor
|
|
|
51
51
|
exports: [NgDocStringControlComponent],
|
|
52
52
|
}]
|
|
53
53
|
}] });
|
|
54
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
54
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic3RyaW5nLWNvbnRyb2wubW9kdWxlLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vbGlicy9hcHAvdHlwZS1jb250cm9scy9zdHJpbmctY29udHJvbC9zdHJpbmctY29udHJv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Ht9XG4iXX0=
|
|
@@ -7,7 +7,7 @@ import { NgDocExtractValueModule } from '@ng-doc/app/pipes/extract-value';
|
|
|
7
7
|
import { NgDocButtonIconModule, NgDocComboboxModule, NgDocDataModule, NgDocFocusableModule, NgDocIconModule, NgDocListModule, NgDocOptionModule, NgDocTextModule, NgDocTooltipModule, } from '@ng-doc/ui-kit';
|
|
8
8
|
import { NgDocTypeAliasControlComponent } from './type-alias-control.component';
|
|
9
9
|
import * as i0 from "@angular/core";
|
|
10
|
-
const provider = provideTypeControl('NgDocTypeAlias', NgDocTypeAliasControlComponent);
|
|
10
|
+
const provider = provideTypeControl('NgDocTypeAlias', NgDocTypeAliasControlComponent, { order: 10 });
|
|
11
11
|
export class NgDocTypeAliasControlModule {
|
|
12
12
|
}
|
|
13
13
|
NgDocTypeAliasControlModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.4", ngImport: i0, type: NgDocTypeAliasControlModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
@@ -60,4 +60,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.4", ngImpor
|
|
|
60
60
|
exports: [NgDocTypeAliasControlComponent],
|
|
61
61
|
}]
|
|
62
62
|
}] });
|
|
63
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
63
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidHlwZS1hbGlhcy1jb250cm9sLm1vZHVsZS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uL2xpYnMvYXBwL3R5cGUtY29udHJvbHMvdHlwZS1hbGlhcy1jb250cm9sL3R5cGUtYWxpYXMtY29udHJvbC5tb2R1bGUudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxFQUFDLFlBQVksRUFBQyxNQUFNLGlCQUFpQixDQUFDO0FBQzdDLE9BQ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dG9uSWNvbk1vZHVsZSxcblx0XHROZ0RvY0ZvY3VzYWJsZU1vZHVsZSxcblx0XHROZ0RvY0ljb25Nb2R1bGUsXG5cdF0sXG5cdHByb3ZpZGVyczogW3Byb3ZpZGVyXSxcblx0ZXhwb3J0czogW05nRG9jVHlwZUFsaWFzQ29udHJvbENvbXBvbmVudF0sXG59KVxuZXhwb3J0IGNsYXNzIE5nRG9jVHlwZUFsaWFzQ29udHJvbE1vZHVsZSB7fVxuIl19
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { Directive,
|
|
3
|
-
import {
|
|
4
|
-
import { objectKeys } from '@ng-doc/core/helpers/object-keys';
|
|
2
|
+
import { Directive, ViewContainerRef, Component, ChangeDetectionStrategy, Input, ViewChild, HostBinding, EventEmitter, isDevMode, Output, ChangeDetectorRef, Injector, NgModule } from '@angular/core';
|
|
3
|
+
import { extractValue } from '@ng-doc/core/helpers/extract-value';
|
|
4
|
+
import { objectKeys as objectKeys$1 } from '@ng-doc/core/helpers/object-keys';
|
|
5
5
|
import * as i1$1 from '@ng-doc/app/classes/root-page';
|
|
6
6
|
import { NgDocRootPage } from '@ng-doc/app/classes/root-page';
|
|
7
7
|
import * as i3 from '@angular/forms';
|
|
@@ -10,10 +10,11 @@ import * as i2 from '@angular/common';
|
|
|
10
10
|
import { CommonModule } from '@angular/common';
|
|
11
11
|
import * as i1 from '@angular/cdk/layout';
|
|
12
12
|
import { Breakpoints } from '@angular/cdk/layout';
|
|
13
|
+
import { isPlaygroundProperty, getTokenForType, getPlaygroundDemoToken } from '@ng-doc/app/helpers';
|
|
14
|
+
import { objectKeys, isPresent, extractValueOrThrow } from '@ng-doc/core';
|
|
13
15
|
import { pluck, takeUntil } from 'rxjs/operators';
|
|
14
16
|
import * as i4 from '@ng-doc/ui-kit';
|
|
15
|
-
import { NgDocLabelModule, NgDocTooltipModule, NgDocAsArrayModule, NgDocButtonIconModule, NgDocIconModule, NgDocTextModule, NgDocCheckboxModule, NgDocButtonModule } from '@ng-doc/ui-kit';
|
|
16
|
-
import { isPlaygroundProperty, getTokenForType, getPlaygroundDemoToken } from '@ng-doc/app/helpers';
|
|
17
|
+
import { NgDocLabelModule, NgDocTooltipModule, NgDocAsArrayModule, NgDocButtonIconModule, NgDocIconModule, NgDocTextModule, NgDocCheckboxModule, NgDocButtonModule, NgDocBindModule, NgDocRunModule } from '@ng-doc/ui-kit';
|
|
17
18
|
import { __decorate, __metadata } from 'tslib';
|
|
18
19
|
import { buildPlaygroundDemoTemplate } from '@ng-doc/core/helpers/build-playground-demo-template';
|
|
19
20
|
import { formatHtml } from '@ng-doc/core/helpers/format-html';
|
|
@@ -44,67 +45,41 @@ class NgDocPlaygroundPropertyComponent {
|
|
|
44
45
|
this.injector = injector;
|
|
45
46
|
this.name = '';
|
|
46
47
|
}
|
|
47
|
-
ngOnChanges({ property, control }) {
|
|
48
|
-
var _a, _b, _c, _d, _e
|
|
49
|
-
if (property && this.property) {
|
|
50
|
-
(_a = this.
|
|
51
|
-
this.
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
this.
|
|
56
|
-
this.
|
|
57
|
-
this.propertyControl.instance.description = this.tooltipContent;
|
|
58
|
-
this.propertyControl.instance.options = isPlaygroundProperty(this.property)
|
|
48
|
+
ngOnChanges({ property, control, typeControl }) {
|
|
49
|
+
var _a, _b, _c, _d, _e;
|
|
50
|
+
if ((property || control || typeControl) && this.property && this.typeControl) {
|
|
51
|
+
(_a = this.propertyTypeControl) === null || _a === void 0 ? void 0 : _a.destroy();
|
|
52
|
+
this.propertyTypeControl = undefined;
|
|
53
|
+
if (this.typeControl && this.propertyOutlet) {
|
|
54
|
+
this.propertyTypeControl = this.propertyOutlet.createComponent(this.typeControl.control);
|
|
55
|
+
this.propertyTypeControl.instance.name = this.name;
|
|
56
|
+
this.propertyTypeControl.instance.description = this.tooltipContent;
|
|
57
|
+
this.propertyTypeControl.instance.options = isPlaygroundProperty(this.property)
|
|
59
58
|
? this.property.options
|
|
60
59
|
: undefined;
|
|
61
|
-
this.
|
|
60
|
+
this.propertyTypeControl.instance.default = isPlaygroundProperty(this.property)
|
|
62
61
|
? this.property.default
|
|
63
62
|
: undefined;
|
|
64
|
-
this.
|
|
65
|
-
this.option = typeControl.options;
|
|
66
|
-
}
|
|
67
|
-
else if (isDevMode()) {
|
|
68
|
-
console.warn(`NgDocPlayground didn't find the control for the @Input "${this.name}", the type "${type}" was not recognized'`);
|
|
63
|
+
this.propertyTypeControl.instance.writeValue((_b = this.control) === null || _b === void 0 ? void 0 : _b.value);
|
|
64
|
+
this.option = this.typeControl.options;
|
|
69
65
|
}
|
|
70
66
|
}
|
|
71
67
|
if (control) {
|
|
72
|
-
(
|
|
73
|
-
(
|
|
74
|
-
(
|
|
68
|
+
(_c = this.control) === null || _c === void 0 ? void 0 : _c.registerOnChange((value) => { var _a, _b; return (_b = (_a = this.propertyTypeControl) === null || _a === void 0 ? void 0 : _a.instance) === null || _b === void 0 ? void 0 : _b.writeValue(value); });
|
|
69
|
+
(_d = this.propertyTypeControl) === null || _d === void 0 ? void 0 : _d.instance.registerOnChange((value) => { var _a; return (_a = this.control) === null || _a === void 0 ? void 0 : _a.setValue(value); });
|
|
70
|
+
(_e = this.propertyTypeControl) === null || _e === void 0 ? void 0 : _e.instance.registerOnTouched(() => { var _a; return (_a = this.control) === null || _a === void 0 ? void 0 : _a.markAsTouched(); });
|
|
75
71
|
}
|
|
76
72
|
}
|
|
77
73
|
get hasPropertyControl() {
|
|
78
|
-
return !!this.
|
|
74
|
+
return !!this.propertyTypeControl;
|
|
79
75
|
}
|
|
80
76
|
get tooltipContent() {
|
|
81
77
|
var _a;
|
|
82
78
|
return this.property && isPlaygroundProperty(this.property) ? (_a = this.property.description) !== null && _a !== void 0 ? _a : '' : '';
|
|
83
79
|
}
|
|
84
|
-
getControlForType(type) {
|
|
85
|
-
const token = getTokenForType(type);
|
|
86
|
-
return token ? this.injector.get(token) : undefined;
|
|
87
|
-
}
|
|
88
|
-
getControlForTypeAlias(options) {
|
|
89
|
-
if (options && options.length) {
|
|
90
|
-
let optionsIsValid = true;
|
|
91
|
-
try {
|
|
92
|
-
// checking that all values are extractable
|
|
93
|
-
options.forEach((item) => extractValueOrThrow(item));
|
|
94
|
-
}
|
|
95
|
-
catch (_a) {
|
|
96
|
-
optionsIsValid = false;
|
|
97
|
-
}
|
|
98
|
-
if (optionsIsValid) {
|
|
99
|
-
const token = getTokenForType('NgDocTypeAlias');
|
|
100
|
-
return token ? this.injector.get(token) : undefined;
|
|
101
|
-
}
|
|
102
|
-
}
|
|
103
|
-
return undefined;
|
|
104
|
-
}
|
|
105
80
|
}
|
|
106
81
|
NgDocPlaygroundPropertyComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.4", ngImport: i0, type: NgDocPlaygroundPropertyComponent, deps: [{ token: i0.Injector }], target: i0.ɵɵFactoryTarget.Component });
|
|
107
|
-
NgDocPlaygroundPropertyComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.4", type: NgDocPlaygroundPropertyComponent, selector: "ng-doc-playground-property", inputs: { name: "name", property: "property", control: "control" }, host: { properties: { "attr.data-has-property-control": "this.hasPropertyControl" } }, viewQueries: [{ propertyName: "propertyOutlet", first: true, predicate: ["propertyOutlet"], descendants: true, read: ViewContainerRef, static: true }], usesOnChanges: true, ngImport: i0, template: "<label [ng-doc-label]=\"option?.hideLabel ? '' : labelContent\">\n\t<ng-template #labelContent>\n\t\t<span [ngDocTooltip]=\"tooltipContent\" [canOpen]=\"!!tooltipContent\"\n\t\t\t [positions]=\"['left-center', 'top-right', 'bottom-right']\">{{name}}</span>\n\t</ng-template>\n\t<ng-container #propertyOutlet></ng-container>\n</label>\n", styles: [":host{display:block}:host[data-has-property-control=false]{display:none}\n"], dependencies: [{ kind: "component", type: i4.NgDocLabelComponent, selector: "label[ng-doc-label]", inputs: ["ng-doc-label", "align"] }, { kind: "directive", type: i4.NgDocTooltipDirective, selector: "[ngDocTooltip]", inputs: ["ngDocTooltip", "delay", "displayOrigin", "pointerOrigin", "positions", "canOpen", "panelClass", "minHeight", "maxHeight", "height", "minWidth", "maxWidth", "width"], outputs: ["beforeOpen", "afterOpen", "beforeClose", "afterClose"], exportAs: ["ngDocTooltip"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
82
|
+
NgDocPlaygroundPropertyComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.4", type: NgDocPlaygroundPropertyComponent, selector: "ng-doc-playground-property", inputs: { name: "name", property: "property", typeControl: "typeControl", control: "control" }, host: { properties: { "attr.data-has-property-control": "this.hasPropertyControl" } }, viewQueries: [{ propertyName: "propertyOutlet", first: true, predicate: ["propertyOutlet"], descendants: true, read: ViewContainerRef, static: true }], usesOnChanges: true, ngImport: i0, template: "<label [ng-doc-label]=\"option?.hideLabel ? '' : labelContent\">\n\t<ng-template #labelContent>\n\t\t<span [ngDocTooltip]=\"tooltipContent\" [canOpen]=\"!!tooltipContent\"\n\t\t\t [positions]=\"['left-center', 'top-right', 'bottom-right']\">{{name}}</span>\n\t</ng-template>\n\t<ng-container #propertyOutlet></ng-container>\n</label>\n", styles: [":host{display:block}:host[data-has-property-control=false]{display:none}\n"], dependencies: [{ kind: "component", type: i4.NgDocLabelComponent, selector: "label[ng-doc-label]", inputs: ["ng-doc-label", "align"] }, { kind: "directive", type: i4.NgDocTooltipDirective, selector: "[ngDocTooltip]", inputs: ["ngDocTooltip", "delay", "displayOrigin", "pointerOrigin", "positions", "canOpen", "panelClass", "minHeight", "maxHeight", "height", "minWidth", "maxWidth", "width"], outputs: ["beforeOpen", "afterOpen", "beforeClose", "afterClose"], exportAs: ["ngDocTooltip"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
108
83
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.4", ngImport: i0, type: NgDocPlaygroundPropertyComponent, decorators: [{
|
|
109
84
|
type: Component,
|
|
110
85
|
args: [{ selector: 'ng-doc-playground-property', changeDetection: ChangeDetectionStrategy.OnPush, template: "<label [ng-doc-label]=\"option?.hideLabel ? '' : labelContent\">\n\t<ng-template #labelContent>\n\t\t<span [ngDocTooltip]=\"tooltipContent\" [canOpen]=\"!!tooltipContent\"\n\t\t\t [positions]=\"['left-center', 'top-right', 'bottom-right']\">{{name}}</span>\n\t</ng-template>\n\t<ng-container #propertyOutlet></ng-container>\n</label>\n", styles: [":host{display:block}:host[data-has-property-control=false]{display:none}\n"] }]
|
|
@@ -112,6 +87,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.4", ngImpor
|
|
|
112
87
|
type: Input
|
|
113
88
|
}], property: [{
|
|
114
89
|
type: Input
|
|
90
|
+
}], typeControl: [{
|
|
91
|
+
type: Input
|
|
115
92
|
}], control: [{
|
|
116
93
|
type: Input
|
|
117
94
|
}], propertyOutlet: [{
|
|
@@ -123,25 +100,93 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.4", ngImpor
|
|
|
123
100
|
}] } });
|
|
124
101
|
|
|
125
102
|
class NgDocPlaygroundPropertiesComponent {
|
|
126
|
-
constructor(breakpointObserver) {
|
|
103
|
+
constructor(breakpointObserver, injector) {
|
|
127
104
|
this.breakpointObserver = breakpointObserver;
|
|
105
|
+
this.injector = injector;
|
|
128
106
|
this.recreateDemo = false;
|
|
129
107
|
this.recreateDemoChange = new EventEmitter();
|
|
130
108
|
this.resetForm = new EventEmitter();
|
|
131
109
|
this.breakpoints = [Breakpoints.XSmall];
|
|
110
|
+
this.propertyControls = [];
|
|
111
|
+
this.contentTypeControl = this.getControlForType('boolean');
|
|
132
112
|
this.observer = this.breakpointObserver.observe(this.breakpoints).pipe(pluck('matches'));
|
|
133
113
|
}
|
|
114
|
+
ngOnChanges({ properties }) {
|
|
115
|
+
if (properties && this.properties) {
|
|
116
|
+
this.propertyControls = objectKeys(this.properties)
|
|
117
|
+
.map((key) => {
|
|
118
|
+
if (this.properties) {
|
|
119
|
+
const property = this.properties[key];
|
|
120
|
+
const typeControl = this.getTypeControl(property);
|
|
121
|
+
if (typeControl) {
|
|
122
|
+
return {
|
|
123
|
+
propertyName: String(key),
|
|
124
|
+
property,
|
|
125
|
+
typeControl,
|
|
126
|
+
};
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
return null;
|
|
130
|
+
})
|
|
131
|
+
.filter(isPresent)
|
|
132
|
+
.sort((a, b) => {
|
|
133
|
+
var _a, _b;
|
|
134
|
+
const aOrder = (_a = a.typeControl.options) === null || _a === void 0 ? void 0 : _a.order;
|
|
135
|
+
const bOrder = (_b = b.typeControl.options) === null || _b === void 0 ? void 0 : _b.order;
|
|
136
|
+
if (isPresent(aOrder) && isPresent(bOrder)) {
|
|
137
|
+
return aOrder - bOrder;
|
|
138
|
+
}
|
|
139
|
+
if (isPresent(aOrder)) {
|
|
140
|
+
return -1;
|
|
141
|
+
}
|
|
142
|
+
if (isPresent(bOrder)) {
|
|
143
|
+
return 1;
|
|
144
|
+
}
|
|
145
|
+
return a.property.name.localeCompare(b.property.name);
|
|
146
|
+
});
|
|
147
|
+
}
|
|
148
|
+
}
|
|
134
149
|
getFormControl(controlType, key) {
|
|
135
150
|
var _a;
|
|
136
151
|
return (_a = this.form.get(controlType)) === null || _a === void 0 ? void 0 : _a.get(key);
|
|
137
152
|
}
|
|
153
|
+
getTypeControl(property) {
|
|
154
|
+
var _a;
|
|
155
|
+
const type = property.type;
|
|
156
|
+
const typeControl = (_a = this.getControlForType(type)) !== null && _a !== void 0 ? _a : this.getControlForTypeAlias(isPlaygroundProperty(property) ? property.options : undefined);
|
|
157
|
+
if (!typeControl && isDevMode()) {
|
|
158
|
+
console.warn(`NgDocPlayground didn't find the control for the @Input "${property.name}", the type "${type}" was not recognized'`);
|
|
159
|
+
}
|
|
160
|
+
return typeControl;
|
|
161
|
+
}
|
|
162
|
+
getControlForType(type) {
|
|
163
|
+
const token = getTokenForType(type);
|
|
164
|
+
return token ? this.injector.get(token) : undefined;
|
|
165
|
+
}
|
|
166
|
+
getControlForTypeAlias(options) {
|
|
167
|
+
if (options && options.length) {
|
|
168
|
+
let optionsIsValid = true;
|
|
169
|
+
try {
|
|
170
|
+
// checking that all values are extractable
|
|
171
|
+
options.forEach((item) => extractValueOrThrow(item));
|
|
172
|
+
}
|
|
173
|
+
catch (_a) {
|
|
174
|
+
optionsIsValid = false;
|
|
175
|
+
}
|
|
176
|
+
if (optionsIsValid) {
|
|
177
|
+
const token = getTokenForType('NgDocTypeAlias');
|
|
178
|
+
return token ? this.injector.get(token) : undefined;
|
|
179
|
+
}
|
|
180
|
+
}
|
|
181
|
+
return undefined;
|
|
182
|
+
}
|
|
138
183
|
}
|
|
139
|
-
NgDocPlaygroundPropertiesComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.4", ngImport: i0, type: NgDocPlaygroundPropertiesComponent, deps: [{ token: i1.BreakpointObserver }], target: i0.ɵɵFactoryTarget.Component });
|
|
140
|
-
NgDocPlaygroundPropertiesComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.4", type: NgDocPlaygroundPropertiesComponent, selector: "ng-doc-playground-properties", inputs: { form: "form", properties: "properties", dynamicContent: "dynamicContent", recreateDemo: "recreateDemo" }, outputs: { recreateDemoChange: "recreateDemoChange", resetForm: "resetForm" }, ngImport: i0, template: "<div class=\"ng-doc-playground-properties-wrapper\" [class.vertical]=\"observer | async\">\n\t<div class=\"ng-doc-playground-demos\">\n\t\t<ng-content></ng-content>\n\t</div>\n\t<div class=\"ng-doc-playground-properties\">\n\t\t<div class=\"ng-doc-playground-header\">\n\t\t\t<h4 ng-doc-text>Playground</h4>\n\t\t\t<button ng-doc-button color=\"red\" (click)=\"resetForm.emit()\">Reset</button>\n\t\t</div>\n\t\t<div class=\"ng-doc-playground-setting\">\n\t\t\t<ng-doc-checkbox [(ngModel)]=\"recreateDemo\" (ngModelChange)=\"recreateDemoChange.emit($event)\">\n\t\t\t\t<span\n\t\t\t\t\tng-doc-text\n\t\t\t\t\t[ngDocTooltip]=\"'Recreates demo everytime\\none of the input has changed'\"\n\t\t\t\t\t[positions]=\"['bottom-right', 'left-center']\"\n\t\t\t\t>\n\t\t\t\t\tRecreate\n\t\t\t\t\t<ng-doc-icon icon=\"info\" ngDocTextRight></ng-doc-icon>\n\t\t\t\t</span>\n\t\t\t</ng-doc-checkbox>\n\t\t</div>\n\t\t<div class=\"ng-doc-playground-divider\"></div>\n\t\t<ng-container *ngIf=\"
|
|
184
|
+
NgDocPlaygroundPropertiesComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.4", ngImport: i0, type: NgDocPlaygroundPropertiesComponent, deps: [{ token: i1.BreakpointObserver }, { token: i0.Injector }], target: i0.ɵɵFactoryTarget.Component });
|
|
185
|
+
NgDocPlaygroundPropertiesComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.4", type: NgDocPlaygroundPropertiesComponent, selector: "ng-doc-playground-properties", inputs: { form: "form", properties: "properties", dynamicContent: "dynamicContent", recreateDemo: "recreateDemo" }, outputs: { recreateDemoChange: "recreateDemoChange", resetForm: "resetForm" }, usesOnChanges: true, ngImport: i0, template: "<div class=\"ng-doc-playground-properties-wrapper\" [class.vertical]=\"observer | async\">\n\t<div class=\"ng-doc-playground-demos\">\n\t\t<ng-content></ng-content>\n\t</div>\n\t<div class=\"ng-doc-playground-properties\">\n\t\t<div class=\"ng-doc-playground-header\">\n\t\t\t<h4 ng-doc-text>Playground</h4>\n\t\t\t<button ng-doc-button color=\"red\" (click)=\"resetForm.emit()\">Reset</button>\n\t\t</div>\n\t\t<div class=\"ng-doc-playground-setting\">\n\t\t\t<ng-doc-checkbox [(ngModel)]=\"recreateDemo\" (ngModelChange)=\"recreateDemoChange.emit($event)\">\n\t\t\t\t<span\n\t\t\t\t\tng-doc-text\n\t\t\t\t\t[ngDocTooltip]=\"'Recreates demo everytime\\none of the input has changed'\"\n\t\t\t\t\t[positions]=\"['bottom-right', 'left-center']\"\n\t\t\t\t>\n\t\t\t\t\tRecreate\n\t\t\t\t\t<ng-doc-icon icon=\"info\" ngDocTextRight></ng-doc-icon>\n\t\t\t\t</span>\n\t\t\t</ng-doc-checkbox>\n\t\t</div>\n\t\t<div class=\"ng-doc-playground-divider\"></div>\n\t\t<ng-container *ngIf=\"propertyControls.length\">\n\t\t\t<h5 class=\"ng-doc-title\" ng-doc-text>Settings</h5>\n\t\t\t<ng-doc-playground-property\n\t\t\t\t*ngFor=\"let propertyControl of propertyControls\"\n\t\t\t\t[name]=\"propertyControl.property.name\"\n\t\t\t\t[property]=\"propertyControl.property\"\n\t\t\t\t[typeControl]=\"propertyControl.typeControl\"\n\t\t\t\t[control]=\"getFormControl | ngDocBind: this | ngDocRun: 'properties': propertyControl.propertyName\"\n\t\t\t>\n\t\t\t</ng-doc-playground-property>\n\t\t</ng-container>\n\n\t\t<ng-container *ngIf=\"(dynamicContent | keyvalue)?.length\">\n\t\t\t<h5 class=\"ng-doc-title\" ng-doc-text>Content</h5>\n\t\t\t<ng-doc-playground-property\n\t\t\t\t*ngFor=\"let content of dynamicContent | keyvalue\"\n\t\t\t\t[name]=\"content.value.label\"\n\t\t\t\t[property]=\"content.value\"\n\t\t\t\t[typeControl]=\"contentTypeControl\"\n\t\t\t\t[control]=\"getFormControl | ngDocBind: this | ngDocRun: 'content': content.key\"\n\t\t\t>\n\t\t\t</ng-doc-playground-property>\n\t\t</ng-container>\n\t</div>\n</div>\n", styles: [":host .ng-doc-playground-properties-wrapper{position:relative;display:flex}:host .ng-doc-playground-properties-wrapper.vertical{flex-direction:column}:host .ng-doc-playground-properties-wrapper.vertical .ng-doc-playground-demos{margin-right:0;margin-bottom:calc(var(--ng-doc-base-gutter) * 2)}:host .ng-doc-playground-properties-wrapper.vertical .ng-doc-playground-properties{width:100%}:host .ng-doc-playground-properties-wrapper .ng-doc-playground-demos{display:flex;flex-direction:column;width:100%;overflow:hidden;margin-right:calc(var(--ng-doc-base-gutter) * 2)}:host .ng-doc-playground-properties-wrapper .ng-doc-playground-properties{flex-shrink:0;width:300px;padding:calc(var(--ng-doc-base-gutter) * 2) calc(var(--ng-doc-base-gutter) * 3);background-color:var(--ng-doc-base-1);border-radius:var(--ng-doc-base-gutter)}:host .ng-doc-playground-properties-wrapper .ng-doc-playground-properties ng-doc-playground-property:not(:last-child){margin-bottom:calc(var(--ng-doc-base-gutter) * 2)}:host .ng-doc-playground-properties-wrapper .ng-doc-playground-properties .ng-doc-playground-controls{display:flex;justify-content:flex-end}:host .ng-doc-playground-properties-wrapper .ng-doc-playground-properties .ng-doc-playground-header{display:flex;align-items:center;justify-content:space-between;height:40px;margin-bottom:calc(var(--ng-doc-base-gutter) * 2)}:host .ng-doc-playground-properties-wrapper .ng-doc-playground-properties .ng-doc-playground-header h4{margin:0}:host .ng-doc-playground-properties-wrapper .ng-doc-playground-properties .ng-doc-playground-setting{display:flex;flex-direction:column}:host .ng-doc-playground-properties-wrapper .ng-doc-title{margin-top:0;margin-bottom:calc(var(--ng-doc-base-gutter) + var(--ng-doc-base-gutter) / 2)}:host .ng-doc-playground-divider{margin:calc(var(--ng-doc-base-gutter) * 2) 0;height:1px;background-color:var(--ng-doc-base-2)}\n"], dependencies: [{ kind: "directive", type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i4.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: "component", type: i4.NgDocIconComponent, selector: "ng-doc-icon", inputs: ["icon", "size"] }, { kind: "component", type: i4.NgDocTextComponent, selector: "[ng-doc-text]", inputs: ["size", "color", "align", "absoluteContent"] }, { kind: "directive", type: i4.NgDocTextRightDirective, selector: "[ngDocTextRight]" }, { kind: "component", type: i4.NgDocCheckboxComponent, selector: "ng-doc-checkbox", inputs: ["color"] }, { kind: "directive", type: i3.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i4.NgDocButtonComponent, selector: "button[ng-doc-button], a[ng-doc-button], button[ng-doc-button-flat], a[ng-doc-button-flat], button[ng-doc-button-text], a[ng-doc-button-text]", inputs: ["size", "color", "rounded"] }, { kind: "component", type: NgDocPlaygroundPropertyComponent, selector: "ng-doc-playground-property", inputs: ["name", "property", "typeControl", "control"] }, { kind: "pipe", type: i2.AsyncPipe, name: "async" }, { kind: "pipe", type: i2.KeyValuePipe, name: "keyvalue" }, { kind: "pipe", type: i4.NgDocBindPipe, name: "ngDocBind" }, { kind: "pipe", type: i4.NgDocRunPipe, name: "ngDocRun" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
141
186
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.4", ngImport: i0, type: NgDocPlaygroundPropertiesComponent, decorators: [{
|
|
142
187
|
type: Component,
|
|
143
|
-
args: [{ selector: 'ng-doc-playground-properties', changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"ng-doc-playground-properties-wrapper\" [class.vertical]=\"observer | async\">\n\t<div class=\"ng-doc-playground-demos\">\n\t\t<ng-content></ng-content>\n\t</div>\n\t<div class=\"ng-doc-playground-properties\">\n\t\t<div class=\"ng-doc-playground-header\">\n\t\t\t<h4 ng-doc-text>Playground</h4>\n\t\t\t<button ng-doc-button color=\"red\" (click)=\"resetForm.emit()\">Reset</button>\n\t\t</div>\n\t\t<div class=\"ng-doc-playground-setting\">\n\t\t\t<ng-doc-checkbox [(ngModel)]=\"recreateDemo\" (ngModelChange)=\"recreateDemoChange.emit($event)\">\n\t\t\t\t<span\n\t\t\t\t\tng-doc-text\n\t\t\t\t\t[ngDocTooltip]=\"'Recreates demo everytime\\none of the input has changed'\"\n\t\t\t\t\t[positions]=\"['bottom-right', 'left-center']\"\n\t\t\t\t>\n\t\t\t\t\tRecreate\n\t\t\t\t\t<ng-doc-icon icon=\"info\" ngDocTextRight></ng-doc-icon>\n\t\t\t\t</span>\n\t\t\t</ng-doc-checkbox>\n\t\t</div>\n\t\t<div class=\"ng-doc-playground-divider\"></div>\n\t\t<ng-container *ngIf=\"
|
|
144
|
-
}], ctorParameters: function () { return [{ type: i1.BreakpointObserver }]; }, propDecorators: { form: [{
|
|
188
|
+
args: [{ selector: 'ng-doc-playground-properties', changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"ng-doc-playground-properties-wrapper\" [class.vertical]=\"observer | async\">\n\t<div class=\"ng-doc-playground-demos\">\n\t\t<ng-content></ng-content>\n\t</div>\n\t<div class=\"ng-doc-playground-properties\">\n\t\t<div class=\"ng-doc-playground-header\">\n\t\t\t<h4 ng-doc-text>Playground</h4>\n\t\t\t<button ng-doc-button color=\"red\" (click)=\"resetForm.emit()\">Reset</button>\n\t\t</div>\n\t\t<div class=\"ng-doc-playground-setting\">\n\t\t\t<ng-doc-checkbox [(ngModel)]=\"recreateDemo\" (ngModelChange)=\"recreateDemoChange.emit($event)\">\n\t\t\t\t<span\n\t\t\t\t\tng-doc-text\n\t\t\t\t\t[ngDocTooltip]=\"'Recreates demo everytime\\none of the input has changed'\"\n\t\t\t\t\t[positions]=\"['bottom-right', 'left-center']\"\n\t\t\t\t>\n\t\t\t\t\tRecreate\n\t\t\t\t\t<ng-doc-icon icon=\"info\" ngDocTextRight></ng-doc-icon>\n\t\t\t\t</span>\n\t\t\t</ng-doc-checkbox>\n\t\t</div>\n\t\t<div class=\"ng-doc-playground-divider\"></div>\n\t\t<ng-container *ngIf=\"propertyControls.length\">\n\t\t\t<h5 class=\"ng-doc-title\" ng-doc-text>Settings</h5>\n\t\t\t<ng-doc-playground-property\n\t\t\t\t*ngFor=\"let propertyControl of propertyControls\"\n\t\t\t\t[name]=\"propertyControl.property.name\"\n\t\t\t\t[property]=\"propertyControl.property\"\n\t\t\t\t[typeControl]=\"propertyControl.typeControl\"\n\t\t\t\t[control]=\"getFormControl | ngDocBind: this | ngDocRun: 'properties': propertyControl.propertyName\"\n\t\t\t>\n\t\t\t</ng-doc-playground-property>\n\t\t</ng-container>\n\n\t\t<ng-container *ngIf=\"(dynamicContent | keyvalue)?.length\">\n\t\t\t<h5 class=\"ng-doc-title\" ng-doc-text>Content</h5>\n\t\t\t<ng-doc-playground-property\n\t\t\t\t*ngFor=\"let content of dynamicContent | keyvalue\"\n\t\t\t\t[name]=\"content.value.label\"\n\t\t\t\t[property]=\"content.value\"\n\t\t\t\t[typeControl]=\"contentTypeControl\"\n\t\t\t\t[control]=\"getFormControl | ngDocBind: this | ngDocRun: 'content': content.key\"\n\t\t\t>\n\t\t\t</ng-doc-playground-property>\n\t\t</ng-container>\n\t</div>\n</div>\n", styles: [":host .ng-doc-playground-properties-wrapper{position:relative;display:flex}:host .ng-doc-playground-properties-wrapper.vertical{flex-direction:column}:host .ng-doc-playground-properties-wrapper.vertical .ng-doc-playground-demos{margin-right:0;margin-bottom:calc(var(--ng-doc-base-gutter) * 2)}:host .ng-doc-playground-properties-wrapper.vertical .ng-doc-playground-properties{width:100%}:host .ng-doc-playground-properties-wrapper .ng-doc-playground-demos{display:flex;flex-direction:column;width:100%;overflow:hidden;margin-right:calc(var(--ng-doc-base-gutter) * 2)}:host .ng-doc-playground-properties-wrapper .ng-doc-playground-properties{flex-shrink:0;width:300px;padding:calc(var(--ng-doc-base-gutter) * 2) calc(var(--ng-doc-base-gutter) * 3);background-color:var(--ng-doc-base-1);border-radius:var(--ng-doc-base-gutter)}:host .ng-doc-playground-properties-wrapper .ng-doc-playground-properties ng-doc-playground-property:not(:last-child){margin-bottom:calc(var(--ng-doc-base-gutter) * 2)}:host .ng-doc-playground-properties-wrapper .ng-doc-playground-properties .ng-doc-playground-controls{display:flex;justify-content:flex-end}:host .ng-doc-playground-properties-wrapper .ng-doc-playground-properties .ng-doc-playground-header{display:flex;align-items:center;justify-content:space-between;height:40px;margin-bottom:calc(var(--ng-doc-base-gutter) * 2)}:host .ng-doc-playground-properties-wrapper .ng-doc-playground-properties .ng-doc-playground-header h4{margin:0}:host .ng-doc-playground-properties-wrapper .ng-doc-playground-properties .ng-doc-playground-setting{display:flex;flex-direction:column}:host .ng-doc-playground-properties-wrapper .ng-doc-title{margin-top:0;margin-bottom:calc(var(--ng-doc-base-gutter) + var(--ng-doc-base-gutter) / 2)}:host .ng-doc-playground-divider{margin:calc(var(--ng-doc-base-gutter) * 2) 0;height:1px;background-color:var(--ng-doc-base-2)}\n"] }]
|
|
189
|
+
}], ctorParameters: function () { return [{ type: i1.BreakpointObserver }, { type: i0.Injector }]; }, propDecorators: { form: [{
|
|
145
190
|
type: Input
|
|
146
191
|
}], properties: [{
|
|
147
192
|
type: Input
|
|
@@ -208,7 +253,7 @@ let NgDocPlaygroundDemoComponent = class NgDocPlaygroundDemoComponent {
|
|
|
208
253
|
getActiveContent() {
|
|
209
254
|
var _a, _b;
|
|
210
255
|
const formData = (_b = (_a = this.form) === null || _a === void 0 ? void 0 : _a.controls.content.value) !== null && _b !== void 0 ? _b : {};
|
|
211
|
-
return objectKeys(formData).reduce((result, key) => {
|
|
256
|
+
return objectKeys$1(formData).reduce((result, key) => {
|
|
212
257
|
var _a, _b, _c;
|
|
213
258
|
result[key] = formData[key] ? (_c = (_b = (_a = this.configuration) === null || _a === void 0 ? void 0 : _a.content) === null || _b === void 0 ? void 0 : _b[key].template) !== null && _c !== void 0 ? _c : '' : '';
|
|
214
259
|
return result;
|
|
@@ -217,7 +262,7 @@ let NgDocPlaygroundDemoComponent = class NgDocPlaygroundDemoComponent {
|
|
|
217
262
|
getActiveInputs() {
|
|
218
263
|
var _a, _b;
|
|
219
264
|
const formData = (_b = (_a = this.form) === null || _a === void 0 ? void 0 : _a.controls.properties.value) !== null && _b !== void 0 ? _b : {};
|
|
220
|
-
return objectKeys(formData).reduce((result, key) => {
|
|
265
|
+
return objectKeys$1(formData).reduce((result, key) => {
|
|
221
266
|
var _a, _b;
|
|
222
267
|
const property = (_a = this.properties) === null || _a === void 0 ? void 0 : _a[key];
|
|
223
268
|
if (property) {
|
|
@@ -284,7 +329,7 @@ class NgDocPlaygroundComponent {
|
|
|
284
329
|
}
|
|
285
330
|
getPropertiesFormValues() {
|
|
286
331
|
var _a;
|
|
287
|
-
return objectKeys((_a = this.properties) !== null && _a !== void 0 ? _a : {}).reduce((controls, key) => {
|
|
332
|
+
return objectKeys$1((_a = this.properties) !== null && _a !== void 0 ? _a : {}).reduce((controls, key) => {
|
|
288
333
|
var _a, _b;
|
|
289
334
|
if (this.properties) {
|
|
290
335
|
controls[key] = extractValue((_b = (_a = this.properties[key]) === null || _a === void 0 ? void 0 : _a.default) !== null && _b !== void 0 ? _b : 'undefined');
|
|
@@ -294,7 +339,7 @@ class NgDocPlaygroundComponent {
|
|
|
294
339
|
}
|
|
295
340
|
getContentFormValues() {
|
|
296
341
|
var _a, _b;
|
|
297
|
-
return objectKeys((_b = (_a = this.configuration) === null || _a === void 0 ? void 0 : _a.content) !== null && _b !== void 0 ? _b : {}).reduce((controls, key) => {
|
|
342
|
+
return objectKeys$1((_b = (_a = this.configuration) === null || _a === void 0 ? void 0 : _a.content) !== null && _b !== void 0 ? _b : {}).reduce((controls, key) => {
|
|
298
343
|
var _a;
|
|
299
344
|
if ((_a = this.configuration) === null || _a === void 0 ? void 0 : _a.content) {
|
|
300
345
|
controls[key] = false;
|
|
@@ -336,7 +381,9 @@ NgDocPlaygroundModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", v
|
|
|
336
381
|
NgDocCheckboxModule,
|
|
337
382
|
FormsModule,
|
|
338
383
|
NgDocButtonModule,
|
|
339
|
-
NgDocDemoDisplayerModule
|
|
384
|
+
NgDocDemoDisplayerModule,
|
|
385
|
+
NgDocBindModule,
|
|
386
|
+
NgDocRunModule], exports: [NgDocPlaygroundComponent,
|
|
340
387
|
NgDocPlaygroundPropertyComponent,
|
|
341
388
|
NgDocPlaygroundPropertiesComponent,
|
|
342
389
|
NgDocPlaygroundDemoComponent] });
|
|
@@ -352,7 +399,9 @@ NgDocPlaygroundModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", v
|
|
|
352
399
|
NgDocCheckboxModule,
|
|
353
400
|
FormsModule,
|
|
354
401
|
NgDocButtonModule,
|
|
355
|
-
NgDocDemoDisplayerModule
|
|
402
|
+
NgDocDemoDisplayerModule,
|
|
403
|
+
NgDocBindModule,
|
|
404
|
+
NgDocRunModule] });
|
|
356
405
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.4", ngImport: i0, type: NgDocPlaygroundModule, decorators: [{
|
|
357
406
|
type: NgModule,
|
|
358
407
|
args: [{
|
|
@@ -376,6 +425,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.4", ngImpor
|
|
|
376
425
|
FormsModule,
|
|
377
426
|
NgDocButtonModule,
|
|
378
427
|
NgDocDemoDisplayerModule,
|
|
428
|
+
NgDocBindModule,
|
|
429
|
+
NgDocRunModule,
|
|
379
430
|
],
|
|
380
431
|
exports: [
|
|
381
432
|
NgDocPlaygroundComponent,
|