@ng-doc/app 16.14.0 → 16.15.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (123) hide show
  1. package/assets/themes/ng-doc-night.css +20 -19
  2. package/components/playground/playground-demo/playground-demo.component.d.ts +1 -0
  3. package/components/playground/playground-properties/playground-properties.component.d.ts +2 -1
  4. package/components/playground/playground.component.d.ts +3 -0
  5. package/components/theme-toggle/theme-toggle.component.d.ts +8 -2
  6. package/constants/themes.d.ts +8 -8
  7. package/esm2022/components/api-list/api-list.component.mjs +7 -5
  8. package/esm2022/components/code/code.component.mjs +3 -3
  9. package/esm2022/components/demo/demo.component.mjs +7 -6
  10. package/esm2022/components/demo-displayer/demo-displayer.component.mjs +3 -3
  11. package/esm2022/components/demo-pane/demo-pane.component.mjs +6 -5
  12. package/esm2022/components/kind-icon/kind-icon.component.mjs +3 -3
  13. package/esm2022/components/link/link.component.mjs +1 -1
  14. package/esm2022/components/navbar/navbar.component.mjs +3 -3
  15. package/esm2022/components/page/page.component.mjs +4 -4
  16. package/esm2022/components/page-link/page-link.component.mjs +4 -4
  17. package/esm2022/components/page-navigation/page-navigation.component.mjs +3 -3
  18. package/esm2022/components/playground/base-playground.mjs +9 -4
  19. package/esm2022/components/playground/playground-demo/playground-demo.component.mjs +20 -2
  20. package/esm2022/components/playground/playground-form.mjs +1 -1
  21. package/esm2022/components/playground/playground-properties/playground-properties.component.mjs +6 -3
  22. package/esm2022/components/playground/playground-property/playground-property.component.mjs +4 -2
  23. package/esm2022/components/playground/playground-property-control.mjs +1 -1
  24. package/esm2022/components/playground/playground.component.mjs +30 -10
  25. package/esm2022/components/search/search.component.mjs +3 -3
  26. package/esm2022/components/search-result/search-result.component.mjs +10 -2
  27. package/esm2022/components/sidebar/sidebar-category/sidebar-category.component.mjs +6 -5
  28. package/esm2022/components/sidebar/sidebar-item/sidebar-item.component.mjs +3 -3
  29. package/esm2022/components/sidebar/sidebar.component.mjs +3 -3
  30. package/esm2022/components/tabs/tabs.component.mjs +3 -3
  31. package/esm2022/components/theme-toggle/theme-toggle.component.mjs +34 -7
  32. package/esm2022/components/toc/toc-element/toc-element.component.mjs +3 -3
  33. package/esm2022/components/toc/toc.component.mjs +5 -2
  34. package/esm2022/constants/themes.mjs +9 -9
  35. package/esm2022/directives/code-highlighter/code-highlighter.directive.mjs +1 -1
  36. package/esm2022/directives/route-active/route-active.directive.mjs +1 -1
  37. package/esm2022/helpers/as-boolean.mjs +6 -2
  38. package/esm2022/helpers/generate-toc.mjs +1 -1
  39. package/esm2022/interfaces/provided-type-control.mjs +1 -1
  40. package/esm2022/pipes/extract-value/extract-value.pipe.mjs +1 -1
  41. package/esm2022/pipes/filter-by-text/filter-by-text.pipe.mjs +1 -1
  42. package/esm2022/pipes/sanitize-html/sanitize-html.pipe.mjs +1 -1
  43. package/esm2022/processors/processors/code.processor.mjs +1 -1
  44. package/esm2022/processors/processors/demo-pane.processor.mjs +1 -1
  45. package/esm2022/processors/processors/demo.processor.mjs +1 -1
  46. package/esm2022/processors/processors/icon.processor.mjs +1 -1
  47. package/esm2022/processors/processors/link.processor.mjs +1 -1
  48. package/esm2022/processors/processors/playground.processor.mjs +3 -2
  49. package/esm2022/processors/processors/tabs.processor.mjs +1 -1
  50. package/esm2022/providers/ng-doc-app/provide-ng-doc-app.mjs +8 -6
  51. package/esm2022/services/store/store.service.mjs +1 -1
  52. package/esm2022/services/theme/theme.service.mjs +62 -33
  53. package/esm2022/tokens/api-list.mjs +1 -1
  54. package/esm2022/tokens/context.mjs +1 -1
  55. package/esm2022/tokens/theme.mjs +7 -7
  56. package/esm2022/tokens/type-control.mjs +1 -1
  57. package/esm2022/type-controls/boolean-control/boolean-control.component.mjs +1 -1
  58. package/esm2022/type-controls/number-control/number-control.component.mjs +1 -1
  59. package/esm2022/type-controls/string-control/string-control.component.mjs +1 -1
  60. package/esm2022/type-controls/type-alias-control/type-alias-control.component.mjs +1 -1
  61. package/esm2022/types/typed-form.mjs +1 -1
  62. package/fesm2022/ng-doc-app-components-api-list.mjs +5 -3
  63. package/fesm2022/ng-doc-app-components-api-list.mjs.map +1 -1
  64. package/fesm2022/ng-doc-app-components-code.mjs +2 -2
  65. package/fesm2022/ng-doc-app-components-code.mjs.map +1 -1
  66. package/fesm2022/ng-doc-app-components-demo-displayer.mjs +2 -2
  67. package/fesm2022/ng-doc-app-components-demo-displayer.mjs.map +1 -1
  68. package/fesm2022/ng-doc-app-components-demo-pane.mjs +4 -3
  69. package/fesm2022/ng-doc-app-components-demo-pane.mjs.map +1 -1
  70. package/fesm2022/ng-doc-app-components-demo.mjs +4 -3
  71. package/fesm2022/ng-doc-app-components-demo.mjs.map +1 -1
  72. package/fesm2022/ng-doc-app-components-kind-icon.mjs +2 -2
  73. package/fesm2022/ng-doc-app-components-kind-icon.mjs.map +1 -1
  74. package/fesm2022/ng-doc-app-components-link.mjs.map +1 -1
  75. package/fesm2022/ng-doc-app-components-navbar.mjs +2 -2
  76. package/fesm2022/ng-doc-app-components-navbar.mjs.map +1 -1
  77. package/fesm2022/ng-doc-app-components-page-link.mjs +2 -2
  78. package/fesm2022/ng-doc-app-components-page-link.mjs.map +1 -1
  79. package/fesm2022/ng-doc-app-components-page-navigation.mjs +2 -2
  80. package/fesm2022/ng-doc-app-components-page-navigation.mjs.map +1 -1
  81. package/fesm2022/ng-doc-app-components-page.mjs +3 -3
  82. package/fesm2022/ng-doc-app-components-page.mjs.map +1 -1
  83. package/fesm2022/ng-doc-app-components-playground.mjs +63 -16
  84. package/fesm2022/ng-doc-app-components-playground.mjs.map +1 -1
  85. package/fesm2022/ng-doc-app-components-search-result.mjs +9 -1
  86. package/fesm2022/ng-doc-app-components-search-result.mjs.map +1 -1
  87. package/fesm2022/ng-doc-app-components-search.mjs +2 -2
  88. package/fesm2022/ng-doc-app-components-search.mjs.map +1 -1
  89. package/fesm2022/ng-doc-app-components-sidebar.mjs +8 -7
  90. package/fesm2022/ng-doc-app-components-sidebar.mjs.map +1 -1
  91. package/fesm2022/ng-doc-app-components-tabs.mjs +2 -2
  92. package/fesm2022/ng-doc-app-components-tabs.mjs.map +1 -1
  93. package/fesm2022/ng-doc-app-components-theme-toggle.mjs +33 -6
  94. package/fesm2022/ng-doc-app-components-theme-toggle.mjs.map +1 -1
  95. package/fesm2022/ng-doc-app-components-toc.mjs +6 -3
  96. package/fesm2022/ng-doc-app-components-toc.mjs.map +1 -1
  97. package/fesm2022/ng-doc-app-constants.mjs +8 -8
  98. package/fesm2022/ng-doc-app-constants.mjs.map +1 -1
  99. package/fesm2022/ng-doc-app-directives-code-highlighter.mjs.map +1 -1
  100. package/fesm2022/ng-doc-app-directives-route-active.mjs.map +1 -1
  101. package/fesm2022/ng-doc-app-helpers.mjs +5 -1
  102. package/fesm2022/ng-doc-app-helpers.mjs.map +1 -1
  103. package/fesm2022/ng-doc-app-pipes-extract-value.mjs.map +1 -1
  104. package/fesm2022/ng-doc-app-pipes-filter-by-text.mjs.map +1 -1
  105. package/fesm2022/ng-doc-app-pipes-sanitize-html.mjs.map +1 -1
  106. package/fesm2022/ng-doc-app-processors-processors.mjs +2 -1
  107. package/fesm2022/ng-doc-app-processors-processors.mjs.map +1 -1
  108. package/fesm2022/ng-doc-app-providers-ng-doc-app.mjs +7 -5
  109. package/fesm2022/ng-doc-app-providers-ng-doc-app.mjs.map +1 -1
  110. package/fesm2022/ng-doc-app-services-store.mjs.map +1 -1
  111. package/fesm2022/ng-doc-app-services-theme.mjs +61 -32
  112. package/fesm2022/ng-doc-app-services-theme.mjs.map +1 -1
  113. package/fesm2022/ng-doc-app-tokens.mjs +6 -6
  114. package/fesm2022/ng-doc-app-tokens.mjs.map +1 -1
  115. package/fesm2022/ng-doc-app-type-controls-boolean-control.mjs.map +1 -1
  116. package/fesm2022/ng-doc-app-type-controls-number-control.mjs.map +1 -1
  117. package/fesm2022/ng-doc-app-type-controls-string-control.mjs.map +1 -1
  118. package/fesm2022/ng-doc-app-type-controls-type-alias-control.mjs.map +1 -1
  119. package/package.json +3 -3
  120. package/services/theme/theme.service.d.ts +24 -7
  121. package/styles/global.css +141 -436
  122. package/styles/main.css +138 -433
  123. package/tokens/theme.d.ts +6 -6
@@ -1,6 +1,6 @@
1
1
  import * as i0 from '@angular/core';
2
2
  import { ViewContainerRef, Injector, Component, ChangeDetectionStrategy, Input, ViewChild, HostBinding, EventEmitter, isDevMode, Output, inject, ChangeDetectorRef, Directive } from '@angular/core';
3
- import { stringify, objectKeys as objectKeys$1, isPresent, extractValueOrThrow, extractFunctionDefaults } from '@ng-doc/core';
3
+ import { stringify, objectKeys as objectKeys$1, isPresent, extractValueOrThrow, isSameObject, extractFunctionDefaults } from '@ng-doc/core';
4
4
  import { AsyncPipe, NgIf, NgFor, KeyValuePipe } from '@angular/common';
5
5
  import * as i2 from '@angular/forms';
6
6
  import { FormsModule } from '@angular/forms';
@@ -65,7 +65,7 @@ let NgDocPlaygroundDemoComponent = class NgDocPlaygroundDemoComponent {
65
65
  }
66
66
  updateCodeView() {
67
67
  const template = this.pipeName
68
- ? buildPlaygroundDemoPipeTemplate(this.configuration?.template ?? '', this.pipeName, this.getActiveContent(), this.getActiveInputs())
68
+ ? buildPlaygroundDemoPipeTemplate(this.configuration?.template ?? '', this.pipeName, this.getActiveContent(), this.getPipeActiveInputs())
69
69
  : buildPlaygroundDemoTemplate(this.configuration?.template ?? '', this.selector, this.getActiveContent(), this.getActiveInputs());
70
70
  this.code = from(formatHtml(template));
71
71
  }
@@ -87,6 +87,24 @@ let NgDocPlaygroundDemoComponent = class NgDocPlaygroundDemoComponent {
87
87
  return result;
88
88
  }, {});
89
89
  }
90
+ getPipeActiveInputs() {
91
+ const formData = this.form?.controls.properties.value ?? {};
92
+ let changedInputIndex = -1;
93
+ return objectKeys(formData)
94
+ .map((key, i) => {
95
+ const value = formData[key];
96
+ const defaultValue = this.demoRef?.instance?.defaultValues[key];
97
+ if (defaultValue !== value) {
98
+ changedInputIndex = i;
99
+ }
100
+ return key;
101
+ })
102
+ .slice(0, changedInputIndex + 1)
103
+ .reduce((result, key, i) => {
104
+ result[key] = stringify(formData[key]).replace(/"/g, `'`);
105
+ return result;
106
+ }, {});
107
+ }
90
108
  ngOnDestroy() {
91
109
  this.unsubscribe$.next();
92
110
  this.unsubscribe$.complete();
@@ -152,7 +170,9 @@ class NgDocPlaygroundPropertyComponent {
152
170
  return !!this.propertyTypeControl;
153
171
  }
154
172
  get tooltipContent() {
155
- return this.property && isPlaygroundProperty(this.property) ? this.property.description ?? '' : '';
173
+ return this.property && isPlaygroundProperty(this.property)
174
+ ? this.property.description ?? ''
175
+ : '';
156
176
  }
157
177
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.0", ngImport: i0, type: NgDocPlaygroundPropertyComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
158
178
  static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.0.0", type: NgDocPlaygroundPropertyComponent, isStandalone: true, selector: "ng-doc-playground-property", inputs: { name: "name", property: "property", typeControl: "typeControl", control: "control", defaultValue: "defaultValue" }, host: { properties: { "attr.data-has-property-control": "this.hasPropertyControl" } }, viewQueries: [{ propertyName: "propertyOutlet", first: true, predicate: ["propertyOutlet"], descendants: true, read: ViewContainerRef, static: true }], usesOnChanges: true, ngImport: i0, template: "<label [ng-doc-label]=\"option?.hideLabel ? '' : labelContent\">\n\t<ng-template #labelContent>\n\t\t<span\n\t\t\t[ngDocTooltip]=\"tooltipTemplate\"\n\t\t\t[canOpen]=\"!!tooltipContent\"\n\t\t\t[positions]=\"['left-center', 'top-right', 'bottom-right']\"\n\t\t\t>{{ name }}</span\n\t\t>\n\t\t<ng-template #tooltipTemplate>\n\t\t\t<div [innerHTML]=\"tooltipContent | ngDocSanitizeHtml\"></div>\n\t\t</ng-template>\n\t</ng-template>\n\t<ng-container #propertyOutlet></ng-container>\n</label>\n", styles: [":host{display:block}:host[data-has-property-control=false]{display:none}\n"], dependencies: [{ kind: "component", type: NgDocLabelComponent, selector: "label[ng-doc-label]", inputs: ["ng-doc-label", "align"] }, { kind: "directive", type: NgDocTooltipDirective, selector: "[ngDocTooltip]", inputs: ["ngDocTooltip", "delay", "displayOrigin", "pointerOrigin", "positions", "canOpen", "panelClass", "minHeight", "maxHeight", "height", "minWidth", "maxWidth", "width"], outputs: ["beforeOpen", "afterOpen", "beforeClose", "afterClose"], exportAs: ["ngDocTooltip"] }, { kind: "pipe", type: NgDocSanitizeHtmlPipe, name: "ngDocSanitizeHtml" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
@@ -185,6 +205,7 @@ class NgDocPlaygroundPropertiesComponent {
185
205
  this.ignoreInputs = [];
186
206
  this.hideSidePanel = false;
187
207
  this.recreateDemo = false;
208
+ this.showResetButton = false;
188
209
  this.recreateDemoChange = new EventEmitter();
189
210
  this.resetForm = new EventEmitter();
190
211
  this.breakpoints = [Breakpoints.XSmall];
@@ -263,7 +284,7 @@ class NgDocPlaygroundPropertiesComponent {
263
284
  return undefined;
264
285
  }
265
286
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.0", ngImport: i0, type: NgDocPlaygroundPropertiesComponent, deps: [{ token: i1.BreakpointObserver }, { token: i0.Injector }], target: i0.ɵɵFactoryTarget.Component }); }
266
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.0.0", type: NgDocPlaygroundPropertiesComponent, isStandalone: true, selector: "ng-doc-playground-properties", inputs: { form: "form", properties: "properties", ignoreInputs: "ignoreInputs", dynamicContent: "dynamicContent", defaultValues: "defaultValues", hideSidePanel: "hideSidePanel", recreateDemo: "recreateDemo" }, outputs: { recreateDemoChange: "recreateDemoChange", resetForm: "resetForm" }, usesOnChanges: true, ngImport: i0, template: "<div\n\tclass=\"ng-doc-playground-properties-wrapper\"\n\t[class.vertical]=\"observer | async\"\n\t*ngIf=\"defaultValues\">\n\t<div class=\"ng-doc-playground-demos\">\n\t\t<ng-content></ng-content>\n\t</div>\n\t<div class=\"ng-doc-playground-properties\" *ngIf=\"!hideSidePanel\">\n\t\t<div class=\"ng-doc-playground-header\">\n\t\t\t<h4 ng-doc-text>Playground</h4>\n\t\t\t<button ng-doc-button color=\"red\" (click)=\"resetForm.emit()\">Reset</button>\n\t\t</div>\n\t\t<div class=\"ng-doc-playground-setting\">\n\t\t\t<ng-doc-checkbox [(ngModel)]=\"recreateDemo\" (ngModelChange)=\"recreateDemoChange.emit($event)\">\n\t\t\t\t<span\n\t\t\t\t\tng-doc-text\n\t\t\t\t\t[ngDocTooltip]=\"'Recreates demo everytime\\none of the input has changed'\"\n\t\t\t\t\t[positions]=\"['bottom-right', 'left-center']\">\n\t\t\t\t\tRecreate\n\t\t\t\t\t<ng-doc-icon icon=\"info\" ngDocTextRight></ng-doc-icon>\n\t\t\t\t</span>\n\t\t\t</ng-doc-checkbox>\n\t\t</div>\n\t\t<div class=\"ng-doc-playground-divider\"></div>\n\t\t<ng-container *ngIf=\"propertyControls.length\">\n\t\t\t<h5 class=\"ng-doc-title\" ng-doc-text>Settings</h5>\n\t\t\t<ng-doc-playground-property\n\t\t\t\t*ngFor=\"let propertyControl of propertyControls\"\n\t\t\t\t[name]=\"propertyControl.property.inputName\"\n\t\t\t\t[property]=\"propertyControl.property\"\n\t\t\t\t[typeControl]=\"propertyControl.typeControl\"\n\t\t\t\t[defaultValue]=\"defaultValues[propertyControl.propertyName]\"\n\t\t\t\t[control]=\"\n\t\t\t\t\tgetFormControl | bind: this | execute: 'properties':propertyControl.propertyName\n\t\t\t\t\">\n\t\t\t</ng-doc-playground-property>\n\t\t</ng-container>\n\n\t\t<ng-container *ngIf=\"(dynamicContent | keyvalue)?.length\">\n\t\t\t<h5 class=\"ng-doc-title\" ng-doc-text>Content</h5>\n\t\t\t<ng-doc-playground-property\n\t\t\t\t*ngFor=\"let content of dynamicContent | keyvalue\"\n\t\t\t\t[name]=\"content.value.label\"\n\t\t\t\t[property]=\"content.value\"\n\t\t\t\t[typeControl]=\"contentTypeControl\"\n\t\t\t\t[control]=\"getFormControl | bind: this | execute: 'content':content.key\">\n\t\t\t</ng-doc-playground-property>\n\t\t</ng-container>\n\t</div>\n</div>\n", styles: [":host .ng-doc-playground-properties-wrapper{position:relative;display:flex;grid-gap:calc(var(--ng-doc-base-gutter) * 2);gap:calc(var(--ng-doc-base-gutter) * 2)}:host .ng-doc-playground-properties-wrapper.vertical{flex-direction:column}:host .ng-doc-playground-properties-wrapper.vertical .ng-doc-playground-demos{margin-right:0;margin-bottom:calc(var(--ng-doc-base-gutter) * 2)}:host .ng-doc-playground-properties-wrapper.vertical .ng-doc-playground-properties{width:100%}:host .ng-doc-playground-properties-wrapper .ng-doc-playground-demos{display:flex;flex-direction:column;width:100%;overflow:hidden}:host .ng-doc-playground-properties-wrapper .ng-doc-playground-properties{flex-shrink:0;width:300px;padding:calc(var(--ng-doc-base-gutter) * 2) calc(var(--ng-doc-base-gutter) * 3);background-color:var(--ng-doc-base-1);border-radius:var(--ng-doc-base-gutter)}:host .ng-doc-playground-properties-wrapper .ng-doc-playground-properties ng-doc-playground-property:not(:last-child){margin-bottom:calc(var(--ng-doc-base-gutter) * 2)}:host .ng-doc-playground-properties-wrapper .ng-doc-playground-properties .ng-doc-playground-controls{display:flex;justify-content:flex-end}:host .ng-doc-playground-properties-wrapper .ng-doc-playground-properties .ng-doc-playground-header{display:flex;align-items:center;justify-content:space-between;height:40px;margin-bottom:calc(var(--ng-doc-base-gutter) * 2)}:host .ng-doc-playground-properties-wrapper .ng-doc-playground-properties .ng-doc-playground-header h4{margin:0}:host .ng-doc-playground-properties-wrapper .ng-doc-playground-properties .ng-doc-playground-setting{display:flex;flex-direction:column}:host .ng-doc-playground-properties-wrapper .ng-doc-title{margin-top:0;margin-bottom:calc(var(--ng-doc-base-gutter) + var(--ng-doc-base-gutter) / 2)}:host .ng-doc-playground-divider{margin:calc(var(--ng-doc-base-gutter) * 2) 0;height:1px;background-color:var(--ng-doc-base-2)}\n"], dependencies: [{ kind: "component", type: NgDocTextComponent, selector: "[ng-doc-text]", inputs: ["size", "color", "align", "absoluteContent"] }, { kind: "component", type: NgDocButtonComponent, selector: "button[ng-doc-button], a[ng-doc-button], button[ng-doc-button-flat], a[ng-doc-button-flat], button[ng-doc-button-text], a[ng-doc-button-text]", inputs: ["size", "color", "rounded"] }, { kind: "component", type: NgDocCheckboxComponent, selector: "ng-doc-checkbox", inputs: ["color"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: NgDocTooltipDirective, selector: "[ngDocTooltip]", inputs: ["ngDocTooltip", "delay", "displayOrigin", "pointerOrigin", "positions", "canOpen", "panelClass", "minHeight", "maxHeight", "height", "minWidth", "maxWidth", "width"], outputs: ["beforeOpen", "afterOpen", "beforeClose", "afterClose"], exportAs: ["ngDocTooltip"] }, { kind: "component", type: NgDocIconComponent, selector: "ng-doc-icon", inputs: ["icon", "customIcon", "size"] }, { kind: "directive", type: NgDocTextRightDirective, selector: "[ngDocTextRight]" }, { kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: NgFor, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "component", type: NgDocPlaygroundPropertyComponent, selector: "ng-doc-playground-property", inputs: ["name", "property", "typeControl", "control", "defaultValue"] }, { kind: "pipe", type: AsyncPipe, name: "async" }, { kind: "pipe", type: KeyValuePipe, name: "keyvalue" }, { kind: "pipe", type: NgDocBindPipe, name: "bind" }, { kind: "pipe", type: NgDocExecutePipe, name: "execute" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
287
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.0.0", type: NgDocPlaygroundPropertiesComponent, isStandalone: true, selector: "ng-doc-playground-properties", inputs: { form: "form", properties: "properties", ignoreInputs: "ignoreInputs", dynamicContent: "dynamicContent", defaultValues: "defaultValues", hideSidePanel: "hideSidePanel", recreateDemo: "recreateDemo", showResetButton: "showResetButton" }, outputs: { recreateDemoChange: "recreateDemoChange", resetForm: "resetForm" }, usesOnChanges: true, ngImport: i0, template: "<div\n\tclass=\"ng-doc-playground-properties-wrapper\"\n\t[class.vertical]=\"observer | async\"\n\t*ngIf=\"defaultValues\">\n\t<div class=\"ng-doc-playground-demos\">\n\t\t<ng-content></ng-content>\n\t</div>\n\t<div class=\"ng-doc-playground-properties\" *ngIf=\"!hideSidePanel\">\n\t\t<div class=\"ng-doc-playground-header\">\n\t\t\t<h4 ng-doc-text>Playground</h4>\n\t\t\t<button ng-doc-button color=\"alert\" (click)=\"resetForm.emit()\" *ngIf=\"showResetButton\">\n\t\t\t\tReset\n\t\t\t</button>\n\t\t</div>\n\t\t<div class=\"ng-doc-playground-setting\">\n\t\t\t<ng-doc-checkbox [(ngModel)]=\"recreateDemo\" (ngModelChange)=\"recreateDemoChange.emit($event)\">\n\t\t\t\t<span\n\t\t\t\t\tng-doc-text\n\t\t\t\t\t[ngDocTooltip]=\"'Recreates demo everytime\\none of the input has changed'\"\n\t\t\t\t\t[positions]=\"['bottom-right', 'left-center']\">\n\t\t\t\t\tRecreate\n\t\t\t\t\t<ng-doc-icon icon=\"info\" ngDocTextRight></ng-doc-icon>\n\t\t\t\t</span>\n\t\t\t</ng-doc-checkbox>\n\t\t</div>\n\t\t<div class=\"ng-doc-playground-divider\"></div>\n\t\t<ng-container *ngIf=\"propertyControls.length\">\n\t\t\t<h5 class=\"ng-doc-title\" ng-doc-text>Settings</h5>\n\t\t\t<ng-doc-playground-property\n\t\t\t\t*ngFor=\"let propertyControl of propertyControls\"\n\t\t\t\t[name]=\"propertyControl.property.inputName\"\n\t\t\t\t[property]=\"propertyControl.property\"\n\t\t\t\t[typeControl]=\"propertyControl.typeControl\"\n\t\t\t\t[defaultValue]=\"defaultValues[propertyControl.propertyName]\"\n\t\t\t\t[control]=\"\n\t\t\t\t\tgetFormControl | bind: this | execute: 'properties':propertyControl.propertyName\n\t\t\t\t\">\n\t\t\t</ng-doc-playground-property>\n\t\t</ng-container>\n\n\t\t<ng-container *ngIf=\"(dynamicContent | keyvalue)?.length\">\n\t\t\t<h5 class=\"ng-doc-title\" ng-doc-text>Content</h5>\n\t\t\t<ng-doc-playground-property\n\t\t\t\t*ngFor=\"let content of dynamicContent | keyvalue\"\n\t\t\t\t[name]=\"content.value.label\"\n\t\t\t\t[property]=\"content.value\"\n\t\t\t\t[typeControl]=\"contentTypeControl\"\n\t\t\t\t[control]=\"getFormControl | bind: this | execute: 'content':content.key\">\n\t\t\t</ng-doc-playground-property>\n\t\t</ng-container>\n\t</div>\n</div>\n", styles: [":host .ng-doc-playground-properties-wrapper{position:relative;display:flex;grid-gap:calc(var(--ng-doc-base-gutter) * 2);gap:calc(var(--ng-doc-base-gutter) * 2)}:host .ng-doc-playground-properties-wrapper.vertical{flex-direction:column}:host .ng-doc-playground-properties-wrapper.vertical .ng-doc-playground-demos{margin-right:0;margin-bottom:calc(var(--ng-doc-base-gutter) * 2)}:host .ng-doc-playground-properties-wrapper.vertical .ng-doc-playground-properties{width:100%}:host .ng-doc-playground-properties-wrapper .ng-doc-playground-demos{display:flex;flex-direction:column;width:100%;overflow:hidden}:host .ng-doc-playground-properties-wrapper .ng-doc-playground-properties{flex-shrink:0;width:300px;padding:calc(var(--ng-doc-base-gutter) * 2) calc(var(--ng-doc-base-gutter) * 3);background-color:var(--ng-doc-base-1);border-radius:var(--ng-doc-base-gutter);border:1px solid var(--ng-doc-border-color)}:host .ng-doc-playground-properties-wrapper .ng-doc-playground-properties ng-doc-playground-property:not(:last-child){margin-bottom:calc(var(--ng-doc-base-gutter) * 2)}:host .ng-doc-playground-properties-wrapper .ng-doc-playground-properties .ng-doc-playground-controls{display:flex;justify-content:flex-end}:host .ng-doc-playground-properties-wrapper .ng-doc-playground-properties .ng-doc-playground-header{display:flex;align-items:center;justify-content:space-between;height:40px;margin-bottom:calc(var(--ng-doc-base-gutter) * 2)}:host .ng-doc-playground-properties-wrapper .ng-doc-playground-properties .ng-doc-playground-header h4{margin:0}:host .ng-doc-playground-properties-wrapper .ng-doc-playground-properties .ng-doc-playground-setting{display:flex;flex-direction:column}:host .ng-doc-playground-properties-wrapper .ng-doc-title{margin-top:0;margin-bottom:calc(var(--ng-doc-base-gutter) + var(--ng-doc-base-gutter) / 2)}:host .ng-doc-playground-divider{margin:calc(var(--ng-doc-base-gutter) * 2) 0;height:1px;background-color:var(--ng-doc-base-2)}\n"], dependencies: [{ kind: "component", type: NgDocTextComponent, selector: "[ng-doc-text]", inputs: ["size", "color", "align", "absoluteContent"] }, { kind: "component", type: NgDocButtonComponent, selector: "button[ng-doc-button], a[ng-doc-button], button[ng-doc-button-flat], a[ng-doc-button-flat], button[ng-doc-button-text], a[ng-doc-button-text]", inputs: ["size", "color", "rounded", "number"] }, { kind: "component", type: NgDocCheckboxComponent, selector: "ng-doc-checkbox", inputs: ["color"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: NgDocTooltipDirective, selector: "[ngDocTooltip]", inputs: ["ngDocTooltip", "delay", "displayOrigin", "pointerOrigin", "positions", "canOpen", "panelClass", "minHeight", "maxHeight", "height", "minWidth", "maxWidth", "width"], outputs: ["beforeOpen", "afterOpen", "beforeClose", "afterClose"], exportAs: ["ngDocTooltip"] }, { kind: "component", type: NgDocIconComponent, selector: "ng-doc-icon", inputs: ["icon", "customIcon", "size"] }, { kind: "directive", type: NgDocTextRightDirective, selector: "[ngDocTextRight]" }, { kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: NgFor, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "component", type: NgDocPlaygroundPropertyComponent, selector: "ng-doc-playground-property", inputs: ["name", "property", "typeControl", "control", "defaultValue"] }, { kind: "pipe", type: AsyncPipe, name: "async" }, { kind: "pipe", type: KeyValuePipe, name: "keyvalue" }, { kind: "pipe", type: NgDocBindPipe, name: "bind" }, { kind: "pipe", type: NgDocExecutePipe, name: "execute" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
267
288
  }
268
289
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.0", ngImport: i0, type: NgDocPlaygroundPropertiesComponent, decorators: [{
269
290
  type: Component,
@@ -282,7 +303,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.0", ngImpor
282
303
  KeyValuePipe,
283
304
  NgDocBindPipe,
284
305
  NgDocExecutePipe,
285
- ], template: "<div\n\tclass=\"ng-doc-playground-properties-wrapper\"\n\t[class.vertical]=\"observer | async\"\n\t*ngIf=\"defaultValues\">\n\t<div class=\"ng-doc-playground-demos\">\n\t\t<ng-content></ng-content>\n\t</div>\n\t<div class=\"ng-doc-playground-properties\" *ngIf=\"!hideSidePanel\">\n\t\t<div class=\"ng-doc-playground-header\">\n\t\t\t<h4 ng-doc-text>Playground</h4>\n\t\t\t<button ng-doc-button color=\"red\" (click)=\"resetForm.emit()\">Reset</button>\n\t\t</div>\n\t\t<div class=\"ng-doc-playground-setting\">\n\t\t\t<ng-doc-checkbox [(ngModel)]=\"recreateDemo\" (ngModelChange)=\"recreateDemoChange.emit($event)\">\n\t\t\t\t<span\n\t\t\t\t\tng-doc-text\n\t\t\t\t\t[ngDocTooltip]=\"'Recreates demo everytime\\none of the input has changed'\"\n\t\t\t\t\t[positions]=\"['bottom-right', 'left-center']\">\n\t\t\t\t\tRecreate\n\t\t\t\t\t<ng-doc-icon icon=\"info\" ngDocTextRight></ng-doc-icon>\n\t\t\t\t</span>\n\t\t\t</ng-doc-checkbox>\n\t\t</div>\n\t\t<div class=\"ng-doc-playground-divider\"></div>\n\t\t<ng-container *ngIf=\"propertyControls.length\">\n\t\t\t<h5 class=\"ng-doc-title\" ng-doc-text>Settings</h5>\n\t\t\t<ng-doc-playground-property\n\t\t\t\t*ngFor=\"let propertyControl of propertyControls\"\n\t\t\t\t[name]=\"propertyControl.property.inputName\"\n\t\t\t\t[property]=\"propertyControl.property\"\n\t\t\t\t[typeControl]=\"propertyControl.typeControl\"\n\t\t\t\t[defaultValue]=\"defaultValues[propertyControl.propertyName]\"\n\t\t\t\t[control]=\"\n\t\t\t\t\tgetFormControl | bind: this | execute: 'properties':propertyControl.propertyName\n\t\t\t\t\">\n\t\t\t</ng-doc-playground-property>\n\t\t</ng-container>\n\n\t\t<ng-container *ngIf=\"(dynamicContent | keyvalue)?.length\">\n\t\t\t<h5 class=\"ng-doc-title\" ng-doc-text>Content</h5>\n\t\t\t<ng-doc-playground-property\n\t\t\t\t*ngFor=\"let content of dynamicContent | keyvalue\"\n\t\t\t\t[name]=\"content.value.label\"\n\t\t\t\t[property]=\"content.value\"\n\t\t\t\t[typeControl]=\"contentTypeControl\"\n\t\t\t\t[control]=\"getFormControl | bind: this | execute: 'content':content.key\">\n\t\t\t</ng-doc-playground-property>\n\t\t</ng-container>\n\t</div>\n</div>\n", styles: [":host .ng-doc-playground-properties-wrapper{position:relative;display:flex;grid-gap:calc(var(--ng-doc-base-gutter) * 2);gap:calc(var(--ng-doc-base-gutter) * 2)}:host .ng-doc-playground-properties-wrapper.vertical{flex-direction:column}:host .ng-doc-playground-properties-wrapper.vertical .ng-doc-playground-demos{margin-right:0;margin-bottom:calc(var(--ng-doc-base-gutter) * 2)}:host .ng-doc-playground-properties-wrapper.vertical .ng-doc-playground-properties{width:100%}:host .ng-doc-playground-properties-wrapper .ng-doc-playground-demos{display:flex;flex-direction:column;width:100%;overflow:hidden}:host .ng-doc-playground-properties-wrapper .ng-doc-playground-properties{flex-shrink:0;width:300px;padding:calc(var(--ng-doc-base-gutter) * 2) calc(var(--ng-doc-base-gutter) * 3);background-color:var(--ng-doc-base-1);border-radius:var(--ng-doc-base-gutter)}:host .ng-doc-playground-properties-wrapper .ng-doc-playground-properties ng-doc-playground-property:not(:last-child){margin-bottom:calc(var(--ng-doc-base-gutter) * 2)}:host .ng-doc-playground-properties-wrapper .ng-doc-playground-properties .ng-doc-playground-controls{display:flex;justify-content:flex-end}:host .ng-doc-playground-properties-wrapper .ng-doc-playground-properties .ng-doc-playground-header{display:flex;align-items:center;justify-content:space-between;height:40px;margin-bottom:calc(var(--ng-doc-base-gutter) * 2)}:host .ng-doc-playground-properties-wrapper .ng-doc-playground-properties .ng-doc-playground-header h4{margin:0}:host .ng-doc-playground-properties-wrapper .ng-doc-playground-properties .ng-doc-playground-setting{display:flex;flex-direction:column}:host .ng-doc-playground-properties-wrapper .ng-doc-title{margin-top:0;margin-bottom:calc(var(--ng-doc-base-gutter) + var(--ng-doc-base-gutter) / 2)}:host .ng-doc-playground-divider{margin:calc(var(--ng-doc-base-gutter) * 2) 0;height:1px;background-color:var(--ng-doc-base-2)}\n"] }]
306
+ ], template: "<div\n\tclass=\"ng-doc-playground-properties-wrapper\"\n\t[class.vertical]=\"observer | async\"\n\t*ngIf=\"defaultValues\">\n\t<div class=\"ng-doc-playground-demos\">\n\t\t<ng-content></ng-content>\n\t</div>\n\t<div class=\"ng-doc-playground-properties\" *ngIf=\"!hideSidePanel\">\n\t\t<div class=\"ng-doc-playground-header\">\n\t\t\t<h4 ng-doc-text>Playground</h4>\n\t\t\t<button ng-doc-button color=\"alert\" (click)=\"resetForm.emit()\" *ngIf=\"showResetButton\">\n\t\t\t\tReset\n\t\t\t</button>\n\t\t</div>\n\t\t<div class=\"ng-doc-playground-setting\">\n\t\t\t<ng-doc-checkbox [(ngModel)]=\"recreateDemo\" (ngModelChange)=\"recreateDemoChange.emit($event)\">\n\t\t\t\t<span\n\t\t\t\t\tng-doc-text\n\t\t\t\t\t[ngDocTooltip]=\"'Recreates demo everytime\\none of the input has changed'\"\n\t\t\t\t\t[positions]=\"['bottom-right', 'left-center']\">\n\t\t\t\t\tRecreate\n\t\t\t\t\t<ng-doc-icon icon=\"info\" ngDocTextRight></ng-doc-icon>\n\t\t\t\t</span>\n\t\t\t</ng-doc-checkbox>\n\t\t</div>\n\t\t<div class=\"ng-doc-playground-divider\"></div>\n\t\t<ng-container *ngIf=\"propertyControls.length\">\n\t\t\t<h5 class=\"ng-doc-title\" ng-doc-text>Settings</h5>\n\t\t\t<ng-doc-playground-property\n\t\t\t\t*ngFor=\"let propertyControl of propertyControls\"\n\t\t\t\t[name]=\"propertyControl.property.inputName\"\n\t\t\t\t[property]=\"propertyControl.property\"\n\t\t\t\t[typeControl]=\"propertyControl.typeControl\"\n\t\t\t\t[defaultValue]=\"defaultValues[propertyControl.propertyName]\"\n\t\t\t\t[control]=\"\n\t\t\t\t\tgetFormControl | bind: this | execute: 'properties':propertyControl.propertyName\n\t\t\t\t\">\n\t\t\t</ng-doc-playground-property>\n\t\t</ng-container>\n\n\t\t<ng-container *ngIf=\"(dynamicContent | keyvalue)?.length\">\n\t\t\t<h5 class=\"ng-doc-title\" ng-doc-text>Content</h5>\n\t\t\t<ng-doc-playground-property\n\t\t\t\t*ngFor=\"let content of dynamicContent | keyvalue\"\n\t\t\t\t[name]=\"content.value.label\"\n\t\t\t\t[property]=\"content.value\"\n\t\t\t\t[typeControl]=\"contentTypeControl\"\n\t\t\t\t[control]=\"getFormControl | bind: this | execute: 'content':content.key\">\n\t\t\t</ng-doc-playground-property>\n\t\t</ng-container>\n\t</div>\n</div>\n", styles: [":host .ng-doc-playground-properties-wrapper{position:relative;display:flex;grid-gap:calc(var(--ng-doc-base-gutter) * 2);gap:calc(var(--ng-doc-base-gutter) * 2)}:host .ng-doc-playground-properties-wrapper.vertical{flex-direction:column}:host .ng-doc-playground-properties-wrapper.vertical .ng-doc-playground-demos{margin-right:0;margin-bottom:calc(var(--ng-doc-base-gutter) * 2)}:host .ng-doc-playground-properties-wrapper.vertical .ng-doc-playground-properties{width:100%}:host .ng-doc-playground-properties-wrapper .ng-doc-playground-demos{display:flex;flex-direction:column;width:100%;overflow:hidden}:host .ng-doc-playground-properties-wrapper .ng-doc-playground-properties{flex-shrink:0;width:300px;padding:calc(var(--ng-doc-base-gutter) * 2) calc(var(--ng-doc-base-gutter) * 3);background-color:var(--ng-doc-base-1);border-radius:var(--ng-doc-base-gutter);border:1px solid var(--ng-doc-border-color)}:host .ng-doc-playground-properties-wrapper .ng-doc-playground-properties ng-doc-playground-property:not(:last-child){margin-bottom:calc(var(--ng-doc-base-gutter) * 2)}:host .ng-doc-playground-properties-wrapper .ng-doc-playground-properties .ng-doc-playground-controls{display:flex;justify-content:flex-end}:host .ng-doc-playground-properties-wrapper .ng-doc-playground-properties .ng-doc-playground-header{display:flex;align-items:center;justify-content:space-between;height:40px;margin-bottom:calc(var(--ng-doc-base-gutter) * 2)}:host .ng-doc-playground-properties-wrapper .ng-doc-playground-properties .ng-doc-playground-header h4{margin:0}:host .ng-doc-playground-properties-wrapper .ng-doc-playground-properties .ng-doc-playground-setting{display:flex;flex-direction:column}:host .ng-doc-playground-properties-wrapper .ng-doc-title{margin-top:0;margin-bottom:calc(var(--ng-doc-base-gutter) + var(--ng-doc-base-gutter) / 2)}:host .ng-doc-playground-divider{margin:calc(var(--ng-doc-base-gutter) * 2) 0;height:1px;background-color:var(--ng-doc-base-2)}\n"] }]
286
307
  }], ctorParameters: function () { return [{ type: i1.BreakpointObserver }, { type: i0.Injector }]; }, propDecorators: { form: [{
287
308
  type: Input
288
309
  }], properties: [{
@@ -297,6 +318,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.0", ngImpor
297
318
  type: Input
298
319
  }], recreateDemo: [{
299
320
  type: Input
321
+ }], showResetButton: [{
322
+ type: Input
300
323
  }], recreateDemoChange: [{
301
324
  type: Output
302
325
  }], resetForm: [{
@@ -312,6 +335,8 @@ class NgDocPlaygroundComponent {
312
335
  this.selectors = [];
313
336
  this.options = {};
314
337
  this.recreateDemo = false;
338
+ this.defaultProperties = {};
339
+ this.defaultContent = {};
315
340
  }
316
341
  ngOnChanges({ options }) {
317
342
  if (options) {
@@ -320,17 +345,27 @@ class NgDocPlaygroundComponent {
320
345
  }
321
346
  }
322
347
  ngAfterViewInit() {
323
- const propertiesForm = this.formBuilder.group(this.getPropertiesFormValues());
324
- const contentForm = this.formBuilder.group(this.getContentFormValues());
348
+ this.defaultProperties = this.getPropertiesFormValues();
349
+ this.defaultContent = this.getContentFormValues();
350
+ const propertiesForm = this.formBuilder.group(this.defaultProperties);
351
+ const contentForm = this.formBuilder.group(this.defaultContent);
325
352
  this.formGroup = this.formBuilder.group({
326
353
  properties: propertiesForm,
327
354
  content: contentForm,
328
355
  });
329
356
  // `patchValue` is needed to set `undefined` values, otherwise they will be ignored by the Angular form
330
357
  this.formGroup.patchValue({
331
- properties: Object.assign({}, this.getPropertiesFormValues(), this.configuration.inputs),
332
- content: this.getContentFormValues(),
358
+ properties: Object.assign({}, this.defaultProperties, this.configuration.inputs),
359
+ content: this.defaultContent,
333
360
  });
361
+ console.log(this.configuration);
362
+ }
363
+ isDefaultState() {
364
+ if (!this.formGroup) {
365
+ return false;
366
+ }
367
+ return (isSameObject(this.formGroup.value.properties ?? {}, this.defaultValues ?? {}) &&
368
+ isSameObject(this.formGroup.value.content ?? {}, this.defaultContent ?? {}));
334
369
  }
335
370
  getPropertiesFormValues() {
336
371
  const formValues = objectKeys(this.properties ?? {}).reduce((controls, key) => {
@@ -350,17 +385,24 @@ class NgDocPlaygroundComponent {
350
385
  }, {});
351
386
  }
352
387
  resetForm() {
388
+ this.formGroup.reset({}, { emitEvent: false });
353
389
  this.formGroup?.patchValue({
354
- properties: this.getPropertiesFormValues(),
355
- content: this.getContentFormValues(),
390
+ properties: this.defaultProperties,
391
+ content: this.defaultContent,
356
392
  });
357
393
  }
358
394
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.0", ngImport: i0, type: NgDocPlaygroundComponent, deps: [{ token: i1$1.NgDocRootPage }, { token: i2.FormBuilder }], target: i0.ɵɵFactoryTarget.Component }); }
359
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.0.0", type: NgDocPlaygroundComponent, isStandalone: true, selector: "ng-doc-playground", inputs: { id: "id", pipeName: "pipeName", selectors: "selectors", properties: "properties", options: "options" }, usesOnChanges: true, ngImport: i0, template: "<ng-container *ngIf=\"configuration\">\n\t<ng-doc-playground-properties\n\t\t[form]=\"formGroup\"\n\t\t[properties]=\"properties\"\n\t\t[ignoreInputs]=\"configuration.hiddenInputs\"\n\t\t[dynamicContent]=\"configuration.content\"\n\t\t[hideSidePanel]=\"configuration.hideSidePanel ?? false\"\n\t\t[defaultValues]=\"defaultValues\"\n\t\t[(recreateDemo)]=\"recreateDemo\"\n\t\t(resetForm)=\"resetForm()\">\n\t\t<ng-doc-playground-demo\n\t\t\t*ngFor=\"let selector of configuration.selectors ?? selectors | asArray\"\n\t\t\t[id]=\"id\"\n\t\t\t[selector]=\"selector\"\n\t\t\t[properties]=\"properties\"\n\t\t\t[configuration]=\"configuration\"\n\t\t\t[recreateDemo]=\"recreateDemo\"\n\t\t\t[form]=\"formGroup\"\n\t\t\t[expanded]=\"configuration.expanded ?? false\">\n\t\t</ng-doc-playground-demo>\n\n\t\t<ng-doc-playground-demo\n\t\t\t*ngIf=\"pipeName\"\n\t\t\t[id]=\"id\"\n\t\t\t[pipeName]=\"pipeName\"\n\t\t\t[properties]=\"properties\"\n\t\t\t[configuration]=\"configuration\"\n\t\t\t[recreateDemo]=\"recreateDemo\"\n\t\t\t[form]=\"formGroup\">\n\t\t</ng-doc-playground-demo>\n\t</ng-doc-playground-properties>\n</ng-container>\n", styles: [":host{display:block;margin:var(--ng-doc-playground-margin)}\n"], dependencies: [{ kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: NgDocPlaygroundPropertiesComponent, selector: "ng-doc-playground-properties", inputs: ["form", "properties", "ignoreInputs", "dynamicContent", "defaultValues", "hideSidePanel", "recreateDemo"], outputs: ["recreateDemoChange", "resetForm"] }, { kind: "directive", type: NgFor, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "component", type: NgDocPlaygroundDemoComponent, selector: "ng-doc-playground-demo", inputs: ["id", "pipeName", "selector", "configuration", "properties", "recreateDemo", "form", "expanded"] }, { kind: "pipe", type: NgDocAsArrayPipe, name: "asArray" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
395
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.0.0", type: NgDocPlaygroundComponent, isStandalone: true, selector: "ng-doc-playground", inputs: { id: "id", pipeName: "pipeName", selectors: "selectors", properties: "properties", options: "options" }, usesOnChanges: true, ngImport: i0, template: "<ng-container *ngIf=\"configuration\">\n\t<ng-doc-playground-properties\n\t\t[form]=\"formGroup\"\n\t\t[properties]=\"properties\"\n\t\t[ignoreInputs]=\"configuration.hiddenInputs\"\n\t\t[dynamicContent]=\"configuration.content\"\n\t\t[hideSidePanel]=\"configuration.hideSidePanel ?? false\"\n\t\t[defaultValues]=\"defaultValues\"\n\t\t[showResetButton]=\"!isDefaultState()\"\n\t\t[(recreateDemo)]=\"recreateDemo\"\n\t\t(resetForm)=\"resetForm()\">\n\t\t<ng-doc-playground-demo\n\t\t\t*ngFor=\"let selector of configuration.selectors ?? selectors | asArray\"\n\t\t\t[id]=\"id\"\n\t\t\t[selector]=\"selector\"\n\t\t\t[properties]=\"properties\"\n\t\t\t[configuration]=\"configuration\"\n\t\t\t[recreateDemo]=\"recreateDemo\"\n\t\t\t[form]=\"formGroup\"\n\t\t\t[expanded]=\"configuration.expanded ?? false\">\n\t\t</ng-doc-playground-demo>\n\n\t\t<ng-doc-playground-demo\n\t\t\t*ngIf=\"pipeName\"\n\t\t\t[id]=\"id\"\n\t\t\t[pipeName]=\"pipeName\"\n\t\t\t[properties]=\"properties\"\n\t\t\t[configuration]=\"configuration\"\n\t\t\t[recreateDemo]=\"recreateDemo\"\n\t\t\t[form]=\"formGroup\">\n\t\t</ng-doc-playground-demo>\n\t</ng-doc-playground-properties>\n</ng-container>\n", styles: [":host{display:block;margin:var(--ng-doc-playground-margin)}\n"], dependencies: [{ kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: NgDocPlaygroundPropertiesComponent, selector: "ng-doc-playground-properties", inputs: ["form", "properties", "ignoreInputs", "dynamicContent", "defaultValues", "hideSidePanel", "recreateDemo", "showResetButton"], outputs: ["recreateDemoChange", "resetForm"] }, { kind: "directive", type: NgFor, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "component", type: NgDocPlaygroundDemoComponent, selector: "ng-doc-playground-demo", inputs: ["id", "pipeName", "selector", "configuration", "properties", "recreateDemo", "form", "expanded"] }, { kind: "pipe", type: NgDocAsArrayPipe, name: "asArray" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
360
396
  }
361
397
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.0", ngImport: i0, type: NgDocPlaygroundComponent, decorators: [{
362
398
  type: Component,
363
- args: [{ selector: 'ng-doc-playground', changeDetection: ChangeDetectionStrategy.OnPush, standalone: true, imports: [NgIf, NgDocPlaygroundPropertiesComponent, NgFor, NgDocPlaygroundDemoComponent, NgDocAsArrayPipe], template: "<ng-container *ngIf=\"configuration\">\n\t<ng-doc-playground-properties\n\t\t[form]=\"formGroup\"\n\t\t[properties]=\"properties\"\n\t\t[ignoreInputs]=\"configuration.hiddenInputs\"\n\t\t[dynamicContent]=\"configuration.content\"\n\t\t[hideSidePanel]=\"configuration.hideSidePanel ?? false\"\n\t\t[defaultValues]=\"defaultValues\"\n\t\t[(recreateDemo)]=\"recreateDemo\"\n\t\t(resetForm)=\"resetForm()\">\n\t\t<ng-doc-playground-demo\n\t\t\t*ngFor=\"let selector of configuration.selectors ?? selectors | asArray\"\n\t\t\t[id]=\"id\"\n\t\t\t[selector]=\"selector\"\n\t\t\t[properties]=\"properties\"\n\t\t\t[configuration]=\"configuration\"\n\t\t\t[recreateDemo]=\"recreateDemo\"\n\t\t\t[form]=\"formGroup\"\n\t\t\t[expanded]=\"configuration.expanded ?? false\">\n\t\t</ng-doc-playground-demo>\n\n\t\t<ng-doc-playground-demo\n\t\t\t*ngIf=\"pipeName\"\n\t\t\t[id]=\"id\"\n\t\t\t[pipeName]=\"pipeName\"\n\t\t\t[properties]=\"properties\"\n\t\t\t[configuration]=\"configuration\"\n\t\t\t[recreateDemo]=\"recreateDemo\"\n\t\t\t[form]=\"formGroup\">\n\t\t</ng-doc-playground-demo>\n\t</ng-doc-playground-properties>\n</ng-container>\n", styles: [":host{display:block;margin:var(--ng-doc-playground-margin)}\n"] }]
399
+ args: [{ selector: 'ng-doc-playground', changeDetection: ChangeDetectionStrategy.OnPush, standalone: true, imports: [
400
+ NgIf,
401
+ NgDocPlaygroundPropertiesComponent,
402
+ NgFor,
403
+ NgDocPlaygroundDemoComponent,
404
+ NgDocAsArrayPipe,
405
+ ], template: "<ng-container *ngIf=\"configuration\">\n\t<ng-doc-playground-properties\n\t\t[form]=\"formGroup\"\n\t\t[properties]=\"properties\"\n\t\t[ignoreInputs]=\"configuration.hiddenInputs\"\n\t\t[dynamicContent]=\"configuration.content\"\n\t\t[hideSidePanel]=\"configuration.hideSidePanel ?? false\"\n\t\t[defaultValues]=\"defaultValues\"\n\t\t[showResetButton]=\"!isDefaultState()\"\n\t\t[(recreateDemo)]=\"recreateDemo\"\n\t\t(resetForm)=\"resetForm()\">\n\t\t<ng-doc-playground-demo\n\t\t\t*ngFor=\"let selector of configuration.selectors ?? selectors | asArray\"\n\t\t\t[id]=\"id\"\n\t\t\t[selector]=\"selector\"\n\t\t\t[properties]=\"properties\"\n\t\t\t[configuration]=\"configuration\"\n\t\t\t[recreateDemo]=\"recreateDemo\"\n\t\t\t[form]=\"formGroup\"\n\t\t\t[expanded]=\"configuration.expanded ?? false\">\n\t\t</ng-doc-playground-demo>\n\n\t\t<ng-doc-playground-demo\n\t\t\t*ngIf=\"pipeName\"\n\t\t\t[id]=\"id\"\n\t\t\t[pipeName]=\"pipeName\"\n\t\t\t[properties]=\"properties\"\n\t\t\t[configuration]=\"configuration\"\n\t\t\t[recreateDemo]=\"recreateDemo\"\n\t\t\t[form]=\"formGroup\">\n\t\t</ng-doc-playground-demo>\n\t</ng-doc-playground-properties>\n</ng-container>\n", styles: [":host{display:block;margin:var(--ng-doc-playground-margin)}\n"] }]
364
406
  }], ctorParameters: function () { return [{ type: i1$1.NgDocRootPage }, { type: i2.FormBuilder }]; }, propDecorators: { id: [{
365
407
  type: Input,
366
408
  args: [{ required: true }]
@@ -405,7 +447,12 @@ class NgDocBasePlayground {
405
447
  }, {});
406
448
  }
407
449
  else if (this.playgroundInstance) {
408
- this.defaultValues = extractFunctionDefaults(this.playgroundInstance.prototype.transform);
450
+ const defaults = extractFunctionDefaults(this.playgroundInstance.prototype.transform);
451
+ this.defaultValues = Object.keys(this.playgroundContainer.properties ?? {}).reduce((def, key, i) => {
452
+ // we do +1 because the first argument is the `value` of the transform function
453
+ def[key] = defaults[i + 1];
454
+ return def;
455
+ }, {});
409
456
  }
410
457
  else {
411
458
  throw new Error('Playground is not defined or initialized');
@@ -414,8 +461,8 @@ class NgDocBasePlayground {
414
461
  this.playgroundContainer.defaultValues = this.defaultValues;
415
462
  }
416
463
  /*
417
- This is a hack just to wait for the playground container to be initialized and only then
418
- attach the change detector to have correct inputs values.
464
+ This is a hack just to wait for the playground container to be initialized and only then
465
+ attach the change detector to have correct inputs values.
419
466
  */
420
467
  Promise.resolve().then(() => {
421
468
  this.changeDetectorRef.reattach();
@@ -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 { AsyncPipe } from '@angular/common';\nimport {\n\tChangeDetectionStrategy,\n\tComponent,\n\tComponentRef,\n\tInjectionToken,\n\tInjector,\n\tInput,\n\tOnChanges,\n\tOnDestroy,\n\tSimpleChanges,\n\tType,\n\tViewChild,\n\tViewContainerRef,\n} from '@angular/core';\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 { stringify } from '@ng-doc/core';\nimport {\n\tbuildPlaygroundDemoPipeTemplate,\n\tbuildPlaygroundDemoTemplate,\n} from '@ng-doc/core/helpers/build-playground-demo-template';\nimport { objectKeys } from '@ng-doc/core/helpers/object-keys';\nimport { NgDocPlaygroundConfig, NgDocPlaygroundProperties } from '@ng-doc/core/interfaces';\nimport { NgDocLetDirective, NgDocSmoothResizeComponent } from '@ng-doc/ui-kit';\nimport { UntilDestroy, untilDestroyed } from '@ngneat/until-destroy';\nimport { from, Observable, of, Subject } from 'rxjs';\nimport { startWith, takeUntil } from 'rxjs/operators';\n\nimport { NgDocBasePlayground } from '../base-playground';\nimport { NgDocPlaygroundForm } from '../playground-form';\n\n@Component({\n\tselector: 'ng-doc-playground-demo',\n\ttemplateUrl: './playground-demo.component.html',\n\tstyleUrls: ['./playground-demo.component.scss'],\n\tchangeDetection: ChangeDetectionStrategy.OnPush,\n\tstandalone: true,\n\timports: [NgDocDemoDisplayerComponent, AsyncPipe, NgDocSmoothResizeComponent, NgDocLetDirective],\n})\n@UntilDestroy()\nexport class NgDocPlaygroundDemoComponent<\n\tT extends NgDocPlaygroundProperties = NgDocPlaygroundProperties,\n> implements OnChanges, OnDestroy\n{\n\t@Input()\n\tid: string = '';\n\n\t@Input()\n\tpipeName: string = '';\n\n\t@Input()\n\tselector: string = '';\n\n\t@Input()\n\tconfiguration?: NgDocPlaygroundConfig;\n\n\t@Input()\n\tproperties?: T;\n\n\t@Input()\n\trecreateDemo: boolean = false;\n\n\t@Input()\n\tform!: FormGroup<NgDocPlaygroundForm>;\n\n\t@Input()\n\texpanded: boolean = false;\n\n\t@ViewChild('demoOutlet', { static: true, read: ViewContainerRef })\n\tdemoOutlet?: ViewContainerRef;\n\n\tplaygroundDemo?: typeof NgDocBasePlayground;\n\n\tcode: Observable<string> = of('');\n\n\tprivate demoRef?: ComponentRef<NgDocBasePlayground>;\n\tprivate readonly unsubscribe$: Subject<void> = new Subject<void>();\n\n\tconstructor(private readonly injector: Injector) {}\n\n\tngOnChanges({ form, id }: SimpleChanges): void {\n\t\tif (form || id) {\n\t\t\tthis.unsubscribe$.next();\n\n\t\t\tconst demoInjector: InjectionToken<Array<typeof NgDocBasePlayground>> | undefined =\n\t\t\t\tgetPlaygroundDemoToken(this.id);\n\n\t\t\tif (demoInjector) {\n\t\t\t\tconst demos: Array<typeof NgDocBasePlayground> = this.injector.get(demoInjector, []);\n\n\t\t\t\tthis.playgroundDemo = demos.find(\n\t\t\t\t\t(demo: typeof NgDocBasePlayground) =>\n\t\t\t\t\t\tdemo.selector === this.selector || demo.selector === this.pipeName,\n\t\t\t\t);\n\t\t\t}\n\n\t\t\tthis.updateDemo();\n\n\t\t\tthis.form?.valueChanges\n\t\t\t\t.pipe(takeUntil(this.unsubscribe$), untilDestroyed(this), startWith(this.form?.value))\n\t\t\t\t.subscribe((data: NgDocFormPartialValue<typeof this.form>) => this.updateDemo(data));\n\t\t}\n\t}\n\n\tprivate updateDemo(data?: NgDocFormPartialValue<typeof this.form>): void {\n\t\tif (this.recreateDemo || !this.demoRef) {\n\t\t\tthis.createDemo();\n\t\t}\n\n\t\tif (data) {\n\t\t\tthis.demoRef?.setInput('properties', data.properties ?? {});\n\t\t\tthis.demoRef?.setInput('content', data.content ?? {});\n\t\t\tthis.demoRef?.setInput('actionData', this.configuration?.data ?? {});\n\t\t}\n\n\t\tthis.updateCodeView();\n\t}\n\n\tprivate createDemo(): void {\n\t\tif (this.playgroundDemo) {\n\t\t\tthis.demoRef?.destroy();\n\t\t\tthis.demoRef = this.demoOutlet?.createComponent(\n\t\t\t\tthis.playgroundDemo as unknown as Type<NgDocBasePlayground>,\n\t\t\t);\n\t\t\tthis.demoRef?.changeDetectorRef.markForCheck();\n\t\t}\n\t}\n\n\tprivate updateCodeView(): void {\n\t\tconst template: string = this.pipeName\n\t\t\t? buildPlaygroundDemoPipeTemplate(\n\t\t\t\t\tthis.configuration?.template ?? '',\n\t\t\t\t\tthis.pipeName,\n\t\t\t\t\tthis.getActiveContent(),\n\t\t\t\t\tthis.getActiveInputs(),\n\t\t\t )\n\t\t\t: buildPlaygroundDemoTemplate(\n\t\t\t\t\tthis.configuration?.template ?? '',\n\t\t\t\t\tthis.selector,\n\t\t\t\t\tthis.getActiveContent(),\n\t\t\t\t\tthis.getActiveInputs(),\n\t\t\t );\n\n\t\tthis.code = from(formatHtml(template));\n\t}\n\n\tprivate getActiveContent(): Record<string, string> {\n\t\tconst formData: Record<string, boolean> =\n\t\t\t(this.form?.controls.content.value as Record<string, boolean>) ?? {};\n\n\t\treturn objectKeys(formData).reduce((result: Record<string, string>, key: string) => {\n\t\t\tresult[key] = formData[key] ? this.configuration?.content?.[key].template ?? '' : '';\n\n\t\t\treturn result;\n\t\t}, {});\n\t}\n\n\tprivate getActiveInputs(): Record<string, string> {\n\t\tconst formData: Record<string, unknown> =\n\t\t\t(this.form?.controls.properties.value as Record<string, unknown>) ?? {};\n\n\t\treturn objectKeys(formData).reduce((result: Record<string, string>, key: string) => {\n\t\t\tconst value: unknown = formData[key];\n\t\t\tconst property: unknown | undefined = this.demoRef?.instance?.defaultValues[key];\n\n\t\t\tif (property !== value) {\n\t\t\t\tresult[key] = stringify(value).replace(/\"/g, `'`);\n\t\t\t}\n\n\t\t\treturn result;\n\t\t}, {});\n\t}\n\n\tngOnDestroy(): void {\n\t\tthis.unsubscribe$.next();\n\t\tthis.unsubscribe$.complete();\n\t}\n}\n","<ng-doc-smooth-resize *ngDocLet=\"code | async as codeContent\" [trigger]=\"codeContent\">\n\t<ng-doc-demo-displayer\n\t\t[code]=\"codeContent ?? ''\"\n\t\t[border]=\"false\"\n\t\t[expanded]=\"expanded\"\n\t\tlanguage=\"html\">\n\t\t<ng-container #demoOutlet></ng-container>\n\t</ng-doc-demo-displayer>\n</ng-doc-smooth-resize>\n","import {\n\tChangeDetectionStrategy,\n\tComponent,\n\tComponentRef,\n\tHostBinding,\n\tInput,\n\tOnChanges,\n\tSimpleChanges,\n\tViewChild,\n\tViewContainerRef,\n} from '@angular/core';\nimport {FormControl} from '@angular/forms';\nimport {isPlaygroundProperty} from '@ng-doc/app/helpers';\nimport {NgDocProvidedTypeControl, NgDocTypeControl, NgDocTypeControlProviderOptions} from '@ng-doc/app/interfaces';\nimport {NgDocSanitizeHtmlPipe} from '@ng-doc/app/pipes';\nimport {NgDocPlaygroundContent, NgDocPlaygroundProperty} from '@ng-doc/core/interfaces';\nimport {NgDocLabelComponent, NgDocTooltipDirective} from '@ng-doc/ui-kit';\n\n@Component({\n\tselector: 'ng-doc-playground-property',\n\ttemplateUrl: './playground-property.component.html',\n\tstyleUrls: ['./playground-property.component.scss'],\n\tchangeDetection: ChangeDetectionStrategy.OnPush,\n\tstandalone: true,\n\timports: [NgDocLabelComponent, NgDocTooltipDirective, NgDocSanitizeHtmlPipe],\n})\nexport class NgDocPlaygroundPropertyComponent implements OnChanges {\n\t@Input()\n\tname: string = '';\n\n\t@Input()\n\tproperty?: NgDocPlaygroundProperty | NgDocPlaygroundContent;\n\n\t@Input()\n\ttypeControl?: NgDocProvidedTypeControl;\n\n\t@Input()\n\tcontrol?: FormControl;\n\n\t@Input()\n\tdefaultValue?: unknown;\n\n\t@ViewChild('propertyOutlet', {read: ViewContainerRef, static: true})\n\tpropertyOutlet?: ViewContainerRef;\n\n\tprotected option?: NgDocTypeControlProviderOptions;\n\tprivate propertyTypeControl?: ComponentRef<NgDocTypeControl>;\n\n\tngOnChanges({property, control, typeControl, defaultValue}: SimpleChanges): void {\n\t\tif ((property || control || typeControl || defaultValue) && this.property && this.typeControl) {\n\t\t\tthis.propertyTypeControl?.destroy();\n\t\t\tthis.propertyTypeControl = undefined;\n\n\t\t\tif (this.typeControl && this.propertyOutlet) {\n\t\t\t\tthis.propertyTypeControl = this.propertyOutlet.createComponent(this.typeControl.control);\n\t\t\t\tthis.propertyTypeControl.instance.name = this.name;\n\t\t\t\tthis.propertyTypeControl.instance.description = this.tooltipContent;\n\t\t\t\tthis.propertyTypeControl.instance.options = isPlaygroundProperty(this.property)\n\t\t\t\t\t? this.property.options\n\t\t\t\t\t: undefined;\n\t\t\t\tthis.propertyTypeControl.instance.default = this.defaultValue;\n\t\t\t\tthis.propertyTypeControl.instance.writeValue(this.control?.value);\n\n\t\t\t\tthis.option = this.typeControl.options;\n\t\t\t}\n\n\t\t\tif (this.control) {\n\t\t\t\tthis.control?.registerOnChange((value: string) => this.propertyTypeControl?.instance?.writeValue(value));\n\t\t\t\tthis.propertyTypeControl?.instance.registerOnChange((value: unknown) => this.control?.setValue(value));\n\t\t\t\tthis.propertyTypeControl?.instance.registerOnTouched(() => this.control?.markAsTouched());\n\t\t\t}\n\t\t}\n\t}\n\n\t@HostBinding('attr.data-has-property-control')\n\tget hasPropertyControl(): boolean {\n\t\treturn !!this.propertyTypeControl;\n\t}\n\n\tget tooltipContent(): string {\n\t\treturn this.property && isPlaygroundProperty(this.property) ? this.property.description ?? '' : '';\n\t}\n}\n","<label [ng-doc-label]=\"option?.hideLabel ? '' : labelContent\">\n\t<ng-template #labelContent>\n\t\t<span\n\t\t\t[ngDocTooltip]=\"tooltipTemplate\"\n\t\t\t[canOpen]=\"!!tooltipContent\"\n\t\t\t[positions]=\"['left-center', 'top-right', 'bottom-right']\"\n\t\t\t>{{ name }}</span\n\t\t>\n\t\t<ng-template #tooltipTemplate>\n\t\t\t<div [innerHTML]=\"tooltipContent | ngDocSanitizeHtml\"></div>\n\t\t</ng-template>\n\t</ng-template>\n\t<ng-container #propertyOutlet></ng-container>\n</label>\n","import { BreakpointObserver, Breakpoints, BreakpointState } from '@angular/cdk/layout';\nimport { AsyncPipe, KeyValuePipe, NgFor, NgIf } from '@angular/common';\nimport {\n\tChangeDetectionStrategy,\n\tComponent,\n\tEventEmitter,\n\tInjectionToken,\n\tInjector,\n\tInput,\n\tisDevMode,\n\tOnChanges,\n\tOutput,\n\tSimpleChanges,\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, isPresent, objectKeys } from '@ng-doc/core';\nimport {\n\tNgDocPlaygroundContent,\n\tNgDocPlaygroundProperties,\n\tNgDocPlaygroundProperty,\n} from '@ng-doc/core/interfaces';\nimport {\n\tNgDocBindPipe,\n\tNgDocButtonComponent,\n\tNgDocCheckboxComponent,\n\tNgDocExecutePipe,\n\tNgDocIconComponent,\n\tNgDocTextComponent,\n\tNgDocTextRightDirective,\n\tNgDocTooltipDirective,\n} from '@ng-doc/ui-kit';\nimport { Observable } from 'rxjs';\nimport { map } from 'rxjs/operators';\n\nimport { NgDocPlaygroundForm } from '../playground-form';\nimport { NgDocPlaygroundPropertyComponent } from '../playground-property/playground-property.component';\nimport { NgDocPlaygroundPropertyControl } from '../playground-property-control';\n\n@Component({\n\tselector: 'ng-doc-playground-properties',\n\ttemplateUrl: './playground-properties.component.html',\n\tstyleUrls: ['./playground-properties.component.scss'],\n\tchangeDetection: ChangeDetectionStrategy.OnPush,\n\tstandalone: true,\n\timports: [\n\t\tNgDocTextComponent,\n\t\tNgDocButtonComponent,\n\t\tNgDocCheckboxComponent,\n\t\tFormsModule,\n\t\tNgDocTooltipDirective,\n\t\tNgDocIconComponent,\n\t\tNgDocTextRightDirective,\n\t\tNgIf,\n\t\tNgFor,\n\t\tNgDocPlaygroundPropertyComponent,\n\t\tAsyncPipe,\n\t\tKeyValuePipe,\n\t\tNgDocBindPipe,\n\t\tNgDocExecutePipe,\n\t],\n})\nexport class NgDocPlaygroundPropertiesComponent<\n\tP extends NgDocPlaygroundProperties,\n\tC extends Record<string, NgDocPlaygroundContent>,\n> implements OnChanges\n{\n\t@Input()\n\tform!: FormGroup<NgDocPlaygroundForm>;\n\n\t@Input()\n\tproperties?: P;\n\n\t@Input()\n\tignoreInputs?: string[] = [];\n\n\t@Input()\n\tdynamicContent?: C;\n\n\t@Input()\n\tdefaultValues?: Record<string, unknown>;\n\n\t@Input()\n\thideSidePanel: boolean = false;\n\n\t@Input()\n\trecreateDemo: boolean = false;\n\n\t@Output()\n\trecreateDemoChange: EventEmitter<boolean> = new EventEmitter<boolean>();\n\n\t@Output()\n\tresetForm: EventEmitter<void> = new EventEmitter<void>();\n\n\treadonly breakpoints: string[] = [Breakpoints.XSmall];\n\treadonly observer: Observable<boolean>;\n\n\tprotected propertyControls: NgDocPlaygroundPropertyControl[] = [];\n\tprotected contentTypeControl?: NgDocProvidedTypeControl = this.getControlForType('boolean');\n\n\tconstructor(\n\t\tprotected readonly breakpointObserver: BreakpointObserver,\n\t\tprivate injector: Injector,\n\t) {\n\t\tthis.observer = this.breakpointObserver\n\t\t\t.observe(this.breakpoints)\n\t\t\t.pipe(map((state: BreakpointState) => state.matches));\n\t}\n\n\tngOnChanges({ properties }: SimpleChanges): void {\n\t\tif (properties && this.properties) {\n\t\t\tthis.propertyControls = objectKeys(this.properties)\n\t\t\t\t.filter((key: keyof P) => this.ignoreInputs?.includes(String(key)) !== true)\n\t\t\t\t.map((key: keyof P) => {\n\t\t\t\t\tif (this.properties) {\n\t\t\t\t\t\tconst property: NgDocPlaygroundProperty = this.properties[key];\n\t\t\t\t\t\tconst typeControl: NgDocProvidedTypeControl | undefined = this.getTypeControl(property);\n\n\t\t\t\t\t\tif (typeControl) {\n\t\t\t\t\t\t\treturn {\n\t\t\t\t\t\t\t\tpropertyName: String(key),\n\t\t\t\t\t\t\t\tproperty,\n\t\t\t\t\t\t\t\ttypeControl,\n\t\t\t\t\t\t\t};\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\treturn null;\n\t\t\t\t})\n\t\t\t\t.filter(isPresent)\n\t\t\t\t.sort((a: NgDocPlaygroundPropertyControl, b: NgDocPlaygroundPropertyControl) => {\n\t\t\t\t\tconst aOrder: number | undefined = a.typeControl.options?.order;\n\t\t\t\t\tconst bOrder: number | undefined = b.typeControl.options?.order;\n\n\t\t\t\t\tif (isPresent(aOrder) && isPresent(bOrder)) {\n\t\t\t\t\t\treturn aOrder - bOrder;\n\t\t\t\t\t}\n\t\t\t\t\tif (isPresent(aOrder)) {\n\t\t\t\t\t\treturn -1;\n\t\t\t\t\t}\n\t\t\t\t\tif (isPresent(bOrder)) {\n\t\t\t\t\t\treturn 1;\n\t\t\t\t\t}\n\t\t\t\t\treturn a.property.inputName.localeCompare(b.property.inputName);\n\t\t\t\t});\n\t\t}\n\t}\n\n\tgetFormControl(controlType: keyof typeof this.form.controls, key: string): FormControl {\n\t\treturn this.form.get(controlType)?.get(key) as FormControl;\n\t}\n\n\tprivate getTypeControl(property: NgDocPlaygroundProperty): NgDocProvidedTypeControl | undefined {\n\t\tconst type: string = property.type;\n\t\tconst typeControl: NgDocProvidedTypeControl | undefined =\n\t\t\tthis.getControlForType(type) ??\n\t\t\tthis.getControlForTypeAlias(isPlaygroundProperty(property) ? property.options : undefined);\n\n\t\tif (!typeControl && isDevMode()) {\n\t\t\tconsole.warn(\n\t\t\t\t`NgDocPlayground didn't find the control for the @Input \"${property.inputName}\", the type \"${type}\" was not recognized'`,\n\t\t\t);\n\t\t}\n\n\t\treturn typeControl;\n\t}\n\n\tprivate getControlForType(type: string): NgDocProvidedTypeControl | undefined {\n\t\tconst token: InjectionToken<NgDocProvidedTypeControl> | undefined = getTokenForType(type);\n\n\t\treturn token ? this.injector.get(token) : undefined;\n\t}\n\n\tprivate getControlForTypeAlias(options?: string[]): NgDocProvidedTypeControl | undefined {\n\t\tif (options && options.length) {\n\t\t\tlet optionsIsValid: boolean = true;\n\n\t\t\ttry {\n\t\t\t\t// checking that all values are extractable\n\t\t\t\toptions.forEach((item: string) => extractValueOrThrow(item));\n\t\t\t} catch {\n\t\t\t\toptionsIsValid = false;\n\t\t\t}\n\n\t\t\tif (optionsIsValid) {\n\t\t\t\tconst token: InjectionToken<NgDocProvidedTypeControl> | undefined =\n\t\t\t\t\tgetTokenForType('NgDocTypeAlias');\n\n\t\t\t\treturn token ? this.injector.get(token) : undefined;\n\t\t\t}\n\t\t}\n\n\t\treturn undefined;\n\t}\n}\n","<div\n\tclass=\"ng-doc-playground-properties-wrapper\"\n\t[class.vertical]=\"observer | async\"\n\t*ngIf=\"defaultValues\">\n\t<div class=\"ng-doc-playground-demos\">\n\t\t<ng-content></ng-content>\n\t</div>\n\t<div class=\"ng-doc-playground-properties\" *ngIf=\"!hideSidePanel\">\n\t\t<div class=\"ng-doc-playground-header\">\n\t\t\t<h4 ng-doc-text>Playground</h4>\n\t\t\t<button ng-doc-button color=\"red\" (click)=\"resetForm.emit()\">Reset</button>\n\t\t</div>\n\t\t<div class=\"ng-doc-playground-setting\">\n\t\t\t<ng-doc-checkbox [(ngModel)]=\"recreateDemo\" (ngModelChange)=\"recreateDemoChange.emit($event)\">\n\t\t\t\t<span\n\t\t\t\t\tng-doc-text\n\t\t\t\t\t[ngDocTooltip]=\"'Recreates demo everytime\\none of the input has changed'\"\n\t\t\t\t\t[positions]=\"['bottom-right', 'left-center']\">\n\t\t\t\t\tRecreate\n\t\t\t\t\t<ng-doc-icon icon=\"info\" ngDocTextRight></ng-doc-icon>\n\t\t\t\t</span>\n\t\t\t</ng-doc-checkbox>\n\t\t</div>\n\t\t<div class=\"ng-doc-playground-divider\"></div>\n\t\t<ng-container *ngIf=\"propertyControls.length\">\n\t\t\t<h5 class=\"ng-doc-title\" ng-doc-text>Settings</h5>\n\t\t\t<ng-doc-playground-property\n\t\t\t\t*ngFor=\"let propertyControl of propertyControls\"\n\t\t\t\t[name]=\"propertyControl.property.inputName\"\n\t\t\t\t[property]=\"propertyControl.property\"\n\t\t\t\t[typeControl]=\"propertyControl.typeControl\"\n\t\t\t\t[defaultValue]=\"defaultValues[propertyControl.propertyName]\"\n\t\t\t\t[control]=\"\n\t\t\t\t\tgetFormControl | bind: this | execute: 'properties':propertyControl.propertyName\n\t\t\t\t\">\n\t\t\t</ng-doc-playground-property>\n\t\t</ng-container>\n\n\t\t<ng-container *ngIf=\"(dynamicContent | keyvalue)?.length\">\n\t\t\t<h5 class=\"ng-doc-title\" ng-doc-text>Content</h5>\n\t\t\t<ng-doc-playground-property\n\t\t\t\t*ngFor=\"let content of dynamicContent | keyvalue\"\n\t\t\t\t[name]=\"content.value.label\"\n\t\t\t\t[property]=\"content.value\"\n\t\t\t\t[typeControl]=\"contentTypeControl\"\n\t\t\t\t[control]=\"getFormControl | bind: this | execute: 'content':content.key\">\n\t\t\t</ng-doc-playground-property>\n\t\t</ng-container>\n\t</div>\n</div>\n","import {NgFor, NgIf} from '@angular/common';\nimport {AfterViewInit, ChangeDetectionStrategy, Component, Input, OnChanges, SimpleChanges} from '@angular/core';\nimport {FormBuilder, FormGroup} from '@angular/forms';\nimport {NgDocRootPage} from '@ng-doc/app/classes/root-page';\nimport {objectKeys} from '@ng-doc/core/helpers/object-keys';\nimport {NgDocPlaygroundConfig, NgDocPlaygroundOptions, NgDocPlaygroundProperties} 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@Component({\n\tselector: 'ng-doc-playground',\n\ttemplateUrl: './playground.component.html',\n\tstyleUrls: ['./playground.component.scss'],\n\tchangeDetection: ChangeDetectionStrategy.OnPush,\n\tstandalone: true,\n\timports: [NgIf, NgDocPlaygroundPropertiesComponent, NgFor, NgDocPlaygroundDemoComponent, NgDocAsArrayPipe],\n})\nexport class NgDocPlaygroundComponent<T extends NgDocPlaygroundProperties = NgDocPlaygroundProperties>\n\timplements OnChanges, AfterViewInit\n{\n\t@Input({required: true})\n\tid: string = '';\n\n\t@Input()\n\tpipeName: string = '';\n\n\t@Input()\n\tselectors: string[] = [];\n\n\t@Input()\n\tproperties?: T;\n\n\t@Input()\n\toptions: NgDocPlaygroundOptions = {};\n\n\trecreateDemo: boolean = false;\n\tformGroup!: FormGroup<NgDocPlaygroundForm>;\n\tdefaultValues?: Record<string, unknown>;\n\tconfiguration!: NgDocPlaygroundConfig;\n\n\tconstructor(private readonly rootPage: NgDocRootPage, private readonly formBuilder: FormBuilder) {}\n\n\tngOnChanges({options}: SimpleChanges) {\n\t\tif (options) {\n\t\t\t// Join configuration with options\n\t\t\tthis.configuration = Object.assign({}, this.rootPage.page?.playgrounds?.[this.id], this.options);\n\t\t}\n\t}\n\n\tngAfterViewInit(): void {\n\t\tconst propertiesForm: FormGroup = this.formBuilder.group(this.getPropertiesFormValues());\n\t\tconst contentForm: FormGroup = this.formBuilder.group(this.getContentFormValues());\n\n\t\tthis.formGroup = this.formBuilder.group({\n\t\t\tproperties: propertiesForm,\n\t\t\tcontent: contentForm,\n\t\t});\n\t\t// `patchValue` is needed to set `undefined` values, otherwise they will be ignored by the Angular form\n\t\tthis.formGroup.patchValue({\n\t\t\tproperties: Object.assign({}, this.getPropertiesFormValues(), this.configuration.inputs),\n\t\t\tcontent: this.getContentFormValues(),\n\t\t});\n\t}\n\n\tprivate getPropertiesFormValues(): Record<string, unknown> {\n\t\tconst formValues: Record<string, unknown> = objectKeys(this.properties ?? {}).reduce(\n\t\t\t(controls: Record<string, unknown>, key: string) => {\n\t\t\t\tif (this.properties) {\n\t\t\t\t\tcontrols[key] = this.defaultValues ? this.defaultValues[key] : undefined;\n\t\t\t\t}\n\n\t\t\t\treturn controls;\n\t\t\t},\n\t\t\t{} as Record<string, unknown>,\n\t\t);\n\n\t\treturn Object.assign({}, formValues, this.configuration.defaults);\n\t}\n\n\tprivate getContentFormValues(): Record<string, boolean> {\n\t\treturn objectKeys(this.configuration?.content ?? {}).reduce((controls: Record<string, boolean>, key: string) => {\n\t\t\tif (this.configuration?.content) {\n\t\t\t\tcontrols[key] = false;\n\t\t\t}\n\n\t\t\treturn controls;\n\t\t}, {} as Record<keyof T, boolean>);\n\t}\n\n\tresetForm(): void {\n\t\tthis.formGroup?.patchValue({\n\t\t\tproperties: this.getPropertiesFormValues(),\n\t\t\tcontent: this.getContentFormValues(),\n\t\t});\n\t}\n}\n","<ng-container *ngIf=\"configuration\">\n\t<ng-doc-playground-properties\n\t\t[form]=\"formGroup\"\n\t\t[properties]=\"properties\"\n\t\t[ignoreInputs]=\"configuration.hiddenInputs\"\n\t\t[dynamicContent]=\"configuration.content\"\n\t\t[hideSidePanel]=\"configuration.hideSidePanel ?? false\"\n\t\t[defaultValues]=\"defaultValues\"\n\t\t[(recreateDemo)]=\"recreateDemo\"\n\t\t(resetForm)=\"resetForm()\">\n\t\t<ng-doc-playground-demo\n\t\t\t*ngFor=\"let selector of configuration.selectors ?? selectors | asArray\"\n\t\t\t[id]=\"id\"\n\t\t\t[selector]=\"selector\"\n\t\t\t[properties]=\"properties\"\n\t\t\t[configuration]=\"configuration\"\n\t\t\t[recreateDemo]=\"recreateDemo\"\n\t\t\t[form]=\"formGroup\"\n\t\t\t[expanded]=\"configuration.expanded ?? false\">\n\t\t</ng-doc-playground-demo>\n\n\t\t<ng-doc-playground-demo\n\t\t\t*ngIf=\"pipeName\"\n\t\t\t[id]=\"id\"\n\t\t\t[pipeName]=\"pipeName\"\n\t\t\t[properties]=\"properties\"\n\t\t\t[configuration]=\"configuration\"\n\t\t\t[recreateDemo]=\"recreateDemo\"\n\t\t\t[form]=\"formGroup\">\n\t\t</ng-doc-playground-demo>\n\t</ng-doc-playground-properties>\n</ng-container>\n","import {\n\tChangeDetectorRef,\n\tDirective,\n\tinject,\n\tInput,\n\tOnInit,\n\tType,\n\tViewContainerRef,\n} from '@angular/core';\nimport { Constructor, extractFunctionDefaults } from '@ng-doc/core';\nimport { NgDocPlaygroundConfig } from '@ng-doc/core/interfaces';\n\nimport { NgDocPlaygroundComponent } from './playground.component';\n\n/**\n * Base class for playgrounds components.\n */\n@Directive()\nexport abstract class NgDocBasePlayground implements Pick<NgDocPlaygroundConfig, 'data'>, OnInit {\n\tstatic readonly selector: string = 'unknown';\n\tabstract readonly playground?: Type<any>;\n\tabstract readonly viewContainerRef?: ViewContainerRef;\n\tabstract readonly configData: Record<string, unknown>;\n\n\t@Input()\n\tproperties: Record<string, any> = {};\n\n\t@Input()\n\tactionData: Record<string, unknown> = {};\n\n\t@Input()\n\tcontent: any = {};\n\n\tdefaultValues: Record<string, unknown> = {};\n\n\tprivate playgroundContainer: NgDocPlaygroundComponent = inject(NgDocPlaygroundComponent);\n\tprivate changeDetectorRef: ChangeDetectorRef = inject(ChangeDetectorRef);\n\n\tprotected constructor(private playgroundInstance?: Constructor<unknown>) {\n\t\tthis.changeDetectorRef.detach();\n\t}\n\n\tngOnInit(): void {\n\t\t/*\n\t\t * Extract default values from playground properties. We do this in `ngOnInit` because in this case\n\t\t * input values provided from the template are not initialized yet, and we can read default values instead.\n\t\t */\n\t\tif (this.playground) {\n\t\t\tthis.defaultValues = Object.keys(this.playground).reduce(\n\t\t\t\t(values: Record<string, unknown>, key: string) => {\n\t\t\t\t\tif (this.playground) {\n\t\t\t\t\t\t// eslint-disable-next-line @typescript-eslint/ban-ts-comment\n\t\t\t\t\t\t// @ts-ignore\n\t\t\t\t\t\tvalues[key] = this.playground[key];\n\t\t\t\t\t}\n\n\t\t\t\t\treturn values;\n\t\t\t\t},\n\t\t\t\t{},\n\t\t\t);\n\t\t} else if (this.playgroundInstance) {\n\t\t\tthis.defaultValues = extractFunctionDefaults(this.playgroundInstance.prototype.transform);\n\t\t} else {\n\t\t\tthrow new Error('Playground is not defined or initialized');\n\t\t}\n\n\t\tif (!this.playgroundContainer.defaultValues) {\n\t\t\tthis.playgroundContainer.defaultValues = this.defaultValues;\n\t\t}\n\n\t\t/*\n\t\t \tThis is a hack just to wait for the playground container to be initialized and only then\n\t\t \tattach the change detector to have correct inputs values.\n\t\t */\n\t\tPromise.resolve().then(() => {\n\t\t\tthis.changeDetectorRef.reattach();\n\t\t});\n\t}\n\n\tget data(): any {\n\t\treturn Object.assign({}, this.configData, this.actionData);\n\t}\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["objectKeys","i1"],"mappings":";;;;;;;;;;;;;;;;;;;;;;AA4Ca,IAAA,4BAA4B,GATzC,MASa,4BAA4B,CAAA;AAsCxC,IAAA,WAAA,CAA6B,QAAkB,EAAA;QAAlB,IAAQ,CAAA,QAAA,GAAR,QAAQ,CAAU;QAjC/C,IAAE,CAAA,EAAA,GAAW,EAAE,CAAC;QAGhB,IAAQ,CAAA,QAAA,GAAW,EAAE,CAAC;QAGtB,IAAQ,CAAA,QAAA,GAAW,EAAE,CAAC;QAStB,IAAY,CAAA,YA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,EAAA,SAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA,EAAA;kGAAnB,mBAAmB,EAAA,MAAA,EAAA,EAAA,UAAA,EAAA,YAAA,EAAA,UAAA,EAAA,YAAA,EAAA,OAAA,EAAA,SAAA,EAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA,CAAA,EAAA;;2FAAnB,mBAAmB,EAAA,UAAA,EAAA,CAAA;kBADxC,SAAS;6FAQT,UAAU,EAAA,CAAA;sBADT,KAAK;gBAIN,UAAU,EAAA,CAAA;sBADT,KAAK;gBAIN,OAAO,EAAA,CAAA;sBADN,KAAK;;;AC9BP;;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 { AsyncPipe } from '@angular/common';\nimport {\n\tChangeDetectionStrategy,\n\tComponent,\n\tComponentRef,\n\tInjectionToken,\n\tInjector,\n\tInput,\n\tOnChanges,\n\tOnDestroy,\n\tSimpleChanges,\n\tType,\n\tViewChild,\n\tViewContainerRef,\n} from '@angular/core';\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 { stringify } from '@ng-doc/core';\nimport {\n\tbuildPlaygroundDemoPipeTemplate,\n\tbuildPlaygroundDemoTemplate,\n} from '@ng-doc/core/helpers/build-playground-demo-template';\nimport { objectKeys } from '@ng-doc/core/helpers/object-keys';\nimport { NgDocPlaygroundConfig, NgDocPlaygroundProperties } from '@ng-doc/core/interfaces';\nimport { NgDocLetDirective, NgDocSmoothResizeComponent } from '@ng-doc/ui-kit';\nimport { UntilDestroy, untilDestroyed } from '@ngneat/until-destroy';\nimport { from, Observable, of, Subject } from 'rxjs';\nimport { startWith, takeUntil } from 'rxjs/operators';\n\nimport { NgDocBasePlayground } from '../base-playground';\nimport { NgDocPlaygroundForm } from '../playground-form';\n\n@Component({\n\tselector: 'ng-doc-playground-demo',\n\ttemplateUrl: './playground-demo.component.html',\n\tstyleUrls: ['./playground-demo.component.scss'],\n\tchangeDetection: ChangeDetectionStrategy.OnPush,\n\tstandalone: true,\n\timports: [NgDocDemoDisplayerComponent, AsyncPipe, NgDocSmoothResizeComponent, NgDocLetDirective],\n})\n@UntilDestroy()\nexport class NgDocPlaygroundDemoComponent<\n\tT extends NgDocPlaygroundProperties = NgDocPlaygroundProperties,\n> implements OnChanges, OnDestroy\n{\n\t@Input()\n\tid: string = '';\n\n\t@Input()\n\tpipeName: string = '';\n\n\t@Input()\n\tselector: string = '';\n\n\t@Input()\n\tconfiguration?: NgDocPlaygroundConfig;\n\n\t@Input()\n\tproperties?: T;\n\n\t@Input()\n\trecreateDemo: boolean = false;\n\n\t@Input()\n\tform!: FormGroup<NgDocPlaygroundForm>;\n\n\t@Input()\n\texpanded: boolean = false;\n\n\t@ViewChild('demoOutlet', { static: true, read: ViewContainerRef })\n\tdemoOutlet?: ViewContainerRef;\n\n\tplaygroundDemo?: typeof NgDocBasePlayground;\n\n\tcode: Observable<string> = of('');\n\n\tprivate demoRef?: ComponentRef<NgDocBasePlayground>;\n\tprivate readonly unsubscribe$: Subject<void> = new Subject<void>();\n\n\tconstructor(private readonly injector: Injector) {}\n\n\tngOnChanges({ form, id }: SimpleChanges): void {\n\t\tif (form || id) {\n\t\t\tthis.unsubscribe$.next();\n\n\t\t\tconst demoInjector: InjectionToken<Array<typeof NgDocBasePlayground>> | undefined =\n\t\t\t\tgetPlaygroundDemoToken(this.id);\n\n\t\t\tif (demoInjector) {\n\t\t\t\tconst demos: Array<typeof NgDocBasePlayground> = this.injector.get(demoInjector, []);\n\n\t\t\t\tthis.playgroundDemo = demos.find(\n\t\t\t\t\t(demo: typeof NgDocBasePlayground) =>\n\t\t\t\t\t\tdemo.selector === this.selector || demo.selector === this.pipeName,\n\t\t\t\t);\n\t\t\t}\n\n\t\t\tthis.updateDemo();\n\n\t\t\tthis.form?.valueChanges\n\t\t\t\t.pipe(takeUntil(this.unsubscribe$), untilDestroyed(this), startWith(this.form?.value))\n\t\t\t\t.subscribe((data: NgDocFormPartialValue<typeof this.form>) => this.updateDemo(data));\n\t\t}\n\t}\n\n\tprivate updateDemo(data?: NgDocFormPartialValue<typeof this.form>): void {\n\t\tif (this.recreateDemo || !this.demoRef) {\n\t\t\tthis.createDemo();\n\t\t}\n\n\t\tif (data) {\n\t\t\tthis.demoRef?.setInput('properties', data.properties ?? {});\n\t\t\tthis.demoRef?.setInput('content', data.content ?? {});\n\t\t\tthis.demoRef?.setInput('actionData', this.configuration?.data ?? {});\n\t\t}\n\n\t\tthis.updateCodeView();\n\t}\n\n\tprivate createDemo(): void {\n\t\tif (this.playgroundDemo) {\n\t\t\tthis.demoRef?.destroy();\n\t\t\tthis.demoRef = this.demoOutlet?.createComponent(\n\t\t\t\tthis.playgroundDemo as unknown as Type<NgDocBasePlayground>,\n\t\t\t);\n\t\t\tthis.demoRef?.changeDetectorRef.markForCheck();\n\t\t}\n\t}\n\n\tprivate updateCodeView(): void {\n\t\tconst template: string = this.pipeName\n\t\t\t? buildPlaygroundDemoPipeTemplate(\n\t\t\t\t\tthis.configuration?.template ?? '',\n\t\t\t\t\tthis.pipeName,\n\t\t\t\t\tthis.getActiveContent(),\n\t\t\t\t\tthis.getPipeActiveInputs(),\n\t\t\t )\n\t\t\t: buildPlaygroundDemoTemplate(\n\t\t\t\t\tthis.configuration?.template ?? '',\n\t\t\t\t\tthis.selector,\n\t\t\t\t\tthis.getActiveContent(),\n\t\t\t\t\tthis.getActiveInputs(),\n\t\t\t );\n\n\t\tthis.code = from(formatHtml(template));\n\t}\n\n\tprivate getActiveContent(): Record<string, string> {\n\t\tconst formData: Record<string, boolean> =\n\t\t\t(this.form?.controls.content.value as Record<string, boolean>) ?? {};\n\n\t\treturn objectKeys(formData).reduce((result: Record<string, string>, key: string) => {\n\t\t\tresult[key] = formData[key] ? this.configuration?.content?.[key].template ?? '' : '';\n\n\t\t\treturn result;\n\t\t}, {});\n\t}\n\n\tprivate getActiveInputs(): Record<string, string> {\n\t\tconst formData: Record<string, unknown> =\n\t\t\t(this.form?.controls.properties.value as Record<string, unknown>) ?? {};\n\n\t\treturn objectKeys(formData).reduce((result: Record<string, string>, key: string) => {\n\t\t\tconst value: unknown = formData[key];\n\t\t\tconst property: unknown | undefined = this.demoRef?.instance?.defaultValues[key];\n\n\t\t\tif (property !== value) {\n\t\t\t\tresult[key] = stringify(value).replace(/\"/g, `'`);\n\t\t\t}\n\n\t\t\treturn result;\n\t\t}, {});\n\t}\n\n\tprivate getPipeActiveInputs(): Record<string, string> {\n\t\tconst formData: Record<string, unknown> =\n\t\t\t(this.form?.controls.properties.value as Record<string, unknown>) ?? {};\n\t\tlet changedInputIndex: number = -1;\n\n\t\treturn objectKeys(formData)\n\t\t\t.map((key: string, i: number) => {\n\t\t\t\tconst value: unknown = formData[key];\n\t\t\t\tconst defaultValue: unknown | undefined = this.demoRef?.instance?.defaultValues[key];\n\n\t\t\t\tif (defaultValue !== value) {\n\t\t\t\t\tchangedInputIndex = i;\n\t\t\t\t}\n\n\t\t\t\treturn key;\n\t\t\t})\n\t\t\t.slice(0, changedInputIndex + 1)\n\t\t\t.reduce((result: Record<string, string>, key: string, i: number) => {\n\t\t\t\tresult[key] = stringify(formData[key]).replace(/\"/g, `'`);\n\n\t\t\t\treturn result;\n\t\t\t}, {});\n\t}\n\n\tngOnDestroy(): void {\n\t\tthis.unsubscribe$.next();\n\t\tthis.unsubscribe$.complete();\n\t}\n}\n","<ng-doc-smooth-resize *ngDocLet=\"code | async as codeContent\" [trigger]=\"codeContent\">\n\t<ng-doc-demo-displayer\n\t\t[code]=\"codeContent ?? ''\"\n\t\t[border]=\"false\"\n\t\t[expanded]=\"expanded\"\n\t\tlanguage=\"html\">\n\t\t<ng-container #demoOutlet></ng-container>\n\t</ng-doc-demo-displayer>\n</ng-doc-smooth-resize>\n","import {\n\tChangeDetectionStrategy,\n\tComponent,\n\tComponentRef,\n\tHostBinding,\n\tInput,\n\tOnChanges,\n\tSimpleChanges,\n\tViewChild,\n\tViewContainerRef,\n} from '@angular/core';\nimport { FormControl } from '@angular/forms';\nimport { isPlaygroundProperty } from '@ng-doc/app/helpers';\nimport {\n\tNgDocProvidedTypeControl,\n\tNgDocTypeControl,\n\tNgDocTypeControlProviderOptions,\n} from '@ng-doc/app/interfaces';\nimport { NgDocSanitizeHtmlPipe } from '@ng-doc/app/pipes';\nimport { NgDocPlaygroundContent, NgDocPlaygroundProperty } from '@ng-doc/core/interfaces';\nimport { NgDocLabelComponent, NgDocTooltipDirective } from '@ng-doc/ui-kit';\n\n@Component({\n\tselector: 'ng-doc-playground-property',\n\ttemplateUrl: './playground-property.component.html',\n\tstyleUrls: ['./playground-property.component.scss'],\n\tchangeDetection: ChangeDetectionStrategy.OnPush,\n\tstandalone: true,\n\timports: [NgDocLabelComponent, NgDocTooltipDirective, NgDocSanitizeHtmlPipe],\n})\nexport class NgDocPlaygroundPropertyComponent implements OnChanges {\n\t@Input()\n\tname: string = '';\n\n\t@Input()\n\tproperty?: NgDocPlaygroundProperty | NgDocPlaygroundContent;\n\n\t@Input()\n\ttypeControl?: NgDocProvidedTypeControl;\n\n\t@Input()\n\tcontrol?: FormControl;\n\n\t@Input()\n\tdefaultValue?: unknown;\n\n\t@ViewChild('propertyOutlet', { read: ViewContainerRef, static: true })\n\tpropertyOutlet?: ViewContainerRef;\n\n\tprotected option?: NgDocTypeControlProviderOptions;\n\tprivate propertyTypeControl?: ComponentRef<NgDocTypeControl>;\n\n\tngOnChanges({ property, control, typeControl, defaultValue }: SimpleChanges): void {\n\t\tif ((property || control || typeControl || defaultValue) && this.property && this.typeControl) {\n\t\t\tthis.propertyTypeControl?.destroy();\n\t\t\tthis.propertyTypeControl = undefined;\n\n\t\t\tif (this.typeControl && this.propertyOutlet) {\n\t\t\t\tthis.propertyTypeControl = this.propertyOutlet.createComponent(this.typeControl.control);\n\t\t\t\tthis.propertyTypeControl.instance.name = this.name;\n\t\t\t\tthis.propertyTypeControl.instance.description = this.tooltipContent;\n\t\t\t\tthis.propertyTypeControl.instance.options = isPlaygroundProperty(this.property)\n\t\t\t\t\t? this.property.options\n\t\t\t\t\t: undefined;\n\t\t\t\tthis.propertyTypeControl.instance.default = this.defaultValue;\n\t\t\t\tthis.propertyTypeControl.instance.writeValue(this.control?.value);\n\n\t\t\t\tthis.option = this.typeControl.options;\n\t\t\t}\n\n\t\t\tif (this.control) {\n\t\t\t\tthis.control?.registerOnChange((value: string) =>\n\t\t\t\t\tthis.propertyTypeControl?.instance?.writeValue(value),\n\t\t\t\t);\n\t\t\t\tthis.propertyTypeControl?.instance.registerOnChange((value: unknown) =>\n\t\t\t\t\tthis.control?.setValue(value),\n\t\t\t\t);\n\t\t\t\tthis.propertyTypeControl?.instance.registerOnTouched(() => this.control?.markAsTouched());\n\t\t\t}\n\t\t}\n\t}\n\n\t@HostBinding('attr.data-has-property-control')\n\tget hasPropertyControl(): boolean {\n\t\treturn !!this.propertyTypeControl;\n\t}\n\n\tget tooltipContent(): string {\n\t\treturn this.property && isPlaygroundProperty(this.property)\n\t\t\t? this.property.description ?? ''\n\t\t\t: '';\n\t}\n}\n","<label [ng-doc-label]=\"option?.hideLabel ? '' : labelContent\">\n\t<ng-template #labelContent>\n\t\t<span\n\t\t\t[ngDocTooltip]=\"tooltipTemplate\"\n\t\t\t[canOpen]=\"!!tooltipContent\"\n\t\t\t[positions]=\"['left-center', 'top-right', 'bottom-right']\"\n\t\t\t>{{ name }}</span\n\t\t>\n\t\t<ng-template #tooltipTemplate>\n\t\t\t<div [innerHTML]=\"tooltipContent | ngDocSanitizeHtml\"></div>\n\t\t</ng-template>\n\t</ng-template>\n\t<ng-container #propertyOutlet></ng-container>\n</label>\n","import { BreakpointObserver, Breakpoints, BreakpointState } from '@angular/cdk/layout';\nimport { AsyncPipe, KeyValuePipe, NgFor, NgIf } from '@angular/common';\nimport {\n\tChangeDetectionStrategy,\n\tComponent,\n\tEventEmitter,\n\tInjectionToken,\n\tInjector,\n\tInput,\n\tisDevMode,\n\tOnChanges,\n\tOutput,\n\tSimpleChanges,\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, isPresent, objectKeys } from '@ng-doc/core';\nimport {\n\tNgDocPlaygroundContent,\n\tNgDocPlaygroundProperties,\n\tNgDocPlaygroundProperty,\n} from '@ng-doc/core/interfaces';\nimport {\n\tNgDocBindPipe,\n\tNgDocButtonComponent,\n\tNgDocCheckboxComponent,\n\tNgDocExecutePipe,\n\tNgDocIconComponent,\n\tNgDocTextComponent,\n\tNgDocTextRightDirective,\n\tNgDocTooltipDirective,\n} from '@ng-doc/ui-kit';\nimport { Observable } from 'rxjs';\nimport { map } from 'rxjs/operators';\n\nimport { NgDocPlaygroundForm } from '../playground-form';\nimport { NgDocPlaygroundPropertyComponent } from '../playground-property/playground-property.component';\nimport { NgDocPlaygroundPropertyControl } from '../playground-property-control';\n\n@Component({\n\tselector: 'ng-doc-playground-properties',\n\ttemplateUrl: './playground-properties.component.html',\n\tstyleUrls: ['./playground-properties.component.scss'],\n\tchangeDetection: ChangeDetectionStrategy.OnPush,\n\tstandalone: true,\n\timports: [\n\t\tNgDocTextComponent,\n\t\tNgDocButtonComponent,\n\t\tNgDocCheckboxComponent,\n\t\tFormsModule,\n\t\tNgDocTooltipDirective,\n\t\tNgDocIconComponent,\n\t\tNgDocTextRightDirective,\n\t\tNgIf,\n\t\tNgFor,\n\t\tNgDocPlaygroundPropertyComponent,\n\t\tAsyncPipe,\n\t\tKeyValuePipe,\n\t\tNgDocBindPipe,\n\t\tNgDocExecutePipe,\n\t],\n})\nexport class NgDocPlaygroundPropertiesComponent<\n\tP extends NgDocPlaygroundProperties,\n\tC extends Record<string, NgDocPlaygroundContent>,\n> implements OnChanges\n{\n\t@Input()\n\tform!: FormGroup<NgDocPlaygroundForm>;\n\n\t@Input()\n\tproperties?: P;\n\n\t@Input()\n\tignoreInputs?: string[] = [];\n\n\t@Input()\n\tdynamicContent?: C;\n\n\t@Input()\n\tdefaultValues?: Record<string, unknown>;\n\n\t@Input()\n\thideSidePanel: boolean = false;\n\n\t@Input()\n\trecreateDemo: boolean = false;\n\n\t@Input()\n\tshowResetButton: boolean = false;\n\n\t@Output()\n\trecreateDemoChange: EventEmitter<boolean> = new EventEmitter<boolean>();\n\n\t@Output()\n\tresetForm: EventEmitter<void> = new EventEmitter<void>();\n\n\treadonly breakpoints: string[] = [Breakpoints.XSmall];\n\treadonly observer: Observable<boolean>;\n\n\tprotected propertyControls: NgDocPlaygroundPropertyControl[] = [];\n\tprotected contentTypeControl?: NgDocProvidedTypeControl = this.getControlForType('boolean');\n\n\tconstructor(\n\t\tprotected readonly breakpointObserver: BreakpointObserver,\n\t\tprivate injector: Injector,\n\t) {\n\t\tthis.observer = this.breakpointObserver\n\t\t\t.observe(this.breakpoints)\n\t\t\t.pipe(map((state: BreakpointState) => state.matches));\n\t}\n\n\tngOnChanges({ properties }: SimpleChanges): void {\n\t\tif (properties && this.properties) {\n\t\t\tthis.propertyControls = objectKeys(this.properties)\n\t\t\t\t.filter((key: keyof P) => this.ignoreInputs?.includes(String(key)) !== true)\n\t\t\t\t.map((key: keyof P) => {\n\t\t\t\t\tif (this.properties) {\n\t\t\t\t\t\tconst property: NgDocPlaygroundProperty = this.properties[key];\n\t\t\t\t\t\tconst typeControl: NgDocProvidedTypeControl | undefined = this.getTypeControl(property);\n\n\t\t\t\t\t\tif (typeControl) {\n\t\t\t\t\t\t\treturn {\n\t\t\t\t\t\t\t\tpropertyName: String(key),\n\t\t\t\t\t\t\t\tproperty,\n\t\t\t\t\t\t\t\ttypeControl,\n\t\t\t\t\t\t\t};\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\treturn null;\n\t\t\t\t})\n\t\t\t\t.filter(isPresent)\n\t\t\t\t.sort((a: NgDocPlaygroundPropertyControl, b: NgDocPlaygroundPropertyControl) => {\n\t\t\t\t\tconst aOrder: number | undefined = a.typeControl.options?.order;\n\t\t\t\t\tconst bOrder: number | undefined = b.typeControl.options?.order;\n\n\t\t\t\t\tif (isPresent(aOrder) && isPresent(bOrder)) {\n\t\t\t\t\t\treturn aOrder - bOrder;\n\t\t\t\t\t}\n\t\t\t\t\tif (isPresent(aOrder)) {\n\t\t\t\t\t\treturn -1;\n\t\t\t\t\t}\n\t\t\t\t\tif (isPresent(bOrder)) {\n\t\t\t\t\t\treturn 1;\n\t\t\t\t\t}\n\t\t\t\t\treturn a.property.inputName.localeCompare(b.property.inputName);\n\t\t\t\t});\n\t\t}\n\t}\n\n\tgetFormControl(controlType: keyof typeof this.form.controls, key: string): FormControl {\n\t\treturn this.form.get(controlType)?.get(key) as FormControl;\n\t}\n\n\tprivate getTypeControl(property: NgDocPlaygroundProperty): NgDocProvidedTypeControl | undefined {\n\t\tconst type: string = property.type;\n\t\tconst typeControl: NgDocProvidedTypeControl | undefined =\n\t\t\tthis.getControlForType(type) ??\n\t\t\tthis.getControlForTypeAlias(isPlaygroundProperty(property) ? property.options : undefined);\n\n\t\tif (!typeControl && isDevMode()) {\n\t\t\tconsole.warn(\n\t\t\t\t`NgDocPlayground didn't find the control for the @Input \"${property.inputName}\", the type \"${type}\" was not recognized'`,\n\t\t\t);\n\t\t}\n\n\t\treturn typeControl;\n\t}\n\n\tprivate getControlForType(type: string): NgDocProvidedTypeControl | undefined {\n\t\tconst token: InjectionToken<NgDocProvidedTypeControl> | undefined = getTokenForType(type);\n\n\t\treturn token ? this.injector.get(token) : undefined;\n\t}\n\n\tprivate getControlForTypeAlias(options?: string[]): NgDocProvidedTypeControl | undefined {\n\t\tif (options && options.length) {\n\t\t\tlet optionsIsValid: boolean = true;\n\n\t\t\ttry {\n\t\t\t\t// checking that all values are extractable\n\t\t\t\toptions.forEach((item: string) => extractValueOrThrow(item));\n\t\t\t} catch {\n\t\t\t\toptionsIsValid = false;\n\t\t\t}\n\n\t\t\tif (optionsIsValid) {\n\t\t\t\tconst token: InjectionToken<NgDocProvidedTypeControl> | undefined =\n\t\t\t\t\tgetTokenForType('NgDocTypeAlias');\n\n\t\t\t\treturn token ? this.injector.get(token) : undefined;\n\t\t\t}\n\t\t}\n\n\t\treturn undefined;\n\t}\n}\n","<div\n\tclass=\"ng-doc-playground-properties-wrapper\"\n\t[class.vertical]=\"observer | async\"\n\t*ngIf=\"defaultValues\">\n\t<div class=\"ng-doc-playground-demos\">\n\t\t<ng-content></ng-content>\n\t</div>\n\t<div class=\"ng-doc-playground-properties\" *ngIf=\"!hideSidePanel\">\n\t\t<div class=\"ng-doc-playground-header\">\n\t\t\t<h4 ng-doc-text>Playground</h4>\n\t\t\t<button ng-doc-button color=\"alert\" (click)=\"resetForm.emit()\" *ngIf=\"showResetButton\">\n\t\t\t\tReset\n\t\t\t</button>\n\t\t</div>\n\t\t<div class=\"ng-doc-playground-setting\">\n\t\t\t<ng-doc-checkbox [(ngModel)]=\"recreateDemo\" (ngModelChange)=\"recreateDemoChange.emit($event)\">\n\t\t\t\t<span\n\t\t\t\t\tng-doc-text\n\t\t\t\t\t[ngDocTooltip]=\"'Recreates demo everytime\\none of the input has changed'\"\n\t\t\t\t\t[positions]=\"['bottom-right', 'left-center']\">\n\t\t\t\t\tRecreate\n\t\t\t\t\t<ng-doc-icon icon=\"info\" ngDocTextRight></ng-doc-icon>\n\t\t\t\t</span>\n\t\t\t</ng-doc-checkbox>\n\t\t</div>\n\t\t<div class=\"ng-doc-playground-divider\"></div>\n\t\t<ng-container *ngIf=\"propertyControls.length\">\n\t\t\t<h5 class=\"ng-doc-title\" ng-doc-text>Settings</h5>\n\t\t\t<ng-doc-playground-property\n\t\t\t\t*ngFor=\"let propertyControl of propertyControls\"\n\t\t\t\t[name]=\"propertyControl.property.inputName\"\n\t\t\t\t[property]=\"propertyControl.property\"\n\t\t\t\t[typeControl]=\"propertyControl.typeControl\"\n\t\t\t\t[defaultValue]=\"defaultValues[propertyControl.propertyName]\"\n\t\t\t\t[control]=\"\n\t\t\t\t\tgetFormControl | bind: this | execute: 'properties':propertyControl.propertyName\n\t\t\t\t\">\n\t\t\t</ng-doc-playground-property>\n\t\t</ng-container>\n\n\t\t<ng-container *ngIf=\"(dynamicContent | keyvalue)?.length\">\n\t\t\t<h5 class=\"ng-doc-title\" ng-doc-text>Content</h5>\n\t\t\t<ng-doc-playground-property\n\t\t\t\t*ngFor=\"let content of dynamicContent | keyvalue\"\n\t\t\t\t[name]=\"content.value.label\"\n\t\t\t\t[property]=\"content.value\"\n\t\t\t\t[typeControl]=\"contentTypeControl\"\n\t\t\t\t[control]=\"getFormControl | bind: this | execute: 'content':content.key\">\n\t\t\t</ng-doc-playground-property>\n\t\t</ng-container>\n\t</div>\n</div>\n","import { NgFor, NgIf } from '@angular/common';\nimport {\n\tAfterViewInit,\n\tChangeDetectionStrategy,\n\tComponent,\n\tInput,\n\tOnChanges,\n\tSimpleChanges,\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';\nimport { objectKeys } from '@ng-doc/core/helpers/object-keys';\nimport {\n\tNgDocPlaygroundConfig,\n\tNgDocPlaygroundOptions,\n\tNgDocPlaygroundProperties,\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@Component({\n\tselector: 'ng-doc-playground',\n\ttemplateUrl: './playground.component.html',\n\tstyleUrls: ['./playground.component.scss'],\n\tchangeDetection: ChangeDetectionStrategy.OnPush,\n\tstandalone: true,\n\timports: [\n\t\tNgIf,\n\t\tNgDocPlaygroundPropertiesComponent,\n\t\tNgFor,\n\t\tNgDocPlaygroundDemoComponent,\n\t\tNgDocAsArrayPipe,\n\t],\n})\nexport class NgDocPlaygroundComponent<\n\tT extends NgDocPlaygroundProperties = NgDocPlaygroundProperties,\n> implements OnChanges, AfterViewInit\n{\n\t@Input({ required: true })\n\tid: string = '';\n\n\t@Input()\n\tpipeName: string = '';\n\n\t@Input()\n\tselectors: string[] = [];\n\n\t@Input()\n\tproperties?: T;\n\n\t@Input()\n\toptions: NgDocPlaygroundOptions = {};\n\n\trecreateDemo: boolean = false;\n\tformGroup!: FormGroup<NgDocPlaygroundForm>;\n\tdefaultValues?: Record<string, unknown>;\n\tconfiguration!: NgDocPlaygroundConfig;\n\n\tprivate defaultProperties: Record<string, unknown> = {};\n\tprivate defaultContent: Record<string, boolean> = {};\n\n\tconstructor(\n\t\tprivate readonly rootPage: NgDocRootPage,\n\t\tprivate readonly formBuilder: FormBuilder,\n\t) {}\n\n\tngOnChanges({ options }: SimpleChanges) {\n\t\tif (options) {\n\t\t\t// Join configuration with options\n\t\t\tthis.configuration = Object.assign(\n\t\t\t\t{},\n\t\t\t\tthis.rootPage.page?.playgrounds?.[this.id],\n\t\t\t\tthis.options,\n\t\t\t);\n\t\t}\n\t}\n\n\tngAfterViewInit(): void {\n\t\tthis.defaultProperties = this.getPropertiesFormValues();\n\t\tthis.defaultContent = this.getContentFormValues();\n\n\t\tconst propertiesForm: FormGroup = this.formBuilder.group(this.defaultProperties);\n\t\tconst contentForm: FormGroup = this.formBuilder.group(this.defaultContent);\n\n\t\tthis.formGroup = this.formBuilder.group({\n\t\t\tproperties: propertiesForm,\n\t\t\tcontent: contentForm,\n\t\t});\n\t\t// `patchValue` is needed to set `undefined` values, otherwise they will be ignored by the Angular form\n\t\tthis.formGroup.patchValue({\n\t\t\tproperties: Object.assign({}, this.defaultProperties, this.configuration.inputs),\n\t\t\tcontent: this.defaultContent,\n\t\t});\n\n\t\tconsole.log(this.configuration);\n\t}\n\n\tprotected isDefaultState(): boolean {\n\t\tif (!this.formGroup) {\n\t\t\treturn false;\n\t\t}\n\n\t\treturn (\n\t\t\tisSameObject(this.formGroup.value.properties ?? {}, this.defaultValues ?? {}) &&\n\t\t\tisSameObject(this.formGroup.value.content ?? {}, this.defaultContent ?? {})\n\t\t);\n\t}\n\n\tprivate getPropertiesFormValues(): Record<string, unknown> {\n\t\tconst formValues: Record<string, unknown> = objectKeys(this.properties ?? {}).reduce(\n\t\t\t(controls: Record<string, unknown>, key: string) => {\n\t\t\t\tif (this.properties) {\n\t\t\t\t\tcontrols[key] = this.defaultValues ? this.defaultValues[key] : undefined;\n\t\t\t\t}\n\n\t\t\t\treturn controls;\n\t\t\t},\n\t\t\t{} as Record<string, unknown>,\n\t\t);\n\n\t\treturn Object.assign({}, formValues, this.configuration.defaults);\n\t}\n\n\tprivate getContentFormValues(): Record<string, boolean> {\n\t\treturn objectKeys(this.configuration?.content ?? {}).reduce(\n\t\t\t(controls: Record<string, boolean>, key: string) => {\n\t\t\t\tif (this.configuration?.content) {\n\t\t\t\t\tcontrols[key] = false;\n\t\t\t\t}\n\n\t\t\t\treturn controls;\n\t\t\t},\n\t\t\t{} as Record<keyof T, boolean>,\n\t\t);\n\t}\n\n\tresetForm(): void {\n\t\tthis.formGroup.reset({}, { emitEvent: false });\n\t\tthis.formGroup?.patchValue({\n\t\t\tproperties: this.defaultProperties,\n\t\t\tcontent: this.defaultContent,\n\t\t});\n\t}\n}\n","<ng-container *ngIf=\"configuration\">\n\t<ng-doc-playground-properties\n\t\t[form]=\"formGroup\"\n\t\t[properties]=\"properties\"\n\t\t[ignoreInputs]=\"configuration.hiddenInputs\"\n\t\t[dynamicContent]=\"configuration.content\"\n\t\t[hideSidePanel]=\"configuration.hideSidePanel ?? false\"\n\t\t[defaultValues]=\"defaultValues\"\n\t\t[showResetButton]=\"!isDefaultState()\"\n\t\t[(recreateDemo)]=\"recreateDemo\"\n\t\t(resetForm)=\"resetForm()\">\n\t\t<ng-doc-playground-demo\n\t\t\t*ngFor=\"let selector of configuration.selectors ?? selectors | asArray\"\n\t\t\t[id]=\"id\"\n\t\t\t[selector]=\"selector\"\n\t\t\t[properties]=\"properties\"\n\t\t\t[configuration]=\"configuration\"\n\t\t\t[recreateDemo]=\"recreateDemo\"\n\t\t\t[form]=\"formGroup\"\n\t\t\t[expanded]=\"configuration.expanded ?? false\">\n\t\t</ng-doc-playground-demo>\n\n\t\t<ng-doc-playground-demo\n\t\t\t*ngIf=\"pipeName\"\n\t\t\t[id]=\"id\"\n\t\t\t[pipeName]=\"pipeName\"\n\t\t\t[properties]=\"properties\"\n\t\t\t[configuration]=\"configuration\"\n\t\t\t[recreateDemo]=\"recreateDemo\"\n\t\t\t[form]=\"formGroup\">\n\t\t</ng-doc-playground-demo>\n\t</ng-doc-playground-properties>\n</ng-container>\n","import {\n\tChangeDetectorRef,\n\tDirective,\n\tinject,\n\tInput,\n\tOnInit,\n\tType,\n\tViewContainerRef,\n} from '@angular/core';\nimport { Constructor, extractFunctionDefaults } from '@ng-doc/core';\nimport { NgDocPlaygroundConfig } from '@ng-doc/core/interfaces';\n\nimport { NgDocPlaygroundComponent } from './playground.component';\n\n/**\n * Base class for playgrounds components.\n */\n@Directive()\nexport abstract class NgDocBasePlayground implements Pick<NgDocPlaygroundConfig, 'data'>, OnInit {\n\tstatic readonly selector: string = 'unknown';\n\tabstract readonly playground?: Type<any>;\n\tabstract readonly viewContainerRef?: ViewContainerRef;\n\tabstract readonly configData: Record<string, unknown>;\n\n\t@Input()\n\tproperties: Record<string, any> = {};\n\n\t@Input()\n\tactionData: Record<string, unknown> = {};\n\n\t@Input()\n\tcontent: any = {};\n\n\tdefaultValues: Record<string, unknown> = {};\n\n\tprivate playgroundContainer: NgDocPlaygroundComponent = inject(NgDocPlaygroundComponent);\n\tprivate changeDetectorRef: ChangeDetectorRef = inject(ChangeDetectorRef);\n\n\tprotected constructor(private playgroundInstance?: Constructor<unknown>) {\n\t\tthis.changeDetectorRef.detach();\n\t}\n\n\tngOnInit(): void {\n\t\t/*\n\t\t * Extract default values from playground properties. We do this in `ngOnInit` because in this case\n\t\t * input values provided from the template are not initialized yet, and we can read default values instead.\n\t\t */\n\t\tif (this.playground) {\n\t\t\tthis.defaultValues = Object.keys(this.playground).reduce(\n\t\t\t\t(values: Record<string, unknown>, key: string) => {\n\t\t\t\t\tif (this.playground) {\n\t\t\t\t\t\t// eslint-disable-next-line @typescript-eslint/ban-ts-comment\n\t\t\t\t\t\t// @ts-ignore\n\t\t\t\t\t\tvalues[key] = this.playground[key];\n\t\t\t\t\t}\n\n\t\t\t\t\treturn values;\n\t\t\t\t},\n\t\t\t\t{},\n\t\t\t);\n\t\t} else if (this.playgroundInstance) {\n\t\t\tconst defaults = extractFunctionDefaults(this.playgroundInstance.prototype.transform);\n\n\t\t\tthis.defaultValues = Object.keys(this.playgroundContainer.properties ?? {}).reduce(\n\t\t\t\t(def: Record<string, unknown>, key: string, i: number) => {\n\t\t\t\t\t// we do +1 because the first argument is the `value` of the transform function\n\t\t\t\t\tdef[key] = defaults[i + 1];\n\n\t\t\t\t\treturn def;\n\t\t\t\t},\n\t\t\t\t{},\n\t\t\t);\n\t\t} else {\n\t\t\tthrow new Error('Playground is not defined or initialized');\n\t\t}\n\n\t\tif (!this.playgroundContainer.defaultValues) {\n\t\t\tthis.playgroundContainer.defaultValues = this.defaultValues;\n\t\t}\n\n\t\t/*\n This is a hack just to wait for the playground container to be initialized and only then\n attach the change detector to have correct inputs values.\n */\n\t\tPromise.resolve().then(() => {\n\t\t\tthis.changeDetectorRef.reattach();\n\t\t});\n\t}\n\n\tget data(): any {\n\t\treturn Object.assign({}, this.configData, this.actionData);\n\t}\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["objectKeys","i1"],"mappings":";;;;;;;;;;;;;;;;;;;;;;AA4Ca,IAAA,4BAA4B,GATzC,MASa,4BAA4B,CAAA;AAsCxC,IAAA,WAAA,CAA6B,QAAkB,EAAA;QAAlB,IAAQ,CAAA,QAAA,GAAR,QAAQ,CAAU;QAjC/C,IAAE,CAAA,EAAA,GAAW,EAAE,CAAC;QAGhB,IAAQ,CAAA,QAAA,GAAW,EAAE,CAAC;QAGtB,IAAQ,CAAA,QAAA,GAAW,EAAE,CAAC;QAStB,IAAY,CAAA,YAAA,GAAY,KAAK,CAAC;QAM9B,IAAQ,CAAA,QAAA,GAAY,KAAK,CAAC;AAO1B,QAAA,IAAA,CAAA,IAAI,GAAuB,EAAE,CAAC,EAAE,CAAC,CAAC;AAGjB,QAAA,IAAA,CAAA,YAAY,GAAkB,IAAI,OAAO,EAAQ,CAAC;KAEhB;AAEnD,IAAA,WAAW,CAAC,EAAE,IAAI,EAAE,EAAE,EAAiB,EAAA;QACtC,IAAI,IAAI,IAAI,EAAE,EAAE;AACf,YAAA,IAAI,CAAC,YAAY,CAAC,IAAI,EAAE,CAAC;YAEzB,MAAM,YAAY,GACjB,sBAAsB,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;AAEjC,YAAA,IAAI,YAAY,EAAE;AACjB,gBAAA,MAAM,KAAK,GAAsC,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,YAAY,EAAE,EAAE,CAAC,CAAC;AAErF,gBAAA,IAAI,CAAC,cAAc,GAAG,KAAK,CAAC,IAAI,CAC/B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CAAC;KACH;AAED,IAAA,IAAI,IAAI,GAAA;AACP,QAAA,OAAO,MAAM,CAAC,MAAM,CAAC,EAAE,EAAE,IAAI,CAAC,UAAU,EAAE,IAAI,CAAC,UAAU,CAAC,CAAC;KAC3D;8GAzEoB,mBAAmB,EAAA,IAAA,EAAA,SAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA,EAAA;kGAAnB,mBAAmB,EAAA,MAAA,EAAA,EAAA,UAAA,EAAA,YAAA,EAAA,UAAA,EAAA,YAAA,EAAA,OAAA,EAAA,SAAA,EAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA,CAAA,EAAA;;2FAAnB,mBAAmB,EAAA,UAAA,EAAA,CAAA;kBADxC,SAAS;6FAQT,UAAU,EAAA,CAAA;sBADT,KAAK;gBAIN,UAAU,EAAA,CAAA;sBADT,KAAK;gBAIN,OAAO,EAAA,CAAA;sBADN,KAAK;;;AC9BP;;AAEG;;;;"}
@@ -36,7 +36,15 @@ class NgDocSearchResultComponent {
36
36
  }
37
37
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.0", ngImport: i0, type: NgDocSearchResultComponent, decorators: [{
38
38
  type: Component,
39
- args: [{ selector: 'ng-doc-search-result', changeDetection: ChangeDetectionStrategy.OnPush, standalone: true, imports: [NgIf, NgFor, NgDocTextComponent, RouterLink, NgDocKindIconComponent, NgDocTooltipDirective, KeyValuePipe], template: "<div class=\"ng-doc-search-result-wrapper\" *ngIf=\"groupedResult | keyvalue as results\">\n\t<ng-container *ngIf=\"results.length; else emptyTemplate\">\n\t\t<div class=\"ng-doc-search-result-category\" *ngFor=\"let item of results\">\n\t\t\t<h4 class=\"ng-doc-search-result-title\" ng-doc-text>{{ typeToLabel(item.key) }}</h4>\n\t\t\t<ul class=\"ng-doc-search-result-pages\">\n\t\t\t\t<li class=\"ng-doc-search-result-page\" *ngFor=\"let page of item.value\">\n\t\t\t\t\t<a class=\"ng-doc-search-result-page-link\" [routerLink]=\"[page.route]\">\n\t\t\t\t\t\t<ng-doc-kind-icon\n\t\t\t\t\t\t\t*ngIf=\"page.kind\"\n\t\t\t\t\t\t\t[kind]=\"page.kind\"\n\t\t\t\t\t\t\t[ngDocTooltip]=\"page.kind\"></ng-doc-kind-icon>\n\t\t\t\t\t\t{{ page.title }}\n\t\t\t\t\t</a>\n\t\t\t\t</li>\n\t\t\t</ul>\n\t\t</div>\n\t</ng-container>\n\t<ng-template #emptyTemplate>\n\t\t<div ng-doc-text color=\"muted\">Nothing was found...</div>\n\t</ng-template>\n</div>\n", styles: [":host{display:block}:host .ng-doc-search-result-wrapper{display:flex;flex-direction:row}:host .ng-doc-search-result-wrapper .ng-doc-search-result-category:not(:last-child){margin-right:calc(var(--ng-doc-base-gutter) * 2)}:host .ng-doc-search-result-wrapper .ng-doc-search-result-category .ng-doc-search-result-title{margin:0 0 calc(var(--ng-doc-base-gutter) * 2)}:host .ng-doc-search-result-wrapper .ng-doc-search-result-category .ng-doc-search-result-pages{list-style:none;padding:0;margin:0}:host .ng-doc-search-result-wrapper .ng-doc-search-result-category .ng-doc-search-result-pages .ng-doc-search-result-page{margin-bottom:var(--ng-doc-base-gutter)}:host .ng-doc-search-result-wrapper .ng-doc-search-result-category .ng-doc-search-result-pages .ng-doc-search-result-page .ng-doc-search-result-page-link{display:flex;align-items:center;text-decoration:none;color:var(--ng-doc-text)}:host .ng-doc-search-result-wrapper .ng-doc-search-result-category .ng-doc-search-result-pages .ng-doc-search-result-page .ng-doc-search-result-page-link ng-doc-kind-icon{margin-right:var(--ng-doc-base-gutter)}\n"] }]
39
+ args: [{ selector: 'ng-doc-search-result', changeDetection: ChangeDetectionStrategy.OnPush, standalone: true, imports: [
40
+ NgIf,
41
+ NgFor,
42
+ NgDocTextComponent,
43
+ RouterLink,
44
+ NgDocKindIconComponent,
45
+ NgDocTooltipDirective,
46
+ KeyValuePipe,
47
+ ], template: "<div class=\"ng-doc-search-result-wrapper\" *ngIf=\"groupedResult | keyvalue as results\">\n\t<ng-container *ngIf=\"results.length; else emptyTemplate\">\n\t\t<div class=\"ng-doc-search-result-category\" *ngFor=\"let item of results\">\n\t\t\t<h4 class=\"ng-doc-search-result-title\" ng-doc-text>{{ typeToLabel(item.key) }}</h4>\n\t\t\t<ul class=\"ng-doc-search-result-pages\">\n\t\t\t\t<li class=\"ng-doc-search-result-page\" *ngFor=\"let page of item.value\">\n\t\t\t\t\t<a class=\"ng-doc-search-result-page-link\" [routerLink]=\"[page.route]\">\n\t\t\t\t\t\t<ng-doc-kind-icon\n\t\t\t\t\t\t\t*ngIf=\"page.kind\"\n\t\t\t\t\t\t\t[kind]=\"page.kind\"\n\t\t\t\t\t\t\t[ngDocTooltip]=\"page.kind\"></ng-doc-kind-icon>\n\t\t\t\t\t\t{{ page.title }}\n\t\t\t\t\t</a>\n\t\t\t\t</li>\n\t\t\t</ul>\n\t\t</div>\n\t</ng-container>\n\t<ng-template #emptyTemplate>\n\t\t<div ng-doc-text color=\"muted\">Nothing was found...</div>\n\t</ng-template>\n</div>\n", styles: [":host{display:block}:host .ng-doc-search-result-wrapper{display:flex;flex-direction:row}:host .ng-doc-search-result-wrapper .ng-doc-search-result-category:not(:last-child){margin-right:calc(var(--ng-doc-base-gutter) * 2)}:host .ng-doc-search-result-wrapper .ng-doc-search-result-category .ng-doc-search-result-title{margin:0 0 calc(var(--ng-doc-base-gutter) * 2)}:host .ng-doc-search-result-wrapper .ng-doc-search-result-category .ng-doc-search-result-pages{list-style:none;padding:0;margin:0}:host .ng-doc-search-result-wrapper .ng-doc-search-result-category .ng-doc-search-result-pages .ng-doc-search-result-page{margin-bottom:var(--ng-doc-base-gutter)}:host .ng-doc-search-result-wrapper .ng-doc-search-result-category .ng-doc-search-result-pages .ng-doc-search-result-page .ng-doc-search-result-page-link{display:flex;align-items:center;text-decoration:none;color:var(--ng-doc-text)}:host .ng-doc-search-result-wrapper .ng-doc-search-result-category .ng-doc-search-result-pages .ng-doc-search-result-page .ng-doc-search-result-page-link ng-doc-kind-icon{margin-right:var(--ng-doc-base-gutter)}\n"] }]
40
48
  }], propDecorators: { result: [{
41
49
  type: Input
42
50
  }] } });
@@ -1 +1 @@
1
- {"version":3,"file":"ng-doc-app-components-search-result.mjs","sources":["../../../../libs/app/components/search-result/search-result.component.ts","../../../../libs/app/components/search-result/search-result.component.html","../../../../libs/app/components/search-result/ng-doc-app-components-search-result.ts"],"sourcesContent":["import {KeyValuePipe, NgFor, NgIf} from '@angular/common';\nimport {ChangeDetectionStrategy, Component, Input, OnChanges, SimpleChanges} from '@angular/core';\nimport {RouterLink} from '@angular/router';\nimport {NgDocKindIconComponent} from '@ng-doc/app/components/kind-icon';\nimport {NgDocPageInfo} from '@ng-doc/core/interfaces';\nimport {NgDocTextComponent, NgDocTooltipDirective} from '@ng-doc/ui-kit';\n\n@Component({\n\tselector: 'ng-doc-search-result',\n\ttemplateUrl: './search-result.component.html',\n\tstyleUrls: ['./search-result.component.scss'],\n\tchangeDetection: ChangeDetectionStrategy.OnPush,\n\tstandalone: true,\n\timports: [NgIf, NgFor, NgDocTextComponent, RouterLink, NgDocKindIconComponent, NgDocTooltipDirective, KeyValuePipe],\n})\nexport class NgDocSearchResultComponent implements OnChanges {\n\t@Input()\n\tresult: NgDocPageInfo[] | null = [];\n\n\tgroupedResult: Record<string, NgDocPageInfo[]> = {};\n\n\tngOnChanges({result}: SimpleChanges): void {\n\t\tif (result && this.result) {\n\t\t\tthis.groupedResult = this.result.reduce((grouped: Record<string, NgDocPageInfo[]>, item: NgDocPageInfo) => {\n\t\t\t\tif (!grouped[item.type]) {\n\t\t\t\t\tgrouped[item.type] = [];\n\t\t\t\t}\n\n\t\t\t\tgrouped[item.type].push(item);\n\n\t\t\t\treturn grouped;\n\t\t\t}, {});\n\t\t}\n\t}\n\n\ttypeToLabel(type: string): string {\n\t\tswitch (type) {\n\t\t\tcase 'api':\n\t\t\t\treturn 'API';\n\t\t\tcase 'guide':\n\t\t\t\treturn 'Guides';\n\t\t\tdefault:\n\t\t\t\treturn 'Unknown';\n\t\t}\n\t}\n}\n","<div class=\"ng-doc-search-result-wrapper\" *ngIf=\"groupedResult | keyvalue as results\">\n\t<ng-container *ngIf=\"results.length; else emptyTemplate\">\n\t\t<div class=\"ng-doc-search-result-category\" *ngFor=\"let item of results\">\n\t\t\t<h4 class=\"ng-doc-search-result-title\" ng-doc-text>{{ typeToLabel(item.key) }}</h4>\n\t\t\t<ul class=\"ng-doc-search-result-pages\">\n\t\t\t\t<li class=\"ng-doc-search-result-page\" *ngFor=\"let page of item.value\">\n\t\t\t\t\t<a class=\"ng-doc-search-result-page-link\" [routerLink]=\"[page.route]\">\n\t\t\t\t\t\t<ng-doc-kind-icon\n\t\t\t\t\t\t\t*ngIf=\"page.kind\"\n\t\t\t\t\t\t\t[kind]=\"page.kind\"\n\t\t\t\t\t\t\t[ngDocTooltip]=\"page.kind\"></ng-doc-kind-icon>\n\t\t\t\t\t\t{{ page.title }}\n\t\t\t\t\t</a>\n\t\t\t\t</li>\n\t\t\t</ul>\n\t\t</div>\n\t</ng-container>\n\t<ng-template #emptyTemplate>\n\t\t<div ng-doc-text color=\"muted\">Nothing was found...</div>\n\t</ng-template>\n</div>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;AAOA,MAQa,0BAA0B,CAAA;AARvC,IAAA,WAAA,GAAA;QAUC,IAAM,CAAA,MAAA,GAA2B,EAAE,CAAC;QAEpC,IAAa,CAAA,aAAA,GAAoC,EAAE,CAAC;AA0BpD,KAAA;IAxBA,WAAW,CAAC,EAAC,MAAM,EAAgB,EAAA;AAClC,QAAA,IAAI,MAAM,IAAI,IAAI,CAAC,MAAM,EAAE;AAC1B,YAAA,IAAI,CAAC,aAAa,GAAG,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,OAAwC,EAAE,IAAmB,KAAI;AACzG,gBAAA,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC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MAAA,EAAA,OAAA,EAAA,OAAA,EAAA,iBAAA,CAAA,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAAE,UAAU,EAAE,QAAA,EAAA,cAAA,EAAA,MAAA,EAAA,CAAA,QAAA,EAAA,aAAA,EAAA,UAAA,EAAA,qBAAA,EAAA,OAAA,EAAA,YAAA,EAAA,kBAAA,EAAA,oBAAA,EAAA,YAAA,EAAA,YAAA,CAAA,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAAA,sBAAsB,EAAE,QAAA,EAAA,kBAAA,EAAA,MAAA,EAAA,CAAA,MAAA,EAAA,MAAA,CAAA,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAAA,qBAAqB,qUAAE,YAAY,EAAA,IAAA,EAAA,UAAA,EAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,CAAA,CAAA,EAAA;;2FAEtG,0BAA0B,EAAA,UAAA,EAAA,CAAA;kBARtC,SAAS;+BACC,sBAAsB,EAAA,eAAA,EAGf,uBAAuB,CAAC,MAAM,cACnC,IAAI,EAAA,OAAA,EACP,CAAC,IAAI,EAAE,KAAK,EAAE,kBAAkB,EAAE,UAAU,EAAE,sBAAsB,EAAE,qBAAqB,EAAE,YAAY,CAAC,EAAA,QAAA,EAAA,i7BAAA,EAAA,MAAA,EAAA,CAAA,6kCAAA,CAAA,EAAA,CAAA;8BAInH,MAAM,EAAA,CAAA;sBADL,KAAK;;;AEhBP;;AAEG;;;;"}
1
+ {"version":3,"file":"ng-doc-app-components-search-result.mjs","sources":["../../../../libs/app/components/search-result/search-result.component.ts","../../../../libs/app/components/search-result/search-result.component.html","../../../../libs/app/components/search-result/ng-doc-app-components-search-result.ts"],"sourcesContent":["import { KeyValuePipe, NgFor, NgIf } from '@angular/common';\nimport { ChangeDetectionStrategy, Component, Input, OnChanges, SimpleChanges } from '@angular/core';\nimport { RouterLink } from '@angular/router';\nimport { NgDocKindIconComponent } from '@ng-doc/app/components/kind-icon';\nimport { NgDocPageInfo } from '@ng-doc/core/interfaces';\nimport { NgDocTextComponent, NgDocTooltipDirective } from '@ng-doc/ui-kit';\n\n@Component({\n\tselector: 'ng-doc-search-result',\n\ttemplateUrl: './search-result.component.html',\n\tstyleUrls: ['./search-result.component.scss'],\n\tchangeDetection: ChangeDetectionStrategy.OnPush,\n\tstandalone: true,\n\timports: [\n\t\tNgIf,\n\t\tNgFor,\n\t\tNgDocTextComponent,\n\t\tRouterLink,\n\t\tNgDocKindIconComponent,\n\t\tNgDocTooltipDirective,\n\t\tKeyValuePipe,\n\t],\n})\nexport class NgDocSearchResultComponent implements OnChanges {\n\t@Input()\n\tresult: NgDocPageInfo[] | null = [];\n\n\tgroupedResult: Record<string, NgDocPageInfo[]> = {};\n\n\tngOnChanges({ result }: SimpleChanges): void {\n\t\tif (result && this.result) {\n\t\t\tthis.groupedResult = this.result.reduce(\n\t\t\t\t(grouped: Record<string, NgDocPageInfo[]>, item: NgDocPageInfo) => {\n\t\t\t\t\tif (!grouped[item.type]) {\n\t\t\t\t\t\tgrouped[item.type] = [];\n\t\t\t\t\t}\n\n\t\t\t\t\tgrouped[item.type].push(item);\n\n\t\t\t\t\treturn grouped;\n\t\t\t\t},\n\t\t\t\t{},\n\t\t\t);\n\t\t}\n\t}\n\n\ttypeToLabel(type: string): string {\n\t\tswitch (type) {\n\t\t\tcase 'api':\n\t\t\t\treturn 'API';\n\t\t\tcase 'guide':\n\t\t\t\treturn 'Guides';\n\t\t\tdefault:\n\t\t\t\treturn 'Unknown';\n\t\t}\n\t}\n}\n","<div class=\"ng-doc-search-result-wrapper\" *ngIf=\"groupedResult | keyvalue as results\">\n\t<ng-container *ngIf=\"results.length; else emptyTemplate\">\n\t\t<div class=\"ng-doc-search-result-category\" *ngFor=\"let item of results\">\n\t\t\t<h4 class=\"ng-doc-search-result-title\" ng-doc-text>{{ typeToLabel(item.key) }}</h4>\n\t\t\t<ul class=\"ng-doc-search-result-pages\">\n\t\t\t\t<li class=\"ng-doc-search-result-page\" *ngFor=\"let page of item.value\">\n\t\t\t\t\t<a class=\"ng-doc-search-result-page-link\" [routerLink]=\"[page.route]\">\n\t\t\t\t\t\t<ng-doc-kind-icon\n\t\t\t\t\t\t\t*ngIf=\"page.kind\"\n\t\t\t\t\t\t\t[kind]=\"page.kind\"\n\t\t\t\t\t\t\t[ngDocTooltip]=\"page.kind\"></ng-doc-kind-icon>\n\t\t\t\t\t\t{{ page.title }}\n\t\t\t\t\t</a>\n\t\t\t\t</li>\n\t\t\t</ul>\n\t\t</div>\n\t</ng-container>\n\t<ng-template #emptyTemplate>\n\t\t<div ng-doc-text color=\"muted\">Nothing was found...</div>\n\t</ng-template>\n</div>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;AAOA,MAgBa,0BAA0B,CAAA;AAhBvC,IAAA,WAAA,GAAA;QAkBC,IAAM,CAAA,MAAA,GAA2B,EAAE,CAAC;QAEpC,IAAa,CAAA,aAAA,GAAoC,EAAE,CAAC;AA6BpD,KAAA;IA3BA,WAAW,CAAC,EAAE,MAAM,EAAiB,EAAA;AACpC,QAAA,IAAI,MAAM,IAAI,IAAI,CAAC,MAAM,EAAE;AAC1B,YAAA,IAAI,CAAC,aAAa,GAAG,IAAI,CAAC,MAAM,CAAC,MAAM,CACtC,CAAC,OAAwC,EAAE,IAAmB,KAAI;AACjE,gBAAA,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE;AACxB,oBAAA,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,EAAE,CAAC;AACxB,iBAAA;gBAED,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AAE9B,gBAAA,OAAO,OAAO,CAAC;aACf,EACD,EAAE,CACF,CAAC;AACF,SAAA;KACD;AAED,IAAA,WAAW,CAAC,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