@vendure/admin-ui 2.0.0-next.21 → 2.0.0-next.23

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (87) hide show
  1. package/catalog/components/bulk-add-facet-values-dialog/bulk-add-facet-values-dialog.component.d.ts +0 -1
  2. package/catalog/components/product-detail/product-detail.component.d.ts +2 -7
  3. package/catalog/components/product-variants-list/product-variants-list.component.d.ts +10 -10
  4. package/catalog/providers/product-detail/product-detail.service.d.ts +1 -2
  5. package/core/common/generated-types.d.ts +72 -0
  6. package/core/common/version.d.ts +1 -1
  7. package/core/data/definitions/facet-definitions.d.ts +1 -0
  8. package/core/data/providers/facet-data.service.d.ts +4 -0
  9. package/core/providers/custom-history-entry-component/history-entry-component-types.d.ts +81 -0
  10. package/core/providers/custom-history-entry-component/history-entry-component.service.d.ts +19 -0
  11. package/core/public_api.d.ts +2 -1
  12. package/core/shared/components/facet-value-selector/facet-value-selector.component.d.ts +16 -16
  13. package/core/shared/dynamic-form-inputs/facet-value-form-input/facet-value-form-input.component.d.ts +3 -11
  14. package/core/shared/dynamic-form-inputs/register-dynamic-input-components.d.ts +1 -2
  15. package/customer/components/customer-detail/customer-detail.component.d.ts +3 -3
  16. package/customer/components/customer-history/customer-history-entry-host.component.d.ts +19 -0
  17. package/customer/components/customer-history/customer-history.component.d.ts +38 -10
  18. package/customer/customer.module.d.ts +4 -3
  19. package/customer/public_api.d.ts +1 -0
  20. package/esm2020/catalog/components/apply-facet-dialog/apply-facet-dialog.component.mjs +3 -3
  21. package/esm2020/catalog/components/bulk-add-facet-values-dialog/bulk-add-facet-values-dialog.component.mjs +3 -4
  22. package/esm2020/catalog/components/facet-detail/facet-detail.component.mjs +11 -6
  23. package/esm2020/catalog/components/product-detail/product-detail.component.mjs +17 -48
  24. package/esm2020/catalog/components/product-list/product-list-bulk-actions.mjs +4 -7
  25. package/esm2020/catalog/components/product-variants-list/product-variants-list.component.mjs +39 -33
  26. package/esm2020/catalog/providers/product-detail/product-detail.service.mjs +1 -4
  27. package/esm2020/core/common/generated-types.mjs +1 -1
  28. package/esm2020/core/common/introspection-result.mjs +2 -1
  29. package/esm2020/core/common/version.mjs +2 -2
  30. package/esm2020/core/data/data.module.mjs +8 -1
  31. package/esm2020/core/data/definitions/facet-definitions.mjs +12 -1
  32. package/esm2020/core/data/providers/facet-data.service.mjs +5 -2
  33. package/esm2020/core/providers/custom-history-entry-component/history-entry-component-types.mjs +2 -0
  34. package/esm2020/core/providers/custom-history-entry-component/history-entry-component.service.mjs +40 -0
  35. package/esm2020/core/public_api.mjs +3 -2
  36. package/esm2020/core/shared/components/facet-value-selector/facet-value-selector.component.mjs +52 -25
  37. package/esm2020/core/shared/components/timeline-entry/timeline-entry.component.mjs +3 -3
  38. package/esm2020/core/shared/dynamic-form-inputs/facet-value-form-input/facet-value-form-input.component.mjs +8 -18
  39. package/esm2020/customer/components/customer-detail/customer-detail.component.mjs +2 -1
  40. package/esm2020/customer/components/customer-history/customer-history-entry-host.component.mjs +64 -0
  41. package/esm2020/customer/components/customer-history/customer-history.component.mjs +16 -10
  42. package/esm2020/customer/customer.module.mjs +5 -2
  43. package/esm2020/customer/providers/routing/customer-resolver.mjs +5 -3
  44. package/esm2020/customer/public_api.mjs +2 -1
  45. package/esm2020/login/components/login/login.component.mjs +36 -9
  46. package/esm2020/order/components/order-detail/order-detail.component.mjs +1 -1
  47. package/esm2020/order/components/order-history/order-history-entry-host.component.mjs +64 -0
  48. package/esm2020/order/components/order-history/order-history.component.mjs +19 -14
  49. package/esm2020/order/order.module.mjs +8 -5
  50. package/esm2020/order/public_api.mjs +2 -1
  51. package/esm2020/settings/components/admin-detail/admin-detail.component.mjs +5 -4
  52. package/fesm2015/vendure-admin-ui-catalog.mjs +69 -96
  53. package/fesm2015/vendure-admin-ui-catalog.mjs.map +1 -1
  54. package/fesm2015/vendure-admin-ui-core.mjs +167 -90
  55. package/fesm2015/vendure-admin-ui-core.mjs.map +1 -1
  56. package/fesm2015/vendure-admin-ui-customer.mjs +93 -21
  57. package/fesm2015/vendure-admin-ui-customer.mjs.map +1 -1
  58. package/fesm2015/vendure-admin-ui-login.mjs +35 -8
  59. package/fesm2015/vendure-admin-ui-login.mjs.map +1 -1
  60. package/fesm2015/vendure-admin-ui-order.mjs +76 -8
  61. package/fesm2015/vendure-admin-ui-order.mjs.map +1 -1
  62. package/fesm2015/vendure-admin-ui-settings.mjs +4 -3
  63. package/fesm2015/vendure-admin-ui-settings.mjs.map +1 -1
  64. package/fesm2020/vendure-admin-ui-catalog.mjs +68 -96
  65. package/fesm2020/vendure-admin-ui-catalog.mjs.map +1 -1
  66. package/fesm2020/vendure-admin-ui-core.mjs +165 -90
  67. package/fesm2020/vendure-admin-ui-core.mjs.map +1 -1
  68. package/fesm2020/vendure-admin-ui-customer.mjs +92 -21
  69. package/fesm2020/vendure-admin-ui-customer.mjs.map +1 -1
  70. package/fesm2020/vendure-admin-ui-login.mjs +35 -8
  71. package/fesm2020/vendure-admin-ui-login.mjs.map +1 -1
  72. package/fesm2020/vendure-admin-ui-order.mjs +75 -8
  73. package/fesm2020/vendure-admin-ui-order.mjs.map +1 -1
  74. package/fesm2020/vendure-admin-ui-settings.mjs +4 -3
  75. package/fesm2020/vendure-admin-ui-settings.mjs.map +1 -1
  76. package/login/components/login/login.component.d.ts +9 -1
  77. package/order/components/order-detail/order-detail.component.d.ts +3 -3
  78. package/order/components/order-history/order-history-entry-host.component.d.ts +19 -0
  79. package/order/components/order-history/order-history.component.d.ts +40 -13
  80. package/order/order.module.d.ts +4 -3
  81. package/order/public_api.d.ts +1 -0
  82. package/package.json +2 -2
  83. package/static/i18n-messages/de.json +3 -1
  84. package/static/i18n-messages/en.json +3 -1
  85. package/static/styles/_variables.scss +1 -0
  86. package/core/common/utilities/flatten-facet-values.d.ts +0 -2
  87. package/esm2020/core/common/utilities/flatten-facet-values.mjs +0 -4
@@ -4,16 +4,18 @@ import * as i1 from '@vendure/admin-ui/core';
4
4
  import { ADMIN_UI_VERSION, getAppConfig, AUTH_REDIRECT_PARAM, SharedModule } from '@vendure/admin-ui/core';
5
5
  import * as i1$1 from '@angular/router';
6
6
  import { RouterModule } from '@angular/router';
7
- import * as i3 from '@clr/angular';
8
- import * as i4 from '@angular/forms';
7
+ import * as i3 from '@angular/common/http';
8
+ import * as i4 from '@clr/angular';
9
9
  import * as i5 from '@angular/common';
10
- import * as i6 from '@ngx-translate/core';
10
+ import * as i6 from '@angular/forms';
11
+ import * as i7 from '@ngx-translate/core';
11
12
  import { map } from 'rxjs/operators';
12
13
 
13
14
  class LoginComponent {
14
- constructor(authService, router) {
15
+ constructor(authService, router, httpClient) {
15
16
  this.authService = authService;
16
17
  this.router = router;
18
+ this.httpClient = httpClient;
17
19
  this.username = '';
18
20
  this.password = '';
19
21
  this.rememberMe = false;
@@ -21,6 +23,16 @@ class LoginComponent {
21
23
  this.brand = getAppConfig().brand;
22
24
  this.hideVendureBranding = getAppConfig().hideVendureBranding;
23
25
  this.hideVersion = getAppConfig().hideVersion;
26
+ this.customImageUrl = getAppConfig().loginImage;
27
+ this.imageUrl = '';
28
+ this.imageLocation = '';
29
+ this.imageCreator = '';
30
+ if (this.customImageUrl) {
31
+ this.imageUrl = this.customImageUrl;
32
+ }
33
+ else {
34
+ this.loadImage();
35
+ }
24
36
  }
25
37
  logIn() {
26
38
  this.errorMessage = undefined;
@@ -37,6 +49,21 @@ class LoginComponent {
37
49
  }
38
50
  });
39
51
  }
52
+ loadImage() {
53
+ this.httpClient
54
+ .get('https://login-image.vendure.io')
55
+ .toPromise()
56
+ .then(res => {
57
+ this.updateImage(res);
58
+ });
59
+ }
60
+ updateImage(res) {
61
+ const user = res.user;
62
+ const location = res.location;
63
+ this.imageUrl = res.urls.regular;
64
+ this.imageCreator = user.name;
65
+ this.imageLocation = location.name;
66
+ }
40
67
  /**
41
68
  * Attempts to read a redirect param from the current url and parse it into a
42
69
  * route from which the user was redirected after a 401 error.
@@ -56,12 +83,12 @@ class LoginComponent {
56
83
  return redirectTo;
57
84
  }
58
85
  }
59
- LoginComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: LoginComponent, deps: [{ token: i1.AuthService }, { token: i1$1.Router }], target: i0.ɵɵFactoryTarget.Component });
60
- LoginComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.2.3", type: LoginComponent, selector: "vdr-login", ngImport: i0, template: "<div class=\"login-wrapper\">\r\n <form class=\"login\">\r\n <label class=\"title\">\r\n <img src=\"assets/logo-300px.png\" />\r\n <span *ngIf=\"!hideVendureBranding\">vendure</span>\r\n </label>\r\n <div class=\"login-group\">\r\n <input\r\n class=\"username\"\r\n type=\"text\"\r\n name=\"username\"\r\n id=\"login_username\"\r\n [(ngModel)]=\"username\"\r\n [placeholder]=\"'common.username' | translate\"\r\n />\r\n <input\r\n class=\"password\"\r\n name=\"password\"\r\n type=\"password\"\r\n id=\"login_password\"\r\n [(ngModel)]=\"password\"\r\n [placeholder]=\"'common.password' | translate\"\r\n />\r\n <clr-alert [clrAlertType]=\"'danger'\" [clrAlertClosable]=\"false\" [class.visible]=\"errorMessage\" class=\"login-error\">\r\n <clr-alert-item>\r\n <span class=\"alert-text\">\r\n {{ errorMessage }}\r\n </span>\r\n </clr-alert-item>\r\n </clr-alert>\r\n <clr-checkbox-wrapper>\r\n <input\r\n type=\"checkbox\"\r\n clrCheckbox\r\n id=\"rememberme\"\r\n name=\"rememberme\"\r\n [(ngModel)]=\"rememberMe\"\r\n />\r\n <label>{{ 'common.remember-me' | translate }}</label>\r\n </clr-checkbox-wrapper>\r\n <button\r\n type=\"submit\"\r\n class=\"btn btn-primary\"\r\n (click)=\"logIn()\"\r\n [disabled]=\"!username || !password\"\r\n >\r\n {{ 'common.login' | translate }}\r\n </button>\r\n </div>\r\n <div class=\"version\">\r\n <span *ngIf=\"brand\">{{ brand }} <span *ngIf=\"!hideVendureBranding || !hideVersion\">-</span></span>\r\n <span *ngIf=\"!hideVendureBranding\">vendure</span>\r\n <span *ngIf=\"!hideVersion\">v{{ version }}</span>\r\n </div>\r\n </form>\r\n</div>\r\n", styles: [".login-wrapper{background-image:linear-gradient(135deg,var(--color-login-gradient-top),var(--color-login-gradient-bottom)),var(--login-page-bg);background-blend-mode:screen;background-repeat:repeat;background-size:auto;background-position:initial;justify-content:center}@media screen and (max-width: 768px){.login-wrapper{justify-content:center;background-color:transparent}.login-wrapper .login{margin:20px;padding:24px}}.login{margin:5vh 0;border-radius:6px;min-height:90vh;max-height:800px}.title{display:flex;flex-direction:column;align-items:center;text-align:center;margin-top:8vh}.title img{max-width:100%;width:150px}.title span{padding-top:12px;font-weight:700;color:var(--color-primary-500);font-size:38px}.version{flex:1;display:flex;align-items:flex-end;justify-content:center;color:var(--color-grey-300)}.version span+span{margin-left:5px}.login-error{max-height:0;overflow:hidden}.login-error.visible{max-height:46px;transition:max-height .2s;animation:shake .82s cubic-bezier(.36,.07,.19,.97) both;animation-delay:.2s;transform:translate(0);-webkit-backface-visibility:hidden;backface-visibility:hidden;perspective:1000px}@keyframes shake{10%,90%{transform:translate(-1px)}20%,80%{transform:translate(2px)}30%,50%,70%{transform:translate(-4px)}40%,60%{transform:translate(4px)}}\n"], components: [{ type: i3.ClrAlert, selector: "clr-alert", inputs: ["clrAlertSizeSmall", "clrAlertClosable", "clrAlertAppLevel", "clrCloseButtonAriaLabel", "clrAlertClosed", "clrAlertType", "clrAlertIcon"], outputs: ["clrAlertClosedChange"] }, { type: i3.ClrAlertItem, selector: "clr-alert-item" }, { type: i3.ClrCheckboxWrapper, selector: "clr-checkbox-wrapper,clr-toggle-wrapper" }], directives: [{ type: i4.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { type: i4.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { type: i4.NgForm, selector: "form:not([ngNoForm]):not([formGroup]),ng-form,[ngForm]", inputs: ["ngFormOptions"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { type: i3.ClrLabel, selector: "label", inputs: ["for"] }, { type: i5.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i1.FormFieldControlDirective, selector: "input, textarea, select" }, { type: i4.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { type: i4.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i4.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { type: i3.ClrAlertText, selector: ".alert-text" }, { type: i4.CheckboxControlValueAccessor, selector: "input[type=checkbox][formControlName],input[type=checkbox][formControl],input[type=checkbox][ngModel]" }, { type: i3.ClrCheckbox, selector: "[clrCheckbox],[clrToggle]" }], pipes: { "translate": i6.TranslatePipe } });
86
+ LoginComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: LoginComponent, deps: [{ token: i1.AuthService }, { token: i1$1.Router }, { token: i3.HttpClient }], target: i0.ɵɵFactoryTarget.Component });
87
+ LoginComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.2.3", type: LoginComponent, selector: "vdr-login", ngImport: i0, template: "<div class=\"login-wrapper\">\r\n <div class=\"login-wrapper-inner\">\r\n <div class=\"login-wrapper-image\">\r\n <div class=\"login-wrapper-image-content\">\r\n <div class=\"login-wrapper-image-title\">\r\n {{ 'common.login-image-title' | translate }}\r\n </div>\r\n <div class=\"login-wrapper-image-copyright\">\r\n <p *ngIf=\"imageCreator\" class=\"creator\">Photo by {{ imageCreator }} on Unsplash</p>\r\n <p *ngIf=\"imageLocation\" class=\"location\">{{ imageLocation }}</p>\r\n </div>\r\n </div>\r\n <img *ngIf=\"imageUrl\" [src]=\"imageUrl\" [alt]=\"imageUrl\">\r\n </div>\r\n <div class=\"login-wrapper-form\">\r\n <p class=\"login-title\">\r\n {{ 'common.login-title' | translate }}\r\n </p>\r\n <form class=\"login-form\">\r\n <div class=\"login-group\">\r\n <input\r\n class=\"username\"\r\n type=\"text\"\r\n name=\"username\"\r\n id=\"login_username\"\r\n [(ngModel)]=\"username\"\r\n [placeholder]=\"'common.username' | translate\"\r\n />\r\n <input\r\n class=\"password\"\r\n name=\"password\"\r\n type=\"password\"\r\n id=\"login_password\"\r\n [(ngModel)]=\"password\"\r\n [placeholder]=\"'common.password' | translate\"\r\n />\r\n <clr-alert [clrAlertType]=\"'danger'\" [clrAlertClosable]=\"false\" [class.visible]=\"errorMessage\" class=\"login-error\">\r\n <clr-alert-item>\r\n <span class=\"alert-text\">\r\n {{ errorMessage }}\r\n </span>\r\n </clr-alert-item>\r\n </clr-alert>\r\n <clr-checkbox-wrapper>\r\n <input\r\n type=\"checkbox\"\r\n clrCheckbox\r\n id=\"rememberme\"\r\n name=\"rememberme\"\r\n [(ngModel)]=\"rememberMe\"\r\n />\r\n <label>{{ 'common.remember-me' | translate }}</label>\r\n </clr-checkbox-wrapper>\r\n <button\r\n type=\"submit\"\r\n class=\"btn btn-primary\"\r\n (click)=\"logIn()\"\r\n [disabled]=\"!username || !password\"\r\n >\r\n {{ 'common.login' | translate }}\r\n </button>\r\n </div>\r\n <div class=\"version\">\r\n <span *ngIf=\"brand\">{{ brand }} <span *ngIf=\"!hideVendureBranding || !hideVersion\">-</span></span>\r\n <span *ngIf=\"!hideVendureBranding\">vendure</span>\r\n <span *ngIf=\"!hideVersion\">v{{ version }}</span>\r\n </div>\r\n </form>\r\n </div>\r\n <img class=\"login-wrapper-logo\" src=\"assets/logo-300px.png\" />\r\n </div>\r\n</div>\r\n", styles: [".login-wrapper{background:#f0f2f5;background-image:none;height:100vh;display:flex;align-items:center;justify-content:center;padding:20px}.login-wrapper .login-wrapper-inner{background:#fff;width:1120px;height:590px;display:flex;justify-content:flex-start;align-items:stretch;position:relative;border-radius:3px;overflow:hidden}@media (max-width: 992px){.login-wrapper .login-wrapper-inner{flex-direction:column;height:auto;width:100%}}.login-wrapper .login-wrapper-inner .login-wrapper-image{height:100%;flex-grow:1;position:relative}@media (max-width: 992px){.login-wrapper .login-wrapper-inner .login-wrapper-image{height:300px}}.login-wrapper .login-wrapper-inner .login-wrapper-image img{display:block;width:100%;height:100%;object-fit:cover;object-position:center;position:relative;z-index:1}.login-wrapper .login-wrapper-inner .login-wrapper-image .login-wrapper-image-content{width:100%;height:100%;position:absolute;left:0;bottom:0;z-index:10;background:#020024;background:linear-gradient(180deg,rgba(2,0,36,0) 0%,rgba(0,0,0,.75) 100%);display:flex;flex-direction:column;align-items:flex-start;justify-content:flex-end;padding:30px}.login-wrapper .login-wrapper-inner .login-wrapper-image .login-wrapper-image-content .login-wrapper-image-title{font-size:1.6rem;font-weight:700;color:#fff;margin-bottom:20px}@media (max-width: 992px){.login-wrapper .login-wrapper-inner .login-wrapper-image .login-wrapper-image-content .login-wrapper-image-title{font-size:1.2rem}}.login-wrapper .login-wrapper-inner .login-wrapper-image .login-wrapper-image-content .login-wrapper-image-copyright{opacity:.8}.login-wrapper .login-wrapper-inner .login-wrapper-image .login-wrapper-image-content .login-wrapper-image-copyright p{font-size:.6rem;color:#fff;margin:0!important}.login-wrapper .login-wrapper-inner .login-wrapper-form{height:100%;width:400px;padding:40px;display:flex;flex-direction:column;align-items:stretch;justify-content:center;box-shadow:0 20px 25px #0000001a;overflow:hidden;border-radius:5px;flex-shrink:0}@media (max-width: 992px){.login-wrapper .login-wrapper-inner .login-wrapper-form{height:auto;width:100%;padding:20px}}.login-wrapper .login-wrapper-inner .login-wrapper-form .login-title{font-weight:700;font-size:1.2rem;margin-bottom:20px;color:#afafaf}.login-wrapper .login-wrapper-inner .login-wrapper-form .login-group input.username,.login-wrapper .login-wrapper-inner .login-wrapper-form .login-group input.password{display:block;width:100%;margin-bottom:15px;padding:12px 16px!important;background:#fff;font-size:14px;line-height:22px;color:#52667a;outline:none;-webkit-appearance:none}.login-wrapper .login-wrapper-inner .login-wrapper-form .login-group .btn{width:100%!important;margin-top:20px!important}.login-wrapper .login-wrapper-inner .login-wrapper-logo{width:60px;height:auto;position:absolute;right:20px;top:20px}.version{flex:1;flex-grow:1;display:flex;align-items:flex-end;justify-content:center;color:var(--color-grey-300)}.version span+span{margin-left:5px}.login-error{max-height:0;overflow:hidden}.login-error.visible{max-height:46px;transition:max-height .2s;animation:shake .82s cubic-bezier(.36,.07,.19,.97) both;animation-delay:.2s;transform:translate(0);-webkit-backface-visibility:hidden;backface-visibility:hidden;perspective:1000px}@keyframes shake{10%,90%{transform:translate(-1px)}20%,80%{transform:translate(2px)}30%,50%,70%{transform:translate(-4px)}40%,60%{transform:translate(4px)}}\n"], components: [{ type: i4.ClrAlert, selector: "clr-alert", inputs: ["clrAlertSizeSmall", "clrAlertClosable", "clrAlertAppLevel", "clrCloseButtonAriaLabel", "clrAlertClosed", "clrAlertType", "clrAlertIcon"], outputs: ["clrAlertClosedChange"] }, { type: i4.ClrAlertItem, selector: "clr-alert-item" }, { type: i4.ClrCheckboxWrapper, selector: "clr-checkbox-wrapper,clr-toggle-wrapper" }], directives: [{ type: i5.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i6.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { type: i6.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { type: i6.NgForm, selector: "form:not([ngNoForm]):not([formGroup]),ng-form,[ngForm]", inputs: ["ngFormOptions"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { type: i1.FormFieldControlDirective, selector: "input, textarea, select" }, { type: i6.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { type: i6.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i6.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { type: i4.ClrAlertText, selector: ".alert-text" }, { type: i6.CheckboxControlValueAccessor, selector: "input[type=checkbox][formControlName],input[type=checkbox][formControl],input[type=checkbox][ngModel]" }, { type: i4.ClrCheckbox, selector: "[clrCheckbox],[clrToggle]" }, { type: i4.ClrLabel, selector: "label", inputs: ["for"] }], pipes: { "translate": i7.TranslatePipe } });
61
88
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: LoginComponent, decorators: [{
62
89
  type: Component,
63
- args: [{ selector: 'vdr-login', template: "<div class=\"login-wrapper\">\r\n <form class=\"login\">\r\n <label class=\"title\">\r\n <img src=\"assets/logo-300px.png\" />\r\n <span *ngIf=\"!hideVendureBranding\">vendure</span>\r\n </label>\r\n <div class=\"login-group\">\r\n <input\r\n class=\"username\"\r\n type=\"text\"\r\n name=\"username\"\r\n id=\"login_username\"\r\n [(ngModel)]=\"username\"\r\n [placeholder]=\"'common.username' | translate\"\r\n />\r\n <input\r\n class=\"password\"\r\n name=\"password\"\r\n type=\"password\"\r\n id=\"login_password\"\r\n [(ngModel)]=\"password\"\r\n [placeholder]=\"'common.password' | translate\"\r\n />\r\n <clr-alert [clrAlertType]=\"'danger'\" [clrAlertClosable]=\"false\" [class.visible]=\"errorMessage\" class=\"login-error\">\r\n <clr-alert-item>\r\n <span class=\"alert-text\">\r\n {{ errorMessage }}\r\n </span>\r\n </clr-alert-item>\r\n </clr-alert>\r\n <clr-checkbox-wrapper>\r\n <input\r\n type=\"checkbox\"\r\n clrCheckbox\r\n id=\"rememberme\"\r\n name=\"rememberme\"\r\n [(ngModel)]=\"rememberMe\"\r\n />\r\n <label>{{ 'common.remember-me' | translate }}</label>\r\n </clr-checkbox-wrapper>\r\n <button\r\n type=\"submit\"\r\n class=\"btn btn-primary\"\r\n (click)=\"logIn()\"\r\n [disabled]=\"!username || !password\"\r\n >\r\n {{ 'common.login' | translate }}\r\n </button>\r\n </div>\r\n <div class=\"version\">\r\n <span *ngIf=\"brand\">{{ brand }} <span *ngIf=\"!hideVendureBranding || !hideVersion\">-</span></span>\r\n <span *ngIf=\"!hideVendureBranding\">vendure</span>\r\n <span *ngIf=\"!hideVersion\">v{{ version }}</span>\r\n </div>\r\n </form>\r\n</div>\r\n", styles: [".login-wrapper{background-image:linear-gradient(135deg,var(--color-login-gradient-top),var(--color-login-gradient-bottom)),var(--login-page-bg);background-blend-mode:screen;background-repeat:repeat;background-size:auto;background-position:initial;justify-content:center}@media screen and (max-width: 768px){.login-wrapper{justify-content:center;background-color:transparent}.login-wrapper .login{margin:20px;padding:24px}}.login{margin:5vh 0;border-radius:6px;min-height:90vh;max-height:800px}.title{display:flex;flex-direction:column;align-items:center;text-align:center;margin-top:8vh}.title img{max-width:100%;width:150px}.title span{padding-top:12px;font-weight:700;color:var(--color-primary-500);font-size:38px}.version{flex:1;display:flex;align-items:flex-end;justify-content:center;color:var(--color-grey-300)}.version span+span{margin-left:5px}.login-error{max-height:0;overflow:hidden}.login-error.visible{max-height:46px;transition:max-height .2s;animation:shake .82s cubic-bezier(.36,.07,.19,.97) both;animation-delay:.2s;transform:translate(0);-webkit-backface-visibility:hidden;backface-visibility:hidden;perspective:1000px}@keyframes shake{10%,90%{transform:translate(-1px)}20%,80%{transform:translate(2px)}30%,50%,70%{transform:translate(-4px)}40%,60%{transform:translate(4px)}}\n"] }]
64
- }], ctorParameters: function () { return [{ type: i1.AuthService }, { type: i1$1.Router }]; } });
90
+ args: [{ selector: 'vdr-login', template: "<div class=\"login-wrapper\">\r\n <div class=\"login-wrapper-inner\">\r\n <div class=\"login-wrapper-image\">\r\n <div class=\"login-wrapper-image-content\">\r\n <div class=\"login-wrapper-image-title\">\r\n {{ 'common.login-image-title' | translate }}\r\n </div>\r\n <div class=\"login-wrapper-image-copyright\">\r\n <p *ngIf=\"imageCreator\" class=\"creator\">Photo by {{ imageCreator }} on Unsplash</p>\r\n <p *ngIf=\"imageLocation\" class=\"location\">{{ imageLocation }}</p>\r\n </div>\r\n </div>\r\n <img *ngIf=\"imageUrl\" [src]=\"imageUrl\" [alt]=\"imageUrl\">\r\n </div>\r\n <div class=\"login-wrapper-form\">\r\n <p class=\"login-title\">\r\n {{ 'common.login-title' | translate }}\r\n </p>\r\n <form class=\"login-form\">\r\n <div class=\"login-group\">\r\n <input\r\n class=\"username\"\r\n type=\"text\"\r\n name=\"username\"\r\n id=\"login_username\"\r\n [(ngModel)]=\"username\"\r\n [placeholder]=\"'common.username' | translate\"\r\n />\r\n <input\r\n class=\"password\"\r\n name=\"password\"\r\n type=\"password\"\r\n id=\"login_password\"\r\n [(ngModel)]=\"password\"\r\n [placeholder]=\"'common.password' | translate\"\r\n />\r\n <clr-alert [clrAlertType]=\"'danger'\" [clrAlertClosable]=\"false\" [class.visible]=\"errorMessage\" class=\"login-error\">\r\n <clr-alert-item>\r\n <span class=\"alert-text\">\r\n {{ errorMessage }}\r\n </span>\r\n </clr-alert-item>\r\n </clr-alert>\r\n <clr-checkbox-wrapper>\r\n <input\r\n type=\"checkbox\"\r\n clrCheckbox\r\n id=\"rememberme\"\r\n name=\"rememberme\"\r\n [(ngModel)]=\"rememberMe\"\r\n />\r\n <label>{{ 'common.remember-me' | translate }}</label>\r\n </clr-checkbox-wrapper>\r\n <button\r\n type=\"submit\"\r\n class=\"btn btn-primary\"\r\n (click)=\"logIn()\"\r\n [disabled]=\"!username || !password\"\r\n >\r\n {{ 'common.login' | translate }}\r\n </button>\r\n </div>\r\n <div class=\"version\">\r\n <span *ngIf=\"brand\">{{ brand }} <span *ngIf=\"!hideVendureBranding || !hideVersion\">-</span></span>\r\n <span *ngIf=\"!hideVendureBranding\">vendure</span>\r\n <span *ngIf=\"!hideVersion\">v{{ version }}</span>\r\n </div>\r\n </form>\r\n </div>\r\n <img class=\"login-wrapper-logo\" src=\"assets/logo-300px.png\" />\r\n </div>\r\n</div>\r\n", styles: [".login-wrapper{background:#f0f2f5;background-image:none;height:100vh;display:flex;align-items:center;justify-content:center;padding:20px}.login-wrapper .login-wrapper-inner{background:#fff;width:1120px;height:590px;display:flex;justify-content:flex-start;align-items:stretch;position:relative;border-radius:3px;overflow:hidden}@media (max-width: 992px){.login-wrapper .login-wrapper-inner{flex-direction:column;height:auto;width:100%}}.login-wrapper .login-wrapper-inner .login-wrapper-image{height:100%;flex-grow:1;position:relative}@media (max-width: 992px){.login-wrapper .login-wrapper-inner .login-wrapper-image{height:300px}}.login-wrapper .login-wrapper-inner .login-wrapper-image img{display:block;width:100%;height:100%;object-fit:cover;object-position:center;position:relative;z-index:1}.login-wrapper .login-wrapper-inner .login-wrapper-image .login-wrapper-image-content{width:100%;height:100%;position:absolute;left:0;bottom:0;z-index:10;background:#020024;background:linear-gradient(180deg,rgba(2,0,36,0) 0%,rgba(0,0,0,.75) 100%);display:flex;flex-direction:column;align-items:flex-start;justify-content:flex-end;padding:30px}.login-wrapper .login-wrapper-inner .login-wrapper-image .login-wrapper-image-content .login-wrapper-image-title{font-size:1.6rem;font-weight:700;color:#fff;margin-bottom:20px}@media (max-width: 992px){.login-wrapper .login-wrapper-inner .login-wrapper-image .login-wrapper-image-content .login-wrapper-image-title{font-size:1.2rem}}.login-wrapper .login-wrapper-inner .login-wrapper-image .login-wrapper-image-content .login-wrapper-image-copyright{opacity:.8}.login-wrapper .login-wrapper-inner .login-wrapper-image .login-wrapper-image-content .login-wrapper-image-copyright p{font-size:.6rem;color:#fff;margin:0!important}.login-wrapper .login-wrapper-inner .login-wrapper-form{height:100%;width:400px;padding:40px;display:flex;flex-direction:column;align-items:stretch;justify-content:center;box-shadow:0 20px 25px #0000001a;overflow:hidden;border-radius:5px;flex-shrink:0}@media (max-width: 992px){.login-wrapper .login-wrapper-inner .login-wrapper-form{height:auto;width:100%;padding:20px}}.login-wrapper .login-wrapper-inner .login-wrapper-form .login-title{font-weight:700;font-size:1.2rem;margin-bottom:20px;color:#afafaf}.login-wrapper .login-wrapper-inner .login-wrapper-form .login-group input.username,.login-wrapper .login-wrapper-inner .login-wrapper-form .login-group input.password{display:block;width:100%;margin-bottom:15px;padding:12px 16px!important;background:#fff;font-size:14px;line-height:22px;color:#52667a;outline:none;-webkit-appearance:none}.login-wrapper .login-wrapper-inner .login-wrapper-form .login-group .btn{width:100%!important;margin-top:20px!important}.login-wrapper .login-wrapper-inner .login-wrapper-logo{width:60px;height:auto;position:absolute;right:20px;top:20px}.version{flex:1;flex-grow:1;display:flex;align-items:flex-end;justify-content:center;color:var(--color-grey-300)}.version span+span{margin-left:5px}.login-error{max-height:0;overflow:hidden}.login-error.visible{max-height:46px;transition:max-height .2s;animation:shake .82s cubic-bezier(.36,.07,.19,.97) both;animation-delay:.2s;transform:translate(0);-webkit-backface-visibility:hidden;backface-visibility:hidden;perspective:1000px}@keyframes shake{10%,90%{transform:translate(-1px)}20%,80%{transform:translate(2px)}30%,50%,70%{transform:translate(-4px)}40%,60%{transform:translate(4px)}}\n"] }]
91
+ }], ctorParameters: function () { return [{ type: i1.AuthService }, { type: i1$1.Router }, { type: i3.HttpClient }]; } });
65
92
 
66
93
  /**
67
94
  * This guard prevents loggen-in users from navigating to the login screen.
@@ -1 +1 @@
1
- {"version":3,"file":"vendure-admin-ui-login.mjs","sources":["../../src/lib/login/src/components/login/login.component.ts","../../src/lib/login/src/components/login/login.component.html","../../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: any) {\r\n // ignore\r\n }\r\n return redirectTo;\r\n }\r\n}\r\n","<div class=\"login-wrapper\">\r\n <form class=\"login\">\r\n <label class=\"title\">\r\n <img src=\"assets/logo-300px.png\" />\r\n <span *ngIf=\"!hideVendureBranding\">vendure</span>\r\n </label>\r\n <div class=\"login-group\">\r\n <input\r\n class=\"username\"\r\n type=\"text\"\r\n name=\"username\"\r\n id=\"login_username\"\r\n [(ngModel)]=\"username\"\r\n [placeholder]=\"'common.username' | translate\"\r\n />\r\n <input\r\n class=\"password\"\r\n name=\"password\"\r\n type=\"password\"\r\n id=\"login_password\"\r\n [(ngModel)]=\"password\"\r\n [placeholder]=\"'common.password' | translate\"\r\n />\r\n <clr-alert [clrAlertType]=\"'danger'\" [clrAlertClosable]=\"false\" [class.visible]=\"errorMessage\" class=\"login-error\">\r\n <clr-alert-item>\r\n <span class=\"alert-text\">\r\n {{ errorMessage }}\r\n </span>\r\n </clr-alert-item>\r\n </clr-alert>\r\n <clr-checkbox-wrapper>\r\n <input\r\n type=\"checkbox\"\r\n clrCheckbox\r\n id=\"rememberme\"\r\n name=\"rememberme\"\r\n [(ngModel)]=\"rememberMe\"\r\n />\r\n <label>{{ 'common.remember-me' | translate }}</label>\r\n </clr-checkbox-wrapper>\r\n <button\r\n type=\"submit\"\r\n class=\"btn btn-primary\"\r\n (click)=\"logIn()\"\r\n [disabled]=\"!username || !password\"\r\n >\r\n {{ 'common.login' | translate }}\r\n </button>\r\n </div>\r\n <div class=\"version\">\r\n <span *ngIf=\"brand\">{{ brand }} <span *ngIf=\"!hideVendureBranding || !hideVersion\">-</span></span>\r\n <span *ngIf=\"!hideVendureBranding\">vendure</span>\r\n <span *ngIf=\"!hideVersion\">v{{ version }}</span>\r\n </div>\r\n </form>\r\n</div>\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":";;;;;;;;;;;;MASa,cAAc;IAUvB,YAAoB,WAAwB,EAAU,MAAc;QAAhD,gBAAW,GAAX,WAAW,CAAa;QAAU,WAAM,GAAN,MAAM,CAAQ;QATpE,aAAQ,GAAG,EAAE,CAAC;QACd,aAAQ,GAAG,EAAE,CAAC;QACd,eAAU,GAAG,KAAK,CAAC;QACnB,YAAO,GAAG,gBAAgB,CAAC;QAE3B,UAAK,GAAG,YAAY,EAAE,CAAC,KAAK,CAAC;QAC7B,wBAAmB,GAAG,YAAY,EAAE,CAAC,mBAAmB,CAAC;QACzD,gBAAW,GAAG,YAAY,EAAE,CAAC,WAAW,CAAC;KAE+B;IAExE,KAAK;QACD,IAAI,CAAC,YAAY,GAAG,SAAS,CAAC;QAC9B,IAAI,CAAC,WAAW,CAAC,KAAK,CAAC,IAAI,CAAC,QAAQ,EAAE,IAAI,CAAC,QAAQ,EAAE,IAAI,CAAC,UAAU,CAAC,CAAC,SAAS,CAAC,MAAM;YAClF,QAAQ,MAAM,CAAC,UAAU;gBACrB,KAAK,aAAa;oBACd,MAAM,QAAQ,GAAG,IAAI,CAAC,gBAAgB,EAAE,CAAC;oBACzC,IAAI,CAAC,MAAM,CAAC,aAAa,CAAC,QAAQ,GAAG,QAAQ,GAAG,GAAG,CAAC,CAAC;oBACrD,MAAM;gBACV,KAAK,yBAAyB,CAAC;gBAC/B,KAAK,yBAAyB;oBAC1B,IAAI,CAAC,YAAY,GAAG,MAAM,CAAC,OAAO,CAAC;oBACnC,MAAM;aACb;SACJ,CAAC,CAAC;KACN;;;;;IAMO,gBAAgB;QACpB,IAAI,UAA8B,CAAC;QACnC,MAAM,EAAE,GAAG,IAAI,MAAM,CAAC,GAAG,mBAAmB,OAAO,CAAC,CAAC;QACrD,IAAI;YACA,MAAM,eAAe,GAAG,MAAM,CAAC,QAAQ,CAAC,MAAM,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC;YACzD,IAAI,eAAe,IAAI,CAAC,GAAG,eAAe,CAAC,MAAM,EAAE;gBAC/C,UAAU,GAAG,IAAI,CAAC,kBAAkB,CAAC,eAAe,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;aAC7D;SACJ;QAAC,OAAO,CAAM,EAAE;;SAEhB;QACD,OAAO,UAAU,CAAC;KACrB;;2GA5CQ,cAAc;+FAAd,cAAc,iDCT3B,4vEAwDA;2FD/Ca,cAAc;kBAL1B,SAAS;+BACI,WAAW;;;AECzB;;;MAMa,UAAU;IACnB,YAAoB,MAAc,EAAU,WAAwB;QAAhD,WAAM,GAAN,MAAM,CAAQ;QAAU,gBAAW,GAAX,WAAW,CAAa;KAAI;IAExE,WAAW,CAAC,KAA6B;QACrC,OAAO,IAAI,CAAC,WAAW,CAAC,wBAAwB,EAAE,CAAC,IAAI,CACnD,GAAG,CAAC,aAAa;YACb,IAAI,aAAa,EAAE;gBACf,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC;aAC/B;YACD,OAAO,CAAC,aAAa,CAAC;SACzB,CAAC,CACL,CAAC;KACL;;uGAZQ,UAAU;2GAAV,UAAU,cAFP,MAAM;2FAET,UAAU;kBAHtB,UAAU;mBAAC;oBACR,UAAU,EAAE,MAAM;iBACrB;;;MCNY,WAAW,GAAW;IAC/B;QACI,IAAI,EAAE,EAAE;QACR,SAAS,EAAE,cAAc;QACzB,SAAS,EAAE,MAAM;QACjB,WAAW,EAAE,CAAC,UAAU,CAAC;KAC5B;;;MCCQ,WAAW;;wGAAX,WAAW;yGAAX,WAAW,iBAFL,cAAc,aAFnB,YAAY;yGAIb,WAAW,YAJX,CAAC,YAAY,EAAE,YAAY,CAAC,QAAQ,CAAC,WAAW,CAAC,CAAC;2FAIlD,WAAW;kBALvB,QAAQ;mBAAC;oBACN,OAAO,EAAE,CAAC,YAAY,EAAE,YAAY,CAAC,QAAQ,CAAC,WAAW,CAAC,CAAC;oBAC3D,OAAO,EAAE,EAAE;oBACX,YAAY,EAAE,CAAC,cAAc,CAAC;iBACjC;;;ACXD;;ACAA;;;;;;"}
1
+ {"version":3,"file":"vendure-admin-ui-login.mjs","sources":["../../src/lib/login/src/components/login/login.component.ts","../../src/lib/login/src/components/login/login.component.html","../../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().loginImage;\r\n imageUrl = '';\r\n imageLocation = '';\r\n imageCreator = '';\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) {\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 as any).urls.regular;\r\n this.imageCreator = user.name;\r\n this.imageLocation = location.name;\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: any) {\r\n // ignore\r\n }\r\n return redirectTo;\r\n }\r\n}\r\n","<div class=\"login-wrapper\">\r\n <div class=\"login-wrapper-inner\">\r\n <div class=\"login-wrapper-image\">\r\n <div class=\"login-wrapper-image-content\">\r\n <div class=\"login-wrapper-image-title\">\r\n {{ 'common.login-image-title' | translate }}\r\n </div>\r\n <div class=\"login-wrapper-image-copyright\">\r\n <p *ngIf=\"imageCreator\" class=\"creator\">Photo by {{ imageCreator }} on Unsplash</p>\r\n <p *ngIf=\"imageLocation\" class=\"location\">{{ imageLocation }}</p>\r\n </div>\r\n </div>\r\n <img *ngIf=\"imageUrl\" [src]=\"imageUrl\" [alt]=\"imageUrl\">\r\n </div>\r\n <div class=\"login-wrapper-form\">\r\n <p class=\"login-title\">\r\n {{ 'common.login-title' | translate }}\r\n </p>\r\n <form class=\"login-form\">\r\n <div class=\"login-group\">\r\n <input\r\n class=\"username\"\r\n type=\"text\"\r\n name=\"username\"\r\n id=\"login_username\"\r\n [(ngModel)]=\"username\"\r\n [placeholder]=\"'common.username' | translate\"\r\n />\r\n <input\r\n class=\"password\"\r\n name=\"password\"\r\n type=\"password\"\r\n id=\"login_password\"\r\n [(ngModel)]=\"password\"\r\n [placeholder]=\"'common.password' | translate\"\r\n />\r\n <clr-alert [clrAlertType]=\"'danger'\" [clrAlertClosable]=\"false\" [class.visible]=\"errorMessage\" class=\"login-error\">\r\n <clr-alert-item>\r\n <span class=\"alert-text\">\r\n {{ errorMessage }}\r\n </span>\r\n </clr-alert-item>\r\n </clr-alert>\r\n <clr-checkbox-wrapper>\r\n <input\r\n type=\"checkbox\"\r\n clrCheckbox\r\n id=\"rememberme\"\r\n name=\"rememberme\"\r\n [(ngModel)]=\"rememberMe\"\r\n />\r\n <label>{{ 'common.remember-me' | translate }}</label>\r\n </clr-checkbox-wrapper>\r\n <button\r\n type=\"submit\"\r\n class=\"btn btn-primary\"\r\n (click)=\"logIn()\"\r\n [disabled]=\"!username || !password\"\r\n >\r\n {{ 'common.login' | translate }}\r\n </button>\r\n </div>\r\n <div class=\"version\">\r\n <span *ngIf=\"brand\">{{ brand }} <span *ngIf=\"!hideVendureBranding || !hideVersion\">-</span></span>\r\n <span *ngIf=\"!hideVendureBranding\">vendure</span>\r\n <span *ngIf=\"!hideVersion\">v{{ version }}</span>\r\n </div>\r\n </form>\r\n </div>\r\n <img class=\"login-wrapper-logo\" src=\"assets/logo-300px.png\" />\r\n </div>\r\n</div>\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,5 +1,5 @@
1
1
  import * as i0 from '@angular/core';
2
- import { Component, ChangeDetectionStrategy, EventEmitter, Input, Output, Injectable, ViewChildren, HostBinding, NgModule } from '@angular/core';
2
+ import { Component, ChangeDetectionStrategy, EventEmitter, Input, Output, Injectable, ViewChildren, HostBinding, ViewContainerRef, ViewChild, NgModule } from '@angular/core';
3
3
  import * as i3$1 from '@angular/forms';
4
4
  import { FormGroup, FormControl, Validators, FormArray } from '@angular/forms';
5
5
  import * as i1 from '@vendure/admin-ui/core';
@@ -1468,6 +1468,67 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.3", ngImpor
1468
1468
  args: [{ selector: 'vdr-settle-refund-dialog', changeDetection: ChangeDetectionStrategy.OnPush, template: "<ng-template vdrDialogTitle>{{ 'order.settle-refund' | translate }}</ng-template>\r\n<p class=\"instruction\">\r\n {{ 'order.settle-refund-manual-instructions' | translate: { method: refund.method } }}\r\n</p>\r\n<clr-input-container>\r\n <label>{{ 'order.transaction-id' | translate }}</label>\r\n <input clrInput name=\"transactionId\" [(ngModel)]=\"transactionId\" />\r\n</clr-input-container>\r\n\r\n<ng-template vdrDialogButtons>\r\n <button type=\"button\" class=\"btn\" (click)=\"cancel()\">{{ 'common.cancel' | translate }}</button>\r\n <button type=\"submit\" (click)=\"submit()\" [disabled]=\"!transactionId\" class=\"btn btn-primary\">\r\n {{ 'order.settle-refund' | translate }}\r\n </button>\r\n</ng-template>\r\n", styles: [":host{padding-bottom:32px}.instruction{margin-top:0;margin-bottom:24px}\n"] }]
1469
1469
  }] });
1470
1470
 
1471
+ class OrderHistoryEntryHostComponent {
1472
+ constructor(componentFactoryResolver, historyEntryComponentService) {
1473
+ this.componentFactoryResolver = componentFactoryResolver;
1474
+ this.historyEntryComponentService = historyEntryComponentService;
1475
+ this.expandClick = new EventEmitter();
1476
+ }
1477
+ ngOnInit() {
1478
+ const componentType = this.historyEntryComponentService.getComponent(this.entry.type);
1479
+ const factory = this.componentFactoryResolver.resolveComponentFactory(componentType);
1480
+ const componentRef = this.portalRef.createComponent(factory);
1481
+ componentRef.instance.entry = this.entry;
1482
+ componentRef.instance.order = this.order;
1483
+ this.instance = componentRef.instance;
1484
+ this.componentRef = componentRef;
1485
+ }
1486
+ ngOnDestroy() {
1487
+ this.componentRef?.destroy();
1488
+ }
1489
+ }
1490
+ OrderHistoryEntryHostComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: OrderHistoryEntryHostComponent, deps: [{ token: i0.ComponentFactoryResolver }, { token: i1.HistoryEntryComponentService }], target: i0.ɵɵFactoryTarget.Component });
1491
+ OrderHistoryEntryHostComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.2.3", type: OrderHistoryEntryHostComponent, selector: "vdr-order-history-entry-host", inputs: { entry: "entry", order: "order", expanded: "expanded" }, outputs: { expandClick: "expandClick" }, viewQueries: [{ propertyName: "portalRef", first: true, predicate: ["portal"], descendants: true, read: ViewContainerRef, static: true }], exportAs: ["historyEntry"], ngImport: i0, template: ` <vdr-timeline-entry
1492
+ [displayType]="instance.getDisplayType(entry)"
1493
+ [iconShape]="instance.getIconShape && instance.getIconShape(entry)"
1494
+ [createdAt]="entry.createdAt"
1495
+ [name]="instance.getName && instance.getName(entry)"
1496
+ [featured]="instance.isFeatured(entry)"
1497
+ [collapsed]="!expanded && !instance.isFeatured(entry)"
1498
+ (expandClick)="expandClick.emit()"
1499
+ >
1500
+ <div #portal></div>
1501
+ </vdr-timeline-entry>`, isInline: true, components: [{ type: i1.TimelineEntryComponent, selector: "vdr-timeline-entry", inputs: ["displayType", "createdAt", "name", "featured", "iconShape", "isLast", "collapsed"], outputs: ["expandClick"] }] });
1502
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: OrderHistoryEntryHostComponent, decorators: [{
1503
+ type: Component,
1504
+ args: [{
1505
+ selector: 'vdr-order-history-entry-host',
1506
+ template: ` <vdr-timeline-entry
1507
+ [displayType]="instance.getDisplayType(entry)"
1508
+ [iconShape]="instance.getIconShape && instance.getIconShape(entry)"
1509
+ [createdAt]="entry.createdAt"
1510
+ [name]="instance.getName && instance.getName(entry)"
1511
+ [featured]="instance.isFeatured(entry)"
1512
+ [collapsed]="!expanded && !instance.isFeatured(entry)"
1513
+ (expandClick)="expandClick.emit()"
1514
+ >
1515
+ <div #portal></div>
1516
+ </vdr-timeline-entry>`,
1517
+ exportAs: 'historyEntry',
1518
+ }]
1519
+ }], ctorParameters: function () { return [{ type: i0.ComponentFactoryResolver }, { type: i1.HistoryEntryComponentService }]; }, propDecorators: { entry: [{
1520
+ type: Input
1521
+ }], order: [{
1522
+ type: Input
1523
+ }], expanded: [{
1524
+ type: Input
1525
+ }], expandClick: [{
1526
+ type: Output
1527
+ }], portalRef: [{
1528
+ type: ViewChild,
1529
+ args: ['portal', { static: true, read: ViewContainerRef }]
1530
+ }] } });
1531
+
1471
1532
  class PaymentDetailComponent {
1472
1533
  }
1473
1534
  PaymentDetailComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: PaymentDetailComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
@@ -1482,7 +1543,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.3", ngImpor
1482
1543
  }] } });
1483
1544
 
1484
1545
  class OrderHistoryComponent {
1485
- constructor() {
1546
+ constructor(historyEntryComponentService) {
1547
+ this.historyEntryComponentService = historyEntryComponentService;
1486
1548
  this.addNote = new EventEmitter();
1487
1549
  this.updateNote = new EventEmitter();
1488
1550
  this.deleteNote = new EventEmitter();
@@ -1491,6 +1553,9 @@ class OrderHistoryComponent {
1491
1553
  this.expanded = false;
1492
1554
  this.type = HistoryEntryType;
1493
1555
  }
1556
+ hasCustomComponent(type) {
1557
+ return !!this.historyEntryComponentService.getComponent(type);
1558
+ }
1494
1559
  getDisplayType(entry) {
1495
1560
  if (entry.type === HistoryEntryType.ORDER_STATE_TRANSITION) {
1496
1561
  if (entry.data.to === 'Delivered') {
@@ -1617,12 +1682,12 @@ class OrderHistoryComponent {
1617
1682
  this.noteIsPrivate = true;
1618
1683
  }
1619
1684
  }
1620
- OrderHistoryComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: OrderHistoryComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
1621
- OrderHistoryComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.2.3", type: OrderHistoryComponent, selector: "vdr-order-history", inputs: { order: "order", history: "history" }, outputs: { addNote: "addNote", updateNote: "updateNote", deleteNote: "deleteNote" }, ngImport: i0, 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", 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"], components: [{ type: i1.TimelineEntryComponent, selector: "vdr-timeline-entry", inputs: ["displayType", "createdAt", "name", "featured", "iconShape", "isLast", "collapsed"], outputs: ["expandClick"] }, { type: i3$2.ClrCheckboxWrapper, selector: "clr-checkbox-wrapper,clr-toggle-wrapper" }, { type: i1.ChipComponent, selector: "vdr-chip", inputs: ["icon", "invert", "colorFrom", "colorType"], outputs: ["iconClick"] }, { type: i1.HistoryEntryDetailComponent, selector: "vdr-history-entry-detail" }, { type: ModificationDetailComponent, selector: "vdr-modification-detail", inputs: ["order", "modification"] }, { type: PaymentDetailComponent, selector: "vdr-payment-detail", inputs: ["payment", "currencyCode"] }, { type: i1.LabeledDataComponent, selector: "vdr-labeled-data", inputs: ["label"] }, { type: SimpleItemListComponent, selector: "vdr-simple-item-list", inputs: ["items"] }, { type: FulfillmentDetailComponent, selector: "vdr-fulfillment-detail", inputs: ["fulfillmentId", "order"] }, { type: i1.DropdownComponent, selector: "vdr-dropdown", inputs: ["manualToggle"] }, { type: i1.DropdownMenuComponent, selector: "vdr-dropdown-menu", inputs: ["vdrPosition", "customClasses"] }], directives: [{ type: i1.FormFieldControlDirective, selector: "input, textarea, select" }, { type: i3$1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { type: i3$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i3$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { type: i3$1.CheckboxControlValueAccessor, selector: "input[type=checkbox][formControlName],input[type=checkbox][formControl],input[type=checkbox][ngModel]" }, { type: i3$2.ClrCheckbox, selector: "[clrCheckbox],[clrToggle]" }, { type: i3$2.ClrLabel, selector: "label", inputs: ["for"] }, { type: i4$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i4$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i4$1.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { type: i4$1.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { type: i1.DropdownTriggerDirective, selector: "[vdrDropdownTrigger]" }, { type: i3$2.ClrIconCustomTag, selector: "clr-icon" }, { type: i1.DropdownItemDirective, selector: "[vdrDropdownItem]" }, { type: i1$1.RouterLinkWithHref, selector: "a[routerLink],area[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "preserveFragment", "skipLocationChange", "replaceUrl", "state", "relativeTo", "routerLink"] }], pipes: { "translate": i4.TranslatePipe, "localeCurrency": i1.LocaleCurrencyPipe, "hasPermission": i1.HasPermissionPipe }, changeDetection: i0.ChangeDetectionStrategy.OnPush });
1685
+ OrderHistoryComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: OrderHistoryComponent, deps: [{ token: i1.HistoryEntryComponentService }], target: i0.ɵɵFactoryTarget.Component });
1686
+ OrderHistoryComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.2.3", type: OrderHistoryComponent, selector: "vdr-order-history", inputs: { order: "order", history: "history" }, outputs: { addNote: "addNote", updateNote: "updateNote", deleteNote: "deleteNote" }, ngImport: i0, 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", 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"], components: [{ type: i1.TimelineEntryComponent, selector: "vdr-timeline-entry", inputs: ["displayType", "createdAt", "name", "featured", "iconShape", "isLast", "collapsed"], outputs: ["expandClick"] }, { type: i3$2.ClrCheckboxWrapper, selector: "clr-checkbox-wrapper,clr-toggle-wrapper" }, { type: OrderHistoryEntryHostComponent, selector: "vdr-order-history-entry-host", inputs: ["entry", "order", "expanded"], outputs: ["expandClick"], exportAs: ["historyEntry"] }, { type: i1.ChipComponent, selector: "vdr-chip", inputs: ["icon", "invert", "colorFrom", "colorType"], outputs: ["iconClick"] }, { type: i1.HistoryEntryDetailComponent, selector: "vdr-history-entry-detail" }, { type: ModificationDetailComponent, selector: "vdr-modification-detail", inputs: ["order", "modification"] }, { type: PaymentDetailComponent, selector: "vdr-payment-detail", inputs: ["payment", "currencyCode"] }, { type: i1.LabeledDataComponent, selector: "vdr-labeled-data", inputs: ["label"] }, { type: SimpleItemListComponent, selector: "vdr-simple-item-list", inputs: ["items"] }, { type: FulfillmentDetailComponent, selector: "vdr-fulfillment-detail", inputs: ["fulfillmentId", "order"] }, { type: i1.DropdownComponent, selector: "vdr-dropdown", inputs: ["manualToggle"] }, { type: i1.DropdownMenuComponent, selector: "vdr-dropdown-menu", inputs: ["vdrPosition", "customClasses"] }, { type: i1.ObjectTreeComponent, selector: "vdr-object-tree", inputs: ["value", "isArrayItem"] }], directives: [{ type: i1.FormFieldControlDirective, selector: "input, textarea, select" }, { type: i3$1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { type: i3$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i3$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { type: i3$1.CheckboxControlValueAccessor, selector: "input[type=checkbox][formControlName],input[type=checkbox][formControl],input[type=checkbox][ngModel]" }, { type: i3$2.ClrCheckbox, selector: "[clrCheckbox],[clrToggle]" }, { type: i3$2.ClrLabel, selector: "label", inputs: ["for"] }, { type: i4$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i4$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i4$1.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { type: i4$1.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { type: i1.DropdownTriggerDirective, selector: "[vdrDropdownTrigger]" }, { type: i3$2.ClrIconCustomTag, selector: "clr-icon" }, { type: i1.DropdownItemDirective, selector: "[vdrDropdownItem]" }, { type: i1$1.RouterLinkWithHref, selector: "a[routerLink],area[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "preserveFragment", "skipLocationChange", "replaceUrl", "state", "relativeTo", "routerLink"] }, { type: i4$1.NgSwitchDefault, selector: "[ngSwitchDefault]" }], pipes: { "translate": i4.TranslatePipe, "localeCurrency": i1.LocaleCurrencyPipe, "hasPermission": i1.HasPermissionPipe }, changeDetection: i0.ChangeDetectionStrategy.OnPush });
1622
1687
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: OrderHistoryComponent, decorators: [{
1623
1688
  type: Component,
1624
- args: [{ selector: 'vdr-order-history', changeDetection: ChangeDetectionStrategy.OnPush, 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", 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"] }]
1625
- }], propDecorators: { order: [{
1689
+ args: [{ selector: 'vdr-order-history', changeDetection: ChangeDetectionStrategy.OnPush, 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", 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"] }]
1690
+ }], ctorParameters: function () { return [{ type: i1.HistoryEntryComponentService }]; }, propDecorators: { order: [{
1626
1691
  type: Input
1627
1692
  }], history: [{
1628
1693
  type: Input
@@ -3008,7 +3073,8 @@ OrderModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "1
3008
3073
  SelectCustomerDialogComponent,
3009
3074
  SelectAddressDialogComponent,
3010
3075
  CouponCodeSelectorComponent,
3011
- SelectShippingMethodDialogComponent], imports: [SharedModule, i1$1.RouterModule] });
3076
+ SelectShippingMethodDialogComponent,
3077
+ OrderHistoryEntryHostComponent], imports: [SharedModule, i1$1.RouterModule] });
3012
3078
  OrderModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: OrderModule, imports: [[SharedModule, RouterModule.forChild(orderRoutes)]] });
3013
3079
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: OrderModule, decorators: [{
3014
3080
  type: NgModule,
@@ -3049,6 +3115,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.3", ngImpor
3049
3115
  SelectAddressDialogComponent,
3050
3116
  CouponCodeSelectorComponent,
3051
3117
  SelectShippingMethodDialogComponent,
3118
+ OrderHistoryEntryHostComponent,
3052
3119
  ],
3053
3120
  }]
3054
3121
  }] });
@@ -3059,5 +3126,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.3", ngImpor
3059
3126
  * Generated bundle index. Do not edit.
3060
3127
  */
3061
3128
 
3062
- 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 };
3129
+ 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 };
3063
3130
  //# sourceMappingURL=vendure-admin-ui-order.mjs.map