@telia-ace/widget-core-flamingo 1.1.22-rc.1 → 1.1.22-rc.2

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,6 +1,7 @@
1
1
  import { Trigger } from '../components/trigger.component';
2
2
  import { Wrapper } from '../components/wrapper.component';
3
3
  import { ComponentPlatform } from '../services/component-platform';
4
+ import { TextsService } from '../services/texts.service';
4
5
  import { ApplicationOptions, PluginType, RenderStrategy, TriggerIcon, WidgetConfig } from '../types';
5
6
  import { Container } from './container';
6
7
  export declare class Application {
@@ -9,6 +10,7 @@ export declare class Application {
9
10
  settings: WidgetConfig;
10
11
  private options;
11
12
  platform: ComponentPlatform;
13
+ texts: TextsService;
12
14
  root?: Wrapper;
13
15
  renderStrategy: RenderStrategy;
14
16
  triggerIcon?: TriggerIcon;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@telia-ace/widget-core-flamingo",
3
- "version": "1.1.22-rc.1",
3
+ "version": "1.1.22-rc.2",
4
4
  "dependencies": {
5
5
  "lit": "^3.0.2",
6
6
  "@teliads/icons": "^8.4.0",
@@ -0,0 +1,9 @@
1
+ export interface ITextsService {
2
+ loadTexts(texts: Record<string, string>): void;
3
+ get(key: string): string | null;
4
+ }
5
+ export declare class TextsService implements ITextsService {
6
+ private texts;
7
+ loadTexts(texts: Record<string, string>): void;
8
+ get(key: string, fallback?: string): string | null;
9
+ }
package/types.d.ts CHANGED
@@ -10,6 +10,7 @@ export type ComponentDefinition = {
10
10
  };
11
11
  export type WidgetConfig = {
12
12
  entry: string;
13
+ texts?: Record<string, string>;
13
14
  components: Record<string, ComponentDefinition>;
14
15
  branding: Record<string, any>;
15
16
  };