@telia-ace/knowledge-widget-components-notification-list 1.0.24-next.2 → 1.0.24-next.4
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
|
@@ -1,54 +1,54 @@
|
|
|
1
|
-
var m = Object.defineProperty,
|
|
2
|
-
var
|
|
1
|
+
var m = Object.defineProperty, C = Object.defineProperties;
|
|
2
|
+
var L = Object.getOwnPropertyDescriptors;
|
|
3
3
|
var h = Object.getOwnPropertySymbols;
|
|
4
|
-
var
|
|
5
|
-
var d = (t,
|
|
6
|
-
for (var
|
|
7
|
-
|
|
4
|
+
var b = Object.prototype.hasOwnProperty, v = Object.prototype.propertyIsEnumerable;
|
|
5
|
+
var d = (t, i, e) => i in t ? m(t, i, { enumerable: !0, configurable: !0, writable: !0, value: e }) : t[i] = e, c = (t, i) => {
|
|
6
|
+
for (var e in i || (i = {}))
|
|
7
|
+
b.call(i, e) && d(t, e, i[e]);
|
|
8
8
|
if (h)
|
|
9
|
-
for (var
|
|
10
|
-
|
|
9
|
+
for (var e of h(i))
|
|
10
|
+
v.call(i, e) && d(t, e, i[e]);
|
|
11
11
|
return t;
|
|
12
|
-
}, n = (t,
|
|
13
|
-
import { createEventSubscriber as
|
|
12
|
+
}, n = (t, i) => C(t, L(i));
|
|
13
|
+
import { createEventSubscriber as y, extendComponent as w } from "@telia-ace/knowledge-widget-core";
|
|
14
14
|
import { DataType as D } from "@telia-ace/knowledge-widget-types-grid";
|
|
15
|
-
import { createReactComponent as
|
|
16
|
-
const
|
|
17
|
-
const { events:
|
|
18
|
-
return
|
|
15
|
+
import { createReactComponent as N } from "@telia-ace/knowledge-widget-ui";
|
|
16
|
+
const P = (t) => {
|
|
17
|
+
const { events: i } = t.get("$widget"), [e, u] = y(i);
|
|
18
|
+
return N(
|
|
19
19
|
t,
|
|
20
20
|
"notification-list",
|
|
21
|
-
import("./notification-list.
|
|
22
|
-
(
|
|
23
|
-
const o = (
|
|
24
|
-
|
|
21
|
+
import("./notification-list.1a27b09d.js"),
|
|
22
|
+
(r) => {
|
|
23
|
+
const o = (a) => {
|
|
24
|
+
r.writeProperties(n(c({}, r.properties()), {
|
|
25
25
|
loading: !0,
|
|
26
26
|
error: void 0,
|
|
27
27
|
notificationList: void 0
|
|
28
|
-
})),
|
|
28
|
+
})), r.actions.dispatch("fetch", { params: a });
|
|
29
29
|
};
|
|
30
|
-
|
|
31
|
-
if (
|
|
32
|
-
return
|
|
33
|
-
error:
|
|
30
|
+
r.actions.create("fetch", ({ error: a, notificationLists: s }) => {
|
|
31
|
+
if (a)
|
|
32
|
+
return r.actions.dispatch("fetched", {
|
|
33
|
+
error: a,
|
|
34
34
|
loading: !0,
|
|
35
35
|
notificationList: void 0
|
|
36
36
|
});
|
|
37
|
-
const { category: f, notificationList: p } =
|
|
37
|
+
const { category: f, notificationList: p } = r.properties(), g = {
|
|
38
38
|
notificationList: s.find((l) => l.id === f) || p
|
|
39
39
|
};
|
|
40
|
-
return
|
|
40
|
+
return r.actions.dispatch("fetched", n(c({}, g), {
|
|
41
41
|
loading: !0
|
|
42
42
|
}));
|
|
43
|
-
}),
|
|
44
|
-
const { params: s } =
|
|
43
|
+
}), r.actions.create("fetched", (a) => r.writeProperties(n(c({}, a), { loading: !1 }))), t.getAsync("router").then((a) => {
|
|
44
|
+
const { params: s } = a.getRouteData();
|
|
45
45
|
o(s);
|
|
46
|
-
}),
|
|
46
|
+
}), e("router:changed", (a, { current: s }) => {
|
|
47
47
|
o(s.routeData.params);
|
|
48
48
|
});
|
|
49
49
|
}
|
|
50
|
-
).then(() => w(t, "notification-list", (
|
|
51
|
-
|
|
50
|
+
).then(() => w(t, "notification-list", (r) => {
|
|
51
|
+
r.actions.watch("notification-list.fetch", (o, a) => t.getAsync("dataClient").then(
|
|
52
52
|
(s) => s.fetch(D.NotificationLists, {
|
|
53
53
|
categories: [
|
|
54
54
|
o.params.guideCategory,
|
|
@@ -56,14 +56,14 @@ const E = (t) => {
|
|
|
56
56
|
].filter((f) => !!f),
|
|
57
57
|
searchPhrase: o.params.phrase
|
|
58
58
|
})
|
|
59
|
-
).then(
|
|
59
|
+
).then(a).catch((s) => {
|
|
60
60
|
if (s)
|
|
61
|
-
return
|
|
61
|
+
return a(s);
|
|
62
62
|
}));
|
|
63
63
|
})).then(() => {
|
|
64
64
|
u();
|
|
65
65
|
});
|
|
66
|
-
};
|
|
66
|
+
}, E = P;
|
|
67
67
|
export {
|
|
68
68
|
E as default
|
|
69
69
|
};
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../src/notification-list-component.ts"],"sourcesContent":["import {\n createEventSubscriber,\n extendComponent,\n NotificationList,\n} from '@telia-ace/knowledge-widget-core';\nimport { DataClient, DataType, NotificationResults } from '@telia-ace/knowledge-widget-types-grid';\nimport { createReactComponent } from '@telia-ace/knowledge-widget-ui';\nimport { Container, Widget } from '@webprovisions/platform';\n\nexport type NotificationListComponentProps = {\n category?: string;\n showHeader?: boolean;\n notificationList?: NotificationList; // internal\n};\n\ntype FetchResults = NotificationResults & { error: any };\n\nexport const NotificationListComponent = (container: Container) => {\n const { events }: Widget = container.get('$widget');\n const [subscribe, unsubscribe] = createEventSubscriber(events);\n\n return createReactComponent(\n container,\n 'notification-list',\n import('./notification-list'),\n (component) => {\n const fetch = (params: { [key: string]: any }) => {\n component.writeProperties({\n ...component.properties<NotificationListComponentProps>(),\n loading: true,\n error: undefined,\n notificationList: undefined,\n });\n component.actions.dispatch('fetch', { params });\n };\n\n component.actions.create('fetch', ({ error, notificationLists }: FetchResults) => {\n if (error) {\n return component.actions.dispatch('fetched', {\n error,\n loading: true,\n notificationList: undefined,\n });\n }\n\n const { category, notificationList } =\n component.properties<NotificationListComponentProps>();\n\n const properties = {\n notificationList:\n notificationLists.find((n) => n.id === category) || notificationList,\n };\n\n return component.actions.dispatch('fetched', {\n ...properties,\n loading: true,\n });\n });\n\n component.actions.create('fetched', (input) => {\n return component.writeProperties({ ...input, loading: false });\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 )\n .then(() => {\n return extendComponent(container, 'notification-list', (component) => {\n component.actions.watch('notification-list.fetch', (input, next) => {\n return container\n .getAsync('dataClient')\n .then((dataClient: DataClient) =>\n dataClient.fetch(DataType.NotificationLists, {\n categories: [\n input.params.guideCategory,\n input.params.contactCategory,\n ].filter((c) => !!c),\n searchPhrase: input.params.phrase,\n })\n )\n .then(next)\n .catch((error) => {\n if (error) {\n return next(error);\n }\n });\n });\n });\n })\n .then(() => {\n unsubscribe();\n });\n};\n\nexport default NotificationListComponent;\n"],"names":["NotificationListComponent","container","events","subscribe","unsubscribe","createEventSubscriber","createReactComponent","component","fetch","params","__spreadProps","__spreadValues","error","notificationLists","category","notificationList","properties","n","input","router","event","current","extendComponent","next","dataClient","DataType","c"],"mappings":";;;;;;;;;;;;;;;AAiBa,MAAAA,IAA4B,CAACC,MAAyB;AAC/D,QAAM,EAAE,QAAAC,EAAmB,IAAAD,EAAU,IAAI,SAAS,GAC5C,CAACE,GAAWC,CAAW,IAAIC,EAAsBH,CAAM;AAEtD,SAAAI;AAAA,IACHL;AAAA,IACA;AAAA,IACA,OAAO;AAAA,IACP,CAACM,MAAc;AACL,YAAAC,IAAQ,CAACC,MAAmC;AAC9C,QAAAF,EAAU,gBAAgBG,EAAAC,EAAA,IACnBJ,EAAU,WAA2C,IADlC;AAAA,UAEtB,SAAS;AAAA,UACT,OAAO;AAAA,UACP,kBAAkB;AAAA,QAAA,EACrB,GACDA,EAAU,QAAQ,SAAS,SAAS,EAAE,QAAAE,EAAQ,CAAA;AAAA,MAAA;AAGlD,MAAAF,EAAU,QAAQ,OAAO,SAAS,CAAC,EAAE,OAAAK,GAAO,mBAAAC,QAAsC;AAC9E,YAAID;AACO,iBAAAL,EAAU,QAAQ,SAAS,WAAW;AAAA,YACzC,OAAAK;AAAA,YACA,SAAS;AAAA,YACT,kBAAkB;AAAA,UAAA,CACrB;AAGL,cAAM,EAAE,UAAAE,GAAU,kBAAAC,EAAiB,IAC/BR,EAAU,WAA2C,GAEnDS,IAAa;AAAA,UACf,kBACIH,EAAkB,KAAK,CAACI,MAAMA,EAAE,OAAOH,CAAQ,KAAKC;AAAA,QAAA;AAGrD,eAAAR,EAAU,QAAQ,SAAS,WAAWG,EAAAC,EAAA,IACtCK,IADsC;AAAA,UAEzC,SAAS;AAAA,QAAA,EACZ;AAAA,MAAA,CACJ,GAEDT,EAAU,QAAQ,OAAO,WAAW,CAACW,MAC1BX,EAAU,gBAAgBG,EAAAC,EAAA,IAAKO,IAAL,EAAY,SAAS,KAAO,CAChE,GAEDjB,EAAU,SAAS,QAAQ,EAAE,KAAK,CAACkB,MAAW;AAC1C,cAAM,EAAE,QAAAV,EAAA,IAAWU,EAAO,aAAa;AACvC,QAAAX,EAAMC,CAAM;AAAA,MAAA,CACf,GAEDN,EAAU,kBAAkB,CAACiB,GAAY,EAAE,SAAAC,QAAmB;AACpD,QAAAb,EAAAa,EAAQ,UAAU,MAAM;AAAA,MAAA,CACjC;AAAA,IACL;AAAA,EACJ,EACK,KAAK,MACKC,EAAgBrB,GAAW,qBAAqB,CAACM,MAAc;AAClE,IAAAA,EAAU,QAAQ,MAAM,2BAA2B,CAACW,GAAOK,MAChDtB,EACF,SAAS,YAAY,EACrB;AAAA,MAAK,CAACuB,MACHA,EAAW,MAAMC,EAAS,mBAAmB;AAAA,QACzC,YAAY;AAAA,UACRP,EAAM,OAAO;AAAA,UACbA,EAAM,OAAO;AAAA,UACf,OAAO,CAACQ,MAAM,CAAC,CAACA,CAAC;AAAA,QACnB,cAAcR,EAAM,OAAO;AAAA,MAAA,CAC9B;AAAA,MAEJ,KAAKK,CAAI,EACT,MAAM,CAACX,MAAU;AACd,UAAIA;AACA,eAAOW,EAAKX,CAAK;AAAA,IACrB,CACH,CACR;AAAA,EAAA,CACJ,CACJ,EACA,KAAK,MAAM;AACI,IAAAR;EAAA,CACf;AACT;"}
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../src/notification-list-component.ts"],"sourcesContent":["import {\n createEventSubscriber,\n extendComponent,\n NotificationList,\n} from '@telia-ace/knowledge-widget-core';\nimport { DataClient, DataType, NotificationResults } from '@telia-ace/knowledge-widget-types-grid';\nimport { createReactComponent } from '@telia-ace/knowledge-widget-ui';\nimport { Container, Widget } from '@webprovisions/platform';\n\nexport type NotificationListComponentProps = {\n category?: string;\n showHeader?: boolean;\n notificationList?: NotificationList; // internal\n};\n\ntype FetchResults = NotificationResults & { error: any };\n\nexport const NotificationListComponent = (container: Container) => {\n const { events }: Widget = container.get('$widget');\n const [subscribe, unsubscribe] = createEventSubscriber(events);\n\n return createReactComponent(\n container,\n 'notification-list',\n import('./notification-list'),\n (component) => {\n const fetch = (params: { [key: string]: any }) => {\n component.writeProperties({\n ...component.properties<NotificationListComponentProps>(),\n loading: true,\n error: undefined,\n notificationList: undefined,\n });\n component.actions.dispatch('fetch', { params });\n };\n\n component.actions.create('fetch', ({ error, notificationLists }: FetchResults) => {\n if (error) {\n return component.actions.dispatch('fetched', {\n error,\n loading: true,\n notificationList: undefined,\n });\n }\n\n const { category, notificationList } =\n component.properties<NotificationListComponentProps>();\n\n const properties = {\n notificationList:\n notificationLists.find((n) => n.id === category) || notificationList,\n };\n\n return component.actions.dispatch('fetched', {\n ...properties,\n loading: true,\n });\n });\n\n component.actions.create('fetched', (input) => {\n return component.writeProperties({ ...input, loading: false });\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 )\n .then(() => {\n return extendComponent(container, 'notification-list', (component) => {\n component.actions.watch('notification-list.fetch', (input, next) => {\n return container\n .getAsync('dataClient')\n .then((dataClient: DataClient) =>\n dataClient.fetch(DataType.NotificationLists, {\n categories: [\n input.params.guideCategory,\n input.params.contactCategory,\n ].filter((c) => !!c),\n searchPhrase: input.params.phrase,\n })\n )\n .then(next)\n .catch((error) => {\n if (error) {\n return next(error);\n }\n });\n });\n });\n })\n .then(() => {\n unsubscribe();\n });\n};\n\nexport default NotificationListComponent;\n"],"names":["NotificationListComponent","container","events","subscribe","unsubscribe","createEventSubscriber","createReactComponent","component","fetch","params","__spreadProps","__spreadValues","error","notificationLists","category","notificationList","properties","n","input","router","event","current","extendComponent","next","dataClient","DataType","c","NotificationListComponent$1"],"mappings":";;;;;;;;;;;;;;;AAiBa,MAAAA,IAA4B,CAACC,MAAyB;AAC/D,QAAM,EAAE,QAAAC,EAAmB,IAAAD,EAAU,IAAI,SAAS,GAC5C,CAACE,GAAWC,CAAW,IAAIC,EAAsBH,CAAM;AAEtD,SAAAI;AAAA,IACHL;AAAA,IACA;AAAA,IACA,OAAO;AAAA,IACP,CAACM,MAAc;AACL,YAAAC,IAAQ,CAACC,MAAmC;AAC9C,QAAAF,EAAU,gBAAgBG,EAAAC,EAAA,IACnBJ,EAAU,WAA2C,IADlC;AAAA,UAEtB,SAAS;AAAA,UACT,OAAO;AAAA,UACP,kBAAkB;AAAA,QAAA,EACrB,GACDA,EAAU,QAAQ,SAAS,SAAS,EAAE,QAAAE,EAAQ,CAAA;AAAA,MAAA;AAGlD,MAAAF,EAAU,QAAQ,OAAO,SAAS,CAAC,EAAE,OAAAK,GAAO,mBAAAC,QAAsC;AAC9E,YAAID;AACO,iBAAAL,EAAU,QAAQ,SAAS,WAAW;AAAA,YACzC,OAAAK;AAAA,YACA,SAAS;AAAA,YACT,kBAAkB;AAAA,UAAA,CACrB;AAGL,cAAM,EAAE,UAAAE,GAAU,kBAAAC,EAAiB,IAC/BR,EAAU,WAA2C,GAEnDS,IAAa;AAAA,UACf,kBACIH,EAAkB,KAAK,CAACI,MAAMA,EAAE,OAAOH,CAAQ,KAAKC;AAAA,QAAA;AAGrD,eAAAR,EAAU,QAAQ,SAAS,WAAWG,EAAAC,EAAA,IACtCK,IADsC;AAAA,UAEzC,SAAS;AAAA,QAAA,EACZ;AAAA,MAAA,CACJ,GAEDT,EAAU,QAAQ,OAAO,WAAW,CAACW,MAC1BX,EAAU,gBAAgBG,EAAAC,EAAA,IAAKO,IAAL,EAAY,SAAS,KAAO,CAChE,GAEDjB,EAAU,SAAS,QAAQ,EAAE,KAAK,CAACkB,MAAW;AAC1C,cAAM,EAAE,QAAAV,EAAA,IAAWU,EAAO,aAAa;AACvC,QAAAX,EAAMC,CAAM;AAAA,MAAA,CACf,GAEDN,EAAU,kBAAkB,CAACiB,GAAY,EAAE,SAAAC,QAAmB;AACpD,QAAAb,EAAAa,EAAQ,UAAU,MAAM;AAAA,MAAA,CACjC;AAAA,IACL;AAAA,EACJ,EACK,KAAK,MACKC,EAAgBrB,GAAW,qBAAqB,CAACM,MAAc;AAClE,IAAAA,EAAU,QAAQ,MAAM,2BAA2B,CAACW,GAAOK,MAChDtB,EACF,SAAS,YAAY,EACrB;AAAA,MAAK,CAACuB,MACHA,EAAW,MAAMC,EAAS,mBAAmB;AAAA,QACzC,YAAY;AAAA,UACRP,EAAM,OAAO;AAAA,UACbA,EAAM,OAAO;AAAA,UACf,OAAO,CAACQ,MAAM,CAAC,CAACA,CAAC;AAAA,QACnB,cAAcR,EAAM,OAAO;AAAA,MAAA,CAC9B;AAAA,MAEJ,KAAKK,CAAI,EACT,MAAM,CAACX,MAAU;AACd,UAAIA;AACA,eAAOW,EAAKX,CAAK;AAAA,IACrB,CACH,CACR;AAAA,EAAA,CACJ,CACJ,EACA,KAAK,MAAM;AACI,IAAAR;EAAA,CACf;AACT,GAEAuB,IAAe3B;"}
|
|
@@ -19,29 +19,29 @@ var l = (t, o) => {
|
|
|
19
19
|
o.indexOf(e) < 0 && p.call(t, e) && (i[e] = t[e]);
|
|
20
20
|
return i;
|
|
21
21
|
};
|
|
22
|
-
import
|
|
23
|
-
import {
|
|
24
|
-
import w from "
|
|
25
|
-
import B from "
|
|
22
|
+
import L from "@emotion/styled";
|
|
23
|
+
import { useContainer as g, useProperties as h, createEmptyComponent as x, NotificationList as E, contentBox as $ } from "@telia-ace/knowledge-widget-ui";
|
|
24
|
+
import { appendClassNames as w } from "@telia-ace/widget-utilities";
|
|
25
|
+
import B from "react";
|
|
26
26
|
const k = (i) => {
|
|
27
27
|
var e = i, { className: t } = e, o = l(e, ["className"]);
|
|
28
|
-
const d =
|
|
28
|
+
const d = g(), {
|
|
29
29
|
showHeader: u,
|
|
30
30
|
notificationList: n,
|
|
31
31
|
loading: c = !1
|
|
32
|
-
} =
|
|
33
|
-
return !(n != null && n.notifications.length) && !c ?
|
|
34
|
-
className:
|
|
35
|
-
})) : /* @__PURE__ */
|
|
32
|
+
} = h();
|
|
33
|
+
return !(n != null && n.notifications.length) && !c ? x(d, r(s({}, o), {
|
|
34
|
+
className: w(t, "humany-notification-list")
|
|
35
|
+
})) : /* @__PURE__ */ B.createElement(H, r(s({}, o), {
|
|
36
36
|
className: t,
|
|
37
37
|
notificationList: n,
|
|
38
38
|
loading: c,
|
|
39
39
|
showHeader: u
|
|
40
40
|
}));
|
|
41
|
-
}, H =
|
|
42
|
-
${
|
|
41
|
+
}, H = L(E)`
|
|
42
|
+
${(t) => $(t)}
|
|
43
43
|
`;
|
|
44
44
|
export {
|
|
45
45
|
k as default
|
|
46
46
|
};
|
|
47
|
-
//# sourceMappingURL=notification-list.
|
|
47
|
+
//# sourceMappingURL=notification-list.1a27b09d.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"notification-list.1a27b09d.js","sources":["../src/notification-list.tsx"],"sourcesContent":["import styled from '@emotion/styled';\nimport {\n contentBox,\n createEmptyComponent,\n NotificationList as NotificationListUi,\n useContainer,\n useProperties,\n} from '@telia-ace/knowledge-widget-ui';\nimport { appendClassNames } from '@telia-ace/widget-utilities';\nimport React from 'react';\nimport { NotificationListComponentProps } from './notification-list-component';\n\ntype Props = {\n className: string;\n};\n\nconst NotificationList: React.FC<Props> = ({ className, ...other }) => {\n const container = useContainer();\n const {\n showHeader,\n notificationList,\n loading = false,\n } = useProperties<NotificationListComponentProps>();\n\n if (!notificationList?.notifications.length && !loading) {\n return createEmptyComponent(container, {\n ...other,\n className: appendClassNames(className, 'humany-notification-list'),\n });\n }\n\n return (\n <StyledNotificationList\n {...other}\n className={className}\n notificationList={notificationList}\n loading={loading}\n showHeader={showHeader}\n />\n );\n};\n\nconst StyledNotificationList = styled(NotificationListUi)`\n ${(p) => contentBox(p)}\n`;\n\nexport default NotificationList;\n"],"names":["NotificationList","_a","_b","className","other","__objRest","container","useContainer","showHeader","notificationList","loading","useProperties","createEmptyComponent","__spreadProps","__spreadValues","appendClassNames","React","StyledNotificationList","styled","NotificationListUi","p","contentBox"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAgBA,MAAMA,IAAoC,CAACC,MAA4B;AAA5B,MAAAC,IAAAD,GAAE,aAAAE,MAAFD,GAAgBE,IAAAC,EAAhBH,GAAgB,CAAd;AACzC,QAAMI,IAAYC,KACZ;AAAA,IACF,YAAAC;AAAA,IACA,kBAAAC;AAAA,IACA,SAAAC,IAAU;AAAA,MACVC,EAA8C;AAElD,SAAI,EAACF,KAAA,QAAAA,EAAkB,cAAc,WAAU,CAACC,IACrCE,EAAqBN,GAAWO,EAAAC,EAAA,IAChCV,IADgC;AAAA,IAEnC,WAAWW,EAAiBZ,GAAW,0BAA0B;AAAA,EAAA,EACpE,IAIA,gBAAAa,EAAA,cAAAC,GAAAJ,EAAAC,EAAA,IACOV,IADP;AAAA,IAEG,WAAAD;AAAA,IACA,kBAAAM;AAAA,IACA,SAAAC;AAAA,IACA,YAAAF;AAAA,EAAA,EACJ;AAER,GAEMS,IAAyBC,EAAOC,CAAkB;AAAA,MAClD,CAACC,MAAMC,EAAWD,CAAC;AAAA;"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@telia-ace/knowledge-widget-components-notification-list",
|
|
3
|
-
"version": "1.0.24-next.
|
|
3
|
+
"version": "1.0.24-next.4",
|
|
4
4
|
"description": "Notification list component for ACE Knowledge Widgets.",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE.txt",
|
|
6
6
|
"author": "Telia Company AB",
|
|
@@ -33,17 +33,18 @@
|
|
|
33
33
|
"@webprovisions/platform": "^1.1.2"
|
|
34
34
|
},
|
|
35
35
|
"peerDependencies": {
|
|
36
|
+
"@emotion/react": "^11.10.4",
|
|
37
|
+
"@emotion/styled": "^11.10.4",
|
|
36
38
|
"react": "^18.2.0",
|
|
37
|
-
"react-dom": "^18.2.0"
|
|
38
|
-
"styled-components": "^5.3.6"
|
|
39
|
+
"react-dom": "^18.2.0"
|
|
39
40
|
},
|
|
40
41
|
"devDependencies": {
|
|
42
|
+
"@emotion/react": "^11.10.4",
|
|
43
|
+
"@emotion/styled": "^11.10.4",
|
|
41
44
|
"@types/react": "^18.0.21",
|
|
42
45
|
"@types/react-dom": "^18.0.6",
|
|
43
|
-
"@types/styled-components": "^5.1.26",
|
|
44
46
|
"react": "^18.2.0",
|
|
45
|
-
"react-dom": "^18.2.0"
|
|
46
|
-
"styled-components": "^5.3.6"
|
|
47
|
+
"react-dom": "^18.2.0"
|
|
47
48
|
},
|
|
48
|
-
"gitHead": "
|
|
49
|
+
"gitHead": "a56bbf9adaca1b07bf91566001480e28e81a8306"
|
|
49
50
|
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"notification-list.ba190f64.js","sources":["../src/notification-list.tsx"],"sourcesContent":["import {\n contentBox,\n createEmptyComponent,\n NotificationList as NotificationListUi,\n useContainer,\n useProperties,\n} from '@telia-ace/knowledge-widget-ui';\nimport { appendClassNames } from '@telia-ace/widget-utilities';\nimport React from 'react';\nimport styled from 'styled-components';\nimport { NotificationListComponentProps } from './notification-list-component';\n\ntype Props = {\n className: string;\n};\n\nconst NotificationList: React.FC<Props> = ({ className, ...other }) => {\n const container = useContainer();\n const {\n showHeader,\n notificationList,\n loading = false,\n } = useProperties<NotificationListComponentProps>();\n\n if (!notificationList?.notifications.length && !loading) {\n return createEmptyComponent(container, {\n ...other,\n className: appendClassNames(className, 'humany-notification-list'),\n });\n }\n\n return (\n <StyledNotificationList\n {...other}\n className={className}\n notificationList={notificationList}\n loading={loading}\n showHeader={showHeader}\n />\n );\n};\n\nconst StyledNotificationList = styled(NotificationListUi)`\n ${contentBox}\n`;\n\nexport default NotificationList;\n"],"names":["NotificationList","_a","_b","className","other","__objRest","container","useContainer","showHeader","notificationList","loading","useProperties","createEmptyComponent","__spreadProps","__spreadValues","appendClassNames","React","StyledNotificationList","styled","NotificationListUi","contentBox"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAgBA,MAAMA,IAAoC,CAACC,MAA4B;AAA5B,MAAAC,IAAAD,GAAE,aAAAE,MAAFD,GAAgBE,IAAAC,EAAhBH,GAAgB,CAAd;AACzC,QAAMI,IAAYC,KACZ;AAAA,IACF,YAAAC;AAAA,IACA,kBAAAC;AAAA,IACA,SAAAC,IAAU;AAAA,MACVC,EAA8C;AAElD,SAAI,EAACF,KAAA,QAAAA,EAAkB,cAAc,WAAU,CAACC,IACrCE,EAAqBN,GAAWO,EAAAC,EAAA,IAChCV,IADgC;AAAA,IAEnC,WAAWW,EAAiBZ,GAAW,0BAA0B;AAAA,EAAA,EACpE,IAIA,gBAAAa,EAAA,cAAAC,GAAAJ,EAAAC,EAAA,IACOV,IADP;AAAA,IAEG,WAAAD;AAAA,IACA,kBAAAM;AAAA,IACA,SAAAC;AAAA,IACA,YAAAF;AAAA,EAAA,EACJ;AAER,GAEMS,IAAyBC,EAAOC,CAAkB;AAAA,MAClDC;AAAA;"}
|