@vendure/admin-ui 2.0.3 → 2.0.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/core/common/component-registry-types.d.ts +1 -1
- package/core/common/version.d.ts +1 -1
- package/core/components/app-shell/app-shell.component.d.ts +1 -0
- package/core/providers/i18n/i18n.service.d.ts +4 -0
- package/core/shared/components/rich-text-editor/link-dialog/link-dialog.component.d.ts +1 -0
- package/core/shared/components/rich-text-editor/prosemirror/custom-nodes.d.ts +2 -1
- package/esm2022/catalog/components/collection-detail/collection-detail.component.mjs +2 -2
- package/esm2022/catalog/components/product-detail/product-detail.component.mjs +2 -2
- package/esm2022/catalog/components/product-variant-detail/product-variant-detail.component.mjs +1 -1
- package/esm2022/catalog/components/product-variant-list/product-variant-list.component.mjs +7 -1
- package/esm2022/catalog/components/stock-location-detail/stock-location-detail.component.mjs +3 -4
- package/esm2022/core/app.config.mjs +3 -7
- package/esm2022/core/common/base-list.component.mjs +1 -1
- package/esm2022/core/common/component-registry-types.mjs +1 -1
- package/esm2022/core/common/generated-types.mjs +1 -1
- package/esm2022/core/common/version.mjs +2 -2
- package/esm2022/core/components/app-shell/app-shell.component.mjs +11 -9
- package/esm2022/core/components/theme-switcher/theme-switcher.component.mjs +1 -1
- package/esm2022/core/components/user-menu/user-menu.component.mjs +3 -3
- package/esm2022/core/data/data.module.mjs +3 -3
- package/esm2022/core/data/utils/transform-relation-custom-field-inputs.mjs +1 -1
- package/esm2022/core/providers/bulk-action-registry/bulk-action-types.mjs +1 -1
- package/esm2022/core/providers/dashboard-widget/dashboard-widget-types.mjs +1 -1
- package/esm2022/core/providers/data-table/data-table-filter-collection.mjs +1 -1
- package/esm2022/core/providers/i18n/i18n.service.mjs +15 -1
- package/esm2022/core/providers/page/page.service.mjs +1 -1
- package/esm2022/core/shared/components/data-table-filters/data-table-filters.component.mjs +6 -1
- package/esm2022/core/shared/components/dropdown/dropdown-menu.component.mjs +29 -29
- package/esm2022/core/shared/components/dropdown/dropdown.component.mjs +1 -1
- package/esm2022/core/shared/components/rich-text-editor/link-dialog/link-dialog.component.mjs +7 -6
- package/esm2022/core/shared/components/rich-text-editor/prosemirror/custom-nodes.mjs +40 -1
- package/esm2022/core/shared/components/rich-text-editor/prosemirror/prosemirror.service.mjs +3 -3
- package/esm2022/core/shared/components/rich-text-editor/rich-text-editor.component.mjs +2 -2
- package/esm2022/core/shared/components/tabbed-custom-fields/tabbed-custom-fields.component.mjs +1 -1
- package/esm2022/core/shared/dynamic-form-inputs/customer-group-form-input/customer-group-form-input.component.mjs +1 -1
- package/esm2022/core/shared/dynamic-form-inputs/dynamic-form-input/dynamic-form-input.component.mjs +3 -3
- package/esm2022/core/shared/dynamic-form-inputs/product-multi-selector-form-input/product-multi-selector-form-input.component.mjs +1 -1
- package/esm2022/core/shared/dynamic-form-inputs/product-selector-form-input/product-selector-form-input.component.mjs +1 -1
- package/esm2022/core/shared/dynamic-form-inputs/register-dynamic-input-components.mjs +1 -1
- package/esm2022/core/shared/dynamic-form-inputs/relation-form-input/asset/relation-asset-input.component.mjs +12 -12
- package/esm2022/core/shared/dynamic-form-inputs/relation-form-input/customer/relation-customer-input.component.mjs +1 -1
- package/esm2022/core/shared/dynamic-form-inputs/relation-form-input/product-variant/relation-product-variant-input.component.mjs +3 -3
- package/esm2022/core/shared/shared.module.mjs +1 -1
- package/esm2022/customer/components/customer-detail/customer-detail.component.mjs +32 -46
- package/esm2022/login/components/login/login.component.mjs +3 -3
- package/esm2022/order/components/draft-order-detail/draft-order-detail.component.mjs +3 -3
- package/esm2022/order/components/select-customer-dialog/select-customer-dialog.component.mjs +3 -3
- package/esm2022/settings/components/tax-rate-detail/tax-rate-detail.component.mjs +9 -9
- package/fesm2022/vendure-admin-ui-catalog.mjs +10 -5
- package/fesm2022/vendure-admin-ui-catalog.mjs.map +1 -1
- package/fesm2022/vendure-admin-ui-core.mjs +123 -68
- package/fesm2022/vendure-admin-ui-core.mjs.map +1 -1
- package/fesm2022/vendure-admin-ui-customer.mjs +31 -45
- package/fesm2022/vendure-admin-ui-customer.mjs.map +1 -1
- package/fesm2022/vendure-admin-ui-login.mjs +2 -2
- package/fesm2022/vendure-admin-ui-login.mjs.map +1 -1
- package/fesm2022/vendure-admin-ui-order.mjs +4 -4
- package/fesm2022/vendure-admin-ui-order.mjs.map +1 -1
- package/fesm2022/vendure-admin-ui-settings.mjs +8 -8
- package/fesm2022/vendure-admin-ui-settings.mjs.map +1 -1
- package/package.json +8 -8
- package/static/assets/logo-login.webp +0 -0
- package/static/assets/logo-top.webp +0 -0
- package/static/i18n-messages/ar.json +774 -0
- package/static/i18n-messages/cs.json +773 -772
- package/static/i18n-messages/de.json +774 -773
- package/static/i18n-messages/en.json +774 -773
- package/static/i18n-messages/es.json +774 -773
- package/static/i18n-messages/fr.json +774 -773
- package/static/i18n-messages/he.json +774 -0
- package/static/i18n-messages/it.json +774 -773
- package/static/i18n-messages/pl.json +774 -773
- package/static/i18n-messages/pt_BR.json +774 -773
- package/static/i18n-messages/pt_PT.json +774 -773
- package/static/i18n-messages/ru.json +774 -773
- package/static/i18n-messages/uk.json +774 -773
- package/static/i18n-messages/zh_Hans.json +774 -773
- package/static/i18n-messages/zh_Hant.json +774 -773
- package/static/styles/global/_overrides.scss +0 -6
- package/static/theme.min.css +1 -1
- package/static/vendure-ui-config.json +3 -0
- package/static/assets/logo-300px.png +0 -0
- package/static/assets/logo-75px.png +0 -0
- package/static/assets/logo.svg +0 -11
- 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
|
|
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';
|
|
@@ -412,32 +412,32 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.3", ngImpor
|
|
|
412
412
|
type: Output
|
|
413
413
|
}] } });
|
|
414
414
|
|
|
415
|
-
const CUSTOMER_DETAIL_QUERY = gql `
|
|
416
|
-
query CustomerDetailQuery($id: ID!, $orderListOptions: OrderListOptions) {
|
|
417
|
-
customer(id: $id) {
|
|
418
|
-
...Customer
|
|
419
|
-
groups {
|
|
420
|
-
id
|
|
421
|
-
name
|
|
422
|
-
}
|
|
423
|
-
orders(options: $orderListOptions) {
|
|
424
|
-
items {
|
|
425
|
-
id
|
|
426
|
-
code
|
|
427
|
-
type
|
|
428
|
-
state
|
|
429
|
-
total
|
|
430
|
-
totalWithTax
|
|
431
|
-
currencyCode
|
|
432
|
-
createdAt
|
|
433
|
-
updatedAt
|
|
434
|
-
orderPlacedAt
|
|
435
|
-
}
|
|
436
|
-
totalItems
|
|
437
|
-
}
|
|
438
|
-
}
|
|
439
|
-
}
|
|
440
|
-
${CUSTOMER_FRAGMENT}
|
|
415
|
+
const CUSTOMER_DETAIL_QUERY = gql `
|
|
416
|
+
query CustomerDetailQuery($id: ID!, $orderListOptions: OrderListOptions) {
|
|
417
|
+
customer(id: $id) {
|
|
418
|
+
...Customer
|
|
419
|
+
groups {
|
|
420
|
+
id
|
|
421
|
+
name
|
|
422
|
+
}
|
|
423
|
+
orders(options: $orderListOptions) {
|
|
424
|
+
items {
|
|
425
|
+
id
|
|
426
|
+
code
|
|
427
|
+
type
|
|
428
|
+
state
|
|
429
|
+
total
|
|
430
|
+
totalWithTax
|
|
431
|
+
currencyCode
|
|
432
|
+
createdAt
|
|
433
|
+
updatedAt
|
|
434
|
+
orderPlacedAt
|
|
435
|
+
}
|
|
436
|
+
totalItems
|
|
437
|
+
}
|
|
438
|
+
}
|
|
439
|
+
}
|
|
440
|
+
${CUSTOMER_FRAGMENT}
|
|
441
441
|
`;
|
|
442
442
|
class CustomerDetailComponent extends TypedBaseDetailComponent {
|
|
443
443
|
constructor(changeDetector, formBuilder, dataService, modalService, notificationService) {
|
|
@@ -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) => ({
|
|
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
|
}
|