From 2e85d3d03e82e83f27be9383ec338032d573aac0 Mon Sep 17 00:00:00 2001 From: kyubisation Date: Fri, 13 Sep 2019 19:27:39 +0200 Subject: [PATCH] fix(showcase): fix example code loading (#167) Closes #165 --- package.json | 10 +- .../business-examples.module.ts} | 8 +- .../simple-contextmenu.component.html} | 0 .../simple-contextmenu.component.scss} | 0 .../simple-contextmenu.component.ts | 12 ++ .../skippable-processflow.component.html | 29 ++++ .../skippable-processflow.component.scss | 3 + .../skippable-processflow.component.ts} | 10 +- .../src/app/business/business.module.ts | 4 +- .../business/business/business.component.ts | 24 +-- .../component-viewer.component.html | 8 +- .../component-viewer.component.ts | 11 +- .../contextmenu-showcase.component.ts | 12 -- .../processflow-showcase.component.html | 36 ----- .../component-viewer.component.ts | 11 +- .../src/app/core/core/core.component.ts | 12 +- .../src/app/icons/icons/icons.component.ts | 5 +- .../keycloak/keycloak/keycloak.component.ts | 5 +- .../component-viewer.component.html | 8 +- .../component-viewer.component.ts | 11 +- .../processflow-showcase.component.scss | 0 .../accordion-showcase.component.html | 0 .../accordion-showcase.component.scss | 0 .../accordion-showcase.component.ts | 0 .../autocomplete-showcase.component.html | 0 .../autocomplete-showcase.component.scss | 0 .../autocomplete-showcase.component.ts | 0 .../badge-showcase.component.html | 0 .../badge-showcase.component.scss | 0 .../badge-showcase.component.ts | 0 .../breadcrumb-showcase.component.html | 0 .../breadcrumb-showcase.component.scss | 0 .../breadcrumb-showcase.component.ts | 0 .../button-showcase.component.html | 0 .../button-showcase.component.scss | 0 .../button-showcase.component.ts | 0 .../captcha-showcase.component.html | 0 .../captcha-showcase.component.scss | 0 .../captcha-showcase.component.ts | 0 .../checkbox-panel-showcase.component.html | 0 .../checkbox-panel-showcase.component.scss | 0 .../checkbox-panel-showcase.component.ts | 0 .../checkbox-showcase.component.html | 0 .../checkbox-showcase.component.scss | 0 .../checkbox-showcase.component.ts | 0 .../datepicker-showcase.component.html | 0 .../datepicker-showcase.component.scss | 0 .../datepicker-showcase.component.ts | 0 .../dropdown-showcase.component.html | 0 .../dropdown-showcase.component.scss | 0 .../dropdown-showcase.component.ts | 0 .../field-showcase.component.html | 0 .../field-showcase.component.scss | 0 .../field-showcase.component.ts | 0 .../file-selector-showcase.component.html | 0 .../file-selector-showcase.component.scss | 0 .../file-selector-showcase.component.ts | 0 .../ghettobox-showcase.component.html | 0 .../ghettobox-showcase.component.scss | 0 .../ghettobox-showcase.component.ts | 0 ...lightbox-showcase-content-1.component.html | 0 ...lightbox-showcase-content-2.component.html | 0 ...lightbox-showcase-content-3.component.html | 0 ...lightbox-showcase-content-4.component.html | 0 .../lightbox-showcase.component.html | 0 .../lightbox-showcase.component.scss | 0 .../lightbox-showcase.component.ts | 0 .../links-showcase.component.html | 0 .../links-showcase.component.scss | 0 .../links-showcase.component.ts | 0 .../loading-showcase.component.html | 0 .../loading-showcase.component.scss | 0 .../loading-showcase.component.ts | 0 .../notification-showcase.component.html | 0 .../notification-showcase.component.scss | 0 .../notification-showcase.component.ts | 0 .../pagination-showcase.component.html | 0 .../pagination-showcase.component.scss | 0 .../pagination-showcase.component.ts | 0 .../processflow-showcase.component.html | 0 .../processflow-showcase.component.scss | 0 .../processflow-showcase.component.ts | 0 .../public-examples.module.ts} | 6 +- ...radio-button-panel-showcase.component.html | 0 ...radio-button-panel-showcase.component.scss | 0 .../radio-button-panel-showcase.component.ts | 0 .../radio-button-showcase.component.html | 0 .../radio-button-showcase.component.scss | 0 .../radio-button-showcase.component.ts | 0 .../search-showcase.component.html | 0 .../search-showcase.component.scss | 0 .../search-showcase.component.ts | 0 .../select-showcase.component.html | 0 .../select-showcase.component.scss | 0 .../select-showcase.component.ts | 0 .../table-showcase.component.html | 0 .../table-showcase.component.scss | 0 .../table-showcase.component.ts | 0 .../person-list/person-list.component.html | 0 .../person-list/person-list.component.scss | 0 .../person-list/person-list.component.ts | 0 .../tabs-showcase.component.html | 0 .../tabs-showcase.component.scss | 0 .../tabs-showcase/tabs-showcase.component.ts | 0 .../tag-showcase/tag-showcase.component.html | 0 .../tag-showcase/tag-showcase.component.scss | 0 .../tag-showcase/tag-showcase.component.ts | 0 .../textarea-showcase.component.html | 0 .../textarea-showcase.component.scss | 0 .../textarea-showcase.component.ts | 0 .../textexpand-showcase.component.html | 0 .../textexpand-showcase.component.scss | 0 .../textexpand-showcase.component.ts | 0 .../time-input-showcase.component.html | 0 .../time-input-showcase.component.scss | 0 .../time-input-showcase.component.ts | 0 .../toggle-showcase.component.html | 0 .../toggle-showcase.component.scss | 0 .../toggle-showcase.component.ts | 0 .../tooltip-showcase.component.html | 0 .../tooltip-showcase.component.scss | 0 .../tooltip-showcase.component.ts | 0 .../usermenu-showcase.component.html | 0 .../usermenu-showcase.component.scss | 0 .../usermenu-showcase.component.ts | 2 +- .../src/app/public/public.module.ts | 4 +- .../src/app/public/public/public.component.ts | 144 +++++++++--------- .../shared/api-viewer/api-viewer.component.ts | 21 ++- .../src/app/shared/component-viewer-base.ts | 24 ++- .../src/app/shared/example-provider.ts | 6 +- .../example-viewer.component.html | 8 +- .../example-viewer.component.ts | 32 +++- .../src/app/shared/html-loader.service.ts | 72 ++------- .../src/app/shared/loader-builder.ts | 52 +++++++ .../markdown-viewer.component.ts | 21 ++- projects/angular-showcase/src/styles.scss | 4 + schematics/collection.json | 4 + schematics/example-migration/index.js | 72 +++++++++ schematics/example-migration/index.ts | 44 ++++++ schematics/rollup.config.js | 9 +- 140 files changed, 478 insertions(+), 266 deletions(-) rename projects/angular-showcase/src/app/business/{examples/examples.module.ts => business-examples/business-examples.module.ts} (74%) rename projects/angular-showcase/src/app/business/{examples/contextmenu-showcase/contextmenu-showcase.component.html => business-examples/simple-contextmenu/simple-contextmenu.component.html} (100%) rename projects/angular-showcase/src/app/business/{examples/contextmenu-showcase/contextmenu-showcase.component.scss => business-examples/simple-contextmenu/simple-contextmenu.component.scss} (100%) create mode 100644 projects/angular-showcase/src/app/business/business-examples/simple-contextmenu/simple-contextmenu.component.ts create mode 100644 projects/angular-showcase/src/app/business/business-examples/skippable-processflow/skippable-processflow.component.html create mode 100644 projects/angular-showcase/src/app/business/business-examples/skippable-processflow/skippable-processflow.component.scss rename projects/angular-showcase/src/app/{public/examples/processflow-showcase/processflow-showcase.component.ts => business/business-examples/skippable-processflow/skippable-processflow.component.ts} (61%) delete mode 100644 projects/angular-showcase/src/app/business/examples/contextmenu-showcase/contextmenu-showcase.component.ts delete mode 100644 projects/angular-showcase/src/app/business/examples/processflow-showcase/processflow-showcase.component.html delete mode 100644 projects/angular-showcase/src/app/public/examples/processflow-showcase/processflow-showcase.component.scss rename projects/angular-showcase/src/app/public/{examples => public-examples}/accordion-showcase/accordion-showcase.component.html (100%) rename projects/angular-showcase/src/app/public/{examples => public-examples}/accordion-showcase/accordion-showcase.component.scss (100%) rename projects/angular-showcase/src/app/public/{examples => public-examples}/accordion-showcase/accordion-showcase.component.ts (100%) rename projects/angular-showcase/src/app/public/{examples => public-examples}/autocomplete-showcase/autocomplete-showcase.component.html (100%) rename projects/angular-showcase/src/app/public/{examples => public-examples}/autocomplete-showcase/autocomplete-showcase.component.scss (100%) rename projects/angular-showcase/src/app/public/{examples => public-examples}/autocomplete-showcase/autocomplete-showcase.component.ts (100%) rename projects/angular-showcase/src/app/public/{examples => public-examples}/badge-showcase/badge-showcase.component.html (100%) rename projects/angular-showcase/src/app/public/{examples => public-examples}/badge-showcase/badge-showcase.component.scss (100%) rename projects/angular-showcase/src/app/public/{examples => public-examples}/badge-showcase/badge-showcase.component.ts (100%) rename projects/angular-showcase/src/app/public/{examples => public-examples}/breadcrumb-showcase/breadcrumb-showcase.component.html (100%) rename projects/angular-showcase/src/app/public/{examples => public-examples}/breadcrumb-showcase/breadcrumb-showcase.component.scss (100%) rename projects/angular-showcase/src/app/public/{examples => public-examples}/breadcrumb-showcase/breadcrumb-showcase.component.ts (100%) rename projects/angular-showcase/src/app/public/{examples => public-examples}/button-showcase/button-showcase.component.html (100%) rename projects/angular-showcase/src/app/public/{examples => public-examples}/button-showcase/button-showcase.component.scss (100%) rename projects/angular-showcase/src/app/public/{examples => public-examples}/button-showcase/button-showcase.component.ts (100%) rename projects/angular-showcase/src/app/public/{examples => public-examples}/captcha-showcase/captcha-showcase.component.html (100%) rename projects/angular-showcase/src/app/public/{examples => public-examples}/captcha-showcase/captcha-showcase.component.scss (100%) rename projects/angular-showcase/src/app/public/{examples => public-examples}/captcha-showcase/captcha-showcase.component.ts (100%) rename projects/angular-showcase/src/app/public/{examples => public-examples}/checkbox-panel-showcase/checkbox-panel-showcase.component.html (100%) rename projects/angular-showcase/src/app/public/{examples => public-examples}/checkbox-panel-showcase/checkbox-panel-showcase.component.scss (100%) rename projects/angular-showcase/src/app/public/{examples => public-examples}/checkbox-panel-showcase/checkbox-panel-showcase.component.ts (100%) rename projects/angular-showcase/src/app/public/{examples => public-examples}/checkbox-showcase/checkbox-showcase.component.html (100%) rename projects/angular-showcase/src/app/public/{examples => public-examples}/checkbox-showcase/checkbox-showcase.component.scss (100%) rename projects/angular-showcase/src/app/public/{examples => public-examples}/checkbox-showcase/checkbox-showcase.component.ts (100%) rename projects/angular-showcase/src/app/public/{examples => public-examples}/datepicker-showcase/datepicker-showcase.component.html (100%) rename projects/angular-showcase/src/app/public/{examples => public-examples}/datepicker-showcase/datepicker-showcase.component.scss (100%) rename projects/angular-showcase/src/app/public/{examples => public-examples}/datepicker-showcase/datepicker-showcase.component.ts (100%) rename projects/angular-showcase/src/app/public/{examples => public-examples}/dropdown-showcase/dropdown-showcase.component.html (100%) rename projects/angular-showcase/src/app/public/{examples => public-examples}/dropdown-showcase/dropdown-showcase.component.scss (100%) rename projects/angular-showcase/src/app/public/{examples => public-examples}/dropdown-showcase/dropdown-showcase.component.ts (100%) rename projects/angular-showcase/src/app/public/{examples => public-examples}/field-showcase/field-showcase.component.html (100%) rename projects/angular-showcase/src/app/public/{examples => public-examples}/field-showcase/field-showcase.component.scss (100%) rename projects/angular-showcase/src/app/public/{examples => public-examples}/field-showcase/field-showcase.component.ts (100%) rename projects/angular-showcase/src/app/public/{examples => public-examples}/file-selector-showcase/file-selector-showcase.component.html (100%) rename projects/angular-showcase/src/app/public/{examples => public-examples}/file-selector-showcase/file-selector-showcase.component.scss (100%) rename projects/angular-showcase/src/app/public/{examples => public-examples}/file-selector-showcase/file-selector-showcase.component.ts (100%) rename projects/angular-showcase/src/app/public/{examples => public-examples}/ghettobox-showcase/ghettobox-showcase.component.html (100%) rename projects/angular-showcase/src/app/public/{examples => public-examples}/ghettobox-showcase/ghettobox-showcase.component.scss (100%) rename projects/angular-showcase/src/app/public/{examples => public-examples}/ghettobox-showcase/ghettobox-showcase.component.ts (100%) rename projects/angular-showcase/src/app/public/{examples => public-examples}/lightbox-showcase/lightbox-showcase-content-1.component.html (100%) rename projects/angular-showcase/src/app/public/{examples => public-examples}/lightbox-showcase/lightbox-showcase-content-2.component.html (100%) rename projects/angular-showcase/src/app/public/{examples => public-examples}/lightbox-showcase/lightbox-showcase-content-3.component.html (100%) rename projects/angular-showcase/src/app/public/{examples => public-examples}/lightbox-showcase/lightbox-showcase-content-4.component.html (100%) rename projects/angular-showcase/src/app/public/{examples => public-examples}/lightbox-showcase/lightbox-showcase.component.html (100%) rename projects/angular-showcase/src/app/public/{examples => public-examples}/lightbox-showcase/lightbox-showcase.component.scss (100%) rename projects/angular-showcase/src/app/public/{examples => public-examples}/lightbox-showcase/lightbox-showcase.component.ts (100%) rename projects/angular-showcase/src/app/public/{examples => public-examples}/links-showcase/links-showcase.component.html (100%) rename projects/angular-showcase/src/app/public/{examples => public-examples}/links-showcase/links-showcase.component.scss (100%) rename projects/angular-showcase/src/app/public/{examples => public-examples}/links-showcase/links-showcase.component.ts (100%) rename projects/angular-showcase/src/app/public/{examples => public-examples}/loading-showcase/loading-showcase.component.html (100%) rename projects/angular-showcase/src/app/public/{examples => public-examples}/loading-showcase/loading-showcase.component.scss (100%) rename projects/angular-showcase/src/app/public/{examples => public-examples}/loading-showcase/loading-showcase.component.ts (100%) rename projects/angular-showcase/src/app/public/{examples => public-examples}/notification-showcase/notification-showcase.component.html (100%) rename projects/angular-showcase/src/app/public/{examples => public-examples}/notification-showcase/notification-showcase.component.scss (100%) rename projects/angular-showcase/src/app/public/{examples => public-examples}/notification-showcase/notification-showcase.component.ts (100%) rename projects/angular-showcase/src/app/public/{examples => public-examples}/pagination-showcase/pagination-showcase.component.html (100%) rename projects/angular-showcase/src/app/public/{examples => public-examples}/pagination-showcase/pagination-showcase.component.scss (100%) rename projects/angular-showcase/src/app/public/{examples => public-examples}/pagination-showcase/pagination-showcase.component.ts (100%) rename projects/angular-showcase/src/app/public/{examples => public-examples}/processflow-showcase/processflow-showcase.component.html (100%) rename projects/angular-showcase/src/app/{business/examples => public/public-examples}/processflow-showcase/processflow-showcase.component.scss (100%) rename projects/angular-showcase/src/app/{business/examples => public/public-examples}/processflow-showcase/processflow-showcase.component.ts (100%) rename projects/angular-showcase/src/app/public/{examples/examples.module.ts => public-examples/public-examples.module.ts} (98%) rename projects/angular-showcase/src/app/public/{examples => public-examples}/radio-button-panel-showcase/radio-button-panel-showcase.component.html (100%) rename projects/angular-showcase/src/app/public/{examples => public-examples}/radio-button-panel-showcase/radio-button-panel-showcase.component.scss (100%) rename projects/angular-showcase/src/app/public/{examples => public-examples}/radio-button-panel-showcase/radio-button-panel-showcase.component.ts (100%) rename projects/angular-showcase/src/app/public/{examples => public-examples}/radio-button-showcase/radio-button-showcase.component.html (100%) rename projects/angular-showcase/src/app/public/{examples => public-examples}/radio-button-showcase/radio-button-showcase.component.scss (100%) rename projects/angular-showcase/src/app/public/{examples => public-examples}/radio-button-showcase/radio-button-showcase.component.ts (100%) rename projects/angular-showcase/src/app/public/{examples => public-examples}/search-showcase/search-showcase.component.html (100%) rename projects/angular-showcase/src/app/public/{examples => public-examples}/search-showcase/search-showcase.component.scss (100%) rename projects/angular-showcase/src/app/public/{examples => public-examples}/search-showcase/search-showcase.component.ts (100%) rename projects/angular-showcase/src/app/public/{examples => public-examples}/select-showcase/select-showcase.component.html (100%) rename projects/angular-showcase/src/app/public/{examples => public-examples}/select-showcase/select-showcase.component.scss (100%) rename projects/angular-showcase/src/app/public/{examples => public-examples}/select-showcase/select-showcase.component.ts (100%) rename projects/angular-showcase/src/app/public/{examples => public-examples}/table-showcase/table-showcase.component.html (100%) rename projects/angular-showcase/src/app/public/{examples => public-examples}/table-showcase/table-showcase.component.scss (100%) rename projects/angular-showcase/src/app/public/{examples => public-examples}/table-showcase/table-showcase.component.ts (100%) rename projects/angular-showcase/src/app/public/{examples => public-examples}/tabs-showcase/person/person-list/person-list.component.html (100%) rename projects/angular-showcase/src/app/public/{examples => public-examples}/tabs-showcase/person/person-list/person-list.component.scss (100%) rename projects/angular-showcase/src/app/public/{examples => public-examples}/tabs-showcase/person/person-list/person-list.component.ts (100%) rename projects/angular-showcase/src/app/public/{examples => public-examples}/tabs-showcase/tabs-showcase.component.html (100%) rename projects/angular-showcase/src/app/public/{examples => public-examples}/tabs-showcase/tabs-showcase.component.scss (100%) rename projects/angular-showcase/src/app/public/{examples => public-examples}/tabs-showcase/tabs-showcase.component.ts (100%) rename projects/angular-showcase/src/app/public/{examples => public-examples}/tag-showcase/tag-showcase.component.html (100%) rename projects/angular-showcase/src/app/public/{examples => public-examples}/tag-showcase/tag-showcase.component.scss (100%) rename projects/angular-showcase/src/app/public/{examples => public-examples}/tag-showcase/tag-showcase.component.ts (100%) rename projects/angular-showcase/src/app/public/{examples => public-examples}/textarea-showcase/textarea-showcase.component.html (100%) rename projects/angular-showcase/src/app/public/{examples => public-examples}/textarea-showcase/textarea-showcase.component.scss (100%) rename projects/angular-showcase/src/app/public/{examples => public-examples}/textarea-showcase/textarea-showcase.component.ts (100%) rename projects/angular-showcase/src/app/public/{examples => public-examples}/textexpand-showcase/textexpand-showcase.component.html (100%) rename projects/angular-showcase/src/app/public/{examples => public-examples}/textexpand-showcase/textexpand-showcase.component.scss (100%) rename projects/angular-showcase/src/app/public/{examples => public-examples}/textexpand-showcase/textexpand-showcase.component.ts (100%) rename projects/angular-showcase/src/app/public/{examples => public-examples}/time-input-showcase/time-input-showcase.component.html (100%) rename projects/angular-showcase/src/app/public/{examples => public-examples}/time-input-showcase/time-input-showcase.component.scss (100%) rename projects/angular-showcase/src/app/public/{examples => public-examples}/time-input-showcase/time-input-showcase.component.ts (100%) rename projects/angular-showcase/src/app/public/{examples => public-examples}/toggle-showcase/toggle-showcase.component.html (100%) rename projects/angular-showcase/src/app/public/{examples => public-examples}/toggle-showcase/toggle-showcase.component.scss (100%) rename projects/angular-showcase/src/app/public/{examples => public-examples}/toggle-showcase/toggle-showcase.component.ts (100%) rename projects/angular-showcase/src/app/public/{examples => public-examples}/tooltip-showcase/tooltip-showcase.component.html (100%) rename projects/angular-showcase/src/app/public/{examples => public-examples}/tooltip-showcase/tooltip-showcase.component.scss (100%) rename projects/angular-showcase/src/app/public/{examples => public-examples}/tooltip-showcase/tooltip-showcase.component.ts (100%) rename projects/angular-showcase/src/app/public/{examples => public-examples}/usermenu-showcase/usermenu-showcase.component.html (100%) rename projects/angular-showcase/src/app/public/{examples => public-examples}/usermenu-showcase/usermenu-showcase.component.scss (100%) rename projects/angular-showcase/src/app/public/{examples => public-examples}/usermenu-showcase/usermenu-showcase.component.ts (96%) create mode 100644 projects/angular-showcase/src/app/shared/loader-builder.ts create mode 100644 schematics/example-migration/index.js create mode 100644 schematics/example-migration/index.ts diff --git a/package.json b/package.json index 27526ce2d0..26fd6fe584 100644 --- a/package.json +++ b/package.json @@ -174,15 +174,7 @@ "prettier": { "singleQuote": true, "endOfLine": "lf", - "printWidth": 100, - "overrides": [ - { - "files": "*.html", - "options": { - "parser": "angular" - } - } - ] + "printWidth": 100 }, "stylelint": { "extends": "stylelint-config-recommended-scss", diff --git a/projects/angular-showcase/src/app/business/examples/examples.module.ts b/projects/angular-showcase/src/app/business/business-examples/business-examples.module.ts similarity index 74% rename from projects/angular-showcase/src/app/business/examples/examples.module.ts rename to projects/angular-showcase/src/app/business/business-examples/business-examples.module.ts index 7da03a6290..721949dc18 100644 --- a/projects/angular-showcase/src/app/business/examples/examples.module.ts +++ b/projects/angular-showcase/src/app/business/business-examples/business-examples.module.ts @@ -9,10 +9,10 @@ import { HeaderModule } from '@sbb-esta/angular-business/header'; import { ProcessflowModule } from '@sbb-esta/angular-business/processflow'; import { IconCollectionModule } from '@sbb-esta/angular-icons'; -import { ContextmenuShowcaseComponent } from './contextmenu-showcase/contextmenu-showcase.component'; -import { ProcessflowShowcaseComponent } from './processflow-showcase/processflow-showcase.component'; +import { SimpleContextmenuComponent } from './simple-contextmenu/simple-contextmenu.component'; +import { SkippableProcessflowComponent } from './skippable-processflow/skippable-processflow.component'; -const exampleComponents = [ContextmenuShowcaseComponent, ProcessflowShowcaseComponent]; +const exampleComponents = [SimpleContextmenuComponent, SkippableProcessflowComponent]; @NgModule({ declarations: exampleComponents, @@ -31,4 +31,4 @@ const exampleComponents = [ContextmenuShowcaseComponent, ProcessflowShowcaseComp ProcessflowModule ] }) -export class ExamplesModule {} +export class BusinessExamplesModule {} diff --git a/projects/angular-showcase/src/app/business/examples/contextmenu-showcase/contextmenu-showcase.component.html b/projects/angular-showcase/src/app/business/business-examples/simple-contextmenu/simple-contextmenu.component.html similarity index 100% rename from projects/angular-showcase/src/app/business/examples/contextmenu-showcase/contextmenu-showcase.component.html rename to projects/angular-showcase/src/app/business/business-examples/simple-contextmenu/simple-contextmenu.component.html diff --git a/projects/angular-showcase/src/app/business/examples/contextmenu-showcase/contextmenu-showcase.component.scss b/projects/angular-showcase/src/app/business/business-examples/simple-contextmenu/simple-contextmenu.component.scss similarity index 100% rename from projects/angular-showcase/src/app/business/examples/contextmenu-showcase/contextmenu-showcase.component.scss rename to projects/angular-showcase/src/app/business/business-examples/simple-contextmenu/simple-contextmenu.component.scss diff --git a/projects/angular-showcase/src/app/business/business-examples/simple-contextmenu/simple-contextmenu.component.ts b/projects/angular-showcase/src/app/business/business-examples/simple-contextmenu/simple-contextmenu.component.ts new file mode 100644 index 0000000000..08551ed940 --- /dev/null +++ b/projects/angular-showcase/src/app/business/business-examples/simple-contextmenu/simple-contextmenu.component.ts @@ -0,0 +1,12 @@ +import { Component } from '@angular/core'; + +@Component({ + selector: 'sbb-simple-contextmenu', + templateUrl: './simple-contextmenu.component.html', + styleUrls: ['./simple-contextmenu.component.scss'] +}) +export class SimpleContextmenuComponent { + action1() {} + action2() {} + action3() {} +} diff --git a/projects/angular-showcase/src/app/business/business-examples/skippable-processflow/skippable-processflow.component.html b/projects/angular-showcase/src/app/business/business-examples/skippable-processflow/skippable-processflow.component.html new file mode 100644 index 0000000000..05eaaf4722 --- /dev/null +++ b/projects/angular-showcase/src/app/business/business-examples/skippable-processflow/skippable-processflow.component.html @@ -0,0 +1,29 @@ +
+ + +
+ Schrittinhalt 1 +
+
+ +
+ Schrittinhalt 2 +
+
+ +
+ Schrittinhalt 3 +
+
+
+ + +
+
+

Properties

+ +
diff --git a/projects/angular-showcase/src/app/business/business-examples/skippable-processflow/skippable-processflow.component.scss b/projects/angular-showcase/src/app/business/business-examples/skippable-processflow/skippable-processflow.component.scss new file mode 100644 index 0000000000..79ff2d5269 --- /dev/null +++ b/projects/angular-showcase/src/app/business/business-examples/skippable-processflow/skippable-processflow.component.scss @@ -0,0 +1,3 @@ +:host { + display: flex; +} diff --git a/projects/angular-showcase/src/app/public/examples/processflow-showcase/processflow-showcase.component.ts b/projects/angular-showcase/src/app/business/business-examples/skippable-processflow/skippable-processflow.component.ts similarity index 61% rename from projects/angular-showcase/src/app/public/examples/processflow-showcase/processflow-showcase.component.ts rename to projects/angular-showcase/src/app/business/business-examples/skippable-processflow/skippable-processflow.component.ts index 5cfa2da829..9d6e706394 100644 --- a/projects/angular-showcase/src/app/public/examples/processflow-showcase/processflow-showcase.component.ts +++ b/projects/angular-showcase/src/app/business/business-examples/skippable-processflow/skippable-processflow.component.ts @@ -1,12 +1,12 @@ import { AfterViewInit, Component, ViewChild } from '@angular/core'; -import { ProcessflowComponent, ProcessflowStep } from '@sbb-esta/angular-public/processflow'; +import { ProcessflowComponent, ProcessflowStep } from '@sbb-esta/angular-business/processflow'; @Component({ - selector: 'sbb-processflow-showcase', - templateUrl: './processflow-showcase.component.html', - styleUrls: ['./processflow-showcase.component.scss'] + selector: 'sbb-skippable-processflow', + templateUrl: './skippable-processflow.component.html', + styleUrls: ['./skippable-processflow.component.scss'] }) -export class ProcessflowShowcaseComponent implements AfterViewInit { +export class SkippableProcessflowComponent implements AfterViewInit { @ViewChild('processflow', { static: true }) processflow: ProcessflowComponent; ngAfterViewInit(): void { diff --git a/projects/angular-showcase/src/app/business/business.module.ts b/projects/angular-showcase/src/app/business/business.module.ts index 18036ea52c..53d89dd9a1 100644 --- a/projects/angular-showcase/src/app/business/business.module.ts +++ b/projects/angular-showcase/src/app/business/business.module.ts @@ -6,10 +6,10 @@ import { PerfectScrollbarModule } from 'ngx-perfect-scrollbar'; import { SharedModule } from '../shared/shared.module'; +import { BusinessExamplesModule } from './business-examples/business-examples.module'; import { BusinessRoutingModule } from './business-routing.module'; import { BusinessComponent } from './business/business.component'; import { ComponentViewerComponent } from './component-viewer/component-viewer.component'; -import { ExamplesModule } from './examples/examples.module'; @NgModule({ declarations: [BusinessComponent, ComponentViewerComponent], @@ -17,7 +17,7 @@ import { ExamplesModule } from './examples/examples.module'; CommonModule, PerfectScrollbarModule, PortalModule, - ExamplesModule, + BusinessExamplesModule, SharedModule, TabsModule, BusinessRoutingModule diff --git a/projects/angular-showcase/src/app/business/business/business.component.ts b/projects/angular-showcase/src/app/business/business/business.component.ts index 5a7c9e5ac3..49b74e023e 100644 --- a/projects/angular-showcase/src/app/business/business/business.component.ts +++ b/projects/angular-showcase/src/app/business/business/business.component.ts @@ -1,15 +1,15 @@ -import { Component, Type } from '@angular/core'; +import { ComponentPortal } from '@angular/cdk/portal'; +import { Component } from '@angular/core'; import { ExampleProvider } from '../../shared/example-provider'; -import { HtmlLoader } from '../../shared/html-loader.service'; -import { ContextmenuShowcaseComponent } from '../examples/contextmenu-showcase/contextmenu-showcase.component'; -import { ProcessflowShowcaseComponent } from '../examples/processflow-showcase/processflow-showcase.component'; +import { SimpleContextmenuComponent } from '../business-examples/simple-contextmenu/simple-contextmenu.component'; +import { SkippableProcessflowComponent } from '../business-examples/skippable-processflow/skippable-processflow.component'; @Component({ selector: 'sbb-business', templateUrl: './business.component.html', styleUrls: ['./business.component.scss'], - providers: [{ provide: ExampleProvider, useExisting: BusinessComponent }, HtmlLoader] + providers: [{ provide: ExampleProvider, useExisting: BusinessComponent }] }) export class BusinessComponent implements ExampleProvider { formComponents = { @@ -34,12 +34,18 @@ export class BusinessComponent implements ExampleProvider { contextmenu: 'Contextmenu' }; popupsAndModals = {}; - private _examples = { - processflow: ProcessflowShowcaseComponent, - contextmenu: ContextmenuShowcaseComponent + private _examples: { [component: string]: { [name: string]: ComponentPortal } } = { + processflow: { + 'skippable-processflow': new ComponentPortal(SkippableProcessflowComponent) + }, + contextmenu: { + 'simple-contextmenu': new ComponentPortal(SimpleContextmenuComponent) + } }; - resolveExample(component: string): Type { + resolveExample( + component: string + ): { [name: string]: ComponentPortal } { return this._examples[component]; } } diff --git a/projects/angular-showcase/src/app/business/component-viewer/component-viewer.component.html b/projects/angular-showcase/src/app/business/component-viewer/component-viewer.component.html index 1b5ad6ac9c..84e7227dc0 100644 --- a/projects/angular-showcase/src/app/business/component-viewer/component-viewer.component.html +++ b/projects/angular-showcase/src/app/business/component-viewer/component-viewer.component.html @@ -7,8 +7,12 @@
- - + + diff --git a/projects/angular-showcase/src/app/business/component-viewer/component-viewer.component.ts b/projects/angular-showcase/src/app/business/component-viewer/component-viewer.component.ts index 4ef09767f0..be3a9cb39f 100644 --- a/projects/angular-showcase/src/app/business/component-viewer/component-viewer.component.ts +++ b/projects/angular-showcase/src/app/business/component-viewer/component-viewer.component.ts @@ -1,4 +1,4 @@ -import { Component } from '@angular/core'; +import { Component, Renderer2 } from '@angular/core'; import { ActivatedRoute } from '@angular/router'; import { ComponentViewerBase } from '../../shared/component-viewer-base'; @@ -11,7 +11,12 @@ import { HtmlLoader } from '../../shared/html-loader.service'; styleUrls: ['./component-viewer.component.scss'] }) export class ComponentViewerComponent extends ComponentViewerBase { - constructor(htmlLoader: HtmlLoader, exampleProvider: ExampleProvider, route: ActivatedRoute) { - super(htmlLoader, exampleProvider, route); + constructor( + htmlLoader: HtmlLoader, + exampleProvider: ExampleProvider, + route: ActivatedRoute, + renderer: Renderer2 + ) { + super(htmlLoader, exampleProvider, route, renderer); } } diff --git a/projects/angular-showcase/src/app/business/examples/contextmenu-showcase/contextmenu-showcase.component.ts b/projects/angular-showcase/src/app/business/examples/contextmenu-showcase/contextmenu-showcase.component.ts deleted file mode 100644 index 19e0469407..0000000000 --- a/projects/angular-showcase/src/app/business/examples/contextmenu-showcase/contextmenu-showcase.component.ts +++ /dev/null @@ -1,12 +0,0 @@ -import { Component } from '@angular/core'; - -@Component({ - selector: 'sbb-contextmenu-showcase', - templateUrl: './contextmenu-showcase.component.html', - styleUrls: ['./contextmenu-showcase.component.scss'] -}) -export class ContextmenuShowcaseComponent { - action1() {} - action2() {} - action3() {} -} diff --git a/projects/angular-showcase/src/app/business/examples/processflow-showcase/processflow-showcase.component.html b/projects/angular-showcase/src/app/business/examples/processflow-showcase/processflow-showcase.component.html deleted file mode 100644 index 2078a31eb9..0000000000 --- a/projects/angular-showcase/src/app/business/examples/processflow-showcase/processflow-showcase.component.html +++ /dev/null @@ -1,36 +0,0 @@ -
-
-
-

Processflow

- - -
- Schrittinhalt 1 -
-
- -
- Schrittinhalt 2 -
-
- -
- Schrittinhalt 3 -
-
-
- - -
-
-

Properties

-
- -
-
-
-
diff --git a/projects/angular-showcase/src/app/core/component-viewer/component-viewer.component.ts b/projects/angular-showcase/src/app/core/component-viewer/component-viewer.component.ts index 4ef09767f0..be3a9cb39f 100644 --- a/projects/angular-showcase/src/app/core/component-viewer/component-viewer.component.ts +++ b/projects/angular-showcase/src/app/core/component-viewer/component-viewer.component.ts @@ -1,4 +1,4 @@ -import { Component } from '@angular/core'; +import { Component, Renderer2 } from '@angular/core'; import { ActivatedRoute } from '@angular/router'; import { ComponentViewerBase } from '../../shared/component-viewer-base'; @@ -11,7 +11,12 @@ import { HtmlLoader } from '../../shared/html-loader.service'; styleUrls: ['./component-viewer.component.scss'] }) export class ComponentViewerComponent extends ComponentViewerBase { - constructor(htmlLoader: HtmlLoader, exampleProvider: ExampleProvider, route: ActivatedRoute) { - super(htmlLoader, exampleProvider, route); + constructor( + htmlLoader: HtmlLoader, + exampleProvider: ExampleProvider, + route: ActivatedRoute, + renderer: Renderer2 + ) { + super(htmlLoader, exampleProvider, route, renderer); } } diff --git a/projects/angular-showcase/src/app/core/core/core.component.ts b/projects/angular-showcase/src/app/core/core/core.component.ts index b690c13522..049bb32cec 100644 --- a/projects/angular-showcase/src/app/core/core/core.component.ts +++ b/projects/angular-showcase/src/app/core/core/core.component.ts @@ -1,22 +1,24 @@ -import { Component, Type } from '@angular/core'; +import { ComponentPortal } from '@angular/cdk/portal'; +import { Component } from '@angular/core'; import { ExampleProvider } from '../../shared/example-provider'; -import { HtmlLoader } from '../../shared/html-loader.service'; @Component({ selector: 'sbb-core', templateUrl: './core.component.html', styleUrls: ['./core.component.scss'], - providers: [{ provide: ExampleProvider, useExisting: CoreComponent }, HtmlLoader] + providers: [{ provide: ExampleProvider, useExisting: CoreComponent }] }) export class CoreComponent implements ExampleProvider { modules = { breakpoints: 'Breakpoints', datetime: 'Datetime' }; - private _examples = {}; + private _examples: { [component: string]: { [name: string]: ComponentPortal } } = {}; - resolveExample(component: string): Type { + resolveExample( + component: string + ): { [name: string]: ComponentPortal } { return this._examples[component]; } } diff --git a/projects/angular-showcase/src/app/icons/icons/icons.component.ts b/projects/angular-showcase/src/app/icons/icons/icons.component.ts index 3bc47fe0da..dd44638879 100644 --- a/projects/angular-showcase/src/app/icons/icons/icons.component.ts +++ b/projects/angular-showcase/src/app/icons/icons/icons.component.ts @@ -2,13 +2,10 @@ import { ComponentPortal } from '@angular/cdk/portal'; import { Component } from '@angular/core'; import { ICON_COMPONENT_META_INFORMATION } from '@sbb-esta/angular-icons'; -import { HtmlLoader } from '../../shared/html-loader.service'; - @Component({ selector: 'sbb-icons', templateUrl: './icons.component.html', - styleUrls: ['./icons.component.scss'], - providers: [HtmlLoader] + styleUrls: ['./icons.component.scss'] }) export class IconsComponent { icons = ICON_COMPONENT_META_INFORMATION.map(i => ({ diff --git a/projects/angular-showcase/src/app/keycloak/keycloak/keycloak.component.ts b/projects/angular-showcase/src/app/keycloak/keycloak/keycloak.component.ts index 46059522d0..453e84fc25 100644 --- a/projects/angular-showcase/src/app/keycloak/keycloak/keycloak.component.ts +++ b/projects/angular-showcase/src/app/keycloak/keycloak/keycloak.component.ts @@ -1,11 +1,8 @@ import { Component } from '@angular/core'; -import { HtmlLoader } from '../../shared/html-loader.service'; - @Component({ selector: 'sbb-keycloak', templateUrl: './keycloak.component.html', - styleUrls: ['./keycloak.component.scss'], - providers: [HtmlLoader] + styleUrls: ['./keycloak.component.scss'] }) export class KeycloakComponent {} diff --git a/projects/angular-showcase/src/app/public/component-viewer/component-viewer.component.html b/projects/angular-showcase/src/app/public/component-viewer/component-viewer.component.html index 1b5ad6ac9c..e3a04c9dae 100644 --- a/projects/angular-showcase/src/app/public/component-viewer/component-viewer.component.html +++ b/projects/angular-showcase/src/app/public/component-viewer/component-viewer.component.html @@ -7,8 +7,12 @@
- - + + diff --git a/projects/angular-showcase/src/app/public/component-viewer/component-viewer.component.ts b/projects/angular-showcase/src/app/public/component-viewer/component-viewer.component.ts index 4ef09767f0..be3a9cb39f 100644 --- a/projects/angular-showcase/src/app/public/component-viewer/component-viewer.component.ts +++ b/projects/angular-showcase/src/app/public/component-viewer/component-viewer.component.ts @@ -1,4 +1,4 @@ -import { Component } from '@angular/core'; +import { Component, Renderer2 } from '@angular/core'; import { ActivatedRoute } from '@angular/router'; import { ComponentViewerBase } from '../../shared/component-viewer-base'; @@ -11,7 +11,12 @@ import { HtmlLoader } from '../../shared/html-loader.service'; styleUrls: ['./component-viewer.component.scss'] }) export class ComponentViewerComponent extends ComponentViewerBase { - constructor(htmlLoader: HtmlLoader, exampleProvider: ExampleProvider, route: ActivatedRoute) { - super(htmlLoader, exampleProvider, route); + constructor( + htmlLoader: HtmlLoader, + exampleProvider: ExampleProvider, + route: ActivatedRoute, + renderer: Renderer2 + ) { + super(htmlLoader, exampleProvider, route, renderer); } } diff --git a/projects/angular-showcase/src/app/public/examples/processflow-showcase/processflow-showcase.component.scss b/projects/angular-showcase/src/app/public/examples/processflow-showcase/processflow-showcase.component.scss deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/projects/angular-showcase/src/app/public/examples/accordion-showcase/accordion-showcase.component.html b/projects/angular-showcase/src/app/public/public-examples/accordion-showcase/accordion-showcase.component.html similarity index 100% rename from projects/angular-showcase/src/app/public/examples/accordion-showcase/accordion-showcase.component.html rename to projects/angular-showcase/src/app/public/public-examples/accordion-showcase/accordion-showcase.component.html diff --git a/projects/angular-showcase/src/app/public/examples/accordion-showcase/accordion-showcase.component.scss b/projects/angular-showcase/src/app/public/public-examples/accordion-showcase/accordion-showcase.component.scss similarity index 100% rename from projects/angular-showcase/src/app/public/examples/accordion-showcase/accordion-showcase.component.scss rename to projects/angular-showcase/src/app/public/public-examples/accordion-showcase/accordion-showcase.component.scss diff --git a/projects/angular-showcase/src/app/public/examples/accordion-showcase/accordion-showcase.component.ts b/projects/angular-showcase/src/app/public/public-examples/accordion-showcase/accordion-showcase.component.ts similarity index 100% rename from projects/angular-showcase/src/app/public/examples/accordion-showcase/accordion-showcase.component.ts rename to projects/angular-showcase/src/app/public/public-examples/accordion-showcase/accordion-showcase.component.ts diff --git a/projects/angular-showcase/src/app/public/examples/autocomplete-showcase/autocomplete-showcase.component.html b/projects/angular-showcase/src/app/public/public-examples/autocomplete-showcase/autocomplete-showcase.component.html similarity index 100% rename from projects/angular-showcase/src/app/public/examples/autocomplete-showcase/autocomplete-showcase.component.html rename to projects/angular-showcase/src/app/public/public-examples/autocomplete-showcase/autocomplete-showcase.component.html diff --git a/projects/angular-showcase/src/app/public/examples/autocomplete-showcase/autocomplete-showcase.component.scss b/projects/angular-showcase/src/app/public/public-examples/autocomplete-showcase/autocomplete-showcase.component.scss similarity index 100% rename from projects/angular-showcase/src/app/public/examples/autocomplete-showcase/autocomplete-showcase.component.scss rename to projects/angular-showcase/src/app/public/public-examples/autocomplete-showcase/autocomplete-showcase.component.scss diff --git a/projects/angular-showcase/src/app/public/examples/autocomplete-showcase/autocomplete-showcase.component.ts b/projects/angular-showcase/src/app/public/public-examples/autocomplete-showcase/autocomplete-showcase.component.ts similarity index 100% rename from projects/angular-showcase/src/app/public/examples/autocomplete-showcase/autocomplete-showcase.component.ts rename to projects/angular-showcase/src/app/public/public-examples/autocomplete-showcase/autocomplete-showcase.component.ts diff --git a/projects/angular-showcase/src/app/public/examples/badge-showcase/badge-showcase.component.html b/projects/angular-showcase/src/app/public/public-examples/badge-showcase/badge-showcase.component.html similarity index 100% rename from projects/angular-showcase/src/app/public/examples/badge-showcase/badge-showcase.component.html rename to projects/angular-showcase/src/app/public/public-examples/badge-showcase/badge-showcase.component.html diff --git a/projects/angular-showcase/src/app/public/examples/badge-showcase/badge-showcase.component.scss b/projects/angular-showcase/src/app/public/public-examples/badge-showcase/badge-showcase.component.scss similarity index 100% rename from projects/angular-showcase/src/app/public/examples/badge-showcase/badge-showcase.component.scss rename to projects/angular-showcase/src/app/public/public-examples/badge-showcase/badge-showcase.component.scss diff --git a/projects/angular-showcase/src/app/public/examples/badge-showcase/badge-showcase.component.ts b/projects/angular-showcase/src/app/public/public-examples/badge-showcase/badge-showcase.component.ts similarity index 100% rename from projects/angular-showcase/src/app/public/examples/badge-showcase/badge-showcase.component.ts rename to projects/angular-showcase/src/app/public/public-examples/badge-showcase/badge-showcase.component.ts diff --git a/projects/angular-showcase/src/app/public/examples/breadcrumb-showcase/breadcrumb-showcase.component.html b/projects/angular-showcase/src/app/public/public-examples/breadcrumb-showcase/breadcrumb-showcase.component.html similarity index 100% rename from projects/angular-showcase/src/app/public/examples/breadcrumb-showcase/breadcrumb-showcase.component.html rename to projects/angular-showcase/src/app/public/public-examples/breadcrumb-showcase/breadcrumb-showcase.component.html diff --git a/projects/angular-showcase/src/app/public/examples/breadcrumb-showcase/breadcrumb-showcase.component.scss b/projects/angular-showcase/src/app/public/public-examples/breadcrumb-showcase/breadcrumb-showcase.component.scss similarity index 100% rename from projects/angular-showcase/src/app/public/examples/breadcrumb-showcase/breadcrumb-showcase.component.scss rename to projects/angular-showcase/src/app/public/public-examples/breadcrumb-showcase/breadcrumb-showcase.component.scss diff --git a/projects/angular-showcase/src/app/public/examples/breadcrumb-showcase/breadcrumb-showcase.component.ts b/projects/angular-showcase/src/app/public/public-examples/breadcrumb-showcase/breadcrumb-showcase.component.ts similarity index 100% rename from projects/angular-showcase/src/app/public/examples/breadcrumb-showcase/breadcrumb-showcase.component.ts rename to projects/angular-showcase/src/app/public/public-examples/breadcrumb-showcase/breadcrumb-showcase.component.ts diff --git a/projects/angular-showcase/src/app/public/examples/button-showcase/button-showcase.component.html b/projects/angular-showcase/src/app/public/public-examples/button-showcase/button-showcase.component.html similarity index 100% rename from projects/angular-showcase/src/app/public/examples/button-showcase/button-showcase.component.html rename to projects/angular-showcase/src/app/public/public-examples/button-showcase/button-showcase.component.html diff --git a/projects/angular-showcase/src/app/public/examples/button-showcase/button-showcase.component.scss b/projects/angular-showcase/src/app/public/public-examples/button-showcase/button-showcase.component.scss similarity index 100% rename from projects/angular-showcase/src/app/public/examples/button-showcase/button-showcase.component.scss rename to projects/angular-showcase/src/app/public/public-examples/button-showcase/button-showcase.component.scss diff --git a/projects/angular-showcase/src/app/public/examples/button-showcase/button-showcase.component.ts b/projects/angular-showcase/src/app/public/public-examples/button-showcase/button-showcase.component.ts similarity index 100% rename from projects/angular-showcase/src/app/public/examples/button-showcase/button-showcase.component.ts rename to projects/angular-showcase/src/app/public/public-examples/button-showcase/button-showcase.component.ts diff --git a/projects/angular-showcase/src/app/public/examples/captcha-showcase/captcha-showcase.component.html b/projects/angular-showcase/src/app/public/public-examples/captcha-showcase/captcha-showcase.component.html similarity index 100% rename from projects/angular-showcase/src/app/public/examples/captcha-showcase/captcha-showcase.component.html rename to projects/angular-showcase/src/app/public/public-examples/captcha-showcase/captcha-showcase.component.html diff --git a/projects/angular-showcase/src/app/public/examples/captcha-showcase/captcha-showcase.component.scss b/projects/angular-showcase/src/app/public/public-examples/captcha-showcase/captcha-showcase.component.scss similarity index 100% rename from projects/angular-showcase/src/app/public/examples/captcha-showcase/captcha-showcase.component.scss rename to projects/angular-showcase/src/app/public/public-examples/captcha-showcase/captcha-showcase.component.scss diff --git a/projects/angular-showcase/src/app/public/examples/captcha-showcase/captcha-showcase.component.ts b/projects/angular-showcase/src/app/public/public-examples/captcha-showcase/captcha-showcase.component.ts similarity index 100% rename from projects/angular-showcase/src/app/public/examples/captcha-showcase/captcha-showcase.component.ts rename to projects/angular-showcase/src/app/public/public-examples/captcha-showcase/captcha-showcase.component.ts diff --git a/projects/angular-showcase/src/app/public/examples/checkbox-panel-showcase/checkbox-panel-showcase.component.html b/projects/angular-showcase/src/app/public/public-examples/checkbox-panel-showcase/checkbox-panel-showcase.component.html similarity index 100% rename from projects/angular-showcase/src/app/public/examples/checkbox-panel-showcase/checkbox-panel-showcase.component.html rename to projects/angular-showcase/src/app/public/public-examples/checkbox-panel-showcase/checkbox-panel-showcase.component.html diff --git a/projects/angular-showcase/src/app/public/examples/checkbox-panel-showcase/checkbox-panel-showcase.component.scss b/projects/angular-showcase/src/app/public/public-examples/checkbox-panel-showcase/checkbox-panel-showcase.component.scss similarity index 100% rename from projects/angular-showcase/src/app/public/examples/checkbox-panel-showcase/checkbox-panel-showcase.component.scss rename to projects/angular-showcase/src/app/public/public-examples/checkbox-panel-showcase/checkbox-panel-showcase.component.scss diff --git a/projects/angular-showcase/src/app/public/examples/checkbox-panel-showcase/checkbox-panel-showcase.component.ts b/projects/angular-showcase/src/app/public/public-examples/checkbox-panel-showcase/checkbox-panel-showcase.component.ts similarity index 100% rename from projects/angular-showcase/src/app/public/examples/checkbox-panel-showcase/checkbox-panel-showcase.component.ts rename to projects/angular-showcase/src/app/public/public-examples/checkbox-panel-showcase/checkbox-panel-showcase.component.ts diff --git a/projects/angular-showcase/src/app/public/examples/checkbox-showcase/checkbox-showcase.component.html b/projects/angular-showcase/src/app/public/public-examples/checkbox-showcase/checkbox-showcase.component.html similarity index 100% rename from projects/angular-showcase/src/app/public/examples/checkbox-showcase/checkbox-showcase.component.html rename to projects/angular-showcase/src/app/public/public-examples/checkbox-showcase/checkbox-showcase.component.html diff --git a/projects/angular-showcase/src/app/public/examples/checkbox-showcase/checkbox-showcase.component.scss b/projects/angular-showcase/src/app/public/public-examples/checkbox-showcase/checkbox-showcase.component.scss similarity index 100% rename from projects/angular-showcase/src/app/public/examples/checkbox-showcase/checkbox-showcase.component.scss rename to projects/angular-showcase/src/app/public/public-examples/checkbox-showcase/checkbox-showcase.component.scss diff --git a/projects/angular-showcase/src/app/public/examples/checkbox-showcase/checkbox-showcase.component.ts b/projects/angular-showcase/src/app/public/public-examples/checkbox-showcase/checkbox-showcase.component.ts similarity index 100% rename from projects/angular-showcase/src/app/public/examples/checkbox-showcase/checkbox-showcase.component.ts rename to projects/angular-showcase/src/app/public/public-examples/checkbox-showcase/checkbox-showcase.component.ts diff --git a/projects/angular-showcase/src/app/public/examples/datepicker-showcase/datepicker-showcase.component.html b/projects/angular-showcase/src/app/public/public-examples/datepicker-showcase/datepicker-showcase.component.html similarity index 100% rename from projects/angular-showcase/src/app/public/examples/datepicker-showcase/datepicker-showcase.component.html rename to projects/angular-showcase/src/app/public/public-examples/datepicker-showcase/datepicker-showcase.component.html diff --git a/projects/angular-showcase/src/app/public/examples/datepicker-showcase/datepicker-showcase.component.scss b/projects/angular-showcase/src/app/public/public-examples/datepicker-showcase/datepicker-showcase.component.scss similarity index 100% rename from projects/angular-showcase/src/app/public/examples/datepicker-showcase/datepicker-showcase.component.scss rename to projects/angular-showcase/src/app/public/public-examples/datepicker-showcase/datepicker-showcase.component.scss diff --git a/projects/angular-showcase/src/app/public/examples/datepicker-showcase/datepicker-showcase.component.ts b/projects/angular-showcase/src/app/public/public-examples/datepicker-showcase/datepicker-showcase.component.ts similarity index 100% rename from projects/angular-showcase/src/app/public/examples/datepicker-showcase/datepicker-showcase.component.ts rename to projects/angular-showcase/src/app/public/public-examples/datepicker-showcase/datepicker-showcase.component.ts diff --git a/projects/angular-showcase/src/app/public/examples/dropdown-showcase/dropdown-showcase.component.html b/projects/angular-showcase/src/app/public/public-examples/dropdown-showcase/dropdown-showcase.component.html similarity index 100% rename from projects/angular-showcase/src/app/public/examples/dropdown-showcase/dropdown-showcase.component.html rename to projects/angular-showcase/src/app/public/public-examples/dropdown-showcase/dropdown-showcase.component.html diff --git a/projects/angular-showcase/src/app/public/examples/dropdown-showcase/dropdown-showcase.component.scss b/projects/angular-showcase/src/app/public/public-examples/dropdown-showcase/dropdown-showcase.component.scss similarity index 100% rename from projects/angular-showcase/src/app/public/examples/dropdown-showcase/dropdown-showcase.component.scss rename to projects/angular-showcase/src/app/public/public-examples/dropdown-showcase/dropdown-showcase.component.scss diff --git a/projects/angular-showcase/src/app/public/examples/dropdown-showcase/dropdown-showcase.component.ts b/projects/angular-showcase/src/app/public/public-examples/dropdown-showcase/dropdown-showcase.component.ts similarity index 100% rename from projects/angular-showcase/src/app/public/examples/dropdown-showcase/dropdown-showcase.component.ts rename to projects/angular-showcase/src/app/public/public-examples/dropdown-showcase/dropdown-showcase.component.ts diff --git a/projects/angular-showcase/src/app/public/examples/field-showcase/field-showcase.component.html b/projects/angular-showcase/src/app/public/public-examples/field-showcase/field-showcase.component.html similarity index 100% rename from projects/angular-showcase/src/app/public/examples/field-showcase/field-showcase.component.html rename to projects/angular-showcase/src/app/public/public-examples/field-showcase/field-showcase.component.html diff --git a/projects/angular-showcase/src/app/public/examples/field-showcase/field-showcase.component.scss b/projects/angular-showcase/src/app/public/public-examples/field-showcase/field-showcase.component.scss similarity index 100% rename from projects/angular-showcase/src/app/public/examples/field-showcase/field-showcase.component.scss rename to projects/angular-showcase/src/app/public/public-examples/field-showcase/field-showcase.component.scss diff --git a/projects/angular-showcase/src/app/public/examples/field-showcase/field-showcase.component.ts b/projects/angular-showcase/src/app/public/public-examples/field-showcase/field-showcase.component.ts similarity index 100% rename from projects/angular-showcase/src/app/public/examples/field-showcase/field-showcase.component.ts rename to projects/angular-showcase/src/app/public/public-examples/field-showcase/field-showcase.component.ts diff --git a/projects/angular-showcase/src/app/public/examples/file-selector-showcase/file-selector-showcase.component.html b/projects/angular-showcase/src/app/public/public-examples/file-selector-showcase/file-selector-showcase.component.html similarity index 100% rename from projects/angular-showcase/src/app/public/examples/file-selector-showcase/file-selector-showcase.component.html rename to projects/angular-showcase/src/app/public/public-examples/file-selector-showcase/file-selector-showcase.component.html diff --git a/projects/angular-showcase/src/app/public/examples/file-selector-showcase/file-selector-showcase.component.scss b/projects/angular-showcase/src/app/public/public-examples/file-selector-showcase/file-selector-showcase.component.scss similarity index 100% rename from projects/angular-showcase/src/app/public/examples/file-selector-showcase/file-selector-showcase.component.scss rename to projects/angular-showcase/src/app/public/public-examples/file-selector-showcase/file-selector-showcase.component.scss diff --git a/projects/angular-showcase/src/app/public/examples/file-selector-showcase/file-selector-showcase.component.ts b/projects/angular-showcase/src/app/public/public-examples/file-selector-showcase/file-selector-showcase.component.ts similarity index 100% rename from projects/angular-showcase/src/app/public/examples/file-selector-showcase/file-selector-showcase.component.ts rename to projects/angular-showcase/src/app/public/public-examples/file-selector-showcase/file-selector-showcase.component.ts diff --git a/projects/angular-showcase/src/app/public/examples/ghettobox-showcase/ghettobox-showcase.component.html b/projects/angular-showcase/src/app/public/public-examples/ghettobox-showcase/ghettobox-showcase.component.html similarity index 100% rename from projects/angular-showcase/src/app/public/examples/ghettobox-showcase/ghettobox-showcase.component.html rename to projects/angular-showcase/src/app/public/public-examples/ghettobox-showcase/ghettobox-showcase.component.html diff --git a/projects/angular-showcase/src/app/public/examples/ghettobox-showcase/ghettobox-showcase.component.scss b/projects/angular-showcase/src/app/public/public-examples/ghettobox-showcase/ghettobox-showcase.component.scss similarity index 100% rename from projects/angular-showcase/src/app/public/examples/ghettobox-showcase/ghettobox-showcase.component.scss rename to projects/angular-showcase/src/app/public/public-examples/ghettobox-showcase/ghettobox-showcase.component.scss diff --git a/projects/angular-showcase/src/app/public/examples/ghettobox-showcase/ghettobox-showcase.component.ts b/projects/angular-showcase/src/app/public/public-examples/ghettobox-showcase/ghettobox-showcase.component.ts similarity index 100% rename from projects/angular-showcase/src/app/public/examples/ghettobox-showcase/ghettobox-showcase.component.ts rename to projects/angular-showcase/src/app/public/public-examples/ghettobox-showcase/ghettobox-showcase.component.ts diff --git a/projects/angular-showcase/src/app/public/examples/lightbox-showcase/lightbox-showcase-content-1.component.html b/projects/angular-showcase/src/app/public/public-examples/lightbox-showcase/lightbox-showcase-content-1.component.html similarity index 100% rename from projects/angular-showcase/src/app/public/examples/lightbox-showcase/lightbox-showcase-content-1.component.html rename to projects/angular-showcase/src/app/public/public-examples/lightbox-showcase/lightbox-showcase-content-1.component.html diff --git a/projects/angular-showcase/src/app/public/examples/lightbox-showcase/lightbox-showcase-content-2.component.html b/projects/angular-showcase/src/app/public/public-examples/lightbox-showcase/lightbox-showcase-content-2.component.html similarity index 100% rename from projects/angular-showcase/src/app/public/examples/lightbox-showcase/lightbox-showcase-content-2.component.html rename to projects/angular-showcase/src/app/public/public-examples/lightbox-showcase/lightbox-showcase-content-2.component.html diff --git a/projects/angular-showcase/src/app/public/examples/lightbox-showcase/lightbox-showcase-content-3.component.html b/projects/angular-showcase/src/app/public/public-examples/lightbox-showcase/lightbox-showcase-content-3.component.html similarity index 100% rename from projects/angular-showcase/src/app/public/examples/lightbox-showcase/lightbox-showcase-content-3.component.html rename to projects/angular-showcase/src/app/public/public-examples/lightbox-showcase/lightbox-showcase-content-3.component.html diff --git a/projects/angular-showcase/src/app/public/examples/lightbox-showcase/lightbox-showcase-content-4.component.html b/projects/angular-showcase/src/app/public/public-examples/lightbox-showcase/lightbox-showcase-content-4.component.html similarity index 100% rename from projects/angular-showcase/src/app/public/examples/lightbox-showcase/lightbox-showcase-content-4.component.html rename to projects/angular-showcase/src/app/public/public-examples/lightbox-showcase/lightbox-showcase-content-4.component.html diff --git a/projects/angular-showcase/src/app/public/examples/lightbox-showcase/lightbox-showcase.component.html b/projects/angular-showcase/src/app/public/public-examples/lightbox-showcase/lightbox-showcase.component.html similarity index 100% rename from projects/angular-showcase/src/app/public/examples/lightbox-showcase/lightbox-showcase.component.html rename to projects/angular-showcase/src/app/public/public-examples/lightbox-showcase/lightbox-showcase.component.html diff --git a/projects/angular-showcase/src/app/public/examples/lightbox-showcase/lightbox-showcase.component.scss b/projects/angular-showcase/src/app/public/public-examples/lightbox-showcase/lightbox-showcase.component.scss similarity index 100% rename from projects/angular-showcase/src/app/public/examples/lightbox-showcase/lightbox-showcase.component.scss rename to projects/angular-showcase/src/app/public/public-examples/lightbox-showcase/lightbox-showcase.component.scss diff --git a/projects/angular-showcase/src/app/public/examples/lightbox-showcase/lightbox-showcase.component.ts b/projects/angular-showcase/src/app/public/public-examples/lightbox-showcase/lightbox-showcase.component.ts similarity index 100% rename from projects/angular-showcase/src/app/public/examples/lightbox-showcase/lightbox-showcase.component.ts rename to projects/angular-showcase/src/app/public/public-examples/lightbox-showcase/lightbox-showcase.component.ts diff --git a/projects/angular-showcase/src/app/public/examples/links-showcase/links-showcase.component.html b/projects/angular-showcase/src/app/public/public-examples/links-showcase/links-showcase.component.html similarity index 100% rename from projects/angular-showcase/src/app/public/examples/links-showcase/links-showcase.component.html rename to projects/angular-showcase/src/app/public/public-examples/links-showcase/links-showcase.component.html diff --git a/projects/angular-showcase/src/app/public/examples/links-showcase/links-showcase.component.scss b/projects/angular-showcase/src/app/public/public-examples/links-showcase/links-showcase.component.scss similarity index 100% rename from projects/angular-showcase/src/app/public/examples/links-showcase/links-showcase.component.scss rename to projects/angular-showcase/src/app/public/public-examples/links-showcase/links-showcase.component.scss diff --git a/projects/angular-showcase/src/app/public/examples/links-showcase/links-showcase.component.ts b/projects/angular-showcase/src/app/public/public-examples/links-showcase/links-showcase.component.ts similarity index 100% rename from projects/angular-showcase/src/app/public/examples/links-showcase/links-showcase.component.ts rename to projects/angular-showcase/src/app/public/public-examples/links-showcase/links-showcase.component.ts diff --git a/projects/angular-showcase/src/app/public/examples/loading-showcase/loading-showcase.component.html b/projects/angular-showcase/src/app/public/public-examples/loading-showcase/loading-showcase.component.html similarity index 100% rename from projects/angular-showcase/src/app/public/examples/loading-showcase/loading-showcase.component.html rename to projects/angular-showcase/src/app/public/public-examples/loading-showcase/loading-showcase.component.html diff --git a/projects/angular-showcase/src/app/public/examples/loading-showcase/loading-showcase.component.scss b/projects/angular-showcase/src/app/public/public-examples/loading-showcase/loading-showcase.component.scss similarity index 100% rename from projects/angular-showcase/src/app/public/examples/loading-showcase/loading-showcase.component.scss rename to projects/angular-showcase/src/app/public/public-examples/loading-showcase/loading-showcase.component.scss diff --git a/projects/angular-showcase/src/app/public/examples/loading-showcase/loading-showcase.component.ts b/projects/angular-showcase/src/app/public/public-examples/loading-showcase/loading-showcase.component.ts similarity index 100% rename from projects/angular-showcase/src/app/public/examples/loading-showcase/loading-showcase.component.ts rename to projects/angular-showcase/src/app/public/public-examples/loading-showcase/loading-showcase.component.ts diff --git a/projects/angular-showcase/src/app/public/examples/notification-showcase/notification-showcase.component.html b/projects/angular-showcase/src/app/public/public-examples/notification-showcase/notification-showcase.component.html similarity index 100% rename from projects/angular-showcase/src/app/public/examples/notification-showcase/notification-showcase.component.html rename to projects/angular-showcase/src/app/public/public-examples/notification-showcase/notification-showcase.component.html diff --git a/projects/angular-showcase/src/app/public/examples/notification-showcase/notification-showcase.component.scss b/projects/angular-showcase/src/app/public/public-examples/notification-showcase/notification-showcase.component.scss similarity index 100% rename from projects/angular-showcase/src/app/public/examples/notification-showcase/notification-showcase.component.scss rename to projects/angular-showcase/src/app/public/public-examples/notification-showcase/notification-showcase.component.scss diff --git a/projects/angular-showcase/src/app/public/examples/notification-showcase/notification-showcase.component.ts b/projects/angular-showcase/src/app/public/public-examples/notification-showcase/notification-showcase.component.ts similarity index 100% rename from projects/angular-showcase/src/app/public/examples/notification-showcase/notification-showcase.component.ts rename to projects/angular-showcase/src/app/public/public-examples/notification-showcase/notification-showcase.component.ts diff --git a/projects/angular-showcase/src/app/public/examples/pagination-showcase/pagination-showcase.component.html b/projects/angular-showcase/src/app/public/public-examples/pagination-showcase/pagination-showcase.component.html similarity index 100% rename from projects/angular-showcase/src/app/public/examples/pagination-showcase/pagination-showcase.component.html rename to projects/angular-showcase/src/app/public/public-examples/pagination-showcase/pagination-showcase.component.html diff --git a/projects/angular-showcase/src/app/public/examples/pagination-showcase/pagination-showcase.component.scss b/projects/angular-showcase/src/app/public/public-examples/pagination-showcase/pagination-showcase.component.scss similarity index 100% rename from projects/angular-showcase/src/app/public/examples/pagination-showcase/pagination-showcase.component.scss rename to projects/angular-showcase/src/app/public/public-examples/pagination-showcase/pagination-showcase.component.scss diff --git a/projects/angular-showcase/src/app/public/examples/pagination-showcase/pagination-showcase.component.ts b/projects/angular-showcase/src/app/public/public-examples/pagination-showcase/pagination-showcase.component.ts similarity index 100% rename from projects/angular-showcase/src/app/public/examples/pagination-showcase/pagination-showcase.component.ts rename to projects/angular-showcase/src/app/public/public-examples/pagination-showcase/pagination-showcase.component.ts diff --git a/projects/angular-showcase/src/app/public/examples/processflow-showcase/processflow-showcase.component.html b/projects/angular-showcase/src/app/public/public-examples/processflow-showcase/processflow-showcase.component.html similarity index 100% rename from projects/angular-showcase/src/app/public/examples/processflow-showcase/processflow-showcase.component.html rename to projects/angular-showcase/src/app/public/public-examples/processflow-showcase/processflow-showcase.component.html diff --git a/projects/angular-showcase/src/app/business/examples/processflow-showcase/processflow-showcase.component.scss b/projects/angular-showcase/src/app/public/public-examples/processflow-showcase/processflow-showcase.component.scss similarity index 100% rename from projects/angular-showcase/src/app/business/examples/processflow-showcase/processflow-showcase.component.scss rename to projects/angular-showcase/src/app/public/public-examples/processflow-showcase/processflow-showcase.component.scss diff --git a/projects/angular-showcase/src/app/business/examples/processflow-showcase/processflow-showcase.component.ts b/projects/angular-showcase/src/app/public/public-examples/processflow-showcase/processflow-showcase.component.ts similarity index 100% rename from projects/angular-showcase/src/app/business/examples/processflow-showcase/processflow-showcase.component.ts rename to projects/angular-showcase/src/app/public/public-examples/processflow-showcase/processflow-showcase.component.ts diff --git a/projects/angular-showcase/src/app/public/examples/examples.module.ts b/projects/angular-showcase/src/app/public/public-examples/public-examples.module.ts similarity index 98% rename from projects/angular-showcase/src/app/public/examples/examples.module.ts rename to projects/angular-showcase/src/app/public/public-examples/public-examples.module.ts index 168be7ede5..15ac3b139e 100644 --- a/projects/angular-showcase/src/app/public/examples/examples.module.ts +++ b/projects/angular-showcase/src/app/public/public-examples/public-examples.module.ts @@ -83,7 +83,7 @@ import { TextexpandShowcaseComponent } from './textexpand-showcase/textexpand-sh import { TimeInputShowcaseComponent } from './time-input-showcase/time-input-showcase.component'; import { ToggleShowcaseComponent } from './toggle-showcase/toggle-showcase.component'; import { TooltipShowcaseComponent } from './tooltip-showcase/tooltip-showcase.component'; -import { UserMenuShowcaseComponent } from './usermenu-showcase/usermenu-showcase.component'; +import { UsermenuShowcaseComponent } from './usermenu-showcase/usermenu-showcase.component'; const exampleComponents = [ AccordionShowcaseComponent, @@ -128,7 +128,7 @@ const exampleComponents = [ ToggleShowcaseComponent, TooltipShowcaseComponent, TagShowcaseComponent, - UserMenuShowcaseComponent + UsermenuShowcaseComponent ]; @NgModule({ @@ -178,4 +178,4 @@ const exampleComponents = [ UserMenuModule ] }) -export class ExamplesModule {} +export class PublicExamplesModule {} diff --git a/projects/angular-showcase/src/app/public/examples/radio-button-panel-showcase/radio-button-panel-showcase.component.html b/projects/angular-showcase/src/app/public/public-examples/radio-button-panel-showcase/radio-button-panel-showcase.component.html similarity index 100% rename from projects/angular-showcase/src/app/public/examples/radio-button-panel-showcase/radio-button-panel-showcase.component.html rename to projects/angular-showcase/src/app/public/public-examples/radio-button-panel-showcase/radio-button-panel-showcase.component.html diff --git a/projects/angular-showcase/src/app/public/examples/radio-button-panel-showcase/radio-button-panel-showcase.component.scss b/projects/angular-showcase/src/app/public/public-examples/radio-button-panel-showcase/radio-button-panel-showcase.component.scss similarity index 100% rename from projects/angular-showcase/src/app/public/examples/radio-button-panel-showcase/radio-button-panel-showcase.component.scss rename to projects/angular-showcase/src/app/public/public-examples/radio-button-panel-showcase/radio-button-panel-showcase.component.scss diff --git a/projects/angular-showcase/src/app/public/examples/radio-button-panel-showcase/radio-button-panel-showcase.component.ts b/projects/angular-showcase/src/app/public/public-examples/radio-button-panel-showcase/radio-button-panel-showcase.component.ts similarity index 100% rename from projects/angular-showcase/src/app/public/examples/radio-button-panel-showcase/radio-button-panel-showcase.component.ts rename to projects/angular-showcase/src/app/public/public-examples/radio-button-panel-showcase/radio-button-panel-showcase.component.ts diff --git a/projects/angular-showcase/src/app/public/examples/radio-button-showcase/radio-button-showcase.component.html b/projects/angular-showcase/src/app/public/public-examples/radio-button-showcase/radio-button-showcase.component.html similarity index 100% rename from projects/angular-showcase/src/app/public/examples/radio-button-showcase/radio-button-showcase.component.html rename to projects/angular-showcase/src/app/public/public-examples/radio-button-showcase/radio-button-showcase.component.html diff --git a/projects/angular-showcase/src/app/public/examples/radio-button-showcase/radio-button-showcase.component.scss b/projects/angular-showcase/src/app/public/public-examples/radio-button-showcase/radio-button-showcase.component.scss similarity index 100% rename from projects/angular-showcase/src/app/public/examples/radio-button-showcase/radio-button-showcase.component.scss rename to projects/angular-showcase/src/app/public/public-examples/radio-button-showcase/radio-button-showcase.component.scss diff --git a/projects/angular-showcase/src/app/public/examples/radio-button-showcase/radio-button-showcase.component.ts b/projects/angular-showcase/src/app/public/public-examples/radio-button-showcase/radio-button-showcase.component.ts similarity index 100% rename from projects/angular-showcase/src/app/public/examples/radio-button-showcase/radio-button-showcase.component.ts rename to projects/angular-showcase/src/app/public/public-examples/radio-button-showcase/radio-button-showcase.component.ts diff --git a/projects/angular-showcase/src/app/public/examples/search-showcase/search-showcase.component.html b/projects/angular-showcase/src/app/public/public-examples/search-showcase/search-showcase.component.html similarity index 100% rename from projects/angular-showcase/src/app/public/examples/search-showcase/search-showcase.component.html rename to projects/angular-showcase/src/app/public/public-examples/search-showcase/search-showcase.component.html diff --git a/projects/angular-showcase/src/app/public/examples/search-showcase/search-showcase.component.scss b/projects/angular-showcase/src/app/public/public-examples/search-showcase/search-showcase.component.scss similarity index 100% rename from projects/angular-showcase/src/app/public/examples/search-showcase/search-showcase.component.scss rename to projects/angular-showcase/src/app/public/public-examples/search-showcase/search-showcase.component.scss diff --git a/projects/angular-showcase/src/app/public/examples/search-showcase/search-showcase.component.ts b/projects/angular-showcase/src/app/public/public-examples/search-showcase/search-showcase.component.ts similarity index 100% rename from projects/angular-showcase/src/app/public/examples/search-showcase/search-showcase.component.ts rename to projects/angular-showcase/src/app/public/public-examples/search-showcase/search-showcase.component.ts diff --git a/projects/angular-showcase/src/app/public/examples/select-showcase/select-showcase.component.html b/projects/angular-showcase/src/app/public/public-examples/select-showcase/select-showcase.component.html similarity index 100% rename from projects/angular-showcase/src/app/public/examples/select-showcase/select-showcase.component.html rename to projects/angular-showcase/src/app/public/public-examples/select-showcase/select-showcase.component.html diff --git a/projects/angular-showcase/src/app/public/examples/select-showcase/select-showcase.component.scss b/projects/angular-showcase/src/app/public/public-examples/select-showcase/select-showcase.component.scss similarity index 100% rename from projects/angular-showcase/src/app/public/examples/select-showcase/select-showcase.component.scss rename to projects/angular-showcase/src/app/public/public-examples/select-showcase/select-showcase.component.scss diff --git a/projects/angular-showcase/src/app/public/examples/select-showcase/select-showcase.component.ts b/projects/angular-showcase/src/app/public/public-examples/select-showcase/select-showcase.component.ts similarity index 100% rename from projects/angular-showcase/src/app/public/examples/select-showcase/select-showcase.component.ts rename to projects/angular-showcase/src/app/public/public-examples/select-showcase/select-showcase.component.ts diff --git a/projects/angular-showcase/src/app/public/examples/table-showcase/table-showcase.component.html b/projects/angular-showcase/src/app/public/public-examples/table-showcase/table-showcase.component.html similarity index 100% rename from projects/angular-showcase/src/app/public/examples/table-showcase/table-showcase.component.html rename to projects/angular-showcase/src/app/public/public-examples/table-showcase/table-showcase.component.html diff --git a/projects/angular-showcase/src/app/public/examples/table-showcase/table-showcase.component.scss b/projects/angular-showcase/src/app/public/public-examples/table-showcase/table-showcase.component.scss similarity index 100% rename from projects/angular-showcase/src/app/public/examples/table-showcase/table-showcase.component.scss rename to projects/angular-showcase/src/app/public/public-examples/table-showcase/table-showcase.component.scss diff --git a/projects/angular-showcase/src/app/public/examples/table-showcase/table-showcase.component.ts b/projects/angular-showcase/src/app/public/public-examples/table-showcase/table-showcase.component.ts similarity index 100% rename from projects/angular-showcase/src/app/public/examples/table-showcase/table-showcase.component.ts rename to projects/angular-showcase/src/app/public/public-examples/table-showcase/table-showcase.component.ts diff --git a/projects/angular-showcase/src/app/public/examples/tabs-showcase/person/person-list/person-list.component.html b/projects/angular-showcase/src/app/public/public-examples/tabs-showcase/person/person-list/person-list.component.html similarity index 100% rename from projects/angular-showcase/src/app/public/examples/tabs-showcase/person/person-list/person-list.component.html rename to projects/angular-showcase/src/app/public/public-examples/tabs-showcase/person/person-list/person-list.component.html diff --git a/projects/angular-showcase/src/app/public/examples/tabs-showcase/person/person-list/person-list.component.scss b/projects/angular-showcase/src/app/public/public-examples/tabs-showcase/person/person-list/person-list.component.scss similarity index 100% rename from projects/angular-showcase/src/app/public/examples/tabs-showcase/person/person-list/person-list.component.scss rename to projects/angular-showcase/src/app/public/public-examples/tabs-showcase/person/person-list/person-list.component.scss diff --git a/projects/angular-showcase/src/app/public/examples/tabs-showcase/person/person-list/person-list.component.ts b/projects/angular-showcase/src/app/public/public-examples/tabs-showcase/person/person-list/person-list.component.ts similarity index 100% rename from projects/angular-showcase/src/app/public/examples/tabs-showcase/person/person-list/person-list.component.ts rename to projects/angular-showcase/src/app/public/public-examples/tabs-showcase/person/person-list/person-list.component.ts diff --git a/projects/angular-showcase/src/app/public/examples/tabs-showcase/tabs-showcase.component.html b/projects/angular-showcase/src/app/public/public-examples/tabs-showcase/tabs-showcase.component.html similarity index 100% rename from projects/angular-showcase/src/app/public/examples/tabs-showcase/tabs-showcase.component.html rename to projects/angular-showcase/src/app/public/public-examples/tabs-showcase/tabs-showcase.component.html diff --git a/projects/angular-showcase/src/app/public/examples/tabs-showcase/tabs-showcase.component.scss b/projects/angular-showcase/src/app/public/public-examples/tabs-showcase/tabs-showcase.component.scss similarity index 100% rename from projects/angular-showcase/src/app/public/examples/tabs-showcase/tabs-showcase.component.scss rename to projects/angular-showcase/src/app/public/public-examples/tabs-showcase/tabs-showcase.component.scss diff --git a/projects/angular-showcase/src/app/public/examples/tabs-showcase/tabs-showcase.component.ts b/projects/angular-showcase/src/app/public/public-examples/tabs-showcase/tabs-showcase.component.ts similarity index 100% rename from projects/angular-showcase/src/app/public/examples/tabs-showcase/tabs-showcase.component.ts rename to projects/angular-showcase/src/app/public/public-examples/tabs-showcase/tabs-showcase.component.ts diff --git a/projects/angular-showcase/src/app/public/examples/tag-showcase/tag-showcase.component.html b/projects/angular-showcase/src/app/public/public-examples/tag-showcase/tag-showcase.component.html similarity index 100% rename from projects/angular-showcase/src/app/public/examples/tag-showcase/tag-showcase.component.html rename to projects/angular-showcase/src/app/public/public-examples/tag-showcase/tag-showcase.component.html diff --git a/projects/angular-showcase/src/app/public/examples/tag-showcase/tag-showcase.component.scss b/projects/angular-showcase/src/app/public/public-examples/tag-showcase/tag-showcase.component.scss similarity index 100% rename from projects/angular-showcase/src/app/public/examples/tag-showcase/tag-showcase.component.scss rename to projects/angular-showcase/src/app/public/public-examples/tag-showcase/tag-showcase.component.scss diff --git a/projects/angular-showcase/src/app/public/examples/tag-showcase/tag-showcase.component.ts b/projects/angular-showcase/src/app/public/public-examples/tag-showcase/tag-showcase.component.ts similarity index 100% rename from projects/angular-showcase/src/app/public/examples/tag-showcase/tag-showcase.component.ts rename to projects/angular-showcase/src/app/public/public-examples/tag-showcase/tag-showcase.component.ts diff --git a/projects/angular-showcase/src/app/public/examples/textarea-showcase/textarea-showcase.component.html b/projects/angular-showcase/src/app/public/public-examples/textarea-showcase/textarea-showcase.component.html similarity index 100% rename from projects/angular-showcase/src/app/public/examples/textarea-showcase/textarea-showcase.component.html rename to projects/angular-showcase/src/app/public/public-examples/textarea-showcase/textarea-showcase.component.html diff --git a/projects/angular-showcase/src/app/public/examples/textarea-showcase/textarea-showcase.component.scss b/projects/angular-showcase/src/app/public/public-examples/textarea-showcase/textarea-showcase.component.scss similarity index 100% rename from projects/angular-showcase/src/app/public/examples/textarea-showcase/textarea-showcase.component.scss rename to projects/angular-showcase/src/app/public/public-examples/textarea-showcase/textarea-showcase.component.scss diff --git a/projects/angular-showcase/src/app/public/examples/textarea-showcase/textarea-showcase.component.ts b/projects/angular-showcase/src/app/public/public-examples/textarea-showcase/textarea-showcase.component.ts similarity index 100% rename from projects/angular-showcase/src/app/public/examples/textarea-showcase/textarea-showcase.component.ts rename to projects/angular-showcase/src/app/public/public-examples/textarea-showcase/textarea-showcase.component.ts diff --git a/projects/angular-showcase/src/app/public/examples/textexpand-showcase/textexpand-showcase.component.html b/projects/angular-showcase/src/app/public/public-examples/textexpand-showcase/textexpand-showcase.component.html similarity index 100% rename from projects/angular-showcase/src/app/public/examples/textexpand-showcase/textexpand-showcase.component.html rename to projects/angular-showcase/src/app/public/public-examples/textexpand-showcase/textexpand-showcase.component.html diff --git a/projects/angular-showcase/src/app/public/examples/textexpand-showcase/textexpand-showcase.component.scss b/projects/angular-showcase/src/app/public/public-examples/textexpand-showcase/textexpand-showcase.component.scss similarity index 100% rename from projects/angular-showcase/src/app/public/examples/textexpand-showcase/textexpand-showcase.component.scss rename to projects/angular-showcase/src/app/public/public-examples/textexpand-showcase/textexpand-showcase.component.scss diff --git a/projects/angular-showcase/src/app/public/examples/textexpand-showcase/textexpand-showcase.component.ts b/projects/angular-showcase/src/app/public/public-examples/textexpand-showcase/textexpand-showcase.component.ts similarity index 100% rename from projects/angular-showcase/src/app/public/examples/textexpand-showcase/textexpand-showcase.component.ts rename to projects/angular-showcase/src/app/public/public-examples/textexpand-showcase/textexpand-showcase.component.ts diff --git a/projects/angular-showcase/src/app/public/examples/time-input-showcase/time-input-showcase.component.html b/projects/angular-showcase/src/app/public/public-examples/time-input-showcase/time-input-showcase.component.html similarity index 100% rename from projects/angular-showcase/src/app/public/examples/time-input-showcase/time-input-showcase.component.html rename to projects/angular-showcase/src/app/public/public-examples/time-input-showcase/time-input-showcase.component.html diff --git a/projects/angular-showcase/src/app/public/examples/time-input-showcase/time-input-showcase.component.scss b/projects/angular-showcase/src/app/public/public-examples/time-input-showcase/time-input-showcase.component.scss similarity index 100% rename from projects/angular-showcase/src/app/public/examples/time-input-showcase/time-input-showcase.component.scss rename to projects/angular-showcase/src/app/public/public-examples/time-input-showcase/time-input-showcase.component.scss diff --git a/projects/angular-showcase/src/app/public/examples/time-input-showcase/time-input-showcase.component.ts b/projects/angular-showcase/src/app/public/public-examples/time-input-showcase/time-input-showcase.component.ts similarity index 100% rename from projects/angular-showcase/src/app/public/examples/time-input-showcase/time-input-showcase.component.ts rename to projects/angular-showcase/src/app/public/public-examples/time-input-showcase/time-input-showcase.component.ts diff --git a/projects/angular-showcase/src/app/public/examples/toggle-showcase/toggle-showcase.component.html b/projects/angular-showcase/src/app/public/public-examples/toggle-showcase/toggle-showcase.component.html similarity index 100% rename from projects/angular-showcase/src/app/public/examples/toggle-showcase/toggle-showcase.component.html rename to projects/angular-showcase/src/app/public/public-examples/toggle-showcase/toggle-showcase.component.html diff --git a/projects/angular-showcase/src/app/public/examples/toggle-showcase/toggle-showcase.component.scss b/projects/angular-showcase/src/app/public/public-examples/toggle-showcase/toggle-showcase.component.scss similarity index 100% rename from projects/angular-showcase/src/app/public/examples/toggle-showcase/toggle-showcase.component.scss rename to projects/angular-showcase/src/app/public/public-examples/toggle-showcase/toggle-showcase.component.scss diff --git a/projects/angular-showcase/src/app/public/examples/toggle-showcase/toggle-showcase.component.ts b/projects/angular-showcase/src/app/public/public-examples/toggle-showcase/toggle-showcase.component.ts similarity index 100% rename from projects/angular-showcase/src/app/public/examples/toggle-showcase/toggle-showcase.component.ts rename to projects/angular-showcase/src/app/public/public-examples/toggle-showcase/toggle-showcase.component.ts diff --git a/projects/angular-showcase/src/app/public/examples/tooltip-showcase/tooltip-showcase.component.html b/projects/angular-showcase/src/app/public/public-examples/tooltip-showcase/tooltip-showcase.component.html similarity index 100% rename from projects/angular-showcase/src/app/public/examples/tooltip-showcase/tooltip-showcase.component.html rename to projects/angular-showcase/src/app/public/public-examples/tooltip-showcase/tooltip-showcase.component.html diff --git a/projects/angular-showcase/src/app/public/examples/tooltip-showcase/tooltip-showcase.component.scss b/projects/angular-showcase/src/app/public/public-examples/tooltip-showcase/tooltip-showcase.component.scss similarity index 100% rename from projects/angular-showcase/src/app/public/examples/tooltip-showcase/tooltip-showcase.component.scss rename to projects/angular-showcase/src/app/public/public-examples/tooltip-showcase/tooltip-showcase.component.scss diff --git a/projects/angular-showcase/src/app/public/examples/tooltip-showcase/tooltip-showcase.component.ts b/projects/angular-showcase/src/app/public/public-examples/tooltip-showcase/tooltip-showcase.component.ts similarity index 100% rename from projects/angular-showcase/src/app/public/examples/tooltip-showcase/tooltip-showcase.component.ts rename to projects/angular-showcase/src/app/public/public-examples/tooltip-showcase/tooltip-showcase.component.ts diff --git a/projects/angular-showcase/src/app/public/examples/usermenu-showcase/usermenu-showcase.component.html b/projects/angular-showcase/src/app/public/public-examples/usermenu-showcase/usermenu-showcase.component.html similarity index 100% rename from projects/angular-showcase/src/app/public/examples/usermenu-showcase/usermenu-showcase.component.html rename to projects/angular-showcase/src/app/public/public-examples/usermenu-showcase/usermenu-showcase.component.html diff --git a/projects/angular-showcase/src/app/public/examples/usermenu-showcase/usermenu-showcase.component.scss b/projects/angular-showcase/src/app/public/public-examples/usermenu-showcase/usermenu-showcase.component.scss similarity index 100% rename from projects/angular-showcase/src/app/public/examples/usermenu-showcase/usermenu-showcase.component.scss rename to projects/angular-showcase/src/app/public/public-examples/usermenu-showcase/usermenu-showcase.component.scss diff --git a/projects/angular-showcase/src/app/public/examples/usermenu-showcase/usermenu-showcase.component.ts b/projects/angular-showcase/src/app/public/public-examples/usermenu-showcase/usermenu-showcase.component.ts similarity index 96% rename from projects/angular-showcase/src/app/public/examples/usermenu-showcase/usermenu-showcase.component.ts rename to projects/angular-showcase/src/app/public/public-examples/usermenu-showcase/usermenu-showcase.component.ts index 74f1ddc7d6..1706be140b 100644 --- a/projects/angular-showcase/src/app/public/examples/usermenu-showcase/usermenu-showcase.component.ts +++ b/projects/angular-showcase/src/app/public/public-examples/usermenu-showcase/usermenu-showcase.component.ts @@ -6,7 +6,7 @@ import { LinkGeneratorResult } from '@sbb-esta/angular-core/models'; templateUrl: './usermenu-showcase.component.html', styleUrls: ['./usermenu-showcase.component.scss'] }) -export class UserMenuShowcaseComponent { +export class UsermenuShowcaseComponent { userName1 = 'john_64'; userName2 = 'max_98'; userName3 = 'walter_14'; diff --git a/projects/angular-showcase/src/app/public/public.module.ts b/projects/angular-showcase/src/app/public/public.module.ts index 9c427284ab..e4bde550ec 100644 --- a/projects/angular-showcase/src/app/public/public.module.ts +++ b/projects/angular-showcase/src/app/public/public.module.ts @@ -7,7 +7,7 @@ import { PerfectScrollbarModule } from 'ngx-perfect-scrollbar'; import { SharedModule } from '../shared/shared.module'; import { ComponentViewerComponent } from './component-viewer/component-viewer.component'; -import { ExamplesModule } from './examples/examples.module'; +import { PublicExamplesModule } from './public-examples/public-examples.module'; import { PublicRoutingModule } from './public-routing.module'; import { PublicComponent } from './public/public.component'; @@ -17,7 +17,7 @@ import { PublicComponent } from './public/public.component'; CommonModule, PerfectScrollbarModule, PortalModule, - ExamplesModule, + PublicExamplesModule, SharedModule, TabsModule, PublicRoutingModule diff --git a/projects/angular-showcase/src/app/public/public/public.component.ts b/projects/angular-showcase/src/app/public/public/public.component.ts index fc76c4b438..c1648765d8 100644 --- a/projects/angular-showcase/src/app/public/public/public.component.ts +++ b/projects/angular-showcase/src/app/public/public/public.component.ts @@ -1,45 +1,45 @@ +import { ComponentPortal } from '@angular/cdk/portal'; import { Component, Type } from '@angular/core'; import { ExampleProvider } from '../../shared/example-provider'; -import { HtmlLoader } from '../../shared/html-loader.service'; -import { AccordionShowcaseComponent } from '../examples/accordion-showcase/accordion-showcase.component'; -import { AutocompleteShowcaseComponent } from '../examples/autocomplete-showcase/autocomplete-showcase.component'; -import { BadgeShowcaseComponent } from '../examples/badge-showcase/badge-showcase.component'; -import { BreadcrumbShowcaseComponent } from '../examples/breadcrumb-showcase/breadcrumb-showcase.component'; -import { ButtonShowcaseComponent } from '../examples/button-showcase/button-showcase.component'; -import { CaptchaShowcaseComponent } from '../examples/captcha-showcase/captcha-showcase.component'; -import { CheckboxPanelShowcaseComponent } from '../examples/checkbox-panel-showcase/checkbox-panel-showcase.component'; -import { CheckboxShowcaseComponent } from '../examples/checkbox-showcase/checkbox-showcase.component'; -import { DatepickerShowcaseComponent } from '../examples/datepicker-showcase/datepicker-showcase.component'; -import { DropdownShowcaseComponent } from '../examples/dropdown-showcase/dropdown-showcase.component'; -import { FieldShowcaseComponent } from '../examples/field-showcase/field-showcase.component'; -import { FileSelectorShowcaseComponent } from '../examples/file-selector-showcase/file-selector-showcase.component'; -import { GhettoboxShowcaseComponent } from '../examples/ghettobox-showcase/ghettobox-showcase.component'; -import { LightboxShowcaseComponent } from '../examples/lightbox-showcase/lightbox-showcase.component'; -import { LinksShowcaseComponent } from '../examples/links-showcase/links-showcase.component'; -import { LoadingShowcaseComponent } from '../examples/loading-showcase/loading-showcase.component'; -import { NotificationShowcaseComponent } from '../examples/notification-showcase/notification-showcase.component'; -import { PaginationShowcaseComponent } from '../examples/pagination-showcase/pagination-showcase.component'; -import { ProcessflowShowcaseComponent } from '../examples/processflow-showcase/processflow-showcase.component'; -import { RadioButtonPanelShowcaseComponent } from '../examples/radio-button-panel-showcase/radio-button-panel-showcase.component'; -import { RadioButtonShowcaseComponent } from '../examples/radio-button-showcase/radio-button-showcase.component'; -import { SearchShowcaseComponent } from '../examples/search-showcase/search-showcase.component'; -import { SelectShowcaseComponent } from '../examples/select-showcase/select-showcase.component'; -import { TableShowcaseComponent } from '../examples/table-showcase/table-showcase.component'; -import { TabsShowcaseComponent } from '../examples/tabs-showcase/tabs-showcase.component'; -import { TagShowcaseComponent } from '../examples/tag-showcase/tag-showcase.component'; -import { TextareaShowcaseComponent } from '../examples/textarea-showcase/textarea-showcase.component'; -import { TextexpandShowcaseComponent } from '../examples/textexpand-showcase/textexpand-showcase.component'; -import { TimeInputShowcaseComponent } from '../examples/time-input-showcase/time-input-showcase.component'; -import { ToggleShowcaseComponent } from '../examples/toggle-showcase/toggle-showcase.component'; -import { TooltipShowcaseComponent } from '../examples/tooltip-showcase/tooltip-showcase.component'; -import { UserMenuShowcaseComponent } from '../examples/usermenu-showcase/usermenu-showcase.component'; +import { AccordionShowcaseComponent } from '../public-examples/accordion-showcase/accordion-showcase.component'; +import { AutocompleteShowcaseComponent } from '../public-examples/autocomplete-showcase/autocomplete-showcase.component'; +import { BadgeShowcaseComponent } from '../public-examples/badge-showcase/badge-showcase.component'; +import { BreadcrumbShowcaseComponent } from '../public-examples/breadcrumb-showcase/breadcrumb-showcase.component'; +import { ButtonShowcaseComponent } from '../public-examples/button-showcase/button-showcase.component'; +import { CaptchaShowcaseComponent } from '../public-examples/captcha-showcase/captcha-showcase.component'; +import { CheckboxPanelShowcaseComponent } from '../public-examples/checkbox-panel-showcase/checkbox-panel-showcase.component'; +import { CheckboxShowcaseComponent } from '../public-examples/checkbox-showcase/checkbox-showcase.component'; +import { DatepickerShowcaseComponent } from '../public-examples/datepicker-showcase/datepicker-showcase.component'; +import { DropdownShowcaseComponent } from '../public-examples/dropdown-showcase/dropdown-showcase.component'; +import { FieldShowcaseComponent } from '../public-examples/field-showcase/field-showcase.component'; +import { FileSelectorShowcaseComponent } from '../public-examples/file-selector-showcase/file-selector-showcase.component'; +import { GhettoboxShowcaseComponent } from '../public-examples/ghettobox-showcase/ghettobox-showcase.component'; +import { LightboxShowcaseComponent } from '../public-examples/lightbox-showcase/lightbox-showcase.component'; +import { LinksShowcaseComponent } from '../public-examples/links-showcase/links-showcase.component'; +import { LoadingShowcaseComponent } from '../public-examples/loading-showcase/loading-showcase.component'; +import { NotificationShowcaseComponent } from '../public-examples/notification-showcase/notification-showcase.component'; +import { PaginationShowcaseComponent } from '../public-examples/pagination-showcase/pagination-showcase.component'; +import { ProcessflowShowcaseComponent } from '../public-examples/processflow-showcase/processflow-showcase.component'; +import { RadioButtonPanelShowcaseComponent } from '../public-examples/radio-button-panel-showcase/radio-button-panel-showcase.component'; +import { RadioButtonShowcaseComponent } from '../public-examples/radio-button-showcase/radio-button-showcase.component'; +import { SearchShowcaseComponent } from '../public-examples/search-showcase/search-showcase.component'; +import { SelectShowcaseComponent } from '../public-examples/select-showcase/select-showcase.component'; +import { TableShowcaseComponent } from '../public-examples/table-showcase/table-showcase.component'; +import { TabsShowcaseComponent } from '../public-examples/tabs-showcase/tabs-showcase.component'; +import { TagShowcaseComponent } from '../public-examples/tag-showcase/tag-showcase.component'; +import { TextareaShowcaseComponent } from '../public-examples/textarea-showcase/textarea-showcase.component'; +import { TextexpandShowcaseComponent } from '../public-examples/textexpand-showcase/textexpand-showcase.component'; +import { TimeInputShowcaseComponent } from '../public-examples/time-input-showcase/time-input-showcase.component'; +import { ToggleShowcaseComponent } from '../public-examples/toggle-showcase/toggle-showcase.component'; +import { TooltipShowcaseComponent } from '../public-examples/tooltip-showcase/tooltip-showcase.component'; +import { UsermenuShowcaseComponent } from '../public-examples/usermenu-showcase/usermenu-showcase.component'; @Component({ selector: 'sbb-public', templateUrl: './public.component.html', styleUrls: ['./public.component.scss'], - providers: [{ provide: ExampleProvider, useExisting: PublicComponent }, HtmlLoader] + providers: [{ provide: ExampleProvider, useExisting: PublicComponent }] }) export class PublicComponent implements ExampleProvider { formComponents = { @@ -82,42 +82,50 @@ export class PublicComponent implements ExampleProvider { lightbox: 'Lightbox', tooltip: 'Tooltip' }; - private _examples = { - autocomplete: AutocompleteShowcaseComponent, - captcha: CaptchaShowcaseComponent, - checkbox: CheckboxShowcaseComponent, - 'checkbox-panel': CheckboxPanelShowcaseComponent, - datepicker: DatepickerShowcaseComponent, - field: FieldShowcaseComponent, - 'file-selector': FileSelectorShowcaseComponent, - 'radio-button': RadioButtonShowcaseComponent, - 'radio-button-panel': RadioButtonPanelShowcaseComponent, - search: SearchShowcaseComponent, - select: SelectShowcaseComponent, - tag: TagShowcaseComponent, - textarea: TextareaShowcaseComponent, - 'time-input': TimeInputShowcaseComponent, - toggle: ToggleShowcaseComponent, - accordion: AccordionShowcaseComponent, - breadcrumb: BreadcrumbShowcaseComponent, - ghettobox: GhettoboxShowcaseComponent, - notification: NotificationShowcaseComponent, - pagination: PaginationShowcaseComponent, - processflow: ProcessflowShowcaseComponent, - table: TableShowcaseComponent, - tabs: TabsShowcaseComponent, - textexpand: TextexpandShowcaseComponent, - usermenu: UserMenuShowcaseComponent, - badge: BadgeShowcaseComponent, - button: ButtonShowcaseComponent, - links: LinksShowcaseComponent, - loading: LoadingShowcaseComponent, - dropdown: DropdownShowcaseComponent, - lightbox: LightboxShowcaseComponent, - tooltip: TooltipShowcaseComponent + private _examples: { [component: string]: { [name: string]: ComponentPortal } } = { + autocomplete: { 'autocomplete-showcase': new ComponentPortal(AutocompleteShowcaseComponent) }, + captcha: { 'captcha-showcase': new ComponentPortal(CaptchaShowcaseComponent) }, + checkbox: { 'checkbox-showcase': new ComponentPortal(CheckboxShowcaseComponent) }, + 'checkbox-panel': { + 'checkbox-panel-showcase': new ComponentPortal(CheckboxPanelShowcaseComponent) + }, + datepicker: { 'datepicker-showcase': new ComponentPortal(DatepickerShowcaseComponent) }, + field: { 'field-showcase': new ComponentPortal(FieldShowcaseComponent) }, + 'file-selector': { + 'fileSelector-showcase': new ComponentPortal(FileSelectorShowcaseComponent) + }, + 'radio-button': { 'radioButton-showcase': new ComponentPortal(RadioButtonShowcaseComponent) }, + 'radio-button-panel': { + 'radioButtonPanel-showcase': new ComponentPortal(RadioButtonPanelShowcaseComponent) + }, + search: { 'search-showcase': new ComponentPortal(SearchShowcaseComponent) }, + select: { 'select-showcase': new ComponentPortal(SelectShowcaseComponent) }, + tag: { 'tag-showcase': new ComponentPortal(TagShowcaseComponent) }, + textarea: { 'textarea-showcase': new ComponentPortal(TextareaShowcaseComponent) }, + 'time-input': { 'timeInput-showcase': new ComponentPortal(TimeInputShowcaseComponent) }, + toggle: { 'toggle-showcase': new ComponentPortal(ToggleShowcaseComponent) }, + accordion: { 'accordion-showcase': new ComponentPortal(AccordionShowcaseComponent) }, + breadcrumb: { 'breadcrumb-showcase': new ComponentPortal(BreadcrumbShowcaseComponent) }, + ghettobox: { 'ghettobox-showcase': new ComponentPortal(GhettoboxShowcaseComponent) }, + notification: { 'notification-showcase': new ComponentPortal(NotificationShowcaseComponent) }, + pagination: { 'pagination-showcase': new ComponentPortal(PaginationShowcaseComponent) }, + processflow: { 'processflow-showcase': new ComponentPortal(ProcessflowShowcaseComponent) }, + table: { 'table-showcase': new ComponentPortal(TableShowcaseComponent) }, + tabs: { 'tabs-showcase': new ComponentPortal(TabsShowcaseComponent) }, + textexpand: { 'textexpand-showcase': new ComponentPortal(TextexpandShowcaseComponent) }, + usermenu: { 'usermenu-showcase': new ComponentPortal(UsermenuShowcaseComponent) }, + badge: { 'badge-showcase': new ComponentPortal(BadgeShowcaseComponent) }, + button: { 'button-showcase': new ComponentPortal(ButtonShowcaseComponent) }, + links: { 'links-showcase': new ComponentPortal(LinksShowcaseComponent) }, + loading: { 'loading-showcase': new ComponentPortal(LoadingShowcaseComponent) }, + dropdown: { 'dropdown-showcase': new ComponentPortal(DropdownShowcaseComponent) }, + lightbox: { 'lightbox-showcase': new ComponentPortal(LightboxShowcaseComponent) }, + tooltip: { 'tooltip-showcase': new ComponentPortal(TooltipShowcaseComponent) } }; - resolveExample(component: string): Type { + resolveExample( + component: string + ): { [name: string]: ComponentPortal } { return this._examples[component]; } } diff --git a/projects/angular-showcase/src/app/shared/api-viewer/api-viewer.component.ts b/projects/angular-showcase/src/app/shared/api-viewer/api-viewer.component.ts index c8ecac8ef0..084fb87aeb 100644 --- a/projects/angular-showcase/src/app/shared/api-viewer/api-viewer.component.ts +++ b/projects/angular-showcase/src/app/shared/api-viewer/api-viewer.component.ts @@ -1,4 +1,11 @@ -import { AfterViewInit, Component, ElementRef, OnDestroy, ViewChild } from '@angular/core'; +import { + AfterViewInit, + Component, + ElementRef, + OnDestroy, + Renderer2, + ViewChild +} from '@angular/core'; import { ActivatedRoute } from '@angular/router'; import { Subject } from 'rxjs'; @@ -13,10 +20,18 @@ export class ApiViewerComponent implements AfterViewInit, OnDestroy { @ViewChild('content', { static: true, read: ElementRef }) content: ElementRef; private _destroyed = new Subject(); - constructor(private _htmlLoader: HtmlLoader, private _route: ActivatedRoute) {} + constructor( + private _htmlLoader: HtmlLoader, + private _route: ActivatedRoute, + private _renderer: Renderer2 + ) {} ngAfterViewInit(): void { - this._htmlLoader.loadApiDocumentation(this._route, this._destroyed, this.content); + this._htmlLoader + .with(this._route, this._renderer) + .until(this._destroyed) + .fromApiDocumentation() + .applyTo(this.content); } ngOnDestroy(): void { diff --git a/projects/angular-showcase/src/app/shared/component-viewer-base.ts b/projects/angular-showcase/src/app/shared/component-viewer-base.ts index 9392e23430..d45d5ff85b 100644 --- a/projects/angular-showcase/src/app/shared/component-viewer-base.ts +++ b/projects/angular-showcase/src/app/shared/component-viewer-base.ts @@ -1,6 +1,6 @@ import { ComponentPortal } from '@angular/cdk/portal'; -import { AfterViewInit, ElementRef, OnDestroy, OnInit, ViewChild } from '@angular/core'; -import { ActivatedRoute, Router } from '@angular/router'; +import { AfterViewInit, ElementRef, OnDestroy, OnInit, Renderer2, ViewChild } from '@angular/core'; +import { ActivatedRoute } from '@angular/router'; import { TabsComponent } from '@sbb-esta/angular-public/tabs'; import { Observable, Subject } from 'rxjs'; import { distinctUntilChanged, filter, first, map, skip, takeUntil } from 'rxjs/operators'; @@ -12,20 +12,20 @@ export class ComponentViewerBase implements OnInit, AfterViewInit, OnDestroy { @ViewChild(TabsComponent, { static: true }) tabs: TabsComponent; @ViewChild('overview', { static: true }) overview: ElementRef; @ViewChild('api', { static: true }) api: ElementRef; - example: Observable>; + example: Observable<{ [component: string]: ComponentPortal }>; private _destroyed = new Subject(); constructor( private _htmlLoader: HtmlLoader, private _exampleProvider: ExampleProvider, - private _route: ActivatedRoute + private _route: ActivatedRoute, + private _renderer: Renderer2 ) {} ngOnInit() { this.example = this._route.params.pipe( takeUntil(this._destroyed), - map(({ id }) => this._exampleProvider.resolveExample(id)), - map(e => (e ? new ComponentPortal(e) : null)) + map(({ id }) => this._exampleProvider.resolveExample(id)) ); } @@ -45,8 +45,16 @@ export class ComponentViewerBase implements OnInit, AfterViewInit, OnDestroy { skip(1) ) .subscribe(() => this.tabs.openTabByIndex(0)); - this._htmlLoader.loadDocumentation(this._route, this._destroyed, this.overview); - this._htmlLoader.loadApiDocumentation(this._route, this._destroyed, this.api); + this._htmlLoader + .with(this._route, this._renderer) + .until(this._destroyed) + .fromDocumentation() + .applyTo(this.overview); + this._htmlLoader + .with(this._route, this._renderer) + .until(this._destroyed) + .fromApiDocumentation() + .applyTo(this.api); } ngOnDestroy(): void { diff --git a/projects/angular-showcase/src/app/shared/example-provider.ts b/projects/angular-showcase/src/app/shared/example-provider.ts index ce078729f0..6005909162 100644 --- a/projects/angular-showcase/src/app/shared/example-provider.ts +++ b/projects/angular-showcase/src/app/shared/example-provider.ts @@ -1,5 +1,7 @@ -import { Type } from '@angular/core'; +import { ComponentPortal } from '@angular/cdk/portal'; export abstract class ExampleProvider { - abstract resolveExample(component: string): Type; + abstract resolveExample( + component: string + ): { [name: string]: ComponentPortal }; } diff --git a/projects/angular-showcase/src/app/shared/example-viewer/example-viewer.component.html b/projects/angular-showcase/src/app/shared/example-viewer/example-viewer.component.html index bf70a29df0..eed474bbe2 100644 --- a/projects/angular-showcase/src/app/shared/example-viewer/example-viewer.component.html +++ b/projects/angular-showcase/src/app/shared/example-viewer/example-viewer.component.html @@ -1,5 +1,5 @@
-

{{ title | async }}

+

{{ label }}