From 205f1362241edb1b72d2d8d402fa85ce19b45e73 Mon Sep 17 00:00:00 2001 From: Alexis Georges Date: Wed, 1 Sep 2021 01:48:36 +0200 Subject: [PATCH 1/2] feat(stark-ui): split stark-ui modules in different chunks to reduce bundle size of applications --- packages/stark-ui/public_api.ts | 33 ++++++++++++++++++- packages/stark-ui/src/common.ts | 3 +- packages/stark-ui/src/common/message.ts | 1 + .../message-collection.entity.intf.ts | 2 +- packages/stark-ui/src/common/ng-package.json | 11 +++++++ packages/stark-ui/src/common/public_api.ts | 4 +++ packages/stark-ui/src/common/store.ts | 1 + .../src/common/store/message-state.ts | 11 +++++++ .../store/stark-ui-application-state.ts | 2 +- packages/stark-ui/src/internal-common.ts | 1 + .../classes/abstract-component.ts | 0 .../src/internal-common/ng-package.json | 6 ++++ .../src/internal-common/public_api.ts | 2 ++ packages/stark-ui/src/modules.ts | 30 ----------------- packages/stark-ui/src/modules/action-bar.ts | 3 +- .../components/action-bar.component.ts | 2 +- .../src/modules/action-bar/ng-package.json | 10 ++++++ .../src/modules/action-bar/public_api.ts | 3 ++ packages/stark-ui/src/modules/app-data.ts | 3 +- .../src/modules/app-data/app-data.module.ts | 2 +- .../app-data/components/app-data.component.ts | 2 +- .../src/modules/app-data/ng-package.json | 10 ++++++ .../src/modules/app-data/public_api.ts | 3 ++ packages/stark-ui/src/modules/app-footer.ts | 3 +- .../modules/app-footer/app-footer.module.ts | 2 +- .../src/modules/app-footer/ng-package.json | 10 ++++++ .../src/modules/app-footer/public_api.ts | 3 ++ packages/stark-ui/src/modules/app-logo.ts | 3 +- .../app-logo/components/app-logo.component.ts | 2 +- .../src/modules/app-logo/ng-package.json | 9 +++++ .../src/modules/app-logo/public_api.ts | 3 ++ packages/stark-ui/src/modules/app-logout.ts | 3 +- .../modules/app-logout/app-logout.module.ts | 2 +- .../components/app-logout.component.ts | 2 +- .../src/modules/app-logout/ng-package.json | 10 ++++++ .../src/modules/app-logout/public_api.ts | 3 ++ packages/stark-ui/src/modules/app-menu.ts | 3 +- .../components/app-menu-item.component.ts | 2 +- .../app-menu/components/app-menu.component.ts | 2 +- .../src/modules/app-menu/ng-package.json | 11 +++++++ .../src/modules/app-menu/public_api.ts | 3 ++ packages/stark-ui/src/modules/app-sidebar.ts | 4 +-- .../components/app-sidebar.component.ts | 2 +- .../src/modules/app-sidebar/ng-package.json | 9 +++++ .../src/modules/app-sidebar/public_api.ts | 4 +++ packages/stark-ui/src/modules/breadcrumb.ts | 3 +- .../components/breadcrumb.component.ts | 2 +- .../src/modules/breadcrumb/ng-package.json | 10 ++++++ .../src/modules/breadcrumb/public_api.ts | 3 ++ packages/stark-ui/src/modules/collapsible.ts | 3 +- .../components/collapsible.component.ts | 2 +- .../src/modules/collapsible/ng-package.json | 10 ++++++ .../src/modules/collapsible/public_api.ts | 3 ++ packages/stark-ui/src/modules/date-picker.ts | 3 +- .../components/date-picker.component.spec.ts | 2 +- .../components/date-picker.component.ts | 4 +-- .../modules/date-picker/date-picker.module.ts | 2 +- .../src/modules/date-picker/ng-package.json | 12 +++++++ .../src/modules/date-picker/public_api.ts | 3 ++ .../stark-ui/src/modules/date-range-picker.ts | 3 +- .../date-range-picker.component.spec.ts | 4 +-- .../components/date-range-picker.component.ts | 11 +++++-- .../date-range-picker.module.ts | 4 +-- .../modules/date-range-picker/ng-package.json | 13 ++++++++ .../modules/date-range-picker/public_api.ts | 3 ++ .../stark-ui/src/modules/date-time-picker.ts | 3 +- .../date-time-picker.component.spec.ts | 9 +++-- .../components/date-time-picker.component.ts | 9 ++--- .../date-time-picker.module.ts | 6 ++-- .../modules/date-time-picker/ng-package.json | 12 +++++++ .../modules/date-time-picker/public_api.ts | 3 ++ packages/stark-ui/src/modules/dialogs.ts | 3 +- .../src/modules/dialogs/ng-package.json | 9 +++++ .../src/modules/dialogs/public_api.ts | 3 ++ packages/stark-ui/src/modules/dropdown.ts | 3 +- .../dropdown/components/dropdown.component.ts | 2 +- .../src/modules/dropdown/ng-package.json | 11 +++++++ .../src/modules/dropdown/public_api.ts | 3 ++ .../stark-ui/src/modules/generic-search.ts | 5 +-- .../classes/abstract-search-component.ts | 9 +++-- .../generic-search.component.spec.ts | 2 +- .../generic-search.component.ts | 4 +-- .../entities/form-action.intf.ts | 2 +- .../generic-search-action-bar-config.intf.ts | 6 +++- .../generic-search/generic-search.module.ts | 2 +- .../modules/generic-search/ng-package.json | 12 +++++++ .../src/modules/generic-search/public_api.ts | 5 +++ .../src/modules/input-mask-directives.ts | 3 +- .../input-mask-directives/ng-package.json | 11 +++++++ .../input-mask-directives/public_api.ts | 3 ++ .../stark-ui/src/modules/language-selector.ts | 3 +- .../language-selector.component.spec.ts | 2 +- .../components/language-selector.component.ts | 2 +- .../language-selector.module.ts | 2 +- .../modules/language-selector/ng-package.json | 13 ++++++++ .../modules/language-selector/public_api.ts | 3 ++ packages/stark-ui/src/modules/message-pane.ts | 9 +---- .../actions/message-pane.actions.ts | 2 +- .../components/message-pane.component.spec.ts | 5 ++- .../components/message-pane.component.ts | 5 ++- .../src/modules/message-pane/entities.ts | 1 - .../message-pane/message-pane.module.ts | 2 +- .../src/modules/message-pane/ng-package.json | 13 ++++++++ .../src/modules/message-pane/public_api.ts | 8 +++++ .../src/modules/message-pane/reducers.ts | 2 +- .../modules/message-pane/reducers/index.ts | 12 +------ .../reducers/messages-pane.reducer.spec.ts | 3 +- .../reducers/messages-pane.reducer.ts | 3 +- .../services/message-pane.service.intf.ts | 3 +- .../services/message-pane.service.spec.ts | 10 ++++-- .../services/message-pane.service.ts | 4 +-- packages/stark-ui/src/modules/minimap.ts | 3 +- .../minimap/components/minimap.component.ts | 2 +- .../src/modules/minimap/ng-package.json | 9 +++++ .../src/modules/minimap/public_api.ts | 3 ++ packages/stark-ui/src/modules/pagination.ts | 3 +- .../components/pagination.component.spec.ts | 4 +-- .../src/modules/pagination/ng-package.json | 10 ++++++ .../modules/pagination/pagination.module.ts | 4 +-- .../src/modules/pagination/public_api.ts | 3 ++ packages/stark-ui/src/modules/pretty-print.ts | 3 +- .../components/pretty-print.component.ts | 2 +- .../src/modules/pretty-print/ng-package.json | 11 +++++++ .../src/modules/pretty-print/public_api.ts | 3 ++ .../src/modules/progress-indicator.ts | 9 +---- .../progress-indicator.component.ts | 2 +- .../progress-indicator.directive.spec.ts | 2 +- .../progress-indicator/ng-package.json | 11 +++++++ .../modules/progress-indicator/public_api.ts | 9 +++++ .../progress-indicator.service.spec.ts | 2 +- .../services/progress-indicator.service.ts | 2 +- .../src/modules/restrict-input-directive.ts | 3 +- .../restrict-input-directive/ng-package.json | 9 +++++ .../restrict-input-directive/public_api.ts | 3 ++ packages/stark-ui/src/modules/route-search.ts | 3 +- .../components/route-search.component.spec.ts | 4 +-- .../components/route-search.component.ts | 4 +-- .../src/modules/route-search/ng-package.json | 11 +++++++ .../src/modules/route-search/public_api.ts | 3 ++ .../route-search/route-search.module.ts | 2 +- packages/stark-ui/src/modules/session-ui.ts | 6 +--- .../session-card.component.spec.ts | 2 +- .../src/modules/session-ui/ng-package.json | 12 +++++++ .../pages/login/login-page.component.spec.ts | 2 +- .../preloading-page.component.spec.ts | 2 +- .../session-expired-page.component.spec.ts | 2 +- .../session-logout-page.component.spec.ts | 2 +- .../src/modules/session-ui/public_api.ts | 6 ++++ .../modules/session-ui/session-ui.module.ts | 4 +-- packages/stark-ui/src/modules/slider.ts | 3 +- .../slider/components/slider.component.ts | 4 +-- .../src/modules/slider/ng-package.json | 11 +++++++ .../stark-ui/src/modules/slider/public_api.ts | 3 ++ packages/stark-ui/src/modules/svg-view-box.ts | 3 +- .../src/modules/svg-view-box/ng-package.json | 9 +++++ .../src/modules/svg-view-box/package.json | 10 ++++++ .../src/modules/svg-view-box/public_api.ts | 3 ++ packages/stark-ui/src/modules/table.ts | 5 +-- .../table/components/column.component.ts | 2 +- .../components/dialogs/multisort.component.ts | 2 +- .../table/components/table.component.spec.ts | 6 ++-- .../table/components/table.component.ts | 8 ++--- .../table/entities/table-row-actions.intf.ts | 2 +- .../src/modules/table/ng-package.json | 14 ++++++++ .../stark-ui/src/modules/table/public_api.ts | 5 +++ .../src/modules/table/table.module.ts | 8 ++--- .../src/modules/toast-notification.ts | 4 +-- .../components/toast-message.intf.ts | 2 +- .../toast-notification.component.spec.ts | 2 +- .../toast-notification.component.ts | 4 +-- .../toast-notification/ng-package.json | 10 ++++++ .../modules/toast-notification/public_api.ts | 4 +++ .../toast-notification.service.spec.ts | 2 +- .../src/modules/transform-input-directive.ts | 3 +- .../transform-input-directive/ng-package.json | 6 ++++ .../transform-input-directive/public_api.ts | 3 ++ packages/stark-ui/src/stark-ui.ts | 4 --- packages/stark-ui/src/util.ts | 3 +- packages/stark-ui/src/util/ng-package.json | 6 ++++ packages/stark-ui/src/util/public_api.ts | 3 ++ packages/stark-ui/tsconfig.json | 4 ++- 181 files changed, 678 insertions(+), 244 deletions(-) rename packages/stark-ui/src/{modules/message-pane/entities => common/message}/message-collection.entity.intf.ts (86%) create mode 100644 packages/stark-ui/src/common/ng-package.json create mode 100644 packages/stark-ui/src/common/public_api.ts create mode 100644 packages/stark-ui/src/common/store/message-state.ts create mode 100644 packages/stark-ui/src/internal-common.ts rename packages/stark-ui/src/{common => internal-common}/classes/abstract-component.ts (100%) create mode 100644 packages/stark-ui/src/internal-common/ng-package.json create mode 100644 packages/stark-ui/src/internal-common/public_api.ts delete mode 100644 packages/stark-ui/src/modules.ts create mode 100644 packages/stark-ui/src/modules/action-bar/ng-package.json create mode 100644 packages/stark-ui/src/modules/action-bar/public_api.ts create mode 100644 packages/stark-ui/src/modules/app-data/ng-package.json create mode 100644 packages/stark-ui/src/modules/app-data/public_api.ts create mode 100644 packages/stark-ui/src/modules/app-footer/ng-package.json create mode 100644 packages/stark-ui/src/modules/app-footer/public_api.ts create mode 100644 packages/stark-ui/src/modules/app-logo/ng-package.json create mode 100644 packages/stark-ui/src/modules/app-logo/public_api.ts create mode 100644 packages/stark-ui/src/modules/app-logout/ng-package.json create mode 100644 packages/stark-ui/src/modules/app-logout/public_api.ts create mode 100644 packages/stark-ui/src/modules/app-menu/ng-package.json create mode 100644 packages/stark-ui/src/modules/app-menu/public_api.ts create mode 100644 packages/stark-ui/src/modules/app-sidebar/ng-package.json create mode 100644 packages/stark-ui/src/modules/app-sidebar/public_api.ts create mode 100644 packages/stark-ui/src/modules/breadcrumb/ng-package.json create mode 100644 packages/stark-ui/src/modules/breadcrumb/public_api.ts create mode 100644 packages/stark-ui/src/modules/collapsible/ng-package.json create mode 100644 packages/stark-ui/src/modules/collapsible/public_api.ts create mode 100644 packages/stark-ui/src/modules/date-picker/ng-package.json create mode 100644 packages/stark-ui/src/modules/date-picker/public_api.ts create mode 100644 packages/stark-ui/src/modules/date-range-picker/ng-package.json create mode 100644 packages/stark-ui/src/modules/date-range-picker/public_api.ts create mode 100644 packages/stark-ui/src/modules/date-time-picker/ng-package.json create mode 100644 packages/stark-ui/src/modules/date-time-picker/public_api.ts create mode 100644 packages/stark-ui/src/modules/dialogs/ng-package.json create mode 100644 packages/stark-ui/src/modules/dialogs/public_api.ts create mode 100644 packages/stark-ui/src/modules/dropdown/ng-package.json create mode 100644 packages/stark-ui/src/modules/dropdown/public_api.ts create mode 100644 packages/stark-ui/src/modules/generic-search/ng-package.json create mode 100644 packages/stark-ui/src/modules/generic-search/public_api.ts create mode 100644 packages/stark-ui/src/modules/input-mask-directives/ng-package.json create mode 100644 packages/stark-ui/src/modules/input-mask-directives/public_api.ts create mode 100644 packages/stark-ui/src/modules/language-selector/ng-package.json create mode 100644 packages/stark-ui/src/modules/language-selector/public_api.ts delete mode 100644 packages/stark-ui/src/modules/message-pane/entities.ts create mode 100644 packages/stark-ui/src/modules/message-pane/ng-package.json create mode 100644 packages/stark-ui/src/modules/message-pane/public_api.ts create mode 100644 packages/stark-ui/src/modules/minimap/ng-package.json create mode 100644 packages/stark-ui/src/modules/minimap/public_api.ts create mode 100644 packages/stark-ui/src/modules/pagination/ng-package.json create mode 100644 packages/stark-ui/src/modules/pagination/public_api.ts create mode 100644 packages/stark-ui/src/modules/pretty-print/ng-package.json create mode 100644 packages/stark-ui/src/modules/pretty-print/public_api.ts create mode 100644 packages/stark-ui/src/modules/progress-indicator/ng-package.json create mode 100644 packages/stark-ui/src/modules/progress-indicator/public_api.ts create mode 100644 packages/stark-ui/src/modules/restrict-input-directive/ng-package.json create mode 100644 packages/stark-ui/src/modules/restrict-input-directive/public_api.ts create mode 100644 packages/stark-ui/src/modules/route-search/ng-package.json create mode 100644 packages/stark-ui/src/modules/route-search/public_api.ts create mode 100644 packages/stark-ui/src/modules/session-ui/ng-package.json create mode 100644 packages/stark-ui/src/modules/session-ui/public_api.ts create mode 100644 packages/stark-ui/src/modules/slider/ng-package.json create mode 100644 packages/stark-ui/src/modules/slider/public_api.ts create mode 100644 packages/stark-ui/src/modules/svg-view-box/ng-package.json create mode 100644 packages/stark-ui/src/modules/svg-view-box/package.json create mode 100644 packages/stark-ui/src/modules/svg-view-box/public_api.ts create mode 100644 packages/stark-ui/src/modules/table/ng-package.json create mode 100644 packages/stark-ui/src/modules/table/public_api.ts create mode 100644 packages/stark-ui/src/modules/toast-notification/ng-package.json create mode 100644 packages/stark-ui/src/modules/toast-notification/public_api.ts create mode 100644 packages/stark-ui/src/modules/transform-input-directive/ng-package.json create mode 100644 packages/stark-ui/src/modules/transform-input-directive/public_api.ts delete mode 100644 packages/stark-ui/src/stark-ui.ts create mode 100644 packages/stark-ui/src/util/ng-package.json create mode 100644 packages/stark-ui/src/util/public_api.ts diff --git a/packages/stark-ui/public_api.ts b/packages/stark-ui/public_api.ts index 7544f8fde9..015095e9d0 100644 --- a/packages/stark-ui/public_api.ts +++ b/packages/stark-ui/public_api.ts @@ -2,6 +2,37 @@ /** * Entry point for all public APIs of this package. */ -export * from "./src/stark-ui"; +export * from "@nationalbankbelgium/stark-ui/src/common"; +export * from "@nationalbankbelgium/stark-ui/src/modules/action-bar"; +export * from "@nationalbankbelgium/stark-ui/src/modules/app-data"; +export * from "@nationalbankbelgium/stark-ui/src/modules/app-footer"; +export * from "@nationalbankbelgium/stark-ui/src/modules/app-logo"; +export * from "@nationalbankbelgium/stark-ui/src/modules/app-logout"; +export * from "@nationalbankbelgium/stark-ui/src/modules/app-menu"; +export * from "@nationalbankbelgium/stark-ui/src/modules/app-sidebar"; +export * from "@nationalbankbelgium/stark-ui/src/modules/breadcrumb"; +export * from "@nationalbankbelgium/stark-ui/src/modules/collapsible"; +export * from "@nationalbankbelgium/stark-ui/src/modules/date-picker"; +export * from "@nationalbankbelgium/stark-ui/src/modules/date-range-picker"; +export * from "@nationalbankbelgium/stark-ui/src/modules/date-time-picker"; +export * from "@nationalbankbelgium/stark-ui/src/modules/dialogs"; +export * from "@nationalbankbelgium/stark-ui/src/modules/dropdown"; +export * from "@nationalbankbelgium/stark-ui/src/modules/generic-search"; +export * from "@nationalbankbelgium/stark-ui/src/modules/input-mask-directives"; +export * from "@nationalbankbelgium/stark-ui/src/modules/language-selector"; +export * from "@nationalbankbelgium/stark-ui/src/modules/message-pane"; +export * from "@nationalbankbelgium/stark-ui/src/modules/minimap"; +export * from "@nationalbankbelgium/stark-ui/src/modules/pagination"; +export * from "@nationalbankbelgium/stark-ui/src/modules/pretty-print"; +export * from "@nationalbankbelgium/stark-ui/src/modules/progress-indicator"; +export * from "@nationalbankbelgium/stark-ui/src/modules/restrict-input-directive"; +export * from "@nationalbankbelgium/stark-ui/src/modules/route-search"; +export * from "@nationalbankbelgium/stark-ui/src/modules/session-ui"; +export * from "@nationalbankbelgium/stark-ui/src/modules/slider"; +export * from "@nationalbankbelgium/stark-ui/src/modules/svg-view-box"; +export * from "@nationalbankbelgium/stark-ui/src/modules/table"; +export * from "@nationalbankbelgium/stark-ui/src/modules/toast-notification"; +export * from "@nationalbankbelgium/stark-ui/src/modules/transform-input-directive"; +export * from "@nationalbankbelgium/stark-ui/src/util"; // This file only reexports content of the `src` folder. Keep it that way. diff --git a/packages/stark-ui/src/common.ts b/packages/stark-ui/src/common.ts index 3ddaeff112..43ebe4b169 100644 --- a/packages/stark-ui/src/common.ts +++ b/packages/stark-ui/src/common.ts @@ -1,2 +1 @@ -export * from "./common/store"; -export * from "./common/message"; +export * from "./common/public_api"; diff --git a/packages/stark-ui/src/common/message.ts b/packages/stark-ui/src/common/message.ts index 02f43965c4..aec7aa2640 100644 --- a/packages/stark-ui/src/common/message.ts +++ b/packages/stark-ui/src/common/message.ts @@ -1,3 +1,4 @@ export * from "./message/message.entity"; export * from "./message/message.intf"; +export * from "./message/message-collection.entity.intf"; export * from "./message/message-type.intf"; diff --git a/packages/stark-ui/src/modules/message-pane/entities/message-collection.entity.intf.ts b/packages/stark-ui/src/common/message/message-collection.entity.intf.ts similarity index 86% rename from packages/stark-ui/src/modules/message-pane/entities/message-collection.entity.intf.ts rename to packages/stark-ui/src/common/message/message-collection.entity.intf.ts index 5b19c6444a..e7227fa103 100644 --- a/packages/stark-ui/src/modules/message-pane/entities/message-collection.entity.intf.ts +++ b/packages/stark-ui/src/common/message/message-collection.entity.intf.ts @@ -1,4 +1,4 @@ -import { StarkMessage } from "../../../common/message"; +import { StarkMessage } from "./message.intf"; /** * A collection of messages to be displayed in the {@link StarkMessagePaneComponent} diff --git a/packages/stark-ui/src/common/ng-package.json b/packages/stark-ui/src/common/ng-package.json new file mode 100644 index 0000000000..256ed488c6 --- /dev/null +++ b/packages/stark-ui/src/common/ng-package.json @@ -0,0 +1,11 @@ +{ + "$schema": "../../../../node_modules/ng-packagr/ng-package.schema.json", + "lib": { + "entryFile": "public_api.ts", + "umdModuleIds": { + "@nationalbankbelgium/stark-core": "stark.core", + "lodash-es/merge": "lodash-es.merge", + "lodash-es/uniqueId": "lodash-es.uniqueId" + } + } +} diff --git a/packages/stark-ui/src/common/public_api.ts b/packages/stark-ui/src/common/public_api.ts new file mode 100644 index 0000000000..9d7826f13f --- /dev/null +++ b/packages/stark-ui/src/common/public_api.ts @@ -0,0 +1,4 @@ +/* eslint-disable unicorn/filename-case */ +export * from "./message"; +export * from "./store"; +export * from "./translations"; diff --git a/packages/stark-ui/src/common/store.ts b/packages/stark-ui/src/common/store.ts index 197ec0c474..6b05e5fec8 100644 --- a/packages/stark-ui/src/common/store.ts +++ b/packages/stark-ui/src/common/store.ts @@ -1 +1,2 @@ +export * from "./store/message-state"; export * from "./store/stark-ui-application-state"; diff --git a/packages/stark-ui/src/common/store/message-state.ts b/packages/stark-ui/src/common/store/message-state.ts new file mode 100644 index 0000000000..4bc645198f --- /dev/null +++ b/packages/stark-ui/src/common/store/message-state.ts @@ -0,0 +1,11 @@ +import { StarkMessageCollection } from "../message"; + +/** + * Defines the part of the state assigned to the {@link StarkMessagePaneModule} + */ +export interface StarkMessageState { + /** + * State corresponding to the {@link StarkMessagePaneModule} + */ + messages: StarkMessageCollection; +} diff --git a/packages/stark-ui/src/common/store/stark-ui-application-state.ts b/packages/stark-ui/src/common/store/stark-ui-application-state.ts index 045f55cd21..4a652bd9db 100644 --- a/packages/stark-ui/src/common/store/stark-ui-application-state.ts +++ b/packages/stark-ui/src/common/store/stark-ui-application-state.ts @@ -1,4 +1,4 @@ -import { StarkMessageState } from "../../modules/message-pane/reducers"; +import { StarkMessageState } from "./message-state"; /** * Interface defining the shape of the application state of Stark Ui extending Core (i.e., what's stored in Redux by Stark) diff --git a/packages/stark-ui/src/internal-common.ts b/packages/stark-ui/src/internal-common.ts new file mode 100644 index 0000000000..e5aee76f77 --- /dev/null +++ b/packages/stark-ui/src/internal-common.ts @@ -0,0 +1 @@ +export * from "./internal-common/public_api"; diff --git a/packages/stark-ui/src/common/classes/abstract-component.ts b/packages/stark-ui/src/internal-common/classes/abstract-component.ts similarity index 100% rename from packages/stark-ui/src/common/classes/abstract-component.ts rename to packages/stark-ui/src/internal-common/classes/abstract-component.ts diff --git a/packages/stark-ui/src/internal-common/ng-package.json b/packages/stark-ui/src/internal-common/ng-package.json new file mode 100644 index 0000000000..4878aeacd3 --- /dev/null +++ b/packages/stark-ui/src/internal-common/ng-package.json @@ -0,0 +1,6 @@ +{ + "$schema": "../../../../node_modules/ng-packagr/ng-package.schema.json", + "lib": { + "entryFile": "public_api.ts" + } +} diff --git a/packages/stark-ui/src/internal-common/public_api.ts b/packages/stark-ui/src/internal-common/public_api.ts new file mode 100644 index 0000000000..29fdd4b37c --- /dev/null +++ b/packages/stark-ui/src/internal-common/public_api.ts @@ -0,0 +1,2 @@ +/* eslint-disable unicorn/filename-case */ +export * from "./classes/abstract-component"; diff --git a/packages/stark-ui/src/modules.ts b/packages/stark-ui/src/modules.ts deleted file mode 100644 index 8e4a1f2dd4..0000000000 --- a/packages/stark-ui/src/modules.ts +++ /dev/null @@ -1,30 +0,0 @@ -export * from "./modules/action-bar"; -export * from "./modules/app-data"; -export * from "./modules/app-footer"; -export * from "./modules/app-logo"; -export * from "./modules/app-menu"; -export * from "./modules/app-logout"; -export * from "./modules/app-sidebar"; -export * from "./modules/breadcrumb"; -export * from "./modules/collapsible"; -export * from "./modules/date-picker"; -export * from "./modules/date-range-picker"; -export * from "./modules/date-time-picker"; -export * from "./modules/dialogs"; -export * from "./modules/dropdown"; -export * from "./modules/generic-search"; -export * from "./modules/input-mask-directives"; -export * from "./modules/restrict-input-directive"; -export * from "./modules/language-selector"; -export * from "./modules/message-pane"; -export * from "./modules/minimap"; -export * from "./modules/pagination"; -export * from "./modules/pretty-print"; -export * from "./modules/progress-indicator"; -export * from "./modules/route-search"; -export * from "./modules/session-ui"; -export * from "./modules/slider"; -export * from "./modules/svg-view-box"; -export * from "./modules/table"; -export * from "./modules/toast-notification"; -export * from "./modules/transform-input-directive"; diff --git a/packages/stark-ui/src/modules/action-bar.ts b/packages/stark-ui/src/modules/action-bar.ts index 01c7f68707..47b49a8019 100644 --- a/packages/stark-ui/src/modules/action-bar.ts +++ b/packages/stark-ui/src/modules/action-bar.ts @@ -1,2 +1 @@ -export * from "./action-bar/action-bar.module"; -export * from "./action-bar/components"; +export * from "./action-bar/public_api"; diff --git a/packages/stark-ui/src/modules/action-bar/components/action-bar.component.ts b/packages/stark-ui/src/modules/action-bar/components/action-bar.component.ts index 9e3dcae487..c347674c8f 100644 --- a/packages/stark-ui/src/modules/action-bar/components/action-bar.component.ts +++ b/packages/stark-ui/src/modules/action-bar/components/action-bar.component.ts @@ -2,7 +2,7 @@ import { ChangeDetectionStrategy, Component, ElementRef, Inject, Input, OnInit, import { StarkActionBarConfig } from "./action-bar-config.intf"; import { StarkAction, StarkActionBarButtonColor } from "./action.intf"; import { STARK_LOGGING_SERVICE, StarkLoggingService } from "@nationalbankbelgium/stark-core"; -import { AbstractStarkUiComponent } from "../../../common/classes/abstract-component"; +import { AbstractStarkUiComponent } from "@nationalbankbelgium/stark-ui/src/internal-common"; export type StarkActionBarComponentMode = "full" | "compact"; diff --git a/packages/stark-ui/src/modules/action-bar/ng-package.json b/packages/stark-ui/src/modules/action-bar/ng-package.json new file mode 100644 index 0000000000..5e184c7ada --- /dev/null +++ b/packages/stark-ui/src/modules/action-bar/ng-package.json @@ -0,0 +1,10 @@ +{ + "$schema": "../../../../../node_modules/ng-packagr/ng-package.schema.json", + "lib": { + "entryFile": "public_api.ts", + "umdModuleIds": { + "@nationalbankbelgium/stark-core": "stark.core", + "@ngx-translate/core": "ngxTranslate.core" + } + } +} diff --git a/packages/stark-ui/src/modules/action-bar/public_api.ts b/packages/stark-ui/src/modules/action-bar/public_api.ts new file mode 100644 index 0000000000..06818946f4 --- /dev/null +++ b/packages/stark-ui/src/modules/action-bar/public_api.ts @@ -0,0 +1,3 @@ +/* eslint-disable unicorn/filename-case */ +export * from "./action-bar.module"; +export * from "./components"; diff --git a/packages/stark-ui/src/modules/app-data.ts b/packages/stark-ui/src/modules/app-data.ts index a6ef7ab9ff..58e2a020d2 100644 --- a/packages/stark-ui/src/modules/app-data.ts +++ b/packages/stark-ui/src/modules/app-data.ts @@ -1,2 +1 @@ -export * from "./app-data/app-data.module"; -export * from "./app-data/components"; +export * from "./app-data/public_api"; diff --git a/packages/stark-ui/src/modules/app-data/app-data.module.ts b/packages/stark-ui/src/modules/app-data/app-data.module.ts index 0e5539ecdc..c443fb9dfa 100644 --- a/packages/stark-ui/src/modules/app-data/app-data.module.ts +++ b/packages/stark-ui/src/modules/app-data/app-data.module.ts @@ -7,7 +7,7 @@ import { MatTooltipModule } from "@angular/material/tooltip"; import { StarkAppDataComponent } from "./components"; import { TranslateModule, TranslateService } from "@ngx-translate/core"; import { translationsFr } from "./assets/translations/fr"; -import { mergeUiTranslations } from "../../common/translations"; +import { mergeUiTranslations } from "@nationalbankbelgium/stark-ui/src/common"; import { translationsEn } from "./assets/translations/en"; import { translationsNl } from "./assets/translations/nl"; import { StarkLocale } from "@nationalbankbelgium/stark-core"; diff --git a/packages/stark-ui/src/modules/app-data/components/app-data.component.ts b/packages/stark-ui/src/modules/app-data/components/app-data.component.ts index ce8310dd75..07dadff68b 100644 --- a/packages/stark-ui/src/modules/app-data/components/app-data.component.ts +++ b/packages/stark-ui/src/modules/app-data/components/app-data.component.ts @@ -1,6 +1,6 @@ import { ChangeDetectionStrategy, Component, ElementRef, Inject, Input, OnInit, Renderer2, ViewEncapsulation } from "@angular/core"; import { STARK_LOGGING_SERVICE, StarkLoggingService } from "@nationalbankbelgium/stark-core"; -import { AbstractStarkUiComponent } from "../../../common/classes/abstract-component"; +import { AbstractStarkUiComponent } from "@nationalbankbelgium/stark-ui/src/internal-common"; /** * @ignore diff --git a/packages/stark-ui/src/modules/app-data/ng-package.json b/packages/stark-ui/src/modules/app-data/ng-package.json new file mode 100644 index 0000000000..5e184c7ada --- /dev/null +++ b/packages/stark-ui/src/modules/app-data/ng-package.json @@ -0,0 +1,10 @@ +{ + "$schema": "../../../../../node_modules/ng-packagr/ng-package.schema.json", + "lib": { + "entryFile": "public_api.ts", + "umdModuleIds": { + "@nationalbankbelgium/stark-core": "stark.core", + "@ngx-translate/core": "ngxTranslate.core" + } + } +} diff --git a/packages/stark-ui/src/modules/app-data/public_api.ts b/packages/stark-ui/src/modules/app-data/public_api.ts new file mode 100644 index 0000000000..a589ebd824 --- /dev/null +++ b/packages/stark-ui/src/modules/app-data/public_api.ts @@ -0,0 +1,3 @@ +/* eslint-disable unicorn/filename-case */ +export * from "./app-data.module"; +export * from "./components"; diff --git a/packages/stark-ui/src/modules/app-footer.ts b/packages/stark-ui/src/modules/app-footer.ts index a9cc188684..733b681e99 100644 --- a/packages/stark-ui/src/modules/app-footer.ts +++ b/packages/stark-ui/src/modules/app-footer.ts @@ -1,2 +1 @@ -export * from "./app-footer/app-footer.module"; -export * from "./app-footer/components"; +export * from "./app-footer/public_api"; diff --git a/packages/stark-ui/src/modules/app-footer/app-footer.module.ts b/packages/stark-ui/src/modules/app-footer/app-footer.module.ts index ae61577c48..21be7c7a13 100644 --- a/packages/stark-ui/src/modules/app-footer/app-footer.module.ts +++ b/packages/stark-ui/src/modules/app-footer/app-footer.module.ts @@ -6,7 +6,7 @@ import { StarkAppFooterComponent } from "./components"; import { translationsEn } from "./assets/translations/en"; import { translationsFr } from "./assets/translations/fr"; import { translationsNl } from "./assets/translations/nl"; -import { mergeUiTranslations } from "../../common/translations"; +import { mergeUiTranslations } from "@nationalbankbelgium/stark-ui/src/common"; @NgModule({ declarations: [StarkAppFooterComponent], diff --git a/packages/stark-ui/src/modules/app-footer/ng-package.json b/packages/stark-ui/src/modules/app-footer/ng-package.json new file mode 100644 index 0000000000..5e184c7ada --- /dev/null +++ b/packages/stark-ui/src/modules/app-footer/ng-package.json @@ -0,0 +1,10 @@ +{ + "$schema": "../../../../../node_modules/ng-packagr/ng-package.schema.json", + "lib": { + "entryFile": "public_api.ts", + "umdModuleIds": { + "@nationalbankbelgium/stark-core": "stark.core", + "@ngx-translate/core": "ngxTranslate.core" + } + } +} diff --git a/packages/stark-ui/src/modules/app-footer/public_api.ts b/packages/stark-ui/src/modules/app-footer/public_api.ts new file mode 100644 index 0000000000..6ac6d0e4af --- /dev/null +++ b/packages/stark-ui/src/modules/app-footer/public_api.ts @@ -0,0 +1,3 @@ +/* eslint-disable unicorn/filename-case */ +export * from "./app-footer.module"; +export * from "./components"; diff --git a/packages/stark-ui/src/modules/app-logo.ts b/packages/stark-ui/src/modules/app-logo.ts index 5909390065..48f0f14ede 100644 --- a/packages/stark-ui/src/modules/app-logo.ts +++ b/packages/stark-ui/src/modules/app-logo.ts @@ -1,2 +1 @@ -export * from "./app-logo/app-logo.module"; -export * from "./app-logo/components"; +export * from "./app-logo/public_api"; diff --git a/packages/stark-ui/src/modules/app-logo/components/app-logo.component.ts b/packages/stark-ui/src/modules/app-logo/components/app-logo.component.ts index e0f5c24eb3..cfb406fc0d 100644 --- a/packages/stark-ui/src/modules/app-logo/components/app-logo.component.ts +++ b/packages/stark-ui/src/modules/app-logo/components/app-logo.component.ts @@ -1,6 +1,6 @@ import { ChangeDetectionStrategy, Component, ElementRef, Inject, Input, OnInit, Renderer2, ViewEncapsulation } from "@angular/core"; import { STARK_LOGGING_SERVICE, STARK_ROUTING_SERVICE, StarkLoggingService, StarkRoutingService } from "@nationalbankbelgium/stark-core"; -import { AbstractStarkUiComponent } from "../../../common/classes/abstract-component"; +import { AbstractStarkUiComponent } from "@nationalbankbelgium/stark-ui/src/internal-common"; /** * @ignore diff --git a/packages/stark-ui/src/modules/app-logo/ng-package.json b/packages/stark-ui/src/modules/app-logo/ng-package.json new file mode 100644 index 0000000000..14692aa37a --- /dev/null +++ b/packages/stark-ui/src/modules/app-logo/ng-package.json @@ -0,0 +1,9 @@ +{ + "$schema": "../../../../../node_modules/ng-packagr/ng-package.schema.json", + "lib": { + "entryFile": "public_api.ts", + "umdModuleIds": { + "@nationalbankbelgium/stark-core": "stark.core" + } + } +} diff --git a/packages/stark-ui/src/modules/app-logo/public_api.ts b/packages/stark-ui/src/modules/app-logo/public_api.ts new file mode 100644 index 0000000000..118aa1d338 --- /dev/null +++ b/packages/stark-ui/src/modules/app-logo/public_api.ts @@ -0,0 +1,3 @@ +/* eslint-disable unicorn/filename-case */ +export * from "./app-logo.module"; +export * from "./components"; diff --git a/packages/stark-ui/src/modules/app-logout.ts b/packages/stark-ui/src/modules/app-logout.ts index 5bcea53454..d7e6a8118d 100644 --- a/packages/stark-ui/src/modules/app-logout.ts +++ b/packages/stark-ui/src/modules/app-logout.ts @@ -1,2 +1 @@ -export * from "./app-logout/app-logout.module"; -export * from "./app-logout/components"; +export * from "./app-logout/public_api"; diff --git a/packages/stark-ui/src/modules/app-logout/app-logout.module.ts b/packages/stark-ui/src/modules/app-logout/app-logout.module.ts index 21d3ce5303..8291022f6a 100644 --- a/packages/stark-ui/src/modules/app-logout/app-logout.module.ts +++ b/packages/stark-ui/src/modules/app-logout/app-logout.module.ts @@ -8,7 +8,7 @@ import { StarkAppLogoutComponent } from "./components"; import { translationsEn } from "./assets/translations/en"; import { translationsFr } from "./assets/translations/fr"; import { translationsNl } from "./assets/translations/nl"; -import { mergeUiTranslations } from "../../common/translations"; +import { mergeUiTranslations } from "@nationalbankbelgium/stark-ui/src/common"; @NgModule({ declarations: [StarkAppLogoutComponent], diff --git a/packages/stark-ui/src/modules/app-logout/components/app-logout.component.ts b/packages/stark-ui/src/modules/app-logout/components/app-logout.component.ts index f31cf0623d..1826e61ff4 100644 --- a/packages/stark-ui/src/modules/app-logout/components/app-logout.component.ts +++ b/packages/stark-ui/src/modules/app-logout/components/app-logout.component.ts @@ -21,7 +21,7 @@ import { starkSessionLogoutStateName, StarkSessionService } from "@nationalbankbelgium/stark-core"; -import { AbstractStarkUiComponent } from "../../../common/classes/abstract-component"; +import { AbstractStarkUiComponent } from "@nationalbankbelgium/stark-ui/src/internal-common"; /** * @ignore diff --git a/packages/stark-ui/src/modules/app-logout/ng-package.json b/packages/stark-ui/src/modules/app-logout/ng-package.json new file mode 100644 index 0000000000..5e184c7ada --- /dev/null +++ b/packages/stark-ui/src/modules/app-logout/ng-package.json @@ -0,0 +1,10 @@ +{ + "$schema": "../../../../../node_modules/ng-packagr/ng-package.schema.json", + "lib": { + "entryFile": "public_api.ts", + "umdModuleIds": { + "@nationalbankbelgium/stark-core": "stark.core", + "@ngx-translate/core": "ngxTranslate.core" + } + } +} diff --git a/packages/stark-ui/src/modules/app-logout/public_api.ts b/packages/stark-ui/src/modules/app-logout/public_api.ts new file mode 100644 index 0000000000..9b113e94f9 --- /dev/null +++ b/packages/stark-ui/src/modules/app-logout/public_api.ts @@ -0,0 +1,3 @@ +/* eslint-disable unicorn/filename-case */ +export * from "./app-logout.module"; +export * from "./components"; diff --git a/packages/stark-ui/src/modules/app-menu.ts b/packages/stark-ui/src/modules/app-menu.ts index 21d32d2425..640cfcb0f9 100644 --- a/packages/stark-ui/src/modules/app-menu.ts +++ b/packages/stark-ui/src/modules/app-menu.ts @@ -1,2 +1 @@ -export * from "./app-menu/app-menu.module"; -export * from "./app-menu/components"; +export * from "./app-menu/public_api"; diff --git a/packages/stark-ui/src/modules/app-menu/components/app-menu-item.component.ts b/packages/stark-ui/src/modules/app-menu/components/app-menu-item.component.ts index d53fbcac32..edf93fe408 100644 --- a/packages/stark-ui/src/modules/app-menu/components/app-menu-item.component.ts +++ b/packages/stark-ui/src/modules/app-menu/components/app-menu-item.component.ts @@ -22,7 +22,7 @@ import { StarkRoutingService, StarkRoutingTransitionHook } from "@nationalbankbelgium/stark-core"; -import { AbstractStarkUiComponent } from "../../../common/classes/abstract-component"; +import { AbstractStarkUiComponent } from "@nationalbankbelgium/stark-ui/src/internal-common"; import { StarkMenuGroup } from "./app-menu-group.intf"; /** diff --git a/packages/stark-ui/src/modules/app-menu/components/app-menu.component.ts b/packages/stark-ui/src/modules/app-menu/components/app-menu.component.ts index 9e1f1e35ad..bb53a9f50e 100644 --- a/packages/stark-ui/src/modules/app-menu/components/app-menu.component.ts +++ b/packages/stark-ui/src/modules/app-menu/components/app-menu.component.ts @@ -1,6 +1,6 @@ import { ChangeDetectionStrategy, Component, ElementRef, Inject, Input, OnInit, Renderer2, ViewEncapsulation } from "@angular/core"; import { STARK_LOGGING_SERVICE, STARK_ROUTING_SERVICE, StarkLoggingService, StarkRoutingService } from "@nationalbankbelgium/stark-core"; -import { AbstractStarkUiComponent } from "../../../common/classes/abstract-component"; +import { AbstractStarkUiComponent } from "@nationalbankbelgium/stark-ui/src/internal-common"; import { StarkMenuSection } from "./app-menu-section.intf"; import { StarkMenuConfig } from "./app-menu-config.intf"; import { StarkMenuGroup } from "./app-menu-group.intf"; diff --git a/packages/stark-ui/src/modules/app-menu/ng-package.json b/packages/stark-ui/src/modules/app-menu/ng-package.json new file mode 100644 index 0000000000..2249a9225b --- /dev/null +++ b/packages/stark-ui/src/modules/app-menu/ng-package.json @@ -0,0 +1,11 @@ +{ + "$schema": "../../../../../node_modules/ng-packagr/ng-package.schema.json", + "lib": { + "entryFile": "public_api.ts", + "umdModuleIds": { + "@nationalbankbelgium/stark-core": "stark.core", + "@ngx-translate/core": "ngxTranslate.core", + "@uirouter/angular": "uirouter.angular" + } + } +} diff --git a/packages/stark-ui/src/modules/app-menu/public_api.ts b/packages/stark-ui/src/modules/app-menu/public_api.ts new file mode 100644 index 0000000000..c585cd224c --- /dev/null +++ b/packages/stark-ui/src/modules/app-menu/public_api.ts @@ -0,0 +1,3 @@ +/* eslint-disable unicorn/filename-case */ +export * from "./app-menu.module"; +export * from "./components"; diff --git a/packages/stark-ui/src/modules/app-sidebar.ts b/packages/stark-ui/src/modules/app-sidebar.ts index 186230fa7a..9400b01ec6 100644 --- a/packages/stark-ui/src/modules/app-sidebar.ts +++ b/packages/stark-ui/src/modules/app-sidebar.ts @@ -1,3 +1 @@ -export * from "./app-sidebar/app-sidebar.module"; -export * from "./app-sidebar/components"; -export * from "./app-sidebar/services"; +export * from "./app-sidebar/public_api"; diff --git a/packages/stark-ui/src/modules/app-sidebar/components/app-sidebar.component.ts b/packages/stark-ui/src/modules/app-sidebar/components/app-sidebar.component.ts index 5473590d1f..c77e84f657 100644 --- a/packages/stark-ui/src/modules/app-sidebar/components/app-sidebar.component.ts +++ b/packages/stark-ui/src/modules/app-sidebar/components/app-sidebar.component.ts @@ -10,7 +10,7 @@ import { StarkRoutingTransitionHook } from "@nationalbankbelgium/stark-core"; import { STARK_APP_SIDEBAR_SERVICE, StarkAppSidebarOpenEvent, StarkAppSidebarService } from "../services"; -import { AbstractStarkUiComponent } from "../../../common/classes/abstract-component"; +import { AbstractStarkUiComponent } from "@nationalbankbelgium/stark-ui/src/internal-common"; export type StarkAppSidebarLeftMode = "regular" | "menu" | undefined; diff --git a/packages/stark-ui/src/modules/app-sidebar/ng-package.json b/packages/stark-ui/src/modules/app-sidebar/ng-package.json new file mode 100644 index 0000000000..14692aa37a --- /dev/null +++ b/packages/stark-ui/src/modules/app-sidebar/ng-package.json @@ -0,0 +1,9 @@ +{ + "$schema": "../../../../../node_modules/ng-packagr/ng-package.schema.json", + "lib": { + "entryFile": "public_api.ts", + "umdModuleIds": { + "@nationalbankbelgium/stark-core": "stark.core" + } + } +} diff --git a/packages/stark-ui/src/modules/app-sidebar/public_api.ts b/packages/stark-ui/src/modules/app-sidebar/public_api.ts new file mode 100644 index 0000000000..7757de7781 --- /dev/null +++ b/packages/stark-ui/src/modules/app-sidebar/public_api.ts @@ -0,0 +1,4 @@ +/* eslint-disable unicorn/filename-case */ +export * from "./app-sidebar.module"; +export * from "./components"; +export * from "./services"; diff --git a/packages/stark-ui/src/modules/breadcrumb.ts b/packages/stark-ui/src/modules/breadcrumb.ts index 481f878919..b520a3e177 100644 --- a/packages/stark-ui/src/modules/breadcrumb.ts +++ b/packages/stark-ui/src/modules/breadcrumb.ts @@ -1,2 +1 @@ -export * from "./breadcrumb/breadcrumb.module"; -export * from "./breadcrumb/components"; +export * from "./breadcrumb/public_api"; diff --git a/packages/stark-ui/src/modules/breadcrumb/components/breadcrumb.component.ts b/packages/stark-ui/src/modules/breadcrumb/components/breadcrumb.component.ts index 72200a092a..d132da43b8 100644 --- a/packages/stark-ui/src/modules/breadcrumb/components/breadcrumb.component.ts +++ b/packages/stark-ui/src/modules/breadcrumb/components/breadcrumb.component.ts @@ -19,7 +19,7 @@ import { StarkRoutingService, StarkRoutingTransitionHook } from "@nationalbankbelgium/stark-core"; -import { AbstractStarkUiComponent } from "../../../common/classes/abstract-component"; +import { AbstractStarkUiComponent } from "@nationalbankbelgium/stark-ui/src/internal-common"; /** * @ignore diff --git a/packages/stark-ui/src/modules/breadcrumb/ng-package.json b/packages/stark-ui/src/modules/breadcrumb/ng-package.json new file mode 100644 index 0000000000..5e184c7ada --- /dev/null +++ b/packages/stark-ui/src/modules/breadcrumb/ng-package.json @@ -0,0 +1,10 @@ +{ + "$schema": "../../../../../node_modules/ng-packagr/ng-package.schema.json", + "lib": { + "entryFile": "public_api.ts", + "umdModuleIds": { + "@nationalbankbelgium/stark-core": "stark.core", + "@ngx-translate/core": "ngxTranslate.core" + } + } +} diff --git a/packages/stark-ui/src/modules/breadcrumb/public_api.ts b/packages/stark-ui/src/modules/breadcrumb/public_api.ts new file mode 100644 index 0000000000..b1f7b9064e --- /dev/null +++ b/packages/stark-ui/src/modules/breadcrumb/public_api.ts @@ -0,0 +1,3 @@ +/* eslint-disable unicorn/filename-case */ +export * from "./breadcrumb.module"; +export * from "./components"; diff --git a/packages/stark-ui/src/modules/collapsible.ts b/packages/stark-ui/src/modules/collapsible.ts index 62eee47468..8f58554a37 100644 --- a/packages/stark-ui/src/modules/collapsible.ts +++ b/packages/stark-ui/src/modules/collapsible.ts @@ -1,2 +1 @@ -export * from "./collapsible/collapsible.module"; -export * from "./collapsible/components"; +export * from "./collapsible/public_api"; diff --git a/packages/stark-ui/src/modules/collapsible/components/collapsible.component.ts b/packages/stark-ui/src/modules/collapsible/components/collapsible.component.ts index d6d64e1ee5..93811e4b52 100644 --- a/packages/stark-ui/src/modules/collapsible/components/collapsible.component.ts +++ b/packages/stark-ui/src/modules/collapsible/components/collapsible.component.ts @@ -11,7 +11,7 @@ import { ViewEncapsulation } from "@angular/core"; import { STARK_LOGGING_SERVICE, StarkLoggingService } from "@nationalbankbelgium/stark-core"; -import { AbstractStarkUiComponent } from "../../../common/classes/abstract-component"; +import { AbstractStarkUiComponent } from "@nationalbankbelgium/stark-ui/src/internal-common"; /** * @ignore diff --git a/packages/stark-ui/src/modules/collapsible/ng-package.json b/packages/stark-ui/src/modules/collapsible/ng-package.json new file mode 100644 index 0000000000..5e184c7ada --- /dev/null +++ b/packages/stark-ui/src/modules/collapsible/ng-package.json @@ -0,0 +1,10 @@ +{ + "$schema": "../../../../../node_modules/ng-packagr/ng-package.schema.json", + "lib": { + "entryFile": "public_api.ts", + "umdModuleIds": { + "@nationalbankbelgium/stark-core": "stark.core", + "@ngx-translate/core": "ngxTranslate.core" + } + } +} diff --git a/packages/stark-ui/src/modules/collapsible/public_api.ts b/packages/stark-ui/src/modules/collapsible/public_api.ts new file mode 100644 index 0000000000..1970b84948 --- /dev/null +++ b/packages/stark-ui/src/modules/collapsible/public_api.ts @@ -0,0 +1,3 @@ +/* eslint-disable unicorn/filename-case */ +export * from "./collapsible.module"; +export * from "./components"; diff --git a/packages/stark-ui/src/modules/date-picker.ts b/packages/stark-ui/src/modules/date-picker.ts index 82d380983e..27babab923 100644 --- a/packages/stark-ui/src/modules/date-picker.ts +++ b/packages/stark-ui/src/modules/date-picker.ts @@ -1,2 +1 @@ -export * from "./date-picker/date-picker.module"; -export * from "./date-picker/components"; +export * from "./date-picker/public_api"; diff --git a/packages/stark-ui/src/modules/date-picker/components/date-picker.component.spec.ts b/packages/stark-ui/src/modules/date-picker/components/date-picker.component.spec.ts index 886ea6b58f..64bfd456ce 100644 --- a/packages/stark-ui/src/modules/date-picker/components/date-picker.component.spec.ts +++ b/packages/stark-ui/src/modules/date-picker/components/date-picker.component.spec.ts @@ -16,7 +16,7 @@ import moment from "moment"; import { Observer } from "rxjs"; import { DEFAULT_DATE_MASK_CONFIG, StarkDatePickerComponent, StarkDatePickerMaskConfig } from "./date-picker.component"; import { STARK_DATE_FORMATS } from "./date-format.constants"; -import { StarkInputMaskDirectivesModule } from "../../input-mask-directives"; +import { StarkInputMaskDirectivesModule } from "@nationalbankbelgium/stark-ui/src/modules/input-mask-directives"; import createSpyObj = jasmine.createSpyObj; import SpyObj = jasmine.SpyObj; import Spy = jasmine.Spy; diff --git a/packages/stark-ui/src/modules/date-picker/components/date-picker.component.ts b/packages/stark-ui/src/modules/date-picker/components/date-picker.component.ts index 8c31785426..364b3fee16 100644 --- a/packages/stark-ui/src/modules/date-picker/components/date-picker.component.ts +++ b/packages/stark-ui/src/modules/date-picker/components/date-picker.component.ts @@ -27,8 +27,8 @@ import { BooleanInput, coerceBooleanProperty } from "@angular/cdk/coercion"; import { TranslateService } from "@ngx-translate/core"; import { Subject, Subscription } from "rxjs"; import { STARK_LOGGING_SERVICE, StarkLoggingService } from "@nationalbankbelgium/stark-core"; -import { isStarkTimestampMaskConfig, StarkTimestampMaskConfig } from "../../input-mask-directives/directives"; -import { AbstractStarkUiComponent } from "../../../common/classes/abstract-component"; +import { isStarkTimestampMaskConfig, StarkTimestampMaskConfig } from "@nationalbankbelgium/stark-ui/src/modules/input-mask-directives"; +import { AbstractStarkUiComponent } from "@nationalbankbelgium/stark-ui/src/internal-common"; import isEqual from "lodash-es/isEqual"; /** diff --git a/packages/stark-ui/src/modules/date-picker/date-picker.module.ts b/packages/stark-ui/src/modules/date-picker/date-picker.module.ts index 39adc52ac7..0079b09053 100644 --- a/packages/stark-ui/src/modules/date-picker/date-picker.module.ts +++ b/packages/stark-ui/src/modules/date-picker/date-picker.module.ts @@ -7,7 +7,7 @@ import { MatInputModule } from "@angular/material/input"; import { MomentDateModule } from "@angular/material-moment-adapter"; import { TranslateModule } from "@ngx-translate/core"; import { STARK_DATE_FORMATS, StarkDatePickerComponent } from "./components"; -import { StarkInputMaskDirectivesModule } from "../input-mask-directives"; +import { StarkInputMaskDirectivesModule } from "@nationalbankbelgium/stark-ui/src/modules/input-mask-directives"; @NgModule({ declarations: [StarkDatePickerComponent], diff --git a/packages/stark-ui/src/modules/date-picker/ng-package.json b/packages/stark-ui/src/modules/date-picker/ng-package.json new file mode 100644 index 0000000000..794b9f06c2 --- /dev/null +++ b/packages/stark-ui/src/modules/date-picker/ng-package.json @@ -0,0 +1,12 @@ +{ + "$schema": "../../../../../node_modules/ng-packagr/ng-package.schema.json", + "lib": { + "entryFile": "public_api.ts", + "umdModuleIds": { + "@nationalbankbelgium/stark-core": "stark.core", + "@ngx-translate/core": "ngxTranslate.core", + "lodash-es/isEqual": "lodash-es.isEqual", + "moment": "moment" + } + } +} diff --git a/packages/stark-ui/src/modules/date-picker/public_api.ts b/packages/stark-ui/src/modules/date-picker/public_api.ts new file mode 100644 index 0000000000..39060d77aa --- /dev/null +++ b/packages/stark-ui/src/modules/date-picker/public_api.ts @@ -0,0 +1,3 @@ +/* eslint-disable unicorn/filename-case */ +export * from "./components"; +export * from "./date-picker.module"; diff --git a/packages/stark-ui/src/modules/date-range-picker.ts b/packages/stark-ui/src/modules/date-range-picker.ts index 9e8348e215..0070cad688 100644 --- a/packages/stark-ui/src/modules/date-range-picker.ts +++ b/packages/stark-ui/src/modules/date-range-picker.ts @@ -1,2 +1 @@ -export * from "./date-range-picker/date-range-picker.module"; -export * from "./date-range-picker/components"; +export * from "./date-range-picker/public_api"; diff --git a/packages/stark-ui/src/modules/date-range-picker/components/date-range-picker.component.spec.ts b/packages/stark-ui/src/modules/date-range-picker/components/date-range-picker.component.spec.ts index c9f592b1eb..1d36fb5116 100644 --- a/packages/stark-ui/src/modules/date-range-picker/components/date-range-picker.component.spec.ts +++ b/packages/stark-ui/src/modules/date-range-picker/components/date-range-picker.component.spec.ts @@ -10,8 +10,8 @@ import { MatFormFieldModule } from "@angular/material/form-field"; import { TranslateModule } from "@ngx-translate/core"; import { STARK_LOGGING_SERVICE } from "@nationalbankbelgium/stark-core"; import { MockStarkLoggingService } from "@nationalbankbelgium/stark-core/testing"; -import { StarkDatePickerModule } from "../../date-picker"; -import { StarkInputMaskDirectivesModule } from "../../input-mask-directives"; +import { StarkDatePickerModule } from "@nationalbankbelgium/stark-ui/src/modules/date-picker"; +import { StarkInputMaskDirectivesModule } from "@nationalbankbelgium/stark-ui/src/modules/input-mask-directives"; import { StarkDateRangePickerComponent } from "./date-range-picker.component"; import { StarkDateRangePickerEvent } from "./date-range-picker-event.intf"; import { Observer } from "rxjs"; diff --git a/packages/stark-ui/src/modules/date-range-picker/components/date-range-picker.component.ts b/packages/stark-ui/src/modules/date-range-picker/components/date-range-picker.component.ts index 0e95b966dd..6a8ee6920c 100644 --- a/packages/stark-ui/src/modules/date-range-picker/components/date-range-picker.component.ts +++ b/packages/stark-ui/src/modules/date-range-picker/components/date-range-picker.component.ts @@ -29,11 +29,16 @@ import { distinctUntilChanged } from "rxjs/operators"; import get from "lodash-es/get"; import isEqual from "lodash-es/isEqual"; import { STARK_LOGGING_SERVICE, StarkLoggingService } from "@nationalbankbelgium/stark-core"; -import { AbstractStarkUiComponent } from "../../../common/classes/abstract-component"; -import { StarkDateInput, StarkDatePickerComponent, StarkDatePickerFilter, StarkDatePickerMaskConfig } from "../../date-picker/components"; +import { AbstractStarkUiComponent } from "@nationalbankbelgium/stark-ui/src/internal-common"; +import { + StarkDateInput, + StarkDatePickerComponent, + StarkDatePickerFilter, + StarkDatePickerMaskConfig +} from "@nationalbankbelgium/stark-ui/src/modules/date-picker"; import { StarkDateRangePickerEvent } from "./date-range-picker-event.intf"; import { BooleanInput, coerceBooleanProperty } from "@angular/cdk/coercion"; -import { isStarkTimestampMaskConfig } from "../../input-mask-directives/directives/timestamp-mask-config.intf"; +import { isStarkTimestampMaskConfig } from "@nationalbankbelgium/stark-ui/src/modules/input-mask-directives"; import moment from "moment"; /** diff --git a/packages/stark-ui/src/modules/date-range-picker/date-range-picker.module.ts b/packages/stark-ui/src/modules/date-range-picker/date-range-picker.module.ts index e21855e22e..217ea134fe 100644 --- a/packages/stark-ui/src/modules/date-range-picker/date-range-picker.module.ts +++ b/packages/stark-ui/src/modules/date-range-picker/date-range-picker.module.ts @@ -2,12 +2,12 @@ import { NgModule } from "@angular/core"; import { CommonModule } from "@angular/common"; import { TranslateModule, TranslateService } from "@ngx-translate/core"; import { StarkLocale } from "@nationalbankbelgium/stark-core"; -import { StarkDatePickerModule } from "../date-picker"; +import { StarkDatePickerModule } from "@nationalbankbelgium/stark-ui/src/modules/date-picker"; import { StarkDateRangePickerComponent } from "./components"; import { translationsEn } from "./assets/translations/en"; import { translationsFr } from "./assets/translations/fr"; import { translationsNl } from "./assets/translations/nl"; -import { mergeUiTranslations } from "../../common/translations"; +import { mergeUiTranslations } from "@nationalbankbelgium/stark-ui/src/common"; import { FormsModule, ReactiveFormsModule } from "@angular/forms"; import { MatFormFieldModule } from "@angular/material/form-field"; diff --git a/packages/stark-ui/src/modules/date-range-picker/ng-package.json b/packages/stark-ui/src/modules/date-range-picker/ng-package.json new file mode 100644 index 0000000000..947058944a --- /dev/null +++ b/packages/stark-ui/src/modules/date-range-picker/ng-package.json @@ -0,0 +1,13 @@ +{ + "$schema": "../../../../../node_modules/ng-packagr/ng-package.schema.json", + "lib": { + "entryFile": "public_api.ts", + "umdModuleIds": { + "@nationalbankbelgium/stark-core": "stark.core", + "@ngx-translate/core": "ngxTranslate.core", + "lodash-es/isEqual": "lodash-es.isEqual", + "lodash-es/get": "lodash-es.get", + "moment": "moment" + } + } +} diff --git a/packages/stark-ui/src/modules/date-range-picker/public_api.ts b/packages/stark-ui/src/modules/date-range-picker/public_api.ts new file mode 100644 index 0000000000..dd289daffc --- /dev/null +++ b/packages/stark-ui/src/modules/date-range-picker/public_api.ts @@ -0,0 +1,3 @@ +/* eslint-disable unicorn/filename-case */ +export * from "./components"; +export * from "./date-range-picker.module"; diff --git a/packages/stark-ui/src/modules/date-time-picker.ts b/packages/stark-ui/src/modules/date-time-picker.ts index f348fbe54d..d863b51c6b 100644 --- a/packages/stark-ui/src/modules/date-time-picker.ts +++ b/packages/stark-ui/src/modules/date-time-picker.ts @@ -1,2 +1 @@ -export * from "./date-time-picker/date-time-picker.module"; -export * from "./date-time-picker/components"; +export * from "./date-time-picker/public_api"; diff --git a/packages/stark-ui/src/modules/date-time-picker/components/date-time-picker.component.spec.ts b/packages/stark-ui/src/modules/date-time-picker/components/date-time-picker.component.spec.ts index 6f5fdd2c9e..bda026859f 100644 --- a/packages/stark-ui/src/modules/date-time-picker/components/date-time-picker.component.spec.ts +++ b/packages/stark-ui/src/modules/date-time-picker/components/date-time-picker.component.spec.ts @@ -17,8 +17,13 @@ import { MockStarkLoggingService } from "@nationalbankbelgium/stark-core/testing import { STARK_LOGGING_SERVICE } from "@nationalbankbelgium/stark-core"; import { Observer } from "rxjs"; import moment from "moment"; -import { STARK_DATE_FORMATS, StarkDatePickerModule, StarkDatePickerFilter, StarkDatePickerMaskConfig } from "../../date-picker"; -import { StarkTimestampMaskConfig, StarkInputMaskDirectivesModule } from "../../input-mask-directives"; +import { + STARK_DATE_FORMATS, + StarkDatePickerModule, + StarkDatePickerFilter, + StarkDatePickerMaskConfig +} from "@nationalbankbelgium/stark-ui/src/modules/date-picker"; +import { StarkTimestampMaskConfig, StarkInputMaskDirectivesModule } from "@nationalbankbelgium/stark-ui/src/modules/input-mask-directives"; import { DEFAULT_TIME_MASK_CONFIG, StarkDateTimePickerComponent } from "./date-time-picker.component"; import createSpyObj = jasmine.createSpyObj; import Spy = jasmine.Spy; diff --git a/packages/stark-ui/src/modules/date-time-picker/components/date-time-picker.component.ts b/packages/stark-ui/src/modules/date-time-picker/components/date-time-picker.component.ts index 9671cc76af..7b79b40b4e 100644 --- a/packages/stark-ui/src/modules/date-time-picker/components/date-time-picker.component.ts +++ b/packages/stark-ui/src/modules/date-time-picker/components/date-time-picker.component.ts @@ -38,14 +38,14 @@ import { Subject, Subscription } from "rxjs"; import { TranslateService } from "@ngx-translate/core"; import { minDate as validatorMinDate, maxDate as validatorMaxDate } from "class-validator"; import { STARK_LOGGING_SERVICE, StarkLoggingService } from "@nationalbankbelgium/stark-core"; -import { StarkTimestampMaskConfig } from "../../input-mask-directives/directives/timestamp-mask-config.intf"; +import { StarkTimestampMaskConfig } from "@nationalbankbelgium/stark-ui/src/modules/input-mask-directives"; import { StarkDateInput, StarkDatePickerComponent, StarkDatePickerFilter, StarkDatePickerMaskConfig -} from "../../date-picker/components/date-picker.component"; -import { AbstractStarkUiComponent } from "../../../common/classes/abstract-component"; +} from "@nationalbankbelgium/stark-ui/src/modules/date-picker"; +import { AbstractStarkUiComponent } from "@nationalbankbelgium/stark-ui/src/internal-common"; /** * Default TimeMask configuration @@ -336,7 +336,8 @@ export class StarkDateTimePickerComponent * Reference to the Stark date picker embedded in this component */ @ViewChild(StarkDatePickerComponent, { static: true }) - public datePicker!: StarkDatePickerComponent; + // Due to split chunks, Angular does not detect that StarkDatePickerComponent implements Validator. We need to force the recognition. + public datePicker!: StarkDatePickerComponent & Validator; /** * @ignore diff --git a/packages/stark-ui/src/modules/date-time-picker/date-time-picker.module.ts b/packages/stark-ui/src/modules/date-time-picker/date-time-picker.module.ts index e3a09b217f..da38860acb 100644 --- a/packages/stark-ui/src/modules/date-time-picker/date-time-picker.module.ts +++ b/packages/stark-ui/src/modules/date-time-picker/date-time-picker.module.ts @@ -8,13 +8,13 @@ import { MatTooltipModule } from "@angular/material/tooltip"; import { MatIconModule } from "@angular/material/icon"; import { TranslateModule, TranslateService } from "@ngx-translate/core"; import { StarkLocale } from "@nationalbankbelgium/stark-core"; -import { StarkDatePickerModule } from "../date-picker"; -import { StarkInputMaskDirectivesModule } from "../input-mask-directives"; +import { StarkDatePickerModule } from "@nationalbankbelgium/stark-ui/src/modules/date-picker"; +import { StarkInputMaskDirectivesModule } from "@nationalbankbelgium/stark-ui/src/modules/input-mask-directives"; import { StarkDateTimePickerComponent } from "./components/date-time-picker.component"; import { translationsEn } from "./assets/translations/en"; import { translationsFr } from "./assets/translations/fr"; import { translationsNl } from "./assets/translations/nl"; -import { mergeUiTranslations } from "../../common/translations/merge-translations"; +import { mergeUiTranslations } from "@nationalbankbelgium/stark-ui/src/common"; @NgModule({ imports: [ diff --git a/packages/stark-ui/src/modules/date-time-picker/ng-package.json b/packages/stark-ui/src/modules/date-time-picker/ng-package.json new file mode 100644 index 0000000000..42a5d831f2 --- /dev/null +++ b/packages/stark-ui/src/modules/date-time-picker/ng-package.json @@ -0,0 +1,12 @@ +{ + "$schema": "../../../../../node_modules/ng-packagr/ng-package.schema.json", + "lib": { + "entryFile": "public_api.ts", + "umdModuleIds": { + "@nationalbankbelgium/stark-core": "stark.core", + "@ngx-translate/core": "ngxTranslate.core", + "class-validator": "class-validator", + "moment": "moment" + } + } +} diff --git a/packages/stark-ui/src/modules/date-time-picker/public_api.ts b/packages/stark-ui/src/modules/date-time-picker/public_api.ts new file mode 100644 index 0000000000..39c067245f --- /dev/null +++ b/packages/stark-ui/src/modules/date-time-picker/public_api.ts @@ -0,0 +1,3 @@ +/* eslint-disable unicorn/filename-case */ +export * from "./components"; +export * from "./date-time-picker.module"; diff --git a/packages/stark-ui/src/modules/dialogs.ts b/packages/stark-ui/src/modules/dialogs.ts index 6752571a1a..a1d984b99a 100644 --- a/packages/stark-ui/src/modules/dialogs.ts +++ b/packages/stark-ui/src/modules/dialogs.ts @@ -1,2 +1 @@ -export * from "./dialogs/dialogs.module"; -export * from "./dialogs/components"; +export * from "./dialogs/public_api"; diff --git a/packages/stark-ui/src/modules/dialogs/ng-package.json b/packages/stark-ui/src/modules/dialogs/ng-package.json new file mode 100644 index 0000000000..d103aa0ee7 --- /dev/null +++ b/packages/stark-ui/src/modules/dialogs/ng-package.json @@ -0,0 +1,9 @@ +{ + "$schema": "../../../../../node_modules/ng-packagr/ng-package.schema.json", + "lib": { + "entryFile": "public_api.ts", + "umdModuleIds": { + "@ngx-translate/core": "ngxTranslate.core" + } + } +} diff --git a/packages/stark-ui/src/modules/dialogs/public_api.ts b/packages/stark-ui/src/modules/dialogs/public_api.ts new file mode 100644 index 0000000000..07a1fcfab3 --- /dev/null +++ b/packages/stark-ui/src/modules/dialogs/public_api.ts @@ -0,0 +1,3 @@ +/* eslint-disable unicorn/filename-case */ +export * from "./components"; +export * from "./dialogs.module"; diff --git a/packages/stark-ui/src/modules/dropdown.ts b/packages/stark-ui/src/modules/dropdown.ts index b0ad366353..e755cb7420 100644 --- a/packages/stark-ui/src/modules/dropdown.ts +++ b/packages/stark-ui/src/modules/dropdown.ts @@ -1,2 +1 @@ -export * from "./dropdown/dropdown.module"; -export * from "./dropdown/components"; +export * from "./dropdown/public_api"; diff --git a/packages/stark-ui/src/modules/dropdown/components/dropdown.component.ts b/packages/stark-ui/src/modules/dropdown/components/dropdown.component.ts index ab8f9ea757..57953af285 100644 --- a/packages/stark-ui/src/modules/dropdown/components/dropdown.component.ts +++ b/packages/stark-ui/src/modules/dropdown/components/dropdown.component.ts @@ -17,7 +17,7 @@ import { ViewEncapsulation } from "@angular/core"; import { STARK_LOGGING_SERVICE, StarkLoggingService } from "@nationalbankbelgium/stark-core"; -import { AbstractStarkUiComponent } from "../../../common/classes/abstract-component"; +import { AbstractStarkUiComponent } from "@nationalbankbelgium/stark-ui/src/internal-common"; import { AbstractControl, ControlValueAccessor, NG_VALIDATORS, NgControl, ValidationErrors, Validator, Validators } from "@angular/forms"; import { Subject, Subscription } from "rxjs"; import { MatFormField, MatFormFieldControl } from "@angular/material/form-field"; diff --git a/packages/stark-ui/src/modules/dropdown/ng-package.json b/packages/stark-ui/src/modules/dropdown/ng-package.json new file mode 100644 index 0000000000..3a074a1bb7 --- /dev/null +++ b/packages/stark-ui/src/modules/dropdown/ng-package.json @@ -0,0 +1,11 @@ +{ + "$schema": "../../../../../node_modules/ng-packagr/ng-package.schema.json", + "lib": { + "entryFile": "public_api.ts", + "umdModuleIds": { + "@nationalbankbelgium/stark-core": "stark.core", + "@ngx-translate/core": "ngxTranslate.core", + "lodash-es/isEqual": "lodash-es.isEqual" + } + } +} diff --git a/packages/stark-ui/src/modules/dropdown/public_api.ts b/packages/stark-ui/src/modules/dropdown/public_api.ts new file mode 100644 index 0000000000..b684eed085 --- /dev/null +++ b/packages/stark-ui/src/modules/dropdown/public_api.ts @@ -0,0 +1,3 @@ +/* eslint-disable unicorn/filename-case */ +export * from "./components"; +export * from "./dropdown.module"; diff --git a/packages/stark-ui/src/modules/generic-search.ts b/packages/stark-ui/src/modules/generic-search.ts index dd3778c1ad..613af8b28e 100644 --- a/packages/stark-ui/src/modules/generic-search.ts +++ b/packages/stark-ui/src/modules/generic-search.ts @@ -1,4 +1 @@ -export * from "./generic-search/components"; -export * from "./generic-search/classes"; -export * from "./generic-search/entities"; -export * from "./generic-search/generic-search.module"; +export * from "./generic-search/public_api"; diff --git a/packages/stark-ui/src/modules/generic-search/classes/abstract-search-component.ts b/packages/stark-ui/src/modules/generic-search/classes/abstract-search-component.ts index ba76579803..54d020c83b 100644 --- a/packages/stark-ui/src/modules/generic-search/classes/abstract-search-component.ts +++ b/packages/stark-ui/src/modules/generic-search/classes/abstract-search-component.ts @@ -6,9 +6,12 @@ import { AbstractStarkFormComponent } from "./abstract-form-component"; import { StarkGenericSearchService } from "./generic-search.service.intf"; import { StarkSearchState } from "../entities"; import { StarkErrorImpl, StarkLoggingService } from "@nationalbankbelgium/stark-core"; -import { StarkFormUtil } from "../../../util/form"; -import { StarkProgressIndicatorConfig, StarkProgressIndicatorType } from "../../progress-indicator/entities"; -import { StarkProgressIndicatorService } from "../../progress-indicator/services"; +import { StarkFormUtil } from "@nationalbankbelgium/stark-ui/src/util"; +import { + StarkProgressIndicatorConfig, + StarkProgressIndicatorType, + StarkProgressIndicatorService +} from "@nationalbankbelgium/stark-ui/src/modules/progress-indicator"; /** * Default progress indicator configuration diff --git a/packages/stark-ui/src/modules/generic-search/components/generic-search/generic-search.component.spec.ts b/packages/stark-ui/src/modules/generic-search/components/generic-search/generic-search.component.spec.ts index aae586001c..f54823fbae 100644 --- a/packages/stark-ui/src/modules/generic-search/components/generic-search/generic-search.component.spec.ts +++ b/packages/stark-ui/src/modules/generic-search/components/generic-search/generic-search.component.spec.ts @@ -13,7 +13,7 @@ import { STARK_LOGGING_SERVICE } from "@nationalbankbelgium/stark-core"; import { MockStarkLoggingService } from "@nationalbankbelgium/stark-core/testing"; import { StarkGenericSearchComponent } from "./generic-search.component"; import { StarkSearchFormComponent } from "../../classes"; -import { StarkActionBarModule } from "../../../action-bar"; +import { StarkActionBarModule } from "@nationalbankbelgium/stark-ui/src/modules/action-bar"; @Component({ selector: "search-form-component", diff --git a/packages/stark-ui/src/modules/generic-search/components/generic-search/generic-search.component.ts b/packages/stark-ui/src/modules/generic-search/components/generic-search/generic-search.component.ts index 45f36da4e8..d36435c756 100644 --- a/packages/stark-ui/src/modules/generic-search/components/generic-search/generic-search.component.ts +++ b/packages/stark-ui/src/modules/generic-search/components/generic-search/generic-search.component.ts @@ -26,11 +26,11 @@ import { StarkActionBarConfig, StarkCustomizablePredefinedAction, StarkDefaultPredefinedAction -} from "../../../action-bar/components"; +} from "@nationalbankbelgium/stark-ui/src/modules/action-bar"; import { STARK_LOGGING_SERVICE, StarkLoggingService } from "@nationalbankbelgium/stark-core"; import { FormGroup } from "@angular/forms"; import { animate, AnimationTriggerMetadata, state, style, transition, trigger } from "@angular/animations"; -import { AbstractStarkUiComponent } from "../../../../common/classes/abstract-component"; +import { AbstractStarkUiComponent } from "@nationalbankbelgium/stark-ui/src/internal-common"; import isEqual from "lodash-es/isEqual"; /** diff --git a/packages/stark-ui/src/modules/generic-search/entities/form-action.intf.ts b/packages/stark-ui/src/modules/generic-search/entities/form-action.intf.ts index 26380013e9..cd4e2539d5 100644 --- a/packages/stark-ui/src/modules/generic-search/entities/form-action.intf.ts +++ b/packages/stark-ui/src/modules/generic-search/entities/form-action.intf.ts @@ -1,4 +1,4 @@ -import { StarkActionBarButtonColor } from "../../action-bar/components"; +import { StarkActionBarButtonColor } from "@nationalbankbelgium/stark-ui/src/modules/action-bar"; /** * Predefined colors for form buttons diff --git a/packages/stark-ui/src/modules/generic-search/entities/generic-search-action-bar-config.intf.ts b/packages/stark-ui/src/modules/generic-search/entities/generic-search-action-bar-config.intf.ts index b36840cc15..bd308ad0af 100644 --- a/packages/stark-ui/src/modules/generic-search/entities/generic-search-action-bar-config.intf.ts +++ b/packages/stark-ui/src/modules/generic-search/entities/generic-search-action-bar-config.intf.ts @@ -1,4 +1,8 @@ -import { StarkActionBarConfig, StarkCustomizablePredefinedAction, StarkDefaultPredefinedAction } from "../../action-bar/components"; +import { + StarkActionBarConfig, + StarkCustomizablePredefinedAction, + StarkDefaultPredefinedAction +} from "@nationalbankbelgium/stark-ui/src/modules/action-bar"; /** * This interface describes the properties of the action bar displayed in the generic search component. diff --git a/packages/stark-ui/src/modules/generic-search/generic-search.module.ts b/packages/stark-ui/src/modules/generic-search/generic-search.module.ts index 476ba19143..9f30b9d772 100644 --- a/packages/stark-ui/src/modules/generic-search/generic-search.module.ts +++ b/packages/stark-ui/src/modules/generic-search/generic-search.module.ts @@ -6,7 +6,7 @@ import { MatIconModule } from "@angular/material/icon"; import { MatTooltipModule } from "@angular/material/tooltip"; import { TranslateModule } from "@ngx-translate/core"; import { StarkGenericSearchComponent } from "./components"; -import { StarkActionBarModule } from "../action-bar"; +import { StarkActionBarModule } from "@nationalbankbelgium/stark-ui/src/modules/action-bar"; @NgModule({ declarations: [StarkGenericSearchComponent], diff --git a/packages/stark-ui/src/modules/generic-search/ng-package.json b/packages/stark-ui/src/modules/generic-search/ng-package.json new file mode 100644 index 0000000000..cee6e5d8c6 --- /dev/null +++ b/packages/stark-ui/src/modules/generic-search/ng-package.json @@ -0,0 +1,12 @@ +{ + "$schema": "../../../../../node_modules/ng-packagr/ng-package.schema.json", + "lib": { + "entryFile": "public_api.ts", + "umdModuleIds": { + "@nationalbankbelgium/stark-core": "stark.core", + "@ngx-translate/core": "ngxTranslate.core", + "lodash-es/isEqual": "lodash-es.isEqual", + "lodash-es/cloneDeep": "lodash-es.cloneDeep" + } + } +} diff --git a/packages/stark-ui/src/modules/generic-search/public_api.ts b/packages/stark-ui/src/modules/generic-search/public_api.ts new file mode 100644 index 0000000000..851ac93ed3 --- /dev/null +++ b/packages/stark-ui/src/modules/generic-search/public_api.ts @@ -0,0 +1,5 @@ +/* eslint-disable unicorn/filename-case */ +export * from "./classes"; +export * from "./components"; +export * from "./entities"; +export * from "./generic-search.module"; diff --git a/packages/stark-ui/src/modules/input-mask-directives.ts b/packages/stark-ui/src/modules/input-mask-directives.ts index 9edbd58ff9..29365f3870 100644 --- a/packages/stark-ui/src/modules/input-mask-directives.ts +++ b/packages/stark-ui/src/modules/input-mask-directives.ts @@ -1,2 +1 @@ -export * from "./input-mask-directives/directives"; -export * from "./input-mask-directives/input-mask-directives.module"; +export * from "./input-mask-directives/public_api"; diff --git a/packages/stark-ui/src/modules/input-mask-directives/ng-package.json b/packages/stark-ui/src/modules/input-mask-directives/ng-package.json new file mode 100644 index 0000000000..c5f896e95b --- /dev/null +++ b/packages/stark-ui/src/modules/input-mask-directives/ng-package.json @@ -0,0 +1,11 @@ +{ + "$schema": "../../../../../node_modules/ng-packagr/ng-package.schema.json", + "lib": { + "entryFile": "public_api.ts", + "umdModuleIds": { + "@nationalbankbelgium/stark-core": "stark.core", + "angular2-text-mask": "ng2TextMask", + "text-mask-addons": "textMaskAddons" + } + } +} diff --git a/packages/stark-ui/src/modules/input-mask-directives/public_api.ts b/packages/stark-ui/src/modules/input-mask-directives/public_api.ts new file mode 100644 index 0000000000..98cd697c41 --- /dev/null +++ b/packages/stark-ui/src/modules/input-mask-directives/public_api.ts @@ -0,0 +1,3 @@ +/* eslint-disable unicorn/filename-case */ +export * from "./directives"; +export * from "./input-mask-directives.module"; diff --git a/packages/stark-ui/src/modules/language-selector.ts b/packages/stark-ui/src/modules/language-selector.ts index da46dc0d3f..57adf4aa84 100644 --- a/packages/stark-ui/src/modules/language-selector.ts +++ b/packages/stark-ui/src/modules/language-selector.ts @@ -1,2 +1 @@ -export * from "./language-selector/language-selector.module"; -export * from "./language-selector/components"; +export * from "./language-selector/public_api"; diff --git a/packages/stark-ui/src/modules/language-selector/components/language-selector.component.spec.ts b/packages/stark-ui/src/modules/language-selector/components/language-selector.component.spec.ts index 1da170da0f..1b73745069 100644 --- a/packages/stark-ui/src/modules/language-selector/components/language-selector.component.spec.ts +++ b/packages/stark-ui/src/modules/language-selector/components/language-selector.component.spec.ts @@ -20,7 +20,7 @@ import { import { MockStarkLoggingService, MockStarkSessionService } from "@nationalbankbelgium/stark-core/testing"; /* stark-ui imports */ import { StarkLanguageSelectorComponent, StarkLanguageSelectorMode } from "./language-selector.component"; -import { StarkDropdownModule } from "../../dropdown"; +import { StarkDropdownModule } from "@nationalbankbelgium/stark-ui/src/modules/dropdown"; import { of, throwError } from "rxjs"; /** diff --git a/packages/stark-ui/src/modules/language-selector/components/language-selector.component.ts b/packages/stark-ui/src/modules/language-selector/components/language-selector.component.ts index 71fff1fb9a..e187c2801c 100644 --- a/packages/stark-ui/src/modules/language-selector/components/language-selector.component.ts +++ b/packages/stark-ui/src/modules/language-selector/components/language-selector.component.ts @@ -22,7 +22,7 @@ import { StarkLoggingService, StarkSessionService } from "@nationalbankbelgium/stark-core"; -import { AbstractStarkUiComponent } from "../../../common/classes/abstract-component"; +import { AbstractStarkUiComponent } from "@nationalbankbelgium/stark-ui/src/internal-common"; /** * @ignore diff --git a/packages/stark-ui/src/modules/language-selector/language-selector.module.ts b/packages/stark-ui/src/modules/language-selector/language-selector.module.ts index fd850e6079..d82f7ea777 100644 --- a/packages/stark-ui/src/modules/language-selector/language-selector.module.ts +++ b/packages/stark-ui/src/modules/language-selector/language-selector.module.ts @@ -2,7 +2,7 @@ import { NgModule } from "@angular/core"; import { CommonModule } from "@angular/common"; import { MatButtonToggleModule } from "@angular/material/button-toggle"; import { StarkLanguageSelectorComponent } from "./components"; -import { StarkDropdownModule } from "../dropdown"; +import { StarkDropdownModule } from "@nationalbankbelgium/stark-ui/src/modules/dropdown"; import { MatFormFieldModule } from "@angular/material/form-field"; @NgModule({ diff --git a/packages/stark-ui/src/modules/language-selector/ng-package.json b/packages/stark-ui/src/modules/language-selector/ng-package.json new file mode 100644 index 0000000000..e43d4fae6f --- /dev/null +++ b/packages/stark-ui/src/modules/language-selector/ng-package.json @@ -0,0 +1,13 @@ +{ + "$schema": "../../../../../node_modules/ng-packagr/ng-package.schema.json", + "lib": { + "entryFile": "public_api.ts", + "umdModuleIds": { + "@nationalbankbelgium/stark-core": "stark.core", + "@ngrx/effects": "ngrx.effects", + "@ngrx/store": "ngrx.store", + "@ngx-translate/core": "ngxTranslate.core", + "lodash-es/findIndex": "lodash-es.findIndex" + } + } +} diff --git a/packages/stark-ui/src/modules/language-selector/public_api.ts b/packages/stark-ui/src/modules/language-selector/public_api.ts new file mode 100644 index 0000000000..b4c10f88cd --- /dev/null +++ b/packages/stark-ui/src/modules/language-selector/public_api.ts @@ -0,0 +1,3 @@ +/* eslint-disable unicorn/filename-case */ +export * from "./components"; +export * from "./language-selector.module"; diff --git a/packages/stark-ui/src/modules/message-pane.ts b/packages/stark-ui/src/modules/message-pane.ts index b8bd14a6ee..42d68457b3 100644 --- a/packages/stark-ui/src/modules/message-pane.ts +++ b/packages/stark-ui/src/modules/message-pane.ts @@ -1,8 +1 @@ -export * from "./message-pane/message-pane.module"; -export * from "./message-pane/actions"; -export * from "./message-pane/constants"; -export * from "./message-pane/effects"; -export * from "./message-pane/entities"; -export * from "./message-pane/reducers"; -export * from "./message-pane/services"; -export * from "./message-pane/components"; +export * from "./message-pane/public_api"; diff --git a/packages/stark-ui/src/modules/message-pane/actions/message-pane.actions.ts b/packages/stark-ui/src/modules/message-pane/actions/message-pane.actions.ts index 497b67ad96..7dfc1362e1 100644 --- a/packages/stark-ui/src/modules/message-pane/actions/message-pane.actions.ts +++ b/packages/stark-ui/src/modules/message-pane/actions/message-pane.actions.ts @@ -1,5 +1,5 @@ import { createAction, props, union } from "@ngrx/store"; -import { StarkMessage } from "../../../common/message"; +import { StarkMessage } from "@nationalbankbelgium/stark-ui/src/common"; /** * @ignore diff --git a/packages/stark-ui/src/modules/message-pane/components/message-pane.component.spec.ts b/packages/stark-ui/src/modules/message-pane/components/message-pane.component.spec.ts index 8c3f18e19c..3800d29b32 100644 --- a/packages/stark-ui/src/modules/message-pane/components/message-pane.component.spec.ts +++ b/packages/stark-ui/src/modules/message-pane/components/message-pane.component.spec.ts @@ -22,14 +22,13 @@ import { TranslateModule, TranslateService } from "@ngx-translate/core"; import { StarkMessagePaneComponent, StarkMessagePaneNavItem } from "./message-pane.component"; import { STARK_MESSAGE_PANE_SERVICE } from "../services"; import { MockStarkMessagePaneService } from "@nationalbankbelgium/stark-ui/testing"; -import { StarkMessageCollection } from "../entities"; import { starkMessagePaneAlignClassPrefix, starkMessagePaneDisplayAnimatedClass, starkMessagePaneDisplayedClass } from "./message-pane.constants"; -import { StarkMessage, StarkMessageType } from "../../../common/message"; -import { StarkDOMUtil } from "../../../util/dom"; +import { StarkMessage, StarkMessageCollection, StarkMessageType } from "@nationalbankbelgium/stark-ui/src/common"; +import { StarkDOMUtil } from "@nationalbankbelgium/stark-ui/src/util"; /* jasmine imports */ import SpyObj = jasmine.SpyObj; diff --git a/packages/stark-ui/src/modules/message-pane/components/message-pane.component.ts b/packages/stark-ui/src/modules/message-pane/components/message-pane.component.ts index bc1a81ed19..d9b7008b82 100644 --- a/packages/stark-ui/src/modules/message-pane/components/message-pane.component.ts +++ b/packages/stark-ui/src/modules/message-pane/components/message-pane.component.ts @@ -20,9 +20,8 @@ import { starkMessagePaneDisplayedClass } from "./message-pane.constants"; import { STARK_MESSAGE_PANE_SERVICE, StarkMessagePaneService, starkMessagePaneServiceName } from "../services/message-pane.service.intf"; -import { StarkMessage } from "../../../common/message"; -import { StarkMessageCollection } from "../entities"; -import { AbstractStarkUiComponent } from "../../../common/classes/abstract-component"; +import { StarkMessage, StarkMessageCollection } from "@nationalbankbelgium/stark-ui/src/common"; +import { AbstractStarkUiComponent } from "@nationalbankbelgium/stark-ui/src/internal-common"; /** * Type of messages that can be displayed in the message pane diff --git a/packages/stark-ui/src/modules/message-pane/entities.ts b/packages/stark-ui/src/modules/message-pane/entities.ts deleted file mode 100644 index 63ef13f1ad..0000000000 --- a/packages/stark-ui/src/modules/message-pane/entities.ts +++ /dev/null @@ -1 +0,0 @@ -export * from "./entities/message-collection.entity.intf"; diff --git a/packages/stark-ui/src/modules/message-pane/message-pane.module.ts b/packages/stark-ui/src/modules/message-pane/message-pane.module.ts index 4bb3580c19..8f5d551c8c 100644 --- a/packages/stark-ui/src/modules/message-pane/message-pane.module.ts +++ b/packages/stark-ui/src/modules/message-pane/message-pane.module.ts @@ -17,7 +17,7 @@ import { StarkMessagePaneComponent } from "./components"; import { STARK_MESSAGE_PANE_SERVICE, StarkMessagePaneServiceImpl } from "./services"; import { starkMessagesReducers } from "./reducers"; import { StarkMessagePaneEffects } from "./effects"; -import { mergeUiTranslations } from "../../common/translations"; +import { mergeUiTranslations } from "@nationalbankbelgium/stark-ui/src/common"; import { starkMessagePaneStoreKey } from "./constants"; @NgModule({ diff --git a/packages/stark-ui/src/modules/message-pane/ng-package.json b/packages/stark-ui/src/modules/message-pane/ng-package.json new file mode 100644 index 0000000000..e43d4fae6f --- /dev/null +++ b/packages/stark-ui/src/modules/message-pane/ng-package.json @@ -0,0 +1,13 @@ +{ + "$schema": "../../../../../node_modules/ng-packagr/ng-package.schema.json", + "lib": { + "entryFile": "public_api.ts", + "umdModuleIds": { + "@nationalbankbelgium/stark-core": "stark.core", + "@ngrx/effects": "ngrx.effects", + "@ngrx/store": "ngrx.store", + "@ngx-translate/core": "ngxTranslate.core", + "lodash-es/findIndex": "lodash-es.findIndex" + } + } +} diff --git a/packages/stark-ui/src/modules/message-pane/public_api.ts b/packages/stark-ui/src/modules/message-pane/public_api.ts new file mode 100644 index 0000000000..41b1d4c443 --- /dev/null +++ b/packages/stark-ui/src/modules/message-pane/public_api.ts @@ -0,0 +1,8 @@ +/* eslint-disable unicorn/filename-case */ +export * from "./actions"; +export * from "./components"; +export * from "./constants"; +export * from "./effects"; +export * from "./message-pane.module"; +export * from "./reducers"; +export * from "./services"; diff --git a/packages/stark-ui/src/modules/message-pane/reducers.ts b/packages/stark-ui/src/modules/message-pane/reducers.ts index a878a44fbc..8cefcb0e6e 100644 --- a/packages/stark-ui/src/modules/message-pane/reducers.ts +++ b/packages/stark-ui/src/modules/message-pane/reducers.ts @@ -1,2 +1,2 @@ -export { selectStarkMessages, starkMessagesReducers, StarkMessageState } from "./reducers/index"; +export { selectStarkMessages, starkMessagesReducers } from "./reducers/index"; export { messagesReducer } from "./reducers/messages-pane.reducer"; diff --git a/packages/stark-ui/src/modules/message-pane/reducers/index.ts b/packages/stark-ui/src/modules/message-pane/reducers/index.ts index 92565b868b..f535bed774 100644 --- a/packages/stark-ui/src/modules/message-pane/reducers/index.ts +++ b/packages/stark-ui/src/modules/message-pane/reducers/index.ts @@ -1,18 +1,8 @@ import { ActionReducerMap, createFeatureSelector, createSelector } from "@ngrx/store"; -import { StarkMessageCollection } from "../entities"; import { StarkMessagePaneActions } from "../actions"; import { messagesReducer } from "./messages-pane.reducer"; import { starkMessagePaneStoreKey } from "../constants"; - -/** - * Defines the part of the state assigned to the {@link StarkMessagePaneModule} - */ -export interface StarkMessageState { - /** - * State corresponding to the {@link StarkMessagePaneModule} - */ - messages: StarkMessageCollection; -} +import { StarkMessageState } from "@nationalbankbelgium/stark-ui/src/common"; /** * Reducers assigned to the each property of the {@link StarkMessagePaneModule}'s state diff --git a/packages/stark-ui/src/modules/message-pane/reducers/messages-pane.reducer.spec.ts b/packages/stark-ui/src/modules/message-pane/reducers/messages-pane.reducer.spec.ts index bf0326d40c..5ce9b35bc9 100644 --- a/packages/stark-ui/src/modules/message-pane/reducers/messages-pane.reducer.spec.ts +++ b/packages/stark-ui/src/modules/message-pane/reducers/messages-pane.reducer.spec.ts @@ -1,7 +1,6 @@ -import { StarkMessage, StarkMessageType } from "../../../common/message"; +import { StarkMessage, StarkMessageCollection, StarkMessageType } from "@nationalbankbelgium/stark-ui/src/common"; import { StarkMessagePaneActions } from "../actions"; -import { StarkMessageCollection } from "../entities"; import { messagesReducer } from "./messages-pane.reducer"; diff --git a/packages/stark-ui/src/modules/message-pane/reducers/messages-pane.reducer.ts b/packages/stark-ui/src/modules/message-pane/reducers/messages-pane.reducer.ts index 1a4d10ec5c..e76e074b07 100644 --- a/packages/stark-ui/src/modules/message-pane/reducers/messages-pane.reducer.ts +++ b/packages/stark-ui/src/modules/message-pane/reducers/messages-pane.reducer.ts @@ -1,5 +1,4 @@ -import { StarkMessage, StarkMessageType } from "../../../common/message"; -import { StarkMessageCollection } from "../entities"; +import { StarkMessage, StarkMessageType, StarkMessageCollection } from "@nationalbankbelgium/stark-ui/src/common"; import { StarkMessagePaneActions } from "../actions"; import findIndex from "lodash-es/findIndex"; import { createReducer, on } from "@ngrx/store"; diff --git a/packages/stark-ui/src/modules/message-pane/services/message-pane.service.intf.ts b/packages/stark-ui/src/modules/message-pane/services/message-pane.service.intf.ts index 3af992870f..a3f102189e 100644 --- a/packages/stark-ui/src/modules/message-pane/services/message-pane.service.intf.ts +++ b/packages/stark-ui/src/modules/message-pane/services/message-pane.service.intf.ts @@ -1,7 +1,6 @@ import { Observable } from "rxjs"; import { InjectionToken } from "@angular/core"; -import { StarkMessage } from "../../../common/message"; -import { StarkMessageCollection } from "../entities"; +import { StarkMessage, StarkMessageCollection } from "@nationalbankbelgium/stark-ui/src/common"; /** * @ignore diff --git a/packages/stark-ui/src/modules/message-pane/services/message-pane.service.spec.ts b/packages/stark-ui/src/modules/message-pane/services/message-pane.service.spec.ts index 791de4174d..d6345c8adc 100644 --- a/packages/stark-ui/src/modules/message-pane/services/message-pane.service.spec.ts +++ b/packages/stark-ui/src/modules/message-pane/services/message-pane.service.spec.ts @@ -4,11 +4,15 @@ import { Store } from "@ngrx/store"; import { MockStarkLoggingService } from "@nationalbankbelgium/stark-core/testing"; -import { StarkMessage, StarkMessageImpl, StarkMessageType } from "../../../common/message"; -import { StarkUIApplicationState } from "../../../common/store"; +import { + StarkMessage, + StarkMessageCollection, + StarkMessageImpl, + StarkMessageType, + StarkUIApplicationState +} from "@nationalbankbelgium/stark-ui/src/common"; import { StarkMessagePaneServiceImpl } from "./message-pane.service"; -import { StarkMessageCollection } from "../entities"; import { StarkMessagePaneActions } from "../actions"; import SpyObj = jasmine.SpyObj; diff --git a/packages/stark-ui/src/modules/message-pane/services/message-pane.service.ts b/packages/stark-ui/src/modules/message-pane/services/message-pane.service.ts index 0d28809ea1..07a8c5455c 100644 --- a/packages/stark-ui/src/modules/message-pane/services/message-pane.service.ts +++ b/packages/stark-ui/src/modules/message-pane/services/message-pane.service.ts @@ -5,12 +5,10 @@ import { Inject, Injectable } from "@angular/core"; import { StarkMessagePaneService, starkMessagePaneServiceName } from "./message-pane.service.intf"; import { STARK_LOGGING_SERVICE, StarkLoggingService } from "@nationalbankbelgium/stark-core"; -import { StarkMessage, StarkMessageImpl } from "../../../common/message"; -import { StarkMessageCollection } from "../entities"; +import { StarkMessage, StarkMessageCollection, StarkUIApplicationState, StarkMessageImpl } from "@nationalbankbelgium/stark-ui/src/common"; import { StarkMessagePaneActions } from "../actions"; -import { StarkUIApplicationState } from "../../../common/store"; import { selectStarkMessages } from "../reducers"; /** diff --git a/packages/stark-ui/src/modules/minimap.ts b/packages/stark-ui/src/modules/minimap.ts index 762a023587..db18368b07 100644 --- a/packages/stark-ui/src/modules/minimap.ts +++ b/packages/stark-ui/src/modules/minimap.ts @@ -1,2 +1 @@ -export * from "./minimap/minimap.module"; -export * from "./minimap/components"; +export * from "./minimap/public_api"; diff --git a/packages/stark-ui/src/modules/minimap/components/minimap.component.ts b/packages/stark-ui/src/modules/minimap/components/minimap.component.ts index debb6052d2..3da7b80872 100644 --- a/packages/stark-ui/src/modules/minimap/components/minimap.component.ts +++ b/packages/stark-ui/src/modules/minimap/components/minimap.component.ts @@ -15,7 +15,7 @@ import { import { MatMenuTrigger } from "@angular/material/menu"; import { Subscription } from "rxjs"; import { StarkMinimapItemProperties } from "./item-properties.intf"; -import { AbstractStarkUiComponent } from "../../../common/classes/abstract-component"; +import { AbstractStarkUiComponent } from "@nationalbankbelgium/stark-ui/src/internal-common"; export type StarkMinimapComponentMode = "compact"; diff --git a/packages/stark-ui/src/modules/minimap/ng-package.json b/packages/stark-ui/src/modules/minimap/ng-package.json new file mode 100644 index 0000000000..d103aa0ee7 --- /dev/null +++ b/packages/stark-ui/src/modules/minimap/ng-package.json @@ -0,0 +1,9 @@ +{ + "$schema": "../../../../../node_modules/ng-packagr/ng-package.schema.json", + "lib": { + "entryFile": "public_api.ts", + "umdModuleIds": { + "@ngx-translate/core": "ngxTranslate.core" + } + } +} diff --git a/packages/stark-ui/src/modules/minimap/public_api.ts b/packages/stark-ui/src/modules/minimap/public_api.ts new file mode 100644 index 0000000000..e715d7f466 --- /dev/null +++ b/packages/stark-ui/src/modules/minimap/public_api.ts @@ -0,0 +1,3 @@ +/* eslint-disable unicorn/filename-case */ +export * from "./components"; +export * from "./minimap.module"; diff --git a/packages/stark-ui/src/modules/pagination.ts b/packages/stark-ui/src/modules/pagination.ts index be06e59348..4961477c4d 100644 --- a/packages/stark-ui/src/modules/pagination.ts +++ b/packages/stark-ui/src/modules/pagination.ts @@ -1,2 +1 @@ -export * from "./pagination/pagination.module"; -export * from "./pagination/components"; +export * from "./pagination/public_api"; diff --git a/packages/stark-ui/src/modules/pagination/components/pagination.component.spec.ts b/packages/stark-ui/src/modules/pagination/components/pagination.component.spec.ts index 7e7a43b4e6..b65c321a7c 100644 --- a/packages/stark-ui/src/modules/pagination/components/pagination.component.spec.ts +++ b/packages/stark-ui/src/modules/pagination/components/pagination.component.spec.ts @@ -17,8 +17,8 @@ import { Observer } from "rxjs"; import { StarkPaginationComponent } from "./pagination.component"; import { StarkPaginateEvent } from "./paginate-event.intf"; import { StarkPaginationConfig } from "./pagination-config.intf"; -import { StarkDropdownComponent, StarkDropdownModule } from "../../dropdown"; -import { StarkRestrictInputDirectiveModule } from "../../restrict-input-directive"; +import { StarkDropdownComponent, StarkDropdownModule } from "@nationalbankbelgium/stark-ui/src/modules/dropdown"; +import { StarkRestrictInputDirectiveModule } from "@nationalbankbelgium/stark-ui/src/modules/restrict-input-directive"; import SpyObj = jasmine.SpyObj; import createSpyObj = jasmine.createSpyObj; diff --git a/packages/stark-ui/src/modules/pagination/ng-package.json b/packages/stark-ui/src/modules/pagination/ng-package.json new file mode 100644 index 0000000000..f9599937e1 --- /dev/null +++ b/packages/stark-ui/src/modules/pagination/ng-package.json @@ -0,0 +1,10 @@ +{ + "$schema": "../../../../../node_modules/ng-packagr/ng-package.schema.json", + "lib": { + "entryFile": "public_api.ts", + "umdModuleIds": { + "@nationalbankbelgium/stark-core": "stark.core", + "lodash-es/isEqual": "lodash-es.isEqual" + } + } +} diff --git a/packages/stark-ui/src/modules/pagination/pagination.module.ts b/packages/stark-ui/src/modules/pagination/pagination.module.ts index d7628e9b03..ca68691f13 100644 --- a/packages/stark-ui/src/modules/pagination/pagination.module.ts +++ b/packages/stark-ui/src/modules/pagination/pagination.module.ts @@ -7,8 +7,8 @@ import { MatButtonModule } from "@angular/material/button"; import { MatTooltipModule } from "@angular/material/tooltip"; import { MatPaginatorModule } from "@angular/material/paginator"; import { StarkPaginationComponent } from "./components"; -import { StarkRestrictInputDirectiveModule } from "../restrict-input-directive/restrict-input-directive.module"; -import { StarkDropdownModule } from "../dropdown/dropdown.module"; +import { StarkRestrictInputDirectiveModule } from "@nationalbankbelgium/stark-ui/src/modules/restrict-input-directive"; +import { StarkDropdownModule } from "@nationalbankbelgium/stark-ui/src/modules/dropdown"; @NgModule({ declarations: [StarkPaginationComponent], diff --git a/packages/stark-ui/src/modules/pagination/public_api.ts b/packages/stark-ui/src/modules/pagination/public_api.ts new file mode 100644 index 0000000000..018033fd1e --- /dev/null +++ b/packages/stark-ui/src/modules/pagination/public_api.ts @@ -0,0 +1,3 @@ +/* eslint-disable unicorn/filename-case */ +export * from "./components"; +export * from "./pagination.module"; diff --git a/packages/stark-ui/src/modules/pretty-print.ts b/packages/stark-ui/src/modules/pretty-print.ts index 6244f2c83b..57e817696d 100644 --- a/packages/stark-ui/src/modules/pretty-print.ts +++ b/packages/stark-ui/src/modules/pretty-print.ts @@ -1,2 +1 @@ -export * from "./pretty-print/pretty-print.module"; -export * from "./pretty-print/components"; +export * from "./pretty-print/public_api"; diff --git a/packages/stark-ui/src/modules/pretty-print/components/pretty-print.component.ts b/packages/stark-ui/src/modules/pretty-print/components/pretty-print.component.ts index 64b2e5cd09..a901daafbf 100644 --- a/packages/stark-ui/src/modules/pretty-print/components/pretty-print.component.ts +++ b/packages/stark-ui/src/modules/pretty-print/components/pretty-print.component.ts @@ -22,7 +22,7 @@ import "prismjs/components/prism-css-extras.min.js"; import "prismjs/components/prism-scss.min.js"; /* eslint-enable */ import { STARK_LOGGING_SERVICE, StarkLoggingService } from "@nationalbankbelgium/stark-core"; -import { AbstractStarkUiComponent } from "../../../common/classes/abstract-component"; +import { AbstractStarkUiComponent } from "@nationalbankbelgium/stark-ui/src/internal-common"; /** * @ignore diff --git a/packages/stark-ui/src/modules/pretty-print/ng-package.json b/packages/stark-ui/src/modules/pretty-print/ng-package.json new file mode 100644 index 0000000000..81bf0c78d5 --- /dev/null +++ b/packages/stark-ui/src/modules/pretty-print/ng-package.json @@ -0,0 +1,11 @@ +{ + "$schema": "../../../../../node_modules/ng-packagr/ng-package.schema.json", + "lib": { + "entryFile": "public_api.ts", + "umdModuleIds": { + "@nationalbankbelgium/stark-core": "stark.core", + "@sqltools/formatter": "sqltools.formatter", + "prismjs": "Prism" + } + } +} diff --git a/packages/stark-ui/src/modules/pretty-print/public_api.ts b/packages/stark-ui/src/modules/pretty-print/public_api.ts new file mode 100644 index 0000000000..e23318cedb --- /dev/null +++ b/packages/stark-ui/src/modules/pretty-print/public_api.ts @@ -0,0 +1,3 @@ +/* eslint-disable unicorn/filename-case */ +export * from "./components"; +export * from "./pretty-print.module"; diff --git a/packages/stark-ui/src/modules/progress-indicator.ts b/packages/stark-ui/src/modules/progress-indicator.ts index 18aa232706..59a6a4b3d2 100644 --- a/packages/stark-ui/src/modules/progress-indicator.ts +++ b/packages/stark-ui/src/modules/progress-indicator.ts @@ -1,8 +1 @@ -export * from "./progress-indicator/progress-indicator.module"; -export * from "./progress-indicator/actions"; -export * from "./progress-indicator/components"; -export * from "./progress-indicator/constants"; -export * from "./progress-indicator/directives"; -export * from "./progress-indicator/entities"; -export * from "./progress-indicator/reducers"; -export * from "./progress-indicator/services"; +export * from "./progress-indicator/public_api"; diff --git a/packages/stark-ui/src/modules/progress-indicator/components/progress-indicator.component.ts b/packages/stark-ui/src/modules/progress-indicator/components/progress-indicator.component.ts index 2e4a20a21c..bbfd656088 100644 --- a/packages/stark-ui/src/modules/progress-indicator/components/progress-indicator.component.ts +++ b/packages/stark-ui/src/modules/progress-indicator/components/progress-indicator.component.ts @@ -1,7 +1,7 @@ import { ChangeDetectionStrategy, Component, ElementRef, Inject, OnInit, Renderer2, ViewEncapsulation } from "@angular/core"; import { STARK_LOGGING_SERVICE, StarkLoggingService } from "@nationalbankbelgium/stark-core"; -import { AbstractStarkUiComponent } from "../../../common/classes/abstract-component"; +import { AbstractStarkUiComponent } from "@nationalbankbelgium/stark-ui/src/internal-common"; /** * @ignore diff --git a/packages/stark-ui/src/modules/progress-indicator/directives/progress-indicator.directive.spec.ts b/packages/stark-ui/src/modules/progress-indicator/directives/progress-indicator.directive.spec.ts index 4a62d03b49..de8c495e06 100644 --- a/packages/stark-ui/src/modules/progress-indicator/directives/progress-indicator.directive.spec.ts +++ b/packages/stark-ui/src/modules/progress-indicator/directives/progress-indicator.directive.spec.ts @@ -4,7 +4,7 @@ import { StarkProgressIndicatorActions } from "../actions"; import { StarkProgressIndicatorFullConfig, StarkProgressIndicatorType } from "../entities"; import { StarkProgressIndicatorServiceImpl } from "../services"; import { progressIndicatorReducer } from "../reducers"; -import { StarkUIApplicationState } from "../../../common/store"; +import { StarkUIApplicationState } from "@nationalbankbelgium/stark-ui/src/common"; import Spy = jasmine.Spy; import { MockStore, provideMockStore } from "@ngrx/store/testing"; import { TestBed } from "@angular/core/testing"; diff --git a/packages/stark-ui/src/modules/progress-indicator/ng-package.json b/packages/stark-ui/src/modules/progress-indicator/ng-package.json new file mode 100644 index 0000000000..e9dd1d59c6 --- /dev/null +++ b/packages/stark-ui/src/modules/progress-indicator/ng-package.json @@ -0,0 +1,11 @@ +{ + "$schema": "../../../../../node_modules/ng-packagr/ng-package.schema.json", + "lib": { + "entryFile": "public_api.ts", + "umdModuleIds": { + "@nationalbankbelgium/stark-core": "stark.core", + "@ngrx/store": "ngrx.store", + "lodash-es/cloneDeep": "lodash-es.cloneDeep" + } + } +} diff --git a/packages/stark-ui/src/modules/progress-indicator/public_api.ts b/packages/stark-ui/src/modules/progress-indicator/public_api.ts new file mode 100644 index 0000000000..66e24f1b37 --- /dev/null +++ b/packages/stark-ui/src/modules/progress-indicator/public_api.ts @@ -0,0 +1,9 @@ +/* eslint-disable unicorn/filename-case */ +export * from "./actions"; +export * from "./components"; +export * from "./constants"; +export * from "./directives"; +export * from "./entities"; +export * from "./progress-indicator.module"; +export * from "./reducers"; +export * from "./services"; diff --git a/packages/stark-ui/src/modules/progress-indicator/services/progress-indicator.service.spec.ts b/packages/stark-ui/src/modules/progress-indicator/services/progress-indicator.service.spec.ts index 4a62d03b49..de8c495e06 100644 --- a/packages/stark-ui/src/modules/progress-indicator/services/progress-indicator.service.spec.ts +++ b/packages/stark-ui/src/modules/progress-indicator/services/progress-indicator.service.spec.ts @@ -4,7 +4,7 @@ import { StarkProgressIndicatorActions } from "../actions"; import { StarkProgressIndicatorFullConfig, StarkProgressIndicatorType } from "../entities"; import { StarkProgressIndicatorServiceImpl } from "../services"; import { progressIndicatorReducer } from "../reducers"; -import { StarkUIApplicationState } from "../../../common/store"; +import { StarkUIApplicationState } from "@nationalbankbelgium/stark-ui/src/common"; import Spy = jasmine.Spy; import { MockStore, provideMockStore } from "@ngrx/store/testing"; import { TestBed } from "@angular/core/testing"; diff --git a/packages/stark-ui/src/modules/progress-indicator/services/progress-indicator.service.ts b/packages/stark-ui/src/modules/progress-indicator/services/progress-indicator.service.ts index 476da56538..a4dfe00fb1 100644 --- a/packages/stark-ui/src/modules/progress-indicator/services/progress-indicator.service.ts +++ b/packages/stark-ui/src/modules/progress-indicator/services/progress-indicator.service.ts @@ -8,7 +8,7 @@ import { StarkProgressIndicatorService, starkProgressIndicatorServiceName } from import { StarkProgressIndicatorActions } from "../actions"; import { StarkProgressIndicatorFullConfig, StarkProgressIndicatorFullConfigImpl, StarkProgressIndicatorType } from "../entities"; import { selectStarkProgressIndicator } from "../reducers"; -import { StarkUIApplicationState } from "../../../common/store"; +import { StarkUIApplicationState } from "@nationalbankbelgium/stark-ui/src/common"; /** * @ignore diff --git a/packages/stark-ui/src/modules/restrict-input-directive.ts b/packages/stark-ui/src/modules/restrict-input-directive.ts index 04f4f8d069..81ee7077bd 100644 --- a/packages/stark-ui/src/modules/restrict-input-directive.ts +++ b/packages/stark-ui/src/modules/restrict-input-directive.ts @@ -1,2 +1 @@ -export * from "./restrict-input-directive/directives"; -export * from "./restrict-input-directive/restrict-input-directive.module"; +export * from "./restrict-input-directive/public_api"; diff --git a/packages/stark-ui/src/modules/restrict-input-directive/ng-package.json b/packages/stark-ui/src/modules/restrict-input-directive/ng-package.json new file mode 100644 index 0000000000..14692aa37a --- /dev/null +++ b/packages/stark-ui/src/modules/restrict-input-directive/ng-package.json @@ -0,0 +1,9 @@ +{ + "$schema": "../../../../../node_modules/ng-packagr/ng-package.schema.json", + "lib": { + "entryFile": "public_api.ts", + "umdModuleIds": { + "@nationalbankbelgium/stark-core": "stark.core" + } + } +} diff --git a/packages/stark-ui/src/modules/restrict-input-directive/public_api.ts b/packages/stark-ui/src/modules/restrict-input-directive/public_api.ts new file mode 100644 index 0000000000..988b81e8e7 --- /dev/null +++ b/packages/stark-ui/src/modules/restrict-input-directive/public_api.ts @@ -0,0 +1,3 @@ +/* eslint-disable unicorn/filename-case */ +export * from "./directives"; +export * from "./restrict-input-directive.module"; diff --git a/packages/stark-ui/src/modules/route-search.ts b/packages/stark-ui/src/modules/route-search.ts index 1421b932ea..80464f7e96 100644 --- a/packages/stark-ui/src/modules/route-search.ts +++ b/packages/stark-ui/src/modules/route-search.ts @@ -1,2 +1 @@ -export * from "./route-search/route-search.module"; -export * from "./route-search/components"; +export * from "./route-search/public_api"; diff --git a/packages/stark-ui/src/modules/route-search/components/route-search.component.spec.ts b/packages/stark-ui/src/modules/route-search/components/route-search.component.spec.ts index ec625e8051..f0432ee64b 100644 --- a/packages/stark-ui/src/modules/route-search/components/route-search.component.spec.ts +++ b/packages/stark-ui/src/modules/route-search/components/route-search.component.spec.ts @@ -19,9 +19,9 @@ import { STARK_LOGGING_SERVICE, STARK_ROUTING_SERVICE, StarkLocale } from "@nati import { MockStarkLoggingService, MockStarkRoutingService } from "@nationalbankbelgium/stark-core/testing"; import { StarkRouteSearchComponent } from "./route-search.component"; import { StarkRouteSearchEntry } from "../components"; -import { StarkMenuConfig, StarkMenuGroup } from "../../app-menu/components"; +import { StarkMenuConfig, StarkMenuGroup } from "@nationalbankbelgium/stark-ui/src/modules/app-menu"; import { of, throwError } from "rxjs"; -import { mergeUiTranslations } from "../../../common/translations"; +import { mergeUiTranslations } from "@nationalbankbelgium/stark-ui/src/common"; @Component({ selector: `host-component`, diff --git a/packages/stark-ui/src/modules/route-search/components/route-search.component.ts b/packages/stark-ui/src/modules/route-search/components/route-search.component.ts index cf980e014b..d31f0897c2 100644 --- a/packages/stark-ui/src/modules/route-search/components/route-search.component.ts +++ b/packages/stark-ui/src/modules/route-search/components/route-search.component.ts @@ -12,9 +12,9 @@ import { StarkLoggingService, StarkRoutingService } from "@nationalbankbelgium/stark-core"; -import { AbstractStarkUiComponent } from "../../../common/classes/abstract-component"; +import { AbstractStarkUiComponent } from "@nationalbankbelgium/stark-ui/src/internal-common"; import { StarkRouteSearchEntry } from "./route-search-entry.intf"; -import { StarkMenuConfig, StarkMenuGroup } from "../../app-menu/components"; +import { StarkMenuConfig, StarkMenuGroup } from "@nationalbankbelgium/stark-ui/src/modules/app-menu"; import sortBy from "lodash-es/sortBy"; /** diff --git a/packages/stark-ui/src/modules/route-search/ng-package.json b/packages/stark-ui/src/modules/route-search/ng-package.json new file mode 100644 index 0000000000..23978f0b41 --- /dev/null +++ b/packages/stark-ui/src/modules/route-search/ng-package.json @@ -0,0 +1,11 @@ +{ + "$schema": "../../../../../node_modules/ng-packagr/ng-package.schema.json", + "lib": { + "entryFile": "public_api.ts", + "umdModuleIds": { + "@nationalbankbelgium/stark-core": "stark.core", + "@ngx-translate/core": "ngxTranslate.core", + "lodash-es/sortBy": "lodash-es.sortBy" + } + } +} diff --git a/packages/stark-ui/src/modules/route-search/public_api.ts b/packages/stark-ui/src/modules/route-search/public_api.ts new file mode 100644 index 0000000000..cae7cae9a3 --- /dev/null +++ b/packages/stark-ui/src/modules/route-search/public_api.ts @@ -0,0 +1,3 @@ +/* eslint-disable unicorn/filename-case */ +export * from "./components"; +export * from "./route-search.module"; diff --git a/packages/stark-ui/src/modules/route-search/route-search.module.ts b/packages/stark-ui/src/modules/route-search/route-search.module.ts index 2170095d6e..e3632672e0 100644 --- a/packages/stark-ui/src/modules/route-search/route-search.module.ts +++ b/packages/stark-ui/src/modules/route-search/route-search.module.ts @@ -16,7 +16,7 @@ import { StarkRouteSearchComponent } from "./components"; import { translationsEn } from "./assets/translations/en"; import { translationsFr } from "./assets/translations/fr"; import { translationsNl } from "./assets/translations/nl"; -import { mergeUiTranslations } from "../../common/translations"; +import { mergeUiTranslations } from "@nationalbankbelgium/stark-ui/src/common"; @NgModule({ declarations: [StarkRouteSearchComponent], diff --git a/packages/stark-ui/src/modules/session-ui.ts b/packages/stark-ui/src/modules/session-ui.ts index 1ff9f56d13..7888c178da 100644 --- a/packages/stark-ui/src/modules/session-ui.ts +++ b/packages/stark-ui/src/modules/session-ui.ts @@ -1,5 +1 @@ -export * from "./session-ui/session-ui.module"; -export * from "./session-ui/pages"; -export * from "./session-ui/effects"; -export * from "./session-ui/entities"; -export * from "./session-ui/components"; +export * from "./session-ui/public_api"; diff --git a/packages/stark-ui/src/modules/session-ui/components/session-card/session-card.component.spec.ts b/packages/stark-ui/src/modules/session-ui/components/session-card/session-card.component.spec.ts index b938752b0f..80c5ca2765 100644 --- a/packages/stark-ui/src/modules/session-ui/components/session-card/session-card.component.spec.ts +++ b/packages/stark-ui/src/modules/session-ui/components/session-card/session-card.component.spec.ts @@ -5,7 +5,7 @@ import { Component } from "@angular/core"; import { MatCardModule } from "@angular/material/card"; import { STARK_LOGGING_SERVICE, STARK_ROUTING_SERVICE } from "@nationalbankbelgium/stark-core"; import { MockStarkLoggingService, MockStarkRoutingService } from "@nationalbankbelgium/stark-core/testing"; -import { StarkAppLogoModule } from "../../../app-logo"; +import { StarkAppLogoModule } from "@nationalbankbelgium/stark-ui/src/modules/app-logo"; import { StarkSessionCardComponent } from "./session-card.component"; @Component({ diff --git a/packages/stark-ui/src/modules/session-ui/ng-package.json b/packages/stark-ui/src/modules/session-ui/ng-package.json new file mode 100644 index 0000000000..c7ee2617a6 --- /dev/null +++ b/packages/stark-ui/src/modules/session-ui/ng-package.json @@ -0,0 +1,12 @@ +{ + "$schema": "../../../../../node_modules/ng-packagr/ng-package.schema.json", + "lib": { + "entryFile": "public_api.ts", + "umdModuleIds": { + "@nationalbankbelgium/stark-core": "stark.core", + "@ngrx/effects": "ngrx.effects", + "@ngx-translate/core": "ngxTranslate.core", + "@uirouter/angular": "uirouter.angular" + } + } +} diff --git a/packages/stark-ui/src/modules/session-ui/pages/login/login-page.component.spec.ts b/packages/stark-ui/src/modules/session-ui/pages/login/login-page.component.spec.ts index c21e3be819..9512f87199 100644 --- a/packages/stark-ui/src/modules/session-ui/pages/login/login-page.component.spec.ts +++ b/packages/stark-ui/src/modules/session-ui/pages/login/login-page.component.spec.ts @@ -18,7 +18,7 @@ import { MockStarkUserService } from "@nationalbankbelgium/stark-core/testing"; import { TranslateModule } from "@ngx-translate/core"; -import { StarkAppLogoModule } from "../../../app-logo"; +import { StarkAppLogoModule } from "@nationalbankbelgium/stark-ui/src/modules/app-logo"; import { StarkSessionCardComponent } from "../../components/session-card/session-card.component"; import { StarkLoginPageComponent } from "./login-page.component"; diff --git a/packages/stark-ui/src/modules/session-ui/pages/preloading/preloading-page.component.spec.ts b/packages/stark-ui/src/modules/session-ui/pages/preloading/preloading-page.component.spec.ts index 75db34b3a1..18c16382ca 100644 --- a/packages/stark-ui/src/modules/session-ui/pages/preloading/preloading-page.component.spec.ts +++ b/packages/stark-ui/src/modules/session-ui/pages/preloading/preloading-page.component.spec.ts @@ -18,7 +18,7 @@ import { MockStarkSessionService, MockStarkUserService } from "@nationalbankbelgium/stark-core/testing"; -import { StarkAppLogoModule } from "../../../app-logo"; +import { StarkAppLogoModule } from "@nationalbankbelgium/stark-ui/src/modules/app-logo"; import { StarkSessionCardComponent } from "../../components/session-card/session-card.component"; import { StarkPreloadingPageComponent } from "./preloading-page.component"; diff --git a/packages/stark-ui/src/modules/session-ui/pages/session-expired/session-expired-page.component.spec.ts b/packages/stark-ui/src/modules/session-ui/pages/session-expired/session-expired-page.component.spec.ts index bf3bbc0775..7a6a602adb 100644 --- a/packages/stark-ui/src/modules/session-ui/pages/session-expired/session-expired-page.component.spec.ts +++ b/packages/stark-ui/src/modules/session-ui/pages/session-expired/session-expired-page.component.spec.ts @@ -5,7 +5,7 @@ import { MatCardModule } from "@angular/material/card"; import { MatButtonModule } from "@angular/material/button"; import { STARK_APP_CONFIG, STARK_LOGGING_SERVICE, STARK_ROUTING_SERVICE, StarkApplicationConfig } from "@nationalbankbelgium/stark-core"; import { MockStarkLoggingService, MockStarkRoutingService } from "@nationalbankbelgium/stark-core/testing"; -import { StarkAppLogoModule } from "../../../app-logo"; +import { StarkAppLogoModule } from "@nationalbankbelgium/stark-ui/src/modules/app-logo"; import { StarkSessionCardComponent } from "../../components/session-card/session-card.component"; import { StarkSessionExpiredPageComponent } from "./session-expired-page.component"; diff --git a/packages/stark-ui/src/modules/session-ui/pages/session-logout/session-logout-page.component.spec.ts b/packages/stark-ui/src/modules/session-ui/pages/session-logout/session-logout-page.component.spec.ts index 9f9466fd29..ba0ad28650 100644 --- a/packages/stark-ui/src/modules/session-ui/pages/session-logout/session-logout-page.component.spec.ts +++ b/packages/stark-ui/src/modules/session-ui/pages/session-logout/session-logout-page.component.spec.ts @@ -4,7 +4,7 @@ import { CommonModule } from "@angular/common"; import { MatCardModule } from "@angular/material/card"; import { STARK_APP_CONFIG, STARK_LOGGING_SERVICE, STARK_ROUTING_SERVICE, StarkApplicationConfig } from "@nationalbankbelgium/stark-core"; import { MockStarkLoggingService, MockStarkRoutingService } from "@nationalbankbelgium/stark-core/testing"; -import { StarkAppLogoModule } from "../../../app-logo"; +import { StarkAppLogoModule } from "@nationalbankbelgium/stark-ui/src/modules/app-logo"; import { StarkSessionCardComponent } from "../../components/session-card/session-card.component"; import { StarkSessionLogoutPageComponent } from "./session-logout-page.component"; diff --git a/packages/stark-ui/src/modules/session-ui/public_api.ts b/packages/stark-ui/src/modules/session-ui/public_api.ts new file mode 100644 index 0000000000..4706b1bb7d --- /dev/null +++ b/packages/stark-ui/src/modules/session-ui/public_api.ts @@ -0,0 +1,6 @@ +/* eslint-disable unicorn/filename-case */ +export * from "./components"; +export * from "./effects"; +export * from "./entities"; +export * from "./pages"; +export * from "./session-ui.module"; diff --git a/packages/stark-ui/src/modules/session-ui/session-ui.module.ts b/packages/stark-ui/src/modules/session-ui/session-ui.module.ts index 86d2e000e9..92bcf63ae9 100644 --- a/packages/stark-ui/src/modules/session-ui/session-ui.module.ts +++ b/packages/stark-ui/src/modules/session-ui/session-ui.module.ts @@ -9,8 +9,8 @@ import { StarkLocale } from "@nationalbankbelgium/stark-core"; import { MatCardModule } from "@angular/material/card"; import { MatDividerModule } from "@angular/material/divider"; import { MatListModule } from "@angular/material/list"; -import { StarkAppLogoModule } from "../app-logo/app-logo.module"; -import { mergeUiTranslations } from "../../common/translations"; +import { StarkAppLogoModule } from "@nationalbankbelgium/stark-ui/src/modules/app-logo"; +import { mergeUiTranslations } from "@nationalbankbelgium/stark-ui/src/common"; import { STARK_SESSION_UI_CONFIG, StarkSessionUiConfig } from "./entities"; import { SESSION_UI_STATES } from "./routes"; import { diff --git a/packages/stark-ui/src/modules/slider.ts b/packages/stark-ui/src/modules/slider.ts index 23898b1b53..8cf4b8d4b8 100644 --- a/packages/stark-ui/src/modules/slider.ts +++ b/packages/stark-ui/src/modules/slider.ts @@ -1,2 +1 @@ -export * from "./slider/slider.module"; -export * from "./slider/components"; +export * from "./slider/public_api"; diff --git a/packages/stark-ui/src/modules/slider/components/slider.component.ts b/packages/stark-ui/src/modules/slider/components/slider.component.ts index cd827b9828..c8e82d9c2c 100644 --- a/packages/stark-ui/src/modules/slider/components/slider.component.ts +++ b/packages/stark-ui/src/modules/slider/components/slider.component.ts @@ -16,9 +16,9 @@ import { } from "@angular/core"; import * as noUiSliderLibrary from "nouislider"; import { STARK_LOGGING_SERVICE, StarkLoggingService } from "@nationalbankbelgium/stark-core"; -import { StarkDOMUtil } from "../../../util/dom"; +import { StarkDOMUtil } from "@nationalbankbelgium/stark-ui/src/util"; import { StarkSliderConfig } from "./slider-config.intf"; -import { AbstractStarkUiComponent } from "../../../common/classes/abstract-component"; +import { AbstractStarkUiComponent } from "@nationalbankbelgium/stark-ui/src/internal-common"; /** * @ignore diff --git a/packages/stark-ui/src/modules/slider/ng-package.json b/packages/stark-ui/src/modules/slider/ng-package.json new file mode 100644 index 0000000000..33fa01e236 --- /dev/null +++ b/packages/stark-ui/src/modules/slider/ng-package.json @@ -0,0 +1,11 @@ +{ + "$schema": "../../../../../node_modules/ng-packagr/ng-package.schema.json", + "lib": { + "entryFile": "public_api.ts", + "umdModuleIds": { + "@nationalbankbelgium/stark-core": "stark.core", + "nouislider": "nouislider", + "lodash-es/isEqual": "lodash-es.isEqual" + } + } +} diff --git a/packages/stark-ui/src/modules/slider/public_api.ts b/packages/stark-ui/src/modules/slider/public_api.ts new file mode 100644 index 0000000000..a795018a22 --- /dev/null +++ b/packages/stark-ui/src/modules/slider/public_api.ts @@ -0,0 +1,3 @@ +/* eslint-disable unicorn/filename-case */ +export * from "./components"; +export * from "./slider.module"; diff --git a/packages/stark-ui/src/modules/svg-view-box.ts b/packages/stark-ui/src/modules/svg-view-box.ts index 40cd6a1102..4a09f52879 100644 --- a/packages/stark-ui/src/modules/svg-view-box.ts +++ b/packages/stark-ui/src/modules/svg-view-box.ts @@ -1,2 +1 @@ -export * from "./svg-view-box/svg-view-box.module"; -export * from "./svg-view-box/directives"; +export * from "./svg-view-box/public_api"; diff --git a/packages/stark-ui/src/modules/svg-view-box/ng-package.json b/packages/stark-ui/src/modules/svg-view-box/ng-package.json new file mode 100644 index 0000000000..14692aa37a --- /dev/null +++ b/packages/stark-ui/src/modules/svg-view-box/ng-package.json @@ -0,0 +1,9 @@ +{ + "$schema": "../../../../../node_modules/ng-packagr/ng-package.schema.json", + "lib": { + "entryFile": "public_api.ts", + "umdModuleIds": { + "@nationalbankbelgium/stark-core": "stark.core" + } + } +} diff --git a/packages/stark-ui/src/modules/svg-view-box/package.json b/packages/stark-ui/src/modules/svg-view-box/package.json new file mode 100644 index 0000000000..d29fa6bed3 --- /dev/null +++ b/packages/stark-ui/src/modules/svg-view-box/package.json @@ -0,0 +1,10 @@ +{ + "ngPackage": { + "lib": { + "entryFile": "public_api.ts", + "umdModuleIds": { + "@nationalbankbelgium/stark-core": "stark.core" + } + } + } +} diff --git a/packages/stark-ui/src/modules/svg-view-box/public_api.ts b/packages/stark-ui/src/modules/svg-view-box/public_api.ts new file mode 100644 index 0000000000..dc404414cd --- /dev/null +++ b/packages/stark-ui/src/modules/svg-view-box/public_api.ts @@ -0,0 +1,3 @@ +/* eslint-disable unicorn/filename-case */ +export * from "./directives"; +export * from "./svg-view-box.module"; diff --git a/packages/stark-ui/src/modules/table.ts b/packages/stark-ui/src/modules/table.ts index 9a4b908d15..abb7db6ed2 100644 --- a/packages/stark-ui/src/modules/table.ts +++ b/packages/stark-ui/src/modules/table.ts @@ -1,4 +1 @@ -export * from "./table/table.module"; -export * from "./table/components"; -export * from "./table/directives"; -export * from "./table/entities"; +export * from "./table/public_api"; diff --git a/packages/stark-ui/src/modules/table/components/column.component.ts b/packages/stark-ui/src/modules/table/components/column.component.ts index a87685691e..aef5604ea1 100644 --- a/packages/stark-ui/src/modules/table/components/column.component.ts +++ b/packages/stark-ui/src/modules/table/components/column.component.ts @@ -14,6 +14,7 @@ import { ViewChild, ViewEncapsulation } from "@angular/core"; +import { AbstractStarkUiComponent } from "@nationalbankbelgium/stark-ui/src/internal-common"; import { BooleanInput, coerceBooleanProperty } from "@angular/cdk/coercion"; import { FormControl } from "@angular/forms"; import { MenuPositionY } from "@angular/material/menu"; @@ -21,7 +22,6 @@ import { MatColumnDef } from "@angular/material/table"; import { distinctUntilChanged } from "rxjs/operators"; import isEqual from "lodash-es/isEqual"; import get from "lodash-es/get"; -import { AbstractStarkUiComponent } from "../../../common/classes/abstract-component"; import { StarkColumnCellClickedOutput, StarkColumnFilterChangedOutput, diff --git a/packages/stark-ui/src/modules/table/components/dialogs/multisort.component.ts b/packages/stark-ui/src/modules/table/components/dialogs/multisort.component.ts index feefcfc57a..5b5ddd63f3 100644 --- a/packages/stark-ui/src/modules/table/components/dialogs/multisort.component.ts +++ b/packages/stark-ui/src/modules/table/components/dialogs/multisort.component.ts @@ -1,7 +1,7 @@ import { ChangeDetectionStrategy, Component, ElementRef, Inject, OnInit, Renderer2, ViewEncapsulation } from "@angular/core"; import { MAT_DIALOG_DATA, MatDialogRef } from "@angular/material/dialog"; import { StarkTableColumnComponent } from "../column.component"; -import { AbstractStarkUiComponent } from "../../../../common/classes/abstract-component"; +import { AbstractStarkUiComponent } from "@nationalbankbelgium/stark-ui/src/internal-common"; import { StarkTableColumnSortingDirection } from "../../entities"; /** diff --git a/packages/stark-ui/src/modules/table/components/table.component.spec.ts b/packages/stark-ui/src/modules/table/components/table.component.spec.ts index 32dce8d9ba..930efb06cc 100644 --- a/packages/stark-ui/src/modules/table/components/table.component.spec.ts +++ b/packages/stark-ui/src/modules/table/components/table.component.spec.ts @@ -17,12 +17,12 @@ import { By } from "@angular/platform-browser"; import { TranslateModule, TranslateService } from "@ngx-translate/core"; import { STARK_LOGGING_SERVICE } from "@nationalbankbelgium/stark-core"; import { MockStarkLoggingService } from "@nationalbankbelgium/stark-core/testing"; -import { StarkAction, StarkActionBarModule } from "../../action-bar"; +import { StarkAction, StarkActionBarModule } from "@nationalbankbelgium/stark-ui/src/modules/action-bar"; import { StarkTableMultisortDialogComponent } from "./dialogs/multisort.component"; import { StarkTableComponent } from "./table.component"; import { StarkTableColumnComponent } from "./column.component"; -import { StarkMinimapModule } from "../../minimap"; -import { StarkPaginationModule } from "../../pagination"; +import { StarkMinimapModule } from "@nationalbankbelgium/stark-ui/src/modules/minimap"; +import { StarkPaginationModule } from "@nationalbankbelgium/stark-ui/src/modules/pagination"; import { StarkTableRowContentDirective } from "../directives/table-row-content.directive"; import { StarkTableColumnFilter, StarkTableColumnProperties, StarkTableFilter, StarkTableRowActions } from "../entities"; import find from "lodash-es/find"; diff --git a/packages/stark-ui/src/modules/table/components/table.component.ts b/packages/stark-ui/src/modules/table/components/table.component.ts index 33631d197e..445de74463 100644 --- a/packages/stark-ui/src/modules/table/components/table.component.ts +++ b/packages/stark-ui/src/modules/table/components/table.component.ts @@ -32,7 +32,7 @@ import { distinctUntilChanged } from "rxjs/operators"; import { StarkTableColumnComponent } from "./column.component"; import { StarkSortingRule, StarkTableMultisortDialogComponent, StarkTableMultisortDialogData } from "./dialogs/multisort.component"; -import { StarkAction, StarkActionBarConfig } from "../../action-bar/components"; +import { StarkAction, StarkActionBarConfig } from "@nationalbankbelgium/stark-ui/src/modules/action-bar"; import { StarkColumnCellClickedOutput, StarkColumnFilterChangedOutput, @@ -43,9 +43,9 @@ import { StarkTableFilter, StarkTableRowActions } from "../entities"; -import { AbstractStarkUiComponent } from "../../../common/classes/abstract-component"; -import { StarkPaginateEvent, StarkPaginationComponent, StarkPaginationConfig } from "../../pagination/components"; -import { StarkMinimapComponentMode, StarkMinimapItemProperties } from "../../minimap/components"; +import { AbstractStarkUiComponent } from "@nationalbankbelgium/stark-ui/src/internal-common"; +import { StarkPaginateEvent, StarkPaginationComponent, StarkPaginationConfig } from "@nationalbankbelgium/stark-ui/src/modules/pagination"; +import { StarkMinimapComponentMode, StarkMinimapItemProperties } from "@nationalbankbelgium/stark-ui/src/modules/minimap"; import find from "lodash-es/find"; import findIndex from "lodash-es/findIndex"; import { trigger, state, style, transition, animate } from "@angular/animations"; diff --git a/packages/stark-ui/src/modules/table/entities/table-row-actions.intf.ts b/packages/stark-ui/src/modules/table/entities/table-row-actions.intf.ts index d0809b2863..ec3115de92 100644 --- a/packages/stark-ui/src/modules/table/entities/table-row-actions.intf.ts +++ b/packages/stark-ui/src/modules/table/entities/table-row-actions.intf.ts @@ -1,4 +1,4 @@ -import { StarkActionBarConfig } from "../../action-bar/components"; +import { StarkActionBarConfig } from "@nationalbankbelgium/stark-ui/src/modules/action-bar"; /** * StarkTableRowActions interface diff --git a/packages/stark-ui/src/modules/table/ng-package.json b/packages/stark-ui/src/modules/table/ng-package.json new file mode 100644 index 0000000000..c3cb32c89a --- /dev/null +++ b/packages/stark-ui/src/modules/table/ng-package.json @@ -0,0 +1,14 @@ +{ + "$schema": "../../../../../node_modules/ng-packagr/ng-package.schema.json", + "lib": { + "entryFile": "public_api.ts", + "umdModuleIds": { + "@nationalbankbelgium/stark-core": "stark.core", + "@ngx-translate/core": "ngxTranslate.core", + "lodash-es/find": "lodash-es.find", + "lodash-es/findIndex": "lodash-es.findIndex", + "lodash-es/get": "lodash-es.get", + "lodash-es/isEqual": "lodash-es.isEqual" + } + } +} diff --git a/packages/stark-ui/src/modules/table/public_api.ts b/packages/stark-ui/src/modules/table/public_api.ts new file mode 100644 index 0000000000..256e24eea3 --- /dev/null +++ b/packages/stark-ui/src/modules/table/public_api.ts @@ -0,0 +1,5 @@ +/* eslint-disable unicorn/filename-case */ +export * from "./components"; +export * from "./directives"; +export * from "./entities"; +export * from "./table.module"; diff --git a/packages/stark-ui/src/modules/table/table.module.ts b/packages/stark-ui/src/modules/table/table.module.ts index 4999d4b209..2c6bf99497 100644 --- a/packages/stark-ui/src/modules/table/table.module.ts +++ b/packages/stark-ui/src/modules/table/table.module.ts @@ -15,13 +15,13 @@ import { TranslateModule, TranslateService } from "@ngx-translate/core"; import { StarkLocale } from "@nationalbankbelgium/stark-core"; import { StarkTableColumnComponent, StarkTableComponent } from "./components"; import { StarkTableMultisortDialogComponent } from "./components/dialogs/multisort.component"; -import { StarkActionBarModule } from "../action-bar/action-bar.module"; -import { StarkPaginationModule } from "../pagination/pagination.module"; -import { StarkMinimapModule } from "../minimap/minimap.module"; +import { StarkActionBarModule } from "@nationalbankbelgium/stark-ui/src/modules/action-bar"; +import { StarkPaginationModule } from "@nationalbankbelgium/stark-ui/src/modules/pagination"; +import { StarkMinimapModule } from "@nationalbankbelgium/stark-ui/src/modules/minimap"; import { translationsEn } from "./assets/translations/en"; import { translationsFr } from "./assets/translations/fr"; import { translationsNl } from "./assets/translations/nl"; -import { mergeUiTranslations } from "../../common/translations"; +import { mergeUiTranslations } from "@nationalbankbelgium/stark-ui/src/common"; import { StarkTableExpandDetailDirective } from "./directives/table-expand-detail.directive"; import { StarkTableRowContentDirective } from "./directives/table-row-content.directive"; diff --git a/packages/stark-ui/src/modules/toast-notification.ts b/packages/stark-ui/src/modules/toast-notification.ts index 90a423aae9..cdefef7cbc 100644 --- a/packages/stark-ui/src/modules/toast-notification.ts +++ b/packages/stark-ui/src/modules/toast-notification.ts @@ -1,3 +1 @@ -export * from "./toast-notification/toast-notification.module"; -export * from "./toast-notification/components"; -export * from "./toast-notification/services"; +export * from "./toast-notification/public_api"; diff --git a/packages/stark-ui/src/modules/toast-notification/components/toast-message.intf.ts b/packages/stark-ui/src/modules/toast-notification/components/toast-message.intf.ts index f565872cc8..49d5c9de31 100644 --- a/packages/stark-ui/src/modules/toast-notification/components/toast-message.intf.ts +++ b/packages/stark-ui/src/modules/toast-notification/components/toast-message.intf.ts @@ -1,4 +1,4 @@ -import { StarkMessage } from "../../../common/message"; +import { StarkMessage } from "@nationalbankbelgium/stark-ui/src/common"; /** * Stark Toast Notification Message Interface diff --git a/packages/stark-ui/src/modules/toast-notification/components/toast-notification.component.spec.ts b/packages/stark-ui/src/modules/toast-notification/components/toast-notification.component.spec.ts index 416063beb8..1b2ed4e6a0 100644 --- a/packages/stark-ui/src/modules/toast-notification/components/toast-notification.component.spec.ts +++ b/packages/stark-ui/src/modules/toast-notification/components/toast-notification.component.spec.ts @@ -7,7 +7,7 @@ import { MatIconTestingModule } from "@angular/material/icon/testing"; import { TranslateModule } from "@ngx-translate/core"; import { STARK_LOGGING_SERVICE } from "@nationalbankbelgium/stark-core"; import { MockStarkLoggingService } from "@nationalbankbelgium/stark-core/testing"; -import { StarkMessageType } from "../../../common/message"; +import { StarkMessageType } from "@nationalbankbelgium/stark-ui/src/common"; import { StarkToastNotificationComponent } from "./toast-notification.component"; @Component({ diff --git a/packages/stark-ui/src/modules/toast-notification/components/toast-notification.component.ts b/packages/stark-ui/src/modules/toast-notification/components/toast-notification.component.ts index cdabfd4fa8..3af571b0c3 100644 --- a/packages/stark-ui/src/modules/toast-notification/components/toast-notification.component.ts +++ b/packages/stark-ui/src/modules/toast-notification/components/toast-notification.component.ts @@ -1,9 +1,9 @@ import { ChangeDetectionStrategy, Component, ElementRef, Inject, OnInit, Renderer2, ViewEncapsulation } from "@angular/core"; import { MAT_SNACK_BAR_DATA, MatSnackBar } from "@angular/material/snack-bar"; import { STARK_LOGGING_SERVICE, StarkLoggingService } from "@nationalbankbelgium/stark-core"; -import { StarkMessageType } from "../../../common/message"; +import { StarkMessageType } from "@nationalbankbelgium/stark-ui/src/common"; import { StarkToastMessage } from "./toast-message.intf"; -import { AbstractStarkUiComponent } from "../../../common/classes/abstract-component"; +import { AbstractStarkUiComponent } from "@nationalbankbelgium/stark-ui/src/internal-common"; /** * @ignore diff --git a/packages/stark-ui/src/modules/toast-notification/ng-package.json b/packages/stark-ui/src/modules/toast-notification/ng-package.json new file mode 100644 index 0000000000..5e184c7ada --- /dev/null +++ b/packages/stark-ui/src/modules/toast-notification/ng-package.json @@ -0,0 +1,10 @@ +{ + "$schema": "../../../../../node_modules/ng-packagr/ng-package.schema.json", + "lib": { + "entryFile": "public_api.ts", + "umdModuleIds": { + "@nationalbankbelgium/stark-core": "stark.core", + "@ngx-translate/core": "ngxTranslate.core" + } + } +} diff --git a/packages/stark-ui/src/modules/toast-notification/public_api.ts b/packages/stark-ui/src/modules/toast-notification/public_api.ts new file mode 100644 index 0000000000..d81c1e85c4 --- /dev/null +++ b/packages/stark-ui/src/modules/toast-notification/public_api.ts @@ -0,0 +1,4 @@ +/* eslint-disable unicorn/filename-case */ +export * from "./components"; +export * from "./services"; +export * from "./toast-notification.module"; diff --git a/packages/stark-ui/src/modules/toast-notification/services/toast-notification.service.spec.ts b/packages/stark-ui/src/modules/toast-notification/services/toast-notification.service.spec.ts index d3dea7d28d..0753a8a12e 100644 --- a/packages/stark-ui/src/modules/toast-notification/services/toast-notification.service.spec.ts +++ b/packages/stark-ui/src/modules/toast-notification/services/toast-notification.service.spec.ts @@ -3,7 +3,7 @@ import SpyObj = jasmine.SpyObj; import { ApplicationRef } from "@angular/core"; import { fakeAsync, tick, waitForAsync } from "@angular/core/testing"; import { MatSnackBar, MatSnackBarConfig, MatSnackBarDismiss, MatSnackBarRef } from "@angular/material/snack-bar"; -import { StarkMessageType } from "../../../common/message"; +import { StarkMessageType } from "@nationalbankbelgium/stark-ui/src/common"; import { StarkToastMessage, StarkToastNotificationComponent } from "../components"; import { StarkToastNotificationResult } from "./toast-notification-result.intf"; import { StarkToastNotificationServiceImpl } from "./toast-notification.service"; diff --git a/packages/stark-ui/src/modules/transform-input-directive.ts b/packages/stark-ui/src/modules/transform-input-directive.ts index ea820d997a..d73cef5f88 100644 --- a/packages/stark-ui/src/modules/transform-input-directive.ts +++ b/packages/stark-ui/src/modules/transform-input-directive.ts @@ -1,2 +1 @@ -export * from "./transform-input-directive/directives"; -export * from "./transform-input-directive/transform-input-directive.module"; +export * from "./transform-input-directive/public_api"; diff --git a/packages/stark-ui/src/modules/transform-input-directive/ng-package.json b/packages/stark-ui/src/modules/transform-input-directive/ng-package.json new file mode 100644 index 0000000000..9b4ec60049 --- /dev/null +++ b/packages/stark-ui/src/modules/transform-input-directive/ng-package.json @@ -0,0 +1,6 @@ +{ + "$schema": "../../../../../node_modules/ng-packagr/ng-package.schema.json", + "lib": { + "entryFile": "public_api.ts" + } +} diff --git a/packages/stark-ui/src/modules/transform-input-directive/public_api.ts b/packages/stark-ui/src/modules/transform-input-directive/public_api.ts new file mode 100644 index 0000000000..24cfdfc39d --- /dev/null +++ b/packages/stark-ui/src/modules/transform-input-directive/public_api.ts @@ -0,0 +1,3 @@ +/* eslint-disable unicorn/filename-case */ +export * from "./directives"; +export * from "./transform-input-directive.module"; diff --git a/packages/stark-ui/src/stark-ui.ts b/packages/stark-ui/src/stark-ui.ts deleted file mode 100644 index 250bbf6ae7..0000000000 --- a/packages/stark-ui/src/stark-ui.ts +++ /dev/null @@ -1,4 +0,0 @@ -// Export all submodules here -export * from "./common"; -export * from "./modules"; -export * from "./util"; diff --git a/packages/stark-ui/src/util.ts b/packages/stark-ui/src/util.ts index f9ae097faa..9dd1a496cb 100644 --- a/packages/stark-ui/src/util.ts +++ b/packages/stark-ui/src/util.ts @@ -1,2 +1 @@ -export * from "./util/dom"; -export * from "./util/form"; +export * from "./util/public_api"; diff --git a/packages/stark-ui/src/util/ng-package.json b/packages/stark-ui/src/util/ng-package.json new file mode 100644 index 0000000000..4878aeacd3 --- /dev/null +++ b/packages/stark-ui/src/util/ng-package.json @@ -0,0 +1,6 @@ +{ + "$schema": "../../../../node_modules/ng-packagr/ng-package.schema.json", + "lib": { + "entryFile": "public_api.ts" + } +} diff --git a/packages/stark-ui/src/util/public_api.ts b/packages/stark-ui/src/util/public_api.ts new file mode 100644 index 0000000000..9bf418cd3c --- /dev/null +++ b/packages/stark-ui/src/util/public_api.ts @@ -0,0 +1,3 @@ +/* eslint-disable unicorn/filename-case */ +export * from "./dom"; +export * from "./form"; diff --git a/packages/stark-ui/tsconfig.json b/packages/stark-ui/tsconfig.json index 00a453c9c5..00715f982e 100644 --- a/packages/stark-ui/tsconfig.json +++ b/packages/stark-ui/tsconfig.json @@ -3,12 +3,14 @@ "compilerOptions": { "baseUrl": ".", "rootDir": ".", + "emitDecoratorMetadata": false, "typeRoots": ["../../node_modules/@types", "../stark-build/typings", "./typings"], "emitDecoratorMetadata": false, "paths": { "@nationalbankbelgium/stark-core": ["../../dist/packages/stark-core"], "@nationalbankbelgium/stark-core/testing": ["../../dist/packages/stark-core/testing"], - "@nationalbankbelgium/stark-ui": ["./public_api.ts"], + "@nationalbankbelgium/stark-ui/*": ["./*", "."], + "@nationalbankbelgium/stark-ui": ["../../dist/packages/stark-ui/*", "../../dist/packages/stark-ui"], "@nationalbankbelgium/stark-ui/testing": ["./testing/public_api.ts"], "environments/environment": ["../../dist/packages/stark-core/src/common/environment"] }, From a88946a66047e1dec5ca1970f778498f086ec476 Mon Sep 17 00:00:00 2001 From: Alexis Georges Date: Wed, 25 Aug 2021 12:55:52 +0200 Subject: [PATCH 2/2] refactor(showcase): refactor code structure to improve performance and lazy loading MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Reduce main bundle size from ±10.5 MB to ±2 MB Create new modules: - ExampleViewerModule - HomeModule WelcomeModule is now lazy loaded when accessing pages: - ^/welcome/getting-started - ^/welcome/news - ^/welcome/reactive-form-errors ExampleViewerModule is now a common chunk used by: - DemoRBACModule - DemoUIModule - StyleguideModule - WelcomeModule --- showcase/src/app/app-menu.config.ts | 6 +-- showcase/src/app/app.module.ts | 4 +- showcase/src/app/app.routes.ts | 11 +++-- .../src/app/demo-rbac/demo-rbac.module.ts | 4 +- showcase/src/app/demo-ui/demo-ui.module.ts | 2 + .../components}/_example-viewer-theme.scss | 0 .../components}/example-viewer.component.html | 0 .../components}/example-viewer.component.scss | 0 .../example-viewer.component.spec.ts | 2 +- .../components}/example-viewer.component.ts | 2 +- .../components}/index.ts | 0 .../example-viewer/example-viewer.module.ts | 12 +++++ showcase/src/app/example-viewer/index.ts | 3 ++ .../services/file.service.ts | 0 .../services/index.ts | 0 showcase/src/app/home/home.module.ts | 19 +++++++ showcase/src/app/home/index.ts | 2 + .../pages/home/_home-page-theme.scss | 0 .../pages/home/_home-page.component.scss | 0 .../pages/home/home-page.component.html | 0 .../pages/home/home-page.component.spec.ts | 0 .../pages/home/home-page.component.ts | 0 .../pages/home/home-page.e2e.ts | 0 .../app/{welcome => home}/pages/home/index.ts | 0 showcase/src/app/home/pages/index.ts | 2 + .../pages/no-content/index.ts | 0 .../no-content/no-content-page.component.html | 0 .../no-content/no-content-page.component.ts | 0 showcase/src/app/home/routes.ts | 24 +++++++++ showcase/src/app/shared/components/index.ts | 1 - showcase/src/app/shared/index.ts | 1 - showcase/src/app/shared/shared.module.ts | 8 +-- .../src/app/styleguide/styleguide.module.ts | 4 +- showcase/src/app/welcome/pages/index.ts | 2 - showcase/src/app/welcome/routes.ts | 49 +++++-------------- showcase/src/app/welcome/welcome.module.ts | 21 ++------ showcase/src/styles/_theme.scss | 4 +- showcase/src/styles/styles.scss | 2 +- 38 files changed, 105 insertions(+), 80 deletions(-) rename showcase/src/app/{shared/components/example-viewer => example-viewer/components}/_example-viewer-theme.scss (100%) rename showcase/src/app/{shared/components/example-viewer => example-viewer/components}/example-viewer.component.html (100%) rename showcase/src/app/{shared/components/example-viewer => example-viewer/components}/example-viewer.component.scss (100%) rename showcase/src/app/{shared/components/example-viewer => example-viewer/components}/example-viewer.component.spec.ts (99%) rename showcase/src/app/{shared/components/example-viewer => example-viewer/components}/example-viewer.component.ts (98%) rename showcase/src/app/{shared/components/example-viewer => example-viewer/components}/index.ts (100%) create mode 100644 showcase/src/app/example-viewer/example-viewer.module.ts create mode 100644 showcase/src/app/example-viewer/index.ts rename showcase/src/app/{shared => example-viewer}/services/file.service.ts (100%) rename showcase/src/app/{shared => example-viewer}/services/index.ts (100%) create mode 100644 showcase/src/app/home/home.module.ts create mode 100644 showcase/src/app/home/index.ts rename showcase/src/app/{welcome => home}/pages/home/_home-page-theme.scss (100%) rename showcase/src/app/{welcome => home}/pages/home/_home-page.component.scss (100%) rename showcase/src/app/{welcome => home}/pages/home/home-page.component.html (100%) rename showcase/src/app/{welcome => home}/pages/home/home-page.component.spec.ts (100%) rename showcase/src/app/{welcome => home}/pages/home/home-page.component.ts (100%) rename showcase/src/app/{welcome => home}/pages/home/home-page.e2e.ts (100%) rename showcase/src/app/{welcome => home}/pages/home/index.ts (100%) create mode 100644 showcase/src/app/home/pages/index.ts rename showcase/src/app/{welcome => home}/pages/no-content/index.ts (100%) rename showcase/src/app/{welcome => home}/pages/no-content/no-content-page.component.html (100%) rename showcase/src/app/{welcome => home}/pages/no-content/no-content-page.component.ts (100%) create mode 100644 showcase/src/app/home/routes.ts diff --git a/showcase/src/app/app-menu.config.ts b/showcase/src/app/app-menu.config.ts index 0506d70ee6..954b9b01ab 100644 --- a/showcase/src/app/app-menu.config.ts +++ b/showcase/src/app/app-menu.config.ts @@ -18,21 +18,21 @@ export const APP_MENU_CONFIG: StarkMenuConfig = { label: "SHOWCASE.GETTING_STARTED.TITLE", isVisible: true, isEnabled: true, - targetState: "getting-started" + targetState: "welcome.getting-started" }, { id: "menu-news", label: "SHOWCASE.NEWS.TITLE", isVisible: true, isEnabled: true, - targetState: "news" + targetState: "welcome.news" }, { id: "reactive-form-errors", label: "SHOWCASE.NGX_FORM_ERRORS.TITLE", isVisible: true, isEnabled: true, - targetState: "reactive-form-errors" + targetState: "welcome.reactive-form-errors" } ] }, diff --git a/showcase/src/app/app.module.ts b/showcase/src/app/app.module.ts index 0e8cf41f9b..292603fdb4 100644 --- a/showcase/src/app/app.module.ts +++ b/showcase/src/app/app.module.ts @@ -57,7 +57,7 @@ import { } from "@nationalbankbelgium/stark-ui"; import { SharedModule } from "./shared/shared.module"; import { InMemoryDataModule } from "./in-memory-data/in-memory-data.module"; -import { WelcomeModule } from "./welcome/welcome.module"; +import { HomeModule } from "./home/home.module"; import { logRegisteredStates, routerConfigFn } from "./router.config"; import { registerMaterialIconSet } from "./material-icons.config"; import { Deserialize } from "cerialize"; @@ -207,7 +207,7 @@ export const metaReducers: MetaReducer[] = ENV === "development" ? [logge } }), SharedModule, - WelcomeModule, + HomeModule, StarkAppFooterModule, StarkAppDataModule, StarkAppLogoModule, diff --git a/showcase/src/app/app.routes.ts b/showcase/src/app/app.routes.ts index 23a300c38e..c6c9c8bf56 100644 --- a/showcase/src/app/app.routes.ts +++ b/showcase/src/app/app.routes.ts @@ -7,19 +7,24 @@ export const APP_STATES: Ng2StateDeclaration[] = [ url: "/", component: AppComponent }, + { + name: "welcome.**", + url: "^/welcome", // use ^ to avoid double slash "//" in the URL after the domain (https://github.com/angular-ui/ui-router/wiki/URL-Routing#absolute-routes-) + loadChildren: (): any => import("./welcome/welcome.module").then((x) => x.WelcomeModule) // lazy loaded module + }, { name: "demo-ui.**", url: "^/demo-ui", // use ^ to avoid double slash "//" in the URL after the domain (https://github.com/angular-ui/ui-router/wiki/URL-Routing#absolute-routes-) - loadChildren: (): any => import("./demo-ui/demo-ui.module").then((x: any) => x.DemoUiModule) // lazy loaded module + loadChildren: (): any => import("./demo-ui/demo-ui.module").then((x) => x.DemoUiModule) // lazy loaded module }, { name: "demo-rbac.**", url: "^/demo-rbac", // use ^ to avoid double slash "//" in the URL after the domain (https://github.com/angular-ui/ui-router/wiki/URL-Routing#absolute-routes-) - loadChildren: (): any => import("./demo-rbac/demo-rbac.module").then((x: any) => x.DemoRBACModule) // lazy loaded module + loadChildren: (): any => import("./demo-rbac/demo-rbac.module").then((x) => x.DemoRBACModule) // lazy loaded module }, { name: "styleguide.**", url: "^/styleguide", // use ^ to avoid double slash "//" in the URL after the domain (https://github.com/angular-ui/ui-router/wiki/URL-Routing#absolute-routes-) - loadChildren: (): any => import("./styleguide/styleguide.module").then((x: any) => x.StyleguideModule) // lazy loaded module + loadChildren: (): any => import("./styleguide/styleguide.module").then((x) => x.StyleguideModule) // lazy loaded module } ]; diff --git a/showcase/src/app/demo-rbac/demo-rbac.module.ts b/showcase/src/app/demo-rbac/demo-rbac.module.ts index fb837937dc..f835a3ff41 100644 --- a/showcase/src/app/demo-rbac/demo-rbac.module.ts +++ b/showcase/src/app/demo-rbac/demo-rbac.module.ts @@ -4,6 +4,7 @@ import { StarkRBACAuthorizationModule } from "@nationalbankbelgium/stark-rbac"; import { DEMO_STATES } from "./routes"; import { SharedModule } from "../shared"; import { DemoAuthorizationDirectivesPageComponent, DemoAuthorizationServicePageComponent, DemoProtectedPageComponent } from "./pages"; +import { ExampleViewerModule } from "../example-viewer"; @NgModule({ imports: [ @@ -11,7 +12,8 @@ import { DemoAuthorizationDirectivesPageComponent, DemoAuthorizationServicePageC states: DEMO_STATES }), SharedModule, - StarkRBACAuthorizationModule + StarkRBACAuthorizationModule, + ExampleViewerModule ], declarations: [DemoAuthorizationDirectivesPageComponent, DemoAuthorizationServicePageComponent, DemoProtectedPageComponent], exports: [DemoAuthorizationDirectivesPageComponent, DemoAuthorizationServicePageComponent, DemoProtectedPageComponent], diff --git a/showcase/src/app/demo-ui/demo-ui.module.ts b/showcase/src/app/demo-ui/demo-ui.module.ts index 79de5c6a9b..925f3e6bbd 100644 --- a/showcase/src/app/demo-ui/demo-ui.module.ts +++ b/showcase/src/app/demo-ui/demo-ui.module.ts @@ -80,6 +80,7 @@ import { TableWithTranscludedActionBarComponent, TableWithCollapsibleRowsComponent } from "./components"; +import { ExampleViewerModule } from "../example-viewer"; @NgModule({ imports: [ @@ -116,6 +117,7 @@ import { StarkRouteSearchModule, StarkSliderModule, StarkTableModule, + ExampleViewerModule, StoreModule.forFeature(demoGenericSearchStoreKey, demoGenericSearchReducers) ], declarations: [ diff --git a/showcase/src/app/shared/components/example-viewer/_example-viewer-theme.scss b/showcase/src/app/example-viewer/components/_example-viewer-theme.scss similarity index 100% rename from showcase/src/app/shared/components/example-viewer/_example-viewer-theme.scss rename to showcase/src/app/example-viewer/components/_example-viewer-theme.scss diff --git a/showcase/src/app/shared/components/example-viewer/example-viewer.component.html b/showcase/src/app/example-viewer/components/example-viewer.component.html similarity index 100% rename from showcase/src/app/shared/components/example-viewer/example-viewer.component.html rename to showcase/src/app/example-viewer/components/example-viewer.component.html diff --git a/showcase/src/app/shared/components/example-viewer/example-viewer.component.scss b/showcase/src/app/example-viewer/components/example-viewer.component.scss similarity index 100% rename from showcase/src/app/shared/components/example-viewer/example-viewer.component.scss rename to showcase/src/app/example-viewer/components/example-viewer.component.scss diff --git a/showcase/src/app/shared/components/example-viewer/example-viewer.component.spec.ts b/showcase/src/app/example-viewer/components/example-viewer.component.spec.ts similarity index 99% rename from showcase/src/app/shared/components/example-viewer/example-viewer.component.spec.ts rename to showcase/src/app/example-viewer/components/example-viewer.component.spec.ts index af7e3040a9..6e5f450216 100644 --- a/showcase/src/app/shared/components/example-viewer/example-viewer.component.spec.ts +++ b/showcase/src/app/example-viewer/components/example-viewer.component.spec.ts @@ -12,9 +12,9 @@ import { MockStarkLoggingService, MockStarkRoutingService } from "@nationalbankb import { StarkPrettyPrintModule } from "@nationalbankbelgium/stark-ui"; import { ExampleFile, ExampleViewerComponent } from "./example-viewer.component"; -import { FileService } from "../../services"; import SpyObj = jasmine.SpyObj; import Spy = jasmine.Spy; +import { FileService } from "../services"; describe("ExampleViewerComponent", () => { @Component({ diff --git a/showcase/src/app/shared/components/example-viewer/example-viewer.component.ts b/showcase/src/app/example-viewer/components/example-viewer.component.ts similarity index 98% rename from showcase/src/app/shared/components/example-viewer/example-viewer.component.ts rename to showcase/src/app/example-viewer/components/example-viewer.component.ts index e5cd68fd56..c014c1301b 100644 --- a/showcase/src/app/shared/components/example-viewer/example-viewer.component.ts +++ b/showcase/src/app/example-viewer/components/example-viewer.component.ts @@ -8,7 +8,7 @@ import { StarkRoutingService } from "@nationalbankbelgium/stark-core"; import { StarkPrettyPrintFormat } from "@nationalbankbelgium/stark-ui"; -import { FileService } from "../../services"; +import { FileService } from "../services"; export interface ExampleFile { extension: string; diff --git a/showcase/src/app/shared/components/example-viewer/index.ts b/showcase/src/app/example-viewer/components/index.ts similarity index 100% rename from showcase/src/app/shared/components/example-viewer/index.ts rename to showcase/src/app/example-viewer/components/index.ts diff --git a/showcase/src/app/example-viewer/example-viewer.module.ts b/showcase/src/app/example-viewer/example-viewer.module.ts new file mode 100644 index 0000000000..b566e7fc12 --- /dev/null +++ b/showcase/src/app/example-viewer/example-viewer.module.ts @@ -0,0 +1,12 @@ +import { NgModule } from "@angular/core"; +import { StarkPrettyPrintModule } from "@nationalbankbelgium/stark-ui"; +import { ExampleViewerComponent } from "./components"; +import { SharedModule } from "../shared"; +import { UIRouterModule } from "@uirouter/angular"; + +@NgModule({ + imports: [StarkPrettyPrintModule, SharedModule, UIRouterModule.forChild()], + declarations: [ExampleViewerComponent], + exports: [ExampleViewerComponent, StarkPrettyPrintModule] +}) +export class ExampleViewerModule {} diff --git a/showcase/src/app/example-viewer/index.ts b/showcase/src/app/example-viewer/index.ts new file mode 100644 index 0000000000..aeef209800 --- /dev/null +++ b/showcase/src/app/example-viewer/index.ts @@ -0,0 +1,3 @@ +export * from "./components"; +export * from "./services"; +export * from "./example-viewer.module"; diff --git a/showcase/src/app/shared/services/file.service.ts b/showcase/src/app/example-viewer/services/file.service.ts similarity index 100% rename from showcase/src/app/shared/services/file.service.ts rename to showcase/src/app/example-viewer/services/file.service.ts diff --git a/showcase/src/app/shared/services/index.ts b/showcase/src/app/example-viewer/services/index.ts similarity index 100% rename from showcase/src/app/shared/services/index.ts rename to showcase/src/app/example-viewer/services/index.ts diff --git a/showcase/src/app/home/home.module.ts b/showcase/src/app/home/home.module.ts new file mode 100644 index 0000000000..248a65ab1a --- /dev/null +++ b/showcase/src/app/home/home.module.ts @@ -0,0 +1,19 @@ +import { NgModule } from "@angular/core"; +import { SharedModule } from "../shared"; +import { HomePageComponent, NoContentPageComponent } from "./pages"; +import { UIRouterModule } from "@uirouter/angular"; +import { HOME_STATES } from "./routes"; +import { CommonModule } from "@angular/common"; + +@NgModule({ + imports: [ + CommonModule, + SharedModule, + UIRouterModule.forChild({ + states: HOME_STATES + }) + ], + declarations: [HomePageComponent, NoContentPageComponent], + exports: [HomePageComponent, NoContentPageComponent] +}) +export class HomeModule {} diff --git a/showcase/src/app/home/index.ts b/showcase/src/app/home/index.ts new file mode 100644 index 0000000000..4aaf99bc3e --- /dev/null +++ b/showcase/src/app/home/index.ts @@ -0,0 +1,2 @@ +export * from "./home.module"; +export * from "./pages"; diff --git a/showcase/src/app/welcome/pages/home/_home-page-theme.scss b/showcase/src/app/home/pages/home/_home-page-theme.scss similarity index 100% rename from showcase/src/app/welcome/pages/home/_home-page-theme.scss rename to showcase/src/app/home/pages/home/_home-page-theme.scss diff --git a/showcase/src/app/welcome/pages/home/_home-page.component.scss b/showcase/src/app/home/pages/home/_home-page.component.scss similarity index 100% rename from showcase/src/app/welcome/pages/home/_home-page.component.scss rename to showcase/src/app/home/pages/home/_home-page.component.scss diff --git a/showcase/src/app/welcome/pages/home/home-page.component.html b/showcase/src/app/home/pages/home/home-page.component.html similarity index 100% rename from showcase/src/app/welcome/pages/home/home-page.component.html rename to showcase/src/app/home/pages/home/home-page.component.html diff --git a/showcase/src/app/welcome/pages/home/home-page.component.spec.ts b/showcase/src/app/home/pages/home/home-page.component.spec.ts similarity index 100% rename from showcase/src/app/welcome/pages/home/home-page.component.spec.ts rename to showcase/src/app/home/pages/home/home-page.component.spec.ts diff --git a/showcase/src/app/welcome/pages/home/home-page.component.ts b/showcase/src/app/home/pages/home/home-page.component.ts similarity index 100% rename from showcase/src/app/welcome/pages/home/home-page.component.ts rename to showcase/src/app/home/pages/home/home-page.component.ts diff --git a/showcase/src/app/welcome/pages/home/home-page.e2e.ts b/showcase/src/app/home/pages/home/home-page.e2e.ts similarity index 100% rename from showcase/src/app/welcome/pages/home/home-page.e2e.ts rename to showcase/src/app/home/pages/home/home-page.e2e.ts diff --git a/showcase/src/app/welcome/pages/home/index.ts b/showcase/src/app/home/pages/home/index.ts similarity index 100% rename from showcase/src/app/welcome/pages/home/index.ts rename to showcase/src/app/home/pages/home/index.ts diff --git a/showcase/src/app/home/pages/index.ts b/showcase/src/app/home/pages/index.ts new file mode 100644 index 0000000000..71297b18e6 --- /dev/null +++ b/showcase/src/app/home/pages/index.ts @@ -0,0 +1,2 @@ +export * from "./home"; +export * from "./no-content"; diff --git a/showcase/src/app/welcome/pages/no-content/index.ts b/showcase/src/app/home/pages/no-content/index.ts similarity index 100% rename from showcase/src/app/welcome/pages/no-content/index.ts rename to showcase/src/app/home/pages/no-content/index.ts diff --git a/showcase/src/app/welcome/pages/no-content/no-content-page.component.html b/showcase/src/app/home/pages/no-content/no-content-page.component.html similarity index 100% rename from showcase/src/app/welcome/pages/no-content/no-content-page.component.html rename to showcase/src/app/home/pages/no-content/no-content-page.component.html diff --git a/showcase/src/app/welcome/pages/no-content/no-content-page.component.ts b/showcase/src/app/home/pages/no-content/no-content-page.component.ts similarity index 100% rename from showcase/src/app/welcome/pages/no-content/no-content-page.component.ts rename to showcase/src/app/home/pages/no-content/no-content-page.component.ts diff --git a/showcase/src/app/home/routes.ts b/showcase/src/app/home/routes.ts new file mode 100644 index 0000000000..03abf61959 --- /dev/null +++ b/showcase/src/app/home/routes.ts @@ -0,0 +1,24 @@ +import { Ng2StateDeclaration } from "@uirouter/angular"; +import { HomePageComponent, NoContentPageComponent } from "./pages"; + +export const HOME_STATES: Ng2StateDeclaration[] = [ + { + name: "home", + url: "^/home", // use ^ to avoid double slash "//" in the URL after the domain (https://github.com/angular-ui/ui-router/wiki/URL-Routing#absolute-routes-) + data: { + translationKey: "SHOWCASE.HOMEPAGE.TITLE" + }, + views: { "@": { component: HomePageComponent } }, + parent: "app" + }, + { + name: "otherwise", + url: "^/otherwise", + data: { + translationKey: "SHOWCASE.OTHERWISE.TITLE" + }, + component: NoContentPageComponent, + views: { "@": { component: NoContentPageComponent } }, + parent: "app" + } +]; diff --git a/showcase/src/app/shared/components/index.ts b/showcase/src/app/shared/components/index.ts index 5ad324e831..09993af822 100644 --- a/showcase/src/app/shared/components/index.ts +++ b/showcase/src/app/shared/components/index.ts @@ -1,3 +1,2 @@ -export * from "./example-viewer"; export * from "./reference-block"; export * from "./table-of-contents"; diff --git a/showcase/src/app/shared/index.ts b/showcase/src/app/shared/index.ts index dbd18eafb6..75850b378f 100644 --- a/showcase/src/app/shared/index.ts +++ b/showcase/src/app/shared/index.ts @@ -1,4 +1,3 @@ export * from "./components"; export * from "./effects"; -export * from "./services"; export * from "./shared.module"; diff --git a/showcase/src/app/shared/shared.module.ts b/showcase/src/app/shared/shared.module.ts index 2de8852e35..174847a0ef 100644 --- a/showcase/src/app/shared/shared.module.ts +++ b/showcase/src/app/shared/shared.module.ts @@ -12,7 +12,6 @@ import { MatTooltipModule } from "@angular/material/tooltip"; import { CommonModule } from "@angular/common"; import { FormsModule, ReactiveFormsModule } from "@angular/forms"; import { Inject, NgModule } from "@angular/core"; -import { StarkPrettyPrintModule } from "@nationalbankbelgium/stark-ui"; import { TranslateModule } from "@ngx-translate/core"; import { FlexLayoutModule } from "@angular/flex-layout"; import { @@ -25,7 +24,7 @@ import { import { UIRouterModule } from "@uirouter/angular"; import moment from "moment"; import { filter } from "rxjs/operators"; -import { ExampleViewerComponent, ReferenceBlockComponent, TableOfContentsComponent } from "./components"; +import { ReferenceBlockComponent, TableOfContentsComponent } from "./components"; @NgModule({ imports: [ @@ -43,15 +42,13 @@ import { ExampleViewerComponent, ReferenceBlockComponent, TableOfContentsCompone MatTabsModule, MatTooltipModule, MatSnackBarModule, - StarkPrettyPrintModule, TranslateModule, UIRouterModule.forChild() ], - declarations: [ExampleViewerComponent, ReferenceBlockComponent, TableOfContentsComponent], + declarations: [ReferenceBlockComponent, TableOfContentsComponent], entryComponents: [], // export commonly used components/directives/components (see https://angular.io/guide/sharing-ngmodules) exports: [ - ExampleViewerComponent, ReferenceBlockComponent, TableOfContentsComponent, CommonModule, @@ -68,7 +65,6 @@ import { ExampleViewerComponent, ReferenceBlockComponent, TableOfContentsCompone MatTabsModule, MatTooltipModule, MatSnackBarModule, - StarkPrettyPrintModule, TranslateModule ] }) diff --git a/showcase/src/app/styleguide/styleguide.module.ts b/showcase/src/app/styleguide/styleguide.module.ts index 0a593b4caa..8cd5d24e29 100644 --- a/showcase/src/app/styleguide/styleguide.module.ts +++ b/showcase/src/app/styleguide/styleguide.module.ts @@ -10,13 +10,15 @@ import { StyleguideLayoutPageComponent, StyleguideTypographyPageComponent } from "./pages"; +import { ExampleViewerModule } from "../example-viewer"; @NgModule({ imports: [ UIRouterModule.forChild({ states: STYLEGUIDE_STATES }), - SharedModule + SharedModule, + ExampleViewerModule ], providers: [], declarations: [ diff --git a/showcase/src/app/welcome/pages/index.ts b/showcase/src/app/welcome/pages/index.ts index 5d600592cf..745587e2e4 100644 --- a/showcase/src/app/welcome/pages/index.ts +++ b/showcase/src/app/welcome/pages/index.ts @@ -1,5 +1,3 @@ export * from "./getting-started"; -export * from "./home"; export * from "./news"; -export * from "./no-content"; export * from "./reactive-form-errors"; diff --git a/showcase/src/app/welcome/routes.ts b/showcase/src/app/welcome/routes.ts index a27c90de0b..6d48db1f7f 100644 --- a/showcase/src/app/welcome/routes.ts +++ b/showcase/src/app/welcome/routes.ts @@ -1,57 +1,30 @@ import { Ng2StateDeclaration } from "@uirouter/angular"; -import { - GettingStartedPageComponent, - HomePageComponent, - NewsPageComponent, - NoContentPageComponent, - ReactiveFormErrorsPageComponent -} from "./pages"; +import { GettingStartedPageComponent, NewsPageComponent, ReactiveFormErrorsPageComponent } from "./pages"; export const NEWS_STATES: Ng2StateDeclaration[] = [ + { name: "welcome", url: "^/welcome", abstract: true, parent: "app" }, { - name: "home", - url: "^/home", // use ^ to avoid double slash "//" in the URL after the domain (https://github.com/angular-ui/ui-router/wiki/URL-Routing#absolute-routes-) - data: { - translationKey: "SHOWCASE.HOMEPAGE.TITLE" - }, - views: { "@": { component: HomePageComponent } }, - parent: "app" - }, - { - name: "getting-started", - url: "^/getting-started", + name: "welcome.getting-started", + url: "/getting-started", data: { translationKey: "SHOWCASE.GETTING_STARTED.TITLE" }, - views: { "@": { component: GettingStartedPageComponent } }, - parent: "app" + views: { "@": { component: GettingStartedPageComponent } } }, { - name: "news", - url: "^/news", // use ^ to avoid double slash "//" in the URL after the domain (https://github.com/angular-ui/ui-router/wiki/URL-Routing#absolute-routes-) + name: "welcome.news", + url: "/news", data: { translationKey: "SHOWCASE.NEWS.TITLE" }, - views: { "@": { component: NewsPageComponent } }, - parent: "app" + views: { "@": { component: NewsPageComponent } } }, { - name: "reactive-form-errors", - url: "^/reactive-form-errors", // use ^ to avoid double slash "//" in the URL after the domain (https://github.com/angular-ui/ui-router/wiki/URL-Routing#absolute-routes-) + name: "welcome.reactive-form-errors", + url: "/reactive-form-errors", data: { translationKey: "SHOWCASE.NGX_FORM_ERRORS.TITLE" }, - views: { "@": { component: ReactiveFormErrorsPageComponent } }, - parent: "app" - }, - { - name: "otherwise", - url: "^/otherwise", // use ^ to avoid double slash "//" in the URL after the domain (https://github.com/angular-ui/ui-router/wiki/URL-Routing#absolute-routes-) - data: { - translationKey: "SHOWCASE.OTHERWISE.TITLE" - }, - component: NoContentPageComponent, - views: { "@": { component: NoContentPageComponent } }, - parent: "app" + views: { "@": { component: ReactiveFormErrorsPageComponent } } } ]; diff --git a/showcase/src/app/welcome/welcome.module.ts b/showcase/src/app/welcome/welcome.module.ts index a512c79068..6fe89e8125 100644 --- a/showcase/src/app/welcome/welcome.module.ts +++ b/showcase/src/app/welcome/welcome.module.ts @@ -5,16 +5,11 @@ import { MatFormFieldModule } from "@angular/material/form-field"; import { MatInputModule } from "@angular/material/input"; import { NgxFormErrorsModule, NgxFormErrorsMessageService } from "@nationalbankbelgium/ngx-form-errors"; import { SharedModule } from "../shared"; -import { - GettingStartedPageComponent, - HomePageComponent, - NewsPageComponent, - NoContentPageComponent, - ReactiveFormErrorsPageComponent -} from "./pages"; +import { GettingStartedPageComponent, NewsPageComponent, ReactiveFormErrorsPageComponent } from "./pages"; import { CardComponent, TranslatedFormErrorComponent } from "./pages/reactive-form-errors/components"; import { NewsItemComponent } from "./components"; import { NEWS_STATES } from "./routes"; +import { ExampleViewerModule } from "../example-viewer"; @NgModule({ imports: [ @@ -22,6 +17,7 @@ import { NEWS_STATES } from "./routes"; states: NEWS_STATES }), SharedModule, + ExampleViewerModule, MatDividerModule, MatInputModule, MatFormFieldModule, @@ -29,22 +25,13 @@ import { NEWS_STATES } from "./routes"; ], declarations: [ GettingStartedPageComponent, - HomePageComponent, - NoContentPageComponent, NewsPageComponent, NewsItemComponent, ReactiveFormErrorsPageComponent, TranslatedFormErrorComponent, CardComponent ], - exports: [ - GettingStartedPageComponent, - HomePageComponent, - NoContentPageComponent, - NewsPageComponent, - NewsItemComponent, - ReactiveFormErrorsPageComponent - ], + exports: [GettingStartedPageComponent, NewsPageComponent, NewsItemComponent, ReactiveFormErrorsPageComponent], entryComponents: [TranslatedFormErrorComponent] }) export class WelcomeModule { diff --git a/showcase/src/styles/_theme.scss b/showcase/src/styles/_theme.scss index 9a5f579161..916b75c767 100644 --- a/showcase/src/styles/_theme.scss +++ b/showcase/src/styles/_theme.scss @@ -9,10 +9,10 @@ Use the local variables file first to set the correct variables, see: @use "~@angular/material" as mat; @use "~@nationalbankbelgium/stark-ui" as stark-ui; @use "../app/app.component-theme"; -@use "../app/shared/components/example-viewer/example-viewer-theme"; +@use "../app/example-viewer/components/example-viewer-theme"; @use "../app/shared/components/table-of-contents/table-of-contents-theme"; @use "../app/welcome/pages/getting-started/getting-started-page-theme"; -@use "../app/welcome/pages/home/home-page-theme"; +@use "../app/home/pages/home/home-page-theme"; @use "../app/welcome/pages/news/news-page-theme"; @use "../app/welcome/components/news-item/news-item-theme"; @use "../app/styleguide/pages/typography/styleguide-typography-page-theme"; diff --git a/showcase/src/styles/styles.scss b/showcase/src/styles/styles.scss index 6d40258556..885d9be2c3 100644 --- a/showcase/src/styles/styles.scss +++ b/showcase/src/styles/styles.scss @@ -6,7 +6,7 @@ IMPORTANT: Stark styles are provided as SCSS styles so they should be imported i @use "../app/shared/components/reference-block/reference-block.component"; @use "../app/shared/components/table-of-contents/table-of-contents.component"; @use "../app/welcome/pages/getting-started/getting-started-page.component"; -@use "../app/welcome/pages/home/home-page.component"; +@use "../app/home/pages/home/home-page.component"; @use "../app/welcome/pages/news/news-page.component"; @use "../app/welcome/components/news-item/news-item.component"; @use "../app/demo-ui/pages/message-pane/demo-message-pane-page.component";