diff --git a/.github/workflows/beta-publish-ng14.yml b/.github/workflows/beta-publish-ng14.yml index 28e223764a..1621c82154 100644 --- a/.github/workflows/beta-publish-ng14.yml +++ b/.github/workflows/beta-publish-ng14.yml @@ -57,7 +57,7 @@ jobs: - name: Set up environment variables run: | last_draft_version=$( - (npm view @prizm-ui/components versions --tag ng14beta --json 2>/dev/null || echo '1.13.0-ng14beta.0') | jq '([.[] | select(startswith("1.13.0-ng14beta"))] | last // "1.13.0-ng14beta.0")' 2>/dev/null || echo '1.13.0-ng14beta.0' + (npm view @prizm-ui/components versions --tag ng14beta --json 2>/dev/null || echo '1.14.0-ng14beta.0') | jq '([.[] | select(startswith("1.14.0-ng14beta"))] | last // "1.14.0-ng14beta.0")' 2>/dev/null || echo '1.14.0-ng14beta.0' ) echo "LAST_DRAFT_VERSION=${last_draft_version}" >> $GITHUB_ENV diff --git a/.github/workflows/beta-publish-ng15.yml b/.github/workflows/beta-publish-ng15.yml index 6d9dcb3221..adb28c517a 100644 --- a/.github/workflows/beta-publish-ng15.yml +++ b/.github/workflows/beta-publish-ng15.yml @@ -57,7 +57,7 @@ jobs: - name: Set up environment variables run: | last_draft_version=$( - (npm view @prizm-ui/components versions --tag ng15beta --json 2>/dev/null || echo '2.10.0-ng15beta.0') | jq '([.[] | select(startswith("2.10.0-ng15beta"))] | last // "2.10.0-ng15beta.0")' 2>/dev/null || echo '2.10.0-ng15beta.0' + (npm view @prizm-ui/components versions --tag ng15beta --json 2>/dev/null || echo '2.11.0-ng15beta.0') | jq '([.[] | select(startswith("2.11.0-ng15beta"))] | last // "2.11.0-ng15beta.0")' 2>/dev/null || echo '2.11.0-ng15beta.0' ) echo "LAST_DRAFT_VERSION=${last_draft_version}" >> $GITHUB_ENV diff --git a/.github/workflows/beta-publish-ng16.yml b/.github/workflows/beta-publish-ng16.yml index a0f2773ee5..ee55ee327b 100644 --- a/.github/workflows/beta-publish-ng16.yml +++ b/.github/workflows/beta-publish-ng16.yml @@ -57,7 +57,7 @@ jobs: - name: Set up environment variables run: | last_draft_version=$( - (npm view @prizm-ui/components versions --tag beta --json 2>/dev/null || echo '3.9.0-beta.0') | jq '([.[] | select(startswith("3.9.0-beta"))] | last // "3.9.0-beta.0")' 2>/dev/null || echo '3.9.0-beta.0' + (npm view @prizm-ui/components versions --tag beta --json 2>/dev/null || echo '3.10.0-beta.0') | jq '([.[] | select(startswith("3.10.0-beta"))] | last // "3.10.0-beta.0")' 2>/dev/null || echo '3.10.0-beta.0' ) echo "LAST_DRAFT_VERSION=${last_draft_version}" >> $GITHUB_ENV diff --git a/.github/workflows/main-publish-ng14.yml b/.github/workflows/main-publish-ng14.yml index dfbd07a1dc..c82a8c2bc2 100644 --- a/.github/workflows/main-publish-ng14.yml +++ b/.github/workflows/main-publish-ng14.yml @@ -58,7 +58,7 @@ jobs: - name: Set up environment variables run: | last_v1_version=$( - echo '1.13.0' + echo '1.14.0' ) echo "LAST_V1_VERSION=${last_v1_version}" >> $GITHUB_ENV diff --git a/.github/workflows/main-publish-ng15.yml b/.github/workflows/main-publish-ng15.yml index ab8c2ea615..d505686470 100644 --- a/.github/workflows/main-publish-ng15.yml +++ b/.github/workflows/main-publish-ng15.yml @@ -57,7 +57,7 @@ jobs: - name: Set up environment variables run: | last_v2_version=$( - echo '2.10.0' + echo '2.11.0' ) echo "LAST_V2_VERSION=${last_v2_version}" >> $GITHUB_ENV diff --git a/.github/workflows/main-publish-ng16.yml b/.github/workflows/main-publish-ng16.yml index d5d9585f6a..069a99b437 100644 --- a/.github/workflows/main-publish-ng16.yml +++ b/.github/workflows/main-publish-ng16.yml @@ -57,7 +57,7 @@ jobs: - name: Set up environment variables run: | last_v3_version=$( - echo '3.9.0' + echo '3.10.0' ) echo "LAST_V3_VERSION=${last_v3_version}" >> $GITHUB_ENV diff --git a/.github/workflows/pre-release-publish-ng14.yml b/.github/workflows/pre-release-publish-ng14.yml index f20c0b24f8..dc3f2d566c 100644 --- a/.github/workflows/pre-release-publish-ng14.yml +++ b/.github/workflows/pre-release-publish-ng14.yml @@ -57,7 +57,7 @@ jobs: - name: Set up environment variables run: | last_next_version=$( - (npm view @prizm-ui/components versions --tag ng14next --json 2>/dev/null || echo '1.13.0-ng14next.0') | jq '([.[] | select(startswith("1.13.0-ng14next"))] | last // "1.13.0-ng14next.0")' 2>/dev/null || echo '1.13.0-ng14next.0' + (npm view @prizm-ui/components versions --tag ng14next --json 2>/dev/null || echo '1.14.0-ng14next.0') | jq '([.[] | select(startswith("1.14.0-ng14next"))] | last // "1.14.0-ng14next.0")' 2>/dev/null || echo '1.14.0-ng14next.0' ) echo "LAST_NEXT_VERSION=${last_next_version}" >> $GITHUB_ENV diff --git a/.github/workflows/pre-release-publish-ng15.yml b/.github/workflows/pre-release-publish-ng15.yml index d724dad289..f3cb5b7980 100644 --- a/.github/workflows/pre-release-publish-ng15.yml +++ b/.github/workflows/pre-release-publish-ng15.yml @@ -57,7 +57,7 @@ jobs: - name: Set up environment variables run: | last_next_version=$( - (npm view @prizm-ui/components versions --tag ng15next --json 2>/dev/null || echo '2.10.0-ng15next.0') | jq '([.[] | select(startswith("2.10.0-ng15next"))] | last // "2.10.0-ng15next.0")' 2>/dev/null || echo '2.10.0-ng15next.0' + (npm view @prizm-ui/components versions --tag ng15next --json 2>/dev/null || echo '2.11.0-ng15next.0') | jq '([.[] | select(startswith("2.11.0-ng15next"))] | last // "2.11.0-ng15next.0")' 2>/dev/null || echo '2.11.0-ng15next.0' ) echo "LAST_NEXT_VERSION=${last_next_version}" >> $GITHUB_ENV diff --git a/.github/workflows/pre-release-publish-ng16.yml b/.github/workflows/pre-release-publish-ng16.yml index 93cfc46ce7..1c5d098ca0 100644 --- a/.github/workflows/pre-release-publish-ng16.yml +++ b/.github/workflows/pre-release-publish-ng16.yml @@ -57,7 +57,7 @@ jobs: - name: Set up environment variables run: | last_next_version=$( - (npm view @prizm-ui/components versions --tag next --json 2>/dev/null || echo '3.9.0-next.0') | jq '([.[] | select(startswith("3.9.0-next"))] | last // "3.9.0-next.0")' 2>/dev/null || echo '3.9.0-next.0' + (npm view @prizm-ui/components versions --tag next --json 2>/dev/null || echo '3.10.0-next.0') | jq '([.[] | select(startswith("3.10.0-next"))] | last // "3.10.0-next.0")' 2>/dev/null || echo '3.10.0-next.0' ) echo "LAST_NEXT_VERSION=${last_next_version}" >> $GITHUB_ENV diff --git a/apps/doc/src/app/about-prizm/changelog/CHANGELOG.md b/apps/doc/src/app/about-prizm/changelog/CHANGELOG.md index 29b2c98c2c..64e7c260b8 100644 --- a/apps/doc/src/app/about-prizm/changelog/CHANGELOG.md +++ b/apps/doc/src/app/about-prizm/changelog/CHANGELOG.md @@ -2,6 +2,18 @@ All notable changes to this project will be documented in this file. +## [1.14.0, 2.11.0, 3.10.0](https://github.com/zyfra/Prizm) (19-01-2023) + +## Features + +- feat(doc): save current theme in local storage on change + +### Bug fixes + +- fix(theme/service): recognize current theme #1287 #1292 +- fix(components/tabs): set stacking context to isolate #1291 +- fix(components/input-text): show status on clear required fields #1284 + ## [1.13.0, 2.10.0, 3.9.0](https://github.com/zyfra/Prizm) (29-12-2023) ## Features diff --git a/apps/doc/src/app/logo/logo.component.ts b/apps/doc/src/app/logo/logo.component.ts index d89482ad31..9cec34cf29 100644 --- a/apps/doc/src/app/logo/logo.component.ts +++ b/apps/doc/src/app/logo/logo.component.ts @@ -1,4 +1,4 @@ -import { ChangeDetectionStrategy, Component, Inject } from '@angular/core'; +import { ChangeDetectionStrategy, Component, inject, OnInit } from '@angular/core'; import { debounceTime, filter, map } from 'rxjs/operators'; import { PrizmThemeService } from '@prizm-ui/theme'; import { LOCAL_STORAGE } from '@ng-web-apis/common'; @@ -10,24 +10,23 @@ import { PrizmIconsSvgRegistry, PrizmIconSvgEnum, prizmIconSvgOtherGitHub } from styleUrls: ['./logo.component.less'], changeDetection: ChangeDetectionStrategy.OnPush, }) -export class LogoComponent { +export class LogoComponent implements OnInit { + readonly githubSvgName = PrizmIconSvgEnum.OTHER_GIT_HUB; + readonly themeSwitcher = inject(PrizmThemeService); + readonly svgRegistry = inject(PrizmIconsSvgRegistry); + readonly storage = inject(LOCAL_STORAGE); readonly isNight$ = this.themeSwitcher.change$.pipe( filter(i => i.el === this.themeSwitcher.rootElement), map(i => i.theme === 'dark'), debounceTime(0) ); - readonly githubSvgName = PrizmIconSvgEnum.OTHER_GIT_HUB; - - constructor( - private readonly themeSwitcher: PrizmThemeService, - private readonly svgRegistry: PrizmIconsSvgRegistry, - @Inject(LOCAL_STORAGE) private readonly storage: Storage - ) { + ngOnInit(): void { this.svgRegistry.registerIcons([prizmIconSvgOtherGitHub]); } public onMode(isNight: boolean): void { + this.storage.setItem(`night`, isNight ? 'true' : 'false'); this.themeSwitcher.update(isNight ? 'dark' : 'light'); } } diff --git a/apps/doc/src/app/version-manager/current.const.ts b/apps/doc/src/app/version-manager/current.const.ts index ba8dd50c8d..e67a621d6c 100644 --- a/apps/doc/src/app/version-manager/current.const.ts +++ b/apps/doc/src/app/version-manager/current.const.ts @@ -1 +1 @@ -export const PRIZM_CURRENT_VERSION = '1.13.0'; +export const PRIZM_CURRENT_VERSION = '1.14.0'; diff --git a/apps/doc/src/app/version-manager/current.const.ts.ng14 b/apps/doc/src/app/version-manager/current.const.ts.ng14 index ba8dd50c8d..e67a621d6c 100644 --- a/apps/doc/src/app/version-manager/current.const.ts.ng14 +++ b/apps/doc/src/app/version-manager/current.const.ts.ng14 @@ -1 +1 @@ -export const PRIZM_CURRENT_VERSION = '1.13.0'; +export const PRIZM_CURRENT_VERSION = '1.14.0'; diff --git a/apps/doc/src/app/version-manager/current.const.ts.ng15 b/apps/doc/src/app/version-manager/current.const.ts.ng15 index 1512ecac66..59fc163711 100644 --- a/apps/doc/src/app/version-manager/current.const.ts.ng15 +++ b/apps/doc/src/app/version-manager/current.const.ts.ng15 @@ -1 +1 @@ -export const PRIZM_CURRENT_VERSION = '2.10.0'; +export const PRIZM_CURRENT_VERSION = '2.11.0'; diff --git a/apps/doc/src/app/version-manager/current.const.ts.ng16 b/apps/doc/src/app/version-manager/current.const.ts.ng16 index 58d270d0eb..37253f64fd 100644 --- a/apps/doc/src/app/version-manager/current.const.ts.ng16 +++ b/apps/doc/src/app/version-manager/current.const.ts.ng16 @@ -1 +1 @@ -export const PRIZM_CURRENT_VERSION = '3.9.0'; +export const PRIZM_CURRENT_VERSION = '3.10.0'; diff --git a/apps/doc/src/app/version-manager/versions.constants.ts b/apps/doc/src/app/version-manager/versions.constants.ts index bd9e9516b8..1470db81b0 100644 --- a/apps/doc/src/app/version-manager/versions.constants.ts +++ b/apps/doc/src/app/version-manager/versions.constants.ts @@ -10,8 +10,8 @@ export interface PrizmVersionMeta { export const PRIZM_VERSIONS_META: readonly PrizmVersionMeta[] = [ { - label: '3.9.0 (ng16)', - version: '3.9.0', + label: '3.10.0 (ng16)', + version: '3.10.0', stackblitz: 'https://stackblitz.com/edit/prizm-v3-demo', link: new URL('http://prizm.site'), otherLinks: [new URL('https://prizm-v3.web.app')], @@ -20,8 +20,8 @@ export const PRIZM_VERSIONS_META: readonly PrizmVersionMeta[] = [ }, }, { - label: '2.10.0 (ng15)', - version: '2.10.0', + label: '2.11.0 (ng15)', + version: '2.11.0', stackblitz: 'https://stackblitz.com/edit/prizm-v2-demo', link: new URL('https://prizm-v2.web.app'), otherLinks: [], @@ -30,8 +30,8 @@ export const PRIZM_VERSIONS_META: readonly PrizmVersionMeta[] = [ }, }, { - label: '1.13.0 (ng14)', - version: '1.13.0', + label: '1.14.0 (ng14)', + version: '1.14.0', stackblitz: 'https://stackblitz.com/edit/prizm-v1-demo', link: new URL('https://prizm-v1.web.app'), otherLinks: [], @@ -40,43 +40,43 @@ export const PRIZM_VERSIONS_META: readonly PrizmVersionMeta[] = [ }, }, { - label: '3.9.0-next (ng16)', - version: '3.9.0-next', + label: '3.10.0-next (ng16)', + version: '3.10.0-next', stackblitz: 'https://stackblitz.com/edit/prizm-v3-next-demo', link: new URL('https://prizm-v3-next.web.app'), otherLinks: [], }, { - label: '2.10.0-next (ng15)', + label: '2.11.0-next (ng15)', stackblitz: 'https://stackblitz.com/edit/prizm-v2-next-demo', - version: '2.10.0-next', + version: '2.11.0-next', link: new URL('https://prizm-v2-next.web.app'), otherLinks: [], }, { - label: '1.13.0-next (ng14)', - version: '1.13.0-next', + label: '1.14.0-next (ng14)', + version: '1.14.0-next', stackblitz: 'https://stackblitz.com/edit/prizm-v1-next-demo', link: new URL('https://prizm-v1-next.web.app'), otherLinks: [], }, { - label: '3.9.0-beta (ng16)', - version: '3.9.0-beta', + label: '3.10.0-beta (ng16)', + version: '3.10.0-beta', stackblitz: 'https://stackblitz.com/edit/prizm-v3-beta-demo', link: new URL('https://prizm-v3-beta.web.app'), otherLinks: [], }, { - label: '2.10.0-beta (ng15)', - version: '2.10.0-beta', + label: '2.11.0-beta (ng15)', + version: '2.11.0-beta', stackblitz: 'https://stackblitz.com/edit/prizm-v2-beta-demo', link: new URL('https://prizm-v2-beta.web.app'), otherLinks: [], }, { - label: '1.13.0-beta (ng14)', - version: '1.13.0-beta', + label: '1.14.0-beta (ng14)', + version: '1.14.0-beta', stackblitz: 'https://stackblitz.com/edit/prizm-v1-beta-demo', link: new URL('https://prizm-v1-beta.web.app'), otherLinks: [], diff --git a/libs/ast/package.json b/libs/ast/package.json index 510ff0c27e..13b2af52bb 100644 --- a/libs/ast/package.json +++ b/libs/ast/package.json @@ -1,6 +1,6 @@ { "name": "@prizm-ui/ast", - "version": "3.9.0", + "version": "3.10.0", "private": false, "publishConfig": { "access": "public", diff --git a/libs/ast/package.json.ng14 b/libs/ast/package.json.ng14 index b6d4c71081..ea0efe8172 100644 --- a/libs/ast/package.json.ng14 +++ b/libs/ast/package.json.ng14 @@ -1,6 +1,6 @@ { "name": "@prizm-ui/ast", - "version": "1.13.0", + "version": "1.14.0", "private": false, "publishConfig": { "access": "public", diff --git a/libs/ast/package.json.ng15 b/libs/ast/package.json.ng15 index 14b0b330da..abd77bb58f 100644 --- a/libs/ast/package.json.ng15 +++ b/libs/ast/package.json.ng15 @@ -1,6 +1,6 @@ { "name": "@prizm-ui/ast", - "version": "2.10.0", + "version": "2.11.0", "private": false, "publishConfig": { "access": "public", diff --git a/libs/ast/package.json.ng16 b/libs/ast/package.json.ng16 index 510ff0c27e..13b2af52bb 100644 --- a/libs/ast/package.json.ng16 +++ b/libs/ast/package.json.ng16 @@ -1,6 +1,6 @@ { "name": "@prizm-ui/ast", - "version": "3.9.0", + "version": "3.10.0", "private": false, "publishConfig": { "access": "public", diff --git a/libs/charts/base/package.json b/libs/charts/base/package.json index 190bdabe88..e449c06dc0 100644 --- a/libs/charts/base/package.json +++ b/libs/charts/base/package.json @@ -1,6 +1,6 @@ { "name": "@prizm-ui/charts", - "version": "3.9.0", + "version": "3.10.0", "license": "MIT", "private": false, "publishConfig": { @@ -11,8 +11,8 @@ "lodash-es": "^4.17.21", "@angular/common": "^16.1.0 || ^16.2.0", "@angular/core": "^16.1.0 || ^16.2.0", - "@prizm-ui/theme": "^3.9.0", - "@prizm-ui/helpers": "^3.9.0", + "@prizm-ui/theme": "^3.10.0", + "@prizm-ui/helpers": "^3.10.0", "@antv/g2plot": "^2.4.22" }, "dependencies": { diff --git a/libs/charts/base/package.json.ng14 b/libs/charts/base/package.json.ng14 index cf8f73fafc..c3774d869a 100644 --- a/libs/charts/base/package.json.ng14 +++ b/libs/charts/base/package.json.ng14 @@ -1,6 +1,6 @@ { "name": "@prizm-ui/charts", - "version": "1.13.0", + "version": "1.14.0", "license": "MIT", "private": false, "publishConfig": { @@ -11,8 +11,8 @@ "lodash-es": "^4.17.21", "@angular/common": "^14.2.0", "@angular/core": "^14.2.0", - "@prizm-ui/theme": "^1.13.0", - "@prizm-ui/helpers": "^1.13.0", + "@prizm-ui/theme": "^1.14.0", + "@prizm-ui/helpers": "^1.14.0", "@antv/g2plot": "^2.4.22" }, "dependencies": { diff --git a/libs/charts/base/package.json.ng15 b/libs/charts/base/package.json.ng15 index c1b27242ff..97c9175a86 100644 --- a/libs/charts/base/package.json.ng15 +++ b/libs/charts/base/package.json.ng15 @@ -1,6 +1,6 @@ { "name": "@prizm-ui/charts", - "version": "2.10.0", + "version": "2.11.0", "license": "MIT", "private": false, "publishConfig": { @@ -11,8 +11,8 @@ "lodash-es": "^4.17.21", "@angular/common": "^15.2.0", "@angular/core": "^15.2.0", - "@prizm-ui/theme": "^2.10.0", - "@prizm-ui/helpers": "^2.10.0", + "@prizm-ui/theme": "^2.11.0", + "@prizm-ui/helpers": "^2.11.0", "@antv/g2plot": "^2.4.22" }, "dependencies": { diff --git a/libs/charts/base/package.json.ng16 b/libs/charts/base/package.json.ng16 index 190bdabe88..e449c06dc0 100644 --- a/libs/charts/base/package.json.ng16 +++ b/libs/charts/base/package.json.ng16 @@ -1,6 +1,6 @@ { "name": "@prizm-ui/charts", - "version": "3.9.0", + "version": "3.10.0", "license": "MIT", "private": false, "publishConfig": { @@ -11,8 +11,8 @@ "lodash-es": "^4.17.21", "@angular/common": "^16.1.0 || ^16.2.0", "@angular/core": "^16.1.0 || ^16.2.0", - "@prizm-ui/theme": "^3.9.0", - "@prizm-ui/helpers": "^3.9.0", + "@prizm-ui/theme": "^3.10.0", + "@prizm-ui/helpers": "^3.10.0", "@antv/g2plot": "^2.4.22" }, "dependencies": { diff --git a/libs/components/package.json b/libs/components/package.json index 301f24cf1c..884d475725 100644 --- a/libs/components/package.json +++ b/libs/components/package.json @@ -1,6 +1,6 @@ { "name": "@prizm-ui/components", - "version": "3.9.0", + "version": "3.10.0", "description": "Prizm UI system design components library http://prizm.zyfra.com", "license": "MIT", "private": false, @@ -18,10 +18,10 @@ "@ng-web-apis/resize-observer": "^3.0.0", "@ng-web-apis/intersection-observer": "^3.0.0", "@ng-web-apis/mutation-observer": "^3.0.0", - "@prizm-ui/helpers": "^3.9.0", - "@prizm-ui/core": "^3.9.0", - "@prizm-ui/i18n": "^3.9.0", - "@prizm-ui/theme": "^3.9.0" + "@prizm-ui/helpers": "^3.10.0", + "@prizm-ui/core": "^3.10.0", + "@prizm-ui/i18n": "^3.10.0", + "@prizm-ui/theme": "^3.10.0" }, "dependencies": { "tslib": "^2.3.0" diff --git a/libs/components/package.json.ng14 b/libs/components/package.json.ng14 index 2c29e97f6f..6edcc443a7 100644 --- a/libs/components/package.json.ng14 +++ b/libs/components/package.json.ng14 @@ -1,6 +1,6 @@ { "name": "@prizm-ui/components", - "version": "1.13.0", + "version": "1.14.0", "description": "Prizm UI system design components library http://prizm.zyfra.com", "license": "MIT", "private": false, @@ -17,10 +17,10 @@ "@ng-web-apis/resize-observer": "2.0.0", "@ng-web-apis/intersection-observer": "2.0.0", "@ng-web-apis/mutation-observer": "2.0.0", - "@prizm-ui/helpers": "^1.13.0", - "@prizm-ui/core": "^1.13.0", - "@prizm-ui/i18n": "^1.13.0", - "@prizm-ui/theme": "^1.13.0" + "@prizm-ui/helpers": "^1.14.0", + "@prizm-ui/core": "^1.14.0", + "@prizm-ui/i18n": "^1.14.0", + "@prizm-ui/theme": "^1.14.0" }, "dependencies": { "tslib": "^2.3.0" diff --git a/libs/components/package.json.ng15 b/libs/components/package.json.ng15 index 56251c2201..45fc9a1859 100644 --- a/libs/components/package.json.ng15 +++ b/libs/components/package.json.ng15 @@ -1,6 +1,6 @@ { "name": "@prizm-ui/components", - "version": "2.10.0", + "version": "2.11.0", "description": "Prizm UI system design components library http://prizm.zyfra.com", "license": "MIT", "private": false, @@ -18,10 +18,10 @@ "@ng-web-apis/resize-observer": "2.0.0", "@ng-web-apis/intersection-observer": "2.0.0", "@ng-web-apis/mutation-observer": "2.0.0", - "@prizm-ui/helpers": "^2.10.0", - "@prizm-ui/core": "^2.10.0", - "@prizm-ui/i18n": "^2.10.0", - "@prizm-ui/theme": "^2.10.0" + "@prizm-ui/helpers": "^2.11.0", + "@prizm-ui/core": "^2.11.0", + "@prizm-ui/i18n": "^2.11.0", + "@prizm-ui/theme": "^2.11.0" }, "dependencies": { "tslib": "^2.3.0" diff --git a/libs/components/package.json.ng16 b/libs/components/package.json.ng16 index 301f24cf1c..884d475725 100644 --- a/libs/components/package.json.ng16 +++ b/libs/components/package.json.ng16 @@ -1,6 +1,6 @@ { "name": "@prizm-ui/components", - "version": "3.9.0", + "version": "3.10.0", "description": "Prizm UI system design components library http://prizm.zyfra.com", "license": "MIT", "private": false, @@ -18,10 +18,10 @@ "@ng-web-apis/resize-observer": "^3.0.0", "@ng-web-apis/intersection-observer": "^3.0.0", "@ng-web-apis/mutation-observer": "^3.0.0", - "@prizm-ui/helpers": "^3.9.0", - "@prizm-ui/core": "^3.9.0", - "@prizm-ui/i18n": "^3.9.0", - "@prizm-ui/theme": "^3.9.0" + "@prizm-ui/helpers": "^3.10.0", + "@prizm-ui/core": "^3.10.0", + "@prizm-ui/i18n": "^3.10.0", + "@prizm-ui/theme": "^3.10.0" }, "dependencies": { "tslib": "^2.3.0" diff --git a/libs/components/src/lib/components/input/input-text/input-text.component.ts b/libs/components/src/lib/components/input/input-text/input-text.component.ts index d5f46ef745..eddd77a411 100644 --- a/libs/components/src/lib/components/input/input-text/input-text.component.ts +++ b/libs/components/src/lib/components/input/input-text/input-text.component.ts @@ -20,6 +20,7 @@ import { takeUntil, tap } from 'rxjs/operators'; import { PrizmInputControl } from '../common/base/input-control.class'; import { PrizmInputHintDirective, PrizmInputLayoutComponent } from '../common'; import { NgxMaskDirective } from 'ngx-mask'; +import { timer } from 'rxjs'; @Component({ selector: @@ -187,7 +188,7 @@ export class PrizmInputTextComponent { - this.maybeMask, this.maybeMask?.writeValue(null as any); + this.maybeMask?.writeValue(null as any); }), takeUntil(this.destroy) ) @@ -283,14 +284,10 @@ export class PrizmInputTextComponent { - this.maybeMask, this.maybeMask?.writeValue(null as any); + this.maybeMask?.writeValue(null as any); }), takeUntil(this.destroy) ) @@ -279,14 +284,10 @@ export class PrizmInputTextComponent this.themeService.update(newTheme, this.elementRef.nativeElement)), - tap(newTheme => this.prizmThemeChange.next(newTheme)), + tap(newTheme => newTheme && this.themeService.update(newTheme, this.elementRef.nativeElement)), + tap(newTheme => newTheme && this.prizmThemeChange.next(newTheme)), takeUntil(this.destroy$) ) .subscribe(); diff --git a/libs/theme/src/lib/services/theme.service.ts b/libs/theme/src/lib/services/theme.service.ts index c87e9ba58f..96bd8f1172 100644 --- a/libs/theme/src/lib/services/theme.service.ts +++ b/libs/theme/src/lib/services/theme.service.ts @@ -37,13 +37,16 @@ export class PrizmThemeService implements OnDestroy { this.subscription.add(this.change$.pipe(tap(theme => this.setToHtml(theme.theme, theme.el))).subscribe()); } - public getLastThemeForElement(el: HTMLElement = this.rootElement): string { - return this.themeStorage.get(el) as string; + public getLastThemeForElement(el: HTMLElement = this.rootElement): string | null { + let theme = this.themeStorage.get(el); + if (el !== this.rootElement_) + theme = el.closest(`[${this.attThemeKey}]`)?.getAttribute(this.attThemeKey) as string; + return theme ?? null; } - public getLastThemeForElement$(el: HTMLElement = this.rootElement): Observable { + public getLastThemeForElement$(el: HTMLElement = this.rootElement): Observable { return this.change$.pipe( - map(i => this.getLastThemeForElement(el)), + map(() => this.getLastThemeForElement(el)), distinctUntilChanged() ); } @@ -54,8 +57,8 @@ export class PrizmThemeService implements OnDestroy { light: 'dark', dark: 'light', } - ): Observable { - return this.getLastThemeForElement$(element).pipe(map(theme => pairThemeValues[theme])); + ): Observable { + return this.getLastThemeForElement$(element).pipe(map(theme => theme && pairThemeValues[theme])); } public getByElement(el?: HTMLElement): PrizmTheme { diff --git a/package.json b/package.json index 9fa93f013a..e9442726ec 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@prizm-ui/sdk", - "version": "3.9.0", + "version": "3.10.0", "license": "MIT", "husky": { "hooks": { diff --git a/package.json.ng14 b/package.json.ng14 index fc01ccd01b..afa0a05006 100644 --- a/package.json.ng14 +++ b/package.json.ng14 @@ -1,6 +1,6 @@ { "name": "@prizm-ui/sdk", - "version": "1.13.0", + "version": "1.14.0", "license": "MIT", "husky": { "hooks": { diff --git a/package.json.ng15 b/package.json.ng15 index 920f4d13df..6465c95c63 100644 --- a/package.json.ng15 +++ b/package.json.ng15 @@ -1,6 +1,6 @@ { "name": "@prizm-ui/sdk", - "version": "2.10.0", + "version": "2.11.0", "license": "MIT", "husky": { "hooks": { diff --git a/package.json.ng16 b/package.json.ng16 index 9fa93f013a..e9442726ec 100644 --- a/package.json.ng16 +++ b/package.json.ng16 @@ -1,6 +1,6 @@ { "name": "@prizm-ui/sdk", - "version": "3.9.0", + "version": "3.10.0", "license": "MIT", "husky": { "hooks": {