@telia-ace/knowledge-widget-core 1.0.32 → 1.0.33

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.
package/LICENSE.txt CHANGED
@@ -1,6 +1,6 @@
1
- Copyright © 2021, Telia Company AB. All rights reserved.
2
-
3
- THIS PACKAGE AND CONTAINING SOFTWARE IS PART OF
4
- THE HUMANY SERVICE. BY USING THIS SOFTWARE YOU
5
- AGREE TO THE FOLLOWING TERMS AND CONDITIONS:
1
+ Copyright © 2021, Telia Company AB. All rights reserved.
2
+
3
+ THIS PACKAGE AND CONTAINING SOFTWARE IS PART OF
4
+ THE HUMANY SERVICE. BY USING THIS SOFTWARE YOU
5
+ AGREE TO THE FOLLOWING TERMS AND CONDITIONS:
6
6
  http://www.humany.com/legal
package/README.md CHANGED
@@ -1,3 +1,3 @@
1
- # `@telia-ace/knowledge-widget-core`
2
-
3
- Core framework for ACE knowledge widgets.
1
+ # `@telia-ace/knowledge-widget-core`
2
+
3
+ Core framework for ACE knowledge widgets.
@@ -1,87 +1,87 @@
1
- export type Symbol = {
2
- type: 'Uri' | 'Svg' | 'FontAwesome' | 'Text' | string;
3
- content: string;
4
- };
5
- export type Guide = {
6
- id: string;
7
- title: string;
8
- tags: Tag[];
9
- published?: string;
10
- modified?: string;
11
- publishedBy?: string;
12
- modifiedBy?: string;
13
- };
14
- export type Category = {
15
- id: string;
16
- title: string;
17
- symbol?: Symbol;
18
- activeSymbol?: Symbol;
19
- description?: string;
20
- items?: Category[];
21
- matches?: number;
22
- };
23
- export type Tag = {
24
- id: string;
25
- title: string;
26
- symbol?: Symbol;
27
- matches?: number;
28
- defaultIcon?: Symbol;
29
- activeIcon?: Symbol;
30
- };
31
- export declare enum DialogItemType {
32
- guide = "guide",
33
- link = "link",
34
- default = "default"
35
- }
36
- export type DialogItem = {
37
- id: string;
38
- title: string;
39
- parent: Guide;
40
- type: DialogItemType;
41
- connection?: string;
42
- href?: string;
43
- target?: string;
44
- };
45
- export type GuideCategoryBrowserList = {
46
- id: string;
47
- title: string;
48
- symbol?: Symbol;
49
- guides: Guide[];
50
- paging: boolean;
51
- pager?: string;
52
- };
53
- export type Notification = {
54
- id: string;
55
- title: string;
56
- body: string;
57
- modified?: string;
58
- expandable?: boolean;
59
- };
60
- export type NotificationList = {
61
- id: string;
62
- title?: string;
63
- symbol?: Symbol;
64
- notifications: Notification[];
65
- defaultHeaderOptions?: {
66
- visible: boolean;
67
- };
68
- };
69
- export type Tab = {
70
- title: string;
71
- name: string;
72
- aliases: string[];
73
- };
74
- export type WidgetEntry = {
75
- id: string;
76
- type: string;
77
- content: {
78
- open: boolean;
79
- };
80
- origin: string;
81
- };
82
- export declare enum PickerTypes {
83
- MODAL = "modal",
84
- DRAWER = "drawer",
85
- DROPDOWN = "dropdown",
86
- NONE = "none"
87
- }
1
+ export type Symbol = {
2
+ type: 'Uri' | 'Svg' | 'FontAwesome' | 'Text' | string;
3
+ content: string;
4
+ };
5
+ export type Guide = {
6
+ id: string;
7
+ title: string;
8
+ tags: Tag[];
9
+ published?: string;
10
+ modified?: string;
11
+ publishedBy?: string;
12
+ modifiedBy?: string;
13
+ };
14
+ export type Category = {
15
+ id: string;
16
+ title: string;
17
+ symbol?: Symbol;
18
+ activeSymbol?: Symbol;
19
+ description?: string;
20
+ items?: Category[];
21
+ matches?: number;
22
+ };
23
+ export type Tag = {
24
+ id: string;
25
+ title: string;
26
+ symbol?: Symbol;
27
+ matches?: number;
28
+ defaultIcon?: Symbol;
29
+ activeIcon?: Symbol;
30
+ };
31
+ export declare enum DialogItemType {
32
+ guide = "guide",
33
+ link = "link",
34
+ default = "default"
35
+ }
36
+ export type DialogItem = {
37
+ id: string;
38
+ title: string;
39
+ parent: Guide;
40
+ type: DialogItemType;
41
+ connection?: string;
42
+ href?: string;
43
+ target?: string;
44
+ };
45
+ export type GuideCategoryBrowserList = {
46
+ id: string;
47
+ title: string;
48
+ symbol?: Symbol;
49
+ guides: Guide[];
50
+ paging: boolean;
51
+ pager?: string;
52
+ };
53
+ export type Notification = {
54
+ id: string;
55
+ title: string;
56
+ body: string;
57
+ modified?: string;
58
+ expandable?: boolean;
59
+ };
60
+ export type NotificationList = {
61
+ id: string;
62
+ title?: string;
63
+ symbol?: Symbol;
64
+ notifications: Notification[];
65
+ defaultHeaderOptions?: {
66
+ visible: boolean;
67
+ };
68
+ };
69
+ export type Tab = {
70
+ title: string;
71
+ name: string;
72
+ aliases: string[];
73
+ };
74
+ export type WidgetEntry = {
75
+ id: string;
76
+ type: string;
77
+ content: {
78
+ open: boolean;
79
+ };
80
+ origin: string;
81
+ };
82
+ export declare enum PickerTypes {
83
+ MODAL = "modal",
84
+ DRAWER = "drawer",
85
+ DROPDOWN = "dropdown",
86
+ NONE = "none"
87
+ }
package/dist/index.d.ts CHANGED
@@ -1,8 +1,8 @@
1
- export * from '@telia-ace/widget-core';
2
- export { Environment as Humany } from '@telia-ace/widget-core';
3
- export { supportBootstrapping } from '@webprovisions/bootstrapping';
4
- export type { BootstrappingActivationData } from '@webprovisions/bootstrapping';
5
- export { destroyWidget as destroy, Widget } from '@webprovisions/platform';
6
- export * from './data-types';
7
- export { default as loadImplementation } from './load-implementation';
8
- export { default as verifyAuth } from './verify-auth';
1
+ export * from '@telia-ace/widget-core';
2
+ export { Environment as Humany } from '@telia-ace/widget-core';
3
+ export { supportBootstrapping } from '@webprovisions/bootstrapping';
4
+ export type { BootstrappingActivationData } from '@webprovisions/bootstrapping';
5
+ export { destroyWidget as destroy, Widget } from '@webprovisions/platform';
6
+ export * from './data-types';
7
+ export { default as loadImplementation } from './load-implementation';
8
+ export { default as verifyAuth } from './verify-auth';
package/dist/index.js CHANGED
@@ -1,25 +1,25 @@
1
1
  export * from "@telia-ace/widget-core";
2
- import { Environment as l } from "@telia-ace/widget-core";
3
- import { supportBootstrapping as s } from "@webprovisions/bootstrapping";
4
- import { Widget as p, destroyWidget as x } from "@webprovisions/platform";
2
+ import { Environment as h } from "@telia-ace/widget-core";
3
+ import { supportBootstrapping as p } from "@webprovisions/bootstrapping";
4
+ import { Widget as x, destroyWidget as A } from "@webprovisions/platform";
5
5
  var r = /* @__PURE__ */ ((t) => (t.guide = "guide", t.link = "link", t.default = "default", t))(r || {}), a = /* @__PURE__ */ ((t) => (t.MODAL = "modal", t.DRAWER = "drawer", t.DROPDOWN = "dropdown", t.NONE = "none", t))(a || {});
6
6
  const d = (t, e) => fetch(e + "/config.json").then((n) => n.json()).then((n) => n.implementation).then(
7
7
  (n) => t.createImplementation(n)
8
- ), u = (t, e) => {
8
+ ), u = d, i = (t, e) => {
9
9
  const n = `${t}${e}/interfaceauthorized`;
10
10
  return fetch(n, {
11
11
  method: "GET",
12
12
  credentials: "include"
13
13
  }).then((o) => o.status === 200 && o.ok);
14
- };
14
+ }, m = i;
15
15
  export {
16
16
  r as DialogItemType,
17
- l as Humany,
17
+ h as Humany,
18
18
  a as PickerTypes,
19
- p as Widget,
20
- x as destroy,
21
- d as loadImplementation,
22
- s as supportBootstrapping,
23
- u as verifyAuth
19
+ x as Widget,
20
+ A as destroy,
21
+ u as loadImplementation,
22
+ p as supportBootstrapping,
23
+ m as verifyAuth
24
24
  };
25
25
  //# sourceMappingURL=index.js.map
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["../src/data-types.ts","../src/load-implementation.ts","../src/verify-auth.ts"],"sourcesContent":["export type Symbol = {\r\n type: 'Uri' | 'Svg' | 'FontAwesome' | 'Text' | string;\r\n content: string;\r\n};\r\n\r\nexport type Guide = {\r\n id: string;\r\n title: string;\r\n tags: Tag[];\r\n published?: string;\r\n modified?: string;\r\n publishedBy?: string;\r\n modifiedBy?: string;\r\n};\r\n\r\nexport type Category = {\r\n id: string;\r\n title: string;\r\n symbol?: Symbol;\r\n activeSymbol?: Symbol;\r\n description?: string;\r\n items?: Category[];\r\n matches?: number;\r\n};\r\n\r\nexport type Tag = {\r\n id: string;\r\n title: string;\r\n symbol?: Symbol;\r\n matches?: number;\r\n defaultIcon?: Symbol;\r\n activeIcon?: Symbol;\r\n};\r\n\r\nexport enum DialogItemType {\r\n guide = 'guide',\r\n link = 'link',\r\n default = 'default',\r\n}\r\n\r\nexport type DialogItem = {\r\n id: string;\r\n title: string;\r\n parent: Guide;\r\n type: DialogItemType;\r\n connection?: string;\r\n href?: string;\r\n target?: string;\r\n};\r\n\r\nexport type GuideCategoryBrowserList = {\r\n id: string;\r\n title: string;\r\n symbol?: Symbol;\r\n guides: Guide[];\r\n paging: boolean;\r\n pager?: string;\r\n};\r\n\r\nexport type Notification = {\r\n id: string;\r\n title: string;\r\n body: string;\r\n modified?: string;\r\n expandable?: boolean;\r\n};\r\n\r\nexport type NotificationList = {\r\n id: string;\r\n title?: string;\r\n symbol?: Symbol;\r\n notifications: Notification[];\r\n defaultHeaderOptions?: {\r\n visible: boolean;\r\n };\r\n};\r\n\r\nexport type Tab = {\r\n title: string;\r\n name: string;\r\n aliases: string[];\r\n};\r\n\r\nexport type WidgetEntry = {\r\n id: string;\r\n type: string;\r\n content: {\r\n open: boolean;\r\n };\r\n origin: string;\r\n};\r\n\r\nexport enum PickerTypes {\r\n MODAL = 'modal',\r\n DRAWER = 'drawer',\r\n DROPDOWN = 'dropdown',\r\n NONE = 'none',\r\n}\r\n","import { Environment, Implementation } from '@telia-ace/widget-core';\r\nimport { BootstrappedImplementationConfiguration } from '@webprovisions/bootstrapping';\r\n\r\n/**\r\n * Loads a Humany implementation by fetching the configuration from the specified URL.\r\n * @param implementationPath Implementation URL.\r\n */\r\nconst loadImplementation = (humany: Environment, url: string): Promise<Implementation> => {\r\n return fetch(url + '/config.json')\r\n .then((response) => response.json())\r\n .then((json) => json.implementation)\r\n .then((configuration: BootstrappedImplementationConfiguration) =>\r\n humany.createImplementation(configuration)\r\n );\r\n};\r\nexport default loadImplementation;\r\n","const verifyAuth = (host: string, widgetName: string): Promise<boolean> => {\r\n const url = `${host}${widgetName}/interfaceauthorized`;\r\n\r\n return fetch(url, {\r\n method: 'GET',\r\n credentials: 'include',\r\n }).then((response) => response.status === 200 && response.ok);\r\n};\r\n\r\nexport default verifyAuth;\r\n"],"names":["DialogItemType","PickerTypes","loadImplementation","humany","url","response","json","configuration","verifyAuth","host","widgetName"],"mappings":";;;;AAkCY,IAAAA,sBAAAA,OACRA,EAAA,QAAQ,SACRA,EAAA,OAAO,QACPA,EAAA,UAAU,WAHFA,IAAAA,KAAA,CAAA,CAAA,GA0DAC,sBAAAA,OACRA,EAAA,QAAQ,SACRA,EAAA,SAAS,UACTA,EAAA,WAAW,YACXA,EAAA,OAAO,QAJCA,IAAAA,KAAA,CAAA,CAAA;ACrFN,MAAAC,IAAqB,CAACC,GAAqBC,MACtC,MAAMA,IAAM,cAAc,EAC5B,KAAK,CAACC,MAAaA,EAAS,KAAM,CAAA,EAClC,KAAK,CAACC,MAASA,EAAK,cAAc,EAClC;AAAA,EAAK,CAACC,MACHJ,EAAO,qBAAqBI,CAAa;AAAA,GCZ/CC,IAAa,CAACC,GAAcC,MAAyC;AACjE,QAAAN,IAAM,GAAGK,IAAOC;AAEtB,SAAO,MAAMN,GAAK;AAAA,IACd,QAAQ;AAAA,IACR,aAAa;AAAA,EAAA,CAChB,EAAE,KAAK,CAACC,MAAaA,EAAS,WAAW,OAAOA,EAAS,EAAE;AAChE;"}
1
+ {"version":3,"file":"index.js","sources":["../src/data-types.ts","../src/load-implementation.ts","../src/verify-auth.ts"],"sourcesContent":["export type Symbol = {\n type: 'Uri' | 'Svg' | 'FontAwesome' | 'Text' | string;\n content: string;\n};\n\nexport type Guide = {\n id: string;\n title: string;\n tags: Tag[];\n published?: string;\n modified?: string;\n publishedBy?: string;\n modifiedBy?: string;\n};\n\nexport type Category = {\n id: string;\n title: string;\n symbol?: Symbol;\n activeSymbol?: Symbol;\n description?: string;\n items?: Category[];\n matches?: number;\n};\n\nexport type Tag = {\n id: string;\n title: string;\n symbol?: Symbol;\n matches?: number;\n defaultIcon?: Symbol;\n activeIcon?: Symbol;\n};\n\nexport enum DialogItemType {\n guide = 'guide',\n link = 'link',\n default = 'default',\n}\n\nexport type DialogItem = {\n id: string;\n title: string;\n parent: Guide;\n type: DialogItemType;\n connection?: string;\n href?: string;\n target?: string;\n};\n\nexport type GuideCategoryBrowserList = {\n id: string;\n title: string;\n symbol?: Symbol;\n guides: Guide[];\n paging: boolean;\n pager?: string;\n};\n\nexport type Notification = {\n id: string;\n title: string;\n body: string;\n modified?: string;\n expandable?: boolean;\n};\n\nexport type NotificationList = {\n id: string;\n title?: string;\n symbol?: Symbol;\n notifications: Notification[];\n defaultHeaderOptions?: {\n visible: boolean;\n };\n};\n\nexport type Tab = {\n title: string;\n name: string;\n aliases: string[];\n};\n\nexport type WidgetEntry = {\n id: string;\n type: string;\n content: {\n open: boolean;\n };\n origin: string;\n};\n\nexport enum PickerTypes {\n MODAL = 'modal',\n DRAWER = 'drawer',\n DROPDOWN = 'dropdown',\n NONE = 'none',\n}\n","import { Environment, Implementation } from '@telia-ace/widget-core';\nimport { BootstrappedImplementationConfiguration } from '@webprovisions/bootstrapping';\n\n/**\n * Loads a Humany implementation by fetching the configuration from the specified URL.\n * @param implementationPath Implementation URL.\n */\nconst loadImplementation = (humany: Environment, url: string): Promise<Implementation> => {\n return fetch(url + '/config.json')\n .then((response) => response.json())\n .then((json) => json.implementation)\n .then((configuration: BootstrappedImplementationConfiguration) =>\n humany.createImplementation(configuration)\n );\n};\nexport default loadImplementation;\n","const verifyAuth = (host: string, widgetName: string): Promise<boolean> => {\n const url = `${host}${widgetName}/interfaceauthorized`;\n\n return fetch(url, {\n method: 'GET',\n credentials: 'include',\n }).then((response) => response.status === 200 && response.ok);\n};\n\nexport default verifyAuth;\n"],"names":["DialogItemType","PickerTypes","loadImplementation","humany","url","response","json","configuration","loadImplementation$1","verifyAuth","host","widgetName","verifyAuth$1"],"mappings":";;;;AAkCY,IAAAA,sBAAAA,OACRA,EAAA,QAAQ,SACRA,EAAA,OAAO,QACPA,EAAA,UAAU,WAHFA,IAAAA,KAAA,CAAA,CAAA,GA0DAC,sBAAAA,OACRA,EAAA,QAAQ,SACRA,EAAA,SAAS,UACTA,EAAA,WAAW,YACXA,EAAA,OAAO,QAJCA,IAAAA,KAAA,CAAA,CAAA;ACrFZ,MAAMC,IAAqB,CAACC,GAAqBC,MACtC,MAAMA,IAAM,cAAc,EAC5B,KAAK,CAACC,MAAaA,EAAS,KAAM,CAAA,EAClC,KAAK,CAACC,MAASA,EAAK,cAAc,EAClC;AAAA,EAAK,CAACC,MACHJ,EAAO,qBAAqBI,CAAa;AAAA,GAGrDC,IAAeN,GCfTO,IAAa,CAACC,GAAcC,MAAyC;AACjE,QAAAP,IAAM,GAAGM,IAAOC;AAEtB,SAAO,MAAMP,GAAK;AAAA,IACd,QAAQ;AAAA,IACR,aAAa;AAAA,EAAA,CAChB,EAAE,KAAK,CAACC,MAAaA,EAAS,WAAW,OAAOA,EAAS,EAAE;AAChE,GAEAO,IAAeH;"}
@@ -1,7 +1,7 @@
1
- import { Environment, Implementation } from '@telia-ace/widget-core';
2
- /**
3
- * Loads a Humany implementation by fetching the configuration from the specified URL.
4
- * @param implementationPath Implementation URL.
5
- */
6
- declare const loadImplementation: (humany: Environment, url: string) => Promise<Implementation>;
7
- export default loadImplementation;
1
+ import { Environment, Implementation } from '@telia-ace/widget-core';
2
+ /**
3
+ * Loads a Humany implementation by fetching the configuration from the specified URL.
4
+ * @param implementationPath Implementation URL.
5
+ */
6
+ declare const loadImplementation: (humany: Environment, url: string) => Promise<Implementation>;
7
+ export default loadImplementation;
@@ -1,2 +1,2 @@
1
- declare const verifyAuth: (host: string, widgetName: string) => Promise<boolean>;
2
- export default verifyAuth;
1
+ declare const verifyAuth: (host: string, widgetName: string) => Promise<boolean>;
2
+ export default verifyAuth;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@telia-ace/knowledge-widget-core",
3
- "version": "1.0.32",
3
+ "version": "1.0.33",
4
4
  "description": "Core framework for ACE Knowledge widgets.",
5
5
  "license": "SEE LICENSE IN LICENSE.txt",
6
6
  "author": "Telia Company AB",