@vendure/admin-ui 2.0.2 → 2.0.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/components/product-variant-list/product-variant-list-bulk-actions.d.ts +6 -0
- package/catalog/public_api.d.ts +1 -1
- package/core/common/base-detail.component.d.ts +1 -0
- package/core/common/component-registry-types.d.ts +2 -2
- package/core/common/generated-types.d.ts +13 -0
- package/core/common/version.d.ts +1 -1
- package/core/components/theme-switcher/theme-switcher.component.d.ts +1 -0
- package/core/data/definitions/product-definitions.d.ts +1 -0
- package/core/data/providers/product-data.service.d.ts +1 -0
- package/core/shared/components/data-table-filters/data-table-filters.component.d.ts +1 -0
- package/core/shared/components/dropdown/dropdown-menu.component.d.ts +2 -0
- package/core/shared/components/dropdown/dropdown.component.d.ts +1 -1
- package/core/shared/components/rich-text-editor/prosemirror/prosemirror.service.d.ts +6 -0
- package/core/shared/dynamic-form-inputs/customer-group-form-input/customer-group-form-input.component.d.ts +5 -2
- package/core/shared/dynamic-form-inputs/product-multi-selector-form-input/product-multi-selector-form-input.component.d.ts +4 -2
- package/core/shared/dynamic-form-inputs/product-selector-form-input/product-selector-form-input.component.d.ts +8 -5
- package/core/shared/dynamic-form-inputs/relation-form-input/asset/relation-asset-input.component.d.ts +1 -4
- package/core/shared/dynamic-form-inputs/relation-form-input/customer/relation-customer-input.component.d.ts +0 -1
- package/core/shared/shared.module.d.ts +2 -1
- package/esm2022/catalog/catalog.module.mjs +5 -1
- package/esm2022/catalog/components/asset-list/asset-list.component.mjs +3 -3
- package/esm2022/catalog/components/assign-products-to-channel-dialog/assign-products-to-channel-dialog.component.mjs +11 -14
- package/esm2022/catalog/components/product-list/product-list.component.mjs +3 -3
- package/esm2022/catalog/components/product-options-editor/product-options-editor.component.mjs +1 -1
- package/esm2022/catalog/components/product-variant-detail/product-variant-detail.component.mjs +4 -5
- package/esm2022/catalog/components/product-variant-list/product-variant-list-bulk-actions.mjs +92 -0
- package/esm2022/catalog/components/product-variant-list/product-variant-list.component.mjs +5 -5
- package/esm2022/catalog/public_api.mjs +2 -2
- package/esm2022/core/common/base-detail.component.mjs +3 -3
- package/esm2022/core/common/base-list.component.mjs +2 -2
- package/esm2022/core/common/component-registry-types.mjs +1 -1
- package/esm2022/core/common/generated-types.mjs +2 -1
- package/esm2022/core/common/title-setter.mjs +1 -1
- package/esm2022/core/common/version.mjs +2 -2
- package/esm2022/core/components/base-nav/base-nav.component.mjs +1 -1
- package/esm2022/core/components/main-nav/main-nav.component.mjs +2 -2
- package/esm2022/core/components/theme-switcher/theme-switcher.component.mjs +15 -5
- package/esm2022/core/components/user-menu/user-menu.component.mjs +3 -3
- package/esm2022/core/data/definitions/product-definitions.mjs +9 -1
- package/esm2022/core/data/providers/interceptor.mjs +1 -1
- package/esm2022/core/data/providers/product-data.service.mjs +7 -2
- package/esm2022/core/data/utils/transform-relation-custom-field-inputs.mjs +2 -2
- package/esm2022/core/providers/bulk-action-registry/bulk-action-types.mjs +1 -1
- package/esm2022/core/providers/custom-field-component/custom-field-component.service.mjs +1 -1
- package/esm2022/core/providers/data-table/data-table-filter-collection.mjs +2 -2
- package/esm2022/core/providers/local-storage/local-storage.service.mjs +1 -1
- package/esm2022/core/providers/page/page.service.mjs +1 -1
- package/esm2022/core/shared/components/action-bar-items/action-bar-items.component.mjs +1 -1
- package/esm2022/core/shared/components/assign-to-channel-dialog/assign-to-channel-dialog.component.mjs +1 -1
- package/esm2022/core/shared/components/chip/chip.component.mjs +2 -2
- package/esm2022/core/shared/components/currency-code-selector/currency-code-selector.component.mjs +1 -1
- package/esm2022/core/shared/components/data-table/data-table.component.mjs +1 -1
- package/esm2022/core/shared/components/data-table-filters/data-table-filters.component.mjs +24 -15
- package/esm2022/core/shared/components/dropdown/dropdown-menu.component.mjs +65 -24
- package/esm2022/core/shared/components/dropdown/dropdown.component.mjs +1 -1
- package/esm2022/core/shared/components/facet-value-selector/facet-value-selector.component.mjs +3 -3
- package/esm2022/core/shared/components/language-code-selector/language-code-selector.component.mjs +1 -1
- package/esm2022/core/shared/components/rich-text-editor/prosemirror/custom-nodes.mjs +4 -3
- package/esm2022/core/shared/components/rich-text-editor/prosemirror/prosemirror.service.mjs +16 -3
- package/esm2022/core/shared/components/tabbed-custom-fields/tabbed-custom-fields.component.mjs +3 -1
- package/esm2022/core/shared/dynamic-form-inputs/customer-group-form-input/customer-group-form-input.component.mjs +7 -4
- package/esm2022/core/shared/dynamic-form-inputs/dynamic-form-input/dynamic-form-input.component.mjs +9 -8
- package/esm2022/core/shared/dynamic-form-inputs/product-multi-selector-form-input/product-multi-selector-form-input.component.mjs +3 -2
- package/esm2022/core/shared/dynamic-form-inputs/product-selector-form-input/product-selector-form-input.component.mjs +10 -5
- 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 +14 -15
- package/esm2022/core/shared/dynamic-form-inputs/relation-form-input/customer/relation-customer-input.component.mjs +1 -3
- package/esm2022/core/shared/dynamic-form-inputs/relation-form-input/product/relation-product-input.component.mjs +3 -3
- package/esm2022/core/shared/dynamic-form-inputs/relation-form-input/product-variant/relation-product-variant-input.component.mjs +3 -3
- package/esm2022/core/shared/dynamic-form-inputs/relation-form-input/relation-card/relation-card.component.mjs +3 -3
- package/esm2022/core/shared/dynamic-form-inputs/relation-form-input/relation-form-input.component.mjs +2 -2
- package/esm2022/core/shared/pipes/state-i18n-token.pipe.mjs +1 -1
- package/esm2022/core/shared/shared.module.mjs +9 -4
- package/esm2022/customer/components/customer-detail/customer-detail.component.mjs +27 -27
- package/esm2022/customer/components/customer-list/customer-list.component.mjs +24 -24
- package/esm2022/customer/customer.module.mjs +9 -2
- package/esm2022/customer/customer.routes.mjs +1 -1
- package/esm2022/dashboard/components/dashboard/dashboard.component.mjs +1 -1
- package/esm2022/dashboard/default-widgets.mjs +2 -1
- package/esm2022/dashboard/widgets/order-chart-widget/order-chart-widget.component.mjs +12 -12
- package/esm2022/marketing/marketing.module.mjs +1 -1
- package/esm2022/order/components/order-detail/order-detail.component.mjs +8 -8
- package/esm2022/order/components/order-list/order-list.component.mjs +9 -2
- package/esm2022/order/components/order-table/order-table.component.mjs +3 -3
- package/esm2022/order/order.module.mjs +1 -1
- package/esm2022/order/order.routes.mjs +1 -1
- package/esm2022/settings/components/shipping-method-detail/shipping-method-detail.component.mjs +3 -3
- package/esm2022/settings/components/tax-rate-detail/tax-rate-detail.component.mjs +8 -8
- package/esm2022/settings/settings.module.mjs +1 -1
- package/fesm2022/vendure-admin-ui-catalog.mjs +109 -75
- package/fesm2022/vendure-admin-ui-catalog.mjs.map +1 -1
- package/fesm2022/vendure-admin-ui-core.mjs +190 -89
- package/fesm2022/vendure-admin-ui-core.mjs.map +1 -1
- package/fesm2022/vendure-admin-ui-customer.mjs +56 -49
- package/fesm2022/vendure-admin-ui-customer.mjs.map +1 -1
- package/fesm2022/vendure-admin-ui-dashboard.mjs +12 -11
- package/fesm2022/vendure-admin-ui-dashboard.mjs.map +1 -1
- package/fesm2022/vendure-admin-ui-marketing.mjs.map +1 -1
- package/fesm2022/vendure-admin-ui-order.mjs +17 -10
- package/fesm2022/vendure-admin-ui-order.mjs.map +1 -1
- package/fesm2022/vendure-admin-ui-settings.mjs +9 -9
- package/fesm2022/vendure-admin-ui-settings.mjs.map +1 -1
- package/package.json +19 -19
- package/static/i18n-messages/cs.json +772 -770
- package/static/i18n-messages/de.json +773 -771
- package/static/i18n-messages/en.json +773 -771
- package/static/i18n-messages/es.json +773 -771
- package/static/i18n-messages/fr.json +773 -771
- package/static/i18n-messages/it.json +773 -771
- package/static/i18n-messages/pl.json +773 -771
- package/static/i18n-messages/pt_BR.json +773 -771
- package/static/i18n-messages/pt_PT.json +773 -771
- package/static/i18n-messages/ru.json +773 -771
- package/static/i18n-messages/uk.json +773 -771
- package/static/i18n-messages/zh_Hans.json +773 -771
- package/static/i18n-messages/zh_Hant.json +773 -771
- package/static/styles/global/_buttons.scss +63 -49
- package/static/styles/global/_forms.scss +5 -1
- package/static/styles/theme/default.scss +2 -0
- package/static/theme.min.css +1 -1
- package/catalog/components/product-variant-list/product-list-bulk-actions.d.ts +0 -3
- package/esm2022/catalog/components/product-variant-list/product-list-bulk-actions.mjs +0 -55
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
import { marker as _ } from '@biesbjerg/ngx-translate-extract-marker';
|
|
2
|
-
import { DataService, DeletionResult, ModalService, NotificationService, Permission, } from '@vendure/admin-ui/core';
|
|
3
|
-
import { unique } from '@vendure/common/lib/unique';
|
|
4
|
-
import { EMPTY } from 'rxjs';
|
|
5
|
-
import { switchMap } from 'rxjs/operators';
|
|
6
|
-
export const deleteProductVariantsBulkAction = {
|
|
7
|
-
location: 'product-list',
|
|
8
|
-
label: _('common.delete'),
|
|
9
|
-
icon: 'trash',
|
|
10
|
-
iconClass: 'is-danger',
|
|
11
|
-
requiresPermission: userPermissions => userPermissions.includes(Permission.DeleteProduct) ||
|
|
12
|
-
userPermissions.includes(Permission.DeleteCatalog),
|
|
13
|
-
onClick: ({ injector, selection, hostComponent, clearSelection }) => {
|
|
14
|
-
const modalService = injector.get(ModalService);
|
|
15
|
-
const dataService = injector.get(DataService);
|
|
16
|
-
const notificationService = injector.get(NotificationService);
|
|
17
|
-
modalService
|
|
18
|
-
.dialog({
|
|
19
|
-
title: _('catalog.confirm-bulk-delete-products'),
|
|
20
|
-
translationVars: {
|
|
21
|
-
count: selection.length,
|
|
22
|
-
},
|
|
23
|
-
buttons: [
|
|
24
|
-
{ type: 'secondary', label: _('common.cancel') },
|
|
25
|
-
{ type: 'danger', label: _('common.delete'), returnValue: true },
|
|
26
|
-
],
|
|
27
|
-
})
|
|
28
|
-
.pipe(switchMap(response => response
|
|
29
|
-
? dataService.product.deleteProducts(unique(selection.map(p => p.productId)))
|
|
30
|
-
: EMPTY))
|
|
31
|
-
.subscribe(result => {
|
|
32
|
-
let deleted = 0;
|
|
33
|
-
const errors = [];
|
|
34
|
-
for (const item of result.deleteProducts) {
|
|
35
|
-
if (item.result === DeletionResult.DELETED) {
|
|
36
|
-
deleted++;
|
|
37
|
-
}
|
|
38
|
-
else if (item.message) {
|
|
39
|
-
errors.push(item.message);
|
|
40
|
-
}
|
|
41
|
-
}
|
|
42
|
-
if (0 < deleted) {
|
|
43
|
-
notificationService.success(_('catalog.notify-bulk-delete-products-success'), {
|
|
44
|
-
count: deleted,
|
|
45
|
-
});
|
|
46
|
-
}
|
|
47
|
-
if (0 < errors.length) {
|
|
48
|
-
notificationService.error(errors.join('\n'));
|
|
49
|
-
}
|
|
50
|
-
hostComponent.refresh();
|
|
51
|
-
clearSelection();
|
|
52
|
-
});
|
|
53
|
-
},
|
|
54
|
-
};
|
|
55
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicHJvZHVjdC1saXN0LWJ1bGstYWN0aW9ucy5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uL3NyYy9saWIvY2F0YWxvZy9zcmMvY29tcG9uZW50cy9wcm9kdWN0LXZhcmlhbnQtbGlzdC9wcm9kdWN0LWxpc3QtYnVsay1hY3Rpb25zLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sRUFBRSxNQUFNLElBQUksQ0FBQyxFQUFFLE1BQU0seUNBQXlDLENBQUM7QUFDdEUsT0FBTyxFQUVILFdBQVcsRUFDWCxjQUFjLEVBQ2QsWUFBWSxFQUNaLG1CQUFtQixFQUNuQixVQUFVLEdBQ2IsTUFBTSx3QkFBd0IsQ0FBQztBQUNoQyxPQUFPLEVBQUUsTUFBTSxFQUFFLE1BQU0sNEJBQTRCLENBQUM7QUFDcEQsT0FBTyxFQUFFLEtBQUssRUFBRSxNQUFNLE1BQU0sQ0FBQztBQUM3QixPQUFPLEVBQUUsU0FBUyxFQUFFLE1BQU0sZ0JBQWdCLENBQU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6IF8oJ2NvbW1vbi5kZWxldGUnKSwgcmV0dXJuVmFsdWU6IHRydWUgfSxcclxuICAgICAgICAgICAgICAgIF0sXHJcbiAgICAgICAgICAgIH0pXHJcbiAgICAgICAgICAgIC5waXBlKFxyXG4gICAgICAgICAgICAgICAgc3dpdGNoTWFwKHJlc3BvbnNlID0+XHJcbiAgICAgICAgICAgICAgICAgICAgcmVzcG9uc2VcclxuICAgICAgICAgICAgICAgICAgICAgICAgPyBkYXRhU2VydmljZS5wcm9kdWN0LmRlbGV0ZVByb2R1Y3RzKHVuaXF1ZShzZWxlY3Rpb24ubWFwKHAgPT4gcC5wcm9kdWN0SWQpKSlcclxuICAgICAgICAgICAgICAgICAgICAgICAgOiBFTVBUWSxcclxuICAgICAgICAgICAgICAgICksXHJcbiAgICAgICAgICAgIClcclxuICAgICAgICAgICAgLnN1YnNjcmliZShyZXN1bHQgPT4ge1xyXG4gICAgICAgICAgICAgICAgbGV0IGRlbGV0ZWQgPSAwO1xyXG4gICAgICAgICAgICAgICAgY29uc3QgZXJyb3JzOiBzdHJpbmdbXSA9IFtdO1xyXG4gICAgICAgICAgICAgICAgZm9yIChjb25zdCBpdGVtIG9mIHJlc3VsdC5kZWxldGVQcm9kdWN0cykge1xyXG4gICAgICAgICAgICAgICAgICAgIGlmIChpdGVtLnJlc3VsdCA9PT0gRGVsZXRpb25SZXN1bHQuREVMRVRFRCkge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICBkZWxldGVkKys7XHJcbiAgICAgICAgICAgICAgICAgICAgfSBlbHNlIGlmIChpdGVtLm1lc3NhZ2UpIHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgZXJyb3JzLnB1c2goaXRlbS5tZXNzYWdlKTtcclxuICAgICAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgICAgICBpZiAoMCA8IGRlbGV0ZWQpIHtcclxuICAgICAgICAgICAgICAgICAgICBub3RpZmljYXRpb25TZXJ2aWNlLnN1Y2Nlc3MoXygnY2F0YWxvZy5ub3RpZnktYnVsay1kZWxldGUtcHJvZHVjdHMtc3VjY2VzcycpLCB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGNvdW50OiBkZWxldGVkLFxyXG4gICAgICAgICAgICAgICAgICAgIH0pO1xyXG4gICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgaWYgKDAgPCBlcnJvcnMubGVuZ3RoKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgbm90aWZpY2F0aW9uU2VydmljZS5lcnJvcihlcnJvcnMuam9pbignXFxuJykpO1xyXG4gICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgaG9zdENvbXBvbmVudC5yZWZyZXNoKCk7XHJcbiAgICAgICAgICAgICAgICBjbGVhclNlbGVjdGlvbigpO1xyXG4gICAgICAgICAgICB9KTtcclxuICAgIH0sXHJcbn07XHJcbiJdfQ==
|