@vendure/admin-ui 1.8.4 → 1.9.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bundles/vendure-admin-ui-catalog.umd.js +53 -101
- package/bundles/vendure-admin-ui-catalog.umd.js.map +1 -1
- package/bundles/vendure-admin-ui-core.umd.js +115 -54
- package/bundles/vendure-admin-ui-core.umd.js.map +1 -1
- package/bundles/vendure-admin-ui-customer.umd.js +52 -2
- package/bundles/vendure-admin-ui-customer.umd.js.map +1 -1
- package/bundles/vendure-admin-ui-login.umd.js +40 -8
- package/bundles/vendure-admin-ui-login.umd.js.map +1 -1
- package/bundles/vendure-admin-ui-order.umd.js +52 -3
- package/bundles/vendure-admin-ui-order.umd.js.map +1 -1
- package/catalog/components/apply-facet-dialog/apply-facet-dialog.component.d.ts +1 -2
- package/catalog/components/bulk-add-facet-values-dialog/bulk-add-facet-values-dialog.component.d.ts +0 -1
- package/catalog/components/product-detail/product-detail.component.d.ts +2 -7
- package/catalog/components/product-variants-list/product-variants-list.component.d.ts +11 -11
- package/catalog/providers/product-detail/product-detail.service.d.ts +1 -2
- package/catalog/vendure-admin-ui-catalog.metadata.json +1 -1
- package/core/common/generated-types.d.ts +59 -0
- package/core/common/version.d.ts +1 -1
- package/core/data/definitions/facet-definitions.d.ts +1 -0
- package/core/data/providers/facet-data.service.d.ts +5 -1
- package/core/providers/custom-history-entry-component/history-entry-component-types.d.ts +81 -0
- package/core/providers/custom-history-entry-component/history-entry-component.service.d.ts +16 -0
- package/core/public_api.d.ts +2 -1
- package/core/shared/components/facet-value-selector/facet-value-selector.component.d.ts +17 -17
- package/core/shared/dynamic-form-inputs/facet-value-form-input/facet-value-form-input.component.d.ts +3 -11
- package/core/shared/dynamic-form-inputs/register-dynamic-input-components.d.ts +1 -2
- package/core/vendure-admin-ui-core.metadata.json +1 -1
- package/customer/components/customer-detail/customer-detail.component.d.ts +3 -3
- package/customer/components/customer-history/customer-history-entry-host.component.d.ts +16 -0
- package/customer/components/customer-history/customer-history.component.d.ts +19 -3
- package/customer/public_api.d.ts +1 -0
- package/customer/vendure-admin-ui-customer.metadata.json +1 -1
- package/esm2015/catalog/components/apply-facet-dialog/apply-facet-dialog.component.js +2 -2
- package/esm2015/catalog/components/bulk-add-facet-values-dialog/bulk-add-facet-values-dialog.component.js +2 -3
- package/esm2015/catalog/components/product-detail/product-detail.component.js +16 -47
- package/esm2015/catalog/components/product-list/product-list-bulk-actions.js +4 -7
- package/esm2015/catalog/components/product-variants-list/product-variants-list.component.js +38 -30
- package/esm2015/catalog/providers/product-detail/product-detail.service.js +1 -4
- package/esm2015/core/common/generated-types.js +1 -1
- package/esm2015/core/common/introspection-result.js +2 -1
- package/esm2015/core/common/version.js +2 -2
- package/esm2015/core/data/definitions/facet-definitions.js +12 -1
- package/esm2015/core/data/providers/facet-data.service.js +5 -2
- package/esm2015/core/providers/custom-history-entry-component/history-entry-component-types.js +2 -0
- package/esm2015/core/providers/custom-history-entry-component/history-entry-component.service.js +39 -0
- package/esm2015/core/public_api.js +3 -2
- package/esm2015/core/shared/components/facet-value-selector/facet-value-selector.component.js +52 -22
- package/esm2015/core/shared/components/form-field/form-field.component.js +2 -2
- package/esm2015/core/shared/components/timeline-entry/timeline-entry.component.js +2 -2
- package/esm2015/core/shared/dynamic-form-inputs/facet-value-form-input/facet-value-form-input.component.js +3 -15
- package/esm2015/customer/components/customer-detail/customer-detail.component.js +1 -1
- package/esm2015/customer/components/customer-history/customer-history-entry-host.component.js +51 -0
- package/esm2015/customer/components/customer-history/customer-history.component.js +12 -4
- package/esm2015/customer/customer.module.js +3 -1
- package/esm2015/customer/public_api.js +2 -1
- package/esm2015/login/components/login/login.component.js +37 -5
- package/esm2015/order/components/order-detail/order-detail.component.js +1 -1
- package/esm2015/order/components/order-history/order-history-entry-host.component.js +51 -0
- package/esm2015/order/components/order-history/order-history.component.js +12 -5
- package/esm2015/order/order.module.js +6 -4
- package/esm2015/order/public_api.js +2 -1
- package/fesm2015/vendure-admin-ui-catalog.js +54 -85
- package/fesm2015/vendure-admin-ui-catalog.js.map +1 -1
- package/fesm2015/vendure-admin-ui-core.js +106 -39
- package/fesm2015/vendure-admin-ui-core.js.map +1 -1
- package/fesm2015/vendure-admin-ui-customer.js +63 -5
- package/fesm2015/vendure-admin-ui-customer.js.map +1 -1
- package/fesm2015/vendure-admin-ui-login.js +36 -4
- package/fesm2015/vendure-admin-ui-login.js.map +1 -1
- package/fesm2015/vendure-admin-ui-order.js +63 -6
- package/fesm2015/vendure-admin-ui-order.js.map +1 -1
- package/login/components/login/login.component.d.ts +11 -1
- package/login/vendure-admin-ui-login.metadata.json +1 -1
- package/order/components/order-detail/order-detail.component.d.ts +3 -3
- package/order/components/order-history/order-history-entry-host.component.d.ts +16 -0
- package/order/components/order-history/order-history.component.d.ts +18 -3
- package/order/public_api.d.ts +1 -0
- package/order/vendure-admin-ui-order.metadata.json +1 -1
- package/package.json +2 -2
- package/static/i18n-messages/de.json +3 -1
- package/static/i18n-messages/en.json +3 -1
- package/static/styles/_variables.scss +1 -0
- package/core/common/utilities/flatten-facet-values.d.ts +0 -2
- package/esm2015/core/common/utilities/flatten-facet-values.js +0 -4
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"vendure-admin-ui-login.js","sources":["../../src/lib/login/src/components/login/login.component.ts","../../src/lib/login/src/providers/login.guard.ts","../../src/lib/login/src/login.routes.ts","../../src/lib/login/src/login.module.ts","../../src/lib/login/src/public_api.ts","../../src/lib/login/src/vendure-admin-ui-login.ts"],"sourcesContent":["import { Component } from '@angular/core';\r\nimport { Router } from '@angular/router';\r\nimport { ADMIN_UI_VERSION, AuthService, AUTH_REDIRECT_PARAM, getAppConfig } from '@vendure/admin-ui/core';\r\n\r\n@Component({\r\n selector: 'vdr-login',\r\n templateUrl: './login.component.html',\r\n styleUrls: ['./login.component.scss'],\r\n})\r\nexport class LoginComponent {\r\n username = '';\r\n password = '';\r\n rememberMe = false;\r\n version = ADMIN_UI_VERSION;\r\n errorMessage: string | undefined;\r\n brand = getAppConfig().brand;\r\n hideVendureBranding = getAppConfig().hideVendureBranding;\r\n hideVersion = getAppConfig().hideVersion;\r\n\r\n constructor(private authService: AuthService, private router: Router) {}\r\n\r\n logIn(): void {\r\n this.errorMessage = undefined;\r\n this.authService.logIn(this.username, this.password, this.rememberMe).subscribe(result => {\r\n switch (result.__typename) {\r\n case 'CurrentUser':\r\n const redirect = this.getRedirectRoute();\r\n this.router.navigateByUrl(redirect ? redirect : '/');\r\n break;\r\n case 'InvalidCredentialsError':\r\n case 'NativeAuthStrategyError':\r\n this.errorMessage = result.message;\r\n break;\r\n }\r\n });\r\n }\r\n\r\n /**\r\n * Attempts to read a redirect param from the current url and parse it into a\r\n * route from which the user was redirected after a 401 error.\r\n */\r\n private getRedirectRoute(): string | undefined {\r\n let redirectTo: string | undefined;\r\n const re = new RegExp(`${AUTH_REDIRECT_PARAM}=(.*)`);\r\n try {\r\n const redirectToParam = window.location.search.match(re);\r\n if (redirectToParam && 1 < redirectToParam.length) {\r\n redirectTo = atob(decodeURIComponent(redirectToParam[1]));\r\n }\r\n } catch (e) {\r\n // ignore\r\n }\r\n return redirectTo;\r\n }\r\n}\r\n","import { Injectable } from '@angular/core';\r\nimport { ActivatedRouteSnapshot, CanActivate, Router } from '@angular/router';\r\nimport { AuthService } from '@vendure/admin-ui/core';\r\nimport { Observable } from 'rxjs';\r\nimport { map } from 'rxjs/operators';\r\n\r\n/**\r\n * This guard prevents loggen-in users from navigating to the login screen.\r\n */\r\n@Injectable({\r\n providedIn: 'root',\r\n})\r\nexport class LoginGuard implements CanActivate {\r\n constructor(private router: Router, private authService: AuthService) {}\r\n\r\n canActivate(route: ActivatedRouteSnapshot): Observable<boolean> {\r\n return this.authService.checkAuthenticatedStatus().pipe(\r\n map(authenticated => {\r\n if (authenticated) {\r\n this.router.navigate(['/']);\r\n }\r\n return !authenticated;\r\n }),\r\n );\r\n }\r\n}\r\n","import { Routes } from '@angular/router';\r\n\r\nimport { LoginComponent } from './components/login/login.component';\r\nimport { LoginGuard } from './providers/login.guard';\r\n\r\nexport const loginRoutes: Routes = [\r\n {\r\n path: '',\r\n component: LoginComponent,\r\n pathMatch: 'full',\r\n canActivate: [LoginGuard],\r\n },\r\n];\r\n","import { NgModule } from '@angular/core';\r\nimport { RouterModule } from '@angular/router';\r\nimport { SharedModule } from '@vendure/admin-ui/core';\r\n\r\nimport { LoginComponent } from './components/login/login.component';\r\nimport { loginRoutes } from './login.routes';\r\n\r\n@NgModule({\r\n imports: [SharedModule, RouterModule.forChild(loginRoutes)],\r\n exports: [],\r\n declarations: [LoginComponent],\r\n})\r\nexport class LoginModule {}\r\n","// This file was generated by the build-public-api.ts script\nexport * from './components/login/login.component';\nexport * from './login.module';\nexport * from './login.routes';\nexport * from './providers/login.guard';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"vendure-admin-ui-login.js","sources":["../../src/lib/login/src/components/login/login.component.ts","../../src/lib/login/src/providers/login.guard.ts","../../src/lib/login/src/login.routes.ts","../../src/lib/login/src/login.module.ts","../../src/lib/login/src/public_api.ts","../../src/lib/login/src/vendure-admin-ui-login.ts"],"sourcesContent":["import { HttpClient, HttpParams } from '@angular/common/http';\r\nimport { Component } from '@angular/core';\r\nimport { Router } from '@angular/router';\r\nimport { ADMIN_UI_VERSION, AuthService, AUTH_REDIRECT_PARAM, getAppConfig } from '@vendure/admin-ui/core';\r\n\r\n@Component({\r\n selector: 'vdr-login',\r\n templateUrl: './login.component.html',\r\n styleUrls: ['./login.component.scss'],\r\n})\r\nexport class LoginComponent {\r\n username = '';\r\n password = '';\r\n rememberMe = false;\r\n version = ADMIN_UI_VERSION;\r\n errorMessage: string | undefined;\r\n brand = getAppConfig().brand;\r\n hideVendureBranding = getAppConfig().hideVendureBranding;\r\n hideVersion = getAppConfig().hideVersion;\r\n customImageUrl = getAppConfig().loginImageUrl;\r\n imageUrl = '';\r\n imageUnsplashUrl = '';\r\n imageLocation = '';\r\n imageCreator = '';\r\n imageCreatorUrl = '';\r\n\r\n constructor(private authService: AuthService, private router: Router, private httpClient: HttpClient) {\r\n if (this.customImageUrl) {\r\n this.imageUrl = this.customImageUrl;\r\n } else {\r\n this.loadImage();\r\n }\r\n }\r\n\r\n logIn(): void {\r\n this.errorMessage = undefined;\r\n this.authService.logIn(this.username, this.password, this.rememberMe).subscribe(result => {\r\n switch (result.__typename) {\r\n case 'CurrentUser':\r\n const redirect = this.getRedirectRoute();\r\n this.router.navigateByUrl(redirect ? redirect : '/');\r\n break;\r\n case 'InvalidCredentialsError':\r\n case 'NativeAuthStrategyError':\r\n this.errorMessage = result.message;\r\n break;\r\n }\r\n });\r\n }\r\n\r\n loadImage() {\r\n this.httpClient\r\n .get('https://login-image.vendure.io')\r\n .toPromise()\r\n .then(res => {\r\n this.updateImage(res);\r\n });\r\n }\r\n\r\n updateImage(res: any) {\r\n const user: any = (res as any).user;\r\n const location: any = (res as any).location;\r\n\r\n this.imageUrl = res.urls.regular;\r\n this.imageCreator = user.name;\r\n this.imageLocation = location.name;\r\n this.imageCreatorUrl = user.links.html;\r\n this.imageUnsplashUrl = res.links.html;\r\n }\r\n\r\n /**\r\n * Attempts to read a redirect param from the current url and parse it into a\r\n * route from which the user was redirected after a 401 error.\r\n */\r\n private getRedirectRoute(): string | undefined {\r\n let redirectTo: string | undefined;\r\n const re = new RegExp(`${AUTH_REDIRECT_PARAM}=(.*)`);\r\n try {\r\n const redirectToParam = window.location.search.match(re);\r\n if (redirectToParam && 1 < redirectToParam.length) {\r\n redirectTo = atob(decodeURIComponent(redirectToParam[1]));\r\n }\r\n } catch (e) {\r\n // ignore\r\n }\r\n return redirectTo;\r\n }\r\n}\r\n","import { Injectable } from '@angular/core';\r\nimport { ActivatedRouteSnapshot, CanActivate, Router } from '@angular/router';\r\nimport { AuthService } from '@vendure/admin-ui/core';\r\nimport { Observable } from 'rxjs';\r\nimport { map } from 'rxjs/operators';\r\n\r\n/**\r\n * This guard prevents loggen-in users from navigating to the login screen.\r\n */\r\n@Injectable({\r\n providedIn: 'root',\r\n})\r\nexport class LoginGuard implements CanActivate {\r\n constructor(private router: Router, private authService: AuthService) {}\r\n\r\n canActivate(route: ActivatedRouteSnapshot): Observable<boolean> {\r\n return this.authService.checkAuthenticatedStatus().pipe(\r\n map(authenticated => {\r\n if (authenticated) {\r\n this.router.navigate(['/']);\r\n }\r\n return !authenticated;\r\n }),\r\n );\r\n }\r\n}\r\n","import { Routes } from '@angular/router';\r\n\r\nimport { LoginComponent } from './components/login/login.component';\r\nimport { LoginGuard } from './providers/login.guard';\r\n\r\nexport const loginRoutes: Routes = [\r\n {\r\n path: '',\r\n component: LoginComponent,\r\n pathMatch: 'full',\r\n canActivate: [LoginGuard],\r\n },\r\n];\r\n","import { NgModule } from '@angular/core';\r\nimport { RouterModule } from '@angular/router';\r\nimport { SharedModule } from '@vendure/admin-ui/core';\r\n\r\nimport { LoginComponent } from './components/login/login.component';\r\nimport { loginRoutes } from './login.routes';\r\n\r\n@NgModule({\r\n imports: [SharedModule, RouterModule.forChild(loginRoutes)],\r\n exports: [],\r\n declarations: [LoginComponent],\r\n})\r\nexport class LoginModule {}\r\n","// This file was generated by the build-public-api.ts script\nexport * from './components/login/login.component';\nexport * from './login.module';\nexport * from './login.routes';\nexport * from './providers/login.guard';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":[],"mappings":"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"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { Component, ChangeDetectionStrategy, EventEmitter, Input, Output, Injectable, ChangeDetectorRef, ElementRef, ViewChildren, HostBinding, NgModule } from '@angular/core';
|
|
2
|
+
import { Component, ChangeDetectionStrategy, EventEmitter, Input, Output, Injectable, ChangeDetectorRef, ComponentFactoryResolver, ViewChild, ViewContainerRef, ElementRef, ViewChildren, HostBinding, NgModule } from '@angular/core';
|
|
3
3
|
import { FormGroup, FormControl, Validators, FormBuilder, FormArray } from '@angular/forms';
|
|
4
4
|
import * as i1 from '@vendure/admin-ui/core';
|
|
5
|
-
import { DataService, getAppConfig, I18nService, HistoryEntryType, SortOrder, ModalService, NotificationService, ADDRESS_FRAGMENT, BaseDetailComponent, DeletionResult, ServerConfigService, configurableDefinitionToInstance, GlobalFlag, configurableOperationValueIsValid, toConfigurableOperationInput, EditNoteDialogComponent, transformRelationCustomFieldInputs, BaseListComponent, LogicalOperator, LocalStorageService, AdjustmentType, CanDeactivateDetailGuard, detailBreadcrumb, SharedModule } from '@vendure/admin-ui/core';
|
|
5
|
+
import { DataService, getAppConfig, I18nService, HistoryEntryType, SortOrder, ModalService, NotificationService, ADDRESS_FRAGMENT, BaseDetailComponent, DeletionResult, ServerConfigService, configurableDefinitionToInstance, GlobalFlag, configurableOperationValueIsValid, toConfigurableOperationInput, EditNoteDialogComponent, transformRelationCustomFieldInputs, HistoryEntryComponentService, BaseListComponent, LogicalOperator, LocalStorageService, AdjustmentType, CanDeactivateDetailGuard, detailBreadcrumb, SharedModule } from '@vendure/admin-ui/core';
|
|
6
6
|
import { marker } from '@biesbjerg/ngx-translate-extract-marker';
|
|
7
7
|
import { Subject, concat, EMPTY, of, combineLatest, merge, BehaviorSubject } from 'rxjs';
|
|
8
8
|
import { distinctUntilChanged, switchMap, map, startWith, catchError, retryWhen, delay, take, tap, debounceTime, mapTo, takeUntil, shareReplay, filter } from 'rxjs/operators';
|
|
@@ -2238,8 +2238,58 @@ OrderEditorComponent.ctorParameters = () => [
|
|
|
2238
2238
|
{ type: OrderTransitionService }
|
|
2239
2239
|
];
|
|
2240
2240
|
|
|
2241
|
+
class OrderHistoryEntryHostComponent {
|
|
2242
|
+
constructor(componentFactoryResolver, historyEntryComponentService) {
|
|
2243
|
+
this.componentFactoryResolver = componentFactoryResolver;
|
|
2244
|
+
this.historyEntryComponentService = historyEntryComponentService;
|
|
2245
|
+
this.expandClick = new EventEmitter();
|
|
2246
|
+
}
|
|
2247
|
+
ngOnInit() {
|
|
2248
|
+
const componentType = this.historyEntryComponentService.getComponent(this.entry.type);
|
|
2249
|
+
const factory = this.componentFactoryResolver.resolveComponentFactory(componentType);
|
|
2250
|
+
const componentRef = this.portalRef.createComponent(factory);
|
|
2251
|
+
componentRef.instance.entry = this.entry;
|
|
2252
|
+
componentRef.instance.order = this.order;
|
|
2253
|
+
this.instance = componentRef.instance;
|
|
2254
|
+
this.componentRef = componentRef;
|
|
2255
|
+
}
|
|
2256
|
+
ngOnDestroy() {
|
|
2257
|
+
var _a;
|
|
2258
|
+
(_a = this.componentRef) === null || _a === void 0 ? void 0 : _a.destroy();
|
|
2259
|
+
}
|
|
2260
|
+
}
|
|
2261
|
+
OrderHistoryEntryHostComponent.decorators = [
|
|
2262
|
+
{ type: Component, args: [{
|
|
2263
|
+
selector: 'vdr-order-history-entry-host',
|
|
2264
|
+
template: ` <vdr-timeline-entry
|
|
2265
|
+
[displayType]="instance.getDisplayType(entry)"
|
|
2266
|
+
[iconShape]="instance.getIconShape && instance.getIconShape(entry)"
|
|
2267
|
+
[createdAt]="entry.createdAt"
|
|
2268
|
+
[name]="instance.getName && instance.getName(entry)"
|
|
2269
|
+
[featured]="instance.isFeatured(entry)"
|
|
2270
|
+
[collapsed]="!expanded && !instance.isFeatured(entry)"
|
|
2271
|
+
(expandClick)="expandClick.emit()"
|
|
2272
|
+
>
|
|
2273
|
+
<div #portal></div>
|
|
2274
|
+
</vdr-timeline-entry>`,
|
|
2275
|
+
exportAs: 'historyEntry'
|
|
2276
|
+
},] }
|
|
2277
|
+
];
|
|
2278
|
+
OrderHistoryEntryHostComponent.ctorParameters = () => [
|
|
2279
|
+
{ type: ComponentFactoryResolver },
|
|
2280
|
+
{ type: HistoryEntryComponentService }
|
|
2281
|
+
];
|
|
2282
|
+
OrderHistoryEntryHostComponent.propDecorators = {
|
|
2283
|
+
entry: [{ type: Input }],
|
|
2284
|
+
order: [{ type: Input }],
|
|
2285
|
+
expanded: [{ type: Input }],
|
|
2286
|
+
expandClick: [{ type: Output }],
|
|
2287
|
+
portalRef: [{ type: ViewChild, args: ['portal', { static: true, read: ViewContainerRef },] }]
|
|
2288
|
+
};
|
|
2289
|
+
|
|
2241
2290
|
class OrderHistoryComponent {
|
|
2242
|
-
constructor() {
|
|
2291
|
+
constructor(historyEntryComponentService) {
|
|
2292
|
+
this.historyEntryComponentService = historyEntryComponentService;
|
|
2243
2293
|
this.addNote = new EventEmitter();
|
|
2244
2294
|
this.updateNote = new EventEmitter();
|
|
2245
2295
|
this.deleteNote = new EventEmitter();
|
|
@@ -2248,6 +2298,9 @@ class OrderHistoryComponent {
|
|
|
2248
2298
|
this.expanded = false;
|
|
2249
2299
|
this.type = HistoryEntryType;
|
|
2250
2300
|
}
|
|
2301
|
+
hasCustomComponent(type) {
|
|
2302
|
+
return !!this.historyEntryComponentService.getComponent(type);
|
|
2303
|
+
}
|
|
2251
2304
|
getDisplayType(entry) {
|
|
2252
2305
|
if (entry.type === HistoryEntryType.ORDER_STATE_TRANSITION) {
|
|
2253
2306
|
if (entry.data.to === 'Delivered') {
|
|
@@ -2319,7 +2372,7 @@ class OrderHistoryComponent {
|
|
|
2319
2372
|
case HistoryEntryType.ORDER_MODIFIED:
|
|
2320
2373
|
return true;
|
|
2321
2374
|
default:
|
|
2322
|
-
return
|
|
2375
|
+
return true;
|
|
2323
2376
|
}
|
|
2324
2377
|
}
|
|
2325
2378
|
getFulfillment(entry) {
|
|
@@ -2377,11 +2430,14 @@ class OrderHistoryComponent {
|
|
|
2377
2430
|
OrderHistoryComponent.decorators = [
|
|
2378
2431
|
{ type: Component, args: [{
|
|
2379
2432
|
selector: 'vdr-order-history',
|
|
2380
|
-
template: "<h4>{{ 'order.order-history' | translate }}</h4>\r\n<div class=\"entry-list\" [class.expanded]=\"expanded\">\r\n <vdr-timeline-entry iconShape=\"note\" displayType=\"muted\" [featured]=\"true\">\r\n <div class=\"note-entry\">\r\n <textarea [(ngModel)]=\"note\" name=\"note\" class=\"note\"></textarea>\r\n <button class=\"btn btn-secondary\" [disabled]=\"!note\" (click)=\"addNoteToOrder()\">\r\n {{ 'common.add-note' | translate }}\r\n </button>\r\n </div>\r\n <div class=\"visibility-select\">\r\n <clr-checkbox-wrapper>\r\n <input type=\"checkbox\" clrCheckbox [(ngModel)]=\"noteIsPrivate\" />\r\n <label>{{ 'order.note-is-private' | translate }}</label>\r\n </clr-checkbox-wrapper>\r\n <span *ngIf=\"noteIsPrivate\" class=\"private\">\r\n {{ 'order.note-only-visible-to-administrators' | translate }}\r\n </span>\r\n <span *ngIf=\"!noteIsPrivate\" class=\"public\">\r\n {{ 'order.note-visible-to-customer' | translate }}\r\n </span>\r\n </div>\r\n </vdr-timeline-entry>\r\n <vdr-timeline-entry\r\n *ngFor=\"let entry of history\"\r\n [displayType]=\"getDisplayType(entry)\"\r\n [iconShape]=\"getTimelineIcon(entry)\"\r\n [createdAt]=\"entry.createdAt\"\r\n [name]=\"getName(entry)\"\r\n [featured]=\"isFeatured(entry)\"\r\n [collapsed]=\"!expanded && !isFeatured(entry)\"\r\n (expandClick)=\"expanded = !expanded\"\r\n >\r\n <ng-container [ngSwitch]=\"entry.type\">\r\n <ng-container *ngSwitchCase=\"type.ORDER_STATE_TRANSITION\">\r\n <div class=\"title\" *ngIf=\"entry.data.to === 'Delivered'\">\r\n {{ 'order.history-order-fulfilled' | translate }}\r\n </div>\r\n <div class=\"title\" *ngIf=\"entry.data.to === 'Cancelled'\">\r\n {{ 'order.history-order-cancelled' | translate }}\r\n </div>\r\n <ng-template [ngIf]=\"entry.data.to !== 'Cancelled' && entry.data.to !== 'Delivered'\">\r\n {{\r\n 'order.history-order-transition'\r\n | translate: { from: entry.data.from, to: entry.data.to }\r\n }}\r\n </ng-template>\r\n </ng-container>\r\n <ng-container *ngSwitchCase=\"type.ORDER_MODIFIED\">\r\n <div class=\"title\">\r\n {{ 'order.history-order-modified' | translate }}\r\n </div>\r\n <ng-container *ngIf=\"getModification(entry.data.modificationId) as modification\">\r\n {{ 'order.modify-order-price-difference' | translate }}:\r\n <strong>{{ modification.priceChange | localeCurrency: order.currencyCode }}</strong>\r\n <vdr-chip colorType=\"success\" *ngIf=\"modification.isSettled\">{{\r\n 'order.modification-settled' | translate\r\n }}</vdr-chip>\r\n <vdr-chip colorType=\"error\" *ngIf=\"!modification.isSettled\">{{\r\n 'order.modification-not-settled' | translate\r\n }}</vdr-chip>\r\n <vdr-history-entry-detail>\r\n <vdr-modification-detail\r\n [order]=\"order\"\r\n [modification]=\"modification\"\r\n ></vdr-modification-detail>\r\n </vdr-history-entry-detail>\r\n </ng-container>\r\n </ng-container>\r\n <ng-container *ngSwitchCase=\"type.ORDER_PAYMENT_TRANSITION\">\r\n <ng-container *ngIf=\"entry.data.to === 'Settled'; else regularPaymentTransition\">\r\n <div class=\"title\">\r\n {{ 'order.history-payment-settled' | translate }}\r\n </div>\r\n {{ 'order.transaction-id' | translate }}: {{ getPayment(entry)?.transactionId }}\r\n <vdr-history-entry-detail *ngIf=\"getPayment(entry) as payment\">\r\n <vdr-payment-detail\r\n [payment]=\"payment\"\r\n [currencyCode]=\"order.currencyCode\"\r\n ></vdr-payment-detail>\r\n </vdr-history-entry-detail>\r\n </ng-container>\r\n <ng-template #regularPaymentTransition>\r\n {{\r\n 'order.history-payment-transition'\r\n | translate\r\n : {\r\n from: entry.data.from,\r\n to: entry.data.to,\r\n id: getPayment(entry)?.transactionId\r\n }\r\n }}\r\n </ng-template>\r\n </ng-container>\r\n <ng-container *ngSwitchCase=\"type.ORDER_REFUND_TRANSITION\">\r\n {{\r\n 'order.history-refund-transition'\r\n | translate: { from: entry.data.from, to: entry.data.to, id: entry.data.refundId }\r\n }}\r\n </ng-container>\r\n <ng-container *ngSwitchCase=\"type.ORDER_CANCELLATION\">\r\n {{ 'order.history-items-cancelled' | translate: { count: entry.data.orderItemIds.length } }}\r\n <vdr-history-entry-detail *ngIf=\"getCancelledItems(entry) as items\">\r\n <vdr-labeled-data [label]=\"'order.cancellation-reason' | translate\">\r\n {{ entry.data.reason }}\r\n </vdr-labeled-data>\r\n <vdr-labeled-data [label]=\"'order.contents' | translate\">\r\n <vdr-simple-item-list [items]=\"items\"></vdr-simple-item-list>\r\n </vdr-labeled-data>\r\n <vdr-labeled-data [label]=\"'order.shipping-cancelled' | translate\">\r\n {{ entry.data.shippingCancelled }}\r\n </vdr-labeled-data>\r\n </vdr-history-entry-detail>\r\n </ng-container>\r\n <ng-container *ngSwitchCase=\"type.ORDER_FULFILLMENT\">\r\n {{ 'order.history-fulfillment-created' | translate }}\r\n <vdr-history-entry-detail *ngIf=\"getFulfillment(entry) as fulfillment\">\r\n <vdr-fulfillment-detail\r\n [fulfillmentId]=\"fulfillment.id\"\r\n [order]=\"order\"\r\n ></vdr-fulfillment-detail>\r\n </vdr-history-entry-detail>\r\n </ng-container>\r\n <ng-container *ngSwitchCase=\"type.ORDER_FULFILLMENT_TRANSITION\">\r\n <ng-container *ngIf=\"entry.data.to === 'Delivered'\">\r\n <div class=\"title\">\r\n {{ 'order.history-fulfillment-delivered' | translate }}\r\n </div>\r\n {{ 'order.tracking-code' | translate }}: {{ getFulfillment(entry)?.trackingCode }}\r\n </ng-container>\r\n <ng-container *ngIf=\"entry.data.to === 'Shipped'\">\r\n <div class=\"title\">\r\n {{ 'order.history-fulfillment-shipped' | translate }}\r\n </div>\r\n {{ 'order.tracking-code' | translate }}: {{ getFulfillment(entry)?.trackingCode }}\r\n </ng-container>\r\n <ng-container *ngIf=\"entry.data.to !== 'Delivered' && entry.data.to !== 'Shipped'\">\r\n {{\r\n 'order.history-fulfillment-transition'\r\n | translate: { from: entry.data.from, to: entry.data.to }\r\n }}\r\n </ng-container>\r\n <vdr-history-entry-detail *ngIf=\"getFulfillment(entry) as fulfillment\">\r\n <vdr-fulfillment-detail\r\n [fulfillmentId]=\"fulfillment.id\"\r\n [order]=\"order\"\r\n ></vdr-fulfillment-detail>\r\n </vdr-history-entry-detail>\r\n </ng-container>\r\n <ng-container *ngSwitchCase=\"type.ORDER_NOTE\">\r\n <div class=\"flex\">\r\n <div class=\"note-text\">\r\n <span *ngIf=\"entry.isPublic\" class=\"note-visibility public\">{{\r\n 'common.public' | translate\r\n }}</span>\r\n <span *ngIf=\"!entry.isPublic\" class=\"note-visibility private\">{{\r\n 'common.private' | translate\r\n }}</span>\r\n {{ entry.data.note }}\r\n </div>\r\n <div class=\"flex-spacer\"></div>\r\n <vdr-dropdown>\r\n <button class=\"icon-button\" vdrDropdownTrigger>\r\n <clr-icon shape=\"ellipsis-vertical\"></clr-icon>\r\n </button>\r\n <vdr-dropdown-menu vdrPosition=\"bottom-right\">\r\n <button\r\n class=\"button\"\r\n vdrDropdownItem\r\n (click)=\"updateNote.emit(entry)\"\r\n [disabled]=\"!('UpdateOrder' | hasPermission)\"\r\n >\r\n <clr-icon shape=\"edit\"></clr-icon>\r\n {{ 'common.edit' | translate }}\r\n </button>\r\n <div class=\"dropdown-divider\"></div>\r\n <button\r\n class=\"button\"\r\n vdrDropdownItem\r\n (click)=\"deleteNote.emit(entry)\"\r\n [disabled]=\"!('UpdateOrder' | hasPermission)\"\r\n >\r\n <clr-icon shape=\"trash\" class=\"is-danger\"></clr-icon>\r\n {{ 'common.delete' | translate }}\r\n </button>\r\n </vdr-dropdown-menu>\r\n </vdr-dropdown>\r\n </div>\r\n </ng-container>\r\n <ng-container *ngSwitchCase=\"type.ORDER_COUPON_APPLIED\">\r\n {{ 'order.history-coupon-code-applied' | translate }}:\r\n <vdr-chip>\r\n <a [routerLink]=\"['/marketing', 'promotions', entry.data.promotionId]\">{{\r\n entry.data.couponCode\r\n }}</a>\r\n </vdr-chip>\r\n </ng-container>\r\n <ng-container *ngSwitchCase=\"type.ORDER_COUPON_REMOVED\">\r\n {{ 'order.history-coupon-code-removed' | translate }}:\r\n <vdr-chip\r\n ><span class=\"cancelled-coupon-code\">{{ entry.data.couponCode }}</span></vdr-chip\r\n >\r\n </ng-container>\r\n </ng-container>\r\n </vdr-timeline-entry>\r\n <vdr-timeline-entry [isLast]=\"true\" [createdAt]=\"order.createdAt\" [featured]=\"true\">\r\n <div class=\"title\">\r\n {{ 'order.history-order-created' | translate }}\r\n </div>\r\n </vdr-timeline-entry>\r\n</div>\r\n",
|
|
2433
|
+
template: "<h4>{{ 'order.order-history' | translate }}</h4>\r\n<div class=\"entry-list\" [class.expanded]=\"expanded\">\r\n <vdr-timeline-entry iconShape=\"note\" displayType=\"muted\" [featured]=\"true\">\r\n <div class=\"note-entry\">\r\n <textarea [(ngModel)]=\"note\" name=\"note\" class=\"note\"></textarea>\r\n <button class=\"btn btn-secondary\" [disabled]=\"!note\" (click)=\"addNoteToOrder()\">\r\n {{ 'common.add-note' | translate }}\r\n </button>\r\n </div>\r\n <div class=\"visibility-select\">\r\n <clr-checkbox-wrapper>\r\n <input type=\"checkbox\" clrCheckbox [(ngModel)]=\"noteIsPrivate\" />\r\n <label>{{ 'order.note-is-private' | translate }}</label>\r\n </clr-checkbox-wrapper>\r\n <span *ngIf=\"noteIsPrivate\" class=\"private\">\r\n {{ 'order.note-only-visible-to-administrators' | translate }}\r\n </span>\r\n <span *ngIf=\"!noteIsPrivate\" class=\"public\">\r\n {{ 'order.note-visible-to-customer' | translate }}\r\n </span>\r\n </div>\r\n </vdr-timeline-entry>\r\n <ng-container *ngFor=\"let entry of history\">\r\n <vdr-order-history-entry-host\r\n *ngIf=\"hasCustomComponent(entry.type); else defaultComponents\"\r\n [order]=\"order\"\r\n [entry]=\"entry\"\r\n [expanded]=\"expanded\"\r\n (expandClick)=\"expanded = !expanded\"\r\n ></vdr-order-history-entry-host>\r\n <ng-template #defaultComponents>\r\n <vdr-timeline-entry\r\n [displayType]=\"getDisplayType(entry)\"\r\n [iconShape]=\"getTimelineIcon(entry)\"\r\n [createdAt]=\"entry.createdAt\"\r\n [name]=\"getName(entry)\"\r\n [featured]=\"isFeatured(entry)\"\r\n [collapsed]=\"!expanded && !isFeatured(entry)\"\r\n (expandClick)=\"expanded = !expanded\"\r\n >\r\n <ng-container [ngSwitch]=\"entry.type\">\r\n <ng-container *ngSwitchCase=\"type.ORDER_STATE_TRANSITION\">\r\n <div class=\"title\" *ngIf=\"entry.data.to === 'Delivered'\">\r\n {{ 'order.history-order-fulfilled' | translate }}\r\n </div>\r\n <div class=\"title\" *ngIf=\"entry.data.to === 'Cancelled'\">\r\n {{ 'order.history-order-cancelled' | translate }}\r\n </div>\r\n <ng-template [ngIf]=\"entry.data.to !== 'Cancelled' && entry.data.to !== 'Delivered'\">\r\n {{\r\n 'order.history-order-transition'\r\n | translate: { from: entry.data.from, to: entry.data.to }\r\n }}\r\n </ng-template>\r\n </ng-container>\r\n <ng-container *ngSwitchCase=\"type.ORDER_MODIFIED\">\r\n <div class=\"title\">\r\n {{ 'order.history-order-modified' | translate }}\r\n </div>\r\n <ng-container *ngIf=\"getModification(entry.data.modificationId) as modification\">\r\n {{ 'order.modify-order-price-difference' | translate }}:\r\n <strong>{{\r\n modification.priceChange | localeCurrency: order.currencyCode\r\n }}</strong>\r\n <vdr-chip colorType=\"success\" *ngIf=\"modification.isSettled\">{{\r\n 'order.modification-settled' | translate\r\n }}</vdr-chip>\r\n <vdr-chip colorType=\"error\" *ngIf=\"!modification.isSettled\">{{\r\n 'order.modification-not-settled' | translate\r\n }}</vdr-chip>\r\n <vdr-history-entry-detail>\r\n <vdr-modification-detail\r\n [order]=\"order\"\r\n [modification]=\"modification\"\r\n ></vdr-modification-detail>\r\n </vdr-history-entry-detail>\r\n </ng-container>\r\n </ng-container>\r\n <ng-container *ngSwitchCase=\"type.ORDER_PAYMENT_TRANSITION\">\r\n <ng-container *ngIf=\"entry.data.to === 'Settled'; else regularPaymentTransition\">\r\n <div class=\"title\">\r\n {{ 'order.history-payment-settled' | translate }}\r\n </div>\r\n {{ 'order.transaction-id' | translate }}: {{ getPayment(entry)?.transactionId }}\r\n <vdr-history-entry-detail *ngIf=\"getPayment(entry) as payment\">\r\n <vdr-payment-detail\r\n [payment]=\"payment\"\r\n [currencyCode]=\"order.currencyCode\"\r\n ></vdr-payment-detail>\r\n </vdr-history-entry-detail>\r\n </ng-container>\r\n <ng-template #regularPaymentTransition>\r\n {{\r\n 'order.history-payment-transition'\r\n | translate\r\n : {\r\n from: entry.data.from,\r\n to: entry.data.to,\r\n id: getPayment(entry)?.transactionId\r\n }\r\n }}\r\n </ng-template>\r\n </ng-container>\r\n <ng-container *ngSwitchCase=\"type.ORDER_REFUND_TRANSITION\">\r\n {{\r\n 'order.history-refund-transition'\r\n | translate\r\n : { from: entry.data.from, to: entry.data.to, id: entry.data.refundId }\r\n }}\r\n </ng-container>\r\n <ng-container *ngSwitchCase=\"type.ORDER_CANCELLATION\">\r\n {{\r\n 'order.history-items-cancelled'\r\n | translate: { count: entry.data.orderItemIds.length }\r\n }}\r\n <vdr-history-entry-detail *ngIf=\"getCancelledItems(entry) as items\">\r\n <vdr-labeled-data [label]=\"'order.cancellation-reason' | translate\">\r\n {{ entry.data.reason }}\r\n </vdr-labeled-data>\r\n <vdr-labeled-data [label]=\"'order.contents' | translate\">\r\n <vdr-simple-item-list [items]=\"items\"></vdr-simple-item-list>\r\n </vdr-labeled-data>\r\n <vdr-labeled-data [label]=\"'order.shipping-cancelled' | translate\">\r\n {{ entry.data.shippingCancelled }}\r\n </vdr-labeled-data>\r\n </vdr-history-entry-detail>\r\n </ng-container>\r\n <ng-container *ngSwitchCase=\"type.ORDER_FULFILLMENT\">\r\n {{ 'order.history-fulfillment-created' | translate }}\r\n <vdr-history-entry-detail *ngIf=\"getFulfillment(entry) as fulfillment\">\r\n <vdr-fulfillment-detail\r\n [fulfillmentId]=\"fulfillment.id\"\r\n [order]=\"order\"\r\n ></vdr-fulfillment-detail>\r\n </vdr-history-entry-detail>\r\n </ng-container>\r\n <ng-container *ngSwitchCase=\"type.ORDER_FULFILLMENT_TRANSITION\">\r\n <ng-container *ngIf=\"entry.data.to === 'Delivered'\">\r\n <div class=\"title\">\r\n {{ 'order.history-fulfillment-delivered' | translate }}\r\n </div>\r\n {{ 'order.tracking-code' | translate }}: {{ getFulfillment(entry)?.trackingCode }}\r\n </ng-container>\r\n <ng-container *ngIf=\"entry.data.to === 'Shipped'\">\r\n <div class=\"title\">\r\n {{ 'order.history-fulfillment-shipped' | translate }}\r\n </div>\r\n {{ 'order.tracking-code' | translate }}: {{ getFulfillment(entry)?.trackingCode }}\r\n </ng-container>\r\n <ng-container *ngIf=\"entry.data.to !== 'Delivered' && entry.data.to !== 'Shipped'\">\r\n {{\r\n 'order.history-fulfillment-transition'\r\n | translate: { from: entry.data.from, to: entry.data.to }\r\n }}\r\n </ng-container>\r\n <vdr-history-entry-detail *ngIf=\"getFulfillment(entry) as fulfillment\">\r\n <vdr-fulfillment-detail\r\n [fulfillmentId]=\"fulfillment.id\"\r\n [order]=\"order\"\r\n ></vdr-fulfillment-detail>\r\n </vdr-history-entry-detail>\r\n </ng-container>\r\n <ng-container *ngSwitchCase=\"type.ORDER_NOTE\">\r\n <div class=\"flex\">\r\n <div class=\"note-text\">\r\n <span *ngIf=\"entry.isPublic\" class=\"note-visibility public\">{{\r\n 'common.public' | translate\r\n }}</span>\r\n <span *ngIf=\"!entry.isPublic\" class=\"note-visibility private\">{{\r\n 'common.private' | translate\r\n }}</span>\r\n {{ entry.data.note }}\r\n </div>\r\n <div class=\"flex-spacer\"></div>\r\n <vdr-dropdown>\r\n <button class=\"icon-button\" vdrDropdownTrigger>\r\n <clr-icon shape=\"ellipsis-vertical\"></clr-icon>\r\n </button>\r\n <vdr-dropdown-menu vdrPosition=\"bottom-right\">\r\n <button\r\n class=\"button\"\r\n vdrDropdownItem\r\n (click)=\"updateNote.emit(entry)\"\r\n [disabled]=\"!('UpdateOrder' | hasPermission)\"\r\n >\r\n <clr-icon shape=\"edit\"></clr-icon>\r\n {{ 'common.edit' | translate }}\r\n </button>\r\n <div class=\"dropdown-divider\"></div>\r\n <button\r\n class=\"button\"\r\n vdrDropdownItem\r\n (click)=\"deleteNote.emit(entry)\"\r\n [disabled]=\"!('UpdateOrder' | hasPermission)\"\r\n >\r\n <clr-icon shape=\"trash\" class=\"is-danger\"></clr-icon>\r\n {{ 'common.delete' | translate }}\r\n </button>\r\n </vdr-dropdown-menu>\r\n </vdr-dropdown>\r\n </div>\r\n </ng-container>\r\n <ng-container *ngSwitchCase=\"type.ORDER_COUPON_APPLIED\">\r\n {{ 'order.history-coupon-code-applied' | translate }}:\r\n <vdr-chip>\r\n <a [routerLink]=\"['/marketing', 'promotions', entry.data.promotionId]\">{{\r\n entry.data.couponCode\r\n }}</a>\r\n </vdr-chip>\r\n </ng-container>\r\n <ng-container *ngSwitchCase=\"type.ORDER_COUPON_REMOVED\">\r\n {{ 'order.history-coupon-code-removed' | translate }}:\r\n <vdr-chip\r\n ><span class=\"cancelled-coupon-code\">{{ entry.data.couponCode }}</span></vdr-chip\r\n >\r\n </ng-container>\r\n <ng-container *ngSwitchDefault>\r\n <div class=\"title\">\r\n {{ entry.type | translate }}\r\n </div>\r\n <vdr-history-entry-detail *ngIf=\"entry.data\">\r\n <vdr-object-tree [value]=\"entry.data\"></vdr-object-tree>\r\n </vdr-history-entry-detail>\r\n </ng-container>\r\n </ng-container>\r\n </vdr-timeline-entry>\r\n </ng-template>\r\n </ng-container>\r\n\r\n <vdr-timeline-entry [isLast]=\"true\" [createdAt]=\"order.createdAt\" [featured]=\"true\">\r\n <div class=\"title\">\r\n {{ 'order.history-order-created' | translate }}\r\n </div>\r\n </vdr-timeline-entry>\r\n</div>\r\n",
|
|
2381
2434
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
2382
2435
|
styles: [":host{margin-top:48px;display:block}.entry-list{margin-top:24px;margin-left:24px;margin-right:12px}.note-entry{display:flex;align-items:center}.note-entry .note{flex:1}.note-entry button{margin:0}.visibility-select{display:flex;justify-content:space-between;align-items:baseline}.visibility-select .public{color:var(--color-warning-500)}.visibility-select .private{color:var(--color-success-500)}textarea.note{flex:1;height:36px;border-radius:3px;margin-right:6px}.note-text{color:var(--color-grey-800);white-space:pre-wrap}.cancelled-coupon-code{text-decoration:line-through}.note-visibility{text-transform:lowercase}.note-visibility.public{color:var(--color-warning-500)}.note-visibility.private{color:var(--color-success-500)}\n"]
|
|
2383
2436
|
},] }
|
|
2384
2437
|
];
|
|
2438
|
+
OrderHistoryComponent.ctorParameters = () => [
|
|
2439
|
+
{ type: HistoryEntryComponentService }
|
|
2440
|
+
];
|
|
2385
2441
|
OrderHistoryComponent.propDecorators = {
|
|
2386
2442
|
order: [{ type: Input }],
|
|
2387
2443
|
history: [{ type: Input }],
|
|
@@ -3141,6 +3197,7 @@ OrderModule.decorators = [
|
|
|
3141
3197
|
SelectAddressDialogComponent,
|
|
3142
3198
|
CouponCodeSelectorComponent,
|
|
3143
3199
|
SelectShippingMethodDialogComponent,
|
|
3200
|
+
OrderHistoryEntryHostComponent,
|
|
3144
3201
|
],
|
|
3145
3202
|
},] }
|
|
3146
3203
|
];
|
|
@@ -3151,5 +3208,5 @@ OrderModule.decorators = [
|
|
|
3151
3208
|
* Generated bundle index. Do not edit.
|
|
3152
3209
|
*/
|
|
3153
3210
|
|
|
3154
|
-
export { AddManualPaymentDialogComponent, CancelOrderDialogComponent, CouponCodeSelectorComponent, DraftOrderDetailComponent, DraftOrderVariantSelectorComponent, FulfillOrderDialogComponent, FulfillmentCardComponent, FulfillmentDetailComponent, FulfillmentStateLabelComponent, GET_CUSTOMER_ADDRESSES, LineFulfillmentComponent, LineRefundsComponent, ModificationDetailComponent, NODE_HEIGHT, OrderCustomFieldsCardComponent, OrderDetailComponent, OrderEditResultType, OrderEditorComponent, OrderEditsPreviewDialogComponent, OrderGuard, OrderHistoryComponent, OrderListComponent, OrderModule, OrderPaymentCardComponent, OrderProcessEdgeComponent, OrderProcessGraphComponent, OrderProcessGraphDialogComponent, OrderProcessNodeComponent, OrderResolver, OrderStateSelectDialogComponent, OrderTableComponent, OrderTransitionService, PaymentDetailComponent, PaymentStateLabelComponent, RefundOrderDialogComponent, RefundStateLabelComponent, SelectAddressDialogComponent, SelectCustomerDialogComponent, SelectShippingMethodDialogComponent, SettleRefundDialogComponent, SimpleItemListComponent, modifyingOrderBreadcrumb, orderBreadcrumb, orderRoutes, ɵ0, ɵ1, ɵ2, ɵ3 };
|
|
3211
|
+
export { AddManualPaymentDialogComponent, CancelOrderDialogComponent, CouponCodeSelectorComponent, DraftOrderDetailComponent, DraftOrderVariantSelectorComponent, FulfillOrderDialogComponent, FulfillmentCardComponent, FulfillmentDetailComponent, FulfillmentStateLabelComponent, GET_CUSTOMER_ADDRESSES, LineFulfillmentComponent, LineRefundsComponent, ModificationDetailComponent, NODE_HEIGHT, OrderCustomFieldsCardComponent, OrderDetailComponent, OrderEditResultType, OrderEditorComponent, OrderEditsPreviewDialogComponent, OrderGuard, OrderHistoryComponent, OrderHistoryEntryHostComponent, OrderListComponent, OrderModule, OrderPaymentCardComponent, OrderProcessEdgeComponent, OrderProcessGraphComponent, OrderProcessGraphDialogComponent, OrderProcessNodeComponent, OrderResolver, OrderStateSelectDialogComponent, OrderTableComponent, OrderTransitionService, PaymentDetailComponent, PaymentStateLabelComponent, RefundOrderDialogComponent, RefundStateLabelComponent, SelectAddressDialogComponent, SelectCustomerDialogComponent, SelectShippingMethodDialogComponent, SettleRefundDialogComponent, SimpleItemListComponent, modifyingOrderBreadcrumb, orderBreadcrumb, orderRoutes, ɵ0, ɵ1, ɵ2, ɵ3 };
|
|
3155
3212
|
//# sourceMappingURL=vendure-admin-ui-order.js.map
|