Przeglądaj źródła

fix(admin-ui): Rename vdr-product-selector

BREAKING CHANGE: The Admin UI component `vdr-product-selector` has been renamed to
 `vdr-product-variant-selector` to more accurately represent what it does.

 If you are using `vdr-product-selector` if any ui extensions code, update it to use the
 new selector.
Michael Bromley 3 lat temu
rodzic
commit
9d9275c41f

+ 1 - 1
packages/admin-ui/src/lib/core/src/public_api.ts

@@ -147,7 +147,7 @@ export * from './shared/components/modal-dialog/modal-dialog.component';
 export * from './shared/components/object-tree/object-tree.component';
 export * from './shared/components/order-state-label/order-state-label.component';
 export * from './shared/components/pagination-controls/pagination-controls.component';
-export * from './shared/components/product-selector/product-selector.component';
+export * from './shared/components/product-variant-selector/product-variant-selector.component';
 export * from './shared/components/rich-text-editor/external-image-dialog/external-image-dialog.component';
 export * from './shared/components/rich-text-editor/link-dialog/link-dialog.component';
 export * from './shared/components/rich-text-editor/prosemirror/inputrules';

+ 0 - 0
packages/admin-ui/src/lib/core/src/shared/components/product-selector/product-selector.component.html → packages/admin-ui/src/lib/core/src/shared/components/product-variant-selector/product-variant-selector.component.html


+ 0 - 0
packages/admin-ui/src/lib/core/src/shared/components/product-selector/product-selector.component.scss → packages/admin-ui/src/lib/core/src/shared/components/product-variant-selector/product-variant-selector.component.scss


+ 5 - 5
packages/admin-ui/src/lib/core/src/shared/components/product-selector/product-selector.component.ts → packages/admin-ui/src/lib/core/src/shared/components/product-variant-selector/product-variant-selector.component.ts

@@ -12,19 +12,19 @@ import { DataService } from '../../../data/providers/data.service';
  *
  * @example
  * ```HTML
- * <vdr-product-selector
+ * <vdr-product-variant-selector
  *   (productSelected)="selectResult($event)"></vdr-product-selector>
  * ```
  *
  * @docsCategory components
  */
 @Component({
-    selector: 'vdr-product-selector',
-    templateUrl: './product-selector.component.html',
-    styleUrls: ['./product-selector.component.scss'],
+    selector: 'vdr-product-variant-selector',
+    templateUrl: './product-variant-selector.component.html',
+    styleUrls: ['./product-variant-selector.component.scss'],
     changeDetection: ChangeDetectionStrategy.OnPush,
 })
-export class ProductSelectorComponent implements OnInit {
+export class ProductVariantSelectorComponent implements OnInit {
     searchInput$ = new Subject<string>();
     searchLoading = false;
     searchResults$: Observable<ProductSelectorSearchQuery['search']['items']>;

+ 1 - 1
packages/admin-ui/src/lib/core/src/shared/dynamic-form-inputs/product-selector-form-input/product-selector-form-input.component.html

@@ -17,4 +17,4 @@
         </button>
     </li>
 </ul>
-<vdr-product-selector (productSelected)="addProductVariant($event)"></vdr-product-selector>
+<vdr-product-variant-selector (productSelected)="addProductVariant($event)"></vdr-product-variant-selector>

+ 2 - 2
packages/admin-ui/src/lib/core/src/shared/shared.module.ts

@@ -69,7 +69,7 @@ import { ModalDialogComponent } from './components/modal-dialog/modal-dialog.com
 import { ObjectTreeComponent } from './components/object-tree/object-tree.component';
 import { OrderStateLabelComponent } from './components/order-state-label/order-state-label.component';
 import { PaginationControlsComponent } from './components/pagination-controls/pagination-controls.component';
-import { ProductSelectorComponent } from './components/product-selector/product-selector.component';
+import { ProductVariantSelectorComponent } from './components/product-variant-selector/product-variant-selector.component';
 import { ExternalImageDialogComponent } from './components/rich-text-editor/external-image-dialog/external-image-dialog.component';
 import { LinkDialogComponent } from './components/rich-text-editor/link-dialog/link-dialog.component';
 import { RichTextEditorComponent } from './components/rich-text-editor/rich-text-editor.component';
@@ -216,7 +216,7 @@ const DECLARATIONS = [
     EditNoteDialogComponent,
     ProductSelectorFormInputComponent,
     StateI18nTokenPipe,
-    ProductSelectorComponent,
+    ProductVariantSelectorComponent,
     HelpTooltipComponent,
     CustomerGroupFormInputComponent,
     AddressFormComponent,

+ 2 - 2
packages/admin-ui/src/lib/order/src/components/order-editor/order-editor.component.html

@@ -187,8 +187,8 @@
                 <clr-accordion-panel>
                     <clr-accordion-title>{{ 'order.add-item-to-order' | translate }}</clr-accordion-title>
                     <clr-accordion-content *clrIfExpanded>
-                        <vdr-product-selector class="mb4" (productSelected)="addItemSelectedVariant = $event">
-                        </vdr-product-selector>
+                        <vdr-product-variant-selector class="mb4" (productSelected)="addItemSelectedVariant = $event">
+                        </vdr-product-variant-selector>
                         <div *ngIf="addItemSelectedVariant" class="flex mb4">
                             <img
                                 *ngIf="addItemSelectedVariant.productAsset as asset"

+ 1 - 1
packages/admin-ui/src/lib/settings/src/components/test-order-builder/test-order-builder.component.html

@@ -55,6 +55,6 @@
         </div>
     </ng-template>
     <div class="card-block">
-        <vdr-product-selector (productSelected)="selectResult($event)"> </vdr-product-selector>
+        <vdr-product-variant-selector (productSelected)="selectResult($event)"> </vdr-product-variant-selector>
     </div>
 </div>