@telia-ace/knowledge-widget-components-related-guide-list 1.0.28-next.1 → 1.0.34-next.1

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 CHANGED
@@ -16,7 +16,7 @@ import { createReactComponent as R } from "@telia-ace/knowledge-widget-ui";
16
16
  const v = (r) => R(
17
17
  r,
18
18
  "related-guide-list",
19
- import("./related-guide-list.f7606e9c.js"),
19
+ import("./related-guide-list.7ecfd11f.js"),
20
20
  (e) => {
21
21
  const { events: t } = r.get("$widget"), [i, c] = b(t), d = (a) => {
22
22
  e.writeProperties({ loading: !0, error: void 0 }), e.actions.dispatch("fetch", { params: a });
@@ -43,34 +43,37 @@ const X = (t) => {
43
43
  } = $();
44
44
  return !s || !s.length ? j(b, r(i({}, a), {
45
45
  className: p(e, "humany-related-guide-list")
46
- })) : /* @__PURE__ */ I.createElement(J, r(i({}, a), {
47
- className: p(e, "humany-related-guide-list"),
48
- header: L,
49
- items: s,
50
- paramMappers: {
51
- guide: ({ id: x, title: B }) => z(r(i({}, v), {
52
- guide: x,
53
- uriName: A(B),
54
- connection: void 0
55
- }))
56
- },
57
- showTags: h,
58
- showFavoriteToggle: g,
59
- addFavoriteTooltip: y,
60
- removeFavoriteCancelLabel: F,
61
- removeFavoriteConfirmLabel: C,
62
- removeFavoriteHeader: T,
63
- removeFavoriteLabel: G,
64
- removeFavoriteTooltip: N,
65
- metadata: r(i({}, f), {
66
- modifiedLabel: R,
67
- publishedLabel: w,
68
- byLabel: P
69
- }),
70
- routing: {
71
- guide: c
72
- }
73
- }));
46
+ })) : /* @__PURE__ */ I.createElement(
47
+ J,
48
+ r(i({}, a), {
49
+ className: p(e, "humany-related-guide-list"),
50
+ header: L,
51
+ items: s,
52
+ paramMappers: {
53
+ guide: ({ id: x, title: B }) => z(r(i({}, v), {
54
+ guide: x,
55
+ uriName: A(B),
56
+ connection: void 0
57
+ }))
58
+ },
59
+ showTags: h,
60
+ showFavoriteToggle: g,
61
+ addFavoriteTooltip: y,
62
+ removeFavoriteCancelLabel: F,
63
+ removeFavoriteConfirmLabel: C,
64
+ removeFavoriteHeader: T,
65
+ removeFavoriteLabel: G,
66
+ removeFavoriteTooltip: N,
67
+ metadata: r(i({}, f), {
68
+ modifiedLabel: R,
69
+ publishedLabel: w,
70
+ byLabel: P
71
+ }),
72
+ routing: {
73
+ guide: c
74
+ }
75
+ })
76
+ );
74
77
  }, J = H(k)`
75
78
  ${q}
76
79
  li:last-child {
@@ -80,4 +83,4 @@ const X = (t) => {
80
83
  export {
81
84
  X as default
82
85
  };
83
- //# sourceMappingURL=related-guide-list.f7606e9c.js.map
86
+ //# sourceMappingURL=related-guide-list.7ecfd11f.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"related-guide-list.f7606e9c.js","sources":["../src/related-guide-list.tsx"],"sourcesContent":["import styled from '@emotion/styled';\nimport { Guide } from '@telia-ace/knowledge-widget-core';\nimport {\n contentBox,\n createEmptyComponent,\n GuideList,\n useContainer,\n useProperties,\n useRouteData,\n} from '@telia-ace/knowledge-widget-ui';\nimport { appendClassNames, createParams, formatUrl } from '@telia-ace/widget-utilities';\nimport React from 'react';\nimport { RelatedGuideListComponentProps } from './related-guide-list-component';\n\ntype Props = {\n className: string;\n};\n\nconst RelatedGuideList: React.FC<Props> = ({ className, ...other }) => {\n const { name, params } = useRouteData();\n const container = useContainer();\n const {\n showFavoriteToggle = false,\n items,\n header,\n metadata,\n tags,\n addFavoriteTooltip,\n removeFavoriteCancelLabel,\n removeFavoriteConfirmLabel,\n removeFavoriteHeader,\n removeFavoriteLabel,\n removeFavoriteTooltip,\n metadataByLabel,\n metadataModifiedLabel,\n metadataPublishedLabel,\n } = useProperties<RelatedGuideListComponentProps>();\n\n if (!items || !items.length) {\n return createEmptyComponent(container, {\n ...other,\n className: appendClassNames(className, 'humany-related-guide-list'),\n });\n }\n\n return (\n <StyledGuideList\n {...other}\n className={appendClassNames(className, 'humany-related-guide-list')}\n header={header}\n items={items}\n paramMappers={{\n guide: ({ id, title }: Guide) =>\n createParams({\n ...params,\n guide: id,\n uriName: formatUrl(title),\n connection: undefined,\n }),\n }}\n showTags={tags}\n showFavoriteToggle={showFavoriteToggle}\n addFavoriteTooltip={addFavoriteTooltip}\n removeFavoriteCancelLabel={removeFavoriteCancelLabel}\n removeFavoriteConfirmLabel={removeFavoriteConfirmLabel}\n removeFavoriteHeader={removeFavoriteHeader}\n removeFavoriteLabel={removeFavoriteLabel}\n removeFavoriteTooltip={removeFavoriteTooltip}\n metadata={{\n ...metadata,\n modifiedLabel: metadataModifiedLabel,\n publishedLabel: metadataPublishedLabel,\n byLabel: metadataByLabel,\n }}\n routing={{\n guide: name,\n }}\n />\n );\n};\n\nexport default RelatedGuideList;\n\nconst StyledGuideList = styled(GuideList)<any>`\n ${contentBox}\n li:last-child {\n margin: 0;\n }\n`;\n"],"names":["RelatedGuideList","_a","_b","className","other","__objRest","name","params","useRouteData","container","useContainer","showFavoriteToggle","items","header","metadata","tags","addFavoriteTooltip","removeFavoriteCancelLabel","removeFavoriteConfirmLabel","removeFavoriteHeader","removeFavoriteLabel","removeFavoriteTooltip","metadataByLabel","metadataModifiedLabel","metadataPublishedLabel","useProperties","createEmptyComponent","__spreadProps","__spreadValues","appendClassNames","React","StyledGuideList","id","title","createParams","formatUrl","styled","GuideList","contentBox"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAkBA,MAAMA,IAAoC,CAACC,MAA4B;AAA5B,MAAAC,IAAAD,GAAE,aAAAE,MAAFD,GAAgBE,IAAAC,EAAhBH,GAAgB,CAAd;AACzC,QAAM,EAAE,MAAAI,GAAM,QAAAC,EAAO,IAAIC,EAAa,GAChCC,IAAYC,KACZ;AAAA,IACF,oBAAAC,IAAqB;AAAA,IACrB,OAAAC;AAAA,IACA,QAAAC;AAAA,IACA,UAAAC;AAAA,IACA,MAAAC;AAAA,IACA,oBAAAC;AAAA,IACA,2BAAAC;AAAA,IACA,4BAAAC;AAAA,IACA,sBAAAC;AAAA,IACA,qBAAAC;AAAA,IACA,uBAAAC;AAAA,IACA,iBAAAC;AAAA,IACA,uBAAAC;AAAA,IACA,wBAAAC;AAAA,MACAC,EAA8C;AAElD,SAAI,CAACb,KAAS,CAACA,EAAM,SACVc,EAAqBjB,GAAWkB,EAAAC,EAAA,IAChCxB,IADgC;AAAA,IAEnC,WAAWyB,EAAiB1B,GAAW,2BAA2B;AAAA,EAAA,EACrE,IAIA,gBAAA2B,EAAA,cAAAC,GAAAJ,EAAAC,EAAA,IACOxB,IADP;AAAA,IAEG,WAAWyB,EAAiB1B,GAAW,2BAA2B;AAAA,IAClE,QAAAU;AAAA,IACA,OAAAD;AAAA,IACA,cAAc;AAAA,MACV,OAAO,CAAC,EAAE,IAAAoB,GAAI,OAAAC,EAAA,MACVC,EAAaP,EAAAC,EAAA,IACNrB,IADM;AAAA,QAET,OAAOyB;AAAA,QACP,SAASG,EAAUF,CAAK;AAAA,QACxB,YAAY;AAAA,MAAA,EACf;AAAA,IACT;AAAA,IACA,UAAUlB;AAAA,IACV,oBAAAJ;AAAA,IACA,oBAAAK;AAAA,IACA,2BAAAC;AAAA,IACA,4BAAAC;AAAA,IACA,sBAAAC;AAAA,IACA,qBAAAC;AAAA,IACA,uBAAAC;AAAA,IACA,UAAUM,EAAAC,EAAA,IACHd,IADG;AAAA,MAEN,eAAeS;AAAA,MACf,gBAAgBC;AAAA,MAChB,SAASF;AAAA,IACb;AAAA,IACA,SAAS;AAAA,MACL,OAAOhB;AAAA,IACX;AAAA,EAAA,EACJ;AAER,GAIMyB,IAAkBK,EAAOC,CAAS;AAAA,MAClCC;AAAA;AAAA;AAAA;AAAA;"}
1
+ {"version":3,"file":"related-guide-list.7ecfd11f.js","sources":["../src/related-guide-list.tsx"],"sourcesContent":["import styled from '@emotion/styled';\nimport { Guide } from '@telia-ace/knowledge-widget-core';\nimport {\n contentBox,\n createEmptyComponent,\n GuideList,\n useContainer,\n useProperties,\n useRouteData,\n} from '@telia-ace/knowledge-widget-ui';\nimport { appendClassNames, createParams, formatUrl } from '@telia-ace/widget-utilities';\nimport React from 'react';\nimport { RelatedGuideListComponentProps } from './related-guide-list-component';\n\ntype Props = {\n className: string;\n};\n\nconst RelatedGuideList: React.FC<Props> = ({ className, ...other }) => {\n const { name, params } = useRouteData();\n const container = useContainer();\n const {\n showFavoriteToggle = false,\n items,\n header,\n metadata,\n tags,\n addFavoriteTooltip,\n removeFavoriteCancelLabel,\n removeFavoriteConfirmLabel,\n removeFavoriteHeader,\n removeFavoriteLabel,\n removeFavoriteTooltip,\n metadataByLabel,\n metadataModifiedLabel,\n metadataPublishedLabel,\n } = useProperties<RelatedGuideListComponentProps>();\n\n if (!items || !items.length) {\n return createEmptyComponent(container, {\n ...other,\n className: appendClassNames(className, 'humany-related-guide-list'),\n });\n }\n\n return (\n <StyledGuideList\n {...other}\n className={appendClassNames(className, 'humany-related-guide-list')}\n header={header}\n items={items}\n paramMappers={{\n guide: ({ id, title }: Guide) =>\n createParams({\n ...params,\n guide: id,\n uriName: formatUrl(title),\n connection: undefined,\n }),\n }}\n showTags={tags}\n showFavoriteToggle={showFavoriteToggle}\n addFavoriteTooltip={addFavoriteTooltip}\n removeFavoriteCancelLabel={removeFavoriteCancelLabel}\n removeFavoriteConfirmLabel={removeFavoriteConfirmLabel}\n removeFavoriteHeader={removeFavoriteHeader}\n removeFavoriteLabel={removeFavoriteLabel}\n removeFavoriteTooltip={removeFavoriteTooltip}\n metadata={{\n ...metadata,\n modifiedLabel: metadataModifiedLabel,\n publishedLabel: metadataPublishedLabel,\n byLabel: metadataByLabel,\n }}\n routing={{\n guide: name,\n }}\n />\n );\n};\n\nexport default RelatedGuideList;\n\nconst StyledGuideList = styled(GuideList)<any>`\n ${contentBox}\n li:last-child {\n margin: 0;\n }\n`;\n"],"names":["RelatedGuideList","_a","_b","className","other","__objRest","name","params","useRouteData","container","useContainer","showFavoriteToggle","items","header","metadata","tags","addFavoriteTooltip","removeFavoriteCancelLabel","removeFavoriteConfirmLabel","removeFavoriteHeader","removeFavoriteLabel","removeFavoriteTooltip","metadataByLabel","metadataModifiedLabel","metadataPublishedLabel","useProperties","createEmptyComponent","__spreadProps","__spreadValues","appendClassNames","React","StyledGuideList","id","title","createParams","formatUrl","styled","GuideList","contentBox"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAkBA,MAAMA,IAAoC,CAACC,MAA4B;AAA5B,MAAAC,IAAAD,GAAE,aAAAE,MAAFD,GAAgBE,IAAAC,EAAhBH,GAAgB,CAAd;AACzC,QAAM,EAAE,MAAAI,GAAM,QAAAC,EAAO,IAAIC,EAAa,GAChCC,IAAYC,KACZ;AAAA,IACF,oBAAAC,IAAqB;AAAA,IACrB,OAAAC;AAAA,IACA,QAAAC;AAAA,IACA,UAAAC;AAAA,IACA,MAAAC;AAAA,IACA,oBAAAC;AAAA,IACA,2BAAAC;AAAA,IACA,4BAAAC;AAAA,IACA,sBAAAC;AAAA,IACA,qBAAAC;AAAA,IACA,uBAAAC;AAAA,IACA,iBAAAC;AAAA,IACA,uBAAAC;AAAA,IACA,wBAAAC;AAAA,MACAC,EAA8C;AAElD,SAAI,CAACb,KAAS,CAACA,EAAM,SACVc,EAAqBjB,GAAWkB,EAAAC,EAAA,IAChCxB,IADgC;AAAA,IAEnC,WAAWyB,EAAiB1B,GAAW,2BAA2B;AAAA,EAAA,EACrE,IAID,gBAAA2B,EAAA;AAAA,IAACC;AAAA,IAAAJ,EAAAC,EAAA,IACOxB,IADP;AAAA,MAEG,WAAWyB,EAAiB1B,GAAW,2BAA2B;AAAA,MAClE,QAAAU;AAAA,MACA,OAAAD;AAAA,MACA,cAAc;AAAA,QACV,OAAO,CAAC,EAAE,IAAAoB,GAAI,OAAAC,EAAA,MACVC,EAAaP,EAAAC,EAAA,IACNrB,IADM;AAAA,UAET,OAAOyB;AAAA,UACP,SAASG,EAAUF,CAAK;AAAA,UACxB,YAAY;AAAA,QAAA,EACf;AAAA,MACT;AAAA,MACA,UAAUlB;AAAA,MACV,oBAAAJ;AAAA,MACA,oBAAAK;AAAA,MACA,2BAAAC;AAAA,MACA,4BAAAC;AAAA,MACA,sBAAAC;AAAA,MACA,qBAAAC;AAAA,MACA,uBAAAC;AAAA,MACA,UAAUM,EAAAC,EAAA,IACHd,IADG;AAAA,QAEN,eAAeS;AAAA,QACf,gBAAgBC;AAAA,QAChB,SAASF;AAAA,MACb;AAAA,MACA,SAAS;AAAA,QACL,OAAOhB;AAAA,MACX;AAAA,IAAA;AAAA,EAAA;AAGZ,GAIMyB,IAAkBK,EAAOC,CAAS;AAAA,MAClCC;AAAA;AAAA;AAAA;AAAA;"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@telia-ace/knowledge-widget-components-related-guide-list",
3
- "version": "1.0.28-next.1",
3
+ "version": "1.0.34-next.1",
4
4
  "description": "Related guide list component for ACE Knowledge Widgets.",
5
5
  "license": "SEE LICENSE IN LICENSE.txt",
6
6
  "author": "Telia Company AB",
@@ -21,16 +21,16 @@
21
21
  },
22
22
  "sideEffects": false,
23
23
  "dependencies": {
24
- "@telia-ace/knowledge-widget-component-utilities": "^1.0.28-next.1",
25
- "@telia-ace/knowledge-widget-core": "^1.0.24-next.1",
26
- "@telia-ace/knowledge-widget-types-grid": "^1.0.35-next.1",
27
- "@telia-ace/knowledge-widget-ui": "^1.0.30-next.1",
28
- "@telia-ace/widget-utilities": "^1.0.7-next.1",
24
+ "@telia-ace/knowledge-widget-component-utilities": "^1.0.34-next.1",
25
+ "@telia-ace/knowledge-widget-core": "^1.0.30-next.1",
26
+ "@telia-ace/knowledge-widget-types-grid": "^1.0.41-next.1",
27
+ "@telia-ace/knowledge-widget-ui": "^1.0.36-next.1",
28
+ "@telia-ace/widget-utilities": "^1.0.7-next.7",
29
29
  "@webprovisions/platform": "^1.1.2"
30
30
  },
31
31
  "peerDependencies": {
32
- "@emotion/react": "^11.10.4",
33
- "@emotion/styled": "^11.10.4",
32
+ "@emotion/react": "^11.10.5",
33
+ "@emotion/styled": "^11.10.5",
34
34
  "react": "^18.2.0",
35
35
  "react-dom": "^18.2.0"
36
36
  },