Skip to content

Commit

Permalink
Merge branch 'onecx:main' into main-v4
Browse files Browse the repository at this point in the history
  • Loading branch information
markuczy authored Jul 30, 2024
2 parents 5ec11fd + 0a1af15 commit ac776bd
Show file tree
Hide file tree
Showing 118 changed files with 21,537 additions and 23,113 deletions.
18 changes: 18 additions & 0 deletions .github/workflows/nx.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: Check for new NX version

on:
schedule:
- cron: "0 0 * * *" # every day at midnight
workflow_dispatch:

jobs:
build:
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v4
- run: npm ci
- uses: timonmasberg/[email protected]
with:
repoToken: ${{ secrets.CI_PAT }}
68 changes: 68 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,71 @@
## [5.2.0](https://github.com/onecx/onecx-portal-ui-libs/compare/v5.1.5...v5.2.0) (2024-07-29)

### Features

* permission checker is optional for permission directive ([#346](https://github.com/onecx/onecx-portal-ui-libs/issues/346)) ([7de9fd8](https://github.com/onecx/onecx-portal-ui-libs/commit/7de9fd853679421cf2331c44db6807aa19efd87a))

### Bug Fixes

* additional fixes v5 styling ([#345](https://github.com/onecx/onecx-portal-ui-libs/issues/345)) ([58bfa99](https://github.com/onecx/onecx-portal-ui-libs/commit/58bfa99edb790d8218e76c438c42bf86941ca2cc))

## [5.1.5](https://github.com/onecx/onecx-portal-ui-libs/compare/v5.1.4...v5.1.5) (2024-07-29)

### Bug Fixes

* additional fixes for v5 ([#331](https://github.com/onecx/onecx-portal-ui-libs/issues/331)) ([4c2088b](https://github.com/onecx/onecx-portal-ui-libs/commit/4c2088b635b559d4f8ec0ddaf85141ef91fd0176))

## [5.1.4](https://github.com/onecx/onecx-portal-ui-libs/compare/v5.1.3...v5.1.4) (2024-07-28)

### Bug Fixes

* package json lib versions ([#342](https://github.com/onecx/onecx-portal-ui-libs/issues/342)) ([b9528ab](https://github.com/onecx/onecx-portal-ui-libs/commit/b9528abe060bc9f0d60e3529d0cbfe1035c84e38))
* sorting and filtering in data table view fix ([#339](https://github.com/onecx/onecx-portal-ui-libs/issues/339)) ([89337bd](https://github.com/onecx/onecx-portal-ui-libs/commit/89337bdb7198a6c97f791cca185549eb4b0f1d51))
* update angular versions ([#340](https://github.com/onecx/onecx-portal-ui-libs/issues/340)) ([be5ecd7](https://github.com/onecx/onecx-portal-ui-libs/commit/be5ecd781ddce8dc2b2fae43089e8e6b0ab45976))

## [5.1.3](https://github.com/onecx/onecx-portal-ui-libs/compare/v5.1.2...v5.1.3) (2024-07-26)

### Bug Fixes

* correctly inject LOCALE_ID in angular-accelerator.module ([#337](https://github.com/onecx/onecx-portal-ui-libs/issues/337)) ([2369875](https://github.com/onecx/onecx-portal-ui-libs/commit/2369875b717ff71e034ca476040d2bbc7e8cb1fe))

## [5.1.2](https://github.com/onecx/onecx-portal-ui-libs/compare/v5.1.1...v5.1.2) (2024-07-24)

### Bug Fixes

* fix output.css.map ([#336](https://github.com/onecx/onecx-portal-ui-libs/issues/336)) ([9fdd049](https://github.com/onecx/onecx-portal-ui-libs/commit/9fdd049f5045227608af038ce8606de37b6b35bc))

## [5.1.1](https://github.com/onecx/onecx-portal-ui-libs/compare/v5.1.0...v5.1.1) (2024-07-24)

### Refactoring

* improve webcomponent router initializer ([#332](https://github.com/onecx/onecx-portal-ui-libs/issues/332)) ([1e51f28](https://github.com/onecx/onecx-portal-ui-libs/commit/1e51f28e59cdee7d7147dd49af537930173b940e))

## [5.1.0](https://github.com/onecx/onecx-portal-ui-libs/compare/v5.0.1...v5.1.0) (2024-07-23)

### Features

* dialog can have custom buttons ([#326](https://github.com/onecx/onecx-portal-ui-libs/issues/326)) ([c61a79d](https://github.com/onecx/onecx-portal-ui-libs/commit/c61a79d5e8bb00aa0f2edf5f4c3a1ee31bf3e78b))

### Bug Fixes

* fix overflow menu display bug for table + list grid ([#327](https://github.com/onecx/onecx-portal-ui-libs/issues/327)) ([20f940a](https://github.com/onecx/onecx-portal-ui-libs/commit/20f940aa60f2a18d8cad931adef3d68e493724ed))

## [5.0.1](https://github.com/onecx/onecx-portal-ui-libs/compare/v5.0.0...v5.0.1) (2024-07-18)

### Bug Fixes

* update lib versions in every peerDependencies ([#325](https://github.com/onecx/onecx-portal-ui-libs/issues/325)) ([155d869](https://github.com/onecx/onecx-portal-ui-libs/commit/155d8698b67e105f7974bbb4b33a52045e722411))

## [5.0.0](https://github.com/onecx/onecx-portal-ui-libs/compare/v4.43.1...v5.0.0) (2024-07-18)

### ⚠ BREAKING CHANGES

* update angular version (#306)

### Features

* update angular version ([#306](https://github.com/onecx/onecx-portal-ui-libs/issues/306)) ([01e0211](https://github.com/onecx/onecx-portal-ui-libs/commit/01e0211d02457e150b9f323216318fdaba4421f0))

## [4.43.1](https://github.com/onecx/onecx-portal-ui-libs/compare/v4.43.0...v4.43.1) (2024-07-18)


Expand Down
4 changes: 2 additions & 2 deletions libs/accelerator/package.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"name": "@onecx/accelerator",
"version": "4.43.1",
"version": "5.2.0",
"peerDependencies": {
"tslib": "^2.3.0",
"tslib": "^2.6.3",
"rxjs": "7.8.1"
},
"type": "commonjs",
Expand Down
3 changes: 2 additions & 1 deletion libs/accelerator/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
export * from './lib/topic/topic'
export * from './lib/topic/syncable-topic'
export * from './lib/topic/topic-publisher'
export * from './lib/utils/path.utils'
export * from './lib/utils/path.utils'
export * from './lib/utils/date.utils'
4 changes: 4 additions & 0 deletions libs/accelerator/src/lib/utils/date.utils.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
export function isValidDate(value: any): value is Date {
return value instanceof Date && !isNaN(value as any);
}

1 change: 1 addition & 0 deletions libs/angular-accelerator/jest.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,5 @@ export default {
'jest-preset-angular/build/serializers/ng-snapshot',
'jest-preset-angular/build/serializers/html-comment',
],
testEnvironment: '@happy-dom/jest-environment',
}
17 changes: 9 additions & 8 deletions libs/angular-accelerator/ng-package.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
{
"$schema": "../../node_modules/ng-packagr/ng-package.schema.json",
"dest": "../../dist/libs/angular-accelerator",
"lib": {
"entryFile": "src/index.ts"
},
"assets": ["./assets/**"]
}

"$schema": "../../node_modules/ng-packagr/ng-package.schema.json",
"dest": "../../dist/libs/angular-accelerator",
"lib": {
"entryFile": "src/index.ts"
},
"assets": [
"./assets/**"
]
}
30 changes: 15 additions & 15 deletions libs/angular-accelerator/package.json
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
{
"name": "@onecx/angular-accelerator",
"version": "4.43.1",
"version": "5.2.0",
"peerDependencies": {
"@angular/common": "^15.2.7",
"@angular/core": "^15.2.7",
"@angular/cdk": "^15.2.7",
"@angular/forms": "^15.2.7",
"@angular/platform-browser": "^15.2.7",
"@angular/router": "^15.2.7",
"@ngx-translate/core": "^14.0.0",
"@ngneat/until-destroy": "^9.2.2",
"@onecx/integration-interface": "^4",
"@onecx/angular-integration-interface": "^4",
"chart.js": "^4.4.0",
"d3-scale-chromatic": "^3.0.0",
"rxjs": "~7.8.0",
"primeng": "^15.0.0"
"@angular/common": "^18.0.5",
"@angular/core": "^18.0.5",
"@angular/cdk": "^18.0.6",
"@angular/forms": "^18.0.5",
"@angular/platform-browser": "^18.0.5",
"@angular/router": "^18.0.5",
"@ngx-translate/core": "^15.0.0",
"@ngneat/until-destroy": "^10.0.0",
"@onecx/integration-interface": "^5",
"@onecx/angular-integration-interface": "^5",
"chart.js": "^4.4.3",
"d3-scale-chromatic": "^3.1.0",
"rxjs": "~7.8.1",
"primeng": "^17.18.6"
},
"dependencies": {},
"exports": {
Expand Down
21 changes: 15 additions & 6 deletions libs/angular-accelerator/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,9 @@
},
"test": {
"executor": "@nx/jest:jest",
"outputs": ["{workspaceRoot}/coverage/{projectRoot}"],
"outputs": [
"{workspaceRoot}/coverage/{projectRoot}"
],
"options": {
"jestConfig": "libs/angular-accelerator/jest.config.ts",
"passWithNoTests": true
Expand All @@ -40,9 +42,15 @@
},
"lint": {
"executor": "@nx/linter:eslint",
"outputs": ["{options.outputFile}"],
"outputs": [
"{options.outputFile}"
],
"options": {
"lintFilePatterns": ["libs/angular-accelerator/**/*.ts", "libs/angular-accelerator/**/*.html", "libx/angular-accelerator/package.json"]
"lintFilePatterns": [
"libs/angular-accelerator/**/*.ts",
"libs/angular-accelerator/**/*.html",
"libx/angular-accelerator/package.json"
]
}
},
"release": {
Expand Down Expand Up @@ -73,7 +81,9 @@
},
"build-storybook": {
"executor": "@storybook/angular:build-storybook",
"outputs": ["{options.outputDir}"],
"outputs": [
"{options.outputDir}"
],
"options": {
"outputDir": "dist/storybook/angular-accelerator",
"configDir": "libs/angular-accelerator/.storybook",
Expand All @@ -85,7 +95,6 @@
"libs/angular-accelerator/assets/styles.scss",
"libs/angular-accelerator/.storybook/storybook.css"
]

},
"configurations": {
"ci": {
Expand All @@ -94,4 +103,4 @@
}
}
}
}
}
20 changes: 16 additions & 4 deletions libs/angular-accelerator/src/lib/angular-accelerator.module.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { CommonModule } from '@angular/common'
import { LOCALE_ID, NgModule } from '@angular/core'
import { APP_INITIALIZER, LOCALE_ID, NgModule } from '@angular/core'
import { FormsModule, ReactiveFormsModule } from '@angular/forms'
import { RouterModule } from '@angular/router'
import { MissingTranslationHandler, MissingTranslationHandlerParams, TranslateModule } from '@ngx-translate/core'
Expand Down Expand Up @@ -27,6 +27,8 @@ import { SrcDirective } from './directives/src.directive'
import { DynamicPipe } from './pipes/dynamic.pipe'
import { OcxTimeAgoPipe } from './pipes/ocxtimeago.pipe'
import { AppConfigService } from './services/app-config-service'
import { DynamicLocaleId } from './utils/dynamic-locale-id'
import { firstValueFrom, skip } from 'rxjs'

export class AngularAcceleratorMissingTranslationHandler implements MissingTranslationHandler {
handle(params: MissingTranslationHandlerParams) {
Expand All @@ -35,6 +37,12 @@ export class AngularAcceleratorMissingTranslationHandler implements MissingTrans
}
}

function appInitializer(userService: UserService) {
return async () => {
await firstValueFrom(userService.lang$.pipe(skip(1)))
}
}

@NgModule({
imports: [
CommonModule,
Expand Down Expand Up @@ -69,15 +77,19 @@ export class AngularAcceleratorMissingTranslationHandler implements MissingTrans
providers: [
{
provide: LOCALE_ID,
useFactory: (UserService: UserService) => {
return UserService.lang$.getValue()
},
useClass: DynamicLocaleId,
deps: [UserService],
},
{
provide: HAS_PERMISSION_CHECKER,
useExisting: UserService,
},
{
provide: APP_INITIALIZER,
useFactory: appInitializer,
deps: [UserService],
multi: true
},
AppConfigService,
],
exports: [
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
<p-button
id="customGroupColumnSelectorButton"
type="button"
(click)="onOpenCustomGroupColumnSelectionDialogClick()"
(onClick)="onOpenCustomGroupColumnSelectionDialogClick()"
[title]="openButtonTitle || ('OCX_CUSTOM_GROUP_COLUMN_SELECTOR.OPEN_BUTTON_DETAIL' | translate)"
icon="pi pi-cog"
styleClass="p-button"
[ariaLabel]="openButtonTitle || ('OCX_CUSTOM_GROUP_COLUMN_SELECTOR.OPEN_BUTTON_DETAIL' | translate)"
[attr.aria-label]="openButtonTitle || ('OCX_CUSTOM_GROUP_COLUMN_SELECTOR.OPEN_BUTTON_DETAIL' | translate)"
></p-button>

<p-dialog header="Header" [(visible)]="visible" [style]="{ width: '70%' }" [modal]="true" [closeAriaLabel]="('OCX_CUSTOM_GROUP_COLUMN_SELECTOR.ARIA_LABELS.CLOSE' | translate)">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
optionLabel="icon"
(onChange)="onDataViewLayoutChange($event.value)"
>
<ng-template let-item>
<ng-template let-item pTemplate>
<i [class]="item.icon" [title]="item.title || (item.titleKey | translate)"></i>
</ng-template>
</p-selectButton>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,6 @@
styleClass="p-button-outlined"
(onClick)="sortDirectionChanged()"
[title]="(sortIconTitle() | translate)"
[ariaLabel]="('OCX_LIST_GRID_SORT.SORTING_BUTTON_ARIA_LABEL' | translate:{direction: (sortDirectionToTitle(nextSortDirection())) | translate})"
[attr.aria-label]="('OCX_LIST_GRID_SORT.SORTING_BUTTON_ARIA_LABEL' | translate:{direction: (sortDirectionToTitle(nextSortDirection())) | translate})"
></p-button>
</div>
Loading

0 comments on commit ac776bd

Please sign in to comment.