@vendure/admin-ui 1.7.0 → 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 (40) 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/generate-product-variants/generate-product-variants.component.js +1 -1
  15. package/esm2015/catalog/components/option-value-input/option-value-input.component.js +8 -2
  16. package/esm2015/core/common/generated-types.js +2 -2
  17. package/esm2015/core/common/introspection-result.js +1 -1
  18. package/esm2015/core/common/utilities/configurable-operation-utils.js +8 -2
  19. package/esm2015/core/common/version.js +2 -2
  20. package/esm2015/core/components/app-shell/app-shell.component.js +1 -1
  21. package/esm2015/core/data/definitions/order-definitions.js +443 -443
  22. package/esm2015/core/data/definitions/product-definitions.js +743 -743
  23. package/esm2015/core/data/utils/remove-readonly-custom-fields.js +4 -1
  24. package/esm2015/core/shared/components/dropdown/dropdown-menu.component.js +11 -11
  25. package/esm2015/core/shared/components/dropdown/dropdown-trigger.directive.js +1 -1
  26. package/esm2015/core/shared/pipes/locale-currency.pipe.js +10 -2
  27. package/esm2015/customer/components/customer-group-list/customer-group-list.component.js +6 -5
  28. package/esm2015/order/components/order-editor/order-editor.component.js +9 -5
  29. package/fesm2015/vendure-admin-ui-catalog.js +7 -1
  30. package/fesm2015/vendure-admin-ui-catalog.js.map +1 -1
  31. package/fesm2015/vendure-admin-ui-core.js +1260 -1243
  32. package/fesm2015/vendure-admin-ui-core.js.map +1 -1
  33. package/fesm2015/vendure-admin-ui-customer.js +5 -4
  34. package/fesm2015/vendure-admin-ui-customer.js.map +1 -1
  35. package/fesm2015/vendure-admin-ui-order.js +8 -4
  36. package/fesm2015/vendure-admin-ui-order.js.map +1 -1
  37. package/order/vendure-admin-ui-order.metadata.json +1 -1
  38. package/package.json +2 -2
  39. package/static/styles/_variables.scss +1 -0
  40. package/static/styles/global/_sass-overrides.scss +1 -1
@@ -899,6 +899,9 @@
899
899
  if (inputTypeName === 'UpdateActiveAdministratorInput') {
900
900
  return 'Administrator';
901
901
  }
902
+ if (inputTypeName === 'ModifyOrderInput') {
903
+ return 'Order';
904
+ }
902
905
  var createMatch = inputTypeName.match(CREATE_ENTITY_REGEX);
903
906
  if (createMatch) {
904
907
  return createMatch[1];
@@ -2482,7 +2485,7 @@
2482
2485
  *
2483
2486
  * ## Understanding Permission.Owner
2484
2487
  *
2485
- * `Permission.Owner` is a special permission which is used in some of the Vendure resolvers to indicate that that resolver should only
2488
+ * `Permission.Owner` is a special permission which is used in some Vendure resolvers to indicate that that resolver should only
2486
2489
  * be accessible to the "owner" of that resource.
2487
2490
  *
2488
2491
  * For example, the Shop API `activeCustomer` query resolver should only return the Customer object for the "owner" of that Customer, i.e.
@@ -4221,7 +4224,7 @@
4221
4224
  { type: i0.Component, args: [{
4222
4225
  selector: 'vdr-app-shell',
4223
4226
  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",
4224
- 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"]
4227
+ 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"]
4225
4228
  },] }
4226
4229
  ];
4227
4230
  AppShellComponent.ctorParameters = function () { return [
@@ -6473,11 +6476,17 @@
6473
6476
  * ```
6474
6477
  */
6475
6478
  function toConfigurableOperationInput(operation, formValueOperations) {
6479
+ var argsArray = Array.isArray(formValueOperations.args) ? formValueOperations.args : undefined;
6480
+ var argsMap = !Array.isArray(formValueOperations.args) ? formValueOperations.args : undefined;
6476
6481
  return {
6477
6482
  code: operation.code,
6478
- arguments: operation.args.map(function (_a, j) {
6479
- var name = _a.name, value = _a.value;
6480
- var formValue = formValueOperations.args[name];
6483
+ arguments: operation.args.map(function (_c, j) {
6484
+ var name = _c.name, value = _c.value;
6485
+ var _a, _b;
6486
+ var formValue = (_b = (_a = argsArray === null || argsArray === void 0 ? void 0 : argsArray.find(function (arg) { return 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];
6487
+ if (!formValue) {
6488
+ throw new Error("Cannot find an argument value for the key \"" + name + "\"");
6489
+ }
6481
6490
  return {
6482
6491
  name: name,
6483
6492
  value: (formValue === null || formValue === void 0 ? void 0 : formValue.hasOwnProperty('value'))
@@ -6488,7 +6497,7 @@
6488
6497
  };
6489
6498
  }
6490
6499
  function configurableOperationValueIsValid(def, value) {
6491
- var e_1, _a;
6500
+ var e_1, _c;
6492
6501
  if (!def || !value) {
6493
6502
  return false;
6494
6503
  }
@@ -6496,8 +6505,8 @@
6496
6505
  return false;
6497
6506
  }
6498
6507
  try {
6499
- for (var _b = __values(def.args), _c = _b.next(); !_c.done; _c = _b.next()) {
6500
- var argDef = _c.value;
6508
+ for (var _d = __values(def.args), _e = _d.next(); !_e.done; _e = _d.next()) {
6509
+ var argDef = _e.value;
6501
6510
  var argVal = value.args[argDef.name];
6502
6511
  if (argDef.required && (argVal == null || argVal === '' || argVal === '0')) {
6503
6512
  return false;
@@ -6507,7 +6516,7 @@
6507
6516
  catch (e_1_1) { e_1 = { error: e_1_1 }; }
6508
6517
  finally {
6509
6518
  try {
6510
- if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
6519
+ if (_e && !_e.done && (_c = _d.return)) _c.call(_d);
6511
6520
  }
6512
6521
  finally { if (e_1) throw e_1.error; }
6513
6522
  }
@@ -13405,7 +13414,15 @@
13405
13414
  if (typeof value === 'number' && typeof currencyCode === 'string') {
13406
13415
  var activeLocale = this.getActiveLocale(locale);
13407
13416
  var majorUnits = value / 100;
13408
- return new Intl.NumberFormat(activeLocale, { style: 'currency', currency: currencyCode }).format(majorUnits);
13417
+ try {
13418
+ return new Intl.NumberFormat(activeLocale, {
13419
+ style: 'currency',
13420
+ currency: currencyCode,
13421
+ }).format(majorUnits);
13422
+ }
13423
+ catch (e) {
13424
+ return majorUnits.toFixed(2);
13425
+ }
13409
13426
  }
13410
13427
  return value;
13411
13428
  };
@@ -14549,7 +14566,7 @@
14549
14566
  }
14550
14567
 
14551
14568
  // Auto-generated by the set-version.js script.
14552
- var ADMIN_UI_VERSION = '1.7.0';
14569
+ var ADMIN_UI_VERSION = '1.7.2';
14553
14570
 
14554
14571
  /**
14555
14572
  * Responsible for registering dashboard widget components and querying for layouts.