@vendure/admin-ui 2.1.0-next.4 → 2.1.0-next.6
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 +3 -5
- package/catalog/components/facet-detail/facet-detail.component.d.ts +32 -21
- package/catalog/components/product-list/product-list.component.d.ts +1 -1
- package/catalog/components/product-variant-list/product-variant-list-bulk-actions.d.ts +1 -2
- package/catalog/components/product-variant-list/product-variant-list.component.d.ts +1 -1
- package/catalog/providers/product-detail/product-detail.service.d.ts +1 -1
- package/catalog/public_api.d.ts +0 -3
- package/core/common/base-detail.component.d.ts +2 -2
- package/core/common/base-entity-resolver.d.ts +1 -1
- package/core/common/generated-types.d.ts +142 -125
- package/core/common/version.d.ts +1 -1
- package/core/components/base-nav/base-nav.component.d.ts +4 -2
- package/core/data/providers/data.service.d.ts +3 -3
- package/core/data/query-result.d.ts +1 -1
- package/core/extension/add-action-bar-item.d.ts +8 -15
- package/core/extension/add-nav-menu-item.d.ts +15 -23
- package/core/extension/register-bulk-action.d.ts +24 -28
- package/core/extension/register-custom-detail-component.d.ts +45 -0
- package/core/extension/register-data-table-component.d.ts +3 -2
- package/core/extension/register-form-input-component.d.ts +14 -13
- package/core/extension/register-history-entry-component.d.ts +55 -0
- package/core/extension/register-page-tab.d.ts +23 -0
- package/core/extension/register-route-component.d.ts +48 -2
- package/core/providers/bulk-action-registry/bulk-action-types.d.ts +2 -2
- package/core/providers/modal/modal.service.d.ts +1 -1
- package/core/providers/modal/modal.types.d.ts +3 -3
- package/core/providers/nav-builder/nav-builder-types.d.ts +29 -4
- package/core/providers/nav-builder/nav-builder.service.d.ts +3 -2
- package/core/providers/notification/notification.service.d.ts +4 -4
- package/core/providers/page/page.service.d.ts +1 -23
- package/core/public_api.d.ts +1 -0
- package/core/shared/components/action-bar-items/action-bar-items.component.d.ts +8 -3
- package/core/shared/components/asset-gallery/asset-gallery.component.d.ts +2 -1
- package/core/shared/components/asset-picker-dialog/asset-picker-dialog.component.d.ts +1 -1
- package/core/shared/components/asset-preview/asset-preview.component.d.ts +9 -1
- package/core/shared/components/asset-preview-dialog/asset-preview-dialog.component.d.ts +2 -0
- package/core/shared/components/data-table-2/data-table2.component.d.ts +1 -1
- package/core/shared/components/extension-host/host-external-frame.d.ts +1 -1
- package/core/shared/components/facet-value-selector/facet-value-selector.component.d.ts +1 -1
- package/core/shared/pipes/duration.pipe.d.ts +1 -1
- package/core/shared/pipes/file-size.pipe.d.ts +1 -1
- package/esm2022/catalog/catalog.module.mjs +30 -39
- package/esm2022/catalog/catalog.routes.mjs +15 -26
- package/esm2022/catalog/components/asset-detail/asset-detail.component.mjs +1 -1
- package/esm2022/catalog/components/asset-list/asset-list.component.mjs +1 -1
- package/esm2022/catalog/components/assets/assets.component.mjs +2 -2
- package/esm2022/catalog/components/collection-contents/collection-contents.component.mjs +3 -3
- package/esm2022/catalog/components/facet-detail/facet-detail.component.mjs +71 -46
- package/esm2022/catalog/components/product-variant-list/product-variant-list-bulk-actions.mjs +1 -1
- package/esm2022/catalog/components/product-variant-list/product-variant-list.component.mjs +3 -3
- package/esm2022/catalog/components/product-variant-quick-jump/product-variant-quick-jump.component.mjs +2 -2
- package/esm2022/catalog/public_api.mjs +1 -4
- package/esm2022/core/common/base-detail.component.mjs +3 -3
- package/esm2022/core/common/base-entity-resolver.mjs +3 -3
- package/esm2022/core/common/generated-types.mjs +27 -27
- package/esm2022/core/common/utilities/custom-field-default-value.mjs +3 -3
- package/esm2022/core/common/version.mjs +2 -2
- package/esm2022/core/components/base-nav/base-nav.component.mjs +27 -8
- package/esm2022/core/data/definitions/order-definitions.mjs +2 -1
- package/esm2022/core/data/providers/data.service.mjs +4 -4
- package/esm2022/core/data/query-result.mjs +2 -2
- package/esm2022/core/extension/add-action-bar-item.mjs +9 -16
- package/esm2022/core/extension/add-nav-menu-item.mjs +16 -24
- package/esm2022/core/extension/register-bulk-action.mjs +25 -29
- package/esm2022/core/extension/register-custom-detail-component.mjs +46 -1
- package/esm2022/core/extension/register-data-table-component.mjs +4 -3
- package/esm2022/core/extension/register-form-input-component.mjs +15 -14
- package/esm2022/core/extension/register-history-entry-component.mjs +56 -1
- package/esm2022/core/extension/register-page-tab.mjs +36 -0
- package/esm2022/core/extension/register-route-component.mjs +44 -3
- package/esm2022/core/providers/bulk-action-registry/bulk-action-types.mjs +1 -1
- package/esm2022/core/providers/modal/modal.service.mjs +2 -2
- package/esm2022/core/providers/modal/modal.types.mjs +1 -1
- package/esm2022/core/providers/nav-builder/nav-builder-types.mjs +1 -1
- package/esm2022/core/providers/nav-builder/nav-builder.service.mjs +3 -3
- package/esm2022/core/providers/notification/notification.service.mjs +3 -3
- package/esm2022/core/providers/page/page.service.mjs +2 -36
- package/esm2022/core/public_api.mjs +2 -1
- package/esm2022/core/shared/components/action-bar/action-bar.component.mjs +2 -2
- package/esm2022/core/shared/components/action-bar-items/action-bar-items.component.mjs +32 -15
- package/esm2022/core/shared/components/asset-gallery/asset-gallery.component.mjs +8 -5
- package/esm2022/core/shared/components/asset-picker-dialog/asset-picker-dialog.component.mjs +4 -4
- package/esm2022/core/shared/components/asset-preview/asset-preview.component.mjs +36 -3
- package/esm2022/core/shared/components/asset-preview-dialog/asset-preview-dialog.component.mjs +4 -3
- package/esm2022/core/shared/components/data-table-2/data-table2.component.mjs +2 -2
- package/esm2022/core/shared/components/extension-host/host-external-frame.mjs +2 -2
- package/esm2022/core/shared/components/facet-value-selector/facet-value-selector.component.mjs +2 -2
- package/esm2022/core/shared/components/form-field/form-field.component.mjs +2 -2
- package/esm2022/core/shared/components/page-detail-layout/page-detail-layout.component.mjs +2 -2
- package/esm2022/core/shared/pipes/duration.pipe.mjs +2 -2
- package/esm2022/core/shared/pipes/file-size.pipe.mjs +2 -2
- package/esm2022/order/components/fulfill-order-dialog/fulfill-order-dialog.component.mjs +2 -2
- package/esm2022/order/components/order-data-table/order-data-table.component.mjs +2 -2
- package/esm2022/order/components/order-editor/order-editor.component.mjs +2 -2
- package/esm2022/order/components/order-table/order-table.component.mjs +3 -3
- package/esm2022/react/components/react-custom-column.component.mjs +3 -3
- package/esm2022/react/components/react-custom-detail.component.mjs +3 -3
- package/esm2022/react/components/react-form-input.component.mjs +3 -3
- package/esm2022/react/components/react-route.component.mjs +3 -3
- package/esm2022/react/public_api.mjs +7 -1
- package/esm2022/react/react-components/ActionBar.mjs +26 -0
- package/esm2022/react/react-components/CdsIcon.mjs +30 -0
- package/esm2022/react/react-components/FormField.mjs +28 -0
- package/esm2022/react/react-components/PageBlock.mjs +24 -0
- package/esm2022/react/react-components/PageDetailLayout.mjs +26 -0
- package/esm2022/react/react-hooks/use-detail-component-data.mjs +1 -1
- package/esm2022/react/react-hooks/use-route-params.mjs +39 -0
- package/esm2022/react/register-react-data-table-component.mjs +3 -1
- package/esm2022/react/register-react-route-component.mjs +1 -1
- package/esm2022/settings/components/stock-location-detail/stock-location-detail.component.mjs +137 -0
- package/esm2022/settings/components/stock-location-list/stock-location-list-bulk-actions.mjs +68 -0
- package/esm2022/{catalog → settings}/components/stock-location-list/stock-location-list.component.mjs +1 -1
- package/esm2022/settings/components/tax-category-list/tax-category-list-bulk-actions.mjs +1 -1
- package/esm2022/settings/public_api.mjs +4 -1
- package/esm2022/settings/settings.module.mjs +37 -3
- package/esm2022/settings/settings.routes.mjs +19 -1
- package/esm2022/system/components/job-list/job-list.component.mjs +13 -15
- package/esm2022/system/components/job-state-label/job-state-label.component.mjs +1 -1
- package/fesm2022/vendure-admin-ui-catalog.mjs +118 -379
- package/fesm2022/vendure-admin-ui-catalog.mjs.map +1 -1
- package/fesm2022/vendure-admin-ui-core.mjs +394 -197
- package/fesm2022/vendure-admin-ui-core.mjs.map +1 -1
- package/fesm2022/vendure-admin-ui-order.mjs +8 -8
- package/fesm2022/vendure-admin-ui-order.mjs.map +1 -1
- package/fesm2022/vendure-admin-ui-react.mjs +178 -11
- package/fesm2022/vendure-admin-ui-react.mjs.map +1 -1
- package/fesm2022/vendure-admin-ui-settings.mjs +320 -3
- package/fesm2022/vendure-admin-ui-settings.mjs.map +1 -1
- package/fesm2022/vendure-admin-ui-system.mjs +12 -14
- package/fesm2022/vendure-admin-ui-system.mjs.map +1 -1
- package/package.json +13 -13
- package/react/public_api.d.ts +6 -0
- package/react/react-components/ActionBar.d.ts +23 -0
- package/react/react-components/CdsIcon.d.ts +45 -0
- package/react/react-components/FormField.d.ts +27 -0
- package/react/react-components/PageBlock.d.ts +21 -0
- package/react/react-components/PageDetailLayout.d.ts +23 -0
- package/react/react-hooks/use-detail-component-data.d.ts +2 -2
- package/react/react-hooks/use-route-params.d.ts +22 -0
- package/react/register-react-data-table-component.d.ts +2 -0
- package/react/register-react-route-component.d.ts +6 -0
- package/{catalog → settings}/components/stock-location-list/stock-location-list.component.d.ts +1 -1
- package/settings/public_api.d.ts +3 -0
- package/settings/settings.module.d.ts +5 -3
- package/static/i18n-messages/ar.json +11 -5
- package/static/i18n-messages/cs.json +14 -8
- package/static/i18n-messages/de.json +11 -5
- package/static/i18n-messages/en.json +11 -5
- package/static/i18n-messages/es.json +11 -5
- package/static/i18n-messages/fr.json +12 -6
- package/static/i18n-messages/he.json +11 -5
- package/static/i18n-messages/it.json +11 -5
- package/static/i18n-messages/pl.json +11 -5
- package/static/i18n-messages/pt_BR.json +11 -5
- package/static/i18n-messages/pt_PT.json +18 -12
- package/static/i18n-messages/ru.json +11 -5
- package/static/i18n-messages/uk.json +15 -9
- package/static/i18n-messages/zh_Hans.json +14 -8
- package/static/i18n-messages/zh_Hant.json +14 -8
- package/system/components/job-list/job-list.component.d.ts +6 -8
- package/esm2022/catalog/components/stock-location-detail/stock-location-detail.component.mjs +0 -137
- package/esm2022/catalog/components/stock-location-list/stock-location-list-bulk-actions.mjs +0 -68
- /package/{catalog → settings}/components/stock-location-detail/stock-location-detail.component.d.ts +0 -0
- /package/{catalog → settings}/components/stock-location-list/stock-location-list-bulk-actions.d.ts +0 -0
|
@@ -4,11 +4,11 @@ import * as i1$1 from '@angular/router';
|
|
|
4
4
|
import { ROUTES, RouterModule } from '@angular/router';
|
|
5
5
|
import { marker } from '@biesbjerg/ngx-translate-extract-marker';
|
|
6
6
|
import * as i1 from '@vendure/admin-ui/core';
|
|
7
|
-
import { findTranslation, DeletionResult, BaseDetailComponent, Permission, createUpdatedTranslatable, SelectionManager, getDefaultUiLanguage, BaseEntityResolver, PageComponent, CanDeactivateDetailGuard, DataService, createResolveData, FacetValueSelectorComponent, ASSET_FRAGMENT, TAG_FRAGMENT, TypedBaseDetailComponent, getCustomFieldsDefaults, BaseListComponent, SortOrder, LogicalOperator, AssetPickerDialogComponent, AssetPreviewDialogComponent, DataTable2Component, COLLECTION_FRAGMENT, unicodePatternValidator, getConfigArgValue, encodeConfigArgValue, createBulkDeleteAction, ModalService, NotificationService, createBulkAssignToChannelAction, createBulkRemoveFromChannelAction, TypedBaseListComponent, GetCollectionListDocument, FACET_WITH_VALUES_FRAGMENT, GetFacetDetailDocument, getChannelCodeFromUserStatus, currentChannelIsNotDefault, FACET_WITH_VALUE_LIST_FRAGMENT, GetFacetListDocument, GetStockLocationListDocument, ProductVariantListQueryDocument, PRODUCT_DETAIL_FRAGMENT, isMultiChannel, FacetValueFormInputComponent, ProductListQueryDocument, JobState, GetProductVariantsQuickJumpDocument, GlobalFlag, ProductVariantUpdateMutationDocument,
|
|
7
|
+
import { findTranslation, DeletionResult, BaseDetailComponent, Permission, createUpdatedTranslatable, SelectionManager, getDefaultUiLanguage, BaseEntityResolver, PageComponent, CanDeactivateDetailGuard, DataService, createResolveData, FacetValueSelectorComponent, ASSET_FRAGMENT, TAG_FRAGMENT, TypedBaseDetailComponent, getCustomFieldsDefaults, BaseListComponent, SortOrder, LogicalOperator, AssetPickerDialogComponent, AssetPreviewDialogComponent, DataTable2Component, COLLECTION_FRAGMENT, unicodePatternValidator, getConfigArgValue, encodeConfigArgValue, createBulkDeleteAction, ModalService, NotificationService, createBulkAssignToChannelAction, createBulkRemoveFromChannelAction, TypedBaseListComponent, GetCollectionListDocument, FACET_WITH_VALUES_FRAGMENT, GetFacetDetailDocument, getChannelCodeFromUserStatus, currentChannelIsNotDefault, FACET_WITH_VALUE_LIST_FRAGMENT, GetFacetListDocument, GetStockLocationListDocument, ProductVariantListQueryDocument, PRODUCT_DETAIL_FRAGMENT, isMultiChannel, FacetValueFormInputComponent, ProductListQueryDocument, JobState, GetProductVariantsQuickJumpDocument, GlobalFlag, ProductVariantUpdateMutationDocument, detailComponentWithResolver, GetProductDetailDocument, GetProductVariantDetailDocument, CollectionDetailQueryDocument, AssetDetailQueryDocument, SharedModule, PageService } from '@vendure/admin-ui/core';
|
|
8
8
|
import { shareReplay, mergeMap, map, switchMap, tap, take, startWith, debounceTime, takeUntil, finalize, distinctUntilChanged, filter, catchError, skip, switchMapTo, delay } from 'rxjs/operators';
|
|
9
9
|
import * as i2 from '@angular/forms';
|
|
10
10
|
import { UntypedFormGroup, UntypedFormArray, Validators, FormControl, NG_VALUE_ACCESSOR, FormGroup, UntypedFormControl } from '@angular/forms';
|
|
11
|
-
import { forkJoin, of, throwError, combineLatest, Subject, EMPTY, BehaviorSubject, from, lastValueFrom, merge, concat } from 'rxjs';
|
|
11
|
+
import { forkJoin, of, throwError, combineLatest, Subject, EMPTY, BehaviorSubject, from, lastValueFrom, merge, Observable, concat } from 'rxjs';
|
|
12
12
|
import { normalizeString } from '@vendure/common/lib/normalize-string';
|
|
13
13
|
import { notNullOrUndefined, generateAllCombinations } from '@vendure/common/lib/shared-utils';
|
|
14
14
|
import * as i3 from '@clr/angular';
|
|
@@ -993,20 +993,24 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.2", ngImpor
|
|
|
993
993
|
|
|
994
994
|
const createRoutes = (pageService) => [
|
|
995
995
|
{
|
|
996
|
-
path: '
|
|
996
|
+
path: 'products',
|
|
997
997
|
component: PageComponent,
|
|
998
998
|
data: {
|
|
999
999
|
locationId: 'product-list',
|
|
1000
|
-
breadcrumb: marker('breadcrumb.
|
|
1000
|
+
breadcrumb: marker('breadcrumb.products'),
|
|
1001
1001
|
},
|
|
1002
1002
|
children: pageService.getPageTabRoutes('product-list'),
|
|
1003
1003
|
},
|
|
1004
1004
|
{
|
|
1005
|
-
path: 'inventory
|
|
1005
|
+
path: 'inventory',
|
|
1006
|
+
redirectTo: 'products',
|
|
1007
|
+
},
|
|
1008
|
+
{
|
|
1009
|
+
path: 'products/:id',
|
|
1006
1010
|
component: PageComponent,
|
|
1007
1011
|
data: {
|
|
1008
1012
|
locationId: 'product-detail',
|
|
1009
|
-
breadcrumb: { label: marker('breadcrumb.
|
|
1013
|
+
breadcrumb: { label: marker('breadcrumb.products'), link: ['../', 'products'] },
|
|
1010
1014
|
},
|
|
1011
1015
|
children: [
|
|
1012
1016
|
{
|
|
@@ -1035,16 +1039,16 @@ const createRoutes = (pageService) => [
|
|
|
1035
1039
|
],
|
|
1036
1040
|
},
|
|
1037
1041
|
{
|
|
1038
|
-
path: '
|
|
1042
|
+
path: 'products/:productId/variants/:id',
|
|
1039
1043
|
component: PageComponent,
|
|
1040
1044
|
data: {
|
|
1041
1045
|
locationId: 'product-variant-detail',
|
|
1042
|
-
breadcrumb: { label: marker('breadcrumb.
|
|
1046
|
+
breadcrumb: { label: marker('breadcrumb.products'), link: ['../', 'products'] },
|
|
1043
1047
|
},
|
|
1044
1048
|
children: pageService.getPageTabRoutes('product-variant-detail'),
|
|
1045
1049
|
},
|
|
1046
1050
|
{
|
|
1047
|
-
path: '
|
|
1051
|
+
path: 'products/:id/options',
|
|
1048
1052
|
component: ProductOptionsEditorComponent,
|
|
1049
1053
|
resolve: createResolveData(ProductVariantsResolver),
|
|
1050
1054
|
canDeactivate: [CanDeactivateDetailGuard],
|
|
@@ -1052,21 +1056,6 @@ const createRoutes = (pageService) => [
|
|
|
1052
1056
|
breadcrumb: productOptionsEditorBreadcrumb,
|
|
1053
1057
|
},
|
|
1054
1058
|
},
|
|
1055
|
-
{
|
|
1056
|
-
path: 'inventory/stock-locations/:id',
|
|
1057
|
-
component: PageComponent,
|
|
1058
|
-
data: {
|
|
1059
|
-
locationId: 'stock-location-detail',
|
|
1060
|
-
breadcrumb: [
|
|
1061
|
-
{ label: marker('breadcrumb.inventory'), link: ['../', 'inventory'] },
|
|
1062
|
-
{
|
|
1063
|
-
label: marker('breadcrumb.stock-locations'),
|
|
1064
|
-
link: ['../', 'inventory', 'stock-locations'],
|
|
1065
|
-
},
|
|
1066
|
-
],
|
|
1067
|
-
},
|
|
1068
|
-
children: pageService.getPageTabRoutes('stock-location-detail'),
|
|
1069
|
-
},
|
|
1070
1059
|
{
|
|
1071
1060
|
path: 'facets',
|
|
1072
1061
|
component: PageComponent,
|
|
@@ -1125,12 +1114,12 @@ const createRoutes = (pageService) => [
|
|
|
1125
1114
|
function productOptionsEditorBreadcrumb(data, params) {
|
|
1126
1115
|
return data.entity.pipe(map((entity) => [
|
|
1127
1116
|
{
|
|
1128
|
-
label: marker('breadcrumb.
|
|
1129
|
-
link: ['../', '
|
|
1117
|
+
label: marker('breadcrumb.products'),
|
|
1118
|
+
link: ['../', 'products'],
|
|
1130
1119
|
},
|
|
1131
1120
|
{
|
|
1132
1121
|
label: `${entity.name}`,
|
|
1133
|
-
link: ['../', '
|
|
1122
|
+
link: ['../', 'products', params.id],
|
|
1134
1123
|
},
|
|
1135
1124
|
{
|
|
1136
1125
|
label: marker('breadcrumb.product-options'),
|
|
@@ -1224,7 +1213,7 @@ class AssetDetailComponent extends TypedBaseDetailComponent {
|
|
|
1224
1213
|
}
|
|
1225
1214
|
}
|
|
1226
1215
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.2", ngImport: i0, type: AssetDetailComponent, deps: [{ token: i1.NotificationService }, { token: i1.DataService }, { token: i2.UntypedFormBuilder }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1227
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.2", type: AssetDetailComponent, selector: "vdr-asset-detail", usesInheritance: true, ngImport: i0, template: "<vdr-page-block>\r\n <vdr-action-bar>\r\n <vdr-ab-left></vdr-ab-left>\r\n\r\n <vdr-ab-right>\r\n <vdr-action-bar-items locationId=\"asset-detail\"></vdr-action-bar-items>\r\n <button\r\n *vdrIfPermissions=\"['UpdateCatalog', 'UpdateAsset']\"\r\n class=\"btn btn-primary\"\r\n (click)=\"save()\"\r\n [disabled]=\"detailForm.invalid || detailForm.pristine\"\r\n >\r\n {{ 'common.update' | translate }}\r\n </button>\r\n </vdr-ab-right>\r\n </vdr-action-bar>\r\n</vdr-page-block>\r\n<vdr-page-block>\r\n <vdr-asset-preview\r\n [asset]=\"entity$ | async\"\r\n [editable]=\"true\"\r\n [customFields]=\"customFields\"\r\n [customFieldsForm]=\"detailForm.get('customFields')\"\r\n (assetChange)=\"onAssetChange($event)\"\r\n />\r\n</vdr-page-block>\r\n", styles: [":host{display:flex;flex-direction:column;height:100%}\n"], dependencies: [{ kind: "component", type: i1.ActionBarComponent, selector: "vdr-action-bar" }, { kind: "component", type: i1.ActionBarLeftComponent, selector: "vdr-ab-left", inputs: ["grow"] }, { kind: "component", type: i1.ActionBarRightComponent, selector: "vdr-ab-right", inputs: ["grow"] }, { kind: "component", type: i1.AssetPreviewComponent, selector: "vdr-asset-preview", inputs: ["asset", "editable", "customFields", "customFieldsForm"], outputs: ["assetChange", "editClick"] }, { kind: "directive", type: i1.IfPermissionsDirective, selector: "[vdrIfPermissions]", inputs: ["vdrIfPermissions", "vdrIfPermissionsElse"] }, { kind: "component", type: i1.ActionBarItemsComponent, selector: "vdr-action-bar-items", inputs: ["locationId"] }, { kind: "component", type: i1.PageBlockComponent, selector: "vdr-page-block" }, { kind: "pipe", type: i3$1.AsyncPipe, name: "async" }, { kind: "pipe", type: i5.TranslatePipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
1216
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.2", type: AssetDetailComponent, selector: "vdr-asset-detail", usesInheritance: true, ngImport: i0, template: "<vdr-page-block>\r\n <vdr-action-bar>\r\n <vdr-ab-left></vdr-ab-left>\r\n\r\n <vdr-ab-right>\r\n <vdr-action-bar-items locationId=\"asset-detail\"></vdr-action-bar-items>\r\n <button\r\n *vdrIfPermissions=\"['UpdateCatalog', 'UpdateAsset']\"\r\n class=\"btn btn-primary\"\r\n (click)=\"save()\"\r\n [disabled]=\"detailForm.invalid || detailForm.pristine\"\r\n >\r\n {{ 'common.update' | translate }}\r\n </button>\r\n </vdr-ab-right>\r\n </vdr-action-bar>\r\n</vdr-page-block>\r\n<vdr-page-block>\r\n <vdr-asset-preview\r\n [asset]=\"entity$ | async\"\r\n [editable]=\"true\"\r\n [customFields]=\"customFields\"\r\n [customFieldsForm]=\"detailForm.get('customFields')\"\r\n (assetChange)=\"onAssetChange($event)\"\r\n />\r\n</vdr-page-block>\r\n", styles: [":host{display:flex;flex-direction:column;height:100%}\n"], dependencies: [{ kind: "component", type: i1.ActionBarComponent, selector: "vdr-action-bar" }, { kind: "component", type: i1.ActionBarLeftComponent, selector: "vdr-ab-left", inputs: ["grow"] }, { kind: "component", type: i1.ActionBarRightComponent, selector: "vdr-ab-right", inputs: ["grow"] }, { kind: "component", type: i1.AssetPreviewComponent, selector: "vdr-asset-preview", inputs: ["asset", "assets", "editable", "customFields", "customFieldsForm"], outputs: ["assetChange", "editClick"] }, { kind: "directive", type: i1.IfPermissionsDirective, selector: "[vdrIfPermissions]", inputs: ["vdrIfPermissions", "vdrIfPermissionsElse"] }, { kind: "component", type: i1.ActionBarItemsComponent, selector: "vdr-action-bar-items", inputs: ["locationId"] }, { kind: "component", type: i1.PageBlockComponent, selector: "vdr-page-block" }, { kind: "pipe", type: i3$1.AsyncPipe, name: "async" }, { kind: "pipe", type: i5.TranslatePipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
1228
1217
|
}
|
|
1229
1218
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.2", ngImport: i0, type: AssetDetailComponent, decorators: [{
|
|
1230
1219
|
type: Component,
|
|
@@ -1334,7 +1323,7 @@ class AssetListComponent extends BaseListComponent {
|
|
|
1334
1323
|
.pipe(switchMap(res => (res ? this.dataService.product.deleteAssets(assetIds, !!message) : EMPTY)), map(res => res.deleteAssets));
|
|
1335
1324
|
}
|
|
1336
1325
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.2", ngImport: i0, type: AssetListComponent, deps: [{ token: i1.NotificationService }, { token: i1.ModalService }, { token: i1.DataService }, { token: i1$1.Router }, { token: i1$1.ActivatedRoute }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1337
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.2", type: AssetListComponent, selector: "vdr-asset-list", usesInheritance: true, ngImport: i0, template: "<vdr-page-block>\r\n <div class=\"my-2\">\r\n <vdr-asset-search-input\r\n [tags]=\"allTags$ | async\"\r\n (searchTermChange)=\"searchTerm$.next($event)\"\r\n (tagsChange)=\"filterByTags$.next($event)\"\r\n >\r\n <vdr-asset-file-input\r\n (selectFiles)=\"filesSelected($event)\"\r\n [uploading]=\"uploading\"\r\n dropZoneTarget=\".content-area\"\r\n ></vdr-asset-file-input>\r\n </vdr-asset-search-input>\r\n </div>\r\n <vdr-asset-gallery\r\n [assets]=\"(items$ | async)! | paginate : (paginationConfig$ | async) || {}\"\r\n [multiSelect]=\"true\"\r\n [canDelete]=\"['DeleteCatalog', 'DeleteAsset'] | hasPermission\"\r\n (deleteAssets)=\"deleteAssets($event)\"\r\n ></vdr-asset-gallery>\r\n\r\n <div class=\"paging-controls\">\r\n <vdr-items-per-page-controls\r\n [itemsPerPage]=\"itemsPerPage$ | async\"\r\n (itemsPerPageChange)=\"setItemsPerPage($event)\"\r\n ></vdr-items-per-page-controls>\r\n\r\n <vdr-pagination-controls\r\n [currentPage]=\"currentPage$ | async\"\r\n [itemsPerPage]=\"itemsPerPage$ | async\"\r\n [totalItems]=\"totalItems$ | async\"\r\n (pageChange)=\"setPageNumber($event)\"\r\n ></vdr-pagination-controls>\r\n </div>\r\n</vdr-page-block>\r\n", styles: [":host{display:flex;flex-direction:column;height:100%}vdr-asset-gallery{flex:1}.paging-controls{padding-top:6px;border-top:1px solid var(--color-component-border-100);display:flex;justify-content:space-between}.search-input{margin-top:6px;min-width:300px}\n"], dependencies: [{ kind: "component", type: i1.AssetSearchInputComponent, selector: "vdr-asset-search-input", inputs: ["tags"], outputs: ["searchTermChange", "tagsChange"] }, { kind: "component", type: i1.ItemsPerPageControlsComponent, selector: "vdr-items-per-page-controls", inputs: ["itemsPerPage"], outputs: ["itemsPerPageChange"] }, { kind: "component", type: i1.PaginationControlsComponent, selector: "vdr-pagination-controls", inputs: ["id", "currentPage", "itemsPerPage", "totalItems"], outputs: ["pageChange"] }, { kind: "component", type: i1.AssetFileInputComponent, selector: "vdr-asset-file-input", inputs: ["dropZoneTarget", "uploading"], outputs: ["selectFiles"] }, { kind: "component", type: i1.AssetGalleryComponent, selector: "vdr-asset-gallery", inputs: ["assets", "multiSelect", "canDelete"], outputs: ["selectionChange", "deleteAssets"] }, { kind: "component", type: i1.PageBlockComponent, selector: "vdr-page-block" }, { kind: "pipe", type: i3$1.AsyncPipe, name: "async" }, { kind: "pipe", type: i5$2.PaginatePipe, name: "paginate" }, { kind: "pipe", type: i1.HasPermissionPipe, name: "hasPermission" }] }); }
|
|
1326
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.2", type: AssetListComponent, selector: "vdr-asset-list", usesInheritance: true, ngImport: i0, template: "<vdr-page-block>\r\n <div class=\"my-2\">\r\n <vdr-asset-search-input\r\n [tags]=\"allTags$ | async\"\r\n (searchTermChange)=\"searchTerm$.next($event)\"\r\n (tagsChange)=\"filterByTags$.next($event)\"\r\n >\r\n <vdr-asset-file-input\r\n (selectFiles)=\"filesSelected($event)\"\r\n [uploading]=\"uploading\"\r\n dropZoneTarget=\".content-area\"\r\n ></vdr-asset-file-input>\r\n </vdr-asset-search-input>\r\n </div>\r\n <vdr-asset-gallery\r\n [assets]=\"(items$ | async)! | paginate : (paginationConfig$ | async) || {}\"\r\n [multiSelect]=\"true\"\r\n [canDelete]=\"['DeleteCatalog', 'DeleteAsset'] | hasPermission\"\r\n (deleteAssets)=\"deleteAssets($event)\"\r\n ></vdr-asset-gallery>\r\n\r\n <div class=\"paging-controls\">\r\n <vdr-items-per-page-controls\r\n [itemsPerPage]=\"itemsPerPage$ | async\"\r\n (itemsPerPageChange)=\"setItemsPerPage($event)\"\r\n ></vdr-items-per-page-controls>\r\n\r\n <vdr-pagination-controls\r\n [currentPage]=\"currentPage$ | async\"\r\n [itemsPerPage]=\"itemsPerPage$ | async\"\r\n [totalItems]=\"totalItems$ | async\"\r\n (pageChange)=\"setPageNumber($event)\"\r\n ></vdr-pagination-controls>\r\n </div>\r\n</vdr-page-block>\r\n", styles: [":host{display:flex;flex-direction:column;height:100%}vdr-asset-gallery{flex:1}.paging-controls{padding-top:6px;border-top:1px solid var(--color-component-border-100);display:flex;justify-content:space-between}.search-input{margin-top:6px;min-width:300px}\n"], dependencies: [{ kind: "component", type: i1.AssetSearchInputComponent, selector: "vdr-asset-search-input", inputs: ["tags"], outputs: ["searchTermChange", "tagsChange"] }, { kind: "component", type: i1.ItemsPerPageControlsComponent, selector: "vdr-items-per-page-controls", inputs: ["itemsPerPage"], outputs: ["itemsPerPageChange"] }, { kind: "component", type: i1.PaginationControlsComponent, selector: "vdr-pagination-controls", inputs: ["id", "currentPage", "itemsPerPage", "totalItems"], outputs: ["pageChange"] }, { kind: "component", type: i1.AssetFileInputComponent, selector: "vdr-asset-file-input", inputs: ["dropZoneTarget", "uploading"], outputs: ["selectFiles"] }, { kind: "component", type: i1.AssetGalleryComponent, selector: "vdr-asset-gallery", inputs: ["assets", "multiSelect", "canDelete"], outputs: ["selectionChange", "deleteAssets", "editAssetClick"] }, { kind: "component", type: i1.PageBlockComponent, selector: "vdr-page-block" }, { kind: "pipe", type: i3$1.AsyncPipe, name: "async" }, { kind: "pipe", type: i5$2.PaginatePipe, name: "paginate" }, { kind: "pipe", type: i1.HasPermissionPipe, name: "hasPermission" }] }); }
|
|
1338
1327
|
}
|
|
1339
1328
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.2", ngImport: i0, type: AssetListComponent, decorators: [{
|
|
1340
1329
|
type: Component,
|
|
@@ -1389,7 +1378,7 @@ class AssetsComponent {
|
|
|
1389
1378
|
.fromComponent(AssetPreviewDialogComponent, {
|
|
1390
1379
|
size: 'xl',
|
|
1391
1380
|
closable: true,
|
|
1392
|
-
locals: { asset },
|
|
1381
|
+
locals: { asset, assets: this.assets },
|
|
1393
1382
|
})
|
|
1394
1383
|
.subscribe();
|
|
1395
1384
|
}
|
|
@@ -1759,11 +1748,11 @@ class CollectionContentsComponent {
|
|
|
1759
1748
|
});
|
|
1760
1749
|
}
|
|
1761
1750
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.2", ngImport: i0, type: CollectionContentsComponent, deps: [{ token: i1$1.ActivatedRoute }, { token: i1$1.Router }, { token: i1.DataService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1762
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.2", type: CollectionContentsComponent, selector: "vdr-collection-contents", inputs: { collectionId: "collectionId", parentId: "parentId", inheritFilters: "inheritFilters", updatedFilters: "updatedFilters", previewUpdatedFilters: "previewUpdatedFilters" }, queries: [{ propertyName: "headerTemplate", first: true, predicate: TemplateRef, descendants: true, static: true }], usesOnChanges: true, ngImport: i0, template: "<div class=\"table-wrapper\">\r\n <div class=\"progress loop\" [class.visible]=\"isLoading\"></div>\r\n <div class=\"header-title-row\">\r\n <ng-container\r\n *ngTemplateOutlet=\"headerTemplate; context: { $implicit: contentsTotalItems$ | async }\"\r\n ></ng-container>\r\n </div>\r\n <vdr-data-table-2\r\n id=\"collection-contents\"\r\n [class.loading]=\"isLoading\"\r\n [items]=\"contents$ | async\"\r\n [itemsPerPage]=\"contentsItemsPerPage$ | async\"\r\n [totalItems]=\"contentsTotalItems$ | async\"\r\n [currentPage]=\"contentsCurrentPage$ | async\"\r\n (pageChange)=\"setContentsPageNumber($event)\"\r\n (itemsPerPageChange)=\"setContentsItemsPerPage($event)\"\r\n >\r\n <vdr-dt2-search\r\n [searchTermControl]=\"filterTermControl\"\r\n [searchTermPlaceholder]=\"'catalog.filter-by-name' | translate\"\r\n />\r\n <vdr-dt2-column [heading]=\"'common.id' | translate\" id=\"id\" [hiddenByDefault]=\"true\">\r\n <ng-template let-variant=\"item\">\r\n {{ variant.id }}\r\n </ng-template>\r\n </vdr-dt2-column>\r\n <vdr-dt2-column [heading]=\"'common.created-at' | translate\" id=\"created-at\" [hiddenByDefault]=\"true\">\r\n <ng-template let-variant=\"item\">\r\n {{ variant.createdAt | localeDate : 'short' }}\r\n </ng-template>\r\n </vdr-dt2-column>\r\n <vdr-dt2-column [heading]=\"'common.updated-at' | translate\" id=\"updated-at\" [hiddenByDefault]=\"true\">\r\n <ng-template let-variant=\"item\">\r\n {{ variant.updatedAt | localeDate : 'short' }}\r\n </ng-template>\r\n </vdr-dt2-column>\r\n <vdr-dt2-column [heading]=\"'common.name' | translate\" id=\"name\" [optional]=\"false\">\r\n <ng-template let-variant=\"item\">\r\n <a class=\"button-ghost\" [routerLink]=\"['/catalog/
|
|
1751
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.2", type: CollectionContentsComponent, selector: "vdr-collection-contents", inputs: { collectionId: "collectionId", parentId: "parentId", inheritFilters: "inheritFilters", updatedFilters: "updatedFilters", previewUpdatedFilters: "previewUpdatedFilters" }, queries: [{ propertyName: "headerTemplate", first: true, predicate: TemplateRef, descendants: true, static: true }], usesOnChanges: true, ngImport: i0, template: "<div class=\"table-wrapper\">\r\n <div class=\"progress loop\" [class.visible]=\"isLoading\"></div>\r\n <div class=\"header-title-row\">\r\n <ng-container\r\n *ngTemplateOutlet=\"headerTemplate; context: { $implicit: contentsTotalItems$ | async }\"\r\n ></ng-container>\r\n </div>\r\n <vdr-data-table-2\r\n id=\"collection-contents\"\r\n [class.loading]=\"isLoading\"\r\n [items]=\"contents$ | async\"\r\n [itemsPerPage]=\"contentsItemsPerPage$ | async\"\r\n [totalItems]=\"contentsTotalItems$ | async\"\r\n [currentPage]=\"contentsCurrentPage$ | async\"\r\n (pageChange)=\"setContentsPageNumber($event)\"\r\n (itemsPerPageChange)=\"setContentsItemsPerPage($event)\"\r\n >\r\n <vdr-dt2-search\r\n [searchTermControl]=\"filterTermControl\"\r\n [searchTermPlaceholder]=\"'catalog.filter-by-name' | translate\"\r\n />\r\n <vdr-dt2-column [heading]=\"'common.id' | translate\" id=\"id\" [hiddenByDefault]=\"true\">\r\n <ng-template let-variant=\"item\">\r\n {{ variant.id }}\r\n </ng-template>\r\n </vdr-dt2-column>\r\n <vdr-dt2-column [heading]=\"'common.created-at' | translate\" id=\"created-at\" [hiddenByDefault]=\"true\">\r\n <ng-template let-variant=\"item\">\r\n {{ variant.createdAt | localeDate : 'short' }}\r\n </ng-template>\r\n </vdr-dt2-column>\r\n <vdr-dt2-column [heading]=\"'common.updated-at' | translate\" id=\"updated-at\" [hiddenByDefault]=\"true\">\r\n <ng-template let-variant=\"item\">\r\n {{ variant.updatedAt | localeDate : 'short' }}\r\n </ng-template>\r\n </vdr-dt2-column>\r\n <vdr-dt2-column [heading]=\"'common.name' | translate\" id=\"name\" [optional]=\"false\">\r\n <ng-template let-variant=\"item\">\r\n <a class=\"button-ghost\" [routerLink]=\"['/catalog/products', variant.productId]\"\r\n ><span>{{ variant.name }}</span\r\n ><clr-icon shape=\"arrow right\"\r\n /></a>\r\n </ng-template>\r\n </vdr-dt2-column>\r\n <vdr-dt2-column [heading]=\"'catalog.sku' | translate\" id=\"sku\" [optional]=\"false\">\r\n <ng-template let-variant=\"item\">\r\n {{ variant.sku }}\r\n </ng-template>\r\n </vdr-dt2-column>\r\n </vdr-data-table-2>\r\n</div>\r\n", styles: [":host{display:block}:host ::ng-deep table{margin-top:-1px}vdr-data-table{opacity:1;transition:opacity .3s}vdr-data-table.loading{opacity:.5}.table-wrapper{position:relative}.progress{position:absolute;top:0;left:0;overflow:hidden;height:6px;opacity:0;transition:opacity .1s}.progress.visible{opacity:1}.sku{color:var(--color-text-200)}\n"], dependencies: [{ kind: "directive", type: i3.ClrIconCustomTag, selector: "clr-icon" }, { kind: "directive", type: i3$1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i1$1.RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "component", type: i1.DataTable2Component, selector: "vdr-data-table-2", inputs: ["id", "items", "itemsPerPage", "currentPage", "totalItems", "emptyStateLabel", "filters", "activeIndex"], outputs: ["pageChange", "itemsPerPageChange"] }, { kind: "component", type: i1.DataTable2ColumnComponent, selector: "vdr-dt2-column", inputs: ["id", "expand", "heading", "align", "sort", "optional", "hiddenByDefault", "orderable"], exportAs: ["row"] }, { kind: "component", type: i1.DataTable2SearchComponent, selector: "vdr-dt2-search", inputs: ["searchTermControl", "searchTermPlaceholder"] }, { kind: "pipe", type: i3$1.AsyncPipe, name: "async" }, { kind: "pipe", type: i5.TranslatePipe, name: "translate" }, { kind: "pipe", type: i1.LocaleDatePipe, name: "localeDate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
1763
1752
|
}
|
|
1764
1753
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.2", ngImport: i0, type: CollectionContentsComponent, decorators: [{
|
|
1765
1754
|
type: Component,
|
|
1766
|
-
args: [{ selector: 'vdr-collection-contents', changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"table-wrapper\">\r\n <div class=\"progress loop\" [class.visible]=\"isLoading\"></div>\r\n <div class=\"header-title-row\">\r\n <ng-container\r\n *ngTemplateOutlet=\"headerTemplate; context: { $implicit: contentsTotalItems$ | async }\"\r\n ></ng-container>\r\n </div>\r\n <vdr-data-table-2\r\n id=\"collection-contents\"\r\n [class.loading]=\"isLoading\"\r\n [items]=\"contents$ | async\"\r\n [itemsPerPage]=\"contentsItemsPerPage$ | async\"\r\n [totalItems]=\"contentsTotalItems$ | async\"\r\n [currentPage]=\"contentsCurrentPage$ | async\"\r\n (pageChange)=\"setContentsPageNumber($event)\"\r\n (itemsPerPageChange)=\"setContentsItemsPerPage($event)\"\r\n >\r\n <vdr-dt2-search\r\n [searchTermControl]=\"filterTermControl\"\r\n [searchTermPlaceholder]=\"'catalog.filter-by-name' | translate\"\r\n />\r\n <vdr-dt2-column [heading]=\"'common.id' | translate\" id=\"id\" [hiddenByDefault]=\"true\">\r\n <ng-template let-variant=\"item\">\r\n {{ variant.id }}\r\n </ng-template>\r\n </vdr-dt2-column>\r\n <vdr-dt2-column [heading]=\"'common.created-at' | translate\" id=\"created-at\" [hiddenByDefault]=\"true\">\r\n <ng-template let-variant=\"item\">\r\n {{ variant.createdAt | localeDate : 'short' }}\r\n </ng-template>\r\n </vdr-dt2-column>\r\n <vdr-dt2-column [heading]=\"'common.updated-at' | translate\" id=\"updated-at\" [hiddenByDefault]=\"true\">\r\n <ng-template let-variant=\"item\">\r\n {{ variant.updatedAt | localeDate : 'short' }}\r\n </ng-template>\r\n </vdr-dt2-column>\r\n <vdr-dt2-column [heading]=\"'common.name' | translate\" id=\"name\" [optional]=\"false\">\r\n <ng-template let-variant=\"item\">\r\n <a class=\"button-ghost\" [routerLink]=\"['/catalog/
|
|
1755
|
+
args: [{ selector: 'vdr-collection-contents', changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"table-wrapper\">\r\n <div class=\"progress loop\" [class.visible]=\"isLoading\"></div>\r\n <div class=\"header-title-row\">\r\n <ng-container\r\n *ngTemplateOutlet=\"headerTemplate; context: { $implicit: contentsTotalItems$ | async }\"\r\n ></ng-container>\r\n </div>\r\n <vdr-data-table-2\r\n id=\"collection-contents\"\r\n [class.loading]=\"isLoading\"\r\n [items]=\"contents$ | async\"\r\n [itemsPerPage]=\"contentsItemsPerPage$ | async\"\r\n [totalItems]=\"contentsTotalItems$ | async\"\r\n [currentPage]=\"contentsCurrentPage$ | async\"\r\n (pageChange)=\"setContentsPageNumber($event)\"\r\n (itemsPerPageChange)=\"setContentsItemsPerPage($event)\"\r\n >\r\n <vdr-dt2-search\r\n [searchTermControl]=\"filterTermControl\"\r\n [searchTermPlaceholder]=\"'catalog.filter-by-name' | translate\"\r\n />\r\n <vdr-dt2-column [heading]=\"'common.id' | translate\" id=\"id\" [hiddenByDefault]=\"true\">\r\n <ng-template let-variant=\"item\">\r\n {{ variant.id }}\r\n </ng-template>\r\n </vdr-dt2-column>\r\n <vdr-dt2-column [heading]=\"'common.created-at' | translate\" id=\"created-at\" [hiddenByDefault]=\"true\">\r\n <ng-template let-variant=\"item\">\r\n {{ variant.createdAt | localeDate : 'short' }}\r\n </ng-template>\r\n </vdr-dt2-column>\r\n <vdr-dt2-column [heading]=\"'common.updated-at' | translate\" id=\"updated-at\" [hiddenByDefault]=\"true\">\r\n <ng-template let-variant=\"item\">\r\n {{ variant.updatedAt | localeDate : 'short' }}\r\n </ng-template>\r\n </vdr-dt2-column>\r\n <vdr-dt2-column [heading]=\"'common.name' | translate\" id=\"name\" [optional]=\"false\">\r\n <ng-template let-variant=\"item\">\r\n <a class=\"button-ghost\" [routerLink]=\"['/catalog/products', variant.productId]\"\r\n ><span>{{ variant.name }}</span\r\n ><clr-icon shape=\"arrow right\"\r\n /></a>\r\n </ng-template>\r\n </vdr-dt2-column>\r\n <vdr-dt2-column [heading]=\"'catalog.sku' | translate\" id=\"sku\" [optional]=\"false\">\r\n <ng-template let-variant=\"item\">\r\n {{ variant.sku }}\r\n </ng-template>\r\n </vdr-dt2-column>\r\n </vdr-data-table-2>\r\n</div>\r\n", styles: [":host{display:block}:host ::ng-deep table{margin-top:-1px}vdr-data-table{opacity:1;transition:opacity .3s}vdr-data-table.loading{opacity:.5}.table-wrapper{position:relative}.progress{position:absolute;top:0;left:0;overflow:hidden;height:6px;opacity:0;transition:opacity .1s}.progress.visible{opacity:1}.sku{color:var(--color-text-200)}\n"] }]
|
|
1767
1756
|
}], ctorParameters: function () { return [{ type: i1$1.ActivatedRoute }, { type: i1$1.Router }, { type: i1.DataService }]; }, propDecorators: { collectionId: [{
|
|
1768
1757
|
type: Input
|
|
1769
1758
|
}], parentId: [{
|
|
@@ -2747,13 +2736,29 @@ class FacetDetailComponent extends TypedBaseDetailComponent {
|
|
|
2747
2736
|
visible: true,
|
|
2748
2737
|
customFields: this.formBuilder.group(getCustomFieldsDefaults(this.customFields)),
|
|
2749
2738
|
}),
|
|
2750
|
-
values: this.formBuilder.
|
|
2739
|
+
values: this.formBuilder.record({}),
|
|
2751
2740
|
});
|
|
2752
|
-
this.
|
|
2741
|
+
this.currentPage = 1;
|
|
2742
|
+
this.itemsPerPage = 10;
|
|
2743
|
+
this.filterControl = new FormControl('');
|
|
2744
|
+
this.values$ = new BehaviorSubject([]);
|
|
2745
|
+
this.filteredValues$ = new Observable();
|
|
2753
2746
|
this.updatePermission = [Permission.UpdateCatalog, Permission.UpdateFacet];
|
|
2754
2747
|
}
|
|
2755
2748
|
ngOnInit() {
|
|
2756
2749
|
this.init();
|
|
2750
|
+
this.filteredValues$ = combineLatest([
|
|
2751
|
+
this.values$,
|
|
2752
|
+
this.filterControl.valueChanges.pipe(startWith('')),
|
|
2753
|
+
]).pipe(map(([values, filterTerm]) => {
|
|
2754
|
+
const filterString = filterTerm?.toLowerCase().trim();
|
|
2755
|
+
return filterString
|
|
2756
|
+
? values.filter(v => v.name.toLowerCase().includes(filterString) ||
|
|
2757
|
+
v.code.toLowerCase().includes(filterString))
|
|
2758
|
+
: values;
|
|
2759
|
+
}), tap(() => {
|
|
2760
|
+
this.currentPage = 1;
|
|
2761
|
+
}));
|
|
2757
2762
|
}
|
|
2758
2763
|
ngOnDestroy() {
|
|
2759
2764
|
this.destroy();
|
|
@@ -2766,9 +2771,9 @@ class FacetDetailComponent extends TypedBaseDetailComponent {
|
|
|
2766
2771
|
}
|
|
2767
2772
|
}
|
|
2768
2773
|
}
|
|
2769
|
-
updateValueCode(currentCode, nameValue,
|
|
2774
|
+
updateValueCode(currentCode, nameValue, valueId) {
|
|
2770
2775
|
if (!currentCode) {
|
|
2771
|
-
const codeControl = this.detailForm.get(['values',
|
|
2776
|
+
const codeControl = this.detailForm.get(['values', valueId, 'code']);
|
|
2772
2777
|
if (codeControl && codeControl.pristine) {
|
|
2773
2778
|
codeControl.setValue(normalizeString(nameValue, '-'));
|
|
2774
2779
|
}
|
|
@@ -2777,19 +2782,17 @@ class FacetDetailComponent extends TypedBaseDetailComponent {
|
|
|
2777
2782
|
customValueFieldIsSet(index, name) {
|
|
2778
2783
|
return !!this.detailForm.get(['values', index, 'customFields', name]);
|
|
2779
2784
|
}
|
|
2780
|
-
getValuesFormArray() {
|
|
2781
|
-
return this.detailForm.get('values');
|
|
2782
|
-
}
|
|
2783
2785
|
addFacetValue() {
|
|
2784
|
-
const
|
|
2785
|
-
if (
|
|
2786
|
+
const valuesFormRecord = this.detailForm.get('values');
|
|
2787
|
+
if (valuesFormRecord) {
|
|
2788
|
+
const id = this.createTempId();
|
|
2786
2789
|
const valueGroup = this.formBuilder.group({
|
|
2787
|
-
id
|
|
2790
|
+
id,
|
|
2788
2791
|
name: ['', Validators.required],
|
|
2789
2792
|
code: '',
|
|
2790
2793
|
customFields: this.formBuilder.group({}),
|
|
2791
2794
|
});
|
|
2792
|
-
const newValue = { name: '', code: '' };
|
|
2795
|
+
const newValue = { id, name: '', code: '' };
|
|
2793
2796
|
if (this.customValueFields.length) {
|
|
2794
2797
|
const customValueFieldsGroup = new UntypedFormGroup({});
|
|
2795
2798
|
newValue.customFields = {};
|
|
@@ -2799,8 +2802,11 @@ class FacetDetailComponent extends TypedBaseDetailComponent {
|
|
|
2799
2802
|
}
|
|
2800
2803
|
valueGroup.addControl('customFields', customValueFieldsGroup);
|
|
2801
2804
|
}
|
|
2802
|
-
|
|
2803
|
-
this.values
|
|
2805
|
+
valuesFormRecord.addControl(id, valueGroup);
|
|
2806
|
+
const values = this.values$.value;
|
|
2807
|
+
const endOfPageIndex = this.currentPage * this.itemsPerPage - 1;
|
|
2808
|
+
values.splice(endOfPageIndex, 0, newValue);
|
|
2809
|
+
this.values$.next(values);
|
|
2804
2810
|
}
|
|
2805
2811
|
}
|
|
2806
2812
|
create() {
|
|
@@ -2831,7 +2837,7 @@ class FacetDetailComponent extends TypedBaseDetailComponent {
|
|
|
2831
2837
|
});
|
|
2832
2838
|
}
|
|
2833
2839
|
save() {
|
|
2834
|
-
const
|
|
2840
|
+
const valuesFormRecord = this.detailForm.get('values');
|
|
2835
2841
|
combineLatest(this.entity$, this.languageCode$)
|
|
2836
2842
|
.pipe(take(1), mergeMap(([facet, languageCode]) => {
|
|
2837
2843
|
const facetForm = this.detailForm.get('facet');
|
|
@@ -2842,14 +2848,14 @@ class FacetDetailComponent extends TypedBaseDetailComponent {
|
|
|
2842
2848
|
updateOperations.push(this.dataService.facet.updateFacet(newFacet));
|
|
2843
2849
|
}
|
|
2844
2850
|
}
|
|
2845
|
-
if (
|
|
2846
|
-
const createdValues = this.getCreatedFacetValues(facet,
|
|
2851
|
+
if (valuesFormRecord && valuesFormRecord.dirty) {
|
|
2852
|
+
const createdValues = this.getCreatedFacetValues(facet, valuesFormRecord, languageCode);
|
|
2847
2853
|
if (createdValues.length) {
|
|
2848
2854
|
updateOperations.push(this.dataService.facet.createFacetValues(createdValues).pipe(switchMap(() => this.dataService.query(GetFacetDetailDocument, {
|
|
2849
2855
|
id: this.id,
|
|
2850
2856
|
}).single$)));
|
|
2851
2857
|
}
|
|
2852
|
-
const updatedValues = this.getUpdatedFacetValues(facet,
|
|
2858
|
+
const updatedValues = this.getUpdatedFacetValues(facet, valuesFormRecord, languageCode);
|
|
2853
2859
|
if (updatedValues.length) {
|
|
2854
2860
|
updateOperations.push(this.dataService.facet.updateFacetValues(updatedValues));
|
|
2855
2861
|
}
|
|
@@ -2866,14 +2872,15 @@ class FacetDetailComponent extends TypedBaseDetailComponent {
|
|
|
2866
2872
|
});
|
|
2867
2873
|
});
|
|
2868
2874
|
}
|
|
2869
|
-
deleteFacetValue(facetValueId
|
|
2870
|
-
if (
|
|
2875
|
+
deleteFacetValue(facetValueId) {
|
|
2876
|
+
if (this.isTempId(facetValueId)) {
|
|
2871
2877
|
// deleting a newly-added (not persisted) FacetValue
|
|
2872
|
-
const
|
|
2873
|
-
if (
|
|
2874
|
-
|
|
2878
|
+
const valuesFormRecord = this.detailForm.get('values');
|
|
2879
|
+
if (valuesFormRecord) {
|
|
2880
|
+
valuesFormRecord.removeControl(facetValueId);
|
|
2875
2881
|
}
|
|
2876
|
-
this.values
|
|
2882
|
+
const values = this.values$.value;
|
|
2883
|
+
this.values$.next(values.filter(v => v.id !== facetValueId));
|
|
2877
2884
|
return;
|
|
2878
2885
|
}
|
|
2879
2886
|
this.showModalAndDelete(facetValueId)
|
|
@@ -2890,9 +2897,9 @@ class FacetDetailComponent extends TypedBaseDetailComponent {
|
|
|
2890
2897
|
}).single$
|
|
2891
2898
|
: []))
|
|
2892
2899
|
.subscribe(() => {
|
|
2893
|
-
const
|
|
2894
|
-
if (
|
|
2895
|
-
|
|
2900
|
+
const valuesFormRecord = this.detailForm.get('values');
|
|
2901
|
+
if (valuesFormRecord) {
|
|
2902
|
+
valuesFormRecord.removeControl(facetValueId);
|
|
2896
2903
|
}
|
|
2897
2904
|
this.notificationService.success(marker('common.notify-delete-success'), {
|
|
2898
2905
|
entity: 'FacetValue',
|
|
@@ -2928,11 +2935,10 @@ class FacetDetailComponent extends TypedBaseDetailComponent {
|
|
|
2928
2935
|
},
|
|
2929
2936
|
});
|
|
2930
2937
|
if (this.customFields.length) {
|
|
2931
|
-
const customFieldsGroup = this.detailForm.get(['facet', 'customFields']);
|
|
2932
2938
|
this.setCustomFieldFormValues(this.customFields, this.detailForm.get(['facet', 'customFields']), facet, currentTranslation);
|
|
2933
2939
|
}
|
|
2934
|
-
const
|
|
2935
|
-
this.values
|
|
2940
|
+
const currentValuesFormGroup = this.detailForm.get('values');
|
|
2941
|
+
this.values$.next([...facet.values]);
|
|
2936
2942
|
facet.values.forEach(value => {
|
|
2937
2943
|
const valueTranslation = findTranslation(value, languageCode);
|
|
2938
2944
|
const group = {
|
|
@@ -2940,7 +2946,7 @@ class FacetDetailComponent extends TypedBaseDetailComponent {
|
|
|
2940
2946
|
code: value.code,
|
|
2941
2947
|
name: valueTranslation ? valueTranslation.name : '',
|
|
2942
2948
|
};
|
|
2943
|
-
let valueControl =
|
|
2949
|
+
let valueControl = currentValuesFormGroup.get(value.id);
|
|
2944
2950
|
if (valueControl) {
|
|
2945
2951
|
valueControl.get('id')?.setValue(group.id);
|
|
2946
2952
|
valueControl.get('code')?.setValue(group.code);
|
|
@@ -2948,7 +2954,7 @@ class FacetDetailComponent extends TypedBaseDetailComponent {
|
|
|
2948
2954
|
}
|
|
2949
2955
|
else {
|
|
2950
2956
|
valueControl = this.formBuilder.group(group);
|
|
2951
|
-
|
|
2957
|
+
currentValuesFormGroup.addControl(value.id, valueControl);
|
|
2952
2958
|
}
|
|
2953
2959
|
if (this.customValueFields.length) {
|
|
2954
2960
|
let customValueFieldsGroup = valueControl.get(['customFields']);
|
|
@@ -2996,9 +3002,9 @@ class FacetDetailComponent extends TypedBaseDetailComponent {
|
|
|
2996
3002
|
* Given an array of facet values and the values from the detailForm, this method creates a new array
|
|
2997
3003
|
* which can be persisted to the API via a createFacetValues mutation.
|
|
2998
3004
|
*/
|
|
2999
|
-
getCreatedFacetValues(facet,
|
|
3000
|
-
return
|
|
3001
|
-
.filter(c =>
|
|
3005
|
+
getCreatedFacetValues(facet, valuesFormRecord, languageCode) {
|
|
3006
|
+
return Object.values(valuesFormRecord.controls)
|
|
3007
|
+
.filter(c => c.value.id && this.isTempId(c.value.id))
|
|
3002
3008
|
.map(c => c.value)
|
|
3003
3009
|
.map(value => createUpdatedTranslatable({
|
|
3004
3010
|
translatable: { ...value, translations: [] },
|
|
@@ -3014,19 +3020,20 @@ class FacetDetailComponent extends TypedBaseDetailComponent {
|
|
|
3014
3020
|
facetId: facet.id,
|
|
3015
3021
|
code: input.code ?? '',
|
|
3016
3022
|
...input,
|
|
3023
|
+
id: undefined,
|
|
3017
3024
|
}));
|
|
3018
3025
|
}
|
|
3019
3026
|
/**
|
|
3020
3027
|
* Given an array of facet values and the values from the detailForm, this method creates a new array
|
|
3021
3028
|
* which can be persisted to the API via an updateFacetValues mutation.
|
|
3022
3029
|
*/
|
|
3023
|
-
getUpdatedFacetValues(facet,
|
|
3024
|
-
const dirtyValues = facet.values.filter(
|
|
3025
|
-
const formRow =
|
|
3030
|
+
getUpdatedFacetValues(facet, valuesFormGroup, languageCode) {
|
|
3031
|
+
const dirtyValues = facet.values.filter(v => {
|
|
3032
|
+
const formRow = valuesFormGroup.get(v.id);
|
|
3026
3033
|
return formRow && formRow.dirty && formRow.value.id;
|
|
3027
3034
|
});
|
|
3028
|
-
const dirtyValueValues =
|
|
3029
|
-
.filter(c => c.dirty && c.value.id)
|
|
3035
|
+
const dirtyValueValues = Object.values(valuesFormGroup.controls)
|
|
3036
|
+
.filter(c => c.dirty && !this.isTempId(c.value.id))
|
|
3030
3037
|
.map(c => c.value);
|
|
3031
3038
|
if (dirtyValues.length !== dirtyValueValues.length) {
|
|
3032
3039
|
throw new Error(marker(`error.facet-value-form-values-do-not-match`));
|
|
@@ -3044,12 +3051,18 @@ class FacetDetailComponent extends TypedBaseDetailComponent {
|
|
|
3044
3051
|
}))
|
|
3045
3052
|
.filter(notNullOrUndefined);
|
|
3046
3053
|
}
|
|
3054
|
+
createTempId() {
|
|
3055
|
+
return `temp-${Math.random().toString(36).substr(2, 9)}`;
|
|
3056
|
+
}
|
|
3057
|
+
isTempId(id) {
|
|
3058
|
+
return id.startsWith('temp-');
|
|
3059
|
+
}
|
|
3047
3060
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.2", ngImport: i0, type: FacetDetailComponent, deps: [{ token: i0.ChangeDetectorRef }, { token: i1.DataService }, { token: i2.FormBuilder }, { token: i1.NotificationService }, { token: i1.ModalService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
3048
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.2", type: FacetDetailComponent, selector: "vdr-facet-detail", usesInheritance: true, ngImport: i0, template: "<vdr-page-block>\r\n <vdr-action-bar>\r\n <vdr-ab-left>\r\n <vdr-language-selector\r\n [disabled]=\"isNew$ | async\"\r\n [availableLanguageCodes]=\"availableLanguages$ | async\"\r\n [currentLanguageCode]=\"languageCode$ | async\"\r\n (languageCodeChange)=\"setLanguage($event)\"\r\n ></vdr-language-selector>\r\n </vdr-ab-left>\r\n\r\n <vdr-ab-right>\r\n <vdr-action-bar-items locationId=\"facet-detail\"></vdr-action-bar-items>\r\n <button\r\n class=\"btn btn-primary\"\r\n *ngIf=\"isNew$ | async; else updateButton\"\r\n (click)=\"create()\"\r\n [disabled]=\"detailForm.invalid || detailForm.pristine\"\r\n >\r\n {{ 'common.create' | translate }}\r\n </button>\r\n <ng-template #updateButton>\r\n <button\r\n *vdrIfPermissions=\"updatePermission\"\r\n class=\"btn btn-primary\"\r\n (click)=\"save()\"\r\n [disabled]=\"detailForm.invalid || detailForm.pristine\"\r\n >\r\n {{ 'common.update' | translate }}\r\n </button>\r\n </ng-template>\r\n </vdr-ab-right>\r\n </vdr-action-bar>\r\n</vdr-page-block>\r\n<form class=\"form\" [formGroup]=\"detailForm\">\r\n <vdr-page-detail-layout>\r\n <vdr-page-detail-sidebar formGroupName=\"facet\">\r\n <vdr-card>\r\n <vdr-form-field [label]=\"'catalog.visibility' | translate\" for=\"visibility\">\r\n <clr-toggle-wrapper>\r\n <input\r\n type=\"checkbox\"\r\n clrToggle\r\n [vdrDisabled]=\"!(updatePermission | hasPermission)\"\r\n formControlName=\"visible\"\r\n id=\"visibility\"\r\n />\r\n <label class=\"visible-toggle\">\r\n <ng-container *ngIf=\"detailForm.value.facet?.visible; else private\">{{\r\n 'catalog.public' | translate\r\n }}</ng-container>\r\n <ng-template #private>{{ 'catalog.private' | translate }}</ng-template>\r\n </label>\r\n </clr-toggle-wrapper>\r\n </vdr-form-field>\r\n </vdr-card>\r\n <vdr-card>\r\n <vdr-page-entity-info *ngIf=\"entity$ | async as entity\" [entity]=\"entity\" />\r\n </vdr-card>\r\n </vdr-page-detail-sidebar>\r\n <vdr-page-block>\r\n <vdr-card formGroupName=\"facet\">\r\n <div class=\"form-grid\">\r\n <vdr-form-field [label]=\"'common.name' | translate\" for=\"name\">\r\n <input\r\n id=\"name\"\r\n type=\"text\"\r\n formControlName=\"name\"\r\n [readonly]=\"!(updatePermission | hasPermission)\"\r\n (input)=\"updateCode(entity?.code, $event.target.value)\"\r\n />\r\n </vdr-form-field>\r\n <vdr-form-field [label]=\"'common.code' | translate\" for=\"code\">\r\n <input\r\n id=\"code\"\r\n type=\"text\"\r\n [readonly]=\"!(updatePermission | hasPermission)\"\r\n formControlName=\"code\"\r\n />\r\n </vdr-form-field>\r\n </div>\r\n </vdr-card>\r\n <vdr-card [title]=\"'common.custom-fields' | translate\" *ngIf=\"customFields.length\">\r\n <vdr-tabbed-custom-fields\r\n entityName=\"Facet\"\r\n [customFields]=\"customFields\"\r\n [customFieldsFormGroup]=\"detailForm.get('facet.customFields')\"\r\n [readonly]=\"!(updatePermission | hasPermission)\"\r\n />\r\n </vdr-card>\r\n\r\n <vdr-custom-detail-component-host\r\n locationId=\"facet-detail\"\r\n [entity$]=\"entity$\"\r\n [detailForm]=\"detailForm\"\r\n ></vdr-custom-detail-component-host>\r\n\r\n <vdr-card\r\n *ngIf=\"!(isNew$ | async)\"\r\n [title]=\"'catalog.facet-values' | translate\"\r\n [paddingX]=\"false\"\r\n >\r\n <table\r\n class=\"facet-values-list table\"\r\n formArrayName=\"values\"\r\n *ngIf=\"0 < getValuesFormArray().length\"\r\n >\r\n <thead>\r\n <tr>\r\n <th></th>\r\n <th>{{ 'common.name' | translate }}</th>\r\n <th>{{ 'common.code' | translate }}</th>\r\n <ng-container *ngIf=\"customValueFields.length\">\r\n <th>{{ 'common.custom-fields' | translate }}</th>\r\n </ng-container>\r\n <th></th>\r\n </tr>\r\n </thead>\r\n <tbody>\r\n <tr\r\n class=\"facet-value\"\r\n *ngFor=\"let value of values; let i = index\"\r\n [formGroup]=\"detailForm.get(['values', i])\"\r\n >\r\n <td class=\"align-middle\">\r\n <vdr-entity-info [entity]=\"value\"></vdr-entity-info>\r\n </td>\r\n <td class=\"align-middle\">\r\n <input\r\n type=\"text\"\r\n formControlName=\"name\"\r\n [readonly]=\"!(updatePermission | hasPermission)\"\r\n (input)=\"updateValueCode(entity?.values[i]?.code, $event.target.value, i)\"\r\n />\r\n </td>\r\n <td class=\"align-middle\">\r\n <input type=\"text\" formControlName=\"code\" />\r\n </td>\r\n <td class=\"\" *ngIf=\"customValueFields.length\">\r\n <vdr-tabbed-custom-fields\r\n entityName=\"FacetValue\"\r\n [customFields]=\"customValueFields\"\r\n [compact]=\"true\"\r\n [customFieldsFormGroup]=\"detailForm.get(['values', i, 'customFields'])\"\r\n [readonly]=\"!(updatePermission | hasPermission)\"\r\n ></vdr-tabbed-custom-fields>\r\n </td>\r\n <td class=\"align-middle\">\r\n <vdr-dropdown>\r\n <button type=\"button\" class=\"btn btn-link btn-sm\" vdrDropdownTrigger>\r\n {{ 'common.actions' | translate }}\r\n <clr-icon shape=\"caret down\"></clr-icon>\r\n </button>\r\n <vdr-dropdown-menu vdrPosition=\"bottom-right\">\r\n <button\r\n type=\"button\"\r\n class=\"delete-button\"\r\n (click)=\"deleteFacetValue(entity?.values[i]?.id, i)\"\r\n [disabled]=\"!(updatePermission | hasPermission)\"\r\n vdrDropdownItem\r\n >\r\n <clr-icon shape=\"trash\" class=\"is-danger\"></clr-icon>\r\n {{ 'common.delete' | translate }}\r\n </button>\r\n </vdr-dropdown-menu>\r\n </vdr-dropdown>\r\n </td>\r\n </tr>\r\n </tbody>\r\n </table>\r\n\r\n <div>\r\n <button\r\n type=\"button\"\r\n class=\"button m-3\"\r\n *vdrIfPermissions=\"['CreateCatalog', 'CreateFacet']\"\r\n (click)=\"addFacetValue()\"\r\n >\r\n <clr-icon shape=\"add\"></clr-icon>\r\n {{ 'catalog.add-facet-value' | translate }}\r\n </button>\r\n </div>\r\n </vdr-card>\r\n </vdr-page-block>\r\n </vdr-page-detail-layout>\r\n</form>\r\n", styles: [".visible-toggle{margin-top:-3px!important}\n"], dependencies: [{ kind: "directive", type: i3.ClrIconCustomTag, selector: "clr-icon" }, { kind: "directive", type: i3.ClrLabel, selector: "label", inputs: ["for"] }, { kind: "directive", type: i3.ClrCheckbox, selector: "[clrCheckbox],[clrToggle]" }, { kind: "component", type: i3.ClrCheckboxWrapper, selector: "clr-checkbox-wrapper,clr-toggle-wrapper" }, { kind: "directive", type: i3$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i3$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2.CheckboxControlValueAccessor, selector: "input[type=checkbox][formControlName],input[type=checkbox][formControl],input[type=checkbox][ngModel]" }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i2.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i2.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "directive", type: i2.FormGroupName, selector: "[formGroupName]", inputs: ["formGroupName"] }, { kind: "directive", type: i2.FormArrayName, selector: "[formArrayName]", inputs: ["formArrayName"] }, { kind: "component", type: i1.ActionBarComponent, selector: "vdr-action-bar" }, { kind: "component", type: i1.ActionBarLeftComponent, selector: "vdr-ab-left", inputs: ["grow"] }, { kind: "component", type: i1.ActionBarRightComponent, selector: "vdr-ab-right", inputs: ["grow"] }, { kind: "component", type: i1.FormFieldComponent, selector: "vdr-form-field", inputs: ["label", "for", "tooltip", "errors", "readOnlyToggle"] }, { kind: "directive", type: i1.FormFieldControlDirective, selector: "input, textarea, select" }, { kind: "component", type: i1.LanguageSelectorComponent, selector: "vdr-language-selector", inputs: ["currentLanguageCode", "availableLanguageCodes", "disabled"], outputs: ["languageCodeChange"] }, { kind: "component", type: i1.DropdownComponent, selector: "vdr-dropdown", inputs: ["manualToggle"] }, { kind: "component", type: i1.DropdownMenuComponent, selector: "vdr-dropdown-menu", inputs: ["vdrPosition", "customClasses"] }, { kind: "directive", type: i1.DropdownTriggerDirective, selector: "[vdrDropdownTrigger]" }, { kind: "directive", type: i1.DropdownItemDirective, selector: "[vdrDropdownItem]" }, { kind: "directive", type: i1.IfPermissionsDirective, selector: "[vdrIfPermissions]", inputs: ["vdrIfPermissions", "vdrIfPermissionsElse"] }, { kind: "component", type: i1.ActionBarItemsComponent, selector: "vdr-action-bar-items", inputs: ["locationId"] }, { kind: "directive", type: i1.DisabledDirective, selector: "[vdrDisabled]", inputs: ["vdrDisabled"] }, { kind: "component", type: i1.EntityInfoComponent, selector: "vdr-entity-info", inputs: ["small", "entity"] }, { kind: "component", type: i1.TabbedCustomFieldsComponent, selector: "vdr-tabbed-custom-fields", inputs: ["entityName", "customFields", "customFieldsFormGroup", "readonly", "compact", "showLabel"] }, { kind: "component", type: i1.CustomDetailComponentHostComponent, selector: "vdr-custom-detail-component-host", inputs: ["locationId", "entity$", "detailForm"] }, { kind: "component", type: i1.PageBlockComponent, selector: "vdr-page-block" }, { kind: "component", type: i1.PageEntityInfoComponent, selector: "vdr-page-entity-info", inputs: ["entity"] }, { kind: "component", type: i1.PageDetailLayoutComponent, selector: "vdr-page-detail-layout" }, { kind: "component", type: i1.PageDetailSidebarComponent, selector: "vdr-page-detail-sidebar" }, { kind: "component", type: i1.CardComponent, selector: "vdr-card", inputs: ["title", "paddingX"] }, { kind: "pipe", type: i3$1.AsyncPipe, name: "async" }, { kind: "pipe", type: i5.TranslatePipe, name: "translate" }, { kind: "pipe", type: i1.HasPermissionPipe, name: "hasPermission" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
3061
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.2", type: FacetDetailComponent, selector: "vdr-facet-detail", usesInheritance: true, ngImport: i0, template: "<vdr-page-block>\r\n <vdr-action-bar>\r\n <vdr-ab-left>\r\n <vdr-language-selector\r\n [disabled]=\"isNew$ | async\"\r\n [availableLanguageCodes]=\"availableLanguages$ | async\"\r\n [currentLanguageCode]=\"languageCode$ | async\"\r\n (languageCodeChange)=\"setLanguage($event)\"\r\n ></vdr-language-selector>\r\n </vdr-ab-left>\r\n\r\n <vdr-ab-right>\r\n <vdr-action-bar-items locationId=\"facet-detail\"></vdr-action-bar-items>\r\n <button\r\n class=\"btn btn-primary\"\r\n *ngIf=\"isNew$ | async; else updateButton\"\r\n (click)=\"create()\"\r\n [disabled]=\"detailForm.invalid || detailForm.pristine\"\r\n >\r\n {{ 'common.create' | translate }}\r\n </button>\r\n <ng-template #updateButton>\r\n <button\r\n *vdrIfPermissions=\"updatePermission\"\r\n class=\"btn btn-primary\"\r\n (click)=\"save()\"\r\n [disabled]=\"detailForm.invalid || detailForm.pristine\"\r\n >\r\n {{ 'common.update' | translate }}\r\n </button>\r\n </ng-template>\r\n </vdr-ab-right>\r\n </vdr-action-bar>\r\n</vdr-page-block>\r\n<form class=\"form\" [formGroup]=\"detailForm\">\r\n <vdr-page-detail-layout>\r\n <vdr-page-detail-sidebar formGroupName=\"facet\">\r\n <vdr-card>\r\n <vdr-form-field [label]=\"'catalog.visibility' | translate\" for=\"visibility\">\r\n <clr-toggle-wrapper>\r\n <input\r\n type=\"checkbox\"\r\n clrToggle\r\n [vdrDisabled]=\"!(updatePermission | hasPermission)\"\r\n formControlName=\"visible\"\r\n id=\"visibility\"\r\n />\r\n <label class=\"visible-toggle\">\r\n <ng-container *ngIf=\"detailForm.value.facet?.visible; else private\">{{\r\n 'catalog.public' | translate\r\n }}</ng-container>\r\n <ng-template #private>{{ 'catalog.private' | translate }}</ng-template>\r\n </label>\r\n </clr-toggle-wrapper>\r\n </vdr-form-field>\r\n </vdr-card>\r\n <vdr-card>\r\n <vdr-page-entity-info *ngIf=\"entity$ | async as entity\" [entity]=\"entity\" />\r\n </vdr-card>\r\n </vdr-page-detail-sidebar>\r\n <vdr-page-block>\r\n <vdr-card formGroupName=\"facet\">\r\n <div class=\"form-grid\">\r\n <vdr-form-field [label]=\"'common.name' | translate\" for=\"name\">\r\n <input\r\n id=\"name\"\r\n type=\"text\"\r\n formControlName=\"name\"\r\n [readonly]=\"!(updatePermission | hasPermission)\"\r\n (input)=\"updateCode(entity?.code, $event.target.value)\"\r\n />\r\n </vdr-form-field>\r\n <vdr-form-field [label]=\"'common.code' | translate\" for=\"code\">\r\n <input\r\n id=\"code\"\r\n type=\"text\"\r\n [readonly]=\"!(updatePermission | hasPermission)\"\r\n formControlName=\"code\"\r\n />\r\n </vdr-form-field>\r\n </div>\r\n </vdr-card>\r\n <vdr-card [title]=\"'common.custom-fields' | translate\" *ngIf=\"customFields.length\">\r\n <vdr-tabbed-custom-fields\r\n entityName=\"Facet\"\r\n [customFields]=\"customFields\"\r\n [customFieldsFormGroup]=\"detailForm.get('facet.customFields')\"\r\n [readonly]=\"!(updatePermission | hasPermission)\"\r\n />\r\n </vdr-card>\r\n\r\n <vdr-custom-detail-component-host\r\n locationId=\"facet-detail\"\r\n [entity$]=\"entity$\"\r\n [detailForm]=\"detailForm\"\r\n ></vdr-custom-detail-component-host>\r\n\r\n <vdr-card\r\n *ngIf=\"!(isNew$ | async)\"\r\n [title]=\"'catalog.facet-values' | translate\"\r\n [paddingX]=\"false\"\r\n >\r\n <ng-template vdrCardControls>\r\n <input\r\n type=\"text\"\r\n class=\"mr-3\"\r\n [formControl]=\"filterControl\"\r\n [placeholder]=\"'catalog.filter-by-name' | translate\"\r\n />\r\n </ng-template>\r\n <ng-container *ngIf=\"filteredValues$ | async as filteredValues\">\r\n <table class=\"facet-values-list table\" formArrayName=\"values\">\r\n <thead>\r\n <tr>\r\n <th></th>\r\n <th>{{ 'common.name' | translate }}</th>\r\n <th>{{ 'common.code' | translate }}</th>\r\n <ng-container *ngIf=\"customValueFields.length\">\r\n <th>{{ 'common.custom-fields' | translate }}</th>\r\n </ng-container>\r\n <th></th>\r\n </tr>\r\n </thead>\r\n <tbody>\r\n <tr\r\n class=\"facet-value\"\r\n *ngFor=\"\r\n let value of filteredValues\r\n | paginate\r\n : {\r\n currentPage: currentPage,\r\n itemsPerPage: itemsPerPage,\r\n totalItems: filteredValues.length\r\n };\r\n let i = index\r\n \"\r\n [formGroup]=\"detailForm.get(['values', value.id])\"\r\n >\r\n <td class=\"align-middle\">\r\n <vdr-entity-info [entity]=\"value\"></vdr-entity-info>\r\n </td>\r\n <td class=\"align-middle\">\r\n <input\r\n type=\"text\"\r\n formControlName=\"name\"\r\n [readonly]=\"!(updatePermission | hasPermission)\"\r\n (input)=\"updateValueCode(value.code, $event.target.value, value.id)\"\r\n />\r\n </td>\r\n <td class=\"align-middle\">\r\n <input type=\"text\" formControlName=\"code\" />\r\n </td>\r\n <td class=\"\" *ngIf=\"customValueFields.length\">\r\n <vdr-tabbed-custom-fields\r\n entityName=\"FacetValue\"\r\n [customFields]=\"customValueFields\"\r\n [compact]=\"true\"\r\n [customFieldsFormGroup]=\"\r\n detailForm.get(['values', value.id, 'customFields'])\r\n \"\r\n [readonly]=\"!(updatePermission | hasPermission)\"\r\n ></vdr-tabbed-custom-fields>\r\n </td>\r\n <td class=\"align-middle\">\r\n <vdr-dropdown>\r\n <button type=\"button\" class=\"icon-button\" vdrDropdownTrigger>\r\n <clr-icon shape=\"ellipsis-vertical\"></clr-icon>\r\n </button>\r\n <vdr-dropdown-menu vdrPosition=\"bottom-right\">\r\n <button\r\n type=\"button\"\r\n class=\"delete-button\"\r\n (click)=\"deleteFacetValue(value.id)\"\r\n [disabled]=\"!(updatePermission | hasPermission)\"\r\n vdrDropdownItem\r\n >\r\n <clr-icon shape=\"trash\" class=\"is-danger\"></clr-icon>\r\n {{ 'common.delete' | translate }}\r\n </button>\r\n </vdr-dropdown-menu>\r\n </vdr-dropdown>\r\n </td>\r\n </tr>\r\n </tbody>\r\n </table>\r\n <div class=\"pagination-wrapper\">\r\n <vdr-items-per-page-controls\r\n [itemsPerPage]=\"itemsPerPage\"\r\n (itemsPerPageChange)=\"itemsPerPage = $event\"\r\n ></vdr-items-per-page-controls>\r\n <vdr-pagination-controls\r\n [currentPage]=\"currentPage\"\r\n [itemsPerPage]=\"itemsPerPage\"\r\n [totalItems]=\"filteredValues.length\"\r\n (pageChange)=\"currentPage = $event\"\r\n ></vdr-pagination-controls>\r\n </div>\r\n </ng-container>\r\n <div>\r\n <button\r\n type=\"button\"\r\n class=\"button m-3\"\r\n *vdrIfPermissions=\"['CreateCatalog', 'CreateFacet']\"\r\n (click)=\"addFacetValue()\"\r\n >\r\n <clr-icon shape=\"add\"></clr-icon>\r\n {{ 'catalog.add-facet-value' | translate }}\r\n </button>\r\n </div>\r\n </vdr-card>\r\n </vdr-page-block>\r\n </vdr-page-detail-layout>\r\n</form>\r\n", styles: [".visible-toggle{margin-top:-3px!important}tr.facet-value td{vertical-align:middle}.pagination-wrapper{display:flex;justify-content:space-between;padding:var(--card-padding)}\n"], dependencies: [{ kind: "directive", type: i3.ClrIconCustomTag, selector: "clr-icon" }, { kind: "directive", type: i3.ClrLabel, selector: "label", inputs: ["for"] }, { kind: "directive", type: i3.ClrCheckbox, selector: "[clrCheckbox],[clrToggle]" }, { kind: "component", type: i3.ClrCheckboxWrapper, selector: "clr-checkbox-wrapper,clr-toggle-wrapper" }, { kind: "directive", type: i3$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i3$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2.CheckboxControlValueAccessor, selector: "input[type=checkbox][formControlName],input[type=checkbox][formControl],input[type=checkbox][ngModel]" }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i2.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "directive", type: i2.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i2.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "directive", type: i2.FormGroupName, selector: "[formGroupName]", inputs: ["formGroupName"] }, { kind: "directive", type: i2.FormArrayName, selector: "[formArrayName]", inputs: ["formArrayName"] }, { kind: "component", type: i1.ActionBarComponent, selector: "vdr-action-bar" }, { kind: "component", type: i1.ActionBarLeftComponent, selector: "vdr-ab-left", inputs: ["grow"] }, { kind: "component", type: i1.ActionBarRightComponent, selector: "vdr-ab-right", inputs: ["grow"] }, { kind: "component", type: i1.ItemsPerPageControlsComponent, selector: "vdr-items-per-page-controls", inputs: ["itemsPerPage"], outputs: ["itemsPerPageChange"] }, { kind: "component", type: i1.PaginationControlsComponent, selector: "vdr-pagination-controls", inputs: ["id", "currentPage", "itemsPerPage", "totalItems"], outputs: ["pageChange"] }, { kind: "component", type: i1.FormFieldComponent, selector: "vdr-form-field", inputs: ["label", "for", "tooltip", "errors", "readOnlyToggle"] }, { kind: "directive", type: i1.FormFieldControlDirective, selector: "input, textarea, select" }, { kind: "component", type: i1.LanguageSelectorComponent, selector: "vdr-language-selector", inputs: ["currentLanguageCode", "availableLanguageCodes", "disabled"], outputs: ["languageCodeChange"] }, { kind: "component", type: i1.DropdownComponent, selector: "vdr-dropdown", inputs: ["manualToggle"] }, { kind: "component", type: i1.DropdownMenuComponent, selector: "vdr-dropdown-menu", inputs: ["vdrPosition", "customClasses"] }, { kind: "directive", type: i1.DropdownTriggerDirective, selector: "[vdrDropdownTrigger]" }, { kind: "directive", type: i1.DropdownItemDirective, selector: "[vdrDropdownItem]" }, { kind: "directive", type: i1.IfPermissionsDirective, selector: "[vdrIfPermissions]", inputs: ["vdrIfPermissions", "vdrIfPermissionsElse"] }, { kind: "component", type: i1.ActionBarItemsComponent, selector: "vdr-action-bar-items", inputs: ["locationId"] }, { kind: "directive", type: i1.DisabledDirective, selector: "[vdrDisabled]", inputs: ["vdrDisabled"] }, { kind: "component", type: i1.EntityInfoComponent, selector: "vdr-entity-info", inputs: ["small", "entity"] }, { kind: "component", type: i1.TabbedCustomFieldsComponent, selector: "vdr-tabbed-custom-fields", inputs: ["entityName", "customFields", "customFieldsFormGroup", "readonly", "compact", "showLabel"] }, { kind: "component", type: i1.CustomDetailComponentHostComponent, selector: "vdr-custom-detail-component-host", inputs: ["locationId", "entity$", "detailForm"] }, { kind: "component", type: i1.PageBlockComponent, selector: "vdr-page-block" }, { kind: "component", type: i1.PageEntityInfoComponent, selector: "vdr-page-entity-info", inputs: ["entity"] }, { kind: "component", type: i1.PageDetailLayoutComponent, selector: "vdr-page-detail-layout" }, { kind: "component", type: i1.PageDetailSidebarComponent, selector: "vdr-page-detail-sidebar" }, { kind: "component", type: i1.CardComponent, selector: "vdr-card", inputs: ["title", "paddingX"] }, { kind: "directive", type: i1.CardControlsDirective, selector: "[vdrCardControls]" }, { kind: "pipe", type: i3$1.AsyncPipe, name: "async" }, { kind: "pipe", type: i5$2.PaginatePipe, name: "paginate" }, { kind: "pipe", type: i5.TranslatePipe, name: "translate" }, { kind: "pipe", type: i1.HasPermissionPipe, name: "hasPermission" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
3049
3062
|
}
|
|
3050
3063
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.2", ngImport: i0, type: FacetDetailComponent, decorators: [{
|
|
3051
3064
|
type: Component,
|
|
3052
|
-
args: [{ selector: 'vdr-facet-detail', changeDetection: ChangeDetectionStrategy.OnPush, template: "<vdr-page-block>\r\n <vdr-action-bar>\r\n <vdr-ab-left>\r\n <vdr-language-selector\r\n [disabled]=\"isNew$ | async\"\r\n [availableLanguageCodes]=\"availableLanguages$ | async\"\r\n [currentLanguageCode]=\"languageCode$ | async\"\r\n (languageCodeChange)=\"setLanguage($event)\"\r\n ></vdr-language-selector>\r\n </vdr-ab-left>\r\n\r\n <vdr-ab-right>\r\n <vdr-action-bar-items locationId=\"facet-detail\"></vdr-action-bar-items>\r\n <button\r\n class=\"btn btn-primary\"\r\n *ngIf=\"isNew$ | async; else updateButton\"\r\n (click)=\"create()\"\r\n [disabled]=\"detailForm.invalid || detailForm.pristine\"\r\n >\r\n {{ 'common.create' | translate }}\r\n </button>\r\n <ng-template #updateButton>\r\n <button\r\n *vdrIfPermissions=\"updatePermission\"\r\n class=\"btn btn-primary\"\r\n (click)=\"save()\"\r\n [disabled]=\"detailForm.invalid || detailForm.pristine\"\r\n >\r\n {{ 'common.update' | translate }}\r\n </button>\r\n </ng-template>\r\n </vdr-ab-right>\r\n </vdr-action-bar>\r\n</vdr-page-block>\r\n<form class=\"form\" [formGroup]=\"detailForm\">\r\n <vdr-page-detail-layout>\r\n <vdr-page-detail-sidebar formGroupName=\"facet\">\r\n <vdr-card>\r\n <vdr-form-field [label]=\"'catalog.visibility' | translate\" for=\"visibility\">\r\n <clr-toggle-wrapper>\r\n <input\r\n type=\"checkbox\"\r\n clrToggle\r\n [vdrDisabled]=\"!(updatePermission | hasPermission)\"\r\n formControlName=\"visible\"\r\n id=\"visibility\"\r\n />\r\n <label class=\"visible-toggle\">\r\n <ng-container *ngIf=\"detailForm.value.facet?.visible; else private\">{{\r\n 'catalog.public' | translate\r\n }}</ng-container>\r\n <ng-template #private>{{ 'catalog.private' | translate }}</ng-template>\r\n </label>\r\n </clr-toggle-wrapper>\r\n </vdr-form-field>\r\n </vdr-card>\r\n <vdr-card>\r\n <vdr-page-entity-info *ngIf=\"entity$ | async as entity\" [entity]=\"entity\" />\r\n </vdr-card>\r\n </vdr-page-detail-sidebar>\r\n <vdr-page-block>\r\n <vdr-card formGroupName=\"facet\">\r\n <div class=\"form-grid\">\r\n <vdr-form-field [label]=\"'common.name' | translate\" for=\"name\">\r\n <input\r\n id=\"name\"\r\n type=\"text\"\r\n formControlName=\"name\"\r\n [readonly]=\"!(updatePermission | hasPermission)\"\r\n (input)=\"updateCode(entity?.code, $event.target.value)\"\r\n />\r\n </vdr-form-field>\r\n <vdr-form-field [label]=\"'common.code' | translate\" for=\"code\">\r\n <input\r\n id=\"code\"\r\n type=\"text\"\r\n [readonly]=\"!(updatePermission | hasPermission)\"\r\n formControlName=\"code\"\r\n />\r\n </vdr-form-field>\r\n </div>\r\n </vdr-card>\r\n <vdr-card [title]=\"'common.custom-fields' | translate\" *ngIf=\"customFields.length\">\r\n <vdr-tabbed-custom-fields\r\n entityName=\"Facet\"\r\n [customFields]=\"customFields\"\r\n [customFieldsFormGroup]=\"detailForm.get('facet.customFields')\"\r\n [readonly]=\"!(updatePermission | hasPermission)\"\r\n />\r\n </vdr-card>\r\n\r\n <vdr-custom-detail-component-host\r\n locationId=\"facet-detail\"\r\n [entity$]=\"entity$\"\r\n [detailForm]=\"detailForm\"\r\n ></vdr-custom-detail-component-host>\r\n\r\n <vdr-card\r\n *ngIf=\"!(isNew$ | async)\"\r\n [title]=\"'catalog.facet-values' | translate\"\r\n [paddingX]=\"false\"\r\n >\r\n <table\r\n class=\"facet-values-list table\"\r\n formArrayName=\"values\"\r\n *ngIf=\"0 < getValuesFormArray().length\"\r\n >\r\n <thead>\r\n <tr>\r\n <th></th>\r\n <th>{{ 'common.name' | translate }}</th>\r\n <th>{{ 'common.code' | translate }}</th>\r\n <ng-container *ngIf=\"customValueFields.length\">\r\n <th>{{ 'common.custom-fields' | translate }}</th>\r\n </ng-container>\r\n <th></th>\r\n </tr>\r\n </thead>\r\n <tbody>\r\n <tr\r\n class=\"facet-value\"\r\n *ngFor=\"let value of values; let i = index\"\r\n [formGroup]=\"detailForm.get(['values', i])\"\r\n >\r\n <td class=\"align-middle\">\r\n <vdr-entity-info [entity]=\"value\"></vdr-entity-info>\r\n </td>\r\n <td class=\"align-middle\">\r\n <input\r\n type=\"text\"\r\n formControlName=\"name\"\r\n [readonly]=\"!(updatePermission | hasPermission)\"\r\n (input)=\"updateValueCode(entity?.values[i]?.code, $event.target.value, i)\"\r\n />\r\n </td>\r\n <td class=\"align-middle\">\r\n <input type=\"text\" formControlName=\"code\" />\r\n </td>\r\n <td class=\"\" *ngIf=\"customValueFields.length\">\r\n <vdr-tabbed-custom-fields\r\n entityName=\"FacetValue\"\r\n [customFields]=\"customValueFields\"\r\n [compact]=\"true\"\r\n [customFieldsFormGroup]=\"detailForm.get(['values', i, 'customFields'])\"\r\n [readonly]=\"!(updatePermission | hasPermission)\"\r\n ></vdr-tabbed-custom-fields>\r\n </td>\r\n <td class=\"align-middle\">\r\n <vdr-dropdown>\r\n <button type=\"button\" class=\"btn btn-link btn-sm\" vdrDropdownTrigger>\r\n {{ 'common.actions' | translate }}\r\n <clr-icon shape=\"caret down\"></clr-icon>\r\n </button>\r\n <vdr-dropdown-menu vdrPosition=\"bottom-right\">\r\n <button\r\n type=\"button\"\r\n class=\"delete-button\"\r\n (click)=\"deleteFacetValue(entity?.values[i]?.id, i)\"\r\n [disabled]=\"!(updatePermission | hasPermission)\"\r\n vdrDropdownItem\r\n >\r\n <clr-icon shape=\"trash\" class=\"is-danger\"></clr-icon>\r\n {{ 'common.delete' | translate }}\r\n </button>\r\n </vdr-dropdown-menu>\r\n </vdr-dropdown>\r\n </td>\r\n </tr>\r\n </tbody>\r\n </table>\r\n\r\n <div>\r\n <button\r\n type=\"button\"\r\n class=\"button m-3\"\r\n *vdrIfPermissions=\"['CreateCatalog', 'CreateFacet']\"\r\n (click)=\"addFacetValue()\"\r\n >\r\n <clr-icon shape=\"add\"></clr-icon>\r\n {{ 'catalog.add-facet-value' | translate }}\r\n </button>\r\n </div>\r\n </vdr-card>\r\n </vdr-page-block>\r\n </vdr-page-detail-layout>\r\n</form>\r\n", styles: [".visible-toggle{margin-top:-3px!important}\n"] }]
|
|
3065
|
+
args: [{ selector: 'vdr-facet-detail', changeDetection: ChangeDetectionStrategy.OnPush, template: "<vdr-page-block>\r\n <vdr-action-bar>\r\n <vdr-ab-left>\r\n <vdr-language-selector\r\n [disabled]=\"isNew$ | async\"\r\n [availableLanguageCodes]=\"availableLanguages$ | async\"\r\n [currentLanguageCode]=\"languageCode$ | async\"\r\n (languageCodeChange)=\"setLanguage($event)\"\r\n ></vdr-language-selector>\r\n </vdr-ab-left>\r\n\r\n <vdr-ab-right>\r\n <vdr-action-bar-items locationId=\"facet-detail\"></vdr-action-bar-items>\r\n <button\r\n class=\"btn btn-primary\"\r\n *ngIf=\"isNew$ | async; else updateButton\"\r\n (click)=\"create()\"\r\n [disabled]=\"detailForm.invalid || detailForm.pristine\"\r\n >\r\n {{ 'common.create' | translate }}\r\n </button>\r\n <ng-template #updateButton>\r\n <button\r\n *vdrIfPermissions=\"updatePermission\"\r\n class=\"btn btn-primary\"\r\n (click)=\"save()\"\r\n [disabled]=\"detailForm.invalid || detailForm.pristine\"\r\n >\r\n {{ 'common.update' | translate }}\r\n </button>\r\n </ng-template>\r\n </vdr-ab-right>\r\n </vdr-action-bar>\r\n</vdr-page-block>\r\n<form class=\"form\" [formGroup]=\"detailForm\">\r\n <vdr-page-detail-layout>\r\n <vdr-page-detail-sidebar formGroupName=\"facet\">\r\n <vdr-card>\r\n <vdr-form-field [label]=\"'catalog.visibility' | translate\" for=\"visibility\">\r\n <clr-toggle-wrapper>\r\n <input\r\n type=\"checkbox\"\r\n clrToggle\r\n [vdrDisabled]=\"!(updatePermission | hasPermission)\"\r\n formControlName=\"visible\"\r\n id=\"visibility\"\r\n />\r\n <label class=\"visible-toggle\">\r\n <ng-container *ngIf=\"detailForm.value.facet?.visible; else private\">{{\r\n 'catalog.public' | translate\r\n }}</ng-container>\r\n <ng-template #private>{{ 'catalog.private' | translate }}</ng-template>\r\n </label>\r\n </clr-toggle-wrapper>\r\n </vdr-form-field>\r\n </vdr-card>\r\n <vdr-card>\r\n <vdr-page-entity-info *ngIf=\"entity$ | async as entity\" [entity]=\"entity\" />\r\n </vdr-card>\r\n </vdr-page-detail-sidebar>\r\n <vdr-page-block>\r\n <vdr-card formGroupName=\"facet\">\r\n <div class=\"form-grid\">\r\n <vdr-form-field [label]=\"'common.name' | translate\" for=\"name\">\r\n <input\r\n id=\"name\"\r\n type=\"text\"\r\n formControlName=\"name\"\r\n [readonly]=\"!(updatePermission | hasPermission)\"\r\n (input)=\"updateCode(entity?.code, $event.target.value)\"\r\n />\r\n </vdr-form-field>\r\n <vdr-form-field [label]=\"'common.code' | translate\" for=\"code\">\r\n <input\r\n id=\"code\"\r\n type=\"text\"\r\n [readonly]=\"!(updatePermission | hasPermission)\"\r\n formControlName=\"code\"\r\n />\r\n </vdr-form-field>\r\n </div>\r\n </vdr-card>\r\n <vdr-card [title]=\"'common.custom-fields' | translate\" *ngIf=\"customFields.length\">\r\n <vdr-tabbed-custom-fields\r\n entityName=\"Facet\"\r\n [customFields]=\"customFields\"\r\n [customFieldsFormGroup]=\"detailForm.get('facet.customFields')\"\r\n [readonly]=\"!(updatePermission | hasPermission)\"\r\n />\r\n </vdr-card>\r\n\r\n <vdr-custom-detail-component-host\r\n locationId=\"facet-detail\"\r\n [entity$]=\"entity$\"\r\n [detailForm]=\"detailForm\"\r\n ></vdr-custom-detail-component-host>\r\n\r\n <vdr-card\r\n *ngIf=\"!(isNew$ | async)\"\r\n [title]=\"'catalog.facet-values' | translate\"\r\n [paddingX]=\"false\"\r\n >\r\n <ng-template vdrCardControls>\r\n <input\r\n type=\"text\"\r\n class=\"mr-3\"\r\n [formControl]=\"filterControl\"\r\n [placeholder]=\"'catalog.filter-by-name' | translate\"\r\n />\r\n </ng-template>\r\n <ng-container *ngIf=\"filteredValues$ | async as filteredValues\">\r\n <table class=\"facet-values-list table\" formArrayName=\"values\">\r\n <thead>\r\n <tr>\r\n <th></th>\r\n <th>{{ 'common.name' | translate }}</th>\r\n <th>{{ 'common.code' | translate }}</th>\r\n <ng-container *ngIf=\"customValueFields.length\">\r\n <th>{{ 'common.custom-fields' | translate }}</th>\r\n </ng-container>\r\n <th></th>\r\n </tr>\r\n </thead>\r\n <tbody>\r\n <tr\r\n class=\"facet-value\"\r\n *ngFor=\"\r\n let value of filteredValues\r\n | paginate\r\n : {\r\n currentPage: currentPage,\r\n itemsPerPage: itemsPerPage,\r\n totalItems: filteredValues.length\r\n };\r\n let i = index\r\n \"\r\n [formGroup]=\"detailForm.get(['values', value.id])\"\r\n >\r\n <td class=\"align-middle\">\r\n <vdr-entity-info [entity]=\"value\"></vdr-entity-info>\r\n </td>\r\n <td class=\"align-middle\">\r\n <input\r\n type=\"text\"\r\n formControlName=\"name\"\r\n [readonly]=\"!(updatePermission | hasPermission)\"\r\n (input)=\"updateValueCode(value.code, $event.target.value, value.id)\"\r\n />\r\n </td>\r\n <td class=\"align-middle\">\r\n <input type=\"text\" formControlName=\"code\" />\r\n </td>\r\n <td class=\"\" *ngIf=\"customValueFields.length\">\r\n <vdr-tabbed-custom-fields\r\n entityName=\"FacetValue\"\r\n [customFields]=\"customValueFields\"\r\n [compact]=\"true\"\r\n [customFieldsFormGroup]=\"\r\n detailForm.get(['values', value.id, 'customFields'])\r\n \"\r\n [readonly]=\"!(updatePermission | hasPermission)\"\r\n ></vdr-tabbed-custom-fields>\r\n </td>\r\n <td class=\"align-middle\">\r\n <vdr-dropdown>\r\n <button type=\"button\" class=\"icon-button\" vdrDropdownTrigger>\r\n <clr-icon shape=\"ellipsis-vertical\"></clr-icon>\r\n </button>\r\n <vdr-dropdown-menu vdrPosition=\"bottom-right\">\r\n <button\r\n type=\"button\"\r\n class=\"delete-button\"\r\n (click)=\"deleteFacetValue(value.id)\"\r\n [disabled]=\"!(updatePermission | hasPermission)\"\r\n vdrDropdownItem\r\n >\r\n <clr-icon shape=\"trash\" class=\"is-danger\"></clr-icon>\r\n {{ 'common.delete' | translate }}\r\n </button>\r\n </vdr-dropdown-menu>\r\n </vdr-dropdown>\r\n </td>\r\n </tr>\r\n </tbody>\r\n </table>\r\n <div class=\"pagination-wrapper\">\r\n <vdr-items-per-page-controls\r\n [itemsPerPage]=\"itemsPerPage\"\r\n (itemsPerPageChange)=\"itemsPerPage = $event\"\r\n ></vdr-items-per-page-controls>\r\n <vdr-pagination-controls\r\n [currentPage]=\"currentPage\"\r\n [itemsPerPage]=\"itemsPerPage\"\r\n [totalItems]=\"filteredValues.length\"\r\n (pageChange)=\"currentPage = $event\"\r\n ></vdr-pagination-controls>\r\n </div>\r\n </ng-container>\r\n <div>\r\n <button\r\n type=\"button\"\r\n class=\"button m-3\"\r\n *vdrIfPermissions=\"['CreateCatalog', 'CreateFacet']\"\r\n (click)=\"addFacetValue()\"\r\n >\r\n <clr-icon shape=\"add\"></clr-icon>\r\n {{ 'catalog.add-facet-value' | translate }}\r\n </button>\r\n </div>\r\n </vdr-card>\r\n </vdr-page-block>\r\n </vdr-page-detail-layout>\r\n</form>\r\n", styles: [".visible-toggle{margin-top:-3px!important}tr.facet-value td{vertical-align:middle}.pagination-wrapper{display:flex;justify-content:space-between;padding:var(--card-padding)}\n"] }]
|
|
3053
3066
|
}], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }, { type: i1.DataService }, { type: i2.FormBuilder }, { type: i1.NotificationService }, { type: i1.ModalService }]; } });
|
|
3054
3067
|
|
|
3055
3068
|
const deleteFacetsBulkAction = createBulkDeleteAction({
|
|
@@ -3445,11 +3458,11 @@ class ProductVariantListComponent extends TypedBaseListComponent {
|
|
|
3445
3458
|
});
|
|
3446
3459
|
}
|
|
3447
3460
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.2", ngImport: i0, type: ProductVariantListComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
3448
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.2", type: ProductVariantListComponent, selector: "vdr-product-variant-list", inputs: { productId: "productId", hideLanguageSelect: "hideLanguageSelect" }, usesInheritance: true, ngImport: i0, template: "<vdr-page-block *ngIf=\"!hideLanguageSelect\">\r\n <vdr-language-selector\r\n [availableLanguageCodes]=\"availableLanguages$ | async\"\r\n [currentLanguageCode]=\"contentLanguage$ | async\"\r\n (languageCodeChange)=\"setLanguage($event)\"\r\n ></vdr-language-selector>\r\n</vdr-page-block>\r\n<vdr-data-table-2\r\n class=\"mt-2\"\r\n id=\"product-variant-list\"\r\n [items]=\"items$ | async\"\r\n [itemsPerPage]=\"itemsPerPage$ | async\"\r\n [totalItems]=\"totalItems$ | async\"\r\n [currentPage]=\"currentPage$ | async\"\r\n [filters]=\"filters\"\r\n (pageChange)=\"setPageNumber($event)\"\r\n (itemsPerPageChange)=\"setItemsPerPage($event)\"\r\n>\r\n <vdr-bulk-action-menu\r\n locationId=\"product-variant-list\"\r\n [hostComponent]=\"this\"\r\n [selectionManager]=\"selectionManager\"\r\n />\r\n <vdr-dt2-search\r\n [searchTermControl]=\"searchTermControl\"\r\n [searchTermPlaceholder]=\"'catalog.filter-by-sku' | translate\"\r\n />\r\n <vdr-dt2-column [heading]=\"'common.id' | translate\" id=\"id\" [hiddenByDefault]=\"true\" [sort]=\"sorts.get('id')\">\r\n <ng-template let-variant=\"item\">\r\n {{ variant.id }}\r\n </ng-template>\r\n </vdr-dt2-column>\r\n <vdr-dt2-column\r\n [heading]=\"'common.created-at' | translate\" id=\"created-at\"\r\n [hiddenByDefault]=\"true\"\r\n [sort]=\"sorts.get('createdAt')\"\r\n >\r\n <ng-template let-variant=\"item\">\r\n {{ variant.createdAt | localeDate : 'short' }}\r\n </ng-template>\r\n </vdr-dt2-column>\r\n <vdr-dt2-column\r\n [heading]=\"'common.updated-at' | translate\" id=\"updated-at\"\r\n [hiddenByDefault]=\"true\"\r\n [sort]=\"sorts.get('updatedAt')\"\r\n >\r\n <ng-template let-variant=\"item\">\r\n {{ variant.updatedAt | localeDate : 'short' }}\r\n </ng-template>\r\n </vdr-dt2-column>\r\n <vdr-dt2-column [heading]=\"'common.image' | translate\" id=\"image\">\r\n <ng-template let-variant=\"item\">\r\n <div class=\"image-placeholder\">\r\n <img\r\n *ngIf=\"variant.featuredAsset as asset; else imagePlaceholder\"\r\n [src]=\"asset | assetPreview : 'tiny'\"\r\n />\r\n <ng-template #imagePlaceholder>\r\n <div class=\"placeholder\">\r\n <clr-icon shape=\"image\" size=\"48\"></clr-icon>\r\n </div>\r\n </ng-template>\r\n </div>\r\n </ng-template>\r\n </vdr-dt2-column>\r\n <vdr-dt2-column [heading]=\"'catalog.name' | translate\" id=\"name\" [optional]=\"false\" [sort]=\"sorts.get('name')\">\r\n <ng-template let-variant=\"item\">\r\n <a\r\n class=\"button-ghost\"\r\n [routerLink]=\"['/catalog/
|
|
3461
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.2", type: ProductVariantListComponent, selector: "vdr-product-variant-list", inputs: { productId: "productId", hideLanguageSelect: "hideLanguageSelect" }, usesInheritance: true, ngImport: i0, template: "<vdr-page-block *ngIf=\"!hideLanguageSelect\">\r\n <vdr-language-selector\r\n [availableLanguageCodes]=\"availableLanguages$ | async\"\r\n [currentLanguageCode]=\"contentLanguage$ | async\"\r\n (languageCodeChange)=\"setLanguage($event)\"\r\n ></vdr-language-selector>\r\n</vdr-page-block>\r\n<vdr-data-table-2\r\n class=\"mt-2\"\r\n id=\"product-variant-list\"\r\n [items]=\"items$ | async\"\r\n [itemsPerPage]=\"itemsPerPage$ | async\"\r\n [totalItems]=\"totalItems$ | async\"\r\n [currentPage]=\"currentPage$ | async\"\r\n [filters]=\"filters\"\r\n (pageChange)=\"setPageNumber($event)\"\r\n (itemsPerPageChange)=\"setItemsPerPage($event)\"\r\n>\r\n <vdr-bulk-action-menu\r\n locationId=\"product-variant-list\"\r\n [hostComponent]=\"this\"\r\n [selectionManager]=\"selectionManager\"\r\n />\r\n <vdr-dt2-search\r\n [searchTermControl]=\"searchTermControl\"\r\n [searchTermPlaceholder]=\"'catalog.filter-by-sku' | translate\"\r\n />\r\n <vdr-dt2-column [heading]=\"'common.id' | translate\" id=\"id\" [hiddenByDefault]=\"true\" [sort]=\"sorts.get('id')\">\r\n <ng-template let-variant=\"item\">\r\n {{ variant.id }}\r\n </ng-template>\r\n </vdr-dt2-column>\r\n <vdr-dt2-column\r\n [heading]=\"'common.created-at' | translate\" id=\"created-at\"\r\n [hiddenByDefault]=\"true\"\r\n [sort]=\"sorts.get('createdAt')\"\r\n >\r\n <ng-template let-variant=\"item\">\r\n {{ variant.createdAt | localeDate : 'short' }}\r\n </ng-template>\r\n </vdr-dt2-column>\r\n <vdr-dt2-column\r\n [heading]=\"'common.updated-at' | translate\" id=\"updated-at\"\r\n [hiddenByDefault]=\"true\"\r\n [sort]=\"sorts.get('updatedAt')\"\r\n >\r\n <ng-template let-variant=\"item\">\r\n {{ variant.updatedAt | localeDate : 'short' }}\r\n </ng-template>\r\n </vdr-dt2-column>\r\n <vdr-dt2-column [heading]=\"'common.image' | translate\" id=\"image\">\r\n <ng-template let-variant=\"item\">\r\n <div class=\"image-placeholder\">\r\n <img\r\n *ngIf=\"variant.featuredAsset as asset; else imagePlaceholder\"\r\n [src]=\"asset | assetPreview : 'tiny'\"\r\n />\r\n <ng-template #imagePlaceholder>\r\n <div class=\"placeholder\">\r\n <clr-icon shape=\"image\" size=\"48\"></clr-icon>\r\n </div>\r\n </ng-template>\r\n </div>\r\n </ng-template>\r\n </vdr-dt2-column>\r\n <vdr-dt2-column [heading]=\"'catalog.name' | translate\" id=\"name\" [optional]=\"false\" [sort]=\"sorts.get('name')\">\r\n <ng-template let-variant=\"item\">\r\n <a\r\n class=\"button-ghost\"\r\n [routerLink]=\"['/catalog/products', variant.productId, 'variants', variant.id]\"\r\n ><span>{{ variant.name }}</span\r\n ><clr-icon shape=\"arrow right\"\r\n /></a>\r\n </ng-template>\r\n </vdr-dt2-column>\r\n <vdr-dt2-column [heading]=\"'catalog.sku' | translate\" id=\"sku\" [sort]=\"sorts.get('sku')\">\r\n <ng-template let-variant=\"item\">\r\n {{ variant.sku }}\r\n </ng-template>\r\n </vdr-dt2-column>\r\n <vdr-dt2-column [heading]=\"'common.enabled' | translate\" id=\"enabled\">\r\n <ng-template let-variant=\"item\">\r\n <vdr-chip *ngIf=\"variant.enabled\" colorType=\"success\">{{\r\n 'common.enabled' | translate\r\n }}</vdr-chip>\r\n <vdr-chip *ngIf=\"!variant.enabled\" colorType=\"warning\">{{\r\n 'common.disabled' | translate\r\n }}</vdr-chip>\r\n </ng-template>\r\n </vdr-dt2-column>\r\n <vdr-dt2-column\r\n [heading]=\"'common.price' | translate\" id=\"price\"\r\n [hiddenByDefault]=\"true\"\r\n [sort]=\"sorts.get('price')\"\r\n >\r\n <ng-template let-variant=\"item\">\r\n {{ variant.price | localeCurrency : variant.currencyCode }}\r\n </ng-template>\r\n </vdr-dt2-column>\r\n <vdr-dt2-column [heading]=\"'common.price-with-tax' | translate\" id=\"price-with-tax\" [sort]=\"sorts.get('priceWithTax')\">\r\n <ng-template let-variant=\"item\">\r\n {{ variant.priceWithTax | localeCurrency : variant.currencyCode }}\r\n </ng-template>\r\n </vdr-dt2-column>\r\n\r\n <vdr-dt2-column [heading]=\"'catalog.stock-on-hand' | translate\" id=\"stock-on-hand\" [hiddenByDefault]=\"false\">\r\n <ng-template let-variant=\"item\">\r\n <vdr-chip *ngFor=\"let stockLevel of variant.stockLevels\" [title]=\"stockLevel.stockLocation?.name\">\r\n <div class=\"flex center\">\r\n <div>\r\n {{ stockLevel.stockOnHand\r\n }}<span class=\"ml-1\" *ngIf=\"stockLevel.stockAllocated\"\r\n >({{ stockLevel.stockAllocated }} allocated)</span\r\n >\r\n </div>\r\n </div>\r\n </vdr-chip>\r\n </ng-template>\r\n </vdr-dt2-column>\r\n <vdr-dt2-custom-field-column *ngFor=\"let field of customFields\" [customField]=\"field\" [sorts]=\"sorts\" />\r\n</vdr-data-table-2>\r\n", styles: [".image-col{width:70px}.image-placeholder{width:50px;height:50px;margin-top:calc(var(--space-unit) * -1);margin-bottom:calc(var(--space-unit) * -1);background-color:var(--color-component-bg-200)}.image-placeholder img{border-radius:var(--border-radius-img)}.image-placeholder .placeholder{text-align:center;color:var(--color-grey-300)}.search-form{display:flex;align-items:center;width:100%}vdr-product-search-input{min-width:300px}@media screen and (max-width: 768px){vdr-product-search-input{min-width:100px}}.search-settings-menu{margin:0 12px}td.disabled{background-color:var(--color-component-bg-200)}.search-index-button{position:relative}.search-index-button vdr-status-badge{right:0;top:0}.run-updates-button{position:relative}.run-updates-button vdr-status-badge{left:10px;top:10px}.edit-button{margin-inline-end:24px}.sku{color:var(--color-text-300)}\n"], dependencies: [{ kind: "directive", type: i3.ClrIconCustomTag, selector: "clr-icon" }, { kind: "directive", type: i3$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i3$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1$1.RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "component", type: i1.ChipComponent, selector: "vdr-chip", inputs: ["icon", "invert", "colorFrom", "colorType"], outputs: ["iconClick"] }, { kind: "component", type: i1.LanguageSelectorComponent, selector: "vdr-language-selector", inputs: ["currentLanguageCode", "availableLanguageCodes", "disabled"], outputs: ["languageCodeChange"] }, { kind: "component", type: i1.BulkActionMenuComponent, selector: "vdr-bulk-action-menu", inputs: ["locationId", "selectionManager", "hostComponent"] }, { kind: "component", type: i1.DataTable2Component, selector: "vdr-data-table-2", inputs: ["id", "items", "itemsPerPage", "currentPage", "totalItems", "emptyStateLabel", "filters", "activeIndex"], outputs: ["pageChange", "itemsPerPageChange"] }, { kind: "component", type: i1.DataTable2ColumnComponent, selector: "vdr-dt2-column", inputs: ["id", "expand", "heading", "align", "sort", "optional", "hiddenByDefault", "orderable"], exportAs: ["row"] }, { kind: "component", type: i1.DataTable2SearchComponent, selector: "vdr-dt2-search", inputs: ["searchTermControl", "searchTermPlaceholder"] }, { kind: "component", type: i1.DataTableCustomFieldColumnComponent, selector: "vdr-dt2-custom-field-column", inputs: ["customField", "sorts"], exportAs: ["row"] }, { kind: "component", type: i1.PageBlockComponent, selector: "vdr-page-block" }, { kind: "pipe", type: i3$1.AsyncPipe, name: "async" }, { kind: "pipe", type: i5.TranslatePipe, name: "translate" }, { kind: "pipe", type: i1.AssetPreviewPipe, name: "assetPreview" }, { kind: "pipe", type: i1.LocaleDatePipe, name: "localeDate" }, { kind: "pipe", type: i1.LocaleCurrencyPipe, name: "localeCurrency" }] }); }
|
|
3449
3462
|
}
|
|
3450
3463
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.2", ngImport: i0, type: ProductVariantListComponent, decorators: [{
|
|
3451
3464
|
type: Component,
|
|
3452
|
-
args: [{ selector: 'vdr-product-variant-list', template: "<vdr-page-block *ngIf=\"!hideLanguageSelect\">\r\n <vdr-language-selector\r\n [availableLanguageCodes]=\"availableLanguages$ | async\"\r\n [currentLanguageCode]=\"contentLanguage$ | async\"\r\n (languageCodeChange)=\"setLanguage($event)\"\r\n ></vdr-language-selector>\r\n</vdr-page-block>\r\n<vdr-data-table-2\r\n class=\"mt-2\"\r\n id=\"product-variant-list\"\r\n [items]=\"items$ | async\"\r\n [itemsPerPage]=\"itemsPerPage$ | async\"\r\n [totalItems]=\"totalItems$ | async\"\r\n [currentPage]=\"currentPage$ | async\"\r\n [filters]=\"filters\"\r\n (pageChange)=\"setPageNumber($event)\"\r\n (itemsPerPageChange)=\"setItemsPerPage($event)\"\r\n>\r\n <vdr-bulk-action-menu\r\n locationId=\"product-variant-list\"\r\n [hostComponent]=\"this\"\r\n [selectionManager]=\"selectionManager\"\r\n />\r\n <vdr-dt2-search\r\n [searchTermControl]=\"searchTermControl\"\r\n [searchTermPlaceholder]=\"'catalog.filter-by-sku' | translate\"\r\n />\r\n <vdr-dt2-column [heading]=\"'common.id' | translate\" id=\"id\" [hiddenByDefault]=\"true\" [sort]=\"sorts.get('id')\">\r\n <ng-template let-variant=\"item\">\r\n {{ variant.id }}\r\n </ng-template>\r\n </vdr-dt2-column>\r\n <vdr-dt2-column\r\n [heading]=\"'common.created-at' | translate\" id=\"created-at\"\r\n [hiddenByDefault]=\"true\"\r\n [sort]=\"sorts.get('createdAt')\"\r\n >\r\n <ng-template let-variant=\"item\">\r\n {{ variant.createdAt | localeDate : 'short' }}\r\n </ng-template>\r\n </vdr-dt2-column>\r\n <vdr-dt2-column\r\n [heading]=\"'common.updated-at' | translate\" id=\"updated-at\"\r\n [hiddenByDefault]=\"true\"\r\n [sort]=\"sorts.get('updatedAt')\"\r\n >\r\n <ng-template let-variant=\"item\">\r\n {{ variant.updatedAt | localeDate : 'short' }}\r\n </ng-template>\r\n </vdr-dt2-column>\r\n <vdr-dt2-column [heading]=\"'common.image' | translate\" id=\"image\">\r\n <ng-template let-variant=\"item\">\r\n <div class=\"image-placeholder\">\r\n <img\r\n *ngIf=\"variant.featuredAsset as asset; else imagePlaceholder\"\r\n [src]=\"asset | assetPreview : 'tiny'\"\r\n />\r\n <ng-template #imagePlaceholder>\r\n <div class=\"placeholder\">\r\n <clr-icon shape=\"image\" size=\"48\"></clr-icon>\r\n </div>\r\n </ng-template>\r\n </div>\r\n </ng-template>\r\n </vdr-dt2-column>\r\n <vdr-dt2-column [heading]=\"'catalog.name' | translate\" id=\"name\" [optional]=\"false\" [sort]=\"sorts.get('name')\">\r\n <ng-template let-variant=\"item\">\r\n <a\r\n class=\"button-ghost\"\r\n [routerLink]=\"['/catalog/
|
|
3465
|
+
args: [{ selector: 'vdr-product-variant-list', template: "<vdr-page-block *ngIf=\"!hideLanguageSelect\">\r\n <vdr-language-selector\r\n [availableLanguageCodes]=\"availableLanguages$ | async\"\r\n [currentLanguageCode]=\"contentLanguage$ | async\"\r\n (languageCodeChange)=\"setLanguage($event)\"\r\n ></vdr-language-selector>\r\n</vdr-page-block>\r\n<vdr-data-table-2\r\n class=\"mt-2\"\r\n id=\"product-variant-list\"\r\n [items]=\"items$ | async\"\r\n [itemsPerPage]=\"itemsPerPage$ | async\"\r\n [totalItems]=\"totalItems$ | async\"\r\n [currentPage]=\"currentPage$ | async\"\r\n [filters]=\"filters\"\r\n (pageChange)=\"setPageNumber($event)\"\r\n (itemsPerPageChange)=\"setItemsPerPage($event)\"\r\n>\r\n <vdr-bulk-action-menu\r\n locationId=\"product-variant-list\"\r\n [hostComponent]=\"this\"\r\n [selectionManager]=\"selectionManager\"\r\n />\r\n <vdr-dt2-search\r\n [searchTermControl]=\"searchTermControl\"\r\n [searchTermPlaceholder]=\"'catalog.filter-by-sku' | translate\"\r\n />\r\n <vdr-dt2-column [heading]=\"'common.id' | translate\" id=\"id\" [hiddenByDefault]=\"true\" [sort]=\"sorts.get('id')\">\r\n <ng-template let-variant=\"item\">\r\n {{ variant.id }}\r\n </ng-template>\r\n </vdr-dt2-column>\r\n <vdr-dt2-column\r\n [heading]=\"'common.created-at' | translate\" id=\"created-at\"\r\n [hiddenByDefault]=\"true\"\r\n [sort]=\"sorts.get('createdAt')\"\r\n >\r\n <ng-template let-variant=\"item\">\r\n {{ variant.createdAt | localeDate : 'short' }}\r\n </ng-template>\r\n </vdr-dt2-column>\r\n <vdr-dt2-column\r\n [heading]=\"'common.updated-at' | translate\" id=\"updated-at\"\r\n [hiddenByDefault]=\"true\"\r\n [sort]=\"sorts.get('updatedAt')\"\r\n >\r\n <ng-template let-variant=\"item\">\r\n {{ variant.updatedAt | localeDate : 'short' }}\r\n </ng-template>\r\n </vdr-dt2-column>\r\n <vdr-dt2-column [heading]=\"'common.image' | translate\" id=\"image\">\r\n <ng-template let-variant=\"item\">\r\n <div class=\"image-placeholder\">\r\n <img\r\n *ngIf=\"variant.featuredAsset as asset; else imagePlaceholder\"\r\n [src]=\"asset | assetPreview : 'tiny'\"\r\n />\r\n <ng-template #imagePlaceholder>\r\n <div class=\"placeholder\">\r\n <clr-icon shape=\"image\" size=\"48\"></clr-icon>\r\n </div>\r\n </ng-template>\r\n </div>\r\n </ng-template>\r\n </vdr-dt2-column>\r\n <vdr-dt2-column [heading]=\"'catalog.name' | translate\" id=\"name\" [optional]=\"false\" [sort]=\"sorts.get('name')\">\r\n <ng-template let-variant=\"item\">\r\n <a\r\n class=\"button-ghost\"\r\n [routerLink]=\"['/catalog/products', variant.productId, 'variants', variant.id]\"\r\n ><span>{{ variant.name }}</span\r\n ><clr-icon shape=\"arrow right\"\r\n /></a>\r\n </ng-template>\r\n </vdr-dt2-column>\r\n <vdr-dt2-column [heading]=\"'catalog.sku' | translate\" id=\"sku\" [sort]=\"sorts.get('sku')\">\r\n <ng-template let-variant=\"item\">\r\n {{ variant.sku }}\r\n </ng-template>\r\n </vdr-dt2-column>\r\n <vdr-dt2-column [heading]=\"'common.enabled' | translate\" id=\"enabled\">\r\n <ng-template let-variant=\"item\">\r\n <vdr-chip *ngIf=\"variant.enabled\" colorType=\"success\">{{\r\n 'common.enabled' | translate\r\n }}</vdr-chip>\r\n <vdr-chip *ngIf=\"!variant.enabled\" colorType=\"warning\">{{\r\n 'common.disabled' | translate\r\n }}</vdr-chip>\r\n </ng-template>\r\n </vdr-dt2-column>\r\n <vdr-dt2-column\r\n [heading]=\"'common.price' | translate\" id=\"price\"\r\n [hiddenByDefault]=\"true\"\r\n [sort]=\"sorts.get('price')\"\r\n >\r\n <ng-template let-variant=\"item\">\r\n {{ variant.price | localeCurrency : variant.currencyCode }}\r\n </ng-template>\r\n </vdr-dt2-column>\r\n <vdr-dt2-column [heading]=\"'common.price-with-tax' | translate\" id=\"price-with-tax\" [sort]=\"sorts.get('priceWithTax')\">\r\n <ng-template let-variant=\"item\">\r\n {{ variant.priceWithTax | localeCurrency : variant.currencyCode }}\r\n </ng-template>\r\n </vdr-dt2-column>\r\n\r\n <vdr-dt2-column [heading]=\"'catalog.stock-on-hand' | translate\" id=\"stock-on-hand\" [hiddenByDefault]=\"false\">\r\n <ng-template let-variant=\"item\">\r\n <vdr-chip *ngFor=\"let stockLevel of variant.stockLevels\" [title]=\"stockLevel.stockLocation?.name\">\r\n <div class=\"flex center\">\r\n <div>\r\n {{ stockLevel.stockOnHand\r\n }}<span class=\"ml-1\" *ngIf=\"stockLevel.stockAllocated\"\r\n >({{ stockLevel.stockAllocated }} allocated)</span\r\n >\r\n </div>\r\n </div>\r\n </vdr-chip>\r\n </ng-template>\r\n </vdr-dt2-column>\r\n <vdr-dt2-custom-field-column *ngFor=\"let field of customFields\" [customField]=\"field\" [sorts]=\"sorts\" />\r\n</vdr-data-table-2>\r\n", styles: [".image-col{width:70px}.image-placeholder{width:50px;height:50px;margin-top:calc(var(--space-unit) * -1);margin-bottom:calc(var(--space-unit) * -1);background-color:var(--color-component-bg-200)}.image-placeholder img{border-radius:var(--border-radius-img)}.image-placeholder .placeholder{text-align:center;color:var(--color-grey-300)}.search-form{display:flex;align-items:center;width:100%}vdr-product-search-input{min-width:300px}@media screen and (max-width: 768px){vdr-product-search-input{min-width:100px}}.search-settings-menu{margin:0 12px}td.disabled{background-color:var(--color-component-bg-200)}.search-index-button{position:relative}.search-index-button vdr-status-badge{right:0;top:0}.run-updates-button{position:relative}.run-updates-button vdr-status-badge{left:10px;top:10px}.edit-button{margin-inline-end:24px}.sku{color:var(--color-text-300)}\n"] }]
|
|
3453
3466
|
}], ctorParameters: function () { return []; }, propDecorators: { productId: [{
|
|
3454
3467
|
type: Input
|
|
3455
3468
|
}], hideLanguageSelect: [{
|
|
@@ -4096,7 +4109,7 @@ class ProductVariantQuickJumpComponent {
|
|
|
4096
4109
|
onSelect(item) {
|
|
4097
4110
|
if (item) {
|
|
4098
4111
|
this.router
|
|
4099
|
-
.navigate(['catalog', '
|
|
4112
|
+
.navigate(['catalog', 'products', this.productId, 'variants', item.id])
|
|
4100
4113
|
.then(() => (this.selectedVariantId = undefined));
|
|
4101
4114
|
}
|
|
4102
4115
|
}
|
|
@@ -4505,274 +4518,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.2", ngImpor
|
|
|
4505
4518
|
type: Input
|
|
4506
4519
|
}] } });
|
|
4507
4520
|
|
|
4508
|
-
const STOCK_LOCATION_DETAIL_FRAGMENT = gql `
|
|
4509
|
-
fragment StockLocationDetail on StockLocation {
|
|
4510
|
-
id
|
|
4511
|
-
createdAt
|
|
4512
|
-
updatedAt
|
|
4513
|
-
name
|
|
4514
|
-
description
|
|
4515
|
-
}
|
|
4516
|
-
`;
|
|
4517
|
-
const GET_STOCK_LOCATION_DETAIL = gql `
|
|
4518
|
-
query GetStockLocationDetail($id: ID!) {
|
|
4519
|
-
stockLocation(id: $id) {
|
|
4520
|
-
...StockLocationDetail
|
|
4521
|
-
}
|
|
4522
|
-
}
|
|
4523
|
-
${STOCK_LOCATION_DETAIL_FRAGMENT}
|
|
4524
|
-
`;
|
|
4525
|
-
const CREATE_STOCK_LOCATION = gql `
|
|
4526
|
-
mutation CreateStockLocation($input: CreateStockLocationInput!) {
|
|
4527
|
-
createStockLocation(input: $input) {
|
|
4528
|
-
...StockLocationDetail
|
|
4529
|
-
}
|
|
4530
|
-
}
|
|
4531
|
-
${STOCK_LOCATION_DETAIL_FRAGMENT}
|
|
4532
|
-
`;
|
|
4533
|
-
const UPDATE_STOCK_LOCATION = gql `
|
|
4534
|
-
mutation UpdateStockLocation($input: UpdateStockLocationInput!) {
|
|
4535
|
-
updateStockLocation(input: $input) {
|
|
4536
|
-
...StockLocationDetail
|
|
4537
|
-
}
|
|
4538
|
-
}
|
|
4539
|
-
${STOCK_LOCATION_DETAIL_FRAGMENT}
|
|
4540
|
-
`;
|
|
4541
|
-
class StockLocationDetailComponent extends TypedBaseDetailComponent {
|
|
4542
|
-
constructor(changeDetector, dataService, formBuilder, notificationService) {
|
|
4543
|
-
super();
|
|
4544
|
-
this.changeDetector = changeDetector;
|
|
4545
|
-
this.dataService = dataService;
|
|
4546
|
-
this.formBuilder = formBuilder;
|
|
4547
|
-
this.notificationService = notificationService;
|
|
4548
|
-
this.customFields = this.getCustomFieldConfig('StockLocation');
|
|
4549
|
-
this.detailForm = this.formBuilder.group({
|
|
4550
|
-
name: ['', Validators.required],
|
|
4551
|
-
description: [''],
|
|
4552
|
-
customFields: this.formBuilder.group(getCustomFieldsDefaults(this.customFields)),
|
|
4553
|
-
});
|
|
4554
|
-
}
|
|
4555
|
-
ngOnInit() {
|
|
4556
|
-
this.init();
|
|
4557
|
-
}
|
|
4558
|
-
ngOnDestroy() {
|
|
4559
|
-
this.destroy();
|
|
4560
|
-
}
|
|
4561
|
-
create() {
|
|
4562
|
-
if (!this.detailForm.dirty) {
|
|
4563
|
-
return;
|
|
4564
|
-
}
|
|
4565
|
-
const { name, description, customFields } = this.detailForm.value;
|
|
4566
|
-
if (!name) {
|
|
4567
|
-
return;
|
|
4568
|
-
}
|
|
4569
|
-
const input = {
|
|
4570
|
-
name,
|
|
4571
|
-
description,
|
|
4572
|
-
customFields,
|
|
4573
|
-
};
|
|
4574
|
-
this.dataService.mutate(CreateStockLocationDocument, { input }).subscribe(data => {
|
|
4575
|
-
this.notificationService.success(marker('common.notify-create-success'), {
|
|
4576
|
-
entity: 'StockLocation',
|
|
4577
|
-
});
|
|
4578
|
-
this.detailForm.markAsPristine();
|
|
4579
|
-
this.changeDetector.markForCheck();
|
|
4580
|
-
this.router.navigate(['../', data.createStockLocation.id], { relativeTo: this.route });
|
|
4581
|
-
}, err => {
|
|
4582
|
-
this.notificationService.error(marker('common.notify-create-error'), {
|
|
4583
|
-
entity: 'StockLocation',
|
|
4584
|
-
});
|
|
4585
|
-
});
|
|
4586
|
-
}
|
|
4587
|
-
save() {
|
|
4588
|
-
if (!this.detailForm.dirty) {
|
|
4589
|
-
return;
|
|
4590
|
-
}
|
|
4591
|
-
const formValue = this.detailForm.value;
|
|
4592
|
-
this.entity$
|
|
4593
|
-
.pipe(take(1), mergeMap(taxRate => {
|
|
4594
|
-
const input = {
|
|
4595
|
-
id: taxRate.id,
|
|
4596
|
-
name: formValue.name,
|
|
4597
|
-
description: formValue.description,
|
|
4598
|
-
customFields: formValue.customFields,
|
|
4599
|
-
};
|
|
4600
|
-
return this.dataService.mutate(UpdateStockLocationDocument, { input });
|
|
4601
|
-
}))
|
|
4602
|
-
.subscribe(data => {
|
|
4603
|
-
this.notificationService.success(marker('common.notify-update-success'), {
|
|
4604
|
-
entity: 'StockLocation',
|
|
4605
|
-
});
|
|
4606
|
-
this.detailForm.markAsPristine();
|
|
4607
|
-
this.changeDetector.markForCheck();
|
|
4608
|
-
}, err => {
|
|
4609
|
-
this.notificationService.error(marker('common.notify-update-error'), {
|
|
4610
|
-
entity: 'StockLocation',
|
|
4611
|
-
});
|
|
4612
|
-
});
|
|
4613
|
-
}
|
|
4614
|
-
/**
|
|
4615
|
-
* Update the form values when the entity changes.
|
|
4616
|
-
*/
|
|
4617
|
-
setFormValues(entity) {
|
|
4618
|
-
this.detailForm.patchValue({
|
|
4619
|
-
name: entity.name,
|
|
4620
|
-
description: entity.description,
|
|
4621
|
-
});
|
|
4622
|
-
if (this.customFields.length) {
|
|
4623
|
-
this.setCustomFieldFormValues(this.customFields, this.detailForm.get('customFields'), entity);
|
|
4624
|
-
}
|
|
4625
|
-
}
|
|
4626
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.2", ngImport: i0, type: StockLocationDetailComponent, deps: [{ token: i0.ChangeDetectorRef }, { token: i1.DataService }, { token: i2.FormBuilder }, { token: i1.NotificationService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
4627
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.2", type: StockLocationDetailComponent, selector: "vdr-stock-location-detail", usesInheritance: true, ngImport: i0, template: "<vdr-page-block>\r\n <vdr-action-bar>\r\n <vdr-ab-left></vdr-ab-left>\r\n\r\n <vdr-ab-right>\r\n <vdr-action-bar-items locationId=\"stock-location-detail\"></vdr-action-bar-items>\r\n <button\r\n class=\"btn btn-primary\"\r\n *ngIf=\"isNew$ | async; else updateButton\"\r\n (click)=\"create()\"\r\n [disabled]=\"detailForm.invalid || detailForm.pristine\"\r\n >\r\n {{ 'common.create' | translate }}\r\n </button>\r\n <ng-template #updateButton>\r\n <button\r\n class=\"btn btn-primary\"\r\n (click)=\"save()\"\r\n [disabled]=\"detailForm.invalid || detailForm.pristine\"\r\n *vdrIfPermissions=\"'UpdateStockLocation'\"\r\n >\r\n {{ 'common.update' | translate }}\r\n </button>\r\n </ng-template>\r\n </vdr-ab-right>\r\n </vdr-action-bar>\r\n</vdr-page-block>\r\n\r\n<form class=\"form\" [formGroup]=\"detailForm\">\r\n <vdr-page-detail-layout>\r\n <vdr-page-detail-sidebar>\r\n <vdr-card *ngIf=\"entity$ | async as entity\">\r\n <vdr-page-entity-info [entity]=\"entity\" />\r\n </vdr-card>\r\n </vdr-page-detail-sidebar>\r\n <vdr-page-block>\r\n <vdr-card>\r\n <div class=\"form-grid\">\r\n <vdr-form-field [label]=\"'common.name' | translate\" for=\"name\">\r\n <input\r\n id=\"name\"\r\n type=\"text\"\r\n formControlName=\"name\"\r\n [readonly]=\"!('UpdateStockLocation' | hasPermission)\"\r\n />\r\n </vdr-form-field>\r\n <vdr-form-field\r\n class=\"form-grid-span\"\r\n [label]=\"'common.description' | translate\"\r\n for=\"slug\"\r\n [errors]=\"{ pattern: 'catalog.slug-pattern-error' | translate }\"\r\n >\r\n <vdr-rich-text-editor\r\n formControlName=\"description\"\r\n [readonly]=\"!('UpdateStockLocation' | hasPermission)\"\r\n ></vdr-rich-text-editor>\r\n </vdr-form-field>\r\n </div>\r\n </vdr-card>\r\n <vdr-card\r\n formGroupName=\"customFields\"\r\n *ngIf=\"customFields.length\"\r\n [title]=\"'common.custom-fields' | translate\"\r\n >\r\n <vdr-tabbed-custom-fields\r\n entityName=\"StockLocation\"\r\n [customFields]=\"customFields\"\r\n [customFieldsFormGroup]=\"detailForm.get('customFields')\"\r\n ></vdr-tabbed-custom-fields>\r\n </vdr-card>\r\n <vdr-custom-detail-component-host\r\n locationId=\"stock-location-detail\"\r\n [entity$]=\"entity$\"\r\n [detailForm]=\"detailForm\"\r\n ></vdr-custom-detail-component-host>\r\n </vdr-page-block>\r\n </vdr-page-detail-layout>\r\n</form>\r\n", styles: [""], dependencies: [{ kind: "directive", type: i3$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i2.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i2.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "directive", type: i2.FormGroupName, selector: "[formGroupName]", inputs: ["formGroupName"] }, { kind: "component", type: i1.ActionBarComponent, selector: "vdr-action-bar" }, { kind: "component", type: i1.ActionBarLeftComponent, selector: "vdr-ab-left", inputs: ["grow"] }, { kind: "component", type: i1.ActionBarRightComponent, selector: "vdr-ab-right", inputs: ["grow"] }, { kind: "component", type: i1.FormFieldComponent, selector: "vdr-form-field", inputs: ["label", "for", "tooltip", "errors", "readOnlyToggle"] }, { kind: "directive", type: i1.FormFieldControlDirective, selector: "input, textarea, select" }, { kind: "component", type: i1.RichTextEditorComponent, selector: "vdr-rich-text-editor", inputs: ["label", "readonly"] }, { kind: "directive", type: i1.IfPermissionsDirective, selector: "[vdrIfPermissions]", inputs: ["vdrIfPermissions", "vdrIfPermissionsElse"] }, { kind: "component", type: i1.ActionBarItemsComponent, selector: "vdr-action-bar-items", inputs: ["locationId"] }, { kind: "component", type: i1.TabbedCustomFieldsComponent, selector: "vdr-tabbed-custom-fields", inputs: ["entityName", "customFields", "customFieldsFormGroup", "readonly", "compact", "showLabel"] }, { kind: "component", type: i1.CustomDetailComponentHostComponent, selector: "vdr-custom-detail-component-host", inputs: ["locationId", "entity$", "detailForm"] }, { kind: "component", type: i1.PageBlockComponent, selector: "vdr-page-block" }, { kind: "component", type: i1.PageEntityInfoComponent, selector: "vdr-page-entity-info", inputs: ["entity"] }, { kind: "component", type: i1.PageDetailLayoutComponent, selector: "vdr-page-detail-layout" }, { kind: "component", type: i1.PageDetailSidebarComponent, selector: "vdr-page-detail-sidebar" }, { kind: "component", type: i1.CardComponent, selector: "vdr-card", inputs: ["title", "paddingX"] }, { kind: "pipe", type: i3$1.AsyncPipe, name: "async" }, { kind: "pipe", type: i5.TranslatePipe, name: "translate" }, { kind: "pipe", type: i1.HasPermissionPipe, name: "hasPermission" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
4628
|
-
}
|
|
4629
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.2", ngImport: i0, type: StockLocationDetailComponent, decorators: [{
|
|
4630
|
-
type: Component,
|
|
4631
|
-
args: [{ selector: 'vdr-stock-location-detail', changeDetection: ChangeDetectionStrategy.OnPush, template: "<vdr-page-block>\r\n <vdr-action-bar>\r\n <vdr-ab-left></vdr-ab-left>\r\n\r\n <vdr-ab-right>\r\n <vdr-action-bar-items locationId=\"stock-location-detail\"></vdr-action-bar-items>\r\n <button\r\n class=\"btn btn-primary\"\r\n *ngIf=\"isNew$ | async; else updateButton\"\r\n (click)=\"create()\"\r\n [disabled]=\"detailForm.invalid || detailForm.pristine\"\r\n >\r\n {{ 'common.create' | translate }}\r\n </button>\r\n <ng-template #updateButton>\r\n <button\r\n class=\"btn btn-primary\"\r\n (click)=\"save()\"\r\n [disabled]=\"detailForm.invalid || detailForm.pristine\"\r\n *vdrIfPermissions=\"'UpdateStockLocation'\"\r\n >\r\n {{ 'common.update' | translate }}\r\n </button>\r\n </ng-template>\r\n </vdr-ab-right>\r\n </vdr-action-bar>\r\n</vdr-page-block>\r\n\r\n<form class=\"form\" [formGroup]=\"detailForm\">\r\n <vdr-page-detail-layout>\r\n <vdr-page-detail-sidebar>\r\n <vdr-card *ngIf=\"entity$ | async as entity\">\r\n <vdr-page-entity-info [entity]=\"entity\" />\r\n </vdr-card>\r\n </vdr-page-detail-sidebar>\r\n <vdr-page-block>\r\n <vdr-card>\r\n <div class=\"form-grid\">\r\n <vdr-form-field [label]=\"'common.name' | translate\" for=\"name\">\r\n <input\r\n id=\"name\"\r\n type=\"text\"\r\n formControlName=\"name\"\r\n [readonly]=\"!('UpdateStockLocation' | hasPermission)\"\r\n />\r\n </vdr-form-field>\r\n <vdr-form-field\r\n class=\"form-grid-span\"\r\n [label]=\"'common.description' | translate\"\r\n for=\"slug\"\r\n [errors]=\"{ pattern: 'catalog.slug-pattern-error' | translate }\"\r\n >\r\n <vdr-rich-text-editor\r\n formControlName=\"description\"\r\n [readonly]=\"!('UpdateStockLocation' | hasPermission)\"\r\n ></vdr-rich-text-editor>\r\n </vdr-form-field>\r\n </div>\r\n </vdr-card>\r\n <vdr-card\r\n formGroupName=\"customFields\"\r\n *ngIf=\"customFields.length\"\r\n [title]=\"'common.custom-fields' | translate\"\r\n >\r\n <vdr-tabbed-custom-fields\r\n entityName=\"StockLocation\"\r\n [customFields]=\"customFields\"\r\n [customFieldsFormGroup]=\"detailForm.get('customFields')\"\r\n ></vdr-tabbed-custom-fields>\r\n </vdr-card>\r\n <vdr-custom-detail-component-host\r\n locationId=\"stock-location-detail\"\r\n [entity$]=\"entity$\"\r\n [detailForm]=\"detailForm\"\r\n ></vdr-custom-detail-component-host>\r\n </vdr-page-block>\r\n </vdr-page-detail-layout>\r\n</form>\r\n" }]
|
|
4632
|
-
}], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }, { type: i1.DataService }, { type: i2.FormBuilder }, { type: i1.NotificationService }]; } });
|
|
4633
|
-
|
|
4634
|
-
const DELETE_STOCK_LOCATIONS = gql `
|
|
4635
|
-
mutation DeleteStockLocations($input: [DeleteStockLocationInput!]!) {
|
|
4636
|
-
deleteStockLocations(input: $input) {
|
|
4637
|
-
result
|
|
4638
|
-
message
|
|
4639
|
-
}
|
|
4640
|
-
}
|
|
4641
|
-
`;
|
|
4642
|
-
const ASSIGN_STOCK_LOCATIONS_TO_CHANNEL = gql `
|
|
4643
|
-
mutation AssignStockLocationsToChannel($input: AssignStockLocationsToChannelInput!) {
|
|
4644
|
-
assignStockLocationsToChannel(input: $input) {
|
|
4645
|
-
id
|
|
4646
|
-
name
|
|
4647
|
-
}
|
|
4648
|
-
}
|
|
4649
|
-
`;
|
|
4650
|
-
const REMOVE_STOCK_LOCATIONS_FROM_CHANNEL = gql `
|
|
4651
|
-
mutation RemoveStockLocationsFromChannel($input: RemoveStockLocationsFromChannelInput!) {
|
|
4652
|
-
removeStockLocationsFromChannel(input: $input) {
|
|
4653
|
-
id
|
|
4654
|
-
name
|
|
4655
|
-
}
|
|
4656
|
-
}
|
|
4657
|
-
`;
|
|
4658
|
-
const deleteStockLocationsBulkAction = createBulkDeleteAction({
|
|
4659
|
-
location: 'stock-location-list',
|
|
4660
|
-
requiresPermission: userPermissions => userPermissions.includes(Permission.DeleteStockLocation) ||
|
|
4661
|
-
userPermissions.includes(Permission.DeleteCatalog),
|
|
4662
|
-
getItemName: item => item.name,
|
|
4663
|
-
bulkDelete: (dataService, ids) => dataService
|
|
4664
|
-
.mutate(DeleteStockLocationsDocument, {
|
|
4665
|
-
input: ids.map(id => ({ id })),
|
|
4666
|
-
})
|
|
4667
|
-
.pipe(map(res => res.deleteStockLocations)),
|
|
4668
|
-
shouldRetryItem: response => response.result === DeletionResult.NOT_DELETED,
|
|
4669
|
-
});
|
|
4670
|
-
const assignStockLocationsToChannelBulkAction = createBulkAssignToChannelAction({
|
|
4671
|
-
location: 'stock-location-list',
|
|
4672
|
-
requiresPermission: userPermissions => userPermissions.includes(Permission.UpdateCatalog) ||
|
|
4673
|
-
userPermissions.includes(Permission.UpdateStockLocation),
|
|
4674
|
-
getItemName: item => item.name,
|
|
4675
|
-
bulkAssignToChannel: (dataService, stockLocationIds, channelId) => dataService
|
|
4676
|
-
.mutate(AssignStockLocationsToChannelDocument, {
|
|
4677
|
-
input: {
|
|
4678
|
-
channelId,
|
|
4679
|
-
stockLocationIds,
|
|
4680
|
-
},
|
|
4681
|
-
})
|
|
4682
|
-
.pipe(map(res => res.assignStockLocationsToChannel)),
|
|
4683
|
-
});
|
|
4684
|
-
const removeStockLocationsFromChannelBulkAction = createBulkRemoveFromChannelAction({
|
|
4685
|
-
location: 'stock-location-list',
|
|
4686
|
-
requiresPermission: userPermissions => userPermissions.includes(Permission.DeleteCatalog) ||
|
|
4687
|
-
userPermissions.includes(Permission.DeleteStockLocation),
|
|
4688
|
-
getItemName: item => item.name,
|
|
4689
|
-
bulkRemoveFromChannel: (dataService, stockLocationIds, channelId) => dataService
|
|
4690
|
-
.mutate(RemoveStockLocationsFromChannelDocument, {
|
|
4691
|
-
input: {
|
|
4692
|
-
channelId,
|
|
4693
|
-
stockLocationIds,
|
|
4694
|
-
},
|
|
4695
|
-
})
|
|
4696
|
-
.pipe(map(res => res.removeStockLocationsFromChannel)),
|
|
4697
|
-
});
|
|
4698
|
-
|
|
4699
|
-
const GET_STOCK_LOCATION_LIST = gql `
|
|
4700
|
-
query GetStockLocationList($options: StockLocationListOptions) {
|
|
4701
|
-
stockLocations(options: $options) {
|
|
4702
|
-
items {
|
|
4703
|
-
...StockLocationListItem
|
|
4704
|
-
}
|
|
4705
|
-
totalItems
|
|
4706
|
-
}
|
|
4707
|
-
}
|
|
4708
|
-
fragment StockLocationListItem on StockLocation {
|
|
4709
|
-
id
|
|
4710
|
-
createdAt
|
|
4711
|
-
updatedAt
|
|
4712
|
-
name
|
|
4713
|
-
description
|
|
4714
|
-
}
|
|
4715
|
-
`;
|
|
4716
|
-
class StockLocationListComponent extends TypedBaseListComponent {
|
|
4717
|
-
constructor() {
|
|
4718
|
-
super();
|
|
4719
|
-
this.customFields = this.getCustomFieldConfig('StockLocation');
|
|
4720
|
-
this.filters = this.createFilterCollection()
|
|
4721
|
-
.addIdFilter()
|
|
4722
|
-
.addDateFilters()
|
|
4723
|
-
.addFilters([
|
|
4724
|
-
{
|
|
4725
|
-
name: 'enabled',
|
|
4726
|
-
type: { kind: 'text' },
|
|
4727
|
-
label: marker('common.enabled'),
|
|
4728
|
-
filterField: 'name',
|
|
4729
|
-
},
|
|
4730
|
-
{
|
|
4731
|
-
name: 'sku',
|
|
4732
|
-
type: { kind: 'text' },
|
|
4733
|
-
label: marker('catalog.sku'),
|
|
4734
|
-
filterField: 'description',
|
|
4735
|
-
},
|
|
4736
|
-
])
|
|
4737
|
-
.addCustomFieldFilters(this.customFields)
|
|
4738
|
-
.connectToRoute(this.route);
|
|
4739
|
-
this.sorts = this.createSortCollection()
|
|
4740
|
-
.addSorts([
|
|
4741
|
-
{ name: 'id' },
|
|
4742
|
-
{ name: 'createdAt' },
|
|
4743
|
-
{ name: 'updatedAt' },
|
|
4744
|
-
{ name: 'name' },
|
|
4745
|
-
{ name: 'description' },
|
|
4746
|
-
])
|
|
4747
|
-
.addCustomFieldSorts(this.customFields)
|
|
4748
|
-
.connectToRoute(this.route);
|
|
4749
|
-
this.configure({
|
|
4750
|
-
document: GetStockLocationListDocument,
|
|
4751
|
-
getItems: data => data.stockLocations,
|
|
4752
|
-
setVariables: (skip, take) => ({
|
|
4753
|
-
options: {
|
|
4754
|
-
skip,
|
|
4755
|
-
take,
|
|
4756
|
-
filter: {
|
|
4757
|
-
name: {
|
|
4758
|
-
contains: this.searchTermControl.value,
|
|
4759
|
-
},
|
|
4760
|
-
...this.filters.createFilterInput(),
|
|
4761
|
-
},
|
|
4762
|
-
sort: this.sorts.createSortInput(),
|
|
4763
|
-
},
|
|
4764
|
-
}),
|
|
4765
|
-
refreshListOnChanges: [this.sorts.valueChanges, this.filters.valueChanges],
|
|
4766
|
-
});
|
|
4767
|
-
}
|
|
4768
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.2", ngImport: i0, type: StockLocationListComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
4769
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.2", type: StockLocationListComponent, selector: "vdr-stock-location-list", usesInheritance: true, ngImport: i0, template: "<vdr-page-block>\r\n <vdr-action-bar>\r\n <vdr-ab-left> </vdr-ab-left>\r\n <vdr-ab-right>\r\n <vdr-action-bar-items locationId=\"stock-location-list\"></vdr-action-bar-items>\r\n <a\r\n class=\"button primary\"\r\n *vdrIfPermissions=\"['CreateStockLocation']\"\r\n [routerLink]=\"['./', 'create']\"\r\n >\r\n <clr-icon shape=\"plus\"></clr-icon>\r\n {{ 'catalog.create-new-stock-location' | translate }}\r\n </a>\r\n </vdr-ab-right>\r\n </vdr-action-bar>\r\n</vdr-page-block>\r\n<vdr-data-table-2\r\n class=\"mt-2\"\r\n id=\"stock-location-list\"\r\n [items]=\"items$ | async\"\r\n [itemsPerPage]=\"itemsPerPage$ | async\"\r\n [totalItems]=\"totalItems$ | async\"\r\n [currentPage]=\"currentPage$ | async\"\r\n [filters]=\"filters\"\r\n (pageChange)=\"setPageNumber($event)\"\r\n (itemsPerPageChange)=\"setItemsPerPage($event)\"\r\n>\r\n <vdr-bulk-action-menu\r\n locationId=\"stock-location-list\"\r\n [hostComponent]=\"this\"\r\n [selectionManager]=\"selectionManager\"\r\n />\r\n <vdr-dt2-search\r\n [searchTermControl]=\"searchTermControl\"\r\n [searchTermPlaceholder]=\"'catalog.filter-by-name' | translate\"\r\n />\r\n <vdr-dt2-column [heading]=\"'common.id' | translate\" id=\"id\" [hiddenByDefault]=\"true\" [sort]=\"sorts.get('id')\">\r\n <ng-template let-stockLocation=\"item\">\r\n {{ stockLocation.id }}\r\n </ng-template>\r\n </vdr-dt2-column>\r\n <vdr-dt2-column\r\n [heading]=\"'common.created-at' | translate\" id=\"created-at\"\r\n [hiddenByDefault]=\"true\"\r\n [sort]=\"sorts.get('createdAt')\"\r\n >\r\n <ng-template let-stockLocation=\"item\">\r\n {{ stockLocation.createdAt | localeDate : 'short' }}\r\n </ng-template>\r\n </vdr-dt2-column>\r\n <vdr-dt2-column\r\n [heading]=\"'common.updated-at' | translate\" id=\"updated-at\"\r\n [hiddenByDefault]=\"true\"\r\n [sort]=\"sorts.get('updatedAt')\"\r\n >\r\n <ng-template let-stockLocation=\"item\">\r\n {{ stockLocation.updatedAt | localeDate : 'short' }}\r\n </ng-template>\r\n </vdr-dt2-column>\r\n <vdr-dt2-column [heading]=\"'common.name' | translate\" id=\"name\" [optional]=\"false\" [sort]=\"sorts.get('name')\">\r\n <ng-template let-stockLocation=\"item\">\r\n <a class=\"button-ghost\" [routerLink]=\"['./', stockLocation.id]\"\r\n ><span>{{ stockLocation.name }}</span\r\n ><clr-icon shape=\"arrow right\"\r\n /></a>\r\n </ng-template>\r\n </vdr-dt2-column>\r\n <vdr-dt2-column [heading]=\"'common.description' | translate\" id=\"description\" [sort]=\"sorts.get('description')\">\r\n <ng-template let-stockLocation=\"item\">\r\n <div class=\"description\" [innerHTML]=\"stockLocation.description\"></div>\r\n </ng-template>\r\n </vdr-dt2-column>\r\n <vdr-dt2-custom-field-column\r\n *ngFor=\"let field of customFields\"\r\n [customField]=\"field\"\r\n [sorts]=\"sorts\" />\r\n</vdr-data-table-2>\r\n", styles: ["::ng-deep .description>p{margin-top:0!important}\n"], dependencies: [{ kind: "directive", type: i3.ClrIconCustomTag, selector: "clr-icon" }, { kind: "directive", type: i3$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1$1.RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "component", type: i1.ActionBarComponent, selector: "vdr-action-bar" }, { kind: "component", type: i1.ActionBarLeftComponent, selector: "vdr-ab-left", inputs: ["grow"] }, { kind: "component", type: i1.ActionBarRightComponent, selector: "vdr-ab-right", inputs: ["grow"] }, { kind: "directive", type: i1.IfPermissionsDirective, selector: "[vdrIfPermissions]", inputs: ["vdrIfPermissions", "vdrIfPermissionsElse"] }, { kind: "component", type: i1.ActionBarItemsComponent, selector: "vdr-action-bar-items", inputs: ["locationId"] }, { kind: "component", type: i1.BulkActionMenuComponent, selector: "vdr-bulk-action-menu", inputs: ["locationId", "selectionManager", "hostComponent"] }, { kind: "component", type: i1.DataTable2Component, selector: "vdr-data-table-2", inputs: ["id", "items", "itemsPerPage", "currentPage", "totalItems", "emptyStateLabel", "filters", "activeIndex"], outputs: ["pageChange", "itemsPerPageChange"] }, { kind: "component", type: i1.DataTable2ColumnComponent, selector: "vdr-dt2-column", inputs: ["id", "expand", "heading", "align", "sort", "optional", "hiddenByDefault", "orderable"], exportAs: ["row"] }, { kind: "component", type: i1.DataTable2SearchComponent, selector: "vdr-dt2-search", inputs: ["searchTermControl", "searchTermPlaceholder"] }, { kind: "component", type: i1.DataTableCustomFieldColumnComponent, selector: "vdr-dt2-custom-field-column", inputs: ["customField", "sorts"], exportAs: ["row"] }, { kind: "component", type: i1.PageBlockComponent, selector: "vdr-page-block" }, { kind: "pipe", type: i3$1.AsyncPipe, name: "async" }, { kind: "pipe", type: i5.TranslatePipe, name: "translate" }, { kind: "pipe", type: i1.LocaleDatePipe, name: "localeDate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
4770
|
-
}
|
|
4771
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.2", ngImport: i0, type: StockLocationListComponent, decorators: [{
|
|
4772
|
-
type: Component,
|
|
4773
|
-
args: [{ selector: 'vdr-stock-location-list', changeDetection: ChangeDetectionStrategy.OnPush, template: "<vdr-page-block>\r\n <vdr-action-bar>\r\n <vdr-ab-left> </vdr-ab-left>\r\n <vdr-ab-right>\r\n <vdr-action-bar-items locationId=\"stock-location-list\"></vdr-action-bar-items>\r\n <a\r\n class=\"button primary\"\r\n *vdrIfPermissions=\"['CreateStockLocation']\"\r\n [routerLink]=\"['./', 'create']\"\r\n >\r\n <clr-icon shape=\"plus\"></clr-icon>\r\n {{ 'catalog.create-new-stock-location' | translate }}\r\n </a>\r\n </vdr-ab-right>\r\n </vdr-action-bar>\r\n</vdr-page-block>\r\n<vdr-data-table-2\r\n class=\"mt-2\"\r\n id=\"stock-location-list\"\r\n [items]=\"items$ | async\"\r\n [itemsPerPage]=\"itemsPerPage$ | async\"\r\n [totalItems]=\"totalItems$ | async\"\r\n [currentPage]=\"currentPage$ | async\"\r\n [filters]=\"filters\"\r\n (pageChange)=\"setPageNumber($event)\"\r\n (itemsPerPageChange)=\"setItemsPerPage($event)\"\r\n>\r\n <vdr-bulk-action-menu\r\n locationId=\"stock-location-list\"\r\n [hostComponent]=\"this\"\r\n [selectionManager]=\"selectionManager\"\r\n />\r\n <vdr-dt2-search\r\n [searchTermControl]=\"searchTermControl\"\r\n [searchTermPlaceholder]=\"'catalog.filter-by-name' | translate\"\r\n />\r\n <vdr-dt2-column [heading]=\"'common.id' | translate\" id=\"id\" [hiddenByDefault]=\"true\" [sort]=\"sorts.get('id')\">\r\n <ng-template let-stockLocation=\"item\">\r\n {{ stockLocation.id }}\r\n </ng-template>\r\n </vdr-dt2-column>\r\n <vdr-dt2-column\r\n [heading]=\"'common.created-at' | translate\" id=\"created-at\"\r\n [hiddenByDefault]=\"true\"\r\n [sort]=\"sorts.get('createdAt')\"\r\n >\r\n <ng-template let-stockLocation=\"item\">\r\n {{ stockLocation.createdAt | localeDate : 'short' }}\r\n </ng-template>\r\n </vdr-dt2-column>\r\n <vdr-dt2-column\r\n [heading]=\"'common.updated-at' | translate\" id=\"updated-at\"\r\n [hiddenByDefault]=\"true\"\r\n [sort]=\"sorts.get('updatedAt')\"\r\n >\r\n <ng-template let-stockLocation=\"item\">\r\n {{ stockLocation.updatedAt | localeDate : 'short' }}\r\n </ng-template>\r\n </vdr-dt2-column>\r\n <vdr-dt2-column [heading]=\"'common.name' | translate\" id=\"name\" [optional]=\"false\" [sort]=\"sorts.get('name')\">\r\n <ng-template let-stockLocation=\"item\">\r\n <a class=\"button-ghost\" [routerLink]=\"['./', stockLocation.id]\"\r\n ><span>{{ stockLocation.name }}</span\r\n ><clr-icon shape=\"arrow right\"\r\n /></a>\r\n </ng-template>\r\n </vdr-dt2-column>\r\n <vdr-dt2-column [heading]=\"'common.description' | translate\" id=\"description\" [sort]=\"sorts.get('description')\">\r\n <ng-template let-stockLocation=\"item\">\r\n <div class=\"description\" [innerHTML]=\"stockLocation.description\"></div>\r\n </ng-template>\r\n </vdr-dt2-column>\r\n <vdr-dt2-custom-field-column\r\n *ngFor=\"let field of customFields\"\r\n [customField]=\"field\"\r\n [sorts]=\"sorts\" />\r\n</vdr-data-table-2>\r\n", styles: ["::ng-deep .description>p{margin-top:0!important}\n"] }]
|
|
4774
|
-
}], ctorParameters: function () { return []; } });
|
|
4775
|
-
|
|
4776
4521
|
class UpdateProductOptionDialogComponent {
|
|
4777
4522
|
constructor() {
|
|
4778
4523
|
this.updateVariantName = true;
|
|
@@ -4860,7 +4605,6 @@ const CATALOG_COMPONENTS = [
|
|
|
4860
4605
|
CreateProductVariantDialogComponent,
|
|
4861
4606
|
CreateProductOptionGroupDialogComponent,
|
|
4862
4607
|
ProductVariantQuickJumpComponent,
|
|
4863
|
-
StockLocationListComponent,
|
|
4864
4608
|
];
|
|
4865
4609
|
class CatalogModule {
|
|
4866
4610
|
constructor(bulkActionRegistryService, pageService) {
|
|
@@ -4880,9 +4624,6 @@ class CatalogModule {
|
|
|
4880
4624
|
bulkActionRegistryService.registerBulkAction(assignCollectionsToChannelBulkAction);
|
|
4881
4625
|
bulkActionRegistryService.registerBulkAction(removeCollectionsFromChannelBulkAction);
|
|
4882
4626
|
bulkActionRegistryService.registerBulkAction(deleteCollectionsBulkAction);
|
|
4883
|
-
bulkActionRegistryService.registerBulkAction(assignStockLocationsToChannelBulkAction);
|
|
4884
|
-
bulkActionRegistryService.registerBulkAction(removeStockLocationsFromChannelBulkAction);
|
|
4885
|
-
bulkActionRegistryService.registerBulkAction(deleteStockLocationsBulkAction);
|
|
4886
4627
|
pageService.registerPageTab({
|
|
4887
4628
|
priority: 0,
|
|
4888
4629
|
location: 'product-list',
|
|
@@ -4914,30 +4655,30 @@ class CatalogModule {
|
|
|
4914
4655
|
route: 'variants',
|
|
4915
4656
|
component: ProductVariantListComponent,
|
|
4916
4657
|
});
|
|
4917
|
-
pageService.registerPageTab({
|
|
4918
|
-
|
|
4919
|
-
|
|
4920
|
-
|
|
4921
|
-
|
|
4922
|
-
|
|
4923
|
-
|
|
4924
|
-
|
|
4925
|
-
|
|
4926
|
-
|
|
4927
|
-
|
|
4928
|
-
|
|
4929
|
-
|
|
4930
|
-
|
|
4931
|
-
|
|
4932
|
-
|
|
4933
|
-
});
|
|
4934
|
-
pageService.registerPageTab({
|
|
4935
|
-
|
|
4936
|
-
|
|
4937
|
-
|
|
4938
|
-
|
|
4939
|
-
|
|
4940
|
-
});
|
|
4658
|
+
// pageService.registerPageTab({
|
|
4659
|
+
// priority: 0,
|
|
4660
|
+
// location: 'stock-location-detail',
|
|
4661
|
+
// tab: _('catalog.stock-location'),
|
|
4662
|
+
// route: '',
|
|
4663
|
+
// component: detailComponentWithResolver({
|
|
4664
|
+
// component: StockLocationDetailComponent,
|
|
4665
|
+
// query: GetStockLocationDetailDocument,
|
|
4666
|
+
// entityKey: 'stockLocation',
|
|
4667
|
+
// getBreadcrumbs: entity => [
|
|
4668
|
+
// {
|
|
4669
|
+
// label: entity ? entity.name : _('catalog.create-new-stock-location'),
|
|
4670
|
+
// link: [entity?.id],
|
|
4671
|
+
// },
|
|
4672
|
+
// ],
|
|
4673
|
+
// }),
|
|
4674
|
+
// });
|
|
4675
|
+
// pageService.registerPageTab({
|
|
4676
|
+
// priority: 0,
|
|
4677
|
+
// location: 'product-list',
|
|
4678
|
+
// tab: _('catalog.stock-locations'),
|
|
4679
|
+
// route: 'stock-locations',
|
|
4680
|
+
// component: StockLocationListComponent,
|
|
4681
|
+
// });
|
|
4941
4682
|
pageService.registerPageTab({
|
|
4942
4683
|
priority: 0,
|
|
4943
4684
|
location: 'product-variant-detail',
|
|
@@ -4950,7 +4691,7 @@ class CatalogModule {
|
|
|
4950
4691
|
getBreadcrumbs: entity => [
|
|
4951
4692
|
{
|
|
4952
4693
|
label: `${entity?.product.name}`,
|
|
4953
|
-
link: ['/catalog', '
|
|
4694
|
+
link: ['/catalog', 'products', entity?.product.id],
|
|
4954
4695
|
},
|
|
4955
4696
|
{
|
|
4956
4697
|
label: `${entity?.name} (${entity?.sku})`,
|
|
@@ -5064,8 +4805,7 @@ class CatalogModule {
|
|
|
5064
4805
|
ProductVariantDetailComponent,
|
|
5065
4806
|
CreateProductVariantDialogComponent,
|
|
5066
4807
|
CreateProductOptionGroupDialogComponent,
|
|
5067
|
-
ProductVariantQuickJumpComponent,
|
|
5068
|
-
StockLocationListComponent, StockLocationDetailComponent], imports: [SharedModule, i1$1.RouterModule], exports: [ProductListComponent,
|
|
4808
|
+
ProductVariantQuickJumpComponent], imports: [SharedModule, i1$1.RouterModule], exports: [ProductListComponent,
|
|
5069
4809
|
ProductDetailComponent,
|
|
5070
4810
|
FacetListComponent,
|
|
5071
4811
|
FacetDetailComponent,
|
|
@@ -5096,8 +4836,7 @@ class CatalogModule {
|
|
|
5096
4836
|
ProductVariantDetailComponent,
|
|
5097
4837
|
CreateProductVariantDialogComponent,
|
|
5098
4838
|
CreateProductOptionGroupDialogComponent,
|
|
5099
|
-
ProductVariantQuickJumpComponent
|
|
5100
|
-
StockLocationListComponent] }); }
|
|
4839
|
+
ProductVariantQuickJumpComponent] }); }
|
|
5101
4840
|
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.2.2", ngImport: i0, type: CatalogModule, providers: [
|
|
5102
4841
|
{
|
|
5103
4842
|
provide: ROUTES,
|
|
@@ -5112,7 +4851,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.2", ngImpor
|
|
|
5112
4851
|
args: [{
|
|
5113
4852
|
imports: [SharedModule, RouterModule.forChild([])],
|
|
5114
4853
|
exports: [...CATALOG_COMPONENTS],
|
|
5115
|
-
declarations: [...CATALOG_COMPONENTS
|
|
4854
|
+
declarations: [...CATALOG_COMPONENTS],
|
|
5116
4855
|
providers: [
|
|
5117
4856
|
{
|
|
5118
4857
|
provide: ROUTES,
|
|
@@ -5343,5 +5082,5 @@ const PRODUCT_VARIANT_LIST_QUERY = gql `
|
|
|
5343
5082
|
* Generated bundle index. Do not edit.
|
|
5344
5083
|
*/
|
|
5345
5084
|
|
|
5346
|
-
export { ASSET_DETAIL_QUERY, ApplyFacetDialogComponent, AssetDetailComponent, AssetListComponent, AssetsComponent, AssignProductsToChannelDialogComponent, BulkAddFacetValuesDialogComponent, COLLECTION_DETAIL_QUERY,
|
|
5085
|
+
export { ASSET_DETAIL_QUERY, ApplyFacetDialogComponent, AssetDetailComponent, AssetListComponent, AssetsComponent, AssignProductsToChannelDialogComponent, BulkAddFacetValuesDialogComponent, COLLECTION_DETAIL_QUERY, CatalogModule, CollectionBreadcrumbPipe, CollectionContentsComponent, CollectionDataTableComponent, CollectionDetailComponent, CollectionListComponent, CollectionTreeComponent, CollectionTreeNodeComponent, CollectionTreeService, ConfirmVariantDeletionDialogComponent, CreateProductOptionGroupDialogComponent, CreateProductVariantDialogComponent, FACET_DETAIL_QUERY, FACET_LIST_QUERY, FacetDetailComponent, FacetListComponent, GET_PRODUCTS_WITH_FACET_VALUES_BY_IDS, GET_PRODUCT_DETAIL, GET_VARIANTS_WITH_FACET_VALUES_BY_IDS, GenerateProductVariantsComponent, GeneratedVariant, MoveCollectionsDialogComponent, OPTION_VALUE_INPUT_VALUE_ACCESSOR, OptionValueInputComponent, PRODUCT_LIST_QUERY, PRODUCT_VARIANT_DETAIL_QUERY, PRODUCT_VARIANT_DETAIL_QUERY_PRODUCT_VARIANT_FRAGMENT, PRODUCT_VARIANT_LIST_QUERY, PRODUCT_VARIANT_UPDATE_MUTATION, ProductDetailComponent, ProductDetailService, ProductListComponent, ProductOptionsEditorComponent, ProductVariantDetailComponent, ProductVariantListComponent, ProductVariantQuickJumpComponent, ProductVariantsEditorComponent, ProductVariantsResolver, ProductVariantsTableComponent, UPDATE_PRODUCTS_BULK, UPDATE_VARIANTS_BULK, UpdateProductOptionDialogComponent, VariantPriceDetailComponent, arrayToTree, assignCollectionsToChannelBulkAction, assignFacetValuesToProductsBulkAction, assignFacetsToChannelBulkAction, assignProductVariantsToChannelBulkAction, assignProductsToChannelBulkAction, createRoutes, deleteCollectionsBulkAction, deleteFacetsBulkAction, deleteProductVariantsBulkAction, deleteProductsBulkAction, moveCollectionsBulkAction, productOptionsEditorBreadcrumb, removeCollectionsFromChannelBulkAction, removeFacetsFromChannelBulkAction, removeFacetsFromChannelBulkAction2, removeProductVariantsFromChannelBulkAction, removeProductsFromChannelBulkAction, replaceLast };
|
|
5347
5086
|
//# sourceMappingURL=vendure-admin-ui-catalog.mjs.map
|