@telia-ace/widget-core 1.0.19 → 1.0.20-next.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,5 +1,5 @@
1
1
  import { Container, EventSubscriptionCancellation } from '@webprovisions/platform';
2
- export declare type Action = (origin: string, action: string, value?: any) => void;
2
+ export type Action = (origin: string, action: string, value?: any) => void;
3
3
  export default class ActionResolver {
4
4
  private events;
5
5
  constructor(container: Container);
@@ -1,7 +1,7 @@
1
1
  import { BootstrappedImplementation } from '@webprovisions/bootstrapping';
2
2
  import { ConfigureCallback } from '@webprovisions/platform';
3
3
  import Implementation from './implementation';
4
- export declare type BootstrapOptions = {
4
+ export type BootstrapOptions = {
5
5
  /**
6
6
  * Resolver function for the root element to base the bootstrapping on.
7
7
  */
@@ -3,15 +3,15 @@ import { ComponentNodeController } from './component-controller';
3
3
  import { ComponentNode } from './component-node';
4
4
  import { ComponentPlatform } from './component-platform';
5
5
  import { ComponentQuery } from './component-query';
6
- export declare type ActionData = any;
7
- export declare type ActionHandler = (data: any, options: any, instance: ComponentNodeController) => any;
8
- export declare type NextActionDelegate = (data: any, options?: any) => Promise<any>;
9
- export declare type WatchActionDelegate = (input: ActionData, next: NextActionDelegate, instance: ComponentNodeController) => Promise<any> | any;
10
- export declare type ActionWatcherContext = {
6
+ export type ActionData = any;
7
+ export type ActionHandler = (data: any, options: any, instance: ComponentNodeController) => any;
8
+ export type NextActionDelegate = (data: any, options?: any) => Promise<any>;
9
+ export type WatchActionDelegate = (input: ActionData, next: NextActionDelegate, instance: ComponentNodeController) => Promise<any> | any;
10
+ export type ActionWatcherContext = {
11
11
  source: ComponentNode;
12
12
  action: string;
13
13
  };
14
- export declare type ActionsState = {
14
+ export type ActionsState = {
15
15
  handlers: {
16
16
  fn: ActionHandler;
17
17
  key: string;
@@ -1,7 +1,7 @@
1
1
  import { EventManager } from '@webprovisions/platform';
2
2
  import { ComponentNode } from './component-node';
3
3
  import { SwitchMap } from './component-platform';
4
- export declare type QueryDescriptor = {
4
+ export type QueryDescriptor = {
5
5
  id?: string;
6
6
  type?: string;
7
7
  name?: string;
@@ -1,41 +1,41 @@
1
1
  import { Container, EventManager } from '@webprovisions/platform';
2
2
  import { Breakpoints } from '../types';
3
- export declare type ComponentNodeEventData = {
3
+ export type ComponentNodeEventData = {
4
4
  node: ComponentNode;
5
5
  };
6
- export declare type RemoveChangeset = () => void;
7
- export declare type ComponentNodeAttributes = {
6
+ export type RemoveChangeset = () => void;
7
+ export type ComponentNodeAttributes = {
8
8
  tags: string[];
9
9
  properties: ComponentNodeProperties;
10
10
  context: ComponentNodeContext;
11
11
  layout: ComponentNodeLayout;
12
12
  };
13
- export declare type ResolveComponentNodeProperties = (properties: ComponentNodeProperties) => Partial<ComponentNodeProperties> | void;
14
- export declare type ResolveComponentNodeContext = (context: ComponentNodeContext) => Partial<ComponentNodeContext>;
15
- export declare type ResolveComponentNodeLayout = (layout: ComponentNodeLayout) => Partial<ComponentNodeLayout>;
16
- export declare type ComponentNodeSettings = {
13
+ export type ResolveComponentNodeProperties = (properties: ComponentNodeProperties) => Partial<ComponentNodeProperties> | void;
14
+ export type ResolveComponentNodeContext = (context: ComponentNodeContext) => Partial<ComponentNodeContext>;
15
+ export type ResolveComponentNodeLayout = (layout: ComponentNodeLayout) => Partial<ComponentNodeLayout>;
16
+ export type ComponentNodeSettings = {
17
17
  tags?: string[];
18
18
  properties?: ComponentNodeProperties | ResolveComponentNodeProperties;
19
19
  context?: ComponentNodeContext | ResolveComponentNodeContext;
20
20
  layout?: ComponentNodeLayout | ResolveComponentNodeLayout;
21
21
  };
22
- export declare type ComponentNodeProperties = {
22
+ export type ComponentNodeProperties = {
23
23
  [key: string]: any;
24
24
  };
25
- export declare type ComponentNodeContext = {
25
+ export type ComponentNodeContext = {
26
26
  [key: string]: any;
27
27
  };
28
- export declare type ComponentNodeLayout = {
28
+ export type ComponentNodeLayout = {
29
29
  size?: Size;
30
30
  indent?: number;
31
31
  order?: number;
32
32
  };
33
- export declare type Size = number | 'full' | 'none';
34
- export declare type UnmountComponentNode = () => void;
35
- export declare type ChangesetOptions = {
33
+ export type Size = number | 'full' | 'none';
34
+ export type UnmountComponentNode = () => void;
35
+ export type ChangesetOptions = {
36
36
  breakpoints?: Breakpoints;
37
37
  };
38
- export declare type Changeset = [Partial<ComponentNodeSettings>, ChangesetOptions];
38
+ export type Changeset = [Partial<ComponentNodeSettings>, ChangesetOptions];
39
39
  export declare class ComponentNode {
40
40
  private events;
41
41
  id: string;
@@ -5,13 +5,13 @@ import { ChangesetOptions, ComponentNode, ComponentNodeSettings, RemoveChangeset
5
5
  import { ComponentNodeCollection } from './component-node-collection';
6
6
  import { ComponentQuery } from './component-query';
7
7
  import { CustomHandlerCallback } from './custom-component-handler';
8
- export declare type MergeOptions = {
8
+ export type MergeOptions = {
9
9
  breakpoints?: string[];
10
10
  };
11
- export declare type SwitchMap = {
11
+ export type SwitchMap = {
12
12
  [id: string]: string;
13
13
  };
14
- export declare type ChangesetData = {
14
+ export type ChangesetData = {
15
15
  key?: string;
16
16
  target: ComponentQuery;
17
17
  attributes: Partial<ComponentNodeSettings>;
@@ -1,7 +1,7 @@
1
1
  import { AbstractComponentController } from './component-controller';
2
2
  import { ComponentNode } from './component-node';
3
3
  import { ComponentPlatform } from './component-platform';
4
- export declare type ComponentQueryRule = {
4
+ export type ComponentQueryRule = {
5
5
  id?: string;
6
6
  type?: string;
7
7
  };
@@ -2,20 +2,20 @@ import { EventSubscriptionCancellation } from '@webprovisions/platform';
2
2
  import { Breakpoints, ComponentSettings, ViewDefinition, WidgetSettings } from '../types';
3
3
  import { ComponentNode, ComponentNodeContext, ComponentNodeLayout, ComponentNodeProperties } from './component-node';
4
4
  import { ComponentPlatform } from './component-platform';
5
- declare type ComponentReference = string | [string, ...ComponentReferenceOverride[]];
6
- declare type ComponentReferenceOverride = {
5
+ type ComponentReference = string | [string, ...ComponentReferenceOverride[]];
6
+ type ComponentReferenceOverride = {
7
7
  breakpoints?: Breakpoints;
8
8
  tags?: string[];
9
9
  context?: ComponentNodeContext;
10
10
  properties?: ComponentNodeProperties;
11
11
  layout?: ComponentNodeLayout;
12
12
  };
13
- export declare type NormalizedComponentReference = {
13
+ export type NormalizedComponentReference = {
14
14
  definitionId: string;
15
15
  overrides: ComponentReferenceOverride[];
16
16
  };
17
17
  export declare const normalizeReference: (reference: ComponentReference) => NormalizedComponentReference;
18
- export declare type ComponentHandlerOptions = {
18
+ export type ComponentHandlerOptions = {
19
19
  platform: ComponentPlatform;
20
20
  node: ComponentNode;
21
21
  references: ComponentReference[];
@@ -2,7 +2,7 @@ import { ComponentReference, ComponentSettings, ViewDefinition } from '../types'
2
2
  import { ComponentNode } from './component-node';
3
3
  import { ComponentPlatform } from './component-platform';
4
4
  import { NormalizedComponentReference } from './create-component-model';
5
- export declare type CustomHandlerCallback = (ref: NormalizedComponentReference, options: {
5
+ export type CustomHandlerCallback = (ref: NormalizedComponentReference, options: {
6
6
  platform: ComponentPlatform;
7
7
  node: ComponentNode;
8
8
  references: ComponentReference[];
@@ -1,5 +1,5 @@
1
1
  import { ComponentNode } from './component-node';
2
- export declare type ComponentDescriptor = {
2
+ export type ComponentDescriptor = {
3
3
  id: string;
4
4
  type?: string;
5
5
  name?: string;
@@ -1,8 +1,8 @@
1
1
  import { Container } from '@webprovisions/platform';
2
2
  import { ComponentNodeController } from './component-controller';
3
3
  import { ComponentQuery } from './component-query';
4
- export declare type ExtendComponentHandler = (controller: ComponentNodeController) => any;
5
- export declare type ExtendComponentOptions = {
4
+ export type ExtendComponentHandler = (controller: ComponentNodeController) => any;
5
+ export type ExtendComponentOptions = {
6
6
  reuseController?: boolean;
7
7
  };
8
8
  export declare const extendComponent: (container: Container, typeOrQuery: string | ComponentQuery, handler: ExtendComponentHandler, ns?: string, options?: ExtendComponentOptions) => Promise<void>;
@@ -1,12 +1,12 @@
1
1
  import { ComponentPlatform } from '.';
2
2
  import { ComponentNode } from './component-node';
3
- export declare type ProcessOptions = {
3
+ export type ProcessOptions = {
4
4
  context?: boolean;
5
5
  properties?: boolean;
6
6
  layout?: boolean;
7
7
  recursive?: boolean;
8
8
  };
9
- export declare type StateProcessor = (node: ComponentNode, options: ProcessOptions) => void;
10
- export declare type ProcessResult = Map<ComponentNode, ProcessOptions>;
11
- export declare type ProcessReportCallback = (report: ProcessResult) => void;
9
+ export type StateProcessor = (node: ComponentNode, options: ProcessOptions) => void;
10
+ export type ProcessResult = Map<ComponentNode, ProcessOptions>;
11
+ export type ProcessReportCallback = (report: ProcessResult) => void;
12
12
  export declare const createStateProcessor: (platform: ComponentPlatform, callback: ProcessReportCallback) => StateProcessor;
@@ -1,6 +1,6 @@
1
1
  import { Logger } from '@telia-ace/widget-utilities';
2
2
  import { Container, EventManager, EventSubscriptionCancellation } from '@webprovisions/platform';
3
- export declare type ReactComponent = any | null;
3
+ export type ReactComponent = any | null;
4
4
  export default class ComponentResolver {
5
5
  aliases: Map<string, string>;
6
6
  components: Map<string, any>;
@@ -1,5 +1,5 @@
1
1
  import { EventListener, EventManager, EventSubscriptionCancellation } from '@webprovisions/platform';
2
- export declare type SubscribeDelegate = (type: string, listener: EventListener) => void;
2
+ export type SubscribeDelegate = (type: string, listener: EventListener) => void;
3
3
  /**
4
4
  * Creates s subscriber for the specified `EventManager` and provides a single cancellation
5
5
  * function for all registered subscriptions.
package/dist/index.js CHANGED
@@ -750,7 +750,7 @@ class Pt {
750
750
  };
751
751
  }
752
752
  }
753
- const ft = "2c7c15f", I = class extends J {
753
+ const ft = "f5911c0", I = class extends J {
754
754
  constructor(t, e = []) {
755
755
  super(t, e, {
756
756
  transformPluginSettings: (s, i, c) => {
@@ -1,5 +1,5 @@
1
1
  import { ComponentNodeLayout } from '../component-platform';
2
- export declare type ComponentSettings = {
2
+ export type ComponentSettings = {
3
3
  type: string;
4
4
  context?: Context;
5
5
  properties?: Properties;
@@ -13,24 +13,24 @@ declare enum HistoryMode {
13
13
  browser = "browser",
14
14
  memory = "memory"
15
15
  }
16
- export declare type RoutingSettings = {
16
+ export type RoutingSettings = {
17
17
  initialPath: string;
18
18
  mode: HistoryMode;
19
19
  basePath?: string;
20
20
  };
21
- export declare type ComponentReference = string | [string, ...ComponentReferenceOverride[]];
22
- export declare type Properties = {
21
+ export type ComponentReference = string | [string, ...ComponentReferenceOverride[]];
22
+ export type Properties = {
23
23
  [key: string]: any;
24
24
  };
25
- export declare type Context = {
25
+ export type Context = {
26
26
  [key: string]: any;
27
27
  };
28
- export declare type ViewDefinition = {
28
+ export type ViewDefinition = {
29
29
  path: string | string[];
30
30
  entry: ComponentReference;
31
31
  };
32
- export declare type Breakpoints = 'all' | string[];
33
- export declare type ComponentReferenceOverride = {
32
+ export type Breakpoints = 'all' | string[];
33
+ export type ComponentReferenceOverride = {
34
34
  breakpoints?: Breakpoints;
35
35
  size?: number | 'full' | 'none';
36
36
  indent?: number;
@@ -38,10 +38,10 @@ export declare type ComponentReferenceOverride = {
38
38
  context?: Context;
39
39
  properties?: Properties;
40
40
  };
41
- export declare type ComponentDefinitionMap = {
41
+ export type ComponentDefinitionMap = {
42
42
  [name: string]: ComponentSettings;
43
43
  };
44
- export declare type WidgetSettings = {
44
+ export type WidgetSettings = {
45
45
  data: {
46
46
  projection: string;
47
47
  site?: 'current' | 'referrer';
@@ -70,11 +70,11 @@ export declare type WidgetSettings = {
70
70
  [key: string]: any;
71
71
  };
72
72
  };
73
- export declare type MinMax = {
73
+ export type MinMax = {
74
74
  min: string;
75
75
  max: string;
76
76
  };
77
- declare type Symbol = {
77
+ type Symbol = {
78
78
  type: 'Uri' | 'Svg' | 'FontAwesome' | 'Text' | string;
79
79
  content: string;
80
80
  };
@@ -1,4 +1,4 @@
1
- export declare type Theme = {
1
+ export type Theme = {
2
2
  gap: string;
3
3
  accessibility: {
4
4
  border: string;
package/dist/version.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- declare const _default: "2c7c15f";
1
+ declare const _default: "f5911c0";
2
2
  export default _default;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@telia-ace/widget-core",
3
- "version": "1.0.19",
3
+ "version": "1.0.20-next.3",
4
4
  "description": "Core framework for ACE widgets.",
5
5
  "license": "SEE LICENSE IN LICENSE.txt",
6
6
  "author": "Telia Company AB",
@@ -21,12 +21,12 @@
21
21
  },
22
22
  "sideEffects": false,
23
23
  "dependencies": {
24
- "@telia-ace/widget-utilities": "^1.0.8",
24
+ "@telia-ace/widget-utilities": "1.0.9-next.3",
25
25
  "@webprovisions/bootstrapping": "^1.0.12",
26
26
  "@webprovisions/platform": "^1.1.2"
27
27
  },
28
28
  "devDependencies": {
29
- "@telia-ace/widget-developer-tools": "^1.0.14"
29
+ "@telia-ace/widget-developer-tools": "1.0.15-next.3"
30
30
  },
31
31
  "scripts": {
32
32
  "clean": "rimraf ./dist",