From a3dfecc2bb28619fa30418a9084cc76935da83b9 Mon Sep 17 00:00:00 2001
From: Benjamin <166110368+BenjaminPabst@users.noreply.github.com>
Date: Tue, 26 Nov 2024 15:41:30 +0100
Subject: [PATCH 1/8] feat: implemented build-copy command (#617)
* feat: implemented build-copy command
---
.gitignore | 2 ++
copy-build.js | 27 +++++++++++++++++++++++++++
package.json | 3 ++-
3 files changed, 31 insertions(+), 1 deletion(-)
create mode 100644 copy-build.js
diff --git a/.gitignore b/.gitignore
index 42e7f14b..86ad3331 100644
--- a/.gitignore
+++ b/.gitignore
@@ -140,3 +140,5 @@ dist
libs/angular-accelerator/tmp/
libs/portal-integration-angular/tmp/
+
+.copy-build-to
\ No newline at end of file
diff --git a/copy-build.js b/copy-build.js
new file mode 100644
index 00000000..4aee1c92
--- /dev/null
+++ b/copy-build.js
@@ -0,0 +1,27 @@
+const fs = require('fs');
+const path = require('path');
+const { execSync } = require('child_process');
+
+// Define the path to the .copy-build-to file
+const copyBuildToFile = path.join(__dirname, '.copy-build-to');
+
+// Check if the .copy-build-to file exists
+if (!fs.existsSync(copyBuildToFile)) {
+ // Create the .copy-build-to file with instructions
+ fs.writeFileSync(copyBuildToFile, 'Enter the paths where you want to copy the compiled output, each on a new line.\nExample:\n/path/to/destination1/node_modules/@onecx\n/path/to/destination2/node_modules/@onecx\n');
+ console.log('.copy-build-to file created. Please add the paths where you want to copy the compiled output, each on a new line.');
+ process.exit(0);
+}
+
+// Read the paths from the .copy-build-to file
+const paths = fs.readFileSync(copyBuildToFile, 'utf-8').split('\n').filter(Boolean);
+
+// Define the source directory
+const sourceDir = path.join(__dirname, 'dist');
+
+// Copy the compiled output to each path
+paths.forEach(destination => {
+ const destDir = path.resolve(destination);
+ execSync(`cp -r ${sourceDir}/libs/* ${destDir}`, { stdio: 'inherit' });
+ console.log(`Copied compiled output to ${destDir}`);
+});
\ No newline at end of file
diff --git a/package.json b/package.json
index 76c831ac..1319d4e0 100644
--- a/package.json
+++ b/package.json
@@ -5,7 +5,8 @@
"scripts": {
"sass": "npx sass libs/portal-integration-angular/assets/styles.scss libs/portal-integration-angular/assets/output.css",
"postinstall": "mkdir -p .nx",
- "build": "nx run-many -t build"
+ "build": "nx run-many -t build",
+ "build-copy": "npm run build && node copy-build.js"
},
"private": true,
"dependencies": {
From 6dd0b41708ea36fa934ced9bf3ee3a67068a9c19 Mon Sep 17 00:00:00 2001
From: markuczy <129275100+markuczy@users.noreply.github.com>
Date: Thu, 28 Nov 2024 14:49:03 +0100
Subject: [PATCH 2/8] chore: prerelease branch develop added (#619)
---
release.config.js | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)
diff --git a/release.config.js b/release.config.js
index 28da6ad7..281d3355 100644
--- a/release.config.js
+++ b/release.config.js
@@ -1,5 +1,11 @@
module.exports = {
- branches: ['main'],
+ branches: [
+ 'main',
+ {
+ name: 'develop',
+ prerelease: 'rc',
+ },
+ ],
preset: 'conventionalcommits',
presetConfig: {
types: [
@@ -26,7 +32,7 @@ module.exports = {
[
'@semantic-release/exec',
{
- prepareCmd: `./release-script.sh \${nextRelease.version}`,
+ prepareCmd: `./release-script.sh \${nextRelease.version}`,
},
],
[
From bb1ac871af95691567326633afec70bb4fd8b4b2 Mon Sep 17 00:00:00 2001
From: markuczy <129275100+markuczy@users.noreply.github.com>
Date: Thu, 28 Nov 2024 15:43:40 +0100
Subject: [PATCH 3/8] feat: README update (#620)
---
README.md | 48 +++++++++++++++++++++++++++++++++++++++++++++++-
1 file changed, 47 insertions(+), 1 deletion(-)
diff --git a/README.md b/README.md
index 19e05d08..24d9072b 100644
--- a/README.md
+++ b/README.md
@@ -6,6 +6,52 @@ OneCx portal UI libraries
[Changelog](CHANGELOG.md)
+# Release configuration
+
+OneCX Portal UI Libs is using https://semantic-release.gitbook.io/semantic-release[semantic-release]for packages release. In this repository the following branches are important in context of making new releases:
+
+- **main** - contains source code for `latest` distribution tag.
+- **develop** - contains source code for `rc` distribution tag with features for future release of OneCX.
+
+# Releasing libs
+
+The `main` branch contains the source code for the `latest` distribution tag of OneCX libraries. In order to release new version of libs, use `create-release` action to run the release workflow for **main branch**.
+
+## Release versioning
+
+Depending on the commits included for a release in the `main` branch, the version of the `latest` distribution tag varies. Below, a list of example version changes is presented:
+
+- Release fix commit - The patch version increments (e.g., `5.1.3` → `5.1.4`).
+- Release feat commit - The minor version increments (e.g., `5.1.3` → `5.2.0`).
+- Release commit with breaking change - The major version increments (e.g., `5.1.3` → `6.0.0`).
+- Release changes merged from pre-release branch - The major version increments (e.g., `5.1.3` → `6.0.0`).
+
+# Pre-releases
+
+The https://semantic-release.gitbook.io/semantic-release[semantic-release] allows to create pre-releases. In this repository, `develop` branch should contain source code which could be released as a release candidate.
+
+In order to release new version of pre-release (`rc` distribution tag) of OneCX libraries, use `create-release` action to run the release workflow for **develop branch**.
+
+## Pre-release versioning
+
+Depending on the commits included for a release in the `develop` branch, the version of the `rc` distribution tag varies. Below, a list of example version changes is presented:
+
+- Release fix commit - The patch version increments (e.g., `6.0.0-rc.3` → `6.0.0-rc.4`).
+- Release feat commit - The minor version increments (e.g., `6.0.0-rc.3` → `6.0.0-rc.4`).
+- Release commit with breaking change - The major version increments (e.g., `6.0.0-rc.3` → `7.0.0-rc.1`).
+- Release changes merged from pre-release branch - The major version increments (e.g., `6.0.0-rc.3` → `7.0.0-rc.1`).
+
+To find out more on pre-releases with semantic-release, please refer https://semantic-release.gitbook.io/semantic-release/recipes/release-workflow/pre-releases[here].
+
+# Porting changes from main to develop
+
+In some cases, there might be a requirement to make a change directly on a main branch (e.g., urgent fix for a client). In that scenario, the following should happen:
+
+- Change is prepared on the `main` branch
+- Libs are released via the `main` branch
+- The `main` branch is merged into `develop` branch
+- Libs pre-release is released via the `develop` branch
+
# Update from v3 to v4 guide
-[Update guide](update-guide.md)
\ No newline at end of file
+[Update guide](update-guide.md)
From 3f3da6001ed409b909ec80478ec8fa392ada67cf Mon Sep 17 00:00:00 2001
From: markuczy <129275100+markuczy@users.noreply.github.com>
Date: Thu, 28 Nov 2024 15:46:40 +0100
Subject: [PATCH 4/8] feat: add CI and storybook to develop (#622)
---
.github/workflows/ci.yml | 7 ++++---
.github/workflows/storybook-build-fork.yml | 12 ++++++------
2 files changed, 10 insertions(+), 9 deletions(-)
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index 96aabed5..3dc4b5aa 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -2,12 +2,13 @@ name: build
on:
push:
branches:
- - "*"
- - "*/*"
- - "**"
+ - '*'
+ - '*/*'
+ - '**'
pull_request:
branches:
- main
+ - develop
- v3
jobs:
main:
diff --git a/.github/workflows/storybook-build-fork.yml b/.github/workflows/storybook-build-fork.yml
index 4a08615f..88b94f5f 100644
--- a/.github/workflows/storybook-build-fork.yml
+++ b/.github/workflows/storybook-build-fork.yml
@@ -1,8 +1,9 @@
name: Build Storybook (Fork)
-on:
+on:
pull_request:
- branches:
- - 'main'
+ branches:
+ - 'main'
+ - 'develop'
jobs:
build-storybooks:
runs-on: ubuntu-latest
@@ -20,6 +21,5 @@ jobs:
- name: Upload build artifacts
uses: actions/upload-artifact@v4
with:
- name: storybook-dist
- path: dist/storybook/
-
+ name: storybook-dist
+ path: dist/storybook/
From d46f65f4d192383aa3cf56a716bff0885b91d9bf Mon Sep 17 00:00:00 2001
From: markuczy <129275100+markuczy@users.noreply.github.com>
Date: Mon, 2 Dec 2024 12:54:32 +0100
Subject: [PATCH 5/8] fix: tooltip added for select all in data table (#626)
---
libs/angular-accelerator/assets/i18n/de.json | 1 +
libs/angular-accelerator/assets/i18n/en.json | 1 +
.../src/lib/components/data-table/data-table.component.html | 1 +
libs/portal-integration-angular/assets/i18n/de.json | 1 +
libs/portal-integration-angular/assets/i18n/en.json | 1 +
5 files changed, 5 insertions(+)
diff --git a/libs/angular-accelerator/assets/i18n/de.json b/libs/angular-accelerator/assets/i18n/de.json
index 1c9bb4fa..9ed20489 100644
--- a/libs/angular-accelerator/assets/i18n/de.json
+++ b/libs/angular-accelerator/assets/i18n/de.json
@@ -73,6 +73,7 @@
"ARIA_LABEL": "{{column}} {{direction}} sortieren"
},
"SELECT_ALL_ARIA_LABEL": "Selektiere alle Zeilen der Tabelle",
+ "SELECT_ALL_TOOLTIP": "Selektiere alle",
"SELECT_ARIA_LABEL": "Selektiere die Tabellenspalte mit der ID {{key}}",
"FILTER_YES": "Ja",
"FILTER_NO": "Nein"
diff --git a/libs/angular-accelerator/assets/i18n/en.json b/libs/angular-accelerator/assets/i18n/en.json
index 4ff99916..1432948a 100644
--- a/libs/angular-accelerator/assets/i18n/en.json
+++ b/libs/angular-accelerator/assets/i18n/en.json
@@ -73,6 +73,7 @@
"ARIA_LABEL": "Toggle {{column}} sorting direction to {{direction}}"
},
"SELECT_ALL_ARIA_LABEL": "Select all table rows",
+ "SELECT_ALL_TOOLTIP": "Select all",
"SELECT_ARIA_LABEL": "Select table row with id {{key}}",
"FILTER_YES": "Yes",
"FILTER_NO": "No"
diff --git a/libs/angular-accelerator/src/lib/components/data-table/data-table.component.html b/libs/angular-accelerator/src/lib/components/data-table/data-table.component.html
index 4596fe99..e9fa0e7d 100644
--- a/libs/angular-accelerator/src/lib/components/data-table/data-table.component.html
+++ b/libs/angular-accelerator/src/lib/components/data-table/data-table.component.html
@@ -135,6 +135,7 @@
|
diff --git a/libs/portal-integration-angular/assets/i18n/de.json b/libs/portal-integration-angular/assets/i18n/de.json
index 5d182b8e..3f69dfb5 100644
--- a/libs/portal-integration-angular/assets/i18n/de.json
+++ b/libs/portal-integration-angular/assets/i18n/de.json
@@ -94,6 +94,7 @@
"ARIA_LABEL": "{{column}} {{direction}} sortieren"
},
"SELECT_ALL_ARIA_LABEL": "Selektiere alle Zeilen der Tabelle",
+ "SELECT_ALL_TOOLTIP": "Selektiere alle",
"SELECT_ARIA_LABEL": "Selektiere die Tabellenspalte mit der ID {{key}}",
"FILTER_YES": "Ja",
"FILTER_NO": "Nein"
diff --git a/libs/portal-integration-angular/assets/i18n/en.json b/libs/portal-integration-angular/assets/i18n/en.json
index 62dd636b..da9357c2 100644
--- a/libs/portal-integration-angular/assets/i18n/en.json
+++ b/libs/portal-integration-angular/assets/i18n/en.json
@@ -94,6 +94,7 @@
"ARIA_LABEL": "Toggle {{column}} sorting direction to {{direction}}"
},
"SELECT_ALL_ARIA_LABEL": "Select all table rows",
+ "SELECT_ALL_TOOLTIP": "Select all",
"SELECT_ARIA_LABEL": "Select table row with id {{key}}",
"FILTER_YES": "Yes",
"FILTER_NO": "No"
From aa6b9f86387ae032bbdd83e7852f0cca936e5503 Mon Sep 17 00:00:00 2001
From: markuczy <129275100+markuczy@users.noreply.github.com>
Date: Mon, 2 Dec 2024 13:12:19 +0100
Subject: [PATCH 6/8] fix: overflow actions should use provided id (#627)
---
.../src/lib/components/page-header/page-header.component.ts | 1 +
1 file changed, 1 insertion(+)
diff --git a/libs/angular-accelerator/src/lib/components/page-header/page-header.component.ts b/libs/angular-accelerator/src/lib/components/page-header/page-header.component.ts
index c72e1f61..fc0c3f8d 100644
--- a/libs/angular-accelerator/src/lib/components/page-header/page-header.component.ts
+++ b/libs/angular-accelerator/src/lib/components/page-header/page-header.component.ts
@@ -265,6 +265,7 @@ export class PageHeaderComponent implements OnInit, OnChanges {
})
this.overflowActions = [
...allowedActions.map