@telia-ace/knowledge-widget-components-guide 1.0.22 → 1.0.23

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,61 +1,61 @@
1
- var ce = Object.defineProperty, me = Object.defineProperties;
2
- var de = Object.getOwnPropertyDescriptors;
1
+ var be = Object.defineProperty, fe = Object.defineProperties;
2
+ var ye = Object.getOwnPropertyDescriptors;
3
3
  var W = Object.getOwnPropertySymbols;
4
- var X = Object.prototype.hasOwnProperty, Y = Object.prototype.propertyIsEnumerable;
5
- var U = (t, e, a) => e in t ? ce(t, e, { enumerable: !0, configurable: !0, writable: !0, value: a }) : t[e] = a, B = (t, e) => {
4
+ var ee = Object.prototype.hasOwnProperty, te = Object.prototype.propertyIsEnumerable;
5
+ var _ = (t, e, a) => e in t ? be(t, e, { enumerable: !0, configurable: !0, writable: !0, value: a }) : t[e] = a, S = (t, e) => {
6
6
  for (var a in e || (e = {}))
7
- X.call(e, a) && U(t, a, e[a]);
7
+ ee.call(e, a) && _(t, a, e[a]);
8
8
  if (W)
9
9
  for (var a of W(e))
10
- Y.call(e, a) && U(t, a, e[a]);
10
+ te.call(e, a) && _(t, a, e[a]);
11
11
  return t;
12
- }, D = (t, e) => me(t, de(e));
13
- var H = (t, e) => {
12
+ }, D = (t, e) => fe(t, ye(e));
13
+ var F = (t, e) => {
14
14
  var a = {};
15
15
  for (var o in t)
16
- X.call(t, o) && e.indexOf(o) < 0 && (a[o] = t[o]);
16
+ ee.call(t, o) && e.indexOf(o) < 0 && (a[o] = t[o]);
17
17
  if (t != null && W)
18
18
  for (var o of W(t))
19
- e.indexOf(o) < 0 && Y.call(t, o) && (a[o] = t[o]);
19
+ e.indexOf(o) < 0 && te.call(t, o) && (a[o] = t[o]);
20
20
  return a;
21
21
  };
22
- import { ContactList as ee, contactLink as ue } from "@telia-ace/knowledge-widget-adapters";
23
- import { NotFound as he, Component as ge } from "@telia-ace/knowledge-widget-types-grid";
24
- import { List as be, TextLink as te, paddedBorderTabStyle as ae, useRouteData as G, Feedback as fe, StyledHeaderText as ye, useDispatch as ne, useProperties as q, Text as J, SymbolBadge as F, useContainer as oe, Tooltip as pe, StyledListButton as T, DropdownList as le, useFavorites as $e, StyledText as Z, FavoriteButton as Ee, DrawerList as re, DrawerAnimationType as se, useChildren as ke, createEmptyComponent as we, guideRenderInstructions as xe, Loader as ze, loadingOpacity as Se, Paragraph as Le, genericHtml as Be, headingElement as Ne, DialogList as Ce, contentBox as De, Metadata as ve, Button as Re, linkTabStyle as Te } from "@telia-ace/knowledge-widget-ui";
25
- import { appendClassNames as P, buildCategoryTrail as Fe, createParams as Oe } from "@telia-ace/widget-utilities";
26
- import n, { useMemo as K, useState as Ie, useEffect as We, useCallback as V, forwardRef as He } from "react";
27
- import r, { css as O } from "styled-components";
22
+ import { ContactList as oe, contactLink as pe } from "@telia-ace/knowledge-widget-adapters";
23
+ import { NotFound as $e, Component as Ee } from "@telia-ace/knowledge-widget-types-grid";
24
+ import { List as ke, TextLink as le, paddedBorderTabStyle as re, useRouteData as G, Feedback as we, StyledHeaderText as xe, useDispatch as se, useProperties as q, Text as J, SymbolBadge as T, useContainer as ie, Tooltip as ze, StyledListButton as O, DropdownList as ce, useFavorites as Le, StyledText as ae, FavoriteButton as Se, DrawerList as me, DrawerAnimationType as de, useChildren as Be, Lightbox as Ne, DialogLink as Ce, embeddedLinkMapper as ve, createEmptyComponent as De, Loader as Re, loadingOpacity as Fe, Paragraph as Oe, genericHtml as Te, headingElement as Ie, DialogList as We, contentBox as He, Metadata as Me, Button as Pe, linkTabStyle as je } from "@telia-ace/knowledge-widget-ui";
25
+ import { appendClassNames as H, buildCategoryTrail as Ae, createParams as Ve } from "@telia-ace/widget-utilities";
26
+ import n, { useMemo as M, useState as Ge, useEffect as qe, useCallback as V, forwardRef as Je } from "react";
27
+ import r, { css as K } from "styled-components";
28
28
  import { PickerTypes as p } from "@telia-ace/knowledge-widget-core";
29
- const Pe = ({
29
+ const Ke = ({
30
30
  className: t,
31
31
  defaultAnswerVersionLabel: e,
32
32
  guide: { perspective: a, perspectives: o },
33
- availablePerspectives: d = []
33
+ availablePerspectives: u = []
34
34
  }) => {
35
- const { name: i, params: l } = G(), h = K(() => !o || !d.length ? [] : d.filter(({ name: c }) => !!o[c]).map(({ name: c, title: u }) => ({ label: u, connection: o[c] })), [o, d]);
36
- return /* @__PURE__ */ n.createElement(Me, {
37
- className: P(t, "humany-guide-answer-version-picker"),
35
+ const { name: c, params: l } = G(), h = M(() => !o || !u.length ? [] : u.filter(({ name: m }) => !!o[m]).map(({ name: m, title: d }) => ({ label: d, connection: o[m] })), [o, u]);
36
+ return /* @__PURE__ */ n.createElement(Qe, {
37
+ className: H(t, "humany-guide-answer-version-picker"),
38
38
  items: h,
39
- renderItem: (c) => {
40
- const u = c.label === "Default" ? e : c.label, g = a === c.connection, b = g && (!l.connection || a === l.connection);
39
+ renderItem: (m) => {
40
+ const d = m.label === "Default" ? e : m.label, g = a === m.connection, b = g && (!l.connection || a === l.connection);
41
41
  return /* @__PURE__ */ n.createElement("li", {
42
- key: c.connection,
43
- "data-version": c.connection
44
- }, /* @__PURE__ */ n.createElement(je, {
45
- key: c.connection,
42
+ key: m.connection,
43
+ "data-version": m.connection
44
+ }, /* @__PURE__ */ n.createElement(Ue, {
45
+ key: m.connection,
46
46
  forwardedAs: b ? "span" : void 0,
47
- text: u,
48
- routeName: i,
47
+ text: d,
48
+ routeName: c,
49
49
  selected: g,
50
- "aria-label": u,
51
- title: u,
52
- params: D(B({}, l), {
53
- connection: c.connection
50
+ "aria-label": d,
51
+ title: d,
52
+ params: D(S({}, l), {
53
+ connection: m.connection
54
54
  })
55
55
  }));
56
56
  }
57
57
  });
58
- }, Me = r(be)`
58
+ }, Qe = r(ke)`
59
59
  display: flex;
60
60
  align-items: center;
61
61
  flex-wrap: wrap;
@@ -74,7 +74,7 @@ const Pe = ({
74
74
  li > span {
75
75
  cursor: default;
76
76
  }
77
- `, je = r(te)`
77
+ `, Ue = r(le)`
78
78
  font-weight: 300;
79
79
  color: ${(t) => {
80
80
  var e;
@@ -82,26 +82,23 @@ const Pe = ({
82
82
  }};
83
83
  text-decoration: none;
84
84
 
85
- ${(t) => t.selected && O`
85
+ ${(t) => t.selected && K`
86
86
  font-weight: bold;
87
87
  text-decoration: underline;
88
88
  `}
89
89
 
90
- &:focus {
91
- ${(t) => {
92
- var e;
93
- return ((e = t.theme.accessibility) == null ? void 0 : e.isTabbing) && ae;
94
- }};
90
+ &:focus-visible {
91
+ ${re};
95
92
  }
96
- `, Ae = r(ee)`
93
+ `, Xe = r(oe)`
97
94
  border-top: ${(t) => t.theme.border};
98
95
  ${(t) => t.backButtonShown === "true" && `border-bottom: ${t.theme.border};`}
99
- `, Ve = r(fe)`
96
+ `, Ye = r(we)`
100
97
  ${(t) => {
101
98
  var e, a;
102
99
  return `padding: ${(e = t.theme.sizes) == null ? void 0 : e.large} ${(a = t.theme.sizes) == null ? void 0 : a.large};`;
103
100
  }}
104
- `, Ge = r(ye)`
101
+ `, Ze = r(xe)`
105
102
  ${(t) => {
106
103
  var e, a;
107
104
  return `padding: ${(e = t.theme.sizes) == null ? void 0 : e.large} ${(a = t.theme.sizes) == null ? void 0 : a.large};`;
@@ -113,15 +110,15 @@ const Pe = ({
113
110
  return (e = t.theme.fonts) == null ? void 0 : e.normal;
114
111
  }};
115
112
  font-weight: bold;
116
- `, qe = ({ backButtonShown: t = !1, accordion: e = !1 }) => {
117
- const a = ne(), {
113
+ `, _e = ({ backButtonShown: t = !1, accordion: e = !1 }) => {
114
+ const a = se(), {
118
115
  loading: o = !1,
119
- dialog: d = [],
120
- guide: i,
116
+ dialog: u = [],
117
+ guide: c,
121
118
  handoverContactMethods: l = [],
122
119
  contactHeader: h,
123
- showFeedback: c,
124
- feedbackDirection: u = "horizontal",
120
+ showFeedback: m,
121
+ feedbackDirection: d = "horizontal",
125
122
  feedbackRecognitionLabel: g,
126
123
  feedbackGiven: b,
127
124
  feedbackHeader: $,
@@ -129,59 +126,63 @@ const Pe = ({
129
126
  negativeFeedbackLabel: f,
130
127
  contactFeedbackLabel: s
131
128
  } = q();
132
- return !c || !i || !i.allowFeedback || o && !b || d.length ? null : b && g && !l.length ? /* @__PURE__ */ n.createElement(Ge, {
129
+ return !m || !c || !c.allowFeedback || o && !b || u.length ? null : b && g && !l.length ? /* @__PURE__ */ n.createElement(Ze, {
133
130
  accordion: e ? "true" : "false"
134
- }, g) : i.hasHandover && l.length ? /* @__PURE__ */ n.createElement(Ae, {
131
+ }, g) : c.hasHandover && l.length ? /* @__PURE__ */ n.createElement(Xe, {
135
132
  backButtonShown: t ? "true" : "false",
136
133
  accordion: e ? "true" : "false",
137
134
  header: h,
138
135
  contactMethods: l,
139
136
  dispatch: a
140
- }) : /* @__PURE__ */ n.createElement(Ve, {
137
+ }) : /* @__PURE__ */ n.createElement(Ye, {
141
138
  accordion: e ? "true" : "false",
142
139
  positive: E,
143
- negative: i.hasHandover ? s : f,
140
+ negative: c.hasHandover ? s : f,
144
141
  header: $,
145
142
  selected: b,
146
143
  onFeedback: (k) => a("feedback", k),
147
- direction: u
144
+ direction: d
148
145
  });
149
- }, Je = ({
146
+ }, et = ({
150
147
  guide: { categories: t = [] },
151
148
  toolbar: { picker: e = p.NONE }
152
149
  }) => {
153
- const [a, o] = Ie([]), d = oe();
154
- return We(() => {
155
- Fe("index", t.map((i) => i.toString()), d).then((i) => {
156
- o(i);
150
+ const [a, o] = Ge([]), u = ie();
151
+ return qe(() => {
152
+ Ae(
153
+ "index",
154
+ t.map((c) => c.toString()),
155
+ u
156
+ ).then((c) => {
157
+ o(c);
157
158
  });
158
- }, [t]), a.length ? /* @__PURE__ */ n.createElement(pe, {
159
+ }, [t]), a.length ? /* @__PURE__ */ n.createElement(ze, {
159
160
  className: "humany-guide-category-tooltip",
160
161
  sticky: e === p.DRAWER,
161
- content: /* @__PURE__ */ n.createElement(n.Fragment, null, a.map((i) => /* @__PURE__ */ n.createElement(Ke, {
162
+ content: /* @__PURE__ */ n.createElement(n.Fragment, null, a.map((c) => /* @__PURE__ */ n.createElement(tt, {
162
163
  className: "humany-guide-category-trail",
163
- key: i.map((l) => l.id).join(".")
164
- }, i.map((l, h) => /* @__PURE__ */ n.createElement(J, {
164
+ key: c.map((l) => l.id).join(".")
165
+ }, c.map((l, h) => /* @__PURE__ */ n.createElement(J, {
165
166
  className: "humany-guide-category-trail-segment",
166
167
  key: l.id
167
- }, l.symbol && h === 0 && /* @__PURE__ */ n.createElement(F, {
168
+ }, l.symbol && h === 0 && /* @__PURE__ */ n.createElement(T, {
168
169
  size: 14,
169
170
  symbol: l.symbol
170
- }), l.title, h !== i.length - 1 && /* @__PURE__ */ n.createElement(Qe, {
171
+ }), l.title, h !== c.length - 1 && /* @__PURE__ */ n.createElement(at, {
171
172
  className: "humany-category-separator"
172
173
  }, "/"))))))
173
- }, e === p.DRAWER ? /* @__PURE__ */ n.createElement(T, {
174
+ }, e === p.DRAWER ? /* @__PURE__ */ n.createElement(O, {
174
175
  className: "humany-guide-category-tooltip-button",
175
176
  "data-has-label": "false",
176
177
  "data-has-symbol": "true"
177
- }, /* @__PURE__ */ n.createElement(_, {
178
+ }, /* @__PURE__ */ n.createElement(ne, {
178
179
  size: 19,
179
180
  symbol: { type: "Svg", content: "information" }
180
- })) : /* @__PURE__ */ n.createElement(_, {
181
+ })) : /* @__PURE__ */ n.createElement(ne, {
181
182
  size: 19,
182
183
  symbol: { type: "Svg", content: "information" }
183
184
  })) : null;
184
- }, Ke = r.div`
185
+ }, tt = r.div`
185
186
  i,
186
187
  svg {
187
188
  margin: 0 ${(t) => {
@@ -196,24 +197,24 @@ const Pe = ({
196
197
  return (e = t.theme.sizes) == null ? void 0 : e.small;
197
198
  }};
198
199
  }
199
- `, Qe = r(J)`
200
+ `, at = r(J)`
200
201
  margin: 0 ${(t) => {
201
202
  var e;
202
203
  return (e = t.theme.sizes) == null ? void 0 : e.small;
203
204
  }};
204
- `, _ = r(F)`
205
+ `, ne = r(T)`
205
206
  display: block;
206
- `, Ue = ({
207
+ `, nt = ({
207
208
  header: t,
208
209
  tooltip: e,
209
210
  printActionLabel: a,
210
211
  copyActionLabel: o,
211
- addFavoriteTooltip: d,
212
- removeFavoriteCancelLabel: i,
212
+ addFavoriteTooltip: u,
213
+ removeFavoriteCancelLabel: c,
213
214
  removeFavoriteConfirmLabel: l,
214
215
  removeFavoriteHeader: h,
215
- removeFavoriteLabel: c,
216
- removeFavoriteTooltip: u,
216
+ removeFavoriteLabel: m,
217
+ removeFavoriteTooltip: d,
217
218
  toolbarFunctionsCloseButtonAriaLabel: g,
218
219
  allowCopy: b = !1,
219
220
  allowPrint: $ = !1,
@@ -222,74 +223,77 @@ const Pe = ({
222
223
  guide: s,
223
224
  dispatch: k
224
225
  }) => {
225
- const [S, N] = $e(), m = V((y) => {
226
- s && k("copy", s);
227
- }, [s, k]), w = V(() => {
226
+ const [B, C] = Le(), i = V(
227
+ (y) => {
228
+ s && k("copy", s);
229
+ },
230
+ [s, k]
231
+ ), z = V(() => {
228
232
  s && k("print");
229
- }, [s, k]), x = K(() => {
230
- const { id: y, title: v } = s, C = [];
231
- if (b && C.push({
233
+ }, [s, k]), L = M(() => {
234
+ const { id: y, title: R } = s, v = [];
235
+ if (b && v.push({
232
236
  type: "copy",
233
- child: /* @__PURE__ */ n.createElement(T, {
237
+ child: /* @__PURE__ */ n.createElement(O, {
234
238
  "data-has-label": o ? "true" : "false",
235
239
  "data-has-symbol": "true",
236
240
  title: o,
237
241
  "aria-label": a,
238
- onClick: m
242
+ onClick: i
239
243
  }, /* @__PURE__ */ n.createElement(A, {
240
244
  size: 16,
241
245
  symbol: { type: "Svg", content: "copy" }
242
- }), o && /* @__PURE__ */ n.createElement(Z, null, o))
243
- }), $ && C.push({
246
+ }), o && /* @__PURE__ */ n.createElement(ae, null, o))
247
+ }), $ && v.push({
244
248
  type: "print",
245
- child: /* @__PURE__ */ n.createElement(T, {
249
+ child: /* @__PURE__ */ n.createElement(O, {
246
250
  "data-has-label": a ? "true" : "false",
247
251
  "data-has-symbol": "true",
248
252
  title: a,
249
253
  "aria-label": a,
250
- onClick: w
254
+ onClick: z
251
255
  }, /* @__PURE__ */ n.createElement(A, {
252
256
  size: 16,
253
257
  symbol: { type: "Svg", content: "print" }
254
- }), a && /* @__PURE__ */ n.createElement(Z, null, a))
258
+ }), a && /* @__PURE__ */ n.createElement(ae, null, a))
255
259
  }), E) {
256
- const R = S.indexOf(y) > -1;
257
- C.push({
260
+ const I = B.indexOf(y) > -1;
261
+ v.push({
258
262
  type: "favorite",
259
- child: /* @__PURE__ */ n.createElement(Ee, {
263
+ child: /* @__PURE__ */ n.createElement(Se, {
260
264
  id: y,
261
- guideTitle: v,
262
- isFavorite: R,
263
- buttonLabel: R ? u : d,
264
- addFavoriteTooltip: d,
265
- removeFavoriteCancelLabel: i,
265
+ guideTitle: R,
266
+ isFavorite: I,
267
+ buttonLabel: I ? d : u,
268
+ addFavoriteTooltip: u,
269
+ removeFavoriteCancelLabel: c,
266
270
  removeFavoriteConfirmLabel: l,
267
271
  removeFavoriteHeader: h,
268
- removeFavoriteLabel: c,
269
- removeFavoriteTooltip: u,
270
- actions: N
272
+ removeFavoriteLabel: m,
273
+ removeFavoriteTooltip: d,
274
+ actions: C
271
275
  })
272
276
  });
273
277
  }
274
- return C;
278
+ return v;
275
279
  }, [
276
- S,
280
+ B,
277
281
  s,
278
282
  b,
279
283
  $,
280
284
  E,
281
285
  a,
282
286
  o,
283
- d,
284
- i,
287
+ u,
288
+ c,
285
289
  l,
286
290
  h,
287
- c,
288
- u
291
+ m,
292
+ d
289
293
  ]);
290
- if (!x.length)
294
+ if (!L.length)
291
295
  return null;
292
- const z = /* @__PURE__ */ n.createElement(Ye, {
296
+ const w = /* @__PURE__ */ n.createElement(lt, {
293
297
  tabIndex: 0,
294
298
  title: e,
295
299
  "data-has-symbol": "true",
@@ -297,27 +301,27 @@ const Pe = ({
297
301
  }, /* @__PURE__ */ n.createElement(A, {
298
302
  symbol: { type: "Svg", content: "options" },
299
303
  size: 18
300
- })), L = ({ type: y, child: v }) => /* @__PURE__ */ n.createElement("li", {
304
+ })), N = ({ type: y, child: R }) => /* @__PURE__ */ n.createElement("li", {
301
305
  key: y,
302
306
  "data-function-type": y
303
- }, v);
304
- return f === p.DROPDOWN ? /* @__PURE__ */ n.createElement(Xe, {
307
+ }, R);
308
+ return f === p.DROPDOWN ? /* @__PURE__ */ n.createElement(ot, {
305
309
  className: "humany-guide-functions-dropdown-list",
306
310
  header: t,
307
- items: x,
308
- trigger: z,
309
- renderItem: L,
311
+ items: L,
312
+ trigger: w,
313
+ renderItem: N,
310
314
  closeButtonAriaLabel: g
311
- }) : f === p.DRAWER ? /* @__PURE__ */ n.createElement(re, {
315
+ }) : f === p.DRAWER ? /* @__PURE__ */ n.createElement(me, {
312
316
  className: "humany-guide-functions-drawer-list",
313
- animation: { type: se.SlideInBottom },
317
+ animation: { type: de.SlideInBottom },
314
318
  header: t,
315
- items: x,
316
- trigger: z,
317
- renderItem: L,
319
+ items: L,
320
+ trigger: w,
321
+ renderItem: N,
318
322
  closeButtonAriaLabel: g
319
323
  }) : null;
320
- }, A = r(F)`
324
+ }, A = r(T)`
321
325
  circle {
322
326
  fill: ${(t) => {
323
327
  var e;
@@ -333,81 +337,81 @@ const Pe = ({
333
337
  return (e = t.theme.colors) == null ? void 0 : e.text;
334
338
  }};
335
339
  }
336
- `, Xe = r(le)`
340
+ `, ot = r(ce)`
337
341
  display: block;
338
342
  min-height: auto;
339
- `, Ye = r(T)`
343
+ `, lt = r(O)`
340
344
  padding: calc(${(t) => {
341
345
  var e;
342
346
  return (e = t.theme.sizes) == null ? void 0 : e.small;
343
347
  }} * 2) 0;
344
- `, Ze = (t, e) => {
348
+ `, rt = (t, e) => {
345
349
  var a;
346
350
  return ((a = e.find((o) => o.id === t.id)) == null ? void 0 : a.label) || "";
347
- }, _e = (i) => {
348
- var l = i, {
351
+ }, st = (c) => {
352
+ var l = c, {
349
353
  header: t,
350
354
  tooltip: e,
351
355
  picker: a = p.NONE,
352
356
  guide: o
353
- } = l, d = H(l, [
357
+ } = l, u = F(l, [
354
358
  "header",
355
359
  "tooltip",
356
360
  "picker",
357
361
  "guide"
358
362
  ]);
359
- const { name: h, params: c } = G(), u = K(() => Object.keys(o.translations || {}).reduce((E, f) => {
363
+ const { name: h, params: m } = G(), d = M(() => Object.keys(o.translations || {}).reduce((E, f) => {
360
364
  const s = {};
361
- return s.key = f, s.id = (o.translations || {})[f], s.label = d[`${f}LanguageLabel`], (s.id || s.label) && E.push(s), E;
362
- }, []), [o, d]);
363
- if (!u.length)
365
+ return s.key = f, s.id = (o.translations || {})[f], s.label = u[`${f}LanguageLabel`], (s.id || s.label) && E.push(s), E;
366
+ }, []), [o, u]);
367
+ if (!d.length)
364
368
  return null;
365
- const g = Ze(o, u), b = /* @__PURE__ */ n.createElement(et, {
369
+ const g = rt(o, d), b = /* @__PURE__ */ n.createElement(it, {
366
370
  tabIndex: 0,
367
371
  title: e,
368
372
  "data-has-symbol": "true",
369
373
  "data-has-label": a === p.DROPDOWN && g ? "true" : "false"
370
- }, a === p.DROPDOWN && /* @__PURE__ */ n.createElement(n.Fragment, null, g && /* @__PURE__ */ n.createElement(at, null, g), /* @__PURE__ */ n.createElement(nt, {
374
+ }, a === p.DROPDOWN && /* @__PURE__ */ n.createElement(n.Fragment, null, g && /* @__PURE__ */ n.createElement(mt, null, g), /* @__PURE__ */ n.createElement(dt, {
371
375
  symbol: { type: "Svg", content: "caret-down" },
372
376
  size: 11
373
- })), a === p.DRAWER && /* @__PURE__ */ n.createElement(n.Fragment, null, /* @__PURE__ */ n.createElement(tt, {
377
+ })), a === p.DRAWER && /* @__PURE__ */ n.createElement(n.Fragment, null, /* @__PURE__ */ n.createElement(ct, {
374
378
  symbol: { type: "Svg", content: "language" },
375
379
  size: 20
376
380
  }))), $ = ({ label: E, key: f, id: s }) => /* @__PURE__ */ n.createElement("li", {
377
381
  key: f,
378
382
  "data-language": f
379
- }, /* @__PURE__ */ n.createElement(lt, {
383
+ }, /* @__PURE__ */ n.createElement(ht, {
380
384
  tabIndex: 0,
381
385
  text: E,
382
386
  routeName: h,
383
387
  selected: o.id === s,
384
- params: Oe(D(B({}, c), {
388
+ params: Ve(D(S({}, m), {
385
389
  connection: void 0,
386
390
  guide: s
387
391
  }))
388
392
  }));
389
- return a === p.DROPDOWN ? /* @__PURE__ */ n.createElement(ot, {
393
+ return a === p.DROPDOWN ? /* @__PURE__ */ n.createElement(ut, {
390
394
  className: "humany-guide-languages-dropdown-list",
391
395
  header: t,
392
- items: u,
396
+ items: d,
393
397
  trigger: b,
394
398
  renderItem: $
395
- }) : a === p.DRAWER ? /* @__PURE__ */ n.createElement(re, {
399
+ }) : a === p.DRAWER ? /* @__PURE__ */ n.createElement(me, {
396
400
  className: "humany-guide-languages-drawer-list",
397
- animation: { type: se.SlideInBottom },
401
+ animation: { type: de.SlideInBottom },
398
402
  header: t,
399
- items: u,
403
+ items: d,
400
404
  trigger: b,
401
405
  renderItem: $
402
406
  }) : null;
403
- }, et = r(T)`
407
+ }, it = r(O)`
404
408
  &&& {
405
409
  margin: 0 ${(t) => {
406
410
  var e;
407
411
  return `calc(${(e = t.theme.sizes) == null ? void 0 : e.small} * 2)`;
408
412
  }} 0 0;
409
413
  }
410
- `, tt = r(F)`
414
+ `, ct = r(T)`
411
415
  circle {
412
416
  fill: ${(t) => {
413
417
  var e;
@@ -423,7 +427,7 @@ const Pe = ({
423
427
  return (e = t.theme.colors) == null ? void 0 : e.text;
424
428
  }};
425
429
  }
426
- `, at = r(J)`
430
+ `, mt = r(J)`
427
431
  margin: 0 ${(t) => {
428
432
  var e;
429
433
  return (e = t.theme.sizes) == null ? void 0 : e.small;
@@ -432,7 +436,7 @@ const Pe = ({
432
436
  var e;
433
437
  return (e = t.theme.fonts) == null ? void 0 : e.normal;
434
438
  }};
435
- `, nt = r(F)`
439
+ `, dt = r(T)`
436
440
  align-self: flex-end;
437
441
  stroke-width: 2px;
438
442
  stroke-linecap: round;
@@ -447,45 +451,41 @@ const Pe = ({
447
451
  return (e = t.theme.colors) == null ? void 0 : e.text;
448
452
  }};
449
453
  }
450
- `, ot = r(le)`
454
+ `, ut = r(ce)`
451
455
  display: block;
452
456
  min-height: auto;
453
- `, lt = r(te)`
457
+ `, ht = r(le)`
454
458
  color: ${(t) => {
455
459
  var e, a;
456
460
  return t.selected ? (e = t.theme.colors) == null ? void 0 : e.primary : (a = t.theme.colors) == null ? void 0 : a.text;
457
461
  }};
458
462
  ${(t) => t.selected && "font-weight: bold;"}
459
463
 
460
- &:focus {
461
- ${(t) => {
462
- var e;
463
- return (e = t.theme.accessibility) != null && e.isTabbing ? O`
464
- ${ae}
465
- text-decoration: underline;
466
- ` : "outline: none;";
467
- }}
464
+ outline: none;
465
+ &:focus-visible {
466
+ ${re}
467
+ text-decoration: underline;
468
468
  }
469
- `, rt = (t) => {
469
+ `, gt = (t) => {
470
470
  const {
471
471
  allowCopy: e = !1,
472
472
  allowPrint: a = !1,
473
473
  guideCategories: o = !1,
474
- language: d = !1,
475
- showFavoriteToggle: i = !1,
474
+ language: u = !1,
475
+ showFavoriteToggle: c = !1,
476
476
  picker: l = p.NONE
477
477
  } = t;
478
- return !e && !a && !d && !i && !o || l === p.NONE;
479
- }, st = ({ className: t = "", dispatch: e }) => {
478
+ return !e && !a && !u && !c && !o || l === p.NONE;
479
+ }, bt = ({ className: t = "", dispatch: e }) => {
480
480
  const y = q(), {
481
481
  toolbarLanguageHeader: a,
482
482
  toolbarFunctionsHeader: o,
483
- toolbarLanguageTooltip: d,
484
- toolbarFunctionsTooltip: i,
483
+ toolbarLanguageTooltip: u,
484
+ toolbarFunctionsTooltip: c,
485
485
  toolbarFunctionsCloseButtonAriaLabel: l,
486
486
  printActionLabel: h,
487
- copyActionLabel: c,
488
- addFavoriteTooltip: u,
487
+ copyActionLabel: m,
488
+ addFavoriteTooltip: d,
489
489
  removeFavoriteCancelLabel: g,
490
490
  removeFavoriteConfirmLabel: b,
491
491
  removeFavoriteHeader: $,
@@ -493,7 +493,7 @@ const Pe = ({
493
493
  removeFavoriteTooltip: f,
494
494
  guide: s,
495
495
  toolbar: k
496
- } = y, S = H(y, [
496
+ } = y, B = F(y, [
497
497
  "toolbarLanguageHeader",
498
498
  "toolbarFunctionsHeader",
499
499
  "toolbarLanguageTooltip",
@@ -510,39 +510,39 @@ const Pe = ({
510
510
  "guide",
511
511
  "toolbar"
512
512
  ]);
513
- if (!s || !k || rt(k))
513
+ if (!s || !k || gt(k))
514
514
  return null;
515
- const { language: N, guideCategories: m, allowCopy: w, allowPrint: x, showFavoriteToggle: z, picker: L } = k;
516
- return /* @__PURE__ */ n.createElement(it, {
517
- className: P("humany-guide-toolbar", t)
518
- }, N && Object.keys(s.translations || {}).length > 1 && /* @__PURE__ */ n.createElement(_e, B({
515
+ const { language: C, guideCategories: i, allowCopy: z, allowPrint: L, showFavoriteToggle: w, picker: N } = k;
516
+ return /* @__PURE__ */ n.createElement(ft, {
517
+ className: H("humany-guide-toolbar", t)
518
+ }, C && Object.keys(s.translations || {}).length > 1 && /* @__PURE__ */ n.createElement(st, S({
519
519
  guide: s,
520
520
  header: a,
521
- tooltip: d,
522
- picker: L
523
- }, S)), m && /* @__PURE__ */ n.createElement(Je, {
521
+ tooltip: u,
522
+ picker: N
523
+ }, B)), i && /* @__PURE__ */ n.createElement(et, {
524
524
  guide: s,
525
525
  toolbar: k
526
- }), (w || x || z) && /* @__PURE__ */ n.createElement(Ue, {
526
+ }), (z || L || w) && /* @__PURE__ */ n.createElement(nt, {
527
527
  guide: s,
528
528
  header: o,
529
- tooltip: i,
529
+ tooltip: c,
530
530
  printActionLabel: h,
531
- copyActionLabel: c,
532
- addFavoriteTooltip: u,
531
+ copyActionLabel: m,
532
+ addFavoriteTooltip: d,
533
533
  removeFavoriteCancelLabel: g,
534
534
  removeFavoriteConfirmLabel: b,
535
535
  removeFavoriteHeader: $,
536
536
  removeFavoriteLabel: E,
537
537
  removeFavoriteTooltip: f,
538
538
  toolbarFunctionsCloseButtonAriaLabel: l,
539
- allowCopy: w,
540
- allowPrint: x,
541
- showFavoriteToggle: z,
542
- picker: L,
539
+ allowCopy: z,
540
+ allowPrint: L,
541
+ showFavoriteToggle: w,
542
+ picker: N,
543
543
  dispatch: e
544
544
  }));
545
- }, it = r.div`
545
+ }, ft = r.div`
546
546
  display: flex;
547
547
  align-items: center;
548
548
  justify-content: space-between;
@@ -554,132 +554,155 @@ const Pe = ({
554
554
  return (e = t.theme.sizes) == null ? void 0 : e.small;
555
555
  }} * 2) 0 0;
556
556
  }
557
- `, Bt = He((d, o) => {
558
- var i = d, { className: t, accordion: e = !1 } = i, a = H(i, ["className", "accordion"]);
559
- const {
560
- loading: l = !1,
561
- dialog: h = [],
562
- contactMethods: c = [],
563
- showHeader: u = !0,
564
- showAnswerVersions: g = !1,
565
- defaultAnswerVersionLabel: b = "Default",
566
- backButtonLabel: $,
567
- metadataByLabel: E,
568
- metadataModifiedLabel: f,
569
- metadataPublishedLabel: s,
570
- availablePerspectives: k,
571
- metadata: S,
572
- toolbar: N,
573
- guide: m,
574
- error: w
575
- } = q(), {
576
- params: { connection: x }
577
- } = G(), z = oe(), L = ke(), y = ne(), v = V(() => {
578
- y("back");
579
- }, [y]);
580
- if (!m && !w && !l)
581
- return we(z, D(B({}, a), {
582
- className: P(t, "humany-guide")
557
+ `, Wt = Je(
558
+ (u, o) => {
559
+ var c = u, { className: t, accordion: e = !1 } = c, a = F(c, ["className", "accordion"]);
560
+ const {
561
+ loading: l = !1,
562
+ dialog: h = [],
563
+ contactMethods: m = [],
564
+ showHeader: d = !0,
565
+ showAnswerVersions: g = !1,
566
+ defaultAnswerVersionLabel: b = "Default",
567
+ backButtonLabel: $,
568
+ metadataByLabel: E,
569
+ metadataModifiedLabel: f,
570
+ metadataPublishedLabel: s,
571
+ availablePerspectives: k,
572
+ metadata: B,
573
+ toolbar: C,
574
+ guide: i,
575
+ error: z
576
+ } = q(), {
577
+ params: { connection: L }
578
+ } = G(), w = ie(), N = Be(), y = se(), R = M(() => ({
579
+ transform: {
580
+ img: (x) => /* @__PURE__ */ n.createElement(Ne, {
581
+ attrs: x,
582
+ htmlBody: (i == null ? void 0 : i.body) || ""
583
+ }),
584
+ a: (x) => {
585
+ const Y = x, { children: he } = Y, X = F(Y, ["children"])["data-target"];
586
+ if (X && h.length) {
587
+ const Z = h.find(
588
+ ({ connection: ge }) => ge === X
589
+ );
590
+ if (Z)
591
+ return /* @__PURE__ */ n.createElement(Ce, S({}, Z), he);
592
+ }
593
+ return ve(w)(x);
594
+ }
595
+ }
596
+ }), [i, w, h]), v = V(() => {
597
+ y("back");
598
+ }, [y]);
599
+ if (!i && !z && !l)
600
+ return De(w, D(S({}, a), {
601
+ className: H(t, "humany-guide")
602
+ }));
603
+ const { id: I = "", title: Q = "", body: P = "", translations: U = {} } = i || {};
604
+ if (z && z.status === 404)
605
+ return /* @__PURE__ */ n.createElement($e, {
606
+ showSearch: !1
607
+ });
608
+ const j = !!e && !!L, ue = Object.keys(U).find((x) => U[x] === `${I}`);
609
+ return /* @__PURE__ */ n.createElement(yt, D(S({
610
+ ref: o
611
+ }, a), {
612
+ "data-loading": l,
613
+ className: H(t, "humany-guide")
614
+ }), /* @__PURE__ */ n.createElement(wt, {
615
+ "data-loading": l,
616
+ accordion: e ? "true" : "false",
617
+ className: "humany-guide-content"
618
+ }, (g && i || !!C) && /* @__PURE__ */ n.createElement(kt, {
619
+ className: "humany-guide-top"
620
+ }, g && i && /* @__PURE__ */ n.createElement(Ke, {
621
+ defaultAnswerVersionLabel: b,
622
+ availablePerspectives: k,
623
+ guide: i
624
+ }), !!C && /* @__PURE__ */ n.createElement(bt, {
625
+ dispatch: y
626
+ })), !!(Q || P) && /* @__PURE__ */ n.createElement(pt, {
627
+ className: "humany-guide-body",
628
+ accordion: e ? "true" : "false",
629
+ header: d && Q || void 0,
630
+ html: P,
631
+ htmlParseInstruction: R,
632
+ lang: ue
633
+ }), h && P.indexOf("h-option-link") === -1 && /* @__PURE__ */ n.createElement(Et, {
634
+ dialog: h
635
+ }), /* @__PURE__ */ n.createElement($t, {
636
+ backButtonShown: j ? "true" : "false",
637
+ contactMethods: m,
638
+ dispatch: y,
639
+ guideId: i && i.id
640
+ }), !m.length && /* @__PURE__ */ n.createElement(_e, {
641
+ backButtonShown: j,
642
+ accordion: e
643
+ }), j && /* @__PURE__ */ n.createElement(Lt, {
644
+ "aria-label": $,
645
+ onClick: v
646
+ }, /* @__PURE__ */ n.createElement(St, {
647
+ width: "7",
648
+ height: "13",
649
+ viewBox: "0 0 7 13",
650
+ fill: "none",
651
+ xmlns: "http://www.w3.org/2000/svg"
652
+ }, /* @__PURE__ */ n.createElement("line", {
653
+ x1: "6.64645",
654
+ y1: "12.5513",
655
+ x2: "0.648357",
656
+ y2: "6.55319"
657
+ }), /* @__PURE__ */ n.createElement("line", {
658
+ x1: "0.646447",
659
+ y1: "6.64455",
660
+ x2: "6.64454",
661
+ y2: "0.646465"
662
+ })), $ && /* @__PURE__ */ n.createElement("span", null, $)), B && /* @__PURE__ */ n.createElement(xt, D(S({}, B), {
663
+ modified: i == null ? void 0 : i.modified,
664
+ published: i == null ? void 0 : i.published,
665
+ modifiedBy: i == null ? void 0 : i.modifiedBy,
666
+ publishedBy: i == null ? void 0 : i.publishedBy,
667
+ byLabel: E,
668
+ modifiedLabel: f,
669
+ publishedLabel: s
670
+ })), N.map((x) => /* @__PURE__ */ n.createElement(zt, {
671
+ key: x.id,
672
+ id: x.id,
673
+ branch: "default",
674
+ embedded: !0
675
+ }))), /* @__PURE__ */ n.createElement(Re, {
676
+ loading: l
583
677
  }));
584
- const { id: C = "", title: R = "", body: M = "", translations: Q = {} } = m || {};
585
- if (w && w.status === 404)
586
- return /* @__PURE__ */ n.createElement(he, {
587
- showSearch: !1
588
- });
589
- const j = !!e && !!x, ie = Object.keys(Q).find((I) => Q[I] === `${C}`);
590
- return /* @__PURE__ */ n.createElement(ct, D(B({
591
- ref: o
592
- }, a), {
593
- "data-loading": l,
594
- className: P(t, "humany-guide")
595
- }), /* @__PURE__ */ n.createElement(gt, {
596
- "data-loading": l,
597
- accordion: e ? "true" : "false",
598
- className: "humany-guide-content"
599
- }, (g && m || !!N) && /* @__PURE__ */ n.createElement(ht, {
600
- className: "humany-guide-top"
601
- }, g && m && /* @__PURE__ */ n.createElement(Pe, {
602
- defaultAnswerVersionLabel: b,
603
- availablePerspectives: k,
604
- guide: m
605
- }), !!N && /* @__PURE__ */ n.createElement(st, {
606
- dispatch: y
607
- })), !!(R || M) && /* @__PURE__ */ n.createElement(mt, {
608
- className: "humany-guide-body",
609
- accordion: e ? "true" : "false",
610
- header: u && R || void 0,
611
- html: M,
612
- htmlParseInstruction: xe(z, h),
613
- lang: ie
614
- }), h && M.indexOf("h-option-link") === -1 && /* @__PURE__ */ n.createElement(ut, {
615
- dialog: h
616
- }), /* @__PURE__ */ n.createElement(dt, {
617
- backButtonShown: j ? "true" : "false",
618
- contactMethods: c,
619
- dispatch: y,
620
- guideId: m && m.id
621
- }), !c.length && /* @__PURE__ */ n.createElement(qe, {
622
- backButtonShown: j,
623
- accordion: e
624
- }), j && /* @__PURE__ */ n.createElement(yt, {
625
- "aria-label": $,
626
- onClick: v
627
- }, /* @__PURE__ */ n.createElement(pt, {
628
- width: "7",
629
- height: "13",
630
- viewBox: "0 0 7 13",
631
- fill: "none",
632
- xmlns: "http://www.w3.org/2000/svg"
633
- }, /* @__PURE__ */ n.createElement("line", {
634
- x1: "6.64645",
635
- y1: "12.5513",
636
- x2: "0.648357",
637
- y2: "6.55319"
638
- }), /* @__PURE__ */ n.createElement("line", {
639
- x1: "0.646447",
640
- y1: "6.64455",
641
- x2: "6.64454",
642
- y2: "0.646465"
643
- })), $ && /* @__PURE__ */ n.createElement("span", null, $)), S && /* @__PURE__ */ n.createElement(bt, D(B({}, S), {
644
- modified: m == null ? void 0 : m.modified,
645
- published: m == null ? void 0 : m.published,
646
- modifiedBy: m == null ? void 0 : m.modifiedBy,
647
- publishedBy: m == null ? void 0 : m.publishedBy,
648
- byLabel: E,
649
- modifiedLabel: f,
650
- publishedLabel: s
651
- })), L.map((I) => /* @__PURE__ */ n.createElement(ft, {
652
- key: I.id,
653
- id: I.id,
654
- branch: "default",
655
- embedded: !0
656
- }))), /* @__PURE__ */ n.createElement(ze, {
657
- loading: l
658
- }));
659
- }), ct = r.div`
660
- ${Se}
678
+ }
679
+ ), yt = r.div`
680
+ ${Fe}
661
681
  min-width: 0;
662
- `, mt = r(Le)`
663
- ${Be}
682
+ `, pt = r(Oe)`
683
+ ${Te}
664
684
  ${(t) => {
665
685
  var e;
666
686
  return `padding: ${(e = t.theme.sizes) == null ? void 0 : e.large};`;
667
687
  }}
668
688
  display: block;
669
689
  line-height: 1.6em;
670
- ${Ne("h1", O`
690
+ ${Ie(
691
+ "h1",
692
+ K`
671
693
  font-size: ${(t) => {
672
- var e;
673
- return (e = t.theme.fonts) == null ? void 0 : e.large;
674
- }};
694
+ var e;
695
+ return (e = t.theme.fonts) == null ? void 0 : e.large;
696
+ }};
675
697
  font-weight: normal;
676
698
  line-height: 1.6em;
677
699
  line-height: 1.6em;
678
700
  margin: 0 0 ${(t) => {
679
- var e;
680
- return (e = t.theme.sizes) == null ? void 0 : e.small;
681
- }};
682
- `)}
701
+ var e;
702
+ return (e = t.theme.sizes) == null ? void 0 : e.small;
703
+ }};
704
+ `
705
+ )}
683
706
 
684
707
  p {
685
708
  font-weight: 300;
@@ -695,16 +718,16 @@ const Pe = ({
695
718
  display: inline;
696
719
  }
697
720
  }
698
- `, dt = r(ee)`
721
+ `, $t = r(oe)`
699
722
  border-top: ${(t) => t.theme.border};
700
723
  ${(t) => t.backButtonShown === "true" && `border-bottom: ${t.theme.border};`}
701
- `, ut = r(Ce)`
724
+ `, Et = r(We)`
702
725
  ${(t) => {
703
726
  var e, a;
704
727
  return `padding: 0 ${(e = t.theme.sizes) == null ? void 0 : e.large} ${(a = t.theme.sizes) == null ? void 0 : a.large};`;
705
728
  }}
706
729
  display: block;
707
- `, ht = r.div`
730
+ `, kt = r.div`
708
731
  ${(t) => {
709
732
  var e, a;
710
733
  return `padding: calc(${(e = t.theme.sizes) == null ? void 0 : e.normal}*2) ${(a = t.theme.sizes) == null ? void 0 : a.large};`;
@@ -715,19 +738,19 @@ const Pe = ({
715
738
  border-bottom: ${(t) => t.theme.border};
716
739
  border-radius: ${(t) => `${t.theme.borderRadius} ${t.theme.borderRadius}`} 0 0;
717
740
  background-color: #ffffff;
718
- `, gt = r.div`
719
- ${De}
741
+ `, wt = r.div`
742
+ ${He}
720
743
  display: block;
721
744
  > a {
722
- ${ue}
745
+ ${pe}
723
746
  }
724
747
 
725
- ${(t) => t.accordion === "true" && O`
748
+ ${(t) => t.accordion === "true" && K`
726
749
  white-space: normal;
727
750
  box-shadow: none;
728
751
  background-color: #fafafa;
729
752
  `}
730
- `, bt = r(ve)`
753
+ `, xt = r(Me)`
731
754
  display: block;
732
755
  ${(t) => {
733
756
  var e, a;
@@ -743,9 +766,9 @@ const Pe = ({
743
766
  return (e = t.theme.colors) == null ? void 0 : e.text;
744
767
  }};
745
768
  border-top: ${(t) => t.theme.border};
746
- `, ft = r(ge)`
769
+ `, zt = r(Ee)`
747
770
  border-top: ${(t) => t.theme.border};
748
- `, yt = r(Re)`
771
+ `, Lt = r(Pe)`
749
772
  ${(t) => {
750
773
  var e, a;
751
774
  return `padding: ${(e = t.theme.sizes) == null ? void 0 : e.normal} calc(${(a = t.theme.sizes) == null ? void 0 : a.normal} * 2);`;
@@ -762,19 +785,14 @@ const Pe = ({
762
785
  span {
763
786
  font-weight: 300;
764
787
  }
765
- &:focus {
766
- ${(t) => {
767
- var e;
768
- return ((e = t.theme.accessibility) == null ? void 0 : e.isTabbing) && O`
769
- ${Te}
770
- padding: ${(a) => {
771
- var o, d;
772
- return `calc(${(o = a.theme.sizes) == null ? void 0 : o.small} / 2) ${(d = a.theme.sizes) == null ? void 0 : d.small}`;
773
- }};
774
- `;
788
+ &:focus-visible {
789
+ ${je}
790
+ padding: ${(t) => {
791
+ var e, a;
792
+ return `calc(${(e = t.theme.sizes) == null ? void 0 : e.small} / 2) ${(a = t.theme.sizes) == null ? void 0 : a.small}`;
775
793
  }};
776
794
  }
777
- `, pt = r.svg`
795
+ `, St = r.svg`
778
796
  margin-right: ${(t) => {
779
797
  var e;
780
798
  return (e = t.theme.sizes) == null ? void 0 : e.small;
@@ -787,6 +805,6 @@ const Pe = ({
787
805
  }
788
806
  `;
789
807
  export {
790
- Bt as default
808
+ Wt as default
791
809
  };
792
- //# sourceMappingURL=guide.858ab7a6.js.map
810
+ //# sourceMappingURL=guide.19e7d4a1.js.map