Skip to content

Commit

Permalink
Merge branch 'master' into minor
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelbromley committed Nov 3, 2023
2 parents 757635b + a3e442e commit 108b8d9
Show file tree
Hide file tree
Showing 42 changed files with 28,090 additions and 67,571 deletions.
16 changes: 16 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,19 @@
## <small>2.1.2 (2023-11-03)</small>


#### Fixes

* **admin-ui** Add descriptive error when using getBreadcrumbs wrong ([b8c4a77](https://github.com/vendure-ecommerce/vendure/commit/b8c4a77))
* **admin-ui** Add horizontal scrollbar support to address select dialog ([60d991b](https://github.com/vendure-ecommerce/vendure/commit/60d991b))
* **admin-ui** Add some new ltr/rtl compatibility (#2466) ([e4d1545](https://github.com/vendure-ecommerce/vendure/commit/e4d1545)), closes [#2466](https://github.com/vendure-ecommerce/vendure/issues/2466)
* **admin-ui** Fix layout of multiple addresses on custom detail page ([7a3e378](https://github.com/vendure-ecommerce/vendure/commit/7a3e378))
* **admin-ui** Fix styling of some dialogs with tabs ([f601acc](https://github.com/vendure-ecommerce/vendure/commit/f601acc))
* **admin-ui** Use generics in ReactDataTableComponentProps (#2500) ([730a103](https://github.com/vendure-ecommerce/vendure/commit/730a103)), closes [#2500](https://github.com/vendure-ecommerce/vendure/issues/2500)
* **core** Assign assets when assigning Collection to channel ([a8481bf](https://github.com/vendure-ecommerce/vendure/commit/a8481bf)), closes [#2122](https://github.com/vendure-ecommerce/vendure/issues/2122) [#2478](https://github.com/vendure-ecommerce/vendure/issues/2478)
* **core** Fix collection findBySlug issue (#2480) ([894ace7](https://github.com/vendure-ecommerce/vendure/commit/894ace7)), closes [#2480](https://github.com/vendure-ecommerce/vendure/issues/2480) [#2395](https://github.com/vendure-ecommerce/vendure/issues/2395)
* **core** Fix configurable operation id decoding when using uuids (#2483) ([47f606c](https://github.com/vendure-ecommerce/vendure/commit/47f606c)), closes [#2483](https://github.com/vendure-ecommerce/vendure/issues/2483)
* **payments-plugin** Expose `status` of Mollie payment methods (#2499) ([071aa9db](https://github.com/vendure-ecommerce/vendure/commit/071aa9db))

## <small>2.1.1 (2023-10-18)</small>


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,8 @@ React components will receive the value of the current column as the `rowItem` p
import { ReactDataTableComponentProps } from '@vendure/admin-ui/react';
import React from 'react';

export function SlugLink({ rowItem }: ReactDataTableComponentProps) {
const slug: string = rowItem.slug;
export function SlugLink({ rowItem }: ReactDataTableComponentProps<{ slug: string }>) {
const slug = rowItem.slug;
return (
<a href={`https://example.com/category/${slug}`} target="_blank">
{slug}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,15 +20,13 @@ import { Component } from '@angular/core';
import {
CustomerFragment,
CustomerHistoryEntryComponent,
registerHistoryEntryComponent,
SharedModule,
TimelineDisplayType,
TimelineHistoryEntry,
SharedModule,
} from '@vendure/admin-ui/core';

@Component({
selector: 'tax-id-verification-component',
selector: 'tax-id-verification-entry',
template: `
<div *ngIf="entry.data.valid">
Tax ID <strong>{{ entry.data.taxId }}</strong> was verified
Expand All @@ -41,7 +39,7 @@ import {
standalone: true,
imports: [SharedModule],
})
class TaxIdHistoryEntryComponent implements CustomerHistoryEntryComponent {
export class TaxIdHistoryEntryComponent implements CustomerHistoryEntryComponent {
entry: TimelineHistoryEntry;
customer: CustomerFragment;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ e.g. the `Product` object if used in the `product-list` table.
import { ReactDataTableComponentProps } from '@vendure/admin-ui/react';
import React from 'react';

export function SlugWithLink({ rowItem }: ReactDataTableComponentProps) {
export function SlugWithLink({ rowItem }: ReactDataTableComponentProps<{ slug: string }>) {
return (
<a href={`https://example.com/products/${rowItem.slug}`} target="_blank">
{rowItem.slug}
Expand Down
2 changes: 1 addition & 1 deletion lerna.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"packages": ["packages/*"],
"version": "2.1.1",
"version": "2.1.2",
"npmClient": "yarn",
"command": {
"version": {
Expand Down
6 changes: 3 additions & 3 deletions packages/admin-ui-plugin/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@vendure/admin-ui-plugin",
"version": "2.1.1",
"version": "2.1.2",
"main": "lib/index.js",
"types": "lib/index.d.ts",
"files": [
Expand All @@ -21,8 +21,8 @@
"devDependencies": {
"@types/express": "^4.17.8",
"@types/fs-extra": "^9.0.1",
"@vendure/common": "^2.1.1",
"@vendure/core": "^2.1.1",
"@vendure/common": "^2.1.2",
"@vendure/core": "^2.1.2",
"express": "^4.17.1",
"rimraf": "^3.0.2",
"typescript": "4.9.5"
Expand Down
2 changes: 1 addition & 1 deletion packages/admin-ui/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions packages/admin-ui/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@vendure/admin-ui",
"version": "2.1.1",
"version": "2.1.2",
"license": "MIT",
"scripts": {
"ng": "ng",
Expand Down Expand Up @@ -49,7 +49,7 @@
"@ng-select/ng-select": "^11.1.1",
"@ngx-translate/core": "^15.0.0",
"@ngx-translate/http-loader": "^8.0.0",
"@vendure/common": "^2.1.1",
"@vendure/common": "^2.1.2",
"@webcomponents/custom-elements": "^1.6.0",
"apollo-angular": "^5.0.0",
"apollo-upload-client": "^17.0.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/admin-ui/src/lib/core/src/common/version.ts
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
// Auto-generated by the set-version.js script.
export const ADMIN_UI_VERSION = '2.1.1';
export const ADMIN_UI_VERSION = '2.1.2';
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
fieldset {
display: flex;
align-items: flex-start;
overflow-x: auto;
}
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
:host {
display: contents;
}

::ng-deep clr-tabs .btn.btn-link {
box-shadow: none;
}
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@
</div>
<ng-template #noGroups>
<span class="color-weight-400">
{{ 'customer.not-a-member-of-any-groups' | translate }}
{{ 'customer.not-a-member-of-any-groups' | translate }}
</span>
</ng-template>
<div>
Expand Down Expand Up @@ -138,23 +138,29 @@
></vdr-custom-detail-component-host>
<ng-container *ngIf="!(isNew$ | async)">
<vdr-card [title]="'customer.addresses' | translate">
<vdr-address-card
*ngFor="let addressForm of getAddressFormControls()"
[class.to-delete]="addressesToDeleteIds.has(addressForm.value.id)"
[availableCountries]="availableCountries$ | async"
[isDefaultBilling]="defaultBillingAddressId === addressForm.value.id"
[isDefaultShipping]="defaultShippingAddressId === addressForm.value.id"
[addressForm]="addressForm"
[customFields]="addressCustomFields"
[editable]="
(['UpdateCustomer'] | hasPermission) &&
!addressesToDeleteIds.has(addressForm.value.id)
"
(setAsDefaultBilling)="setDefaultBillingAddressId($event)"
(setAsDefaultShipping)="setDefaultShippingAddressId($event)"
(deleteAddress)="toggleDeleteAddress($event)"
></vdr-address-card>
<button class="btn btn-secondary mt-2" (click)="addAddress()" *vdrIfPermissions="'UpdateCustomer'">
<div class="form-grid">
<vdr-address-card
*ngFor="let addressForm of getAddressFormControls()"
[class.to-delete]="addressesToDeleteIds.has(addressForm.value.id)"
[availableCountries]="availableCountries$ | async"
[isDefaultBilling]="defaultBillingAddressId === addressForm.value.id"
[isDefaultShipping]="defaultShippingAddressId === addressForm.value.id"
[addressForm]="addressForm"
[customFields]="addressCustomFields"
[editable]="
(['UpdateCustomer'] | hasPermission) &&
!addressesToDeleteIds.has(addressForm.value.id)
"
(setAsDefaultBilling)="setDefaultBillingAddressId($event)"
(setAsDefaultShipping)="setDefaultShippingAddressId($event)"
(deleteAddress)="toggleDeleteAddress($event)"
></vdr-address-card>
</div>
<button
class="btn btn-secondary mt-2"
(click)="addAddress()"
*vdrIfPermissions="'UpdateCustomer'"
>
<clr-icon shape="plus"></clr-icon>
{{ 'customer.create-new-address' | translate }}
</button>
Expand All @@ -175,7 +181,11 @@
{{ order.id }}
</ng-template>
</vdr-dt2-column>
<vdr-dt2-column [heading]="'common.created-at' | translate" id="created-at" [hiddenByDefault]="true">
<vdr-dt2-column
[heading]="'common.created-at' | translate"
id="created-at"
[hiddenByDefault]="true"
>
<ng-template let-order="item">
{{ order.createdAt | localeDate : 'short' }}
</ng-template>
Expand All @@ -188,7 +198,11 @@
</a>
</ng-template>
</vdr-dt2-column>
<vdr-dt2-column [heading]="'order.order-type' | translate" id="order-type" [hiddenByDefault]="true">
<vdr-dt2-column
[heading]="'order.order-type' | translate"
id="order-type"
[hiddenByDefault]="true"
>
<ng-template let-order="item">
<vdr-chip>{{ order.type }}</vdr-chip>
</ng-template>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ export function useMutation<T, V extends Record<string, any> = Record<string, an
return [execute, rest] as [typeof execute, typeof rest];
}

function useDataService<T, V extends Record<string, any> = Record<string, any>>(
export function useDataService<T, V extends Record<string, any> = Record<string, any>>(
operation: (dataService: DataService, variables?: V) => Observable<T>,
) {
const context = useContext(HostedComponentContext);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,8 @@ export interface ReactDataTableComponentConfig {
* @description
* The props that will be passed to the React component registered via {@link registerReactDataTableComponent}.
*/
export interface ReactDataTableComponentProps {
rowItem: any;
export interface ReactDataTableComponentProps<T = any> {
rowItem: T;
[prop: string]: any;
}

Expand All @@ -60,7 +60,7 @@ export interface ReactDataTableComponentProps {
* import { ReactDataTableComponentProps } from '\@vendure/admin-ui/react';
* import React from 'react';
*
* export function SlugWithLink({ rowItem }: ReactDataTableComponentProps) {
* export function SlugWithLink({ rowItem }: ReactDataTableComponentProps<{ slug: string }>) {
* return (
* <a href={`https://example.com/products/${rowItem.slug}`} target="_blank">
* {rowItem.slug}
Expand All @@ -79,7 +79,7 @@ export interface ReactDataTableComponentProps {
* tableId: 'product-list',
* columnId: 'slug',
* props: {
* foo: 'bar',
* foo: 'bar',
* },
* }),
* ];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,10 @@ button.icon-button {
.btn.btn-link.nav-link {
background-color: transparent;
}
clr-tabs .btn.btn-link {
box-shadow: none;
}


.alert {
border: 1px solid var(--color-primary-150);
Expand Down
Loading

0 comments on commit 108b8d9

Please sign in to comment.