@vendure/admin-ui 2.0.3 → 2.0.4

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 (46) hide show
  1. package/core/common/version.d.ts +1 -1
  2. package/core/shared/components/rich-text-editor/link-dialog/link-dialog.component.d.ts +1 -0
  3. package/core/shared/components/rich-text-editor/prosemirror/custom-nodes.d.ts +2 -1
  4. package/esm2022/catalog/components/stock-location-detail/stock-location-detail.component.mjs +32 -33
  5. package/esm2022/core/common/version.mjs +2 -2
  6. package/esm2022/core/components/app-shell/app-shell.component.mjs +3 -3
  7. package/esm2022/core/shared/components/data-table-filters/data-table-filters.component.mjs +6 -1
  8. package/esm2022/core/shared/components/rich-text-editor/link-dialog/link-dialog.component.mjs +7 -6
  9. package/esm2022/core/shared/components/rich-text-editor/prosemirror/custom-nodes.mjs +40 -1
  10. package/esm2022/core/shared/components/rich-text-editor/prosemirror/prosemirror.service.mjs +3 -3
  11. package/esm2022/core/shared/components/rich-text-editor/rich-text-editor.component.mjs +2 -2
  12. package/esm2022/customer/components/customer-detail/customer-detail.component.mjs +6 -20
  13. package/esm2022/login/components/login/login.component.mjs +3 -3
  14. package/esm2022/order/components/select-customer-dialog/select-customer-dialog.component.mjs +3 -3
  15. package/fesm2022/vendure-admin-ui-catalog.mjs +31 -32
  16. package/fesm2022/vendure-admin-ui-catalog.mjs.map +1 -1
  17. package/fesm2022/vendure-admin-ui-core.mjs +57 -12
  18. package/fesm2022/vendure-admin-ui-core.mjs.map +1 -1
  19. package/fesm2022/vendure-admin-ui-customer.mjs +5 -19
  20. package/fesm2022/vendure-admin-ui-customer.mjs.map +1 -1
  21. package/fesm2022/vendure-admin-ui-login.mjs +2 -2
  22. package/fesm2022/vendure-admin-ui-login.mjs.map +1 -1
  23. package/fesm2022/vendure-admin-ui-order.mjs +2 -2
  24. package/fesm2022/vendure-admin-ui-order.mjs.map +1 -1
  25. package/package.json +13 -13
  26. package/static/assets/logo-login.webp +0 -0
  27. package/static/assets/logo-top.webp +0 -0
  28. package/static/i18n-messages/cs.json +1 -0
  29. package/static/i18n-messages/de.json +2 -1
  30. package/static/i18n-messages/en.json +1 -0
  31. package/static/i18n-messages/es.json +2 -1
  32. package/static/i18n-messages/fr.json +2 -1
  33. package/static/i18n-messages/it.json +2 -1
  34. package/static/i18n-messages/pl.json +2 -1
  35. package/static/i18n-messages/pt_BR.json +2 -1
  36. package/static/i18n-messages/pt_PT.json +2 -1
  37. package/static/i18n-messages/ru.json +2 -1
  38. package/static/i18n-messages/uk.json +2 -1
  39. package/static/i18n-messages/zh_Hans.json +2 -1
  40. package/static/i18n-messages/zh_Hant.json +2 -1
  41. package/static/styles/global/_overrides.scss +0 -6
  42. package/static/theme.min.css +1 -1
  43. package/static/assets/logo-300px.png +0 -0
  44. package/static/assets/logo-75px.png +0 -0
  45. package/static/assets/logo.svg +0 -11
  46. package/static/assets/logo.webp +0 -0
@@ -5,7 +5,7 @@ import { map, startWith, distinctUntilChanged, debounceTime, tap, takeUntil, swi
5
5
  import * as i1 from '@vendure/admin-ui/core';
6
6
  import { SelectionManager, HistoryEntryType, CUSTOMER_FRAGMENT, TypedBaseDetailComponent, SortOrder, EditNoteDialogComponent, CustomerDetailQueryDocument, createBulkDeleteAction, Permission, CUSTOMER_GROUP_FRAGMENT, TypedBaseListComponent, GetCustomerGroupListDocument, ModalService, DataService, NotificationService, CustomerListQueryDocument, LogicalOperator, PageComponent, detailBreadcrumb, detailComponentWithResolver, GetCustomerGroupDetailDocument, SharedModule, PageService } from '@vendure/admin-ui/core';
7
7
  import * as i1$1 from '@angular/forms';
8
- import { FormControl, Validators, UntypedFormArray, UntypedFormControl } from '@angular/forms';
8
+ import { FormControl, Validators, UntypedFormArray } from '@angular/forms';
9
9
  import * as i2 from '@angular/router';
10
10
  import { ROUTES, RouterModule } from '@angular/router';
11
11
  import * as i3 from '@clr/angular';
@@ -525,13 +525,6 @@ class CustomerDetailComponent extends TypedBaseDetailComponent {
525
525
  defaultBillingAddress: false,
526
526
  customFields: this.formBuilder.group(this.addressCustomFields.reduce((hash, field) => ({ ...hash, [field.name]: '' }), {})),
527
527
  });
528
- // if (this.addressCustomFields.length) {
529
- // const customFieldsGroup = this.formBuilder.group({});
530
- // for (const fieldDef of this.addressCustomFields) {
531
- // customFieldsGroup.addControl(fieldDef.name, new UntypedFormControl(''));
532
- // }
533
- // newAddress.addControl('customFields', customFieldsGroup);
534
- // }
535
528
  addressFormArray.push(newAddress);
536
529
  }
537
530
  setOrderItemsPerPage(itemsPerPage) {
@@ -791,7 +784,10 @@ class CustomerDetailComponent extends TypedBaseDetailComponent {
791
784
  const addressGroup = this.formBuilder.group({
792
785
  ...rest,
793
786
  countryCode: address.country.code,
794
- customFields: this.formBuilder.group(this.addressCustomFields.reduce((hash, field) => ({ ...hash, [field.name]: '' }), {})),
787
+ customFields: this.formBuilder.group(this.addressCustomFields.reduce((hash, field) => ({
788
+ ...hash,
789
+ [field.name]: address['customFields'][field.name],
790
+ }), {})),
795
791
  });
796
792
  addressesArray.push(addressGroup);
797
793
  if (address.defaultShippingAddress) {
@@ -800,16 +796,6 @@ class CustomerDetailComponent extends TypedBaseDetailComponent {
800
796
  if (address.defaultBillingAddress) {
801
797
  this.defaultBillingAddressId = address.id;
802
798
  }
803
- if (this.addressCustomFields.length) {
804
- const customFieldsGroup = this.formBuilder.group({});
805
- for (const fieldDef of this.addressCustomFields) {
806
- const key = fieldDef.name;
807
- const value = address.customFields?.[key];
808
- const control = new UntypedFormControl(value);
809
- customFieldsGroup.addControl(key, control);
810
- }
811
- addressGroup.addControl('customFields', customFieldsGroup);
812
- }
813
799
  }
814
800
  this.detailForm.setControl('addresses', addressesArray);
815
801
  }