@ng-doc/app 22.0.0 → 22.1.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/fesm2022/ng-doc-app-classes-root-page.mjs.map +1 -1
- package/fesm2022/ng-doc-app-components-demo-frame.mjs +96 -0
- package/fesm2022/ng-doc-app-components-demo-frame.mjs.map +1 -0
- package/fesm2022/ng-doc-app-components-demo-pane.mjs +1 -1
- package/fesm2022/ng-doc-app-components-demo-pane.mjs.map +1 -1
- package/fesm2022/ng-doc-app-components-demo.mjs +54 -8
- package/fesm2022/ng-doc-app-components-demo.mjs.map +1 -1
- package/fesm2022/ng-doc-app-components-playground.mjs +109 -47
- package/fesm2022/ng-doc-app-components-playground.mjs.map +1 -1
- package/fesm2022/ng-doc-app-components-tabs.mjs +21 -3
- package/fesm2022/ng-doc-app-components-tabs.mjs.map +1 -1
- package/fesm2022/ng-doc-app-components.mjs +1 -0
- package/fesm2022/ng-doc-app-components.mjs.map +1 -1
- package/fesm2022/ng-doc-app-demo-app.mjs +176 -0
- package/fesm2022/ng-doc-app-demo-app.mjs.map +1 -0
- package/fesm2022/ng-doc-app-helpers.mjs +23 -2
- package/fesm2022/ng-doc-app-helpers.mjs.map +1 -1
- package/fesm2022/ng-doc-app-processors-processors.mjs +30 -9
- package/fesm2022/ng-doc-app-processors-processors.mjs.map +1 -1
- package/fesm2022/ng-doc-app-providers-ng-doc-app.mjs.map +1 -1
- package/fesm2022/ng-doc-app-providers-title.mjs +129 -0
- package/fesm2022/ng-doc-app-providers-title.mjs.map +1 -0
- package/fesm2022/ng-doc-app-providers.mjs +1 -0
- package/fesm2022/ng-doc-app-providers.mjs.map +1 -1
- package/fesm2022/ng-doc-app-services-highlighter.mjs +17 -13
- package/fesm2022/ng-doc-app-services-highlighter.mjs.map +1 -1
- package/fesm2022/ng-doc-app-services-route-preloader.mjs +34 -10
- package/fesm2022/ng-doc-app-services-route-preloader.mjs.map +1 -1
- package/fesm2022/ng-doc-app-type-controls-type-alias-control.mjs +43 -8
- package/fesm2022/ng-doc-app-type-controls-type-alias-control.mjs.map +1 -1
- package/package.json +17 -4
- package/styles/global.css +3 -0
- package/styles/main.css +3 -0
- package/styles/themes/dark.css +10 -0
- package/types/ng-doc-app-classes-root-page.d.ts +8 -0
- package/types/ng-doc-app-components-demo-frame.d.ts +48 -0
- package/types/ng-doc-app-components-demo.d.ts +20 -2
- package/types/ng-doc-app-components-playground.d.ts +24 -3
- package/types/ng-doc-app-components-tabs.d.ts +13 -3
- package/types/ng-doc-app-components.d.ts +1 -0
- package/types/ng-doc-app-demo-app.d.ts +89 -0
- package/types/ng-doc-app-helpers.d.ts +21 -3
- package/types/ng-doc-app-interfaces.d.ts +15 -4
- package/types/ng-doc-app-processors-processors.d.ts +5 -0
- package/types/ng-doc-app-providers-ng-doc-app.d.ts +1 -1
- package/types/ng-doc-app-providers-title.d.ts +59 -0
- package/types/ng-doc-app-providers.d.ts +1 -0
- package/types/ng-doc-app-services-highlighter.d.ts +12 -5
- package/types/ng-doc-app-services-route-preloader.d.ts +13 -1
- package/types/ng-doc-app-type-controls-type-alias-control.d.ts +26 -4
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ng-doc-app-components-playground.mjs","sources":["../../../../libs/app/components/playground/playground-demo/playground-demo.component.ts","../../../../libs/app/components/playground/playground-demo/playground-demo.component.html","../../../../libs/app/components/playground/playground-property/playground-property.component.ts","../../../../libs/app/components/playground/playground-property/playground-property.component.html","../../../../libs/app/components/playground/playground-properties/playground-properties.component.ts","../../../../libs/app/components/playground/playground-properties/playground-properties.component.html","../../../../libs/app/components/playground/playground.component.ts","../../../../libs/app/components/playground/playground.component.html","../../../../libs/app/components/playground/base-playground.ts","../../../../libs/app/components/playground/ng-doc-app-components-playground.ts"],"sourcesContent":["import {\n ChangeDetectionStrategy,\n Component,\n ComponentRef,\n DestroyRef,\n inject,\n InjectionToken,\n Injector,\n input,\n InputSignal,\n OnChanges,\n OnDestroy,\n PendingTasks,\n Signal,\n signal,\n SimpleChanges,\n Type,\n viewChild,\n ViewContainerRef,\n} from '@angular/core';\nimport { takeUntilDestroyed } from '@angular/core/rxjs-interop';\nimport { FormGroup } from '@angular/forms';\nimport { NgDocDemoDisplayerComponent } from '@ng-doc/app/components/demo-displayer';\nimport { formatHtml } from '@ng-doc/app/helpers';\nimport { getPlaygroundDemoToken } from '@ng-doc/app/providers/playground-demo';\nimport { NgDocFormPartialValue } from '@ng-doc/app/types';\nimport {\n buildPlaygroundDemoPipeTemplate,\n buildPlaygroundDemoTemplate,\n} from '@ng-doc/core/helpers/build-playground-demo-template';\nimport { objectKeys } from '@ng-doc/core/helpers/object-keys';\nimport { stringify } from '@ng-doc/core/helpers/stringify';\nimport { NgDocPlaygroundConfig, NgDocPlaygroundProperties } from '@ng-doc/core/interfaces';\nimport { Subject } from 'rxjs';\nimport { startWith, takeUntil } from 'rxjs/operators';\n\nimport { NgDocBasePlayground } from '../base-playground';\nimport { NgDocPlaygroundForm } from '../playground-form';\n\n/**\n * One demo of a playground: it creates the generated playground class of its selector (or pipe),\n * passes it the form's values and shows the code of the current state.\n */\n@Component({\n selector: 'ng-doc-playground-demo',\n templateUrl: './playground-demo.component.html',\n styleUrls: ['./playground-demo.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n imports: [NgDocDemoDisplayerComponent],\n})\nexport class NgDocPlaygroundDemoComponent<\n T extends NgDocPlaygroundProperties = NgDocPlaygroundProperties,\n >\n implements OnChanges, OnDestroy\n{\n /** The name of the playground in the page configuration. */\n readonly id: InputSignal<string> = input<string>('');\n\n /** The name of the pipe, when the target is a pipe. */\n readonly pipeName: InputSignal<string> = input<string>('');\n\n /** The selector of the target this demo renders. */\n readonly selector: InputSignal<string> = input<string>('');\n\n /** The playground configuration, extended by the action's options. */\n readonly configuration: InputSignal<NgDocPlaygroundConfig | undefined> = input<\n NgDocPlaygroundConfig | undefined\n >(undefined);\n\n /** The inputs of the target. */\n readonly properties: InputSignal<T | undefined> = input<T | undefined>(undefined);\n\n /** Whether the demo is created again each time a value changes. */\n readonly recreateDemo: InputSignal<boolean> = input<boolean>(false);\n\n /** The values of the inputs and content slots. */\n readonly form: InputSignal<FormGroup<NgDocPlaygroundForm> | undefined> = input<\n FormGroup<NgDocPlaygroundForm> | undefined\n >(undefined);\n\n /** Whether the code of the demo is shown. */\n readonly expanded: InputSignal<boolean> = input<boolean>(false);\n\n /** Where the playground class is created. */\n readonly demoOutlet: Signal<ViewContainerRef | undefined> = viewChild('demoOutlet', {\n read: ViewContainerRef,\n });\n\n /** The generated playground class of this demo's selector or pipe. */\n playgroundDemo?: typeof NgDocBasePlayground;\n\n protected readonly code = signal('');\n\n protected readonly injector = inject(Injector);\n protected readonly destroyRef = inject(DestroyRef);\n private readonly pendingTasks = inject(PendingTasks);\n\n private demoRef?: ComponentRef<NgDocBasePlayground>;\n private readonly unsubscribe$: Subject<void> = new Subject<void>();\n\n async ngOnChanges({ form, id }: SimpleChanges): Promise<void> {\n if (form || id) {\n this.unsubscribe$.next();\n\n const demoInjector: InjectionToken<Array<typeof NgDocBasePlayground>> | undefined =\n getPlaygroundDemoToken(this.id());\n\n if (demoInjector) {\n const demos: Array<typeof NgDocBasePlayground> = this.injector.get(demoInjector, []);\n\n this.playgroundDemo = demos.find(\n (demo: typeof NgDocBasePlayground) =>\n demo.selector === this.selector() || demo.selector === this.pipeName(),\n );\n }\n\n await this.updateDemo();\n\n const form = this.form();\n\n form?.valueChanges\n .pipe(\n startWith(form.value),\n takeUntil(this.unsubscribe$),\n takeUntilDestroyed(this.destroyRef),\n )\n .subscribe((data: NgDocFormPartialValue<FormGroup<NgDocPlaygroundForm>>) =>\n this.updateDemo(data),\n );\n }\n }\n\n private async updateDemo(\n data?: NgDocFormPartialValue<FormGroup<NgDocPlaygroundForm>>,\n ): Promise<void> {\n if (this.recreateDemo() || !this.demoRef) {\n this.createDemo();\n }\n\n if (data) {\n this.demoRef?.setInput('properties', data.properties ?? {});\n this.demoRef?.setInput('content', data.content ?? {});\n this.demoRef?.setInput('actionData', this.configuration()?.data ?? {});\n\n if (this.recreateDemo()) {\n this.demoRef?.instance.onReattached.subscribe(() => {\n this.demoRef?.changeDetectorRef.detectChanges();\n });\n }\n }\n\n await this.updateCodeView();\n }\n\n private createDemo(): void {\n if (this.playgroundDemo) {\n this.demoRef?.destroy();\n this.demoRef = this.demoOutlet()?.createComponent(\n this.playgroundDemo as unknown as Type<NgDocBasePlayground>,\n );\n this.demoRef?.changeDetectorRef.markForCheck();\n }\n }\n\n private async updateCodeView(): Promise<void> {\n const template: string = this.pipeName()\n ? buildPlaygroundDemoPipeTemplate(\n this.configuration()?.template ?? '',\n this.pipeName(),\n this.getActiveContent(),\n this.getPipeActiveInputs(),\n )\n : buildPlaygroundDemoTemplate(\n this.configuration()?.template ?? '',\n this.selector(),\n this.getActiveContent(),\n this.getActiveInputs(),\n );\n\n // Formatting loads the formatter asynchronously. Zoneless SSR waits only for pending tasks, so\n // the page would otherwise be serialized before the code view is filled.\n const done = this.pendingTasks.add();\n\n try {\n this.code.set(await formatHtml(template));\n } finally {\n done();\n }\n }\n\n private getActiveContent(): Record<string, string> {\n const formData: Record<string, boolean> =\n (this.form()?.controls.content.value as Record<string, boolean>) ?? {};\n\n return objectKeys(formData).reduce((result: Record<string, string>, key: string) => {\n result[key] = formData[key] ? this.configuration()?.content?.[key].template ?? '' : '';\n\n return result;\n }, {});\n }\n\n private getActiveInputs(): Record<string, string> {\n const formData: Record<string, unknown> =\n (this.form()?.controls.properties.value as Record<string, unknown>) ?? {};\n\n return objectKeys(formData).reduce((result: Record<string, string>, key: string) => {\n const inputName = this.properties()?.[key]?.inputName ?? key;\n const value: unknown = formData[key];\n const property: unknown | undefined = this.demoRef?.instance?.defaultValues[key];\n\n if (property !== value) {\n result[inputName] = stringify(value).replace(/\"/g, `'`);\n }\n\n return result;\n }, {});\n }\n\n private getPipeActiveInputs(): Record<string, string> {\n const formData: Record<string, unknown> =\n (this.form()?.controls.properties.value as Record<string, unknown>) ?? {};\n let changedInputIndex: number = -1;\n\n return objectKeys(formData)\n .map((key: string, i: number) => {\n const value: unknown = formData[key];\n const defaultValue: unknown | undefined = this.demoRef?.instance?.defaultValues[key];\n\n if (defaultValue !== value) {\n changedInputIndex = i;\n }\n\n return key;\n })\n .slice(0, changedInputIndex + 1)\n .reduce((result: Record<string, string>, key: string) => {\n result[key] = stringify(formData[key]).replace(/\"/g, `'`);\n\n return result;\n }, {});\n }\n\n ngOnDestroy(): void {\n this.unsubscribe$.next();\n this.unsubscribe$.complete();\n }\n}\n","<ng-doc-demo-displayer\n [code]=\"code()\"\n [border]=\"false\"\n [expanded]=\"expanded()\"\n language=\"angular-html\">\n <ng-container #demoOutlet></ng-container>\n</ng-doc-demo-displayer>\n","import {\n ChangeDetectionStrategy,\n Component,\n ComponentRef,\n computed,\n DestroyRef,\n effect,\n inject,\n input,\n reflectComponentType,\n Signal,\n signal,\n untracked,\n viewChild,\n ViewContainerRef,\n} from '@angular/core';\nimport { FormControl } from '@angular/forms';\nimport { NgDocKindIconComponent } from '@ng-doc/app/components/kind-icon';\nimport { isPlaygroundProperty } from '@ng-doc/app/helpers';\nimport {\n NgDocProvidedTypeControl,\n NgDocTypeControl,\n NgDocTypeControlProviderOptions,\n} from '@ng-doc/app/interfaces';\nimport { NgDocSanitizeHtmlPipe } from '@ng-doc/app/pipes';\nimport { extractValueOrThrow } from '@ng-doc/core/helpers/extract-value';\nimport { NgDocPlaygroundContent, NgDocPlaygroundProperty } from '@ng-doc/core/interfaces';\nimport { NgDocLabelComponent, NgDocTooltipDirective } from '@ng-doc/ui-kit';\n\n/** Value types that have a chip colour. */\nconst CHIP_TYPES: ReadonlySet<string> = new Set([\n 'string',\n 'number',\n 'boolean',\n 'object',\n 'null',\n 'undefined',\n]);\n\n/**\n * One row of the playground inspector: the input's name with its type chip, and the type\n * control that edits it, bound to the input's form control.\n */\n@Component({\n selector: 'ng-doc-playground-property',\n templateUrl: './playground-property.component.html',\n styleUrls: ['./playground-property.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n imports: [\n NgDocLabelComponent,\n NgDocTooltipDirective,\n NgDocSanitizeHtmlPipe,\n NgDocKindIconComponent,\n ],\n host: {\n '[attr.data-has-property-control]': 'hasPropertyControl()',\n },\n})\nexport class NgDocPlaygroundPropertyComponent {\n /** Name of the input. */\n readonly name = input<string>('');\n\n /** The input, or the content slot. */\n readonly property = input<NgDocPlaygroundProperty | NgDocPlaygroundContent | undefined>(\n undefined,\n );\n\n /** The type control that edits the input. */\n readonly typeControl = input<NgDocProvidedTypeControl | undefined>(undefined);\n\n /** Form control of the input. */\n readonly control = input<FormControl | undefined>(undefined);\n\n /** Default value of the input. */\n readonly defaultValue = input<unknown>(undefined);\n\n /** Whether a type control is rendered. */\n readonly hasPropertyControl = signal<boolean>(false);\n\n /** Description of the input, shown in the tooltip of its name. */\n protected readonly tooltipContent: Signal<string> = computed(() => {\n const property: NgDocPlaygroundProperty | NgDocPlaygroundContent | undefined = this.property();\n\n return property && isPlaygroundProperty(property) ? property.description ?? '' : '';\n });\n\n /** Options of the type control provider. */\n protected readonly option: Signal<NgDocTypeControlProviderOptions | undefined> = computed(\n () => this.typeControl()?.options,\n );\n\n /** The value type shown as a chip under the name, or an empty string. */\n protected readonly typeChip: Signal<string> = computed(() => valueType(this.property()));\n\n private readonly propertyOutlet = viewChild.required('propertyOutlet', {\n read: ViewContainerRef,\n });\n\n private propertyTypeControl?: ComponentRef<NgDocTypeControl>;\n\n constructor() {\n // A plain effect, not an after-render hook: it runs during change detection on the server\n // too, so server-rendered and prerendered pages include the controls. The outlet is a static\n // node of this view, so it exists by then. It runs again only when an input it reads changes.\n effect(() => {\n const property = this.property();\n const typeControl: NgDocProvidedTypeControl | undefined = this.typeControl();\n const control: FormControl | undefined = this.control();\n const defaultValue: unknown = this.defaultValue();\n\n untracked(() => this.createControl(property, typeControl, control, defaultValue));\n });\n\n inject(DestroyRef).onDestroy(() => this.propertyTypeControl?.destroy());\n }\n\n private createControl(\n property: NgDocPlaygroundProperty | NgDocPlaygroundContent | undefined,\n typeControl: NgDocProvidedTypeControl | undefined,\n formControl: FormControl | undefined,\n defaultValue: unknown,\n ): void {\n if (!property || !typeControl) {\n return;\n }\n\n this.propertyTypeControl?.destroy();\n\n const control: ComponentRef<NgDocTypeControl> = this.propertyOutlet().createComponent(\n typeControl.control,\n );\n\n this.propertyTypeControl = control;\n setTypeControlField(control, 'name', this.name());\n setTypeControlField(control, 'description', this.tooltipContent());\n setTypeControlField(\n control,\n 'options',\n isPlaygroundProperty(property) ? property.options : undefined,\n );\n setTypeControlField(control, 'default', defaultValue);\n setTypeControlField(\n control,\n 'isManual',\n isPlaygroundProperty(property) ? property.isManual : undefined,\n );\n control.instance.writeValue(formControl?.value);\n\n if (formControl) {\n formControl.registerOnChange((value: unknown) => control.instance.writeValue(value));\n control.instance.registerOnChange((value: unknown) => formControl.setValue(value));\n control.instance.registerOnTouched(() => formControl.markAsTouched());\n }\n\n this.hasPropertyControl.set(true);\n }\n}\n\n/**\n * The value type of an input: its declared type when it is a primitive, else the type of the first\n * value of its type alias. Content slots are booleans.\n * @param property - The input or the content slot.\n */\nfunction valueType(property: NgDocPlaygroundProperty | NgDocPlaygroundContent | undefined): string {\n if (!property) {\n return '';\n }\n\n if (!isPlaygroundProperty(property)) {\n return 'boolean';\n }\n\n if (CHIP_TYPES.has(property.type)) {\n return property.type;\n }\n\n const option: string | undefined = property.options?.[0];\n\n if (option !== undefined) {\n try {\n const type: string = typeof (property.isManual ? option : extractValueOrThrow(option));\n\n return CHIP_TYPES.has(type) ? type : '';\n } catch {\n return '';\n }\n }\n\n return '';\n}\n\n/**\n * Sets a field of a type control: through `ComponentRef.setInput()` when the control declares it\n * as an input (a signal input or a decorator input), otherwise by assigning the plain field.\n * @param control - The created type control.\n * @param field - Name of the field.\n * @param value - Value to set.\n */\nfunction setTypeControlField(\n control: ComponentRef<NgDocTypeControl>,\n field: keyof NgDocTypeControl,\n value: unknown,\n): void {\n const input = reflectComponentType(control.componentType)?.inputs.find(\n ({ propName }: { propName: string }) => propName === field,\n );\n\n if (input) {\n control.setInput(input.templateName, value);\n } else {\n (control.instance as unknown as Record<string, unknown>)[field] = value;\n }\n}\n","<label\n class=\"ng-doc-playground-property-label\"\n [class.with-label]=\"!option()?.hideLabel\"\n [ng-doc-label]=\"option()?.hideLabel ? '' : labelContent\">\n <ng-template #labelContent>\n <span\n class=\"ng-doc-playground-property-name\"\n [ngDocTooltip]=\"tooltipTemplate\"\n [canOpen]=\"!!tooltipContent()\"\n [positions]=\"['left-center', 'top-right', 'bottom-right']\"\n >{{ name() }}</span\n >\n @if (typeChip(); as type) {\n <ng-doc-kind-icon [kind]=\"type\" type=\"type\"></ng-doc-kind-icon>\n }\n <ng-template #tooltipTemplate>\n <div [innerHTML]=\"tooltipContent() | ngDocSanitizeHtml\"></div>\n </ng-template>\n </ng-template>\n <ng-container #propertyOutlet></ng-container>\n</label>\n","import { KeyValuePipe } from '@angular/common';\nimport {\n ChangeDetectionStrategy,\n Component,\n computed,\n inject,\n InjectionToken,\n Injector,\n input,\n isDevMode,\n model,\n output,\n Signal,\n} from '@angular/core';\nimport { FormControl, FormGroup, FormsModule } from '@angular/forms';\nimport { isPlaygroundProperty } from '@ng-doc/app/helpers';\nimport { NgDocProvidedTypeControl } from '@ng-doc/app/interfaces';\nimport { getTokenForType } from '@ng-doc/app/providers/type-control';\nimport { extractValueOrThrow } from '@ng-doc/core/helpers/extract-value';\nimport { isPresent } from '@ng-doc/core/helpers/is-present';\nimport { objectKeys } from '@ng-doc/core/helpers/object-keys';\nimport {\n NgDocPlaygroundContent,\n NgDocPlaygroundProperties,\n NgDocPlaygroundProperty,\n} from '@ng-doc/core/interfaces';\nimport {\n NgDocBindPipe,\n NgDocCheckboxComponent,\n NgDocExecutePipe,\n NgDocIconComponent,\n NgDocTooltipDirective,\n} from '@ng-doc/ui-kit';\n\nimport { NgDocPlaygroundForm } from '../playground-form';\nimport { NgDocPlaygroundPropertyComponent } from '../playground-property/playground-property.component';\nimport { NgDocPlaygroundPropertyControl } from '../playground-property-control';\n\n/**\n * Orders inputs without an `order` by name in English whatever the locale, so a prerendered\n * playground does not depend on the machine that built it.\n */\nconst INPUT_ORDER = new Intl.Collator('en');\n\n/**\n * The playground inspector: the demos, and beside them (below them in a container narrower than\n * 640px) the Recreate setting and a control per input and content slot.\n */\n@Component({\n selector: 'ng-doc-playground-properties',\n templateUrl: './playground-properties.component.html',\n styleUrls: ['./playground-properties.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n imports: [\n NgDocCheckboxComponent,\n FormsModule,\n NgDocTooltipDirective,\n NgDocIconComponent,\n NgDocPlaygroundPropertyComponent,\n KeyValuePipe,\n NgDocBindPipe,\n NgDocExecutePipe,\n ],\n})\nexport class NgDocPlaygroundPropertiesComponent<\n P extends NgDocPlaygroundProperties,\n C extends Record<string, NgDocPlaygroundContent>,\n> {\n private readonly injector = inject(Injector);\n\n /** The form of the playground. */\n readonly form = input.required<FormGroup<NgDocPlaygroundForm>>();\n\n /** The inputs of the playground's target. */\n readonly properties = input<P | undefined>(undefined);\n\n /** Inputs that get no control. */\n readonly ignoreInputs = input<string[] | undefined>([]);\n\n /** Content slots of the playground. */\n readonly dynamicContent = input<C | undefined>(undefined);\n\n /** Default values of the inputs; the inspector renders once they are known. */\n readonly defaultValues = input<Record<string, unknown> | undefined>(undefined);\n\n /** Whether the inspector is hidden, leaving the demos only. */\n readonly hideSidePanel = input<boolean>(false);\n\n /** Where the inspector goes: right of the demos, or below them at full width. */\n readonly inspectorPosition = input<'right' | 'bottom'>('right');\n\n /** Whether the demo is recreated each time an input changes. */\n readonly recreateDemo = model<boolean>(false);\n\n /** Whether the Reset button is shown. */\n readonly showResetButton = input<boolean>(false);\n\n /** Emits when the reader resets the form. */\n readonly resetForm = output<void>();\n\n /** The control of each input, in display order. */\n protected readonly propertyControls: Signal<NgDocPlaygroundPropertyControl[]> = computed(() => {\n const properties: P | undefined = this.properties();\n const ignoreInputs: string[] | undefined = this.ignoreInputs();\n\n if (!properties) {\n return [];\n }\n\n return objectKeys(properties)\n .filter((key: keyof P) => ignoreInputs?.includes(String(key)) !== true)\n .map((key: keyof P) => {\n const property: NgDocPlaygroundProperty = properties[key];\n const typeControl: NgDocProvidedTypeControl | undefined = this.getTypeControl(property);\n\n return typeControl ? { propertyName: String(key), property, typeControl } : null;\n })\n .filter(isPresent)\n .sort((a: NgDocPlaygroundPropertyControl, b: NgDocPlaygroundPropertyControl) => {\n const aOrder: number | undefined = a.typeControl.options?.order;\n const bOrder: number | undefined = b.typeControl.options?.order;\n\n if (isPresent(aOrder) && isPresent(bOrder)) {\n return aOrder - bOrder;\n }\n if (isPresent(aOrder)) {\n return -1;\n }\n if (isPresent(bOrder)) {\n return 1;\n }\n return INPUT_ORDER.compare(a.property.inputName, b.property.inputName);\n });\n });\n\n /** The control of content slots. */\n protected readonly contentTypeControl?: NgDocProvidedTypeControl =\n this.getControlForType('boolean');\n\n /**\n * The form control of an input or a content slot.\n * @param controlType - `properties` or `content`.\n * @param key - Name of the input or slot.\n */\n getFormControl(controlType: keyof NgDocPlaygroundForm, key: string): FormControl {\n return this.form().get(controlType)?.get(key) as FormControl;\n }\n\n private getTypeControl(property: NgDocPlaygroundProperty): NgDocProvidedTypeControl | undefined {\n const type: string = property.type;\n const primitive: string | undefined = optionalPrimitive(type);\n const typeControl: NgDocProvidedTypeControl | undefined =\n this.getControlForType(type) ??\n (primitive ? this.getControlForType(primitive) : undefined) ??\n this.getControlForTypeAlias(\n isPlaygroundProperty(property) ? property.options : undefined,\n property.isManual,\n );\n\n if (!typeControl && isDevMode()) {\n console.warn(\n `NgDocPlayground didn't find the control for the @Input \"${property.inputName}\", the type \"${type}\" was not recognized'`,\n );\n }\n\n return typeControl;\n }\n\n private getControlForType(type: string): NgDocProvidedTypeControl | undefined {\n const token: InjectionToken<NgDocProvidedTypeControl> | undefined = getTokenForType(type);\n\n return token ? this.injector.get(token) : undefined;\n }\n\n private getControlForTypeAlias(\n options?: string[],\n isManual?: boolean,\n ): NgDocProvidedTypeControl | undefined {\n if (options && options.length) {\n let optionsIsValid: boolean = true;\n\n if (!isManual) {\n try {\n // checking that all values are extractable\n options.forEach((item: string) => extractValueOrThrow(item));\n } catch {\n optionsIsValid = false;\n }\n }\n\n if (optionsIsValid) {\n const token: InjectionToken<NgDocProvidedTypeControl> | undefined =\n getTokenForType('NgDocTypeAlias');\n\n return token ? this.injector.get(token) : undefined;\n }\n }\n\n return undefined;\n }\n}\n\n/** The types whose control also edits an optional or nullable input of the type. */\nconst PRIMITIVE_TYPES: ReadonlySet<string> = new Set(['string', 'number', 'boolean']);\n\n/**\n * The primitive of an optional or nullable primitive input type, such as `string` of\n * `string | undefined` (an optional `@Input() label?: string`, `input<string>()` or\n * `model<string>()`) or of `number | null`, so that the input gets the primitive's control.\n * Other types are matched by their exact name only: a custom control registered for `Position`\n * does not receive the `undefined` of a `Position | undefined` input unless it is registered for\n * that type too.\n * @param type - The input type as the builder printed it.\n * @returns The primitive, or `undefined` when the type is not one.\n */\nfunction optionalPrimitive(type: string): string | undefined {\n const members: string[] = type.split('|').map((member: string) => member.trim());\n const rest: string[] = members.filter(\n (member: string) => member !== 'undefined' && member !== 'null',\n );\n\n return rest.length === 1 && rest.length < members.length && PRIMITIVE_TYPES.has(rest[0])\n ? rest[0]\n : undefined;\n}\n","@if (defaultValues(); as defaultValues) {\n <div\n class=\"ng-doc-playground-properties-wrapper\"\n [class.no-side-panel]=\"hideSidePanel()\"\n [class.inspector-bottom]=\"inspectorPosition() === 'bottom'\">\n <div class=\"ng-doc-playground-demos\">\n <ng-content></ng-content>\n </div>\n @if (!hideSidePanel()) {\n <div class=\"ng-doc-playground-properties\">\n <div class=\"ng-doc-playground-header\">\n <h4>Playground</h4>\n @if (showResetButton()) {\n <button type=\"button\" class=\"ng-doc-playground-reset\" (click)=\"resetForm.emit()\">\n Reset\n </button>\n }\n </div>\n <div class=\"ng-doc-playground-setting\">\n <ng-doc-checkbox [ngModel]=\"recreateDemo()\" (ngModelChange)=\"recreateDemo.set($event)\">\n Recreate\n </ng-doc-checkbox>\n <ng-doc-icon\n class=\"ng-doc-playground-info\"\n icon=\"info\"\n role=\"img\"\n aria-label=\"Recreates the demo every time one of the inputs changes\"\n [ngDocTooltip]=\"'Recreates the demo every time one of the inputs changes'\"\n [positions]=\"['bottom-right', 'left-center']\"></ng-doc-icon>\n </div>\n <div class=\"ng-doc-playground-divider\"></div>\n @if (propertyControls().length) {\n <h5 class=\"ng-doc-title\">Settings</h5>\n <div class=\"ng-doc-playground-property-list\">\n @for (propertyControl of propertyControls(); track propertyControl.propertyName) {\n <ng-doc-playground-property\n [name]=\"propertyControl.property.inputName\"\n [property]=\"propertyControl.property\"\n [typeControl]=\"propertyControl.typeControl\"\n [defaultValue]=\"defaultValues[propertyControl.propertyName]\"\n [control]=\"\n getFormControl | bind: this | execute: 'properties' : propertyControl.propertyName\n \">\n </ng-doc-playground-property>\n }\n </div>\n }\n @if ((dynamicContent() | keyvalue)?.length) {\n <h5 class=\"ng-doc-title\">Content</h5>\n <div class=\"ng-doc-playground-property-list\">\n @for (content of dynamicContent() | keyvalue; track content.key) {\n <ng-doc-playground-property\n [name]=\"content.value.label\"\n [property]=\"content.value\"\n [typeControl]=\"contentTypeControl\"\n [control]=\"getFormControl | bind: this | execute: 'content' : content.key\">\n </ng-doc-playground-property>\n }\n </div>\n }\n </div>\n }\n </div>\n}\n","import {\n AfterViewInit,\n ChangeDetectionStrategy,\n Component,\n computed,\n inject,\n input,\n InputSignal,\n Signal,\n signal,\n WritableSignal,\n} from '@angular/core';\nimport { FormBuilder, FormGroup } from '@angular/forms';\nimport { NgDocRootPage } from '@ng-doc/app/classes/root-page';\nimport { isSameObject } from '@ng-doc/core/helpers/is-same-object';\nimport { objectKeys } from '@ng-doc/core/helpers/object-keys';\nimport {\n NgDocPlaygroundConfig,\n NgDocPlaygroundOptions,\n NgDocPlaygroundProperties,\n} from '@ng-doc/core/interfaces';\nimport { NgDocAsArrayPipe } from '@ng-doc/ui-kit';\n\nimport { NgDocPlaygroundDemoComponent } from './playground-demo/playground-demo.component';\nimport { NgDocPlaygroundForm } from './playground-form';\nimport { NgDocPlaygroundPropertiesComponent } from './playground-properties/playground-properties.component';\n\n/**\n * A playground: an inspector with a control per input and content slot of its target, and a demo\n * per selector (or the pipe) rendered with the chosen values.\n */\n@Component({\n selector: 'ng-doc-playground',\n templateUrl: './playground.component.html',\n styleUrls: ['./playground.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n imports: [NgDocPlaygroundPropertiesComponent, NgDocPlaygroundDemoComponent, NgDocAsArrayPipe],\n})\nexport class NgDocPlaygroundComponent<\n T extends NgDocPlaygroundProperties = NgDocPlaygroundProperties,\n> implements AfterViewInit\n{\n private readonly rootPage = inject(NgDocRootPage);\n private readonly formBuilder = inject(FormBuilder);\n\n /** The name of the playground in the page configuration. */\n readonly id: InputSignal<string> = input.required<string>();\n\n /** The name of the pipe, when the target is a pipe. */\n readonly pipeName: InputSignal<string> = input<string>('');\n\n /** The selectors of the target to render a demo for. */\n readonly selectors: InputSignal<string[]> = input<string[]>([]);\n\n /** The inputs of the target. */\n readonly properties: InputSignal<T | undefined> = input<T | undefined>(undefined);\n\n /** Options of the playground action; they extend the playground configuration. */\n readonly options: InputSignal<NgDocPlaygroundOptions> = input<NgDocPlaygroundOptions>({});\n\n /** Whether the demo is created again each time a value changes. */\n readonly recreateDemo: WritableSignal<boolean> = signal(false);\n\n /** The values of the inputs and content slots. */\n readonly formGroup: WritableSignal<FormGroup<NgDocPlaygroundForm> | undefined> =\n signal(undefined);\n\n /** The default values of the target's inputs, reported by the first demo. */\n readonly defaultValues: WritableSignal<Record<string, unknown> | undefined> = signal(undefined);\n\n /** The playground configuration of the page, extended by the options. */\n readonly configuration: Signal<NgDocPlaygroundConfig> = computed(() =>\n Object.assign({}, this.rootPage.page?.playgrounds?.[this.id()], this.options()),\n );\n\n private defaultProperties: Record<string, unknown> = {};\n private defaultContent: Record<string, boolean> = {};\n\n ngAfterViewInit(): void {\n this.defaultProperties = this.getPropertiesFormValues();\n this.defaultContent = this.getContentFormValues();\n\n const propertiesForm: FormGroup = this.formBuilder.group(this.defaultProperties);\n const contentForm: FormGroup = this.formBuilder.group(this.defaultContent);\n const formGroup: FormGroup<NgDocPlaygroundForm> = this.formBuilder.group({\n properties: propertiesForm,\n content: contentForm,\n });\n\n // `patchValue` is needed to set `undefined` values, otherwise they will be ignored by the Angular form\n formGroup.patchValue({\n properties: Object.assign({}, this.defaultProperties, this.configuration().inputs),\n content: this.defaultContent,\n });\n this.formGroup.set(formGroup);\n }\n\n protected isDefaultState(): boolean {\n const formGroup = this.formGroup();\n\n if (!formGroup) {\n return false;\n }\n\n return (\n isSameObject(formGroup.value.properties ?? {}, this.defaultValues() ?? {}) &&\n isSameObject(formGroup.value.content ?? {}, this.defaultContent ?? {})\n );\n }\n\n private getPropertiesFormValues(): Record<string, unknown> {\n const defaultValues = this.defaultValues();\n const formValues: Record<string, unknown> = objectKeys(this.properties() ?? {}).reduce(\n (controls: Record<string, unknown>, key: string) => {\n controls[key] = defaultValues ? defaultValues[key] : undefined;\n\n return controls;\n },\n {} as Record<string, unknown>,\n );\n\n return Object.assign({}, formValues, this.configuration().defaults);\n }\n\n private getContentFormValues(): Record<string, boolean> {\n return objectKeys(this.configuration().content ?? {}).reduce(\n (controls: Record<string, boolean>, key: string) => {\n controls[key] = false;\n\n return controls;\n },\n {} as Record<keyof T, boolean>,\n );\n }\n\n /** Sets every input and content slot back to its default value. */\n resetForm(): void {\n const formGroup = this.formGroup();\n\n formGroup?.reset({}, { emitEvent: false });\n formGroup?.patchValue({\n properties: this.defaultProperties,\n content: this.defaultContent,\n });\n }\n}\n","@if (configuration(); as configuration) {\n <ng-doc-playground-properties\n [form]=\"formGroup()!\"\n [properties]=\"properties()\"\n [ignoreInputs]=\"configuration.hiddenInputs\"\n [dynamicContent]=\"configuration.content\"\n [hideSidePanel]=\"configuration.hideSidePanel ?? false\"\n [inspectorPosition]=\"configuration.inspectorPosition ?? 'right'\"\n [defaultValues]=\"defaultValues()\"\n [showResetButton]=\"!isDefaultState()\"\n [(recreateDemo)]=\"recreateDemo\"\n (resetForm)=\"resetForm()\">\n @for (selector of configuration.selectors ?? selectors() | asArray; track selector) {\n <ng-doc-playground-demo\n [id]=\"id()\"\n [selector]=\"selector\"\n [properties]=\"properties()\"\n [configuration]=\"configuration\"\n [recreateDemo]=\"recreateDemo()\"\n [form]=\"formGroup()\"\n [expanded]=\"configuration.expanded ?? false\">\n </ng-doc-playground-demo>\n }\n @if (pipeName()) {\n <ng-doc-playground-demo\n [id]=\"id()\"\n [pipeName]=\"pipeName()\"\n [properties]=\"properties()\"\n [configuration]=\"configuration\"\n [recreateDemo]=\"recreateDemo()\"\n [form]=\"formGroup()\">\n </ng-doc-playground-demo>\n }\n </ng-doc-playground-properties>\n}\n","import {\n ChangeDetectorRef,\n Directive,\n inject,\n input,\n InputSignal,\n OnInit,\n Signal,\n ViewContainerRef,\n} from '@angular/core';\nimport { extractFunctionDefaults } from '@ng-doc/core/helpers/extract-function-defaults';\nimport { NgDocPlaygroundConfig } from '@ng-doc/core/interfaces';\nimport { Constructor } from '@ng-doc/core/types';\nimport { Observable, Subject, take } from 'rxjs';\n\nimport { NgDocPlaygroundComponent } from './playground.component';\n\n/**\n * Base class of the playground classes the builder generates, one per playground and selector.\n * A generated class renders the playground template with the target's inputs bound to\n * `properties()`, and queries the target with `viewChild()`.\n */\n@Directive()\nexport abstract class NgDocBasePlayground implements Pick<NgDocPlaygroundConfig, 'data'>, OnInit {\n static readonly selector: string = 'unknown';\n\n /** The class the playground shows: a component, a directive or a pipe. */\n abstract readonly target: Constructor<unknown>;\n\n /** The instance of the target in the playground template; a pipe has none. */\n abstract readonly playground: Signal<unknown>;\n\n /** The view container of the target in the playground template; a pipe has none. */\n abstract readonly viewContainerRef: Signal<ViewContainerRef | undefined>;\n\n /** The `data` of the playground configuration. */\n abstract readonly configData: Record<string, unknown>;\n\n /** Values of the target's inputs, by property name. */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n readonly properties: InputSignal<Record<string, any>> = input<Record<string, any>>({});\n\n /** The `data` given to the playground action; it extends the configuration's `data`. */\n readonly actionData: InputSignal<Record<string, unknown>> = input<Record<string, unknown>>({});\n\n /** Whether each content slot is shown, by slot name. */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n readonly content: InputSignal<Record<string, any>> = input<Record<string, any>>({});\n\n /** The default values of the target's inputs, read before the template binds them. */\n defaultValues: Record<string, unknown> = {};\n\n private readonly reattached: Subject<void> = new Subject<void>();\n private readonly playgroundContainer: NgDocPlaygroundComponent = inject(NgDocPlaygroundComponent);\n protected readonly changeDetectorRef: ChangeDetectorRef = inject(ChangeDetectorRef);\n\n constructor() {\n // The view is not checked until the default values of the target are read, so the\n // template's bindings cannot overwrite them first.\n this.changeDetectorRef.detach();\n }\n\n /** Emits once, after the view is attached again and checks the template's bindings. */\n get onReattached(): Observable<void> {\n return this.reattached.pipe(take(1));\n }\n\n /** The playground `data`: the configuration's data extended by the action's data. */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n get data(): any {\n return Object.assign({}, this.configData, this.actionData());\n }\n\n ngOnInit(): void {\n // The target is created with the view, but the view has not been checked yet, so its inputs\n // still hold their defaults. Signal inputs are read by calling them.\n const playground = this.playground() as Record<string, unknown> | undefined;\n\n if (playground) {\n this.defaultValues = Object.keys(playground).reduce(\n (values: Record<string, unknown>, key: string) => {\n try {\n const value: unknown = playground[key];\n\n values[key] = typeof value === 'function' ? value.call(playground) : value;\n } catch {\n // Some properties are getters or functions that throw without their context.\n }\n\n return values;\n },\n {},\n );\n } else if (this.target) {\n // A pipe: the defaults of its `transform` parameters after the value itself.\n const defaults = extractFunctionDefaults(\n (this.target.prototype as { transform: (...args: unknown[]) => unknown }).transform,\n );\n\n this.defaultValues = Object.keys(this.playgroundContainer.properties() ?? {}).reduce(\n (values: Record<string, unknown>, key: string, i: number) => {\n values[key] = defaults[i + 1];\n\n return values;\n },\n {},\n );\n } else {\n throw new Error('Playground is not defined or initialized');\n }\n\n if (!this.playgroundContainer.defaultValues()) {\n this.playgroundContainer.defaultValues.set(this.defaultValues);\n }\n\n // The demo sets the playground's inputs right after it creates this view; the view is\n // attached again once they are set, so its first check renders the playground's values.\n Promise.resolve().then(() => {\n this.changeDetectorRef.reattach();\n this.changeDetectorRef.markForCheck();\n this.reattached.next();\n });\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AAuCA;;;AAGG;MAQU,4BAA4B,CAAA;AAPzC,IAAA,WAAA,GAAA;;QAaW,IAAA,CAAA,EAAE,GAAwB,KAAK,CAAS,EAAE;+EAAC;;QAG3C,IAAA,CAAA,QAAQ,GAAwB,KAAK,CAAS,EAAE;qFAAC;;QAGjD,IAAA,CAAA,QAAQ,GAAwB,KAAK,CAAS,EAAE;qFAAC;;QAGjD,IAAA,CAAA,aAAa,GAAmD,KAAK,CAE5E,SAAS;0FAAC;;QAGH,IAAA,CAAA,UAAU,GAA+B,KAAK,CAAgB,SAAS;uFAAC;;QAGxE,IAAA,CAAA,YAAY,GAAyB,KAAK,CAAU,KAAK;yFAAC;;QAG1D,IAAA,CAAA,IAAI,GAA4D,KAAK,CAE5E,SAAS;iFAAC;;QAGH,IAAA,CAAA,QAAQ,GAAyB,KAAK,CAAU,KAAK;qFAAC;;QAGtD,IAAA,CAAA,UAAU,GAAyC,SAAS,CAAC,YAAY,kFAChF,IAAI,EAAE,gBAAgB,EAAA,CACtB;QAKiB,IAAA,CAAA,IAAI,GAAG,MAAM,CAAC,EAAE;iFAAC;AAEjB,QAAA,IAAA,CAAA,QAAQ,GAAG,MAAM,CAAC,QAAQ,CAAC;AAC3B,QAAA,IAAA,CAAA,UAAU,GAAG,MAAM,CAAC,UAAU,CAAC;AACjC,QAAA,IAAA,CAAA,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,UAAA,EAAA,KAAA,EAAA,iBAAA,EAAA,IAAA,EAAA,EAAA,UAAA,EAAA,EAAA,iBAAA,EAAA,YAAA,EAAA,UAAA,EAAA,YAAA,EAAA,QAAA,EAAA,IAAA,EAAA,UAAA,EAAA,KAAA,EAAA,iBAAA,EAAA,IAAA,EAAA,EAAA,OAAA,EAAA,EAAA,iBAAA,EAAA,SAAA,EAAA,UAAA,EAAA,SAAA,EAAA,QAAA,EAAA,IAAA,EAAA,UAAA,EAAA,KAAA,EAAA,iBAAA,EAAA,IAAA,EAAA,EAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA,CAAA;;2FAAnB,mBAAmB,EAAA,UAAA,EAAA,CAAA;kBADxC;;;ACtBD;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"ng-doc-app-components-playground.mjs","sources":["../../../../libs/app/components/playground/playground-demo/playground-demo.component.ts","../../../../libs/app/components/playground/playground-demo/playground-demo.component.html","../../../../libs/app/components/playground/playground-property/playground-property.component.ts","../../../../libs/app/components/playground/playground-property/playground-property.component.html","../../../../libs/app/components/playground/playground-properties/playground-properties.component.ts","../../../../libs/app/components/playground/playground-properties/playground-properties.component.html","../../../../libs/app/components/playground/playground.component.ts","../../../../libs/app/components/playground/playground.component.html","../../../../libs/app/components/playground/base-playground.ts","../../../../libs/app/components/playground/ng-doc-app-components-playground.ts"],"sourcesContent":["import {\n ChangeDetectionStrategy,\n Component,\n ComponentRef,\n DestroyRef,\n inject,\n InjectionToken,\n Injector,\n input,\n InputSignal,\n OnChanges,\n OnDestroy,\n PendingTasks,\n Signal,\n signal,\n SimpleChanges,\n Type,\n viewChild,\n ViewContainerRef,\n} from '@angular/core';\nimport { takeUntilDestroyed } from '@angular/core/rxjs-interop';\nimport { FormGroup } from '@angular/forms';\nimport { NgDocDemoDisplayerComponent } from '@ng-doc/app/components/demo-displayer';\nimport { formatHtml } from '@ng-doc/app/helpers';\nimport { getPlaygroundDemoToken } from '@ng-doc/app/providers/playground-demo';\nimport { NgDocFormPartialValue } from '@ng-doc/app/types';\nimport {\n buildPlaygroundDemoPipeTemplate,\n buildPlaygroundDemoTemplate,\n} from '@ng-doc/core/helpers/build-playground-demo-template';\nimport { objectKeys } from '@ng-doc/core/helpers/object-keys';\nimport { stringify } from '@ng-doc/core/helpers/stringify';\nimport { NgDocPlaygroundConfig, NgDocPlaygroundProperties } from '@ng-doc/core/interfaces';\nimport { Subject } from 'rxjs';\nimport { startWith, takeUntil } from 'rxjs/operators';\n\nimport { NgDocBasePlayground } from '../base-playground';\nimport { NgDocPlaygroundForm } from '../playground-form';\n\n/**\n * One demo of a playground: it creates the generated playground class of its selector (or pipe),\n * passes it the form's values and shows the code of the current state.\n */\n@Component({\n selector: 'ng-doc-playground-demo',\n templateUrl: './playground-demo.component.html',\n styleUrls: ['./playground-demo.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n imports: [NgDocDemoDisplayerComponent],\n})\nexport class NgDocPlaygroundDemoComponent<\n T extends NgDocPlaygroundProperties = NgDocPlaygroundProperties,\n >\n implements OnChanges, OnDestroy\n{\n /** The name of the playground in the page configuration. */\n readonly id: InputSignal<string> = input<string>('');\n\n /** The name of the pipe, when the target is a pipe. */\n readonly pipeName: InputSignal<string> = input<string>('');\n\n /** The selector of the target this demo renders. */\n readonly selector: InputSignal<string> = input<string>('');\n\n /** The playground configuration, extended by the action's options. */\n readonly configuration: InputSignal<NgDocPlaygroundConfig | undefined> = input<\n NgDocPlaygroundConfig | undefined\n >(undefined);\n\n /** The inputs of the target. */\n readonly properties: InputSignal<T | undefined> = input<T | undefined>(undefined);\n\n /** Whether the demo is created again each time a value changes. */\n readonly recreateDemo: InputSignal<boolean> = input<boolean>(false);\n\n /** The values of the inputs and content slots. */\n readonly form: InputSignal<FormGroup<NgDocPlaygroundForm> | undefined> = input<\n FormGroup<NgDocPlaygroundForm> | undefined\n >(undefined);\n\n /** Whether the code of the demo is shown. */\n readonly expanded: InputSignal<boolean> = input<boolean>(false);\n\n /** Where the playground class is created. */\n readonly demoOutlet: Signal<ViewContainerRef | undefined> = viewChild('demoOutlet', {\n read: ViewContainerRef,\n });\n\n /** The generated playground class of this demo's selector or pipe. */\n playgroundDemo?: typeof NgDocBasePlayground;\n\n protected readonly code = signal('');\n\n protected readonly injector = inject(Injector);\n protected readonly destroyRef = inject(DestroyRef);\n private readonly pendingTasks = inject(PendingTasks);\n\n private demoRef?: ComponentRef<NgDocBasePlayground>;\n private readonly unsubscribe$: Subject<void> = new Subject<void>();\n\n async ngOnChanges({ form, id }: SimpleChanges): Promise<void> {\n if (form || id) {\n this.unsubscribe$.next();\n\n const demoInjector: InjectionToken<Array<typeof NgDocBasePlayground>> | undefined =\n getPlaygroundDemoToken(this.id());\n\n if (demoInjector) {\n const demos: Array<typeof NgDocBasePlayground> = this.injector.get(demoInjector, []);\n\n this.playgroundDemo = demos.find(\n (demo: typeof NgDocBasePlayground) =>\n demo.selector === this.selector() || demo.selector === this.pipeName(),\n );\n }\n\n await this.updateDemo();\n\n const form = this.form();\n\n form?.valueChanges\n .pipe(\n startWith(form.value),\n takeUntil(this.unsubscribe$),\n takeUntilDestroyed(this.destroyRef),\n )\n .subscribe((data: NgDocFormPartialValue<FormGroup<NgDocPlaygroundForm>>) =>\n this.updateDemo(data),\n );\n }\n }\n\n private async updateDemo(\n data?: NgDocFormPartialValue<FormGroup<NgDocPlaygroundForm>>,\n ): Promise<void> {\n if (this.recreateDemo() || !this.demoRef) {\n this.createDemo();\n }\n\n if (data) {\n this.demoRef?.setInput('properties', data.properties ?? {});\n this.demoRef?.setInput('content', data.content ?? {});\n this.demoRef?.setInput('actionData', this.configuration()?.data ?? {});\n\n if (this.recreateDemo()) {\n this.demoRef?.instance.onReattached.subscribe(() => {\n this.demoRef?.changeDetectorRef.detectChanges();\n });\n }\n }\n\n await this.updateCodeView();\n }\n\n private createDemo(): void {\n if (this.playgroundDemo) {\n this.demoRef?.destroy();\n this.demoRef = this.demoOutlet()?.createComponent(\n this.playgroundDemo as unknown as Type<NgDocBasePlayground>,\n );\n this.demoRef?.changeDetectorRef.markForCheck();\n }\n }\n\n private async updateCodeView(): Promise<void> {\n const template: string = this.pipeName()\n ? buildPlaygroundDemoPipeTemplate(\n this.configuration()?.template ?? '',\n this.pipeName(),\n this.getActiveContent(),\n this.getPipeActiveInputs(),\n )\n : buildPlaygroundDemoTemplate(\n this.configuration()?.template ?? '',\n this.selector(),\n this.getActiveContent(),\n this.getActiveInputs(),\n );\n\n // Formatting loads the formatter asynchronously. Zoneless SSR waits only for pending tasks, so\n // the page would otherwise be serialized before the code view is filled.\n const done = this.pendingTasks.add();\n\n try {\n this.code.set(await formatHtml(template));\n } finally {\n done();\n }\n }\n\n private getActiveContent(): Record<string, string> {\n const formData: Record<string, boolean> =\n (this.form()?.controls.content.value as Record<string, boolean>) ?? {};\n\n return objectKeys(formData).reduce((result: Record<string, string>, key: string) => {\n result[key] = formData[key] ? this.configuration()?.content?.[key].template ?? '' : '';\n\n return result;\n }, {});\n }\n\n private getActiveInputs(): Record<string, string> {\n const formData: Record<string, unknown> =\n (this.form()?.controls.properties.value as Record<string, unknown>) ?? {};\n\n return objectKeys(formData).reduce((result: Record<string, string>, key: string) => {\n const inputName = this.properties()?.[key]?.inputName ?? key;\n const value: unknown = formData[key];\n const property: unknown | undefined = this.demoRef?.instance?.defaultValues[key];\n\n if (property !== value) {\n result[inputName] = stringify(value).replace(/\"/g, `'`);\n }\n\n return result;\n }, {});\n }\n\n private getPipeActiveInputs(): Record<string, string> {\n const formData: Record<string, unknown> =\n (this.form()?.controls.properties.value as Record<string, unknown>) ?? {};\n let changedInputIndex: number = -1;\n\n return objectKeys(formData)\n .map((key: string, i: number) => {\n const value: unknown = formData[key];\n const defaultValue: unknown | undefined = this.demoRef?.instance?.defaultValues[key];\n\n if (defaultValue !== value) {\n changedInputIndex = i;\n }\n\n return key;\n })\n .slice(0, changedInputIndex + 1)\n .reduce((result: Record<string, string>, key: string) => {\n result[key] = stringify(formData[key]).replace(/\"/g, `'`);\n\n return result;\n }, {});\n }\n\n ngOnDestroy(): void {\n this.unsubscribe$.next();\n this.unsubscribe$.complete();\n }\n}\n","<ng-doc-demo-displayer\n [code]=\"code()\"\n [border]=\"false\"\n [expanded]=\"expanded()\"\n language=\"angular-html\">\n <ng-container #demoOutlet></ng-container>\n</ng-doc-demo-displayer>\n","import { NgTemplateOutlet } from '@angular/common';\nimport {\n ChangeDetectionStrategy,\n Component,\n ComponentRef,\n computed,\n DestroyRef,\n effect,\n inject,\n input,\n reflectComponentType,\n Signal,\n signal,\n untracked,\n viewChild,\n ViewContainerRef,\n} from '@angular/core';\nimport { FormControl } from '@angular/forms';\nimport { NgDocKindIconComponent } from '@ng-doc/app/components/kind-icon';\nimport { isPlaygroundProperty, resolvePlaygroundOption } from '@ng-doc/app/helpers';\nimport {\n NgDocProvidedTypeControl,\n NgDocTypeControl,\n NgDocTypeControlProviderOptions,\n} from '@ng-doc/app/interfaces';\nimport { NgDocSanitizeHtmlPipe } from '@ng-doc/app/pipes';\nimport {\n NgDocPlaygroundContent,\n NgDocPlaygroundOption,\n NgDocPlaygroundProperty,\n} from '@ng-doc/core/interfaces';\nimport { NgDocLabelComponent, NgDocTooltipDirective } from '@ng-doc/ui-kit';\n\nlet nextId = 0;\n\n/** Value types that have a chip colour. */\nconst CHIP_TYPES: ReadonlySet<string> = new Set([\n 'string',\n 'number',\n 'boolean',\n 'object',\n 'null',\n 'undefined',\n]);\n\n/**\n * One row of the playground inspector: the input's name with its type chip, and the type\n * control that edits it, bound to the input's form control.\n */\n@Component({\n selector: 'ng-doc-playground-property',\n templateUrl: './playground-property.component.html',\n styleUrls: ['./playground-property.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n imports: [\n NgDocLabelComponent,\n NgDocTooltipDirective,\n NgDocSanitizeHtmlPipe,\n NgDocKindIconComponent,\n NgTemplateOutlet,\n ],\n host: {\n '[attr.data-has-property-control]': 'hasPropertyControl()',\n },\n})\nexport class NgDocPlaygroundPropertyComponent {\n /** Name of the input. */\n readonly name = input<string>('');\n\n /** The input, or the content slot. */\n readonly property = input<NgDocPlaygroundProperty | NgDocPlaygroundContent | undefined>(\n undefined,\n );\n\n /** The type control that edits the input. */\n readonly typeControl = input<NgDocProvidedTypeControl | undefined>(undefined);\n\n /** Form control of the input. */\n readonly control = input<FormControl | undefined>(undefined);\n\n /** Default value of the input. */\n readonly defaultValue = input<unknown>(undefined);\n\n /** Whether a type control is rendered. */\n readonly hasPropertyControl = signal<boolean>(false);\n\n /** Description of the input, shown in the tooltip of its name. */\n protected readonly tooltipContent: Signal<string> = computed(() => {\n const property: NgDocPlaygroundProperty | NgDocPlaygroundContent | undefined = this.property();\n\n return property && isPlaygroundProperty(property) ? property.description ?? '' : '';\n });\n\n /** Options of the type control provider. */\n protected readonly option: Signal<NgDocTypeControlProviderOptions | undefined> = computed(\n () => this.typeControl()?.options,\n );\n\n /** The value type shown as a chip under the name, or an empty string. */\n protected readonly typeChip: Signal<string> = computed(() => valueType(this.property()));\n\n /** Whether the row is a `<label>` around the control, unless its provider opts out. */\n protected readonly labelWrapper: Signal<boolean> = computed(\n () => this.option()?.labelWrapper !== false,\n );\n\n /** ID of the caption that names the control of a row without the `<label>`. */\n protected readonly captionId: string = `ng-doc-playground-property-caption-${nextId++}`;\n\n // The outlet is in the `<label>` or in the `<div>` of the row, so the query follows the branch.\n private readonly propertyOutlet = viewChild('propertyOutlet', { read: ViewContainerRef });\n\n private propertyTypeControl?: ComponentRef<NgDocTypeControl>;\n\n constructor() {\n // A plain effect, not an after-render hook: it runs during change detection on the server\n // too, so server-rendered and prerendered pages include the controls. The outlet is inside\n // the row's `@if` branch, so the query reports it once the branch renders, and the effect\n // runs again then. It also runs again when an input it reads changes.\n effect(() => {\n const outlet: ViewContainerRef | undefined = this.propertyOutlet();\n const property = this.property();\n const typeControl: NgDocProvidedTypeControl | undefined = this.typeControl();\n const control: FormControl | undefined = this.control();\n const defaultValue: unknown = this.defaultValue();\n\n if (outlet) {\n untracked(() => this.createControl(outlet, property, typeControl, control, defaultValue));\n }\n });\n\n inject(DestroyRef).onDestroy(() => this.propertyTypeControl?.destroy());\n }\n\n private createControl(\n outlet: ViewContainerRef,\n property: NgDocPlaygroundProperty | NgDocPlaygroundContent | undefined,\n typeControl: NgDocProvidedTypeControl | undefined,\n formControl: FormControl | undefined,\n defaultValue: unknown,\n ): void {\n if (!property || !typeControl) {\n return;\n }\n\n this.propertyTypeControl?.destroy();\n\n const control: ComponentRef<NgDocTypeControl> = outlet.createComponent(typeControl.control);\n\n this.propertyTypeControl = control;\n setTypeControlField(control, 'name', this.name());\n setTypeControlField(control, 'description', this.tooltipContent());\n setTypeControlField(\n control,\n 'options',\n isPlaygroundProperty(property) ? property.options : undefined,\n );\n setTypeControlField(control, 'default', defaultValue);\n setTypeControlField(\n control,\n 'isManual',\n isPlaygroundProperty(property) ? property.isManual : undefined,\n );\n control.instance.writeValue(formControl?.value);\n\n if (formControl) {\n formControl.registerOnChange((value: unknown) => control.instance.writeValue(value));\n control.instance.registerOnChange((value: unknown) => formControl.setValue(value));\n control.instance.registerOnTouched(() => formControl.markAsTouched());\n }\n\n this.hasPropertyControl.set(true);\n }\n}\n\n/**\n * The value type of an input: its declared type when it is a primitive, else the type of the first\n * value of its type alias. Content slots are booleans.\n * @param property - The input or the content slot.\n */\nfunction valueType(property: NgDocPlaygroundProperty | NgDocPlaygroundContent | undefined): string {\n if (!property) {\n return '';\n }\n\n if (!isPlaygroundProperty(property)) {\n return 'boolean';\n }\n\n if (CHIP_TYPES.has(property.type)) {\n return property.type;\n }\n\n const option: string | NgDocPlaygroundOption | undefined = property.options?.[0];\n\n if (option !== undefined) {\n try {\n const type: string = typeof resolvePlaygroundOption(option, property.isManual).value;\n\n return CHIP_TYPES.has(type) ? type : '';\n } catch {\n return '';\n }\n }\n\n return '';\n}\n\n/**\n * Sets a field of a type control: through `ComponentRef.setInput()` when the control declares it\n * as an input (a signal input or a decorator input), otherwise by assigning the plain field.\n * @param control - The created type control.\n * @param field - Name of the field.\n * @param value - Value to set.\n */\nfunction setTypeControlField(\n control: ComponentRef<NgDocTypeControl>,\n field: keyof NgDocTypeControl,\n value: unknown,\n): void {\n const input = reflectComponentType(control.componentType)?.inputs.find(\n ({ propName }: { propName: string }) => propName === field,\n );\n\n if (input) {\n control.setInput(input.templateName, value);\n } else {\n (control.instance as unknown as Record<string, unknown>)[field] = value;\n }\n}\n","@if (labelWrapper()) {\n <label\n class=\"ng-doc-playground-property-label\"\n [class.with-label]=\"!option()?.hideLabel\"\n [ng-doc-label]=\"option()?.hideLabel ? '' : labelContent\">\n <ng-container #propertyOutlet></ng-container>\n </label>\n} @else {\n <!-- A control with several interactive parts: a label would forward clicks on them to the first\n of them, so the caption names the control through aria-labelledby instead. -->\n <div\n class=\"ng-doc-playground-property-label ng-doc-playground-property-group\"\n role=\"group\"\n [class.with-label]=\"!option()?.hideLabel\"\n [attr.aria-labelledby]=\"option()?.hideLabel ? null : captionId\">\n @if (!option()?.hideLabel) {\n <span class=\"ng-doc-label\" [id]=\"captionId\">\n <ng-container [ngTemplateOutlet]=\"labelContent\"></ng-container>\n </span>\n }\n <span class=\"ng-doc-content\">\n <ng-container #propertyOutlet></ng-container>\n </span>\n </div>\n}\n<ng-template #labelContent>\n <span\n class=\"ng-doc-playground-property-name\"\n [ngDocTooltip]=\"tooltipTemplate\"\n [canOpen]=\"!!tooltipContent()\"\n [positions]=\"['left-center', 'top-right', 'bottom-right']\"\n >{{ name() }}</span\n >\n @if (typeChip(); as type) {\n <ng-doc-kind-icon [kind]=\"type\" type=\"type\"></ng-doc-kind-icon>\n }\n <ng-template #tooltipTemplate>\n <div [innerHTML]=\"tooltipContent() | ngDocSanitizeHtml\"></div>\n </ng-template>\n</ng-template>\n","import { KeyValuePipe } from '@angular/common';\nimport {\n ChangeDetectionStrategy,\n Component,\n computed,\n inject,\n InjectionToken,\n Injector,\n input,\n isDevMode,\n model,\n output,\n Signal,\n} from '@angular/core';\nimport { FormControl, FormGroup, FormsModule } from '@angular/forms';\nimport { isPlaygroundProperty, resolvePlaygroundOption } from '@ng-doc/app/helpers';\nimport { NgDocProvidedTypeControl } from '@ng-doc/app/interfaces';\nimport { getTokenForType } from '@ng-doc/app/providers/type-control';\nimport { isPresent } from '@ng-doc/core/helpers/is-present';\nimport { objectKeys } from '@ng-doc/core/helpers/object-keys';\nimport {\n NgDocPlaygroundContent,\n NgDocPlaygroundOption,\n NgDocPlaygroundProperties,\n NgDocPlaygroundProperty,\n} from '@ng-doc/core/interfaces';\nimport {\n NgDocBindPipe,\n NgDocCheckboxComponent,\n NgDocExecutePipe,\n NgDocIconComponent,\n NgDocTooltipDirective,\n} from '@ng-doc/ui-kit';\n\nimport { NgDocPlaygroundForm } from '../playground-form';\nimport { NgDocPlaygroundPropertyComponent } from '../playground-property/playground-property.component';\nimport { NgDocPlaygroundPropertyControl } from '../playground-property-control';\n\n/**\n * Orders inputs without an `order` by name in English whatever the locale, so a prerendered\n * playground does not depend on the machine that built it.\n */\nconst INPUT_ORDER = new Intl.Collator('en');\n\n/**\n * The playground inspector: the demos, and beside them (below them in a container narrower than\n * 640px) the Recreate setting and a control per input and content slot.\n */\n@Component({\n selector: 'ng-doc-playground-properties',\n templateUrl: './playground-properties.component.html',\n styleUrls: ['./playground-properties.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n imports: [\n NgDocCheckboxComponent,\n FormsModule,\n NgDocTooltipDirective,\n NgDocIconComponent,\n NgDocPlaygroundPropertyComponent,\n KeyValuePipe,\n NgDocBindPipe,\n NgDocExecutePipe,\n ],\n})\nexport class NgDocPlaygroundPropertiesComponent<\n P extends NgDocPlaygroundProperties,\n C extends Record<string, NgDocPlaygroundContent>,\n> {\n private readonly injector = inject(Injector);\n\n /** The form of the playground. */\n readonly form = input.required<FormGroup<NgDocPlaygroundForm>>();\n\n /** The inputs of the playground's target. */\n readonly properties = input<P | undefined>(undefined);\n\n /** Inputs that get no control. */\n readonly ignoreInputs = input<string[] | undefined>([]);\n\n /** Content slots of the playground. */\n readonly dynamicContent = input<C | undefined>(undefined);\n\n /** Default values of the inputs; the inspector renders once they are known. */\n readonly defaultValues = input<Record<string, unknown> | undefined>(undefined);\n\n /** Whether the inspector is hidden, leaving the demos only. */\n readonly hideSidePanel = input<boolean>(false);\n\n /** Where the inspector goes: right of the demos, or below them at full width. */\n readonly inspectorPosition = input<'right' | 'bottom'>('right');\n\n /** Whether the demo is recreated each time an input changes. */\n readonly recreateDemo = model<boolean>(false);\n\n /** Whether the Recreate setting is fixed by the playground's options and hidden. */\n readonly recreateLocked = input<boolean>(false);\n\n /** Whether the Reset button is shown. */\n readonly showResetButton = input<boolean>(false);\n\n /** Emits when the reader resets the form. */\n readonly resetForm = output<void>();\n\n /** The control of each input, in display order. */\n protected readonly propertyControls: Signal<NgDocPlaygroundPropertyControl[]> = computed(() => {\n const properties: P | undefined = this.properties();\n const ignoreInputs: string[] | undefined = this.ignoreInputs();\n\n if (!properties) {\n return [];\n }\n\n return objectKeys(properties)\n .filter((key: keyof P) => ignoreInputs?.includes(String(key)) !== true)\n .map((key: keyof P) => {\n const property: NgDocPlaygroundProperty = properties[key];\n const typeControl: NgDocProvidedTypeControl | undefined = this.getTypeControl(property);\n\n return typeControl ? { propertyName: String(key), property, typeControl } : null;\n })\n .filter(isPresent)\n .sort(\n (a: NgDocPlaygroundPropertyControl, b: NgDocPlaygroundPropertyControl) =>\n compareOrder(a.property.order, b.property.order) ?? compareByTypeControl(a, b),\n );\n });\n\n /**\n * The controls in sections: the inputs without a group first, then a section per group, in the\n * order of the group's first input.\n */\n protected readonly propertySections: Signal<NgDocPlaygroundPropertySection[]> = computed(() => {\n const sections = new Map<string | undefined, NgDocPlaygroundPropertyControl[]>([\n [undefined, []],\n ]);\n\n for (const control of this.propertyControls()) {\n const group: string | undefined = control.property.group || undefined;\n\n sections.set(group, [...(sections.get(group) ?? []), control]);\n }\n\n return Array.from(sections, ([group, controls]) => ({\n title: group ?? 'Settings',\n controls,\n })).filter((section: NgDocPlaygroundPropertySection) => section.controls.length > 0);\n });\n\n /** The control of content slots. */\n protected readonly contentTypeControl?: NgDocProvidedTypeControl =\n this.getControlForType('boolean');\n\n /**\n * The form control of an input or a content slot.\n * @param controlType - `properties` or `content`.\n * @param key - Name of the input or slot.\n */\n getFormControl(controlType: keyof NgDocPlaygroundForm, key: string): FormControl {\n return this.form().get(controlType)?.get(key) as FormControl;\n }\n\n private getTypeControl(property: NgDocPlaygroundProperty): NgDocProvidedTypeControl | undefined {\n const type: string = property.type;\n const primitive: string | undefined = optionalPrimitive(type);\n const typeControl: NgDocProvidedTypeControl | undefined =\n this.getControlForType(type) ??\n (primitive ? this.getControlForType(primitive) : undefined) ??\n this.getControlForTypeAlias(\n isPlaygroundProperty(property) ? property.options : undefined,\n property.isManual,\n );\n\n if (!typeControl && isDevMode()) {\n console.warn(\n `NgDocPlayground didn't find the control for the @Input \"${property.inputName}\", the type \"${type}\" was not recognized'`,\n );\n }\n\n return typeControl;\n }\n\n private getControlForType(type: string): NgDocProvidedTypeControl | undefined {\n const token: InjectionToken<NgDocProvidedTypeControl> | undefined = getTokenForType(type);\n\n return token ? this.injector.get(token) : undefined;\n }\n\n private getControlForTypeAlias(\n options?: Array<string | NgDocPlaygroundOption>,\n isManual?: boolean,\n ): NgDocProvidedTypeControl | undefined {\n if (options && options.length) {\n let optionsIsValid: boolean = true;\n\n try {\n // checking that all values are extractable\n options.forEach((item: string | NgDocPlaygroundOption) =>\n resolvePlaygroundOption(item, isManual),\n );\n } catch {\n optionsIsValid = false;\n }\n\n if (optionsIsValid) {\n const token: InjectionToken<NgDocProvidedTypeControl> | undefined =\n getTokenForType('NgDocTypeAlias');\n\n return token ? this.injector.get(token) : undefined;\n }\n }\n\n return undefined;\n }\n}\n\n/** A titled list of controls in the inspector. */\ninterface NgDocPlaygroundPropertySection {\n title: string;\n controls: NgDocPlaygroundPropertyControl[];\n}\n\n/**\n * Compares the `order` of two inputs from the playground's `controls`: inputs with one come first,\n * lowest first.\n * @param a - The first input's order.\n * @param b - The second input's order.\n * @returns The comparison, or `undefined` when neither input has an order or both have the same.\n */\nfunction compareOrder(a: number | undefined, b: number | undefined): number | undefined {\n if (isPresent(a) && isPresent(b)) {\n return a - b || undefined;\n }\n if (isPresent(a)) {\n return -1;\n }\n if (isPresent(b)) {\n return 1;\n }\n return undefined;\n}\n\n/**\n * Compares two inputs by the order of their type controls: controls with an order first, lowest\n * first (equal orders keep the inputs' order), then the others by name.\n * @param a - The first input.\n * @param b - The second input.\n */\nfunction compareByTypeControl(\n a: NgDocPlaygroundPropertyControl,\n b: NgDocPlaygroundPropertyControl,\n): number {\n const aOrder: number | undefined = a.typeControl.options?.order;\n const bOrder: number | undefined = b.typeControl.options?.order;\n\n if (isPresent(aOrder) && isPresent(bOrder)) {\n return aOrder - bOrder;\n }\n if (isPresent(aOrder)) {\n return -1;\n }\n if (isPresent(bOrder)) {\n return 1;\n }\n return INPUT_ORDER.compare(a.property.inputName, b.property.inputName);\n}\n\n/** The types whose control also edits an optional or nullable input of the type. */\nconst PRIMITIVE_TYPES: ReadonlySet<string> = new Set(['string', 'number', 'boolean']);\n\n/**\n * The primitive of an optional or nullable primitive input type, such as `string` of\n * `string | undefined` (an optional `@Input() label?: string`, `input<string>()` or\n * `model<string>()`) or of `number | null`, so that the input gets the primitive's control.\n * Other types are matched by their exact name only: a custom control registered for `Position`\n * does not receive the `undefined` of a `Position | undefined` input unless it is registered for\n * that type too.\n * @param type - The input type as the builder printed it.\n * @returns The primitive, or `undefined` when the type is not one.\n */\nfunction optionalPrimitive(type: string): string | undefined {\n const members: string[] = type.split('|').map((member: string) => member.trim());\n const rest: string[] = members.filter(\n (member: string) => member !== 'undefined' && member !== 'null',\n );\n\n return rest.length === 1 && rest.length < members.length && PRIMITIVE_TYPES.has(rest[0])\n ? rest[0]\n : undefined;\n}\n","@if (defaultValues(); as defaultValues) {\n <div\n class=\"ng-doc-playground-properties-wrapper\"\n [class.no-side-panel]=\"hideSidePanel()\"\n [class.inspector-bottom]=\"inspectorPosition() === 'bottom'\">\n <div class=\"ng-doc-playground-demos\">\n <ng-content></ng-content>\n </div>\n @if (!hideSidePanel()) {\n <div class=\"ng-doc-playground-properties\">\n <div class=\"ng-doc-playground-header\">\n <h4>Playground</h4>\n @if (showResetButton()) {\n <button type=\"button\" class=\"ng-doc-playground-reset\" (click)=\"resetForm.emit()\">\n Reset\n </button>\n }\n </div>\n @if (!recreateLocked()) {\n <div class=\"ng-doc-playground-setting\">\n <ng-doc-checkbox [ngModel]=\"recreateDemo()\" (ngModelChange)=\"recreateDemo.set($event)\">\n Recreate\n </ng-doc-checkbox>\n <ng-doc-icon\n class=\"ng-doc-playground-info\"\n icon=\"info\"\n role=\"img\"\n aria-label=\"Recreates the demo every time one of the inputs changes\"\n [ngDocTooltip]=\"'Recreates the demo every time one of the inputs changes'\"\n [positions]=\"['bottom-right', 'left-center']\"></ng-doc-icon>\n </div>\n }\n <div class=\"ng-doc-playground-divider\"></div>\n @for (section of propertySections(); track $index) {\n <h5 class=\"ng-doc-title\">{{ section.title }}</h5>\n <div class=\"ng-doc-playground-property-list\">\n @for (propertyControl of section.controls; track propertyControl.propertyName) {\n <ng-doc-playground-property\n [name]=\"propertyControl.property.label ?? propertyControl.property.inputName\"\n [property]=\"propertyControl.property\"\n [typeControl]=\"propertyControl.typeControl\"\n [defaultValue]=\"defaultValues[propertyControl.propertyName]\"\n [control]=\"\n getFormControl | bind: this | execute: 'properties' : propertyControl.propertyName\n \">\n </ng-doc-playground-property>\n }\n </div>\n }\n @if ((dynamicContent() | keyvalue)?.length) {\n <h5 class=\"ng-doc-title\">Content</h5>\n <div class=\"ng-doc-playground-property-list\">\n @for (content of dynamicContent() | keyvalue; track content.key) {\n <ng-doc-playground-property\n [name]=\"content.value.label\"\n [property]=\"content.value\"\n [typeControl]=\"contentTypeControl\"\n [control]=\"getFormControl | bind: this | execute: 'content' : content.key\">\n </ng-doc-playground-property>\n }\n </div>\n }\n </div>\n }\n </div>\n}\n","import {\n AfterViewInit,\n ChangeDetectionStrategy,\n Component,\n computed,\n inject,\n input,\n InputSignal,\n linkedSignal,\n Signal,\n signal,\n WritableSignal,\n} from '@angular/core';\nimport { FormBuilder, FormGroup } from '@angular/forms';\nimport { NgDocRootPage } from '@ng-doc/app/classes/root-page';\nimport { isSameObject } from '@ng-doc/core/helpers/is-same-object';\nimport { objectKeys } from '@ng-doc/core/helpers/object-keys';\nimport {\n NgDocPlaygroundConfig,\n NgDocPlaygroundOptions,\n NgDocPlaygroundProperties,\n} from '@ng-doc/core/interfaces';\nimport { NgDocAsArrayPipe } from '@ng-doc/ui-kit';\n\nimport { NgDocPlaygroundDemoComponent } from './playground-demo/playground-demo.component';\nimport { NgDocPlaygroundForm } from './playground-form';\nimport { NgDocPlaygroundPropertiesComponent } from './playground-properties/playground-properties.component';\n\n/**\n * A playground: an inspector with a control per input and content slot of its target, and a demo\n * per selector (or the pipe) rendered with the chosen values.\n */\n@Component({\n selector: 'ng-doc-playground',\n templateUrl: './playground.component.html',\n styleUrls: ['./playground.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n imports: [NgDocPlaygroundPropertiesComponent, NgDocPlaygroundDemoComponent, NgDocAsArrayPipe],\n})\nexport class NgDocPlaygroundComponent<\n T extends NgDocPlaygroundProperties = NgDocPlaygroundProperties,\n> implements AfterViewInit\n{\n private readonly rootPage = inject(NgDocRootPage);\n private readonly formBuilder = inject(FormBuilder);\n\n /** The name of the playground in the page configuration. */\n readonly id: InputSignal<string> = input.required<string>();\n\n /** The name of the pipe, when the target is a pipe. */\n readonly pipeName: InputSignal<string> = input<string>('');\n\n /** The selectors of the target to render a demo for. */\n readonly selectors: InputSignal<string[]> = input<string[]>([]);\n\n /** The inputs of the target. */\n readonly properties: InputSignal<T | undefined> = input<T | undefined>(undefined);\n\n /** Options of the playground action; they extend the playground configuration. */\n readonly options: InputSignal<NgDocPlaygroundOptions> = input<NgDocPlaygroundOptions>({});\n\n /** The values of the inputs and content slots. */\n readonly formGroup: WritableSignal<FormGroup<NgDocPlaygroundForm> | undefined> =\n signal(undefined);\n\n /** The default values of the target's inputs, reported by the first demo. */\n readonly defaultValues: WritableSignal<Record<string, unknown> | undefined> = signal(undefined);\n\n /** The playground configuration of the page, extended by the options. */\n readonly configuration: Signal<NgDocPlaygroundConfig> = computed(() =>\n Object.assign({}, this.rootPage.page?.playgrounds?.[this.id()], this.options()),\n );\n\n /**\n * Whether the demo is created again each time a value changes. It starts from the `recreate`\n * option; the reader can change it unless the option is `'always'`.\n */\n readonly recreateDemo: WritableSignal<boolean> = linkedSignal(\n () => !!this.configuration().recreate,\n );\n\n /** Whether the Recreate setting is fixed on, and hidden, by the `'always'` option. */\n readonly recreateLocked: Signal<boolean> = computed(\n () => this.configuration().recreate === 'always',\n );\n\n private defaultProperties: Record<string, unknown> = {};\n private defaultContent: Record<string, boolean> = {};\n\n ngAfterViewInit(): void {\n this.defaultProperties = this.getPropertiesFormValues();\n this.defaultContent = this.getContentFormValues();\n\n // `FormBuilder` reads an array as `[value, validators]`, so each value is wrapped: the default\n // of an array input is the value of its control.\n const propertiesForm: FormGroup = this.formBuilder.group(\n Object.fromEntries(\n Object.entries(this.defaultProperties).map(([key, value]) => [key, [value]]),\n ),\n );\n const contentForm: FormGroup = this.formBuilder.group(this.defaultContent);\n const formGroup: FormGroup<NgDocPlaygroundForm> = this.formBuilder.group({\n properties: propertiesForm,\n content: contentForm,\n });\n\n // `patchValue` is needed to set `undefined` values, otherwise they will be ignored by the Angular form\n formGroup.patchValue({\n properties: Object.assign({}, this.defaultProperties, this.configuration().inputs),\n content: this.defaultContent,\n });\n this.formGroup.set(formGroup);\n }\n\n protected isDefaultState(): boolean {\n const formGroup = this.formGroup();\n\n if (!formGroup) {\n return false;\n }\n\n return (\n isSameObject(formGroup.value.properties ?? {}, this.defaultValues() ?? {}) &&\n isSameObject(formGroup.value.content ?? {}, this.defaultContent ?? {})\n );\n }\n\n private getPropertiesFormValues(): Record<string, unknown> {\n const defaultValues = this.defaultValues();\n const formValues: Record<string, unknown> = objectKeys(this.properties() ?? {}).reduce(\n (controls: Record<string, unknown>, key: string) => {\n controls[key] = defaultValues ? defaultValues[key] : undefined;\n\n return controls;\n },\n {} as Record<string, unknown>,\n );\n\n return Object.assign({}, formValues, this.configuration().defaults);\n }\n\n private getContentFormValues(): Record<string, boolean> {\n return objectKeys(this.configuration().content ?? {}).reduce(\n (controls: Record<string, boolean>, key: string) => {\n controls[key] = false;\n\n return controls;\n },\n {} as Record<keyof T, boolean>,\n );\n }\n\n /** Sets every input and content slot back to its default value. */\n resetForm(): void {\n const formGroup = this.formGroup();\n\n formGroup?.reset({}, { emitEvent: false });\n formGroup?.patchValue({\n properties: this.defaultProperties,\n content: this.defaultContent,\n });\n }\n}\n","@if (configuration(); as configuration) {\n <ng-doc-playground-properties\n [form]=\"formGroup()!\"\n [properties]=\"properties()\"\n [ignoreInputs]=\"configuration.hiddenInputs\"\n [dynamicContent]=\"configuration.content\"\n [hideSidePanel]=\"configuration.hideSidePanel ?? false\"\n [inspectorPosition]=\"configuration.inspectorPosition ?? 'right'\"\n [defaultValues]=\"defaultValues()\"\n [showResetButton]=\"!isDefaultState()\"\n [(recreateDemo)]=\"recreateDemo\"\n [recreateLocked]=\"recreateLocked()\"\n (resetForm)=\"resetForm()\">\n @for (selector of configuration.selectors ?? selectors() | asArray; track selector) {\n <ng-doc-playground-demo\n [id]=\"id()\"\n [selector]=\"selector\"\n [properties]=\"properties()\"\n [configuration]=\"configuration\"\n [recreateDemo]=\"recreateDemo()\"\n [form]=\"formGroup()\"\n [expanded]=\"configuration.expanded ?? false\">\n </ng-doc-playground-demo>\n }\n @if (pipeName()) {\n <ng-doc-playground-demo\n [id]=\"id()\"\n [pipeName]=\"pipeName()\"\n [properties]=\"properties()\"\n [configuration]=\"configuration\"\n [recreateDemo]=\"recreateDemo()\"\n [form]=\"formGroup()\">\n </ng-doc-playground-demo>\n }\n </ng-doc-playground-properties>\n}\n","import {\n ChangeDetectorRef,\n Directive,\n inject,\n input,\n InputSignal,\n OnInit,\n Signal,\n ViewContainerRef,\n} from '@angular/core';\nimport { extractFunctionDefaults } from '@ng-doc/core/helpers/extract-function-defaults';\nimport { NgDocPlaygroundConfig } from '@ng-doc/core/interfaces';\nimport { Constructor } from '@ng-doc/core/types';\nimport { Observable, Subject, take } from 'rxjs';\n\nimport { NgDocPlaygroundComponent } from './playground.component';\n\n/**\n * Base class of the playground classes the builder generates, one per playground and selector.\n * A generated class renders the playground template with the target's inputs bound to\n * `properties()`, and queries the target with `viewChild()`.\n */\n@Directive()\nexport abstract class NgDocBasePlayground implements Pick<NgDocPlaygroundConfig, 'data'>, OnInit {\n static readonly selector: string = 'unknown';\n\n /** The class the playground shows: a component, a directive or a pipe. */\n abstract readonly target: Constructor<unknown>;\n\n /** The instance of the target in the playground template; a pipe has none. */\n abstract readonly playground: Signal<unknown>;\n\n /** The view container of the target in the playground template; a pipe has none. */\n abstract readonly viewContainerRef: Signal<ViewContainerRef | undefined>;\n\n /** The `data` of the playground configuration. */\n abstract readonly configData: Record<string, unknown>;\n\n /** Values of the target's inputs, by property name. */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n readonly properties: InputSignal<Record<string, any>> = input<Record<string, any>>({});\n\n /** The `data` given to the playground action; it extends the configuration's `data`. */\n readonly actionData: InputSignal<Record<string, unknown>> = input<Record<string, unknown>>({});\n\n /** Whether each content slot is shown, by slot name. */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n readonly content: InputSignal<Record<string, any>> = input<Record<string, any>>({});\n\n /** The default values of the target's inputs, read before the template binds them. */\n defaultValues: Record<string, unknown> = {};\n\n private readonly reattached: Subject<void> = new Subject<void>();\n private readonly playgroundContainer: NgDocPlaygroundComponent = inject(NgDocPlaygroundComponent);\n protected readonly changeDetectorRef: ChangeDetectorRef = inject(ChangeDetectorRef);\n\n constructor() {\n // The view is not checked until the default values of the target are read, so the\n // template's bindings cannot overwrite them first.\n this.changeDetectorRef.detach();\n }\n\n /** Emits once, after the view is attached again and checks the template's bindings. */\n get onReattached(): Observable<void> {\n return this.reattached.pipe(take(1));\n }\n\n /** The playground `data`: the configuration's data extended by the action's data. */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n get data(): any {\n return Object.assign({}, this.configData, this.actionData());\n }\n\n ngOnInit(): void {\n // The target is created with the view, but the view has not been checked yet, so its inputs\n // still hold their defaults. Signal inputs are read by calling them.\n const playground = this.playground() as Record<string, unknown> | undefined;\n\n if (playground) {\n this.defaultValues = Object.keys(playground).reduce(\n (values: Record<string, unknown>, key: string) => {\n try {\n const value: unknown = playground[key];\n\n values[key] = typeof value === 'function' ? value.call(playground) : value;\n } catch {\n // Some properties are getters or functions that throw without their context.\n }\n\n return values;\n },\n {},\n );\n } else if (this.target) {\n // A pipe: the defaults of its `transform` parameters after the value itself.\n const defaults = extractFunctionDefaults(\n (this.target.prototype as { transform: (...args: unknown[]) => unknown }).transform,\n );\n\n this.defaultValues = Object.keys(this.playgroundContainer.properties() ?? {}).reduce(\n (values: Record<string, unknown>, key: string, i: number) => {\n values[key] = defaults[i + 1];\n\n return values;\n },\n {},\n );\n } else {\n throw new Error('Playground is not defined or initialized');\n }\n\n if (!this.playgroundContainer.defaultValues()) {\n this.playgroundContainer.defaultValues.set(this.defaultValues);\n }\n\n // The demo sets the playground's inputs right after it creates this view; the view is\n // attached again once they are set, so its first check renders the playground's values.\n Promise.resolve().then(() => {\n this.changeDetectorRef.reattach();\n this.changeDetectorRef.markForCheck();\n this.reattached.next();\n });\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAuCA;;;AAGG;MAQU,4BAA4B,CAAA;AAPzC,IAAA,WAAA,GAAA;;QAaW,IAAA,CAAA,EAAE,GAAwB,KAAK,CAAS,EAAE;+EAAC;;QAG3C,IAAA,CAAA,QAAQ,GAAwB,KAAK,CAAS,EAAE;qFAAC;;QAGjD,IAAA,C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,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;kGAAnB,mBAAmB,EAAA,YAAA,EAAA,IAAA,EAAA,MAAA,EAAA,EAAA,UAAA,EAAA,EAAA,iBAAA,EAAA,YAAA,EAAA,UAAA,EAAA,YAAA,EAAA,QAAA,EAAA,IAAA,EAAA,UAAA,EAAA,KAAA,EAAA,iBAAA,EAAA,IAAA,EAAA,EAAA,UAAA,EAAA,EAAA,iBAAA,EAAA,YAAA,EAAA,UAAA,EAAA,YAAA,EAAA,QAAA,EAAA,IAAA,EAAA,UAAA,EAAA,KAAA,EAAA,iBAAA,EAAA,IAAA,EAAA,EAAA,OAAA,EAAA,EAAA,iBAAA,EAAA,SAAA,EAAA,UAAA,EAAA,SAAA,EAAA,QAAA,EAAA,IAAA,EAAA,UAAA,EAAA,KAAA,EAAA,iBAAA,EAAA,IAAA,EAAA,EAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA,CAAA;;2FAAnB,mBAAmB,EAAA,UAAA,EAAA,CAAA;kBADxC;;;ACtBD;;AAEG;;;;"}
|
|
@@ -2,7 +2,10 @@ import * as i0 from '@angular/core';
|
|
|
2
2
|
import { input, computed, ChangeDetectionStrategy, Component } from '@angular/core';
|
|
3
3
|
import { NgDocTabGroupComponent, NgDocTabComponent, NgDocIconComponent, NgDocExecutePipe } from '@ng-doc/ui-kit';
|
|
4
4
|
|
|
5
|
-
/**
|
|
5
|
+
/**
|
|
6
|
+
* Tabs of a page: grouped code blocks, or any content that Markdown wraps in
|
|
7
|
+
* `<ng-doc-tab group="…" name="…">` elements.
|
|
8
|
+
*/
|
|
6
9
|
class NgDocTabsComponent {
|
|
7
10
|
constructor() {
|
|
8
11
|
/** The tabs; their content is moved into the open panel. */
|
|
@@ -11,6 +14,19 @@ class NgDocTabsComponent {
|
|
|
11
14
|
/** Index of the tab that opens first: the one marked active, or the first. */
|
|
12
15
|
this.activeIndex = computed(() => Math.max(this.tabs().findIndex((tab) => tab.active), 0), /* @ts-ignore */
|
|
13
16
|
...(ngDevMode ? [{ debugName: "activeIndex" }] : /* istanbul ignore next */ []));
|
|
17
|
+
/**
|
|
18
|
+
* Whether the tabs hold page content rather than a code group. A code group has one code block
|
|
19
|
+
* per tab and is drawn as one framed code surface; content tabs are only a tab bar over their
|
|
20
|
+
* content, so a framed demo or code block inside them doesn't sit in a second frame.
|
|
21
|
+
*/
|
|
22
|
+
this.contentTabs = computed(() => this.tabs().some((tab) => tab.content.childElementCount !== 1 ||
|
|
23
|
+
!tab.content.firstElementChild?.matches('ng-doc-code, pre')), /* @ts-ignore */
|
|
24
|
+
...(ngDevMode ? [{ debugName: "contentTabs" }] : /* istanbul ignore next */ []));
|
|
25
|
+
}
|
|
26
|
+
ngOnInit() {
|
|
27
|
+
// The tabs processor leaves the contents on the page until every processor has run on them;
|
|
28
|
+
// only the open tab's content is shown, in the panel.
|
|
29
|
+
this.tabs().forEach((tab) => tab.content.remove());
|
|
14
30
|
}
|
|
15
31
|
/**
|
|
16
32
|
* Moves a tab's content into its panel.
|
|
@@ -21,11 +37,13 @@ class NgDocTabsComponent {
|
|
|
21
37
|
parent.appendChild(element);
|
|
22
38
|
}
|
|
23
39
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.2.1", ngImport: i0, type: NgDocTabsComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
24
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.2.1", type: NgDocTabsComponent, isStandalone: true, selector: "ng-doc-tabs", inputs: { tabs: { classPropertyName: "tabs", publicName: "tabs", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: "<ng-doc-tab-group [openedTab]=\"activeIndex()\">\n @for (tab of tabs(); track tab; let i = $index) {\n <ng-doc-tab [label]=\"label\" [content]=\"content\" [id]=\"i\">\n <ng-template #label>\n @if (tab.icon) {\n <ng-doc-icon [customIcon]=\"tab.icon\"></ng-doc-icon>\n }\n {{ tab.title }}\n </ng-template>\n <ng-template #content>\n <div #element>\n {{ appendElement | execute: tab.content : element }}\n </div>\n </ng-template>\n </ng-doc-tab>\n }\n</ng-doc-tab-group>\n", styles: [":host{display:block;border-radius:var(--ng-doc-tabs-border-radius);border:var(--ng-doc-tabs-border, 1px solid var(--ng-doc-border-color));
|
|
40
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.2.1", type: NgDocTabsComponent, isStandalone: true, selector: "ng-doc-tabs", inputs: { tabs: { classPropertyName: "tabs", publicName: "tabs", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class.ng-doc-content-tabs": "contentTabs()" } }, ngImport: i0, template: "<ng-doc-tab-group [openedTab]=\"activeIndex()\" [appearance]=\"contentTabs() ? 'plain' : 'framed'\">\n @for (tab of tabs(); track tab; let i = $index) {\n <ng-doc-tab [label]=\"label\" [content]=\"content\" [id]=\"i\">\n <ng-template #label>\n @if (tab.icon) {\n <ng-doc-icon [customIcon]=\"tab.icon\"></ng-doc-icon>\n }\n {{ tab.title }}\n </ng-template>\n <ng-template #content>\n <div #element [class.ng-doc-tabs-content]=\"contentTabs()\">\n {{ appendElement | execute: tab.content : element }}\n </div>\n </ng-template>\n </ng-doc-tab>\n }\n</ng-doc-tab-group>\n", styles: [":host{display:block;margin:var(--ng-doc-tabs-margin)}:host(:not(.ng-doc-content-tabs)){border-radius:var(--ng-doc-tabs-border-radius);border:var(--ng-doc-tabs-border, 1px solid var(--ng-doc-border-color));overflow:hidden;--ng-doc-code-margin: 0;--ng-doc-code-border-radius: 0;--ng-doc-code-border: none;--ng-doc-tab-group-background: var(--ng-doc-code-background);--ng-doc-tab-group-header-background: var(--ng-doc-code-background);--ng-doc-tab-group-tabs-background: var(--ng-doc-code-header-background, transparent)}.ng-doc-tabs-content ::ng-deep>*>:first-child{margin-top:0}.ng-doc-tabs-content ::ng-deep>*>:last-child{margin-bottom:0}\n"], dependencies: [{ kind: "component", type: NgDocTabGroupComponent, selector: "ng-doc-tab-group", inputs: ["appearance", "openedTab"] }, { kind: "component", type: NgDocTabComponent, selector: "ng-doc-tab, a[ng-doc-tab]", inputs: ["label", "id", "content"] }, { kind: "component", type: NgDocIconComponent, selector: "ng-doc-icon", inputs: ["icon", "customIcon", "size"] }, { kind: "pipe", type: NgDocExecutePipe, name: "execute" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
25
41
|
}
|
|
26
42
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.2.1", ngImport: i0, type: NgDocTabsComponent, decorators: [{
|
|
27
43
|
type: Component,
|
|
28
|
-
args: [{ selector: 'ng-doc-tabs', imports: [NgDocTabGroupComponent, NgDocTabComponent, NgDocExecutePipe, NgDocIconComponent], changeDetection: ChangeDetectionStrategy.OnPush,
|
|
44
|
+
args: [{ selector: 'ng-doc-tabs', imports: [NgDocTabGroupComponent, NgDocTabComponent, NgDocExecutePipe, NgDocIconComponent], changeDetection: ChangeDetectionStrategy.OnPush, host: {
|
|
45
|
+
'[class.ng-doc-content-tabs]': 'contentTabs()',
|
|
46
|
+
}, template: "<ng-doc-tab-group [openedTab]=\"activeIndex()\" [appearance]=\"contentTabs() ? 'plain' : 'framed'\">\n @for (tab of tabs(); track tab; let i = $index) {\n <ng-doc-tab [label]=\"label\" [content]=\"content\" [id]=\"i\">\n <ng-template #label>\n @if (tab.icon) {\n <ng-doc-icon [customIcon]=\"tab.icon\"></ng-doc-icon>\n }\n {{ tab.title }}\n </ng-template>\n <ng-template #content>\n <div #element [class.ng-doc-tabs-content]=\"contentTabs()\">\n {{ appendElement | execute: tab.content : element }}\n </div>\n </ng-template>\n </ng-doc-tab>\n }\n</ng-doc-tab-group>\n", styles: [":host{display:block;margin:var(--ng-doc-tabs-margin)}:host(:not(.ng-doc-content-tabs)){border-radius:var(--ng-doc-tabs-border-radius);border:var(--ng-doc-tabs-border, 1px solid var(--ng-doc-border-color));overflow:hidden;--ng-doc-code-margin: 0;--ng-doc-code-border-radius: 0;--ng-doc-code-border: none;--ng-doc-tab-group-background: var(--ng-doc-code-background);--ng-doc-tab-group-header-background: var(--ng-doc-code-background);--ng-doc-tab-group-tabs-background: var(--ng-doc-code-header-background, transparent)}.ng-doc-tabs-content ::ng-deep>*>:first-child{margin-top:0}.ng-doc-tabs-content ::ng-deep>*>:last-child{margin-bottom:0}\n"] }]
|
|
29
47
|
}], propDecorators: { tabs: [{ type: i0.Input, args: [{ isSignal: true, alias: "tabs", required: false }] }] } });
|
|
30
48
|
|
|
31
49
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ng-doc-app-components-tabs.mjs","sources":["../../../../libs/app/components/tabs/tabs.component.ts","../../../../libs/app/components/tabs/tabs.component.html","../../../../libs/app/components/tabs/ng-doc-app-components-tabs.ts"],"sourcesContent":["import { ChangeDetectionStrategy, Component, computed, input, Signal } from '@angular/core';\nimport { NgDocTab } from '@ng-doc/app/interfaces';\nimport {\n NgDocExecutePipe,\n NgDocIconComponent,\n NgDocTabComponent,\n NgDocTabGroupComponent,\n} from '@ng-doc/ui-kit';\n\n
|
|
1
|
+
{"version":3,"file":"ng-doc-app-components-tabs.mjs","sources":["../../../../libs/app/components/tabs/tabs.component.ts","../../../../libs/app/components/tabs/tabs.component.html","../../../../libs/app/components/tabs/ng-doc-app-components-tabs.ts"],"sourcesContent":["import { ChangeDetectionStrategy, Component, computed, input, OnInit, Signal } from '@angular/core';\nimport { NgDocTab } from '@ng-doc/app/interfaces';\nimport {\n NgDocExecutePipe,\n NgDocIconComponent,\n NgDocTabComponent,\n NgDocTabGroupComponent,\n} from '@ng-doc/ui-kit';\n\n/**\n * Tabs of a page: grouped code blocks, or any content that Markdown wraps in\n * `<ng-doc-tab group=\"…\" name=\"…\">` elements.\n */\n@Component({\n selector: 'ng-doc-tabs',\n imports: [NgDocTabGroupComponent, NgDocTabComponent, NgDocExecutePipe, NgDocIconComponent],\n templateUrl: './tabs.component.html',\n styleUrls: ['./tabs.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n '[class.ng-doc-content-tabs]': 'contentTabs()',\n },\n})\nexport class NgDocTabsComponent implements OnInit {\n /** The tabs; their content is moved into the open panel. */\n readonly tabs = input<NgDocTab[]>([]);\n\n /** Index of the tab that opens first: the one marked active, or the first. */\n protected readonly activeIndex: Signal<number> = computed(() =>\n Math.max(\n this.tabs().findIndex((tab: NgDocTab) => tab.active),\n 0,\n ),\n );\n\n /**\n * Whether the tabs hold page content rather than a code group. A code group has one code block\n * per tab and is drawn as one framed code surface; content tabs are only a tab bar over their\n * content, so a framed demo or code block inside them doesn't sit in a second frame.\n */\n protected readonly contentTabs: Signal<boolean> = computed(() =>\n this.tabs().some(\n (tab: NgDocTab) =>\n tab.content.childElementCount !== 1 ||\n !tab.content.firstElementChild?.matches('ng-doc-code, pre'),\n ),\n );\n\n ngOnInit(): void {\n // The tabs processor leaves the contents on the page until every processor has run on them;\n // only the open tab's content is shown, in the panel.\n this.tabs().forEach((tab: NgDocTab) => tab.content.remove());\n }\n\n /**\n * Moves a tab's content into its panel.\n * @param element - Content of the tab.\n * @param parent - The panel element.\n */\n appendElement(element: Element, parent: Element): void {\n parent.appendChild(element);\n }\n}\n","<ng-doc-tab-group [openedTab]=\"activeIndex()\" [appearance]=\"contentTabs() ? 'plain' : 'framed'\">\n @for (tab of tabs(); track tab; let i = $index) {\n <ng-doc-tab [label]=\"label\" [content]=\"content\" [id]=\"i\">\n <ng-template #label>\n @if (tab.icon) {\n <ng-doc-icon [customIcon]=\"tab.icon\"></ng-doc-icon>\n }\n {{ tab.title }}\n </ng-template>\n <ng-template #content>\n <div #element [class.ng-doc-tabs-content]=\"contentTabs()\">\n {{ appendElement | execute: tab.content : element }}\n </div>\n </ng-template>\n </ng-doc-tab>\n }\n</ng-doc-tab-group>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;AASA;;;AAGG;MAWU,k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AA,QAAA,EAAA,EAAA,EAAA,QAAA,ECvB/B,0oBAiBA,EAAA,MAAA,EAAA,CAAA,koBAAA,CAAA,EAAA,YAAA,EAAA,CAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EDFY,sBAAsB,kGAAE,iBAAiB,EAAA,QAAA,EAAA,2BAAA,EAAA,MAAA,EAAA,CAAA,OAAA,EAAA,IAAA,EAAA,SAAA,CAAA,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAAoB,kBAAkB,EAAA,QAAA,EAAA,aAAA,EAAA,MAAA,EAAA,CAAA,MAAA,EAAA,YAAA,EAAA,MAAA,CAAA,EAAA,EAAA,EAAA,IAAA,EAAA,MAAA,EAAA,IAAA,EAApC,gBAAgB,EAAA,IAAA,EAAA,SAAA,EAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,CAAA,CAAA;;2FAQ1D,kBAAkB,EAAA,UAAA,EAAA,CAAA;kBAV9B,SAAS;AACE,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,aAAa,EAAA,OAAA,EACd,CAAC,sBAAsB,EAAE,iBAAiB,EAAE,gBAAgB,EAAE,kBAAkB,CAAC,EAAA,eAAA,EAGzE,uBAAuB,CAAC,MAAM,EAAA,IAAA,EACzC;AACJ,wBAAA,6BAA6B,EAAE,eAAe;AAC/C,qBAAA,EAAA,QAAA,EAAA,0oBAAA,EAAA,MAAA,EAAA,CAAA,koBAAA,CAAA,EAAA;;;AErBH;;AAEG;;;;"}
|
|
@@ -5,6 +5,7 @@ export * from '@ng-doc/app/components/command-palette';
|
|
|
5
5
|
export * from '@ng-doc/app/components/copy-button';
|
|
6
6
|
export * from '@ng-doc/app/components/demo';
|
|
7
7
|
export * from '@ng-doc/app/components/demo-displayer';
|
|
8
|
+
export * from '@ng-doc/app/components/demo-frame';
|
|
8
9
|
export * from '@ng-doc/app/components/demo-pane';
|
|
9
10
|
export * from '@ng-doc/app/components/fullscreen-button';
|
|
10
11
|
export * from '@ng-doc/app/components/fullscreen-toggle';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ng-doc-app-components.mjs","sources":["../../../../libs/app/components/ng-doc-app-components.ts"],"sourcesContent":["/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ng-doc-app-components.mjs","sources":["../../../../libs/app/components/ng-doc-app-components.ts"],"sourcesContent":["/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;AAEG"}
|