From dfa755593a37f7ed04f1507bcbe5f0b50271d9cc Mon Sep 17 00:00:00 2001 From: Maximilian Franzke Date: Tue, 26 Sep 2023 16:17:11 +0200 Subject: [PATCH 1/8] docs: added another angular example --- .../package-lock.json | 65 ++++++++++--------- .../app/components/form/form.component.html | 11 ++++ .../src/app/components/form/form.component.ts | 5 ++ 3 files changed, 50 insertions(+), 31 deletions(-) diff --git a/showcase/angular-lts-minus-1-showcase/package-lock.json b/showcase/angular-lts-minus-1-showcase/package-lock.json index bac0a424ee..6c81315f9a 100644 --- a/showcase/angular-lts-minus-1-showcase/package-lock.json +++ b/showcase/angular-lts-minus-1-showcase/package-lock.json @@ -38,50 +38,53 @@ } }, "../../node_modules/@db-ui/core": { - "version": "0.0.1", + "version": "2.12.1", + "license": "Apache-2.0", "dependencies": { - "@babel/cli": "^7.22.9", - "@babel/preset-env": "^7.22.9", - "@commitlint/cli": "^17.6.7", - "@commitlint/config-conventional": "^17.6.7", "@csstools/normalize.css": "^12.0.0", - "@db-ui/base": "^0.22.2", + "@db-ui/base": "^0.23.0" + }, + "devDependencies": { + "@babel/cli": "^7.22.15", + "@babel/preset-env": "^7.22.15", + "@commitlint/cli": "^17.7.1", + "@commitlint/config-conventional": "^17.7.0", "@mfranzke/plugin-node-uiextension": "^1.0.0", "@pattern-lab/cli": "^6.0.1", "@pattern-lab/core": "^6.0.1", "@pattern-lab/engine-handlebars": "^6.0.0", "@pattern-lab/starterkit-handlebars-demo": "^6.0.0", "@pattern-lab/uikit-workshop": "^6.0.3", - "autoprefixer": "^10.4.14", + "autoprefixer": "^10.4.15", "backstopjs": "^6.2.2", "cpr": "^3.0.1", "details-element-polyfill": "^2.4.0", "dialog-polyfill": "^0.5.6", "dotenv": "^16.3.1", "find-versions-cli": "^4.0.0", - "html-validate": "^8.1.0", + "html-validate": "^8.3.0", "html5-boilerplate": "^8.0.0", "husky": "^8.0.3", "iframe-resizer": "^4.3.6", - "lint-staged": "^13.2.3", - "markdownlint-cli": "^0.35.0", + "lint-staged": "^14.0.1", + "markdownlint-cli": "^0.36.0", "nodemon": "^3.0.1", "npm-run-all": "^4.1.5", "pa11y-ci": "^3.0.1", "plugin-node-patternlab-inline-remote-assets": "^0.2.0", - "postcss": "^8.4.27", + "postcss": "^8.4.29", "postcss-cli": "^10.1.0", - "postcss-focus": "^6.0.0", + "postcss-focus": "^7.0.0", "postcss-list-style-safari-fix": "^1.0.0", - "prettier": "^3.0.1", + "prettier": "^3.0.3", "rimraf": "^5.0.1", - "sass": "^1.64.2", + "sass": "^1.66.1", "start-server-and-test": "^2.0.0", "stylelint": "^14.16.1", "stylelint-config-prettier": "^9.0.5", "stylelint-config-sass-guidelines": "^9.0.1", "validate-branch-name": "^1.3.0", - "xo": "^0.55.0" + "xo": "^0.56.0" } }, "../../packages/db-ui-elements-angular": { @@ -115,7 +118,7 @@ "jest-preset-angular": "13.1.2", "lodash.memoize": "4.1.2", "ng-packagr": "14.2.2", - "zone.js": "~0.13.3" + "zone.js": "~0.14.0" } }, "../../packages/db-ui-elements-angular/node_modules/@babel/core": { @@ -18564,48 +18567,48 @@ "@db-ui/core": { "version": "file:../../node_modules/@db-ui/core", "requires": { - "@babel/cli": "^7.22.9", - "@babel/preset-env": "^7.22.9", - "@commitlint/cli": "^17.6.7", - "@commitlint/config-conventional": "^17.6.7", + "@babel/cli": "^7.22.15", + "@babel/preset-env": "^7.22.15", + "@commitlint/cli": "^17.7.1", + "@commitlint/config-conventional": "^17.7.0", "@csstools/normalize.css": "^12.0.0", - "@db-ui/base": "^0.22.2", + "@db-ui/base": "^0.23.0", "@mfranzke/plugin-node-uiextension": "^1.0.0", "@pattern-lab/cli": "^6.0.1", "@pattern-lab/core": "^6.0.1", "@pattern-lab/engine-handlebars": "^6.0.0", "@pattern-lab/starterkit-handlebars-demo": "^6.0.0", "@pattern-lab/uikit-workshop": "^6.0.3", - "autoprefixer": "^10.4.14", + "autoprefixer": "^10.4.15", "backstopjs": "^6.2.2", "cpr": "^3.0.1", "details-element-polyfill": "^2.4.0", "dialog-polyfill": "^0.5.6", "dotenv": "^16.3.1", "find-versions-cli": "^4.0.0", - "html-validate": "^8.1.0", + "html-validate": "^8.3.0", "html5-boilerplate": "^8.0.0", "husky": "^8.0.3", "iframe-resizer": "^4.3.6", - "lint-staged": "^13.2.3", - "markdownlint-cli": "^0.35.0", + "lint-staged": "^14.0.1", + "markdownlint-cli": "^0.36.0", "nodemon": "^3.0.1", "npm-run-all": "^4.1.5", "pa11y-ci": "^3.0.1", "plugin-node-patternlab-inline-remote-assets": "^0.2.0", - "postcss": "^8.4.27", + "postcss": "^8.4.29", "postcss-cli": "^10.1.0", - "postcss-focus": "^6.0.0", + "postcss-focus": "^7.0.0", "postcss-list-style-safari-fix": "^1.0.0", - "prettier": "^3.0.1", + "prettier": "^3.0.3", "rimraf": "^5.0.1", - "sass": "^1.64.2", + "sass": "^1.66.1", "start-server-and-test": "^2.0.0", "stylelint": "^14.16.1", "stylelint-config-prettier": "^9.0.5", "stylelint-config-sass-guidelines": "^9.0.1", "validate-branch-name": "^1.3.0", - "xo": "^0.55.0" + "xo": "^0.56.0" } }, "@db-ui/ngx-elements-enterprise": { @@ -18635,7 +18638,7 @@ "lodash.memoize": "4.1.2", "ng-packagr": "14.2.2", "tslib": "^2.6.2", - "zone.js": "~0.13.3" + "zone.js": "~0.14.0" }, "dependencies": { "@babel/core": { diff --git a/showcase/angular-lts-minus-1-showcase/src/app/components/form/form.component.html b/showcase/angular-lts-minus-1-showcase/src/app/components/form/form.component.html index b00c3f691f..e0d0ff2678 100644 --- a/showcase/angular-lts-minus-1-showcase/src/app/components/form/form.component.html +++ b/showcase/angular-lts-minus-1-showcase/src/app/components/form/form.component.html @@ -35,6 +35,15 @@ + + + + +

DbTextarea:

Output
{{ radio ? radio : 'No radio selected' }}
select
{{ select ? select : 'Not Selected' }}
+
select
+
{{ select2 ? select2 : 'Not Selected' }}
textarea
{{ textarea ? textarea : 'No Text set' }}
toggle
diff --git a/showcase/angular-lts-minus-1-showcase/src/app/components/form/form.component.ts b/showcase/angular-lts-minus-1-showcase/src/app/components/form/form.component.ts index e00dee8998..c1d00ff013 100644 --- a/showcase/angular-lts-minus-1-showcase/src/app/components/form/form.component.ts +++ b/showcase/angular-lts-minus-1-showcase/src/app/components/form/form.component.ts @@ -11,6 +11,7 @@ export class FormComponent implements OnInit { checkbox: boolean; radio: string; select: string; + select2: string; textarea: string; toggle: boolean; @@ -44,4 +45,8 @@ export class FormComponent implements OnInit { }) ); } + + onFormChange = (event: any) => { + this.select2 = event.target.value; + }; } From 4069301c314aba25c63612f80594aae369a08dc7 Mon Sep 17 00:00:00 2001 From: Maximilian Franzke Date: Tue, 26 Sep 2023 17:46:31 +0200 Subject: [PATCH 2/8] test: updated test --- e2e/cypress/e2e/99-0-showcases/showcases-form.cy.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/e2e/cypress/e2e/99-0-showcases/showcases-form.cy.js b/e2e/cypress/e2e/99-0-showcases/showcases-form.cy.js index 2e314e70bd..b190778db6 100644 --- a/e2e/cypress/e2e/99-0-showcases/showcases-form.cy.js +++ b/e2e/cypress/e2e/99-0-showcases/showcases-form.cy.js @@ -30,7 +30,7 @@ context('showcase', () => { // 4. Select const option = 'Option 2'; - cy.get('db-select').find('select').select(option); + cy.get('db-select').eq(0).find('select').select(option); checkFormChange(3, option); // 5. Textarea From 5e86a1e048b078a80461a3b6e3a3cae1987d1d43 Mon Sep 17 00:00:00 2001 From: Maximilian Franzke Date: Tue, 26 Sep 2023 17:47:56 +0200 Subject: [PATCH 3/8] fix: tests --- e2e/cypress/e2e/99-0-showcases/showcases-form.cy.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/e2e/cypress/e2e/99-0-showcases/showcases-form.cy.js b/e2e/cypress/e2e/99-0-showcases/showcases-form.cy.js index b190778db6..0a2b972741 100644 --- a/e2e/cypress/e2e/99-0-showcases/showcases-form.cy.js +++ b/e2e/cypress/e2e/99-0-showcases/showcases-form.cy.js @@ -41,11 +41,11 @@ context('showcase', () => { .type(textAreaValue) .blur() .should('have.value', textAreaValue); - checkFormChange(4, textAreaValue); + checkFormChange(5, textAreaValue); // 6. Toggle cy.get('db-toggle').click(); - checkFormChange(5, 'true'); + checkFormChange(6, 'true'); // 7. Button const stub = cy.stub(); From 2c5918c895234c9e92e1dcaf7c365a1ecae42519 Mon Sep 17 00:00:00 2001 From: Maximilian Franzke <787658+mfranzke@users.noreply.github.com> Date: Wed, 27 Sep 2023 07:23:54 +0200 Subject: [PATCH 4/8] Discard changes to e2e/cypress/e2e/99-0-showcases/showcases-form.cy.js --- e2e/cypress/e2e/99-0-showcases/showcases-form.cy.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/e2e/cypress/e2e/99-0-showcases/showcases-form.cy.js b/e2e/cypress/e2e/99-0-showcases/showcases-form.cy.js index 0a2b972741..2e314e70bd 100644 --- a/e2e/cypress/e2e/99-0-showcases/showcases-form.cy.js +++ b/e2e/cypress/e2e/99-0-showcases/showcases-form.cy.js @@ -30,7 +30,7 @@ context('showcase', () => { // 4. Select const option = 'Option 2'; - cy.get('db-select').eq(0).find('select').select(option); + cy.get('db-select').find('select').select(option); checkFormChange(3, option); // 5. Textarea @@ -41,11 +41,11 @@ context('showcase', () => { .type(textAreaValue) .blur() .should('have.value', textAreaValue); - checkFormChange(5, textAreaValue); + checkFormChange(4, textAreaValue); // 6. Toggle cy.get('db-toggle').click(); - checkFormChange(6, 'true'); + checkFormChange(5, 'true'); // 7. Button const stub = cy.stub(); From 825d233bfb36a56ab401a263c09f0f6dfa57ce9d Mon Sep 17 00:00:00 2001 From: Maximilian Franzke <787658+mfranzke@users.noreply.github.com> Date: Wed, 27 Sep 2023 07:24:10 +0200 Subject: [PATCH 5/8] Update form.component.ts --- .../src/app/components/form/form.component.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/showcase/angular-lts-minus-1-showcase/src/app/components/form/form.component.ts b/showcase/angular-lts-minus-1-showcase/src/app/components/form/form.component.ts index c1d00ff013..b8e09948c1 100644 --- a/showcase/angular-lts-minus-1-showcase/src/app/components/form/form.component.ts +++ b/showcase/angular-lts-minus-1-showcase/src/app/components/form/form.component.ts @@ -47,6 +47,6 @@ export class FormComponent implements OnInit { } onFormChange = (event: any) => { - this.select2 = event.target.value; + this.select = event.target.value; }; } From 6a3370e326fa9ad6234b2f92ed40afedcd1cbe51 Mon Sep 17 00:00:00 2001 From: Maximilian Franzke Date: Wed, 27 Sep 2023 07:24:31 +0200 Subject: [PATCH 6/8] chore: replacing those for the moment --- .../src/app/components/form/form.component.html | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/showcase/angular-lts-minus-1-showcase/src/app/components/form/form.component.html b/showcase/angular-lts-minus-1-showcase/src/app/components/form/form.component.html index e0d0ff2678..01c4a94fd1 100644 --- a/showcase/angular-lts-minus-1-showcase/src/app/components/form/form.component.html +++ b/showcase/angular-lts-minus-1-showcase/src/app/components/form/form.component.html @@ -26,15 +26,6 @@

DbSelect:

- - - - - Output
{{ radio ? radio : 'No radio selected' }}
select
{{ select ? select : 'Not Selected' }}
-
select
-
{{ select2 ? select2 : 'Not Selected' }}
textarea
{{ textarea ? textarea : 'No Text set' }}
toggle
From 33af628d28a2e4c72ea1f2f3db66b3ef7de5281c Mon Sep 17 00:00:00 2001 From: Maximilian Franzke <787658+mfranzke@users.noreply.github.com> Date: Wed, 27 Sep 2023 07:25:34 +0200 Subject: [PATCH 7/8] Update form.component.ts --- .../src/app/components/form/form.component.ts | 1 - 1 file changed, 1 deletion(-) diff --git a/showcase/angular-lts-minus-1-showcase/src/app/components/form/form.component.ts b/showcase/angular-lts-minus-1-showcase/src/app/components/form/form.component.ts index b8e09948c1..9928f46aa1 100644 --- a/showcase/angular-lts-minus-1-showcase/src/app/components/form/form.component.ts +++ b/showcase/angular-lts-minus-1-showcase/src/app/components/form/form.component.ts @@ -11,7 +11,6 @@ export class FormComponent implements OnInit { checkbox: boolean; radio: string; select: string; - select2: string; textarea: string; toggle: boolean; From 6edd13081418a62b759d42140e46aabf5f7e66fc Mon Sep 17 00:00:00 2001 From: Maximilian Franzke <787658+mfranzke@users.noreply.github.com> Date: Wed, 27 Sep 2023 07:25:53 +0200 Subject: [PATCH 8/8] Update form.component.html --- .../src/app/components/form/form.component.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/showcase/angular-lts-minus-1-showcase/src/app/components/form/form.component.html b/showcase/angular-lts-minus-1-showcase/src/app/components/form/form.component.html index 01c4a94fd1..c978662aa8 100644 --- a/showcase/angular-lts-minus-1-showcase/src/app/components/form/form.component.html +++ b/showcase/angular-lts-minus-1-showcase/src/app/components/form/form.component.html @@ -28,7 +28,7 @@

DbSelect: