Selaa lähdekoodia

refactor(admin-ui): Generate public api, refactor for consumption as lib

Michael Bromley 5 vuotta sitten
vanhempi
sitoutus
5172bfc1ab

+ 3 - 3
packages/admin-ui/angular.json

@@ -241,12 +241,12 @@
         "build": {
           "builder": "@angular-devkit/build-ng-packagr:build",
           "options": {
-            "tsConfig": "lib/tsconfig.lib.json",
-            "project": "lib/ng-package.json"
+            "tsConfig": "./tsconfig.lib.json",
+            "project": "./ng-package.json"
           },
           "configurations": {
             "production": {
-              "tsConfig": "lib/tsconfig.lib.prod.json"
+              "tsConfig": "./tsconfig.lib.prod.json"
             }
           }
         }

+ 47 - 0
packages/admin-ui/build-public-api.js

@@ -0,0 +1,47 @@
+// @ts-check
+const fs = require('fs');
+const path = require('path');
+// This script finds all app sources and then generates a "public-api.ts" file exporting their
+// contents. This is then used as the public API entrypoint for the Angular CLI's library
+// builder process.
+
+console.log('Generating public api...');
+const SOURCES_DIR = path.join(__dirname, 'src/app');
+const APP_SOURCE_FILE_PATTERN = /\.(pipe|service|component|module|routes|directive|guard)\.ts$/;
+const files = [];
+const publicApiFilePath = path.join(__dirname, 'src');
+forMatchingFiles(SOURCES_DIR, APP_SOURCE_FILE_PATTERN, filename => {
+    const relativeFilename = '.' + filename.replace(publicApiFilePath, '')
+        .replace(/\\/g, '/')
+        .replace(/\.ts$/, '');
+    files.push(relativeFilename);
+});
+
+const header = `// This file was generated by the build-public-api.ts script\n`;
+const fileContents = header + files.map(f => `export * from '${f}';`).join('\n');
+fs.writeFileSync(path.join(publicApiFilePath, 'public-api.ts'), fileContents, 'utf8');
+console.log('Done!');
+
+/**
+ *
+ * @param startPath {string}
+ * @param filter {RegExp}
+ * @param callback {(filename: string) => void}
+ */
+function forMatchingFiles(startPath, filter, callback) {
+    if (!fs.existsSync(startPath)) {
+        console.log('Starting path does not exist ', startPath);
+        return;
+    }
+
+    const files = fs.readdirSync(startPath);
+    for (let i = 0; i < files.length; i++) {
+        const filename = path.join(startPath, files[i]);
+        const stat = fs.lstatSync(filename);
+        if (stat.isDirectory()) {
+            forMatchingFiles(filename, filter, callback); // recurse
+        } else if (filter.test(filename)) {
+            callback(filename);
+        }
+    }
+}

+ 0 - 8
packages/admin-ui/lib/ng-package.json

@@ -1,8 +0,0 @@
-{
-  "$schema": "../node_modules/ng-packagr/ng-package.schema.json",
-  "dest": "../library",
-  "lib": {
-    "entryFile": "../src/public-api.ts",
-    "styleIncludePaths": ["../src/styles"]
-  }
-}

+ 0 - 9
packages/admin-ui/lib/package.json

@@ -1,9 +0,0 @@
-{
-  "name": "my-lib",
-  "version": "0.0.1",
-  "peerDependencies": {
-    "@angular/common": "^9.0.3",
-    "@angular/core": "^9.0.3",
-    "tslib": "^1.10.0"
-  }
-}

+ 9 - 0
packages/admin-ui/ng-package.json

@@ -0,0 +1,9 @@
+{
+  "$schema": "node_modules/ng-packagr/ng-package.schema.json",
+  "dest": "library",
+  "whitelistedNonPeerDependencies": ["."],
+  "lib": {
+    "entryFile": "src/public-api.ts",
+    "styleIncludePaths": ["src/styles"]
+  }
+}

+ 10 - 0
packages/admin-ui/package.json

@@ -6,6 +6,7 @@
     "ng": "ng",
     "start": "ng serve",
     "build": "yarn reset-extensions && ng build --prod && yarn build:compiler",
+    "build:library": "node build-public-api.js && ng build vendure-admin-lib",
     "watch": "ng build --watch=true",
     "build:compiler": "tsc -p tsconfig.compiler.json",
     "test": "ng test --watch=false --browsers=ChromeHeadlessCI --progress=false",
@@ -17,6 +18,15 @@
   "publishConfig": {
     "access": "public"
   },
+  "main": "library/bundles/vendure-admin-ui.umd.js",
+  "module": "library/fesm5/vendure-admin-ui.js",
+  "es2015": "library/fesm2015/vendure-admin-ui.js",
+  "esm5": "library/esm5/vendure-admin-ui.js",
+  "esm2015": "library/esm2015/vendure-admin-ui.js",
+  "fesm5": "library/fesm5/vendure-admin-ui.js",
+  "fesm2015": "library/fesm2015/vendure-admin-ui.js",
+  "typings": "library/vendure-admin-ui.d.ts",
+  "sideEffects": false,
   "dependencies": {
     "@angular/animations": "^9.0.2",
     "@angular/cdk": "^9.0.1",

+ 3 - 43
packages/admin-ui/src/app/app.module.ts

@@ -1,53 +1,13 @@
-import { APP_BASE_HREF, PlatformLocation } from '@angular/common';
-import { HttpClient } from '@angular/common/http';
-import { Inject, Injectable, NgModule } from '@angular/core';
-import { BrowserModule } from '@angular/platform-browser';
+import { NgModule } from '@angular/core';
 import { RouterModule } from '@angular/router';
-import { TranslateCompiler, TranslateLoader, TranslateModule } from '@ngx-translate/core';
 
 import { AppComponent } from './app.component';
 import { routes } from './app.routes';
-import { getDefaultLanguage } from './common/utilities/get-default-language';
 import { CoreModule } from './core/core.module';
-import { CustomHttpTranslationLoader } from './core/providers/i18n/custom-http-loader';
-import { InjectableTranslateMessageFormatCompiler } from './core/providers/i18n/custom-message-format-compiler';
-import { I18nService } from './core/providers/i18n/i18n.service';
-import { DataService } from './data/providers/data.service';
-import { SharedExtensionsModule } from './extensions/shared-extensions.module';
-
-@Injectable()
-export class BaseHrefHolder {
-    constructor(@Inject(APP_BASE_HREF) public addBaseHref: string) {}
-}
-
-export function HttpLoaderFactory(http: HttpClient, location: PlatformLocation) {
-    // Dynamically get the baseHref, which is configured in the angular.json file
-    const baseHref = location.getBaseHrefFromDOM();
-    return new CustomHttpTranslationLoader(http, baseHref + 'i18n-messages/');
-}
 
 @NgModule({
     declarations: [AppComponent],
-    imports: [
-        BrowserModule,
-        RouterModule.forRoot(routes, { useHash: false }),
-        TranslateModule.forRoot({
-            loader: {
-                provide: TranslateLoader,
-                useFactory: HttpLoaderFactory,
-                deps: [HttpClient, PlatformLocation],
-            },
-            compiler: { provide: TranslateCompiler, useClass: InjectableTranslateMessageFormatCompiler },
-        }),
-        CoreModule,
-        SharedExtensionsModule,
-    ],
-    providers: [BaseHrefHolder],
+    imports: [RouterModule.forRoot(routes, { useHash: false }), CoreModule],
     bootstrap: [AppComponent],
 })
-export class AppModule {
-    constructor(private dataService: DataService, private i18nService: I18nService) {
-        this.dataService.client.setUiLanguage(getDefaultLanguage());
-        this.i18nService.setDefaultLanguage(getDefaultLanguage());
-    }
-}
+export class AppModule {}

+ 34 - 2
packages/admin-ui/src/app/core/core.module.ts

@@ -1,7 +1,13 @@
+import { PlatformLocation } from '@angular/common';
+import { HttpClient } from '@angular/common/http';
 import { NgModule } from '@angular/core';
+import { BrowserModule } from '@angular/platform-browser';
 import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
+import { TranslateCompiler, TranslateLoader, TranslateModule } from '@ngx-translate/core';
 
+import { getDefaultLanguage } from '../common/utilities/get-default-language';
 import { DataModule } from '../data/data.module';
+import { DataService } from '../data/providers/data.service';
 import { SharedModule } from '../shared/shared.module';
 
 import { AppShellComponent } from './components/app-shell/app-shell.component';
@@ -16,6 +22,8 @@ import { UserMenuComponent } from './components/user-menu/user-menu.component';
 import { AuthService } from './providers/auth/auth.service';
 import { CustomFieldComponentService } from './providers/custom-field-component/custom-field-component.service';
 import { AuthGuard } from './providers/guard/auth.guard';
+import { CustomHttpTranslationLoader } from './providers/i18n/custom-http-loader';
+import { InjectableTranslateMessageFormatCompiler } from './providers/i18n/custom-message-format-compiler';
 import { I18nService } from './providers/i18n/i18n.service';
 import { JobQueueService } from './providers/job-queue/job-queue.service';
 import { LocalStorageService } from './providers/local-storage/local-storage.service';
@@ -24,7 +32,20 @@ import { NotificationService } from './providers/notification/notification.servi
 import { OverlayHostService } from './providers/overlay-host/overlay-host.service';
 
 @NgModule({
-    imports: [DataModule, SharedModule, BrowserAnimationsModule],
+    imports: [
+        BrowserModule,
+        DataModule,
+        SharedModule,
+        BrowserAnimationsModule,
+        TranslateModule.forRoot({
+            loader: {
+                provide: TranslateLoader,
+                useFactory: HttpLoaderFactory,
+                deps: [HttpClient, PlatformLocation],
+            },
+            compiler: { provide: TranslateCompiler, useClass: InjectableTranslateMessageFormatCompiler },
+        }),
+    ],
     exports: [SharedModule, OverlayHostComponent],
     providers: [
         LocalStorageService,
@@ -49,4 +70,15 @@ import { OverlayHostService } from './providers/overlay-host/overlay-host.servic
         ChannelSwitcherComponent,
     ],
 })
-export class CoreModule {}
+export class CoreModule {
+    constructor(private dataService: DataService, private i18nService: I18nService) {
+        this.dataService.client.setUiLanguage(getDefaultLanguage());
+        this.i18nService.setDefaultLanguage(getDefaultLanguage());
+    }
+}
+
+export function HttpLoaderFactory(http: HttpClient, location: PlatformLocation) {
+    // Dynamically get the baseHref, which is configured in the angular.json file
+    const baseHref = location.getBaseHrefFromDOM();
+    return new CustomHttpTranslationLoader(http, baseHref + 'i18n-messages/');
+}

+ 10 - 12
packages/admin-ui/src/app/shared/components/datetime-picker/datetime-picker.service.ts

@@ -1,23 +1,21 @@
 import { Injectable } from '@angular/core';
-import * as _dayjs from 'dayjs';
+import dayjs from 'dayjs';
 import { BehaviorSubject, combineLatest, Observable } from 'rxjs';
 import { map } from 'rxjs/operators';
 
 import { dayOfWeekIndex } from './constants';
 import { CalendarView, DayCell, DayOfWeek } from './types';
 
-const dayjs = _dayjs;
-
 @Injectable()
 export class DatetimePickerService {
     calendarView$: Observable<CalendarView>;
     selected$: Observable<Date | null>;
     viewing$: Observable<Date>;
-    private selectedDatetime$ = new BehaviorSubject<_dayjs.Dayjs | null>(null);
-    private viewingDatetime$ = new BehaviorSubject<_dayjs.Dayjs>(dayjs());
+    private selectedDatetime$ = new BehaviorSubject<dayjs.Dayjs | null>(null);
+    private viewingDatetime$ = new BehaviorSubject<dayjs.Dayjs>(dayjs());
     private weekStartDayIndex: number;
-    private min: _dayjs.Dayjs | null = null;
-    private max: _dayjs.Dayjs | null = null;
+    private min: dayjs.Dayjs | null = null;
+    private max: dayjs.Dayjs | null = null;
     private jumping = false;
 
     constructor() {
@@ -45,9 +43,9 @@ export class DatetimePickerService {
         }
     }
 
-    selectDatetime(date: Date | string | _dayjs.Dayjs | null) {
-        let viewingValue: _dayjs.Dayjs;
-        let selectedValue: _dayjs.Dayjs | null = null;
+    selectDatetime(date: Date | string | dayjs.Dayjs | null) {
+        let viewingValue: dayjs.Dayjs;
+        let selectedValue: dayjs.Dayjs | null = null;
         if (date == null) {
             viewingValue = dayjs();
         } else {
@@ -136,7 +134,7 @@ export class DatetimePickerService {
         this.viewingDatetime$.next(current.year(year));
     }
 
-    private generateCalendarView(viewing: _dayjs.Dayjs, selected: _dayjs.Dayjs | null): CalendarView {
+    private generateCalendarView(viewing: dayjs.Dayjs, selected: dayjs.Dayjs | null): CalendarView {
         if (!viewing.isValid() || (selected && !selected.isValid())) {
             return [];
         }
@@ -221,7 +219,7 @@ export class DatetimePickerService {
         return calendarView;
     }
 
-    private isInBounds(date: _dayjs.Dayjs): boolean {
+    private isInBounds(date: dayjs.Dayjs): boolean {
         if (this.min && this.min.isAfter(date)) {
             return false;
         }

+ 3 - 1
packages/admin-ui/src/environments/environment.prod.ts

@@ -1,5 +1,7 @@
+import { getVersion } from './get-version';
+
 declare function require(path: string): any;
 export const environment = {
     production: true,
-    version: require('../../../core/package.json').version,
+    version: getVersion(),
 };

+ 4 - 1
packages/admin-ui/src/environments/environment.ts

@@ -1,10 +1,13 @@
 // This file can be replaced during build by using the `fileReplacements` array.
 // `ng build ---prod` replaces `environment.ts` with `environment.prod.ts`.
 // The list of file replacements can be found in `angular.json`.
+import { getVersion } from './get-version';
+
 declare function require(path: string): any;
+
 export const environment = {
     production: false,
-    version: require('../../../core/package.json').version,
+    version: getVersion(),
 };
 
 /*

+ 16 - 0
packages/admin-ui/src/environments/get-version.ts

@@ -0,0 +1,16 @@
+export function getVersion(): string {
+    let version: string | undefined;
+    try {
+        version = require('../../../core/package.json').version;
+    } catch (e) {
+        /**/
+    }
+    if (!version) {
+        try {
+            version = require('../../../../core/package.json').version;
+        } catch (e) {
+            /**/
+        }
+    }
+    return version || 'unknown';
+}

+ 193 - 121
packages/admin-ui/src/public-api.ts

@@ -1,122 +1,194 @@
-// This is the "public API" of the admin-ui package, used by plugins which want to define
-// extensions to the admin UI and need to import components (services, modules etc) from the admin-ui.
-
+// This file was generated by the build-public-api.ts script
+export * from './app/app.component';
+export * from './app/app.module';
+export * from './app/app.routes';
+export * from './app/catalog/catalog.module';
+export * from './app/catalog/catalog.routes';
+export * from './app/catalog/components/apply-facet-dialog/apply-facet-dialog.component';
+export * from './app/catalog/components/asset-detail/asset-detail.component';
+export * from './app/catalog/components/asset-list/asset-list.component';
+export * from './app/catalog/components/assign-products-to-channel-dialog/assign-products-to-channel-dialog.component';
+export * from './app/catalog/components/collection-contents/collection-contents.component';
+export * from './app/catalog/components/collection-detail/collection-detail.component';
+export * from './app/catalog/components/collection-list/collection-list.component';
+export * from './app/catalog/components/collection-tree/collection-tree-node.component';
+export * from './app/catalog/components/collection-tree/collection-tree.component';
+export * from './app/catalog/components/facet-detail/facet-detail.component';
+export * from './app/catalog/components/facet-list/facet-list.component';
+export * from './app/catalog/components/generate-product-variants/generate-product-variants.component';
+export * from './app/catalog/components/option-value-input/option-value-input.component';
+export * from './app/catalog/components/product-assets/product-assets.component';
+export * from './app/catalog/components/product-detail/product-detail.component';
+export * from './app/catalog/components/product-list/product-list.component';
+export * from './app/catalog/components/product-search-input/product-search-input.component';
+export * from './app/catalog/components/product-variants-editor/product-variants-editor.component';
+export * from './app/catalog/components/product-variants-list/product-variants-list.component';
+export * from './app/catalog/components/product-variants-table/product-variants-table.component';
+export * from './app/catalog/components/update-product-option-dialog/update-product-option-dialog.component';
+export * from './app/catalog/components/variant-price-detail/variant-price-detail.component';
+export * from './app/catalog/providers/product-detail.service';
+export * from './app/common/base-detail.component';
+export * from './app/common/base-list.component';
+export * from './app/core/components/app-shell/app-shell.component';
+export * from './app/core/components/breadcrumb/breadcrumb.component';
+export * from './app/core/components/channel-switcher/channel-switcher.component';
+export * from './app/core/components/job-list/job-list.component';
+export * from './app/core/components/main-nav/main-nav.component';
+export * from './app/core/components/notification/notification.component';
+export * from './app/core/components/overlay-host/overlay-host.component';
+export * from './app/core/components/ui-language-switcher/ui-language-switcher.component';
+export * from './app/core/components/user-menu/user-menu.component';
+export * from './app/core/core.module';
+export * from './app/core/providers/auth/auth.service';
+export * from './app/core/providers/custom-field-component/custom-field-component.service';
+export * from './app/core/providers/guard/auth.guard';
+export * from './app/core/providers/i18n/i18n.service';
 export * from './app/core/providers/job-queue/job-queue.service';
-export { LocalStorageService } from './app/core/providers/local-storage/local-storage.service';
-export { OverlayHostComponent } from './app/core/components/overlay-host/overlay-host.component';
-export { CoreModule } from './app/core/core.module';
-export { SharedModule } from './app/shared/shared.module';
-export {
-    ActionBarComponent,
-    ActionBarLeftComponent,
-    ActionBarRightComponent,
-} from './app/shared/components/action-bar/action-bar.component';
-export { ActionBarItemsComponent } from './app/shared/components/action-bar-items/action-bar-items.component';
-
-export { AffixedInputComponent } from './app/shared/components/affixed-input/affixed-input.component';
-export { AssetFileInputComponent } from './app/shared/components/asset-file-input/asset-file-input.component';
-export { AssetGalleryComponent } from './app/shared/components/asset-gallery/asset-gallery.component';
-export {
-    AssetPickerDialogComponent,
-} from './app/shared/components/asset-picker-dialog/asset-picker-dialog.component';
-export {
-    AssetPreviewDialogComponent,
-} from './app/shared/components/asset-preview-dialog/asset-preview-dialog.component';
-export { AssetPreviewComponent } from './app/shared/components/asset-preview/asset-preview.component';
-export { AssetPreviewPipe } from './app/shared/pipes/asset-preview.pipe';
-export {
-    PercentageSuffixInputComponent,
-} from './app/shared/components/affixed-input/percentage-suffix-input.component';
-export {
-    ChannelAssignmentControlComponent,
-} from './app/shared/components/channel-assignment-control/channel-assignment-control.component';
-export { ChannelBadgeComponent } from './app/shared/components/channel-badge/channel-badge.component';
-export { ChannelLabelPipe } from './app/shared/pipes/channel-label.pipe';
-export { ChipComponent } from './app/shared/components/chip/chip.component';
-export {
-    ConfigurableInputComponent,
-} from './app/shared/components/configurable-input/configurable-input.component';
-export { CurrencyInputComponent } from './app/shared/components/currency-input/currency-input.component';
-export {
-    CustomFieldControlComponent,
-} from './app/shared/components/custom-field-control/custom-field-control.component';
-export { CustomFieldLabelPipe } from './app/shared/pipes/custom-field-label.pipe';
-export { CustomerLabelComponent } from './app/shared/components/customer-label/customer-label.component';
-export { DataTableColumnComponent } from './app/shared/components/data-table/data-table-column.component';
-export { DataTableComponent } from './app/shared/components/data-table/data-table.component';
-export { DropdownItemDirective } from './app/shared/components/dropdown/dropdown-item.directive';
-export { DropdownMenuComponent } from './app/shared/components/dropdown/dropdown-menu.component';
-export { DropdownTriggerDirective } from './app/shared/components/dropdown/dropdown-trigger.directive';
-export { DropdownComponent } from './app/shared/components/dropdown/dropdown.component';
-export { FacetValueChipComponent } from './app/shared/components/facet-value-chip/facet-value-chip.component';
-export {
-    FacetValueSelectorComponent,
-} from './app/shared/components/facet-value-selector/facet-value-selector.component';
-export {
-    FocalPointControlComponent,
-} from './app/shared/components/focal-point-control/focal-point-control.component';
-export { FormFieldControlDirective } from './app/shared/components/form-field/form-field-control.directive';
-export { FormFieldComponent } from './app/shared/components/form-field/form-field.component';
-export { FormItemComponent } from './app/shared/components/form-item/form-item.component';
-export {
-    FormattedAddressComponent,
-} from './app/shared/components/formatted-address/formatted-address.component';
-export { IfDefaultChannelActiveDirective } from './app/shared/directives/if-default-channel-active.directive';
-export { IfMultichannelDirective } from './app/shared/directives/if-multichannel.directive';
-export { IfPermissionsDirective } from './app/shared/directives/if-permissions.directive';
-export { DisabledDirective } from './app/shared/directives/disabled.directive';
-export {
-    ItemsPerPageControlsComponent,
-} from './app/shared/components/items-per-page-controls/items-per-page-controls.component';
-export { LabeledDataComponent } from './app/shared/components/labeled-data/labeled-data.component';
-export {
-    LanguageSelectorComponent,
-} from './app/shared/components/language-selector/language-selector.component';
-export { DialogButtonsDirective } from './app/shared/components/modal-dialog/dialog-buttons.directive';
-export {
-    DialogComponentOutletComponent,
-} from './app/shared/components/modal-dialog/dialog-component-outlet.component';
-export { DialogTitleDirective } from './app/shared/components/modal-dialog/dialog-title.directive';
-export { ExtensionHostComponent } from './app/shared/components/extension-host/extension-host.component';
-export * from './app/shared/components/extension-host/extension-host-config';
-export { ModalDialogComponent } from './app/shared/components/modal-dialog/modal-dialog.component';
-export { ObjectTreeComponent } from './app/shared/components/object-tree/object-tree.component';
-export {
-    OrderStateLabelComponent,
-} from './app/shared/components/order-state-label/order-state-label.component';
-export {
-    PaginationControlsComponent,
-} from './app/shared/components/pagination-controls/pagination-controls.component';
-export { RichTextEditorComponent } from './app/shared/components/rich-text-editor/rich-text-editor.component';
-export {
-    ExternalImageDialogComponent,
-} from './app/shared/components/rich-text-editor/external-image-dialog/external-image-dialog.component';
-export {
-    LinkDialogComponent,
-} from './app/shared/components/rich-text-editor/link-dialog/link-dialog.component';
-export { SelectToggleComponent } from './app/shared/components/select-toggle/select-toggle.component';
-export { SimpleDialogComponent } from './app/shared/components/simple-dialog/simple-dialog.component';
-export { TableRowActionComponent } from './app/shared/components/table-row-action/table-row-action.component';
-export { TitleInputComponent } from './app/shared/components/title-input/title-input.component';
-export { EntityInfoComponent } from './app/shared/components/entity-info/entity-info.component';
-export { DatetimePickerComponent } from './app/shared/components/datetime-picker/datetime-picker.component';
-export { CurrencyNamePipe } from './app/shared/pipes/currency-name.pipe';
-export { FileSizePipe } from './app/shared/pipes/file-size.pipe';
-export { SentenceCasePipe } from './app/shared/pipes/sentence-case.pipe';
-export { SortPipe } from './app/shared/pipes/sort.pipe';
-export { StringToColorPipe } from './app/shared/pipes/string-to-color.pipe';
-export { HasPermissionPipe } from './app/shared/pipes/has-permission.pipe';
-
-// export { NotificationService } from './app/core/providers/notification/notification.service';
-// export { DataModule } from './app/data/data.module';
-// export { DataService } from './app/data/providers/data.service';
-// export { ServerConfigService } from './app/data/server-config';
-// export * from './app/shared/providers/modal/modal.service';
-// export { NavBuilderService } from './app/core/providers/nav-builder/nav-builder.service';
-// export { BaseListComponent } from './app/common/base-list.component';
-// export { BaseDetailComponent } from './app/common/base-detail.component';
-// export { BaseEntityResolver } from './app/common/base-entity-resolver';
-// export * from './app/core/providers/nav-builder/nav-builder-types';
-// export * from './app/core/providers/custom-field-component/custom-field-component.service';
-// export * from './app/shared/shared-declarations';
-// export * from './app/shared/providers/routing/can-deactivate-detail-guard';
+export * from './app/core/providers/local-storage/local-storage.service';
+export * from './app/core/providers/nav-builder/nav-builder.service';
+export * from './app/core/providers/notification/notification.service';
+export * from './app/core/providers/overlay-host/overlay-host.service';
+export * from './app/customer/components/address-card/address-card.component';
+export * from './app/customer/components/customer-detail/customer-detail.component';
+export * from './app/customer/components/customer-list/customer-list.component';
+export * from './app/customer/components/customer-status-label/customer-status-label.component';
+export * from './app/customer/customer.module';
+export * from './app/customer/customer.routes';
+export * from './app/dashboard/components/dashboard/dashboard.component';
+export * from './app/dashboard/dashboard.module';
+export * from './app/dashboard/dashboard.routes';
+export * from './app/data/data.module';
+export * from './app/data/providers/administrator-data.service';
+export * from './app/data/providers/auth-data.service';
+export * from './app/data/providers/base-data.service';
+export * from './app/data/providers/client-data.service';
+export * from './app/data/providers/collection-data.service';
+export * from './app/data/providers/customer-data.service';
+export * from './app/data/providers/data.service';
+export * from './app/data/providers/facet-data.service';
+export * from './app/data/providers/order-data.service';
+export * from './app/data/providers/product-data.service';
+export * from './app/data/providers/promotion-data.service';
+export * from './app/data/providers/settings-data.service';
+export * from './app/data/providers/shipping-method-data.service';
+export * from './app/extensions/lazy-extensions.module';
+export * from './app/extensions/shared-extensions.module';
+export * from './app/login/components/login/login.component';
+export * from './app/login/login.module';
+export * from './app/login/login.routes';
+export * from './app/login/providers/login.guard';
+export * from './app/marketing/components/promotion-detail/promotion-detail.component';
+export * from './app/marketing/components/promotion-list/promotion-list.component';
+export * from './app/marketing/marketing.module';
+export * from './app/marketing/marketing.routes';
+export * from './app/order/components/cancel-order-dialog/cancel-order-dialog.component';
+export * from './app/order/components/fulfill-order-dialog/fulfill-order-dialog.component';
+export * from './app/order/components/fulfillment-detail/fulfillment-detail.component';
+export * from './app/order/components/history-entry-detail/history-entry-detail.component';
+export * from './app/order/components/line-fulfillment/line-fulfillment.component';
+export * from './app/order/components/line-refunds/line-refunds.component';
+export * from './app/order/components/order-custom-fields-card/order-custom-fields-card.component';
+export * from './app/order/components/order-detail/order-detail.component';
+export * from './app/order/components/order-history/order-history.component';
+export * from './app/order/components/order-list/order-list.component';
+export * from './app/order/components/order-payment-card/order-payment-card.component';
+export * from './app/order/components/payment-detail/payment-detail.component';
+export * from './app/order/components/payment-state-label/payment-state-label.component';
+export * from './app/order/components/refund-order-dialog/refund-order-dialog.component';
+export * from './app/order/components/refund-state-label/refund-state-label.component';
+export * from './app/order/components/settle-refund-dialog/settle-refund-dialog.component';
+export * from './app/order/components/simple-item-list/simple-item-list.component';
+export * from './app/order/order.module';
+export * from './app/order/order.routes';
+export * from './app/settings/components/admin-detail/admin-detail.component';
+export * from './app/settings/components/administrator-list/administrator-list.component';
+export * from './app/settings/components/channel-detail/channel-detail.component';
+export * from './app/settings/components/channel-list/channel-list.component';
+export * from './app/settings/components/country-detail/country-detail.component';
+export * from './app/settings/components/country-list/country-list.component';
+export * from './app/settings/components/global-settings/global-settings.component';
+export * from './app/settings/components/payment-method-detail/payment-method-detail.component';
+export * from './app/settings/components/payment-method-list/payment-method-list.component';
+export * from './app/settings/components/permission-grid/permission-grid.component';
+export * from './app/settings/components/role-detail/role-detail.component';
+export * from './app/settings/components/role-list/role-list.component';
+export * from './app/settings/components/shipping-eligibility-test-result/shipping-eligibility-test-result.component';
+export * from './app/settings/components/shipping-method-detail/shipping-method-detail.component';
+export * from './app/settings/components/shipping-method-list/shipping-method-list.component';
+export * from './app/settings/components/shipping-method-test-result/shipping-method-test-result.component';
+export * from './app/settings/components/tax-category-detail/tax-category-detail.component';
+export * from './app/settings/components/tax-category-list/tax-category-list.component';
+export * from './app/settings/components/tax-rate-detail/tax-rate-detail.component';
+export * from './app/settings/components/tax-rate-list/tax-rate-list.component';
+export * from './app/settings/components/test-address-form/test-address-form.component';
+export * from './app/settings/components/test-order-builder/test-order-builder.component';
+export * from './app/settings/components/zone-selector-dialog/zone-selector-dialog.component';
+export * from './app/settings/settings.module';
+export * from './app/settings/settings.routes';
+export * from './app/shared/components/action-bar/action-bar.component';
+export * from './app/shared/components/action-bar-items/action-bar-items.component';
+export * from './app/shared/components/affixed-input/affixed-input.component';
+export * from './app/shared/components/affixed-input/percentage-suffix-input.component';
+export * from './app/shared/components/asset-file-input/asset-file-input.component';
+export * from './app/shared/components/asset-gallery/asset-gallery.component';
+export * from './app/shared/components/asset-picker-dialog/asset-picker-dialog.component';
+export * from './app/shared/components/asset-preview/asset-preview.component';
+export * from './app/shared/components/asset-preview-dialog/asset-preview-dialog.component';
+export * from './app/shared/components/channel-assignment-control/channel-assignment-control.component';
+export * from './app/shared/components/channel-badge/channel-badge.component';
+export * from './app/shared/components/chip/chip.component';
+export * from './app/shared/components/configurable-input/configurable-input.component';
+export * from './app/shared/components/currency-input/currency-input.component';
+export * from './app/shared/components/custom-field-control/custom-field-control.component';
+export * from './app/shared/components/customer-label/customer-label.component';
+export * from './app/shared/components/data-table/data-table-column.component';
+export * from './app/shared/components/data-table/data-table.component';
+export * from './app/shared/components/datetime-picker/datetime-picker.component';
+export * from './app/shared/components/datetime-picker/datetime-picker.service';
+export * from './app/shared/components/dropdown/dropdown-item.directive';
+export * from './app/shared/components/dropdown/dropdown-menu.component';
+export * from './app/shared/components/dropdown/dropdown-trigger.directive';
+export * from './app/shared/components/dropdown/dropdown.component';
+export * from './app/shared/components/entity-info/entity-info.component';
+export * from './app/shared/components/extension-host/extension-host.component';
+export * from './app/shared/components/extension-host/extension-host.service';
+export * from './app/shared/components/facet-value-chip/facet-value-chip.component';
+export * from './app/shared/components/facet-value-selector/facet-value-selector.component';
+export * from './app/shared/components/focal-point-control/focal-point-control.component';
+export * from './app/shared/components/form-field/form-field-control.directive';
+export * from './app/shared/components/form-field/form-field.component';
+export * from './app/shared/components/form-item/form-item.component';
+export * from './app/shared/components/formatted-address/formatted-address.component';
+export * from './app/shared/components/items-per-page-controls/items-per-page-controls.component';
+export * from './app/shared/components/labeled-data/labeled-data.component';
+export * from './app/shared/components/language-selector/language-selector.component';
+export * from './app/shared/components/modal-dialog/dialog-buttons.directive';
+export * from './app/shared/components/modal-dialog/dialog-component-outlet.component';
+export * from './app/shared/components/modal-dialog/dialog-title.directive';
+export * from './app/shared/components/modal-dialog/modal-dialog.component';
+export * from './app/shared/components/object-tree/object-tree.component';
+export * from './app/shared/components/order-state-label/order-state-label.component';
+export * from './app/shared/components/pagination-controls/pagination-controls.component';
+export * from './app/shared/components/rich-text-editor/external-image-dialog/external-image-dialog.component';
+export * from './app/shared/components/rich-text-editor/link-dialog/link-dialog.component';
+export * from './app/shared/components/rich-text-editor/prosemirror/prosemirror.service';
+export * from './app/shared/components/rich-text-editor/rich-text-editor.component';
+export * from './app/shared/components/select-toggle/select-toggle.component';
+export * from './app/shared/components/simple-dialog/simple-dialog.component';
+export * from './app/shared/components/table-row-action/table-row-action.component';
+export * from './app/shared/components/title-input/title-input.component';
+export * from './app/shared/directives/disabled.directive';
+export * from './app/shared/directives/if-default-channel-active.directive';
+export * from './app/shared/directives/if-multichannel.directive';
+export * from './app/shared/directives/if-permissions.directive';
+export * from './app/shared/pipes/asset-preview.pipe';
+export * from './app/shared/pipes/channel-label.pipe';
+export * from './app/shared/pipes/currency-name.pipe';
+export * from './app/shared/pipes/custom-field-label.pipe';
+export * from './app/shared/pipes/file-size.pipe';
+export * from './app/shared/pipes/has-permission.pipe';
+export * from './app/shared/pipes/sentence-case.pipe';
+export * from './app/shared/pipes/sort.pipe';
+export * from './app/shared/pipes/string-to-color.pipe';
+export * from './app/shared/providers/modal/modal.service';
+export * from './app/shared/shared.module';

+ 2 - 0
packages/admin-ui/tsconfig.json

@@ -15,6 +15,8 @@
     "strictPropertyInitialization": false,
     "target": "es2015",
     "skipLibCheck": true,
+    "esModuleInterop": true,
+    "allowSyntheticDefaultImports": true,
     "typeRoots": [
       "node_modules/@types",
       "./typings"

+ 1 - 1
packages/admin-ui/lib/tsconfig.lib.json → packages/admin-ui/tsconfig.lib.json

@@ -1,5 +1,5 @@
 {
-  "extends": "../tsconfig.json",
+  "extends": "./tsconfig.json",
   "compilerOptions": {
     "outDir": "../../out-tsc/lib",
     "target": "es2015",

+ 0 - 0
packages/admin-ui/lib/tsconfig.lib.prod.json → packages/admin-ui/tsconfig.lib.prod.json