Skip to content

Commit

Permalink
Merge branch 'minor' into new-docs
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelbromley committed Sep 12, 2023
2 parents b02ce4c + 4147797 commit 63e7e44
Show file tree
Hide file tree
Showing 427 changed files with 49,969 additions and 75,222 deletions.
12 changes: 3 additions & 9 deletions .github/workflows/build_and_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,7 @@ jobs:
# if: steps.yarn-cache.outputs.cache-hit != 'true'
run: yarn install
- name: Build
run: |
yarn bootstrap
yarn build
run: yarn build
unit-tests:
name: unit tests
runs-on: ubuntu-latest
Expand All @@ -59,9 +57,7 @@ jobs:
# if: steps.yarn-cache.outputs.cache-hit != 'true'
run: yarn install --prefer-offline
- name: Build
run: |
yarn bootstrap
yarn lerna run ci
run: yarn lerna run ci
- name: Unit tests
run: yarn test
e2e-tests:
Expand Down Expand Up @@ -128,9 +124,7 @@ jobs:
# if: steps.yarn-cache.outputs.cache-hit != 'true'
run: yarn install --prefer-offline
- name: Build
run: |
yarn bootstrap
yarn lerna run ci
run: yarn lerna run ci
- name: df
run: |
df -h
Expand Down
4 changes: 0 additions & 4 deletions .github/workflows/publish_and_install.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,10 +63,6 @@ jobs:
yarn install --network-timeout 1000000 --prefer-offline
env:
CI: true
- name: Bootstrap
run: yarn bootstrap
env:
CI: true
- name: Publish to Verdaccio
run: |
yarn lerna publish prepatch --preid ci --no-push --no-git-tag-version --no-commit-hooks --force-publish "*" --yes --dist-tag ci --registry http://0.0.0.0:4873
Expand Down
19 changes: 19 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,22 @@
## <small>2.0.7 (2023-09-08)</small>


#### Fixes

* **admin-ui** Add custom field support to Customer list ([298e90c](https://github.com/vendure-ecommerce/vendure/commit/298e90c))
* **admin-ui** Added and improved Italian translations (#2371) ([19292a8](https://github.com/vendure-ecommerce/vendure/commit/19292a8)), closes [#2371](https://github.com/vendure-ecommerce/vendure/issues/2371)
* **admin-ui** Correct handling of ID filters in data tables ([52ddd96](https://github.com/vendure-ecommerce/vendure/commit/52ddd96))
* **admin-ui** Data table filters react to page navigation ([2471350](https://github.com/vendure-ecommerce/vendure/commit/2471350))
* **admin-ui** Fix alignment of facet value chip ([7eb43ef](https://github.com/vendure-ecommerce/vendure/commit/7eb43ef))
* **admin-ui** Fix channel switcher icon style ([6e70794](https://github.com/vendure-ecommerce/vendure/commit/6e70794))
* **admin-ui** Fix filter shortcut triggering from rich text component ([e6f95b3](https://github.com/vendure-ecommerce/vendure/commit/e6f95b3)), closes [#2384](https://github.com/vendure-ecommerce/vendure/issues/2384)
* **admin-ui** Fix styling of custom field tabs ([ef3d2f9](https://github.com/vendure-ecommerce/vendure/commit/ef3d2f9))
* **admin-ui** Reinstate multi-deletion of Assets ([a203e50](https://github.com/vendure-ecommerce/vendure/commit/a203e50)), closes [#380](https://github.com/vendure-ecommerce/vendure/issues/380)
* **admin-ui** Use appropriate default values for custom fields ([85a8866](https://github.com/vendure-ecommerce/vendure/commit/85a8866)), closes [#2362](https://github.com/vendure-ecommerce/vendure/issues/2362)
* **admin-ui** Aligns items horizontally in the Chip component ([19d3e51](https://github.com/vendure-ecommerce/vendure/commit/19d3e51))
* **admin-ui** Add price field on variation dialog modal (#2378) ([5b99bae](https://github.com/vendure-ecommerce/vendure/commit/5b99bae)), closes [#2378](https://github.com/vendure-ecommerce/vendure/issues/2378)
* **core** Fix channel association on promotion update (#2376) ([47e688d](https://github.com/vendure-ecommerce/vendure/commit/47e688d)), closes [#2376](https://github.com/vendure-ecommerce/vendure/issues/2376)

## <small>2.0.6 (2023-08-11)</small>


Expand Down
83 changes: 83 additions & 0 deletions CHANGELOG_NEXT.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
## 2.1.0-next.4 (2023-09-08)


#### Fixes

* **ui-devkit** Fix scaffold logic for custom providers ([2f2ddb5](https://github.com/vendure-ecommerce/vendure/commit/2f2ddb5))

## 2.1.0-next.3 (2023-09-08)


#### Fixes

* **admin-ui** Add custom field support to Customer list ([97ba022](https://github.com/vendure-ecommerce/vendure/commit/97ba022))
* **admin-ui** Fix channel switcher icon style ([7f30361](https://github.com/vendure-ecommerce/vendure/commit/7f30361))
* **admin-ui** Fix error when data table filters not defined ([2425a33](https://github.com/vendure-ecommerce/vendure/commit/2425a33))
* **admin-ui** Fix styling of custom field tabs ([57f47df](https://github.com/vendure-ecommerce/vendure/commit/57f47df))
* **admin-ui** Give all data table columns immutable ids ([73a78db](https://github.com/vendure-ecommerce/vendure/commit/73a78db))
* **admin-ui** Use correct defaults for nullable custom fields (#2360) ([88430e5](https://github.com/vendure-ecommerce/vendure/commit/88430e5)), closes [#2360](https://github.com/vendure-ecommerce/vendure/issues/2360)
* **core** Downgrade ForbiddenError from Error to Warn log level ([c186392](https://github.com/vendure-ecommerce/vendure/commit/c186392)), closes [#2383](https://github.com/vendure-ecommerce/vendure/issues/2383)
* **core** Fix channel association on promotion update (#2376) ([e1ff2c7](https://github.com/vendure-ecommerce/vendure/commit/e1ff2c7)), closes [#2376](https://github.com/vendure-ecommerce/vendure/issues/2376)

#### Features

* **admin-ui** Add initial React support for UI extensions ([1075dd7](https://github.com/vendure-ecommerce/vendure/commit/1075dd7))
* **admin-ui** Allow custom components in data table columns ([d3474dd](https://github.com/vendure-ecommerce/vendure/commit/d3474dd)), closes [#2347](https://github.com/vendure-ecommerce/vendure/issues/2347) [#2353](https://github.com/vendure-ecommerce/vendure/issues/2353)
* **admin-ui** Allow custom React components in data table columns ([5cde775](https://github.com/vendure-ecommerce/vendure/commit/5cde775)), closes [#2347](https://github.com/vendure-ecommerce/vendure/issues/2347) [#2353](https://github.com/vendure-ecommerce/vendure/issues/2353)
* **admin-ui** Implement custom components in Collection data table ([4ab7c1e](https://github.com/vendure-ecommerce/vendure/commit/4ab7c1e))
* **admin-ui** Implement react Card component ([c588a1f](https://github.com/vendure-ecommerce/vendure/commit/c588a1f))
* **admin-ui** Implement simplified API for UI route extensions ([b9ca367](https://github.com/vendure-ecommerce/vendure/commit/b9ca367))
* **admin-ui** Improve dev mode extension point display ([4678930](https://github.com/vendure-ecommerce/vendure/commit/4678930))
* **admin-ui** Initial support for React UI extensions ([83d5756](https://github.com/vendure-ecommerce/vendure/commit/83d5756))
* **admin-ui** Style improvements to table and form input borders ([5287287](https://github.com/vendure-ecommerce/vendure/commit/5287287))
* **admin-ui** Support for React-based custom detail components ([55d9ffc](https://github.com/vendure-ecommerce/vendure/commit/55d9ffc))
* **core** Support bi-directional relations in customFields (#2365) ([0313ce5](https://github.com/vendure-ecommerce/vendure/commit/0313ce5)), closes [#2365](https://github.com/vendure-ecommerce/vendure/issues/2365)
* **ui-devkit** Add experimental wrapper for shared ui providers ([daf6f8c](https://github.com/vendure-ecommerce/vendure/commit/daf6f8c))

## 2.1.0-next.2 (2023-08-28)


#### Fixes

* **core** Fix resolution of facet valueList for postgres ([1d8fe47](https://github.com/vendure-ecommerce/vendure/commit/1d8fe47))

## 2.1.0-next.1 (2023-08-28)


#### Fixes

* **admin-ui** Correct handling of ID filters in data tables ([0e05496](https://github.com/vendure-ecommerce/vendure/commit/0e05496))
* **admin-ui** Data table filters react to page navigation ([39832bd](https://github.com/vendure-ecommerce/vendure/commit/39832bd))
* **core** Fix circular dependency issue in SQLiteSearchStrategy ([f2e2e32](https://github.com/vendure-ecommerce/vendure/commit/f2e2e32))

#### Features

* **admin-ui** Add data table filter presets functionality ([a656ef2](https://github.com/vendure-ecommerce/vendure/commit/a656ef2))
* **admin-ui** Implement drag-and-drop reorder of filter presets ([8e06705](https://github.com/vendure-ecommerce/vendure/commit/8e06705))
* **admin-ui** Implement filter preset renaming ([8b52e6f](https://github.com/vendure-ecommerce/vendure/commit/8b52e6f))
* **admin-ui** Implement relative date filtering ([d07a5f3](https://github.com/vendure-ecommerce/vendure/commit/d07a5f3))
* **admin-ui** Update to Angular v16.2 ([608d5d3](https://github.com/vendure-ecommerce/vendure/commit/608d5d3))
* **core** Update NestJS to v10, Apollo Server v4 ([b675fda](https://github.com/vendure-ecommerce/vendure/commit/b675fda))


### BREAKING CHANGE

* The update of Apollo Server to v4 includes some breaking changes if you have
defined any custom ApolloServerPlugins. See the Apollo migration guide for full details:
https://www.apollographql.com/docs/apollo-server/migration/
## 2.1.0-next.0 (2023-08-11)

Includes all changes from v2.0.6, plus:

#### Features

* **admin-ui** Admin UI rtl with Arabic translation improvements (#2322) ([44ea12b](https://github.com/vendure-ecommerce/vendure/commit/44ea12b)), closes [#2322](https://github.com/vendure-ecommerce/vendure/issues/2322)
* **core** Add `Facet.valueList` resolver for paginated values ([09c7175](https://github.com/vendure-ecommerce/vendure/commit/09c7175)), closes [#1257](https://github.com/vendure-ecommerce/vendure/issues/1257)
* **core** Add maximum coupon usage (#2331) ([bdd2720](https://github.com/vendure-ecommerce/vendure/commit/bdd2720)), closes [#2331](https://github.com/vendure-ecommerce/vendure/issues/2331) [#2330](https://github.com/vendure-ecommerce/vendure/issues/2330)
* **email-plugin** Expose template vars to template loader (#2243) ([78ea016](https://github.com/vendure-ecommerce/vendure/commit/78ea016)), closes [#2243](https://github.com/vendure-ecommerce/vendure/issues/2243) [#2242](https://github.com/vendure-ecommerce/vendure/issues/2242)

#### Fixes

* **admin-ui** Improve RTL styles ([056d205](https://github.com/vendure-ecommerce/vendure/commit/056d205))
* **admin-ui** Limit FacetValues in Facet list component ([b445955](https://github.com/vendure-ecommerce/vendure/commit/b445955)), closes [#1257](https://github.com/vendure-ecommerce/vendure/issues/1257)

14 changes: 3 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,21 +51,15 @@ The root directory has a `package.json` which contains build-related dependencie
> Note:
> When you do `yarn` for the first time, you will need to manually create the `package` folder under [/packages/admin-ui](/packages/admin-ui).
### 2. Bootstrap the packages

`yarn bootstrap`

This runs the Lerna "bootstrap" command, which cross-links monorepo dependencies.

### 3. Build all packages
### 2. Build all packages

`yarn build`

Packages must be built (i.e. TypeScript compiled, admin ui app built, certain assets copied etc.) before being used.

Note that this can take a few minutes.

### 4. Set up the server
### 3. Set up the server

The server requires an SQL database to be available. The simplest option is to use SQLite, but if you have Docker available you can use the [dev-server docker-compose file](./packages/dev-server/docker-compose.yml) which will start up both MariaDB and Postgres as well as their GUI management tools.

Expand All @@ -80,7 +74,7 @@ Vendure uses [TypeORM](http://typeorm.io), and officially supports **MySQL**, **
```
If you do not specify the `DB` variable, it will default to "mysql".

### 5. Run the dev server
### 4. Run the dev server

```
cd packages/dev-server
Expand Down Expand Up @@ -133,8 +127,6 @@ DB=sqlite yarn start

3. The dev-server will now have your local changes from the changed package.

:information_source: Lerna links to the `dist` folder of the packages, so you **don't** need to rerun 'yarn bootstrap'

### Code generation

[graphql-code-generator](https://github.com/dotansimha/graphql-code-generator) is used to automatically create TypeScript interfaces for all GraphQL server operations and admin ui queries. These generated interfaces are used in both the admin ui and the server.
Expand Down
4 changes: 2 additions & 2 deletions docs-old/layouts/partials/announcement-banner.html
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<script>
function bannerComponent() {
const bannerId = 4;
const bannerId = 5;
const key = `banner-${bannerId}-dismissed`;
const bannerDismissed = localStorage.getItem(key) ?? false;
return {
Expand All @@ -15,7 +15,7 @@
<div class="relative bg-gradient-to-r from-blue-600 via-indigo-700 to-blue-900" x-data="bannerComponent()" x-show="visible" x-cloak>
<div class="max-w-7xl mx-auto py-1 px-3 sm:px-6 lg:px-8">
<div class="pr-16 sm:text-center sm:px-16">
<p class="text-xs md:text-sm lg:text-base text-white" @click="dismiss()">
<p class="text-xs md:text-sm lg:text-base text-white">
{{ .content | safeHTML }}
</p>
</div>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
---
title: "Custom Template Loader"
weight: 10
date: 2023-07-14T16:57:50.756Z
showtoc: true
generated: true
---
<!-- This file was generated from the Vendure source. Do not modify. Instead, re-run the "docs:build" script -->

# Custom Template Loader
<div class="symbol">


# TemplateLoader

{{< generation-info sourceFile="packages/email-plugin/src/types.ts" sourceLine="390" packageName="@vendure/email-plugin">}}

Load an email template based on the given request context, type and template name
and return the template as a string.

*Example*

```TypeScript
import { EmailPlugin, TemplateLoader } from '@vendure/email-plugin';

class MyTemplateLoader implements TemplateLoader {
loadTemplate(injector, ctx, { type, templateName, templateVars }){
return myCustomTemplateFunction(ctx);
}
}

// In vendure-config.ts:
...
EmailPlugin.init({
templateLoader: new MyTemplateLoader()
...
})
```

## Signature

```TypeScript
interface TemplateLoader {
loadTemplate(injector: Injector, ctx: RequestContext, input: LoadTemplateInput): Promise<string>;
loadPartials?(): Promise<Partial[]>;
}
```
## Members

### loadTemplate

{{< member-info kind="method" type="(injector: <a href='/typescript-api/common/injector#injector'>Injector</a>, ctx: <a href='/typescript-api/request/request-context#requestcontext'>RequestContext</a>, input: LoadTemplateInput) => Promise&#60;string&#62;" >}}

{{< member-description >}}{{< /member-description >}}

### loadPartials

{{< member-info kind="method" type="() => Promise&#60;Partial[]&#62;" >}}

{{< member-description >}}{{< /member-description >}}


</div>
Empty file.
3 changes: 1 addition & 2 deletions lerna.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
{
"packages": ["packages/*"],
"version": "2.0.6",
"version": "2.1.0-next.4",
"npmClient": "yarn",
"useWorkspaces": true,
"command": {
"version": {
"push": false
Expand Down
29 changes: 14 additions & 15 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
"watch:core-common": "lerna run --scope @vendure/common --scope @vendure/core watch --parallel",
"lint": "yarn eslint --fix",
"format": "prettier --write --html-whitespace-sensitivity ignore",
"bootstrap": "lerna bootstrap",
"docs:generate-typescript-docs": "ts-node scripts/docs/generate-typescript-docs.ts",
"docs:generate-graphql-docs": "ts-node scripts/docs/generate-graphql-docs.ts --api=shop && ts-node scripts/docs/generate-graphql-docs.ts --api=admin",
"docs:update-build-info": "ts-node scripts/docs/update-build-info.ts",
Expand All @@ -26,36 +25,36 @@
"check-angular-versions": "ts-node scripts/check-angular-versions.ts",
"generate-changelog": "ts-node scripts/changelogs/generate-changelog.ts",
"publish-release": "lerna publish -m \"chore: Publish %s\" --no-push --force-publish",
"publish-prerelease": "lerna publish -m \"chore: Pre-release %s\" prerelease --exact --no-push --force-publish --preid beta --dist-tag next",
"publish-prerelease": "lerna publish -m \"chore: Pre-release %s\" prerelease --exact --no-push --force-publish --preid next --dist-tag next",
"publish-local": "lerna version --no-git-tag-version && cd scripts && ./publish-to-verdaccio.sh"
},
"devDependencies": {
"@commitlint/cli": "^17.4.4",
"@commitlint/config-conventional": "^17.4.4",
"@graphql-codegen/add": "4.0.1",
"@graphql-codegen/cli": "3.2.1",
"@graphql-codegen/fragment-matcher": "4.0.1",
"@graphql-codegen/typed-document-node": "^4.0.1",
"@graphql-codegen/typescript": "3.0.1",
"@graphql-codegen/typescript-operations": "3.0.1",
"@graphql-tools/schema": "^9.0.17",
"@swc/core": "^1.3.38",
"@types/klaw-sync": "^6.0.0",
"@graphql-codegen/add": "5.0.0",
"@graphql-codegen/cli": "5.0.0",
"@graphql-codegen/fragment-matcher": "5.0.0",
"@graphql-codegen/typed-document-node": "^5.0.1",
"@graphql-codegen/typescript": "4.0.1",
"@graphql-codegen/typescript-operations": "4.0.1",
"@graphql-tools/schema": "^10.0.0",
"@swc/core": "^1.3.78",
"@types/klaw-sync": "^6.0.1",
"@types/node": "^14.14.31",
"concurrently": "^6.0.0",
"concurrently": "^8.2.1",
"conventional-changelog-core": "^4.2.4",
"cross-env": "^7.0.3",
"find": "^0.3.0",
"graphql": "16.6.0",
"graphql": "16.8.0",
"husky": "^4.3.0",
"klaw-sync": "^6.0.0",
"lerna": "^6.5.1",
"lerna": "^7.1.5",
"lint-staged": "^10.5.4",
"prettier": "^2.2.1",
"ts-node": "^10.9.1",
"typescript": "4.9.5",
"unplugin-swc": "^1.3.2",
"vitest": "^0.29.2"
"vitest": "^0.34.2"
},
"resolutions": {
"npm-packlist": "1.1.12"
Expand Down
8 changes: 4 additions & 4 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.0.6",
"version": "2.1.0-next.4",
"main": "lib/index.js",
"types": "lib/index.d.ts",
"files": [
Expand All @@ -21,14 +21,14 @@
"devDependencies": {
"@types/express": "^4.17.8",
"@types/fs-extra": "^9.0.1",
"@vendure/common": "^2.0.6",
"@vendure/core": "^2.0.6",
"@vendure/common": "2.1.0-next.4",
"@vendure/core": "2.1.0-next.4",
"express": "^4.17.1",
"rimraf": "^3.0.2",
"typescript": "4.9.5"
},
"dependencies": {
"date-fns": "^2.30.0",
"fs-extra": "^10.0.0"
"fs-extra": "^11.1.1"
}
}
Loading

0 comments on commit 63e7e44

Please sign in to comment.