diff --git a/CHANGELOG.md b/CHANGELOG.md index c46b7c11b..b638166fc 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,13 @@ All notable changes to this project will be documented in this file. See [commit-and-tag-version](https://github.com/absolute-version/commit-and-tag-version) for commit guidelines. +### [6.3.1-rc.0](https://github.com/ironSource/fusion-ui/compare/v6.3.0...v6.3.1-rc.0) (2023-11-21) + + +### Bug Fixes + +* **isct-126:** fixed icon component on icon name change ([3224eb9](https://github.com/ironSource/fusion-ui/commit/3224eb94d4307bf78f729809763bf0bad0530e04)) + ## [6.3.0](https://github.com/ironSource/fusion-ui/compare/v6.3.0-rc.0...v6.3.0) (2023-11-16) diff --git a/package.json b/package.json index a693a6a10..36a495e78 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "fusion-ui", - "version": "6.3.0", + "version": "6.3.1-rc.0", "description": "UI library created by ironSource", "license": "MIT", "repository": { diff --git a/projects/fusion-docs/src/app/pages/components/dropdown-docs/dropdown-docs.component.html b/projects/fusion-docs/src/app/pages/components/dropdown-docs/dropdown-docs.component.html index 138c0adb0..d06b61c40 100644 --- a/projects/fusion-docs/src/app/pages/components/dropdown-docs/dropdown-docs.component.html +++ b/projects/fusion-docs/src/app/pages/components/dropdown-docs/dropdown-docs.component.html @@ -159,6 +159,16 @@ > +
+
+ +
+
diff --git a/projects/fusion-docs/src/app/pages/components/dropdown-docs/dropdown-docs.component.ts b/projects/fusion-docs/src/app/pages/components/dropdown-docs/dropdown-docs.component.ts index 2bcbdf342..b7a6a62b4 100644 --- a/projects/fusion-docs/src/app/pages/components/dropdown-docs/dropdown-docs.component.ts +++ b/projects/fusion-docs/src/app/pages/components/dropdown-docs/dropdown-docs.component.ts @@ -3,7 +3,7 @@ import {FormGroup, FormBuilder, Validators, FormControl} from '@angular/forms'; import {StyleVersion} from '@ironsource/fusion-ui/components/fusion-base'; import {of, Observable, Subject} from 'rxjs'; import {delay, finalize, takeUntil} from 'rxjs/operators'; -import {EXISTED_TITLES, OPTIONS_COUNTRIES, OPTIONS_GROUPED, OPTIONS_GROUPED_SUBGROUP} from './dropdown-docs.config'; +import {EXISTED_TITLES, MOK_APPLICATIONS, OPTIONS_COUNTRIES, OPTIONS_GROUPED, OPTIONS_GROUPED_SUBGROUP} from './dropdown-docs.config'; import {DocsMenuItem} from '../../../components/docs-menu/docs-menu'; import {Router} from '@angular/router'; import {AbTestOptionComponent} from '../../../components/ab-test-option/ab-test-option.component'; @@ -165,6 +165,7 @@ export class DropdownDocsComponent implements OnInit, OnDestroy { optionsAutoComplete: Array; options: Array; optionsNoIcons: Array; + optionsApplications: Array; optionsNoIconsWithImages: Array; loading: boolean; optionsNoScroll2: Array; @@ -504,7 +505,7 @@ export class DropdownDocsComponent implements OnInit, OnDestroy { ngOnInit() { this.selectedVersion$.subscribe((styleVersion: StyleVersion) => { if (styleVersion === StyleVersion.V2 || styleVersion === StyleVersion.V3) { - this.router.navigate(['docs/components/v2/dropdown']); + // this.router.navigate(['docs/components/v2/dropdown']); } }); @@ -651,6 +652,16 @@ export class DropdownDocsComponent implements OnInit, OnDestroy { this.countriesOptions = [this.allCountriesOption, ...this.countriesOptions]; + this.optionsApplications = MOK_APPLICATIONS.map(item => { + return { + id: item.id, + title: item.name, + displayText: item.name, + icon: item.platform.toLowerCase(), + image: item.icon + }; + }); + this.optionsNoScroll2 = [...this.optionsNoIcons.filter((item, idx) => idx < 8)]; this.formInit(); diff --git a/projects/fusion-docs/src/app/pages/components/dropdown-docs/dropdown-docs.config.ts b/projects/fusion-docs/src/app/pages/components/dropdown-docs/dropdown-docs.config.ts index 7e9413f5e..e8ee2d3e9 100644 --- a/projects/fusion-docs/src/app/pages/components/dropdown-docs/dropdown-docs.config.ts +++ b/projects/fusion-docs/src/app/pages/components/dropdown-docs/dropdown-docs.config.ts @@ -1165,3 +1165,79 @@ export const OPTIONS_COUNTRIES = [ }, {id: 'ZW', flag: 'ZW', title: 'Zimbabwe', displayText: 'Zimbabwe'} ]; + +export const MOK_APPLICATIONS = [ + { + id: 553251, + name: 'Moy 7 the Virtual Pet Game', + displayText: 'Moy 7 the Virtual Pet Game', + platform: 'android', + icon: 'https://lh3.googleusercontent.com/T0yo2MIuoWWrhk7vaNX18MaOOI3StYYNb43Y1V_X8QJiWGu0SgMCAhSqoNc9ei5BHH9b=s180', + subText: {text: '12421542'} + }, + { + id: 551615, + name: '夢幻模擬戰', + displayText: '夢幻模擬戰', + platform: 'ios', + icon: 'https://is5-ssl.mzstatic.com/image/thumb/Purple124/v4/82/ce/6f/82ce6f3a-ed24-e4f8-bf28-830560af691d/source/512x512bb.jpg', + subText: {text: '112455'} + }, + { + id: 549109, + name: 'Helix Crush - Fruit Slices', + displayText: 'Helix Crush - Fruit Slices', + platform: 'ios', + icon: 'https://is4-ssl.mzstatic.com/image/thumb/Purple123/v4/e5/52/eb/e552eb88-72c7-f284-7622-988200f345bd/source/512x512bb.jpg', + subText: {text: '167722'} + }, + { + id: 545663, + name: 'Kingdom Rush Frontiers', + displayText: 'Kingdom Rush Frontiers', + platform: 'android', + icon: 'https://lh3.googleusercontent.com/lqbNkK3Tgw8npbbWNssKVjiI7ZH1-C-8im-NyixTepAGio_xtdnr9ldT8GxBTaDmhwp0=s180' + }, + { + id: 545567, + name: 'Ablo - Make friends worldwide', + displayText: 'Ablo - Make friends worldwide', + platform: 'android', + icon: 'https://lh3.googleusercontent.com/qw50MiIrtOz_DeXNvlIQqFpIk8Den4j5z7bW23eTooSeqFYj_2LXj8HWDzSYrxR0iic=s180' + }, + { + id: 545559, + name: 'NBA LIVE Mobile Basketball', + displayText: 'NBA LIVE Mobile Basketball', + platform: 'android', + icon: 'https://lh3.googleusercontent.com/KW3SuJ-4xWj8xckPOw7llVxvBrnM3NlU6WYif_bEMg44gRCooFgjrYxaAX0lLfvocQ=s180' + }, + { + id: 545429, + name: 'World War Doh: Real Time PvP', + displayText: 'World War Doh: Real Time PvP', + platform: 'android', + icon: 'https://lh3.googleusercontent.com/NleNP8mCBQuJSUzc5QFpiniY5biu1JtpV6pgosxyY_-bWGEu15e_vOMPqm3hRmbCdLc=s180' + }, + { + id: 544961, + name: 'Mobile Royale MMORPG - Build a Strategy for Battle', + displayText: 'Mobile Royale MMORPG - Build a Strategy for Battle', + platform: 'android', + icon: 'https://lh3.googleusercontent.com/VZcAB5sdwGT66yNKUCQ9o4AZ11KzpP1YcNA7_6ZzD8lOoGs-vyyiOx1AR51YGGfLf30=s180' + }, + { + id: 540129, + name: 'Most expensive and exclusive calculator', + displayText: 'Most expensive and exclusive calculator', + platform: 'android', + icon: 'https://lh3.googleusercontent.com/KYpLlktBqJsjPpgfoIXL_irBfBPJN5DAjsMUTLFJvdrUYDU-xHAQC-SYey7z6XzELw=s180' + }, + { + id: 540127, + name: 'Ramp Bike Impossible Racing Game', + displayText: 'Ramp Bike Impossible Racing Game', + platform: 'android', + icon: 'https://lh3.googleusercontent.com/USRZI9JD5tMqZjtuKPi9tdd0lrWwJkHrse1FPtuv_bk6lxQI6mhARvUZzmD5RiEuBn0=s180' + } +]; diff --git a/projects/fusion-docs/src/app/pages/components/dropdown-docs/dropdown-docs.module.ts b/projects/fusion-docs/src/app/pages/components/dropdown-docs/dropdown-docs.module.ts index 6cf4441f7..9e909720d 100644 --- a/projects/fusion-docs/src/app/pages/components/dropdown-docs/dropdown-docs.module.ts +++ b/projects/fusion-docs/src/app/pages/components/dropdown-docs/dropdown-docs.module.ts @@ -13,6 +13,7 @@ import {DropdownModule} from '@ironsource/fusion-ui/components/dropdown/v1'; import {MultiDropdownModule} from '@ironsource/fusion-ui/components/multi-dropdown/v1'; import {AddboxDropdownModule} from '@ironsource/fusion-ui/components/addbox-dropdown/v1'; import {CheckboxModule} from '@ironsource/fusion-ui/components/checkbox/v1'; +import {IconModule} from '@ironsource/fusion-ui/components/icon/v1'; const routes: Routes = [{path: '', component: DropdownDocsComponent}]; @@ -31,7 +32,8 @@ const routes: Routes = [{path: '', component: DropdownDocsComponent}]; DropdownModule, MultiDropdownModule, AddboxDropdownModule, - AbTestOptionModule + AbTestOptionModule, + IconModule ] }) export class DropdownDocsModule {} diff --git a/projects/fusion-ui/components/icon/v1/icon.component.ts b/projects/fusion-ui/components/icon/v1/icon.component.ts index 390c778c5..326f305f3 100644 --- a/projects/fusion-ui/components/icon/v1/icon.component.ts +++ b/projects/fusion-ui/components/icon/v1/icon.component.ts @@ -37,6 +37,7 @@ export class IconComponent extends SvgComponent { } private setLibPath(value: string): void { + this.removeCssClass(); if (typeof value === 'string' && value.includes('/')) { const lastIndex = value.lastIndexOf('/'); this.libVersion = value.substring(0, lastIndex); @@ -48,11 +49,14 @@ export class IconComponent extends SvgComponent { } } + private removeCssClass(): void { + if (!!this.iconName) { + this.renderer.removeClass(this.elementRef.nativeElement, this.iconName.replace(/[\/,_, ]/gi, '-')); + } + this.iconName = null; + } + private onNameChanged(value: string): void { - this.renderer.removeClass( - this.elementRef.nativeElement, - !!this.iconName ? this.iconName.replace(/[\/,_, ]/gi, '-') : this.iconName - ); if (!!value) { this.renderer.addClass(this.elementRef.nativeElement, value.replace(/[\/,_, ]/gi, '-')); } diff --git a/projects/fusion-ui/package.json b/projects/fusion-ui/package.json index 0bc23481e..5995971a3 100644 --- a/projects/fusion-ui/package.json +++ b/projects/fusion-ui/package.json @@ -1,6 +1,6 @@ { "name": "@ironsource/fusion-ui", - "version": "6.3.0", + "version": "6.3.1-rc.0", "dependencies": { "chart.js": "^3.5.1", "@floating-ui/dom": "^1.0.9",