@vendure/admin-ui 1.7.1 → 1.7.2

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 (37) hide show
  1. package/bundles/vendure-admin-ui-catalog.umd.js +8 -1
  2. package/bundles/vendure-admin-ui-catalog.umd.js.map +1 -1
  3. package/bundles/vendure-admin-ui-core.umd.js +28 -11
  4. package/bundles/vendure-admin-ui-core.umd.js.map +1 -1
  5. package/bundles/vendure-admin-ui-customer.umd.js +5 -4
  6. package/bundles/vendure-admin-ui-customer.umd.js.map +1 -1
  7. package/bundles/vendure-admin-ui-order.umd.js +10 -7
  8. package/bundles/vendure-admin-ui-order.umd.js.map +1 -1
  9. package/core/common/generated-types.d.ts +2 -1
  10. package/core/common/utilities/configurable-operation-utils.d.ts +4 -1
  11. package/core/common/version.d.ts +1 -1
  12. package/core/vendure-admin-ui-core.metadata.json +1 -1
  13. package/customer/vendure-admin-ui-customer.metadata.json +1 -1
  14. package/esm2015/catalog/components/option-value-input/option-value-input.component.js +8 -2
  15. package/esm2015/core/common/generated-types.js +2 -2
  16. package/esm2015/core/common/introspection-result.js +1 -1
  17. package/esm2015/core/common/utilities/configurable-operation-utils.js +8 -2
  18. package/esm2015/core/common/version.js +2 -2
  19. package/esm2015/core/components/app-shell/app-shell.component.js +1 -1
  20. package/esm2015/core/data/utils/remove-readonly-custom-fields.js +4 -1
  21. package/esm2015/core/shared/components/dropdown/dropdown-menu.component.js +11 -11
  22. package/esm2015/core/shared/components/dropdown/dropdown-trigger.directive.js +1 -1
  23. package/esm2015/core/shared/pipes/locale-currency.pipe.js +10 -2
  24. package/esm2015/customer/components/customer-group-list/customer-group-list.component.js +6 -5
  25. package/esm2015/order/components/order-editor/order-editor.component.js +9 -5
  26. package/fesm2015/vendure-admin-ui-catalog.js +7 -1
  27. package/fesm2015/vendure-admin-ui-catalog.js.map +1 -1
  28. package/fesm2015/vendure-admin-ui-core.js +32 -15
  29. package/fesm2015/vendure-admin-ui-core.js.map +1 -1
  30. package/fesm2015/vendure-admin-ui-customer.js +5 -4
  31. package/fesm2015/vendure-admin-ui-customer.js.map +1 -1
  32. package/fesm2015/vendure-admin-ui-order.js +8 -4
  33. package/fesm2015/vendure-admin-ui-order.js.map +1 -1
  34. package/order/vendure-admin-ui-order.metadata.json +1 -1
  35. package/package.json +2 -2
  36. package/static/styles/_variables.scss +1 -0
  37. package/static/styles/global/_sass-overrides.scss +1 -1
@@ -1548,6 +1548,9 @@ function isEntityCreateOrUpdateMutation(documentNode) {
1548
1548
  if (inputTypeName === 'UpdateActiveAdministratorInput') {
1549
1549
  return 'Administrator';
1550
1550
  }
1551
+ if (inputTypeName === 'ModifyOrderInput') {
1552
+ return 'Order';
1553
+ }
1551
1554
  const createMatch = inputTypeName.match(CREATE_ENTITY_REGEX);
1552
1555
  if (createMatch) {
1553
1556
  return createMatch[1];
@@ -4641,7 +4644,7 @@ var LogicalOperator;
4641
4644
  *
4642
4645
  * ## Understanding Permission.Owner
4643
4646
  *
4644
- * `Permission.Owner` is a special permission which is used in some of the Vendure resolvers to indicate that that resolver should only
4647
+ * `Permission.Owner` is a special permission which is used in some Vendure resolvers to indicate that that resolver should only
4645
4648
  * be accessible to the "owner" of that resource.
4646
4649
  *
4647
4650
  * For example, the Shop API `activeCustomer` query resolver should only return the Customer object for the "owner" of that Customer, i.e.
@@ -6484,7 +6487,7 @@ AppShellComponent.decorators = [
6484
6487
  { type: Component, args: [{
6485
6488
  selector: 'vdr-app-shell',
6486
6489
  template: "<clr-main-container>\r\n <clr-header>\r\n <div class=\"branding\">\r\n <a [routerLink]=\"['/']\"><img src=\"assets/logo-75px.png\" class=\"logo\" /><span class=\"wordmark\" *ngIf=\"!hideVendureBranding\">vendure</span></a>\r\n </div>\r\n <div class=\"header-nav\"></div>\r\n <div class=\"header-actions\">\r\n <vdr-channel-switcher *vdrIfMultichannel></vdr-channel-switcher>\r\n <vdr-user-menu [userName]=\"userName$ | async\"\r\n [uiLanguageAndLocale]=\"uiLanguageAndLocale$ | async\"\r\n [availableLanguages]=\"availableLanguages\"\r\n (selectUiLanguage)=\"selectUiLanguage()\"\r\n (logOut)=\"logOut()\"></vdr-user-menu>\r\n </div>\r\n </clr-header>\r\n <nav class=\"subnav\"><vdr-breadcrumb></vdr-breadcrumb></nav>\r\n\r\n <div class=\"content-container\">\r\n <div class=\"content-area\"><router-outlet></router-outlet></div>\r\n <vdr-main-nav></vdr-main-nav>\r\n </div>\r\n</clr-main-container>\r\n",
6487
- styles: [".branding{min-width:0}.logo{width:40px}.wordmark{font-weight:bold;margin-left:12px;font-size:24px;color:var(--color-primary-500)}@media screen and (min-width: 768px){vdr-breadcrumb{margin-left:18%}}.header-actions{align-items:center}.content-area{position:relative}::ng-deep .header{background-image:linear-gradient(to right,var(--color-header-gradient-from),var(--color-header-gradient-to))}\n"]
6490
+ styles: [".branding{min-width:0}.logo{width:40px}.wordmark{font-weight:bold;margin-left:12px;font-size:24px;color:var(--color-primary-500)}@media screen and (min-width: 768px){vdr-breadcrumb{margin-left:10.8rem}}.header-actions{align-items:center}.content-area{position:relative}::ng-deep .header{background-image:linear-gradient(to right,var(--color-header-gradient-from),var(--color-header-gradient-to))}\n"]
6488
6491
  },] }
6489
6492
  ];
6490
6493
  AppShellComponent.ctorParameters = () => [
@@ -8574,10 +8577,16 @@ function configurableDefinitionToInstance(def) {
8574
8577
  * ```
8575
8578
  */
8576
8579
  function toConfigurableOperationInput(operation, formValueOperations) {
8580
+ const argsArray = Array.isArray(formValueOperations.args) ? formValueOperations.args : undefined;
8581
+ const argsMap = !Array.isArray(formValueOperations.args) ? formValueOperations.args : undefined;
8577
8582
  return {
8578
8583
  code: operation.code,
8579
8584
  arguments: operation.args.map(({ name, value }, j) => {
8580
- const formValue = formValueOperations.args[name];
8585
+ var _a, _b;
8586
+ const formValue = (_b = (_a = argsArray === null || argsArray === void 0 ? void 0 : argsArray.find(arg => arg.name === name)) === null || _a === void 0 ? void 0 : _a.value) !== null && _b !== void 0 ? _b : argsMap === null || argsMap === void 0 ? void 0 : argsMap[name];
8587
+ if (!formValue) {
8588
+ throw new Error(`Cannot find an argument value for the key "${name}"`);
8589
+ }
8581
8590
  return {
8582
8591
  name,
8583
8592
  value: (formValue === null || formValue === void 0 ? void 0 : formValue.hasOwnProperty('value'))
@@ -11683,16 +11692,16 @@ class DropdownMenuComponent {
11683
11692
  DropdownMenuComponent.decorators = [
11684
11693
  { type: Component, args: [{
11685
11694
  selector: 'vdr-dropdown-menu',
11686
- template: `
11687
- <ng-template #menu>
11688
- <div class="dropdown open">
11689
- <div class="dropdown-menu">
11690
- <div class="dropdown-content-wrapper">
11691
- <ng-content></ng-content>
11692
- </div>
11693
- </div>
11694
- </div>
11695
- </ng-template>
11695
+ template: `
11696
+ <ng-template #menu>
11697
+ <div class="dropdown open">
11698
+ <div class="dropdown-menu">
11699
+ <div class="dropdown-content-wrapper">
11700
+ <ng-content></ng-content>
11701
+ </div>
11702
+ </div>
11703
+ </div>
11704
+ </ng-template>
11696
11705
  `,
11697
11706
  changeDetection: ChangeDetectionStrategy.OnPush,
11698
11707
  styles: [".clear-backdrop{background-color:#ff69b4}.dropdown.open>.dropdown-menu{position:relative;top:0;height:100%;overflow-y:auto}:host{opacity:1;transition:opacity .3s}\n"]
@@ -14979,7 +14988,15 @@ class LocaleCurrencyPipe extends LocaleBasePipe {
14979
14988
  if (typeof value === 'number' && typeof currencyCode === 'string') {
14980
14989
  const activeLocale = this.getActiveLocale(locale);
14981
14990
  const majorUnits = value / 100;
14982
- return new Intl.NumberFormat(activeLocale, { style: 'currency', currency: currencyCode }).format(majorUnits);
14991
+ try {
14992
+ return new Intl.NumberFormat(activeLocale, {
14993
+ style: 'currency',
14994
+ currency: currencyCode,
14995
+ }).format(majorUnits);
14996
+ }
14997
+ catch (e) {
14998
+ return majorUnits.toFixed(2);
14999
+ }
14983
15000
  }
14984
15001
  return value;
14985
15002
  }
@@ -16051,7 +16068,7 @@ function patchObject(obj, patch) {
16051
16068
  }
16052
16069
 
16053
16070
  // Auto-generated by the set-version.js script.
16054
- const ADMIN_UI_VERSION = '1.7.1';
16071
+ const ADMIN_UI_VERSION = '1.7.2';
16055
16072
 
16056
16073
  /**
16057
16074
  * Responsible for registering dashboard widget components and querying for layouts.