Skip to content

Commit

Permalink
fix(components/i18n): remove deprecated features from generated resou…
Browse files Browse the repository at this point in the history
…rces module (#2905)
  • Loading branch information
Blackbaud-SteveBrush authored Nov 14, 2024
1 parent 1a15087 commit 04bae38
Show file tree
Hide file tree
Showing 34 changed files with 0 additions and 714 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,9 @@
*/
import { NgModule } from '@angular/core';
import {
SKY_LIB_RESOURCES_PROVIDERS,
SkyAppLocaleInfo,
SkyI18nModule,
SkyLibResources,
SkyLibResourcesProvider,
SkyLibResourcesService,
getLibStringForLocale,
} from '@skyux/i18n';

const RESOURCES: Record<string, SkyLibResources> = {
Expand All @@ -23,26 +19,10 @@ const RESOURCES: Record<string, SkyLibResources> = {

SkyLibResourcesService.addResources(RESOURCES);

export class SkyA11yResourcesProvider implements SkyLibResourcesProvider {
public getString(
localeInfo: SkyAppLocaleInfo,
name: string,
): string | undefined {
return getLibStringForLocale(RESOURCES, localeInfo.locale, name);
}
}

/**
* Import into any component library module that needs to use resource strings.
*/
@NgModule({
exports: [SkyI18nModule],
providers: [
{
provide: SKY_LIB_RESOURCES_PROVIDERS,
useClass: SkyA11yResourcesProvider,
multi: true,
},
],
})
export class SkyA11yResourcesModule {}
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,9 @@
*/
import { NgModule } from '@angular/core';
import {
SKY_LIB_RESOURCES_PROVIDERS,
SkyAppLocaleInfo,
SkyI18nModule,
SkyLibResources,
SkyLibResourcesProvider,
SkyLibResourcesService,
getLibStringForLocale,
} from '@skyux/i18n';

const RESOURCES: Record<string, SkyLibResources> = {
Expand All @@ -28,26 +24,10 @@ const RESOURCES: Record<string, SkyLibResources> = {

SkyLibResourcesService.addResources(RESOURCES);

export class SkyActionBarsResourcesProvider implements SkyLibResourcesProvider {
public getString(
localeInfo: SkyAppLocaleInfo,
name: string,
): string | undefined {
return getLibStringForLocale(RESOURCES, localeInfo.locale, name);
}
}

/**
* Import into any component library module that needs to use resource strings.
*/
@NgModule({
exports: [SkyI18nModule],
providers: [
{
provide: SKY_LIB_RESOURCES_PROVIDERS,
useClass: SkyActionBarsResourcesProvider,
multi: true,
},
],
})
export class SkyActionBarsResourcesModule {}
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,9 @@
*/
import { NgModule } from '@angular/core';
import {
SKY_LIB_RESOURCES_PROVIDERS,
SkyAppLocaleInfo,
SkyI18nModule,
SkyLibResources,
SkyLibResourcesProvider,
SkyLibResourcesService,
getLibStringForLocale,
} from '@skyux/i18n';

const RESOURCES: Record<string, SkyLibResources> = {
Expand Down Expand Up @@ -68,26 +64,10 @@ const RESOURCES: Record<string, SkyLibResources> = {

SkyLibResourcesService.addResources(RESOURCES);

export class SkyAgGridResourcesProvider implements SkyLibResourcesProvider {
public getString(
localeInfo: SkyAppLocaleInfo,
name: string,
): string | undefined {
return getLibStringForLocale(RESOURCES, localeInfo.locale, name);
}
}

/**
* Import into any component library module that needs to use resource strings.
*/
@NgModule({
exports: [SkyI18nModule],
providers: [
{
provide: SKY_LIB_RESOURCES_PROVIDERS,
useClass: SkyAgGridResourcesProvider,
multi: true,
},
],
})
export class SkyAgGridResourcesModule {}
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,9 @@
*/
import { NgModule } from '@angular/core';
import {
SKY_LIB_RESOURCES_PROVIDERS,
SkyAppLocaleInfo,
SkyI18nModule,
SkyLibResources,
SkyLibResourcesProvider,
SkyLibResourcesService,
getLibStringForLocale,
} from '@skyux/i18n';

const RESOURCES: Record<string, SkyLibResources> = {
Expand All @@ -29,28 +25,10 @@ const RESOURCES: Record<string, SkyLibResources> = {

SkyLibResourcesService.addResources(RESOURCES);

export class SkyAngularTreeComponentResourcesProvider
implements SkyLibResourcesProvider
{
public getString(
localeInfo: SkyAppLocaleInfo,
name: string,
): string | undefined {
return getLibStringForLocale(RESOURCES, localeInfo.locale, name);
}
}

/**
* Import into any component library module that needs to use resource strings.
*/
@NgModule({
exports: [SkyI18nModule],
providers: [
{
provide: SKY_LIB_RESOURCES_PROVIDERS,
useClass: SkyAngularTreeComponentResourcesProvider,
multi: true,
},
],
})
export class SkyAngularTreeComponentResourcesModule {}
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,9 @@
*/
import { NgModule } from '@angular/core';
import {
SKY_LIB_RESOURCES_PROVIDERS,
SkyAppLocaleInfo,
SkyI18nModule,
SkyLibResources,
SkyLibResourcesProvider,
SkyLibResourcesService,
getLibStringForLocale,
} from '@skyux/i18n';

const RESOURCES: Record<string, SkyLibResources> = {
Expand All @@ -41,26 +37,10 @@ const RESOURCES: Record<string, SkyLibResources> = {

SkyLibResourcesService.addResources(RESOURCES);

export class SkyAvatarResourcesProvider implements SkyLibResourcesProvider {
public getString(
localeInfo: SkyAppLocaleInfo,
name: string,
): string | undefined {
return getLibStringForLocale(RESOURCES, localeInfo.locale, name);
}
}

/**
* Import into any component library module that needs to use resource strings.
*/
@NgModule({
exports: [SkyI18nModule],
providers: [
{
provide: SKY_LIB_RESOURCES_PROVIDERS,
useClass: SkyAvatarResourcesProvider,
multi: true,
},
],
})
export class SkyAvatarResourcesModule {}
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,9 @@
*/
import { NgModule } from '@angular/core';
import {
SKY_LIB_RESOURCES_PROVIDERS,
SkyAppLocaleInfo,
SkyI18nModule,
SkyLibResources,
SkyLibResourcesProvider,
SkyLibResourcesService,
getLibStringForLocale,
} from '@skyux/i18n';

const RESOURCES: Record<string, SkyLibResources> = {
Expand Down Expand Up @@ -43,28 +39,10 @@ const RESOURCES: Record<string, SkyLibResources> = {

SkyLibResourcesService.addResources(RESOURCES);

export class SkyColorpickerResourcesProvider
implements SkyLibResourcesProvider
{
public getString(
localeInfo: SkyAppLocaleInfo,
name: string,
): string | undefined {
return getLibStringForLocale(RESOURCES, localeInfo.locale, name);
}
}

/**
* Import into any component library module that needs to use resource strings.
*/
@NgModule({
exports: [SkyI18nModule],
providers: [
{
provide: SKY_LIB_RESOURCES_PROVIDERS,
useClass: SkyColorpickerResourcesProvider,
multi: true,
},
],
})
export class SkyColorpickerResourcesModule {}
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,9 @@
*/
import { NgModule } from '@angular/core';
import {
SKY_LIB_RESOURCES_PROVIDERS,
SkyAppLocaleInfo,
SkyI18nModule,
SkyLibResources,
SkyLibResourcesProvider,
SkyLibResourcesService,
getLibStringForLocale,
} from '@skyux/i18n';

const RESOURCES: Record<string, SkyLibResources> = {
Expand All @@ -28,26 +24,10 @@ const RESOURCES: Record<string, SkyLibResources> = {

SkyLibResourcesService.addResources(RESOURCES);

export class SkyCoreResourcesProvider implements SkyLibResourcesProvider {
public getString(
localeInfo: SkyAppLocaleInfo,
name: string,
): string | undefined {
return getLibStringForLocale(RESOURCES, localeInfo.locale, name);
}
}

/**
* Import into any component library module that needs to use resource strings.
*/
@NgModule({
exports: [SkyI18nModule],
providers: [
{
provide: SKY_LIB_RESOURCES_PROVIDERS,
useClass: SkyCoreResourcesProvider,
multi: true,
},
],
})
export class SkyCoreResourcesModule {}
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,9 @@
*/
import { NgModule } from '@angular/core';
import {
SKY_LIB_RESOURCES_PROVIDERS,
SkyAppLocaleInfo,
SkyI18nModule,
SkyLibResources,
SkyLibResourcesProvider,
SkyLibResourcesService,
getLibStringForLocale,
} from '@skyux/i18n';

const RESOURCES: Record<string, SkyLibResources> = {
Expand Down Expand Up @@ -60,28 +56,10 @@ const RESOURCES: Record<string, SkyLibResources> = {

SkyLibResourcesService.addResources(RESOURCES);

export class SkyDataManagerResourcesProvider
implements SkyLibResourcesProvider
{
public getString(
localeInfo: SkyAppLocaleInfo,
name: string,
): string | undefined {
return getLibStringForLocale(RESOURCES, localeInfo.locale, name);
}
}

/**
* Import into any component library module that needs to use resource strings.
*/
@NgModule({
exports: [SkyI18nModule],
providers: [
{
provide: SKY_LIB_RESOURCES_PROVIDERS,
useClass: SkyDataManagerResourcesProvider,
multi: true,
},
],
})
export class SkyDataManagerResourcesModule {}
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,9 @@
*/
import { NgModule } from '@angular/core';
import {
SKY_LIB_RESOURCES_PROVIDERS,
SkyAppLocaleInfo,
SkyI18nModule,
SkyLibResources,
SkyLibResourcesProvider,
SkyLibResourcesService,
getLibStringForLocale,
} from '@skyux/i18n';

const RESOURCES: Record<string, SkyLibResources> = {
Expand Down Expand Up @@ -125,26 +121,10 @@ const RESOURCES: Record<string, SkyLibResources> = {

SkyLibResourcesService.addResources(RESOURCES);

export class SkyDatetimeResourcesProvider implements SkyLibResourcesProvider {
public getString(
localeInfo: SkyAppLocaleInfo,
name: string,
): string | undefined {
return getLibStringForLocale(RESOURCES, localeInfo.locale, name);
}
}

/**
* Import into any component library module that needs to use resource strings.
*/
@NgModule({
exports: [SkyI18nModule],
providers: [
{
provide: SKY_LIB_RESOURCES_PROVIDERS,
useClass: SkyDatetimeResourcesProvider,
multi: true,
},
],
})
export class SkyDatetimeResourcesModule {}
Loading

0 comments on commit 04bae38

Please sign in to comment.