@telia-ace/knowledge-widget-components-guide 1.0.47 → 1.0.48-next.0
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/dist/index.js +41 -39
- package/dist/index.js.map +1 -1
- package/package.json +6 -6
package/dist/index.js
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
var $ = Object.defineProperty, x = Object.defineProperties;
|
|
2
2
|
var C = Object.getOwnPropertyDescriptors;
|
|
3
3
|
var b = Object.getOwnPropertySymbols;
|
|
4
|
-
var
|
|
4
|
+
var M = Object.prototype.hasOwnProperty, G = Object.prototype.propertyIsEnumerable;
|
|
5
5
|
var v = (t, e, i) => e in t ? $(t, e, { enumerable: !0, configurable: !0, writable: !0, value: i }) : t[e] = i, u = (t, e) => {
|
|
6
6
|
for (var i in e || (e = {}))
|
|
7
|
-
|
|
7
|
+
M.call(e, i) && v(t, i, e[i]);
|
|
8
8
|
if (b)
|
|
9
9
|
for (var i of b(e))
|
|
10
|
-
|
|
10
|
+
G.call(e, i) && v(t, i, e[i]);
|
|
11
11
|
return t;
|
|
12
12
|
}, h = (t, e) => x(t, C(e));
|
|
13
13
|
import { FeedbackType as m, DataClient as k, DataType as y } from "@telia-ace/knowledge-data-client";
|
|
@@ -17,19 +17,19 @@ import { createReactComponent as D } from "@telia-ace/knowledge-widget-ui";
|
|
|
17
17
|
import * as w from "clipboard-polyfill";
|
|
18
18
|
const E = (t, e) => {
|
|
19
19
|
e.actions.create("feedback", (i) => {
|
|
20
|
-
const d = i === "negative" ? m.Negative : m.Positive, { guide:
|
|
21
|
-
if (
|
|
22
|
-
const { connection:
|
|
20
|
+
const d = i === "negative" ? m.Negative : m.Positive, { guide: r, submitButtonLabel: s = "Submit" } = e.properties();
|
|
21
|
+
if (r) {
|
|
22
|
+
const { connection: a, id: n, hasHandover: c } = r;
|
|
23
23
|
e.writeProperties({
|
|
24
24
|
feedbackGiven: i,
|
|
25
25
|
loading: c && d === m.Negative
|
|
26
26
|
});
|
|
27
27
|
const { events: o } = t.get("$widget");
|
|
28
28
|
return o.dispatch("tracking:feedback-given", {
|
|
29
|
-
guide:
|
|
30
|
-
categories:
|
|
29
|
+
guide: r,
|
|
30
|
+
categories: r.categories,
|
|
31
31
|
feedbackType: d.toLowerCase()
|
|
32
|
-
}), k.getInstance(t).then((g) => g.feedback(n,
|
|
32
|
+
}), k.getInstance(t).then((g) => g.feedback(n, a, d).then(() => {
|
|
33
33
|
if (c && d === m.Negative)
|
|
34
34
|
return g.fetch(y.ContactMethods, { guideId: n }).then(({ contactMethods: p }) => e.actions.dispatch("handover", {
|
|
35
35
|
handoverContactMethods: p.map((f) => h(u({}, f), {
|
|
@@ -48,46 +48,48 @@ const E = (t, e) => {
|
|
|
48
48
|
${e.trim()}`);
|
|
49
49
|
const d = document.createElement("div");
|
|
50
50
|
d.innerHTML = i;
|
|
51
|
-
const
|
|
51
|
+
const r = Array.from(d.getElementsByTagName("a"));
|
|
52
52
|
let s = d.innerText;
|
|
53
|
-
return
|
|
54
|
-
s = s.replace(
|
|
53
|
+
return r.forEach((a) => {
|
|
54
|
+
s = s.replace(a.innerText, `[${a.href}] (${a.innerText})`);
|
|
55
55
|
}), s;
|
|
56
56
|
}, L = ({ title: t, body: e }) => {
|
|
57
57
|
let i = "";
|
|
58
58
|
return t && t.length && (i = `<h2>${t.trim()}</h2>`), e && e.length && (i = `${i.trim()}${e.trim()}`), i.trim();
|
|
59
59
|
}, N = (t) => {
|
|
60
60
|
const { events: e } = t.get("$widget"), [i, d] = H(e);
|
|
61
|
-
return D(t, "guide", import("./guide.8c4b352b.js"), (
|
|
62
|
-
const s = (
|
|
63
|
-
|
|
61
|
+
return D(t, "guide", import("./guide.8c4b352b.js"), (r) => {
|
|
62
|
+
const s = (a) => {
|
|
63
|
+
r.writeProperties({
|
|
64
64
|
loading: !0,
|
|
65
65
|
error: void 0,
|
|
66
66
|
guide: void 0,
|
|
67
|
+
dialog: void 0,
|
|
68
|
+
contactMethods: void 0,
|
|
67
69
|
feedbackGiven: void 0
|
|
68
|
-
}),
|
|
70
|
+
}), r.actions.dispatch("fetch", { params: a });
|
|
69
71
|
};
|
|
70
|
-
|
|
72
|
+
r.actions.create("copy", (a) => {
|
|
71
73
|
const n = new w.ClipboardItem({
|
|
72
|
-
"text/html": new Blob([L(
|
|
73
|
-
"text/plain": new Blob([I(
|
|
74
|
+
"text/html": new Blob([L(a)], { type: "text/html" }),
|
|
75
|
+
"text/plain": new Blob([I(a)], { type: "text/plain" })
|
|
74
76
|
});
|
|
75
77
|
return w.write([n]).then(() => {
|
|
76
78
|
e.dispatch("widget:menu-toggled", null);
|
|
77
79
|
});
|
|
78
|
-
}),
|
|
79
|
-
const
|
|
80
|
-
e.dispatch("widget:menu-toggled", null),
|
|
81
|
-
}),
|
|
80
|
+
}), r.actions.create("print", () => {
|
|
81
|
+
const a = document.querySelector(".humany-guide .humany-paragraph"), n = window.open("", "", "height=500, width=500");
|
|
82
|
+
e.dispatch("widget:menu-toggled", null), a && n && (n.document.write(`<html><body>${a.innerHTML}</body></html>`), n.document.close(), n.print());
|
|
83
|
+
}), r.actions.create("back", (a, n) => {
|
|
82
84
|
if (!n.preventDefault)
|
|
83
85
|
return t.getAsync("router").then((c) => {
|
|
84
86
|
c.goBack();
|
|
85
87
|
});
|
|
86
|
-
}),
|
|
88
|
+
}), r.actions.create(
|
|
87
89
|
"fetch",
|
|
88
|
-
({ contactMethods:
|
|
90
|
+
({ contactMethods: a = [], dialog: n = [], guide: c, error: o }) => {
|
|
89
91
|
if (o)
|
|
90
|
-
return
|
|
92
|
+
return r.actions.dispatch("fetched", {
|
|
91
93
|
error: o,
|
|
92
94
|
guide: void 0,
|
|
93
95
|
contactMethods: [],
|
|
@@ -96,40 +98,40 @@ ${e.trim()}`);
|
|
|
96
98
|
showFeedback: !1,
|
|
97
99
|
loading: !0
|
|
98
100
|
});
|
|
99
|
-
const { showFeedback: g = !0, submitButtonLabel: p = "Submit" } =
|
|
101
|
+
const { showFeedback: g = !0, submitButtonLabel: p = "Submit" } = r.properties(), f = {
|
|
100
102
|
showFeedback: g,
|
|
101
103
|
dialog: n,
|
|
102
104
|
guide: c,
|
|
103
105
|
feedbackGiven: void 0,
|
|
104
106
|
handoverContactMethods: [],
|
|
105
|
-
contactMethods:
|
|
107
|
+
contactMethods: a.map((l) => h(u({}, l), {
|
|
106
108
|
body: T(l, { submit: p })
|
|
107
109
|
}))
|
|
108
110
|
};
|
|
109
|
-
return
|
|
111
|
+
return r.actions.dispatch("fetched", h(u({}, f), {
|
|
110
112
|
loading: !0
|
|
111
113
|
}));
|
|
112
114
|
}
|
|
113
|
-
),
|
|
115
|
+
), r.actions.create("fetched", (a) => r.writeProperties(h(u({}, a), {
|
|
114
116
|
feedbackGiven: void 0,
|
|
115
117
|
loading: !1
|
|
116
|
-
}))), t.getAsync("router").then((
|
|
117
|
-
const { params: n } =
|
|
118
|
+
}))), t.getAsync("router").then((a) => {
|
|
119
|
+
const { params: n } = a.getRouteData();
|
|
118
120
|
s(n);
|
|
119
|
-
}), i("router:changed", (
|
|
121
|
+
}), i("router:changed", (a, { current: n }) => {
|
|
120
122
|
s(n.routeData.params);
|
|
121
|
-
}), E(t,
|
|
122
|
-
}).then(() => P(t, "guide", (
|
|
123
|
-
|
|
123
|
+
}), E(t, r), B(t, r), F(r);
|
|
124
|
+
}).then(() => P(t, "guide", (r) => {
|
|
125
|
+
r.actions.watch("guide.fetch", (s, a) => {
|
|
124
126
|
const {
|
|
125
127
|
params: { guide: n, connection: c }
|
|
126
128
|
} = s;
|
|
127
129
|
return n ? k.getInstance(t).then(
|
|
128
130
|
(o) => o.fetch(y.Guide, { connection: c, guideId: n })
|
|
129
|
-
).then(
|
|
131
|
+
).then(a).catch((o) => {
|
|
130
132
|
if (o)
|
|
131
|
-
return
|
|
132
|
-
}) :
|
|
133
|
+
return a(o);
|
|
134
|
+
}) : a(s);
|
|
133
135
|
});
|
|
134
136
|
})).then(() => {
|
|
135
137
|
d();
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../src/use-feedback.ts","../src/guide-component.ts"],"sourcesContent":["import {\n ContactsResult,\n DataClient,\n DataType,\n FeedbackType,\n} from '@telia-ace/knowledge-data-client';\nimport { updateForm } from '@telia-ace/knowledge-widget-component-utilities';\nimport { ComponentNodeController } from '@telia-ace/knowledge-widget-core';\nimport { Container } from '@webprovisions/platform';\nimport { GuideComponentProps } from './guide-component';\n\nexport default (container: Container, controller: ComponentNodeController) => {\n controller.actions.create('feedback', (input: 'negative' | 'positive') => {\n const type = input === 'negative' ? FeedbackType.Negative : FeedbackType.Positive;\n const { guide, submitButtonLabel = 'Submit' } =\n controller.properties<GuideComponentProps>();\n if (guide) {\n const { connection, id, hasHandover } = guide;\n controller.writeProperties({\n feedbackGiven: input,\n loading: hasHandover && type === FeedbackType.Negative,\n });\n\n const { events } = container.get('$widget');\n events.dispatch('tracking:feedback-given', {\n guide,\n categories: guide.categories,\n feedbackType: type.toLowerCase(),\n });\n\n return DataClient.getInstance(container).then((dataClient) => {\n return dataClient.feedback(id, connection, type).then(() => {\n if (hasHandover && type === FeedbackType.Negative) {\n return dataClient\n .fetch(DataType.ContactMethods, { guideId: id })\n .then(({ contactMethods }: ContactsResult) => {\n return controller.actions.dispatch('handover', {\n handoverContactMethods: contactMethods.map((cm) => ({\n ...cm,\n body: updateForm(cm, {\n submit: submitButtonLabel,\n }),\n })),\n loading: false,\n });\n });\n }\n });\n });\n }\n });\n\n controller.actions.create('handover', (input) => {\n return controller.writeProperties({ ...input, loading: false });\n });\n};\n","import { DataClient, DataError, DataType, GuideResult } from '@telia-ace/knowledge-data-client';\nimport { ContactMethodType } from '@telia-ace/knowledge-widget-adapters';\nimport {\n FavoriteProperties,\n LanguageProperties,\n MetaDataProperties,\n updateForm,\n useExpand,\n useForm,\n} from '@telia-ace/knowledge-widget-component-utilities';\nimport {\n DialogItem,\n PickerTypes,\n createEventSubscriber,\n extendComponent,\n} from '@telia-ace/knowledge-widget-core';\nimport { createReactComponent } from '@telia-ace/knowledge-widget-ui';\nimport { FormComponentInstanceProperties } from '@telia-ace/widget-forms';\nimport { RoutingService } from '@telia-ace/widget-routing';\nimport { Container, EventManager } from '@webprovisions/platform';\nimport * as clipboard from 'clipboard-polyfill';\nimport useFeedback from './use-feedback';\n\nexport type GuideProps = {\n id: string;\n title: string;\n body: string;\n connection: string;\n categories: number[];\n hasHandover: boolean;\n allowFeedback: boolean;\n perspectives: { [key: string]: string };\n translations?: { [key: string]: string };\n modified?: string;\n published?: string;\n publishedBy?: string | null;\n modifiedBy?: string | null;\n perspective: string | null;\n};\n\nexport type AvailablePerspectives = {\n name: string;\n title: string;\n};\n\nexport type GuideComponentProps = {\n showHeader?: boolean;\n showFeedback?: boolean;\n feedbackDirection?: 'horizontal' | 'vertical';\n feedbackGiven?: 'positive' | 'negative'; // internal\n contactMethods?: ContactMethodType[]; // internal\n handoverContactMethods?: ContactMethodType[]; // internal\n showAnswerVersions?: boolean;\n feedbackHeader?: string;\n contactHeader?: string;\n toolbarFunctionsHeader?: string;\n toolbarLanguageHeader?: string;\n positiveFeedbackLabel?: string;\n negativeFeedbackLabel?: string;\n contactFeedbackLabel?: string;\n feedbackRecognitionLabel?: string;\n defaultAnswerVersionLabel?: string;\n backButtonLabel?: string;\n toolbarFunctionsTooltip?: string;\n toolbarFunctionsCloseButtonAriaLabel?: string;\n copyActionLabel?: string;\n printActionLabel?: string;\n toolbarLanguageTooltip?: string;\n toolbar?: ToolbarProps;\n guide?: GuideProps; // internal\n dialog?: DialogItem[]; // internal\n error?: DataError; // internal\n availablePerspectives?: AvailablePerspectives[]; // internal\n} & FormComponentInstanceProperties &\n FavoriteProperties &\n MetaDataProperties &\n LanguageProperties;\n\nexport type ToolbarProps = {\n language?: boolean;\n guideCategories?: boolean;\n allowCopy?: boolean;\n allowPrint?: boolean;\n showFavoriteToggle?: boolean;\n picker?: PickerTypes;\n};\n\nconst buildPlainText = ({ title, body }: GuideProps): string => {\n let processedHtml = '';\n\n if (title && title.length) {\n processedHtml = title.trim();\n }\n\n if (body && body.length) {\n processedHtml = `${processedHtml.trim()}\\n${body.trim()}`;\n }\n\n const div = document.createElement('div');\n div.innerHTML = processedHtml;\n const links: HTMLAnchorElement[] = Array.from(div.getElementsByTagName('a'));\n\n let plainText = div.innerText;\n\n links.forEach((a) => {\n plainText = plainText.replace(a.innerText, `[${a.href}] (${a.innerText})`);\n });\n\n return plainText;\n};\n\nconst buildHtml = ({ title, body }: GuideProps): string => {\n let processedHtml = '';\n\n if (title && title.length) {\n processedHtml = `<h2>${title.trim()}</h2>`;\n }\n\n if (body && body.length) {\n processedHtml = `${processedHtml.trim()}${body.trim()}`;\n }\n\n return processedHtml.trim();\n};\n\nexport const GuideComponent = (container: Container) => {\n const { events }: { events: EventManager } = container.get('$widget');\n const [subscribe, unsubscribe] = createEventSubscriber(events);\n\n return createReactComponent(container, 'guide', import('./guide'), (component) => {\n const fetch = (params: { [key: string]: any }) => {\n component.writeProperties({\n loading: true,\n error: undefined,\n guide: undefined,\n feedbackGiven: undefined,\n });\n component.actions.dispatch('fetch', { params });\n };\n\n component.actions.create('copy', (guide: GuideProps) => {\n const item = new clipboard.ClipboardItem({\n 'text/html': new Blob([buildHtml(guide)], { type: 'text/html' }),\n 'text/plain': new Blob([buildPlainText(guide)], { type: 'text/plain' }),\n });\n\n return clipboard.write([item]).then(() => {\n events.dispatch('widget:menu-toggled', null);\n });\n });\n\n component.actions.create('print', () => {\n const elem = document.querySelector('.humany-guide .humany-paragraph');\n const a = window.open('', '', 'height=500, width=500');\n\n events.dispatch('widget:menu-toggled', null);\n if (elem && a) {\n a.document.write(`<html><body>${elem.innerHTML}</body></html>`);\n a.document.close();\n a.print();\n }\n });\n\n component.actions.create('back', (data, options) => {\n if (options.preventDefault) {\n return;\n }\n\n return container.getAsync('router').then((router: RoutingService) => {\n router.goBack();\n });\n });\n\n component.actions.create(\n 'fetch',\n ({ contactMethods = [], dialog = [], guide, error }: GuideResult) => {\n if (error) {\n return component.actions.dispatch('fetched', {\n error,\n guide: undefined,\n contactMethods: [],\n feedbackGiven: undefined,\n handoverContactMethods: [],\n showFeedback: false,\n loading: true,\n });\n }\n const { showFeedback = true, submitButtonLabel = 'Submit' } =\n component.properties<GuideComponentProps>();\n\n const properties: GuideComponentProps = {\n showFeedback,\n dialog,\n guide,\n feedbackGiven: undefined,\n handoverContactMethods: [],\n contactMethods: contactMethods.map((cm) => ({\n ...cm,\n body: updateForm(cm, { submit: submitButtonLabel }),\n })),\n };\n\n return component.actions.dispatch('fetched', {\n ...properties,\n loading: true,\n });\n }\n );\n\n component.actions.create('fetched', (input) => {\n return component.writeProperties({\n ...input,\n feedbackGiven: undefined,\n loading: false,\n });\n });\n\n container.getAsync('router').then((router) => {\n const { params } = router.getRouteData();\n fetch(params);\n });\n\n subscribe('router:changed', (event: any, { current }: any) => {\n fetch(current.routeData.params);\n });\n\n useFeedback(container, component);\n useForm(container, component);\n useExpand(component);\n })\n .then(() => {\n return extendComponent(container, 'guide', (component) => {\n component.actions.watch('guide.fetch', (input, next) => {\n const {\n params: { guide, connection },\n } = input;\n\n if (guide) {\n return DataClient.getInstance(container)\n .then((dataClient) =>\n dataClient.fetch(DataType.Guide, { connection, guideId: guide })\n )\n .then(next)\n .catch((error) => {\n if (error) {\n return next(error);\n }\n });\n }\n\n return next(input);\n });\n });\n })\n .then(() => {\n unsubscribe();\n });\n};\n\nexport default GuideComponent;\n"],"names":["useFeedback","container","controller","input","type","FeedbackType","guide","submitButtonLabel","connection","id","hasHandover","events","DataClient","dataClient","DataType","contactMethods","cm","__spreadProps","__spreadValues","updateForm","buildPlainText","title","body","processedHtml","div","links","plainText","a","buildHtml","GuideComponent","subscribe","unsubscribe","createEventSubscriber","createReactComponent","component","fetch","params","item","clipboard","elem","data","options","router","dialog","error","showFeedback","properties","event","current","useForm","useExpand","extendComponent","next","GuideComponent$1"],"mappings":";;;;;;;;;;;;;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E,KAAK8C,CAAI,EACT,MAAM,CAACR,MAAU;AACd,YAAIA;AACA,iBAAOQ,EAAKR,CAAK;AAAA,MACrB,CACH,IAGFQ,EAAKjD,CAAK;AAAA,IAAA,CACpB;AAAA,EAAA,CACJ,CACJ,EACA,KAAK,MAAM;AACI,IAAA4B;EAAA,CACf;AACT,GAEAsB,IAAexB;"}
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../src/use-feedback.ts","../src/guide-component.ts"],"sourcesContent":["import {\n ContactsResult,\n DataClient,\n DataType,\n FeedbackType,\n} from '@telia-ace/knowledge-data-client';\nimport { updateForm } from '@telia-ace/knowledge-widget-component-utilities';\nimport { ComponentNodeController } from '@telia-ace/knowledge-widget-core';\nimport { Container } from '@webprovisions/platform';\nimport { GuideComponentProps } from './guide-component';\n\nexport default (container: Container, controller: ComponentNodeController) => {\n controller.actions.create('feedback', (input: 'negative' | 'positive') => {\n const type = input === 'negative' ? FeedbackType.Negative : FeedbackType.Positive;\n const { guide, submitButtonLabel = 'Submit' } =\n controller.properties<GuideComponentProps>();\n if (guide) {\n const { connection, id, hasHandover } = guide;\n controller.writeProperties({\n feedbackGiven: input,\n loading: hasHandover && type === FeedbackType.Negative,\n });\n\n const { events } = container.get('$widget');\n events.dispatch('tracking:feedback-given', {\n guide,\n categories: guide.categories,\n feedbackType: type.toLowerCase(),\n });\n\n return DataClient.getInstance(container).then((dataClient) => {\n return dataClient.feedback(id, connection, type).then(() => {\n if (hasHandover && type === FeedbackType.Negative) {\n return dataClient\n .fetch(DataType.ContactMethods, { guideId: id })\n .then(({ contactMethods }: ContactsResult) => {\n return controller.actions.dispatch('handover', {\n handoverContactMethods: contactMethods.map((cm) => ({\n ...cm,\n body: updateForm(cm, {\n submit: submitButtonLabel,\n }),\n })),\n loading: false,\n });\n });\n }\n });\n });\n }\n });\n\n controller.actions.create('handover', (input) => {\n return controller.writeProperties({ ...input, loading: false });\n });\n};\n","import { DataClient, DataError, DataType, GuideResult } from '@telia-ace/knowledge-data-client';\nimport { ContactMethodType } from '@telia-ace/knowledge-widget-adapters';\nimport {\n FavoriteProperties,\n LanguageProperties,\n MetaDataProperties,\n updateForm,\n useExpand,\n useForm,\n} from '@telia-ace/knowledge-widget-component-utilities';\nimport {\n DialogItem,\n PickerTypes,\n createEventSubscriber,\n extendComponent,\n} from '@telia-ace/knowledge-widget-core';\nimport { createReactComponent } from '@telia-ace/knowledge-widget-ui';\nimport { FormComponentInstanceProperties } from '@telia-ace/widget-forms';\nimport { RoutingService } from '@telia-ace/widget-routing';\nimport { Container, EventManager } from '@webprovisions/platform';\nimport * as clipboard from 'clipboard-polyfill';\nimport useFeedback from './use-feedback';\n\nexport type GuideProps = {\n id: string;\n title: string;\n body: string;\n connection: string;\n categories: number[];\n hasHandover: boolean;\n allowFeedback: boolean;\n perspectives: { [key: string]: string };\n translations?: { [key: string]: string };\n modified?: string;\n published?: string;\n publishedBy?: string | null;\n modifiedBy?: string | null;\n perspective: string | null;\n};\n\nexport type AvailablePerspectives = {\n name: string;\n title: string;\n};\n\nexport type GuideComponentProps = {\n showHeader?: boolean;\n showFeedback?: boolean;\n feedbackDirection?: 'horizontal' | 'vertical';\n feedbackGiven?: 'positive' | 'negative'; // internal\n contactMethods?: ContactMethodType[]; // internal\n handoverContactMethods?: ContactMethodType[]; // internal\n showAnswerVersions?: boolean;\n feedbackHeader?: string;\n contactHeader?: string;\n toolbarFunctionsHeader?: string;\n toolbarLanguageHeader?: string;\n positiveFeedbackLabel?: string;\n negativeFeedbackLabel?: string;\n contactFeedbackLabel?: string;\n feedbackRecognitionLabel?: string;\n defaultAnswerVersionLabel?: string;\n backButtonLabel?: string;\n toolbarFunctionsTooltip?: string;\n toolbarFunctionsCloseButtonAriaLabel?: string;\n copyActionLabel?: string;\n printActionLabel?: string;\n toolbarLanguageTooltip?: string;\n toolbar?: ToolbarProps;\n guide?: GuideProps; // internal\n dialog?: DialogItem[]; // internal\n error?: DataError; // internal\n availablePerspectives?: AvailablePerspectives[]; // internal\n} & FormComponentInstanceProperties &\n FavoriteProperties &\n MetaDataProperties &\n LanguageProperties;\n\nexport type ToolbarProps = {\n language?: boolean;\n guideCategories?: boolean;\n allowCopy?: boolean;\n allowPrint?: boolean;\n showFavoriteToggle?: boolean;\n picker?: PickerTypes;\n};\n\nconst buildPlainText = ({ title, body }: GuideProps): string => {\n let processedHtml = '';\n\n if (title && title.length) {\n processedHtml = title.trim();\n }\n\n if (body && body.length) {\n processedHtml = `${processedHtml.trim()}\\n${body.trim()}`;\n }\n\n const div = document.createElement('div');\n div.innerHTML = processedHtml;\n const links: HTMLAnchorElement[] = Array.from(div.getElementsByTagName('a'));\n\n let plainText = div.innerText;\n\n links.forEach((a) => {\n plainText = plainText.replace(a.innerText, `[${a.href}] (${a.innerText})`);\n });\n\n return plainText;\n};\n\nconst buildHtml = ({ title, body }: GuideProps): string => {\n let processedHtml = '';\n\n if (title && title.length) {\n processedHtml = `<h2>${title.trim()}</h2>`;\n }\n\n if (body && body.length) {\n processedHtml = `${processedHtml.trim()}${body.trim()}`;\n }\n\n return processedHtml.trim();\n};\n\nexport const GuideComponent = (container: Container) => {\n const { events }: { events: EventManager } = container.get('$widget');\n const [subscribe, unsubscribe] = createEventSubscriber(events);\n\n return createReactComponent(container, 'guide', import('./guide'), (component) => {\n const fetch = (params: { [key: string]: any }) => {\n component.writeProperties({\n loading: true,\n error: undefined,\n guide: undefined,\n dialog: undefined,\n contactMethods: undefined,\n feedbackGiven: undefined,\n });\n component.actions.dispatch('fetch', { params });\n };\n\n component.actions.create('copy', (guide: GuideProps) => {\n const item = new clipboard.ClipboardItem({\n 'text/html': new Blob([buildHtml(guide)], { type: 'text/html' }),\n 'text/plain': new Blob([buildPlainText(guide)], { type: 'text/plain' }),\n });\n\n return clipboard.write([item]).then(() => {\n events.dispatch('widget:menu-toggled', null);\n });\n });\n\n component.actions.create('print', () => {\n const elem = document.querySelector('.humany-guide .humany-paragraph');\n const a = window.open('', '', 'height=500, width=500');\n\n events.dispatch('widget:menu-toggled', null);\n if (elem && a) {\n a.document.write(`<html><body>${elem.innerHTML}</body></html>`);\n a.document.close();\n a.print();\n }\n });\n\n component.actions.create('back', (data, options) => {\n if (options.preventDefault) {\n return;\n }\n\n return container.getAsync('router').then((router: RoutingService) => {\n router.goBack();\n });\n });\n\n component.actions.create(\n 'fetch',\n ({ contactMethods = [], dialog = [], guide, error }: GuideResult) => {\n if (error) {\n return component.actions.dispatch('fetched', {\n error,\n guide: undefined,\n contactMethods: [],\n feedbackGiven: undefined,\n handoverContactMethods: [],\n showFeedback: false,\n loading: true,\n });\n }\n const { showFeedback = true, submitButtonLabel = 'Submit' } =\n component.properties<GuideComponentProps>();\n\n const properties: GuideComponentProps = {\n showFeedback,\n dialog,\n guide,\n feedbackGiven: undefined,\n handoverContactMethods: [],\n contactMethods: contactMethods.map((cm) => ({\n ...cm,\n body: updateForm(cm, { submit: submitButtonLabel }),\n })),\n };\n\n return component.actions.dispatch('fetched', {\n ...properties,\n loading: true,\n });\n }\n );\n\n component.actions.create('fetched', (input) => {\n return component.writeProperties({\n ...input,\n feedbackGiven: undefined,\n loading: false,\n });\n });\n\n container.getAsync('router').then((router) => {\n const { params } = router.getRouteData();\n fetch(params);\n });\n\n subscribe('router:changed', (event: any, { current }: any) => {\n fetch(current.routeData.params);\n });\n\n useFeedback(container, component);\n useForm(container, component);\n useExpand(component);\n })\n .then(() => {\n return extendComponent(container, 'guide', (component) => {\n component.actions.watch('guide.fetch', (input, next) => {\n const {\n params: { guide, connection },\n } = input;\n\n if (guide) {\n return DataClient.getInstance(container)\n .then((dataClient) =>\n dataClient.fetch(DataType.Guide, { connection, guideId: guide })\n )\n .then(next)\n .catch((error) => {\n if (error) {\n return next(error);\n }\n });\n }\n\n return next(input);\n });\n });\n })\n .then(() => {\n unsubscribe();\n });\n};\n\nexport default GuideComponent;\n"],"names":["useFeedback","container","controller","input","type","FeedbackType","guide","submitButtonLabel","connection","id","hasHandover","events","DataClient","dataClient","DataType","contactMethods","cm","__spreadProps","__spreadValues","updateForm","buildPlainText","title","body","processedHtml","div","links","plainText","buildHtml","GuideComponent","subscribe","unsubscribe","createEventSubscriber","createReactComponent","component","fetch","params","item","clipboard","elem","a","data","options","router","dialog","error","showFeedback","properties","event","current","useForm","useExpand","extendComponent","next","GuideComponent$1"],"mappings":";;;;;;;;;;;;;;;;;AAWA,MAAAA,IAAe,CAACC,GAAsBC,MAAwC;AAC1E,EAAAA,EAAW,QAAQ,OAAO,YAAY,CAACC,MAAmC;AACtE,UAAMC,IAAOD,MAAU,aAAaE,EAAa,WAAWA,EAAa,UACnE,EAAE,OAAAC,GAAO,mBAAAC,IAAoB,SAAS,IACxCL,EAAW;AACf,QAAII,GAAO;AACP,YAAM,EAAE,YAAAE,GAAY,IAAAC,GAAI,aAAAC,EAAA,IAAgBJ;AACxC,MAAAJ,EAAW,gBAAgB;AAAA,QACvB,eAAeC;AAAA,QACf,SAASO,KAAeN,MAASC,EAAa;AAAA,MAAA,CACjD;AAED,YAAM,EAAE,QAAAM,EAAW,IAAAV,EAAU,IAAI,SAAS;AAC1C,aAAAU,EAAO,SAAS,2BAA2B;AAAA,QACvC,OAAAL;AAAA,QACA,YAAYA,EAAM;AAAA,QAClB,cAAcF,EAAK,YAAY;AAAA,MAAA,CAClC,GAEMQ,EAAW,YAAYX,CAAS,EAAE,KAAK,CAACY,MACpCA,EAAW,SAASJ,GAAID,GAAYJ,CAAI,EAAE,KAAK,MAAM;AACpD,YAAAM,KAAeN,MAASC,EAAa;AACrC,iBAAOQ,EACF,MAAMC,EAAS,gBAAgB,EAAE,SAASL,EAAG,CAAC,EAC9C,KAAK,CAAC,EAAE,gBAAAM,QACEb,EAAW,QAAQ,SAAS,YAAY;AAAA,YAC3C,wBAAwBa,EAAe,IAAI,CAACC,MAAQC,EAAAC,EAAA,IAC7CF,IAD6C;AAAA,cAEhD,MAAMG,EAAWH,GAAI;AAAA,gBACjB,QAAQT;AAAA,cAAA,CACX;AAAA,YAAA,EACH;AAAA,YACF,SA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9B,GAAOiD,MAAS;AAC9C,YAAA;AAAA,QACF,QAAQ,EAAE,OAAA9C,GAAO,YAAAE,EAAW;AAAA,MAC5B,IAAAL;AAEJ,aAAIG,IACOM,EAAW,YAAYX,CAAS,EAClC;AAAA,QAAK,CAACY,MACHA,EAAW,MAAMC,EAAS,OAAO,EAAE,YAAAN,GAAY,SAASF,GAAO;AAAA,QAElE,KAAK8C,CAAI,EACT,MAAM,CAACR,MAAU;AACd,YAAIA;AACA,iBAAOQ,EAAKR,CAAK;AAAA,MACrB,CACH,IAGFQ,EAAKjD,CAAK;AAAA,IAAA,CACpB;AAAA,EAAA,CACJ,CACJ,EACA,KAAK,MAAM;AACI,IAAA2B;EAAA,CACf;AACT,GAEAuB,IAAezB;"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@telia-ace/knowledge-widget-components-guide",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.48-next.0",
|
|
4
4
|
"description": "Guide component for ACE Knowledge Widgets.",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE.txt",
|
|
6
6
|
"author": "Telia Company AB",
|
|
@@ -21,11 +21,11 @@
|
|
|
21
21
|
},
|
|
22
22
|
"sideEffects": false,
|
|
23
23
|
"dependencies": {
|
|
24
|
-
"@telia-ace/knowledge-data-client": "1.0.
|
|
25
|
-
"@telia-ace/knowledge-widget-adapters": "1.0.
|
|
26
|
-
"@telia-ace/knowledge-widget-component-utilities": "1.0.
|
|
27
|
-
"@telia-ace/knowledge-widget-core": "1.0.
|
|
28
|
-
"@telia-ace/knowledge-widget-ui": "1.0.
|
|
24
|
+
"@telia-ace/knowledge-data-client": "1.0.11-next.0",
|
|
25
|
+
"@telia-ace/knowledge-widget-adapters": "1.0.54-next.0",
|
|
26
|
+
"@telia-ace/knowledge-widget-component-utilities": "1.0.48-next.0",
|
|
27
|
+
"@telia-ace/knowledge-widget-core": "1.0.44-next.0",
|
|
28
|
+
"@telia-ace/knowledge-widget-ui": "1.0.50-next.0",
|
|
29
29
|
"@telia-ace/widget-forms": "^1.0.35",
|
|
30
30
|
"@telia-ace/widget-routing": "^1.0.29",
|
|
31
31
|
"@telia-ace/widget-types-grid": "^1.0.37",
|