@vendure/admin-ui 2.1.1 → 2.1.3
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/catalog/catalog.module.d.ts +1 -0
- package/core/common/generated-types.d.ts +2 -1
- package/core/common/version.d.ts +1 -1
- package/core/extension/add-nav-menu-item.d.ts +5 -1
- package/customer/customer.module.d.ts +1 -2
- package/esm2022/catalog/catalog.module.mjs +6 -1
- package/esm2022/catalog/components/create-product-variant-dialog/create-product-variant-dialog.component.mjs +2 -2
- package/esm2022/core/common/generated-types.mjs +1 -1
- package/esm2022/core/common/version.mjs +2 -2
- package/esm2022/core/data/utils/add-custom-fields.mjs +5 -1
- package/esm2022/core/extension/add-nav-menu-item.mjs +6 -2
- package/esm2022/core/extension/register-route-component.mjs +10 -2
- package/esm2022/core/providers/alerts/alerts.service.mjs +1 -1
- package/esm2022/core/shared/components/radio-card/radio-card-fieldset.component.mjs +2 -2
- package/esm2022/core/shared/components/tabbed-custom-fields/tabbed-custom-fields.component.mjs +2 -2
- package/esm2022/customer/components/customer-detail/customer-detail.component.mjs +3 -3
- package/esm2022/customer/customer.module.mjs +6 -3
- package/esm2022/login/components/login/login.component.mjs +12 -7
- package/esm2022/marketing/components/promotion-list/promotion-list.component.mjs +3 -3
- package/esm2022/marketing/marketing.module.mjs +6 -2
- package/esm2022/order/order.module.mjs +6 -2
- package/esm2022/react/react-hooks/use-query.mjs +2 -2
- package/esm2022/react/register-react-data-table-component.mjs +3 -3
- package/esm2022/settings/components/channel-list/channel-list-bulk-actions.mjs +11 -4
- package/esm2022/settings/settings.module.mjs +6 -2
- package/esm2022/system/system.module.mjs +1 -1
- package/fesm2022/vendure-admin-ui-catalog.mjs +6 -1
- package/fesm2022/vendure-admin-ui-catalog.mjs.map +1 -1
- package/fesm2022/vendure-admin-ui-core.mjs +23 -7
- package/fesm2022/vendure-admin-ui-core.mjs.map +1 -1
- package/fesm2022/vendure-admin-ui-customer.mjs +7 -4
- package/fesm2022/vendure-admin-ui-customer.mjs.map +1 -1
- package/fesm2022/vendure-admin-ui-login.mjs +11 -6
- package/fesm2022/vendure-admin-ui-login.mjs.map +1 -1
- package/fesm2022/vendure-admin-ui-marketing.mjs +7 -3
- package/fesm2022/vendure-admin-ui-marketing.mjs.map +1 -1
- package/fesm2022/vendure-admin-ui-order.mjs +5 -1
- package/fesm2022/vendure-admin-ui-order.mjs.map +1 -1
- package/fesm2022/vendure-admin-ui-react.mjs +3 -3
- package/fesm2022/vendure-admin-ui-react.mjs.map +1 -1
- package/fesm2022/vendure-admin-ui-settings.mjs +13 -2
- package/fesm2022/vendure-admin-ui-settings.mjs.map +1 -1
- package/fesm2022/vendure-admin-ui-system.mjs.map +1 -1
- package/login/components/login/login.component.d.ts +7 -3
- package/marketing/marketing.module.d.ts +1 -1
- package/order/order.module.d.ts +1 -1
- package/package.json +2 -2
- package/react/react-hooks/use-query.d.ts +8 -0
- package/react/register-react-data-table-component.d.ts +4 -4
- package/settings/settings.module.d.ts +1 -1
- package/static/styles/global/_overrides.scss +4 -0
- package/static/theme.min.css +1 -1
|
@@ -5994,6 +5994,10 @@ function addCustomFields(documentNode, customFields) {
|
|
|
5994
5994
|
// so we treat it as an alias
|
|
5995
5995
|
entityType = 'Address';
|
|
5996
5996
|
}
|
|
5997
|
+
if (entityType === 'Country') {
|
|
5998
|
+
// Country is an alias of Region
|
|
5999
|
+
entityType = 'Region';
|
|
6000
|
+
}
|
|
5997
6001
|
const customFieldsForType = customFields[entityType];
|
|
5998
6002
|
if (customFieldsForType && customFieldsForType.length) {
|
|
5999
6003
|
fragmentDef.selectionSet.selections.push({
|
|
@@ -7143,7 +7147,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.2", ngImpor
|
|
|
7143
7147
|
}], ctorParameters: function () { return [{ type: AlertsService }]; } });
|
|
7144
7148
|
|
|
7145
7149
|
// Auto-generated by the set-version.js script.
|
|
7146
|
-
const ADMIN_UI_VERSION = '2.1.
|
|
7150
|
+
const ADMIN_UI_VERSION = '2.1.3';
|
|
7147
7151
|
|
|
7148
7152
|
/* eslint-disable @angular-eslint/directive-selector */
|
|
7149
7153
|
class FormFieldControlDirective {
|
|
@@ -13741,11 +13745,11 @@ class TabbedCustomFieldsComponent {
|
|
|
13741
13745
|
.map(([tabName, customFields]) => ({ tabName, customFields }));
|
|
13742
13746
|
}
|
|
13743
13747
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.2", ngImport: i0, type: TabbedCustomFieldsComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
13744
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.2", type: TabbedCustomFieldsComponent, selector: "vdr-tabbed-custom-fields", inputs: { entityName: "entityName", customFields: "customFields", customFieldsFormGroup: "customFieldsFormGroup", readonly: "readonly", compact: "compact", showLabel: "showLabel" }, ngImport: i0, template: "<ng-container *ngIf=\"1 < tabbedCustomFields.length; else singleGroup\">\r\n <clr-tabs>\r\n <clr-tab *ngFor=\"let group of tabbedCustomFields\">\r\n <button clrTabLink>\r\n {{\r\n group.tabName === defaultTabName\r\n ? ('common.general' | translate)\r\n : (group.tabName | translate)\r\n }}\r\n </button>\r\n <clr-tab-content *clrIfActive>\r\n <div class=\"mt-2 form-grid\">\r\n <ng-container *ngFor=\"let customField of group.customFields\">\r\n <vdr-custom-field-control\r\n *ngIf=\"customFieldIsSet(customField.name)\"\r\n [entityName]=\"entityName\"\r\n [class.form-grid-span]=\"componentShouldSpanGrid(customField)\"\r\n [customFieldsFormGroup]=\"customFieldsFormGroup\"\r\n [customField]=\"customField\"\r\n [readonly]=\"readonly\"\r\n [compact]=\"compact\"\r\n [showLabel]=\"showLabel\"\r\n ></vdr-custom-field-control>\r\n </ng-container>\r\n </div>\r\n </clr-tab-content>\r\n </clr-tab>\r\n </clr-tabs>\r\n</ng-container>\r\n<ng-template #singleGroup>\r\n <div class=\"form-grid\">\r\n <ng-container *ngFor=\"let customField of tabbedCustomFields[0]?.customFields\">\r\n <vdr-custom-field-control\r\n *ngIf=\"customFieldIsSet(customField.name)\"\r\n [entityName]=\"entityName\"\r\n [class.form-grid-span]=\"componentShouldSpanGrid(customField)\"\r\n [customFieldsFormGroup]=\"customFieldsFormGroup\"\r\n [customField]=\"customField\"\r\n [readonly]=\"readonly\"\r\n [compact]=\"compact\"\r\n [showLabel]=\"showLabel\"\r\n ></vdr-custom-field-control>\r\n </ng-container>\r\n </div>\r\n</ng-template>\r\n", styles: [":host{display:contents}
|
|
13748
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.2", type: TabbedCustomFieldsComponent, selector: "vdr-tabbed-custom-fields", inputs: { entityName: "entityName", customFields: "customFields", customFieldsFormGroup: "customFieldsFormGroup", readonly: "readonly", compact: "compact", showLabel: "showLabel" }, ngImport: i0, template: "<ng-container *ngIf=\"1 < tabbedCustomFields.length; else singleGroup\">\r\n <clr-tabs>\r\n <clr-tab *ngFor=\"let group of tabbedCustomFields\">\r\n <button clrTabLink>\r\n {{\r\n group.tabName === defaultTabName\r\n ? ('common.general' | translate)\r\n : (group.tabName | translate)\r\n }}\r\n </button>\r\n <clr-tab-content *clrIfActive>\r\n <div class=\"mt-2 form-grid\">\r\n <ng-container *ngFor=\"let customField of group.customFields\">\r\n <vdr-custom-field-control\r\n *ngIf=\"customFieldIsSet(customField.name)\"\r\n [entityName]=\"entityName\"\r\n [class.form-grid-span]=\"componentShouldSpanGrid(customField)\"\r\n [customFieldsFormGroup]=\"customFieldsFormGroup\"\r\n [customField]=\"customField\"\r\n [readonly]=\"readonly\"\r\n [compact]=\"compact\"\r\n [showLabel]=\"showLabel\"\r\n ></vdr-custom-field-control>\r\n </ng-container>\r\n </div>\r\n </clr-tab-content>\r\n </clr-tab>\r\n </clr-tabs>\r\n</ng-container>\r\n<ng-template #singleGroup>\r\n <div class=\"form-grid\">\r\n <ng-container *ngFor=\"let customField of tabbedCustomFields[0]?.customFields\">\r\n <vdr-custom-field-control\r\n *ngIf=\"customFieldIsSet(customField.name)\"\r\n [entityName]=\"entityName\"\r\n [class.form-grid-span]=\"componentShouldSpanGrid(customField)\"\r\n [customFieldsFormGroup]=\"customFieldsFormGroup\"\r\n [customField]=\"customField\"\r\n [readonly]=\"readonly\"\r\n [compact]=\"compact\"\r\n [showLabel]=\"showLabel\"\r\n ></vdr-custom-field-control>\r\n </ng-container>\r\n </div>\r\n</ng-template>\r\n", styles: [":host{display:contents}\n"], dependencies: [{ kind: "directive", type: i1$3.ClrIfActive, selector: "[clrIfActive]", inputs: ["clrIfActive"], outputs: ["clrIfActiveChange"] }, { kind: "component", type: i1$3.ClrTabContent, selector: "clr-tab-content", inputs: ["id"] }, { kind: "component", type: i1$3.ClrTab, selector: "clr-tab" }, { kind: "component", type: i1$3.ClrTabs, selector: "clr-tabs", inputs: ["clrLayout"] }, { kind: "directive", type: i1$3.ClrTabLink, selector: "[clrTabLink]", inputs: ["id", "clrTabLinkInOverflow"] }, { kind: "directive", type: i1$3.ÇlrTabsWillyWonka, selector: "clr-tabs" }, { kind: "directive", type: i1$3.ÇlrActiveOompaLoompa, selector: "[clrTabLink], clr-tab-content" }, { kind: "directive", type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: CustomFieldControlComponent, selector: "vdr-custom-field-control", inputs: ["entityName", "customFieldsFormGroup", "customField", "compact", "showLabel", "readonly"] }, { kind: "pipe", type: i3.TranslatePipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
13745
13749
|
}
|
|
13746
13750
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.2", ngImport: i0, type: TabbedCustomFieldsComponent, decorators: [{
|
|
13747
13751
|
type: Component,
|
|
13748
|
-
args: [{ selector: 'vdr-tabbed-custom-fields', changeDetection: ChangeDetectionStrategy.OnPush, template: "<ng-container *ngIf=\"1 < tabbedCustomFields.length; else singleGroup\">\r\n <clr-tabs>\r\n <clr-tab *ngFor=\"let group of tabbedCustomFields\">\r\n <button clrTabLink>\r\n {{\r\n group.tabName === defaultTabName\r\n ? ('common.general' | translate)\r\n : (group.tabName | translate)\r\n }}\r\n </button>\r\n <clr-tab-content *clrIfActive>\r\n <div class=\"mt-2 form-grid\">\r\n <ng-container *ngFor=\"let customField of group.customFields\">\r\n <vdr-custom-field-control\r\n *ngIf=\"customFieldIsSet(customField.name)\"\r\n [entityName]=\"entityName\"\r\n [class.form-grid-span]=\"componentShouldSpanGrid(customField)\"\r\n [customFieldsFormGroup]=\"customFieldsFormGroup\"\r\n [customField]=\"customField\"\r\n [readonly]=\"readonly\"\r\n [compact]=\"compact\"\r\n [showLabel]=\"showLabel\"\r\n ></vdr-custom-field-control>\r\n </ng-container>\r\n </div>\r\n </clr-tab-content>\r\n </clr-tab>\r\n </clr-tabs>\r\n</ng-container>\r\n<ng-template #singleGroup>\r\n <div class=\"form-grid\">\r\n <ng-container *ngFor=\"let customField of tabbedCustomFields[0]?.customFields\">\r\n <vdr-custom-field-control\r\n *ngIf=\"customFieldIsSet(customField.name)\"\r\n [entityName]=\"entityName\"\r\n [class.form-grid-span]=\"componentShouldSpanGrid(customField)\"\r\n [customFieldsFormGroup]=\"customFieldsFormGroup\"\r\n [customField]=\"customField\"\r\n [readonly]=\"readonly\"\r\n [compact]=\"compact\"\r\n [showLabel]=\"showLabel\"\r\n ></vdr-custom-field-control>\r\n </ng-container>\r\n </div>\r\n</ng-template>\r\n", styles: [":host{display:contents}
|
|
13752
|
+
args: [{ selector: 'vdr-tabbed-custom-fields', changeDetection: ChangeDetectionStrategy.OnPush, template: "<ng-container *ngIf=\"1 < tabbedCustomFields.length; else singleGroup\">\r\n <clr-tabs>\r\n <clr-tab *ngFor=\"let group of tabbedCustomFields\">\r\n <button clrTabLink>\r\n {{\r\n group.tabName === defaultTabName\r\n ? ('common.general' | translate)\r\n : (group.tabName | translate)\r\n }}\r\n </button>\r\n <clr-tab-content *clrIfActive>\r\n <div class=\"mt-2 form-grid\">\r\n <ng-container *ngFor=\"let customField of group.customFields\">\r\n <vdr-custom-field-control\r\n *ngIf=\"customFieldIsSet(customField.name)\"\r\n [entityName]=\"entityName\"\r\n [class.form-grid-span]=\"componentShouldSpanGrid(customField)\"\r\n [customFieldsFormGroup]=\"customFieldsFormGroup\"\r\n [customField]=\"customField\"\r\n [readonly]=\"readonly\"\r\n [compact]=\"compact\"\r\n [showLabel]=\"showLabel\"\r\n ></vdr-custom-field-control>\r\n </ng-container>\r\n </div>\r\n </clr-tab-content>\r\n </clr-tab>\r\n </clr-tabs>\r\n</ng-container>\r\n<ng-template #singleGroup>\r\n <div class=\"form-grid\">\r\n <ng-container *ngFor=\"let customField of tabbedCustomFields[0]?.customFields\">\r\n <vdr-custom-field-control\r\n *ngIf=\"customFieldIsSet(customField.name)\"\r\n [entityName]=\"entityName\"\r\n [class.form-grid-span]=\"componentShouldSpanGrid(customField)\"\r\n [customFieldsFormGroup]=\"customFieldsFormGroup\"\r\n [customField]=\"customField\"\r\n [readonly]=\"readonly\"\r\n [compact]=\"compact\"\r\n [showLabel]=\"showLabel\"\r\n ></vdr-custom-field-control>\r\n </ng-container>\r\n </div>\r\n</ng-template>\r\n", styles: [":host{display:contents}\n"] }]
|
|
13749
13753
|
}], propDecorators: { entityName: [{
|
|
13750
13754
|
type: Input
|
|
13751
13755
|
}], customFields: [{
|
|
@@ -18681,11 +18685,11 @@ class RadioCardFieldsetComponent {
|
|
|
18681
18685
|
this.focussedId = item && this.idFn(item);
|
|
18682
18686
|
}
|
|
18683
18687
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.2", ngImport: i0, type: RadioCardFieldsetComponent, deps: [{ token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
18684
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.2", type: RadioCardFieldsetComponent, selector: "vdr-radio-card-fieldset", inputs: { selectedItemId: "selectedItemId", idFn: "idFn" }, outputs: { selectItem: "selectItem" }, usesOnChanges: true, ngImport: i0, template: `<fieldset><ng-content></ng-content></fieldset> `, isInline: true, styles: ["fieldset{display:flex;align-items:flex-start}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
18688
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.2", type: RadioCardFieldsetComponent, selector: "vdr-radio-card-fieldset", inputs: { selectedItemId: "selectedItemId", idFn: "idFn" }, outputs: { selectItem: "selectItem" }, usesOnChanges: true, ngImport: i0, template: `<fieldset><ng-content></ng-content></fieldset> `, isInline: true, styles: ["fieldset{display:flex;align-items:flex-start;overflow-x:auto}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
18685
18689
|
}
|
|
18686
18690
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.2", ngImport: i0, type: RadioCardFieldsetComponent, decorators: [{
|
|
18687
18691
|
type: Component,
|
|
18688
|
-
args: [{ selector: 'vdr-radio-card-fieldset', template: `<fieldset><ng-content></ng-content></fieldset> `, changeDetection: ChangeDetectionStrategy.OnPush, styles: ["fieldset{display:flex;align-items:flex-start}\n"] }]
|
|
18692
|
+
args: [{ selector: 'vdr-radio-card-fieldset', template: `<fieldset><ng-content></ng-content></fieldset> `, changeDetection: ChangeDetectionStrategy.OnPush, styles: ["fieldset{display:flex;align-items:flex-start;overflow-x:auto}\n"] }]
|
|
18689
18693
|
}], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }]; }, propDecorators: { selectedItemId: [{
|
|
18690
18694
|
type: Input
|
|
18691
18695
|
}], idFn: [{
|
|
@@ -21529,6 +21533,8 @@ function addActionBarItem(config) {
|
|
|
21529
21533
|
*
|
|
21530
21534
|
* @example
|
|
21531
21535
|
* ```ts title="providers.ts"
|
|
21536
|
+
* import { addNavMenuSection } from '\@vendure/admin-ui/core';
|
|
21537
|
+
*
|
|
21532
21538
|
* export default [
|
|
21533
21539
|
* addNavMenuSection({
|
|
21534
21540
|
* id: 'reports',
|
|
@@ -21564,6 +21570,8 @@ function addNavMenuSection(config, before) {
|
|
|
21564
21570
|
*
|
|
21565
21571
|
* @example
|
|
21566
21572
|
* ```ts title="providers.ts"
|
|
21573
|
+
* import { addNavMenuItem } from '\@vendure/admin-ui/core';
|
|
21574
|
+
*
|
|
21567
21575
|
* export default [
|
|
21568
21576
|
* addNavMenuItem({
|
|
21569
21577
|
* id: 'reviews',
|
|
@@ -21573,7 +21581,7 @@ function addNavMenuSection(config, before) {
|
|
|
21573
21581
|
* },
|
|
21574
21582
|
* 'marketing'),
|
|
21575
21583
|
* ];
|
|
21576
|
-
*
|
|
21584
|
+
* ```
|
|
21577
21585
|
*
|
|
21578
21586
|
* @docsCategory nav-menu
|
|
21579
21587
|
*/
|
|
@@ -22132,6 +22140,14 @@ function registerRouteComponent(options) {
|
|
|
22132
22140
|
const { query, entityKey, variables, getBreadcrumbs } = options;
|
|
22133
22141
|
const breadcrumbSubject$ = new BehaviorSubject(options.breadcrumb ?? '');
|
|
22134
22142
|
const titleSubject$ = new BehaviorSubject(options.title);
|
|
22143
|
+
if (getBreadcrumbs != null && (query == null || entityKey == null)) {
|
|
22144
|
+
console.error([
|
|
22145
|
+
`[${options.path ?? 'custom'} route] When using the "getBreadcrumbs" option, the "query" and "entityKey" options must also be provided.`,
|
|
22146
|
+
``,
|
|
22147
|
+
`Alternatively, use the "breadcrumb" option instead, or use the "PageMetadataService" inside your Angular component`,
|
|
22148
|
+
`or the "usePageMetadata" React hook to set the breadcrumb.`,
|
|
22149
|
+
].join('\n'));
|
|
22150
|
+
}
|
|
22135
22151
|
const resolveFn = query && entityKey
|
|
22136
22152
|
? createBaseDetailResolveFn({
|
|
22137
22153
|
query,
|
|
@@ -22157,7 +22173,7 @@ function registerRouteComponent(options) {
|
|
|
22157
22173
|
data: {
|
|
22158
22174
|
breadcrumb: breadcrumbSubject$,
|
|
22159
22175
|
...(options.routeConfig?.data ?? {}),
|
|
22160
|
-
...(getBreadcrumbs
|
|
22176
|
+
...(getBreadcrumbs && query && entityKey
|
|
22161
22177
|
? {
|
|
22162
22178
|
breadcrumb: data => data.detail.entity.pipe(map((entity) => getBreadcrumbs(entity))),
|
|
22163
22179
|
}
|