@telia-ace/knowledge-widget-bot-provider 0.0.24 → 1.1.1-rc.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/contact-method-a18f6436.mjs +896 -0
- package/contact-method-a9506b8c.js +99 -0
- package/contact-method-list-814eb03f.mjs +97 -0
- package/contact-method-list-b5815c14.js +28 -0
- package/feedback-list-04b512a4.mjs +80 -0
- package/feedback-list-e7973adc.js +25 -0
- package/index-07363705.js +1214 -0
- package/index-373df3a5.js +6 -0
- package/index-5c9c2abf.mjs +883 -0
- package/index-cc31f772.mjs +10810 -0
- package/index.js +1 -0
- package/index.mjs +7 -0
- package/no-good-alternative-2d562ff9.mjs +53 -0
- package/no-good-alternative-d31e7d52.js +15 -0
- package/notification-list-291a2001.mjs +1449 -0
- package/notification-list-876b3f3d.js +546 -0
- package/notification-list-9fca63ae.mjs +53 -0
- package/notification-list-f9c4cafe.js +8 -0
- package/package.json +20 -42
- package/styles-15c941d4.js +4 -0
- package/{dist/styles.a00306c5.js → styles-ad5c7069.mjs} +3 -4
- package/use-dispatch-951d7a5c.js +1 -0
- package/use-dispatch-97d3af39.mjs +24 -0
- package/{dist/utils.d.ts → utils.d.ts} +1 -1
- package/LICENSE.txt +0 -6
- package/README.md +0 -12
- package/dist/contact-method-list.4fcc98f1.js +0 -128
- package/dist/contact-method-list.4fcc98f1.js.map +0 -1
- package/dist/contact-method.4e96a7d4.js +0 -136
- package/dist/contact-method.4e96a7d4.js.map +0 -1
- package/dist/feedback-list.ff7e22da.js +0 -77
- package/dist/feedback-list.ff7e22da.js.map +0 -1
- package/dist/index.483ca2e8.js +0 -795
- package/dist/index.483ca2e8.js.map +0 -1
- package/dist/index.js +0 -9
- package/dist/index.js.map +0 -1
- package/dist/no-good-alternative.e9155cb9.js +0 -50
- package/dist/no-good-alternative.e9155cb9.js.map +0 -1
- package/dist/notification-list.7fd5ba2b.js +0 -67
- package/dist/notification-list.7fd5ba2b.js.map +0 -1
- package/dist/styles.a00306c5.js.map +0 -1
- /package/{dist/entry-handler.d.ts → entry-handler.d.ts} +0 -0
- /package/{dist/http-client.d.ts → http-client.d.ts} +0 -0
- /package/{dist/index.d.ts → index.d.ts} +0 -0
- /package/{dist/plugin.d.ts → plugin.d.ts} +0 -0
- /package/{dist/provider.d.ts → provider.d.ts} +0 -0
- /package/{dist/store.d.ts → store.d.ts} +0 -0
- /package/{dist/types.d.ts → types.d.ts} +0 -0
- /package/{dist/ui → ui}/contact-method-list.d.ts +0 -0
- /package/{dist/ui → ui}/contact-method.d.ts +0 -0
- /package/{dist/ui → ui}/feedback-list.d.ts +0 -0
- /package/{dist/ui → ui}/no-good-alternative.d.ts +0 -0
- /package/{dist/ui → ui}/notification-list.d.ts +0 -0
- /package/{dist/ui → ui}/styles.d.ts +0 -0
|
@@ -0,0 +1,546 @@
|
|
|
1
|
+
"use strict";const r=require("react/jsx-runtime"),o=require("./index-07363705.js"),y=require("react");require("react-dom");function C(e={}){const{phrase:t="",category:i,guideCategory:s,contactCategory:n,take:l,connectionKey:m,accordion:f,id:c,uriName:u,sorting:h,tag:d,tagId:g,tagTitle:x,...v}=e,a={};return Object.keys(v).forEach($=>{typeof e[$]=="string"&&(a[$]=e[$])}),typeof t=="string"&&t.length&&(a.phrase=t),t===null&&(a.phrase=t),typeof s=="string"&&s!=="0"&&(a.guideCategory=s),typeof s=="number"&&s!==0&&(a.guideCategory=s),typeof s=="object"&&s!==null&&(typeof s.id=="string"&&s.id!=="0"&&(a.guideCategory=s.id),typeof s.id=="number"&&s.id!==0&&(a.guideCategory=s.id)),typeof n=="string"&&n!=="0"&&(a.contactCategory=n),typeof n=="number"&&n!==0&&(a.contactCategory=n),typeof n=="object"&&n!==null&&(typeof n.id=="string"&&n.id!=="0"&&(a.contactCategory=n.id),typeof n.id=="number"&&n.id!==0&&(a.contactCategory=n.id)),typeof i=="string"&&i!=="0"&&(a.category=i),typeof i=="number"&&i!==0&&(a.category=i),typeof i=="object"&&i!==null&&(typeof i.id=="string"&&i.id!=="0"&&(a.category=i.id),typeof i.id=="number"&&i.id!==0&&(a.category=i.id)),c&&(a.id=c),u&&(+a.category||+a.guideCategory||+a.guide||+a.contactCategory||+a.contactMethod)&&(a.uriName=u),m&&(a.connectionKey=m),l&&(a.take=l),h&&(a.sorting=h),typeof f=="string"&&f.length>0&&(a.accordion=f),typeof d=="string"&&d!=="0"&&(a.tag=d),typeof d=="number"&&d!==0&&(a.tag=d),Array.isArray(d)&&d.length&&(a.tag=d),(typeof g=="string"||typeof g=="number")&&(a.tagId=g),typeof x=="string"&&(a.tagTitle=x),typeof a.tag=="string"&&(a.tag=a.tag.split(",")),a}const M=e=>{if(!e)return"";const t=[{from:/[äæǽ]+/gi,to:"ae"},{from:/[öœ]+/gi,to:"oe"},{from:/[ü]+/gi,to:"ue"},{from:/[Ä]+/gi,to:"Ae"},{from:/[Ü]+/gi,to:"Ue"},{from:/[Ö]+/gi,to:"Oe"},{from:/[ÀÁÂÃÄÅǺĀĂĄǍΑΆẢẠẦẪẨẬẰẮẴẲẶА]+/gi,to:"A"},{from:/[àáâãåǻāăąǎªαάảạầấẫẩậằắẵẳặа]+/gi,to:"a"},{from:/[Б]+/gi,to:"B"},{from:/[б]+/gi,to:"b"},{from:/[ÇĆĈĊČ]+/gi,to:"C"},{from:/[çćĉċč]+/gi,to:"c"},{from:/[Д]+/gi,to:"D"},{from:/[д]+/gi,to:"d"},{from:/[ÐĎĐΔ]+/gi,to:"Dj"},{from:/[ðďđδ]+/gi,to:"dj"},{from:/[ÈÉÊËĒĔĖĘĚΕΈẼẺẸỀẾỄỂỆЕЭ]+/gi,to:"E"},{from:/[èéêëēĕėęěέεẽẻẹềếễểệеэ]+/gi,to:"e"},{from:/[Ф]+/gi,to:"F"},{from:/[ф]+/gi,to:"f"},{from:/[ĜĞĠĢΓГҐ]+/gi,to:"G"},{from:/[ĝğġģγгґ]+/gi,to:"g"},{from:/[ĤĦ]+/gi,to:"H"},{from:/[ĥħ]+/gi,to:"h"},{from:/[ÌÍÎÏĨĪĬǏĮİΗΉΊΙΪỈỊИЫ]+/gi,to:"I"},{from:/[ìíîïĩīĭǐįıηήίιϊỉịиыї]+/gi,to:"i"},{from:/[Ĵ]+/gi,to:"J"},{from:/[ĵ]+/gi,to:"j"},{from:/[ĶΚК]+/gi,to:"K"},{from:/[ķκк]+/gi,to:"k"},{from:/[ĹĻĽĿŁΛЛ]+/gi,to:"L"},{from:/[ĺļľŀłλл]+/gi,to:"l"},{from:/[М]+/gi,to:"M"},{from:/[м]+/gi,to:"m"},{from:/[ÑŃŅŇΝН]+/gi,to:"N"},{from:/[ñńņňʼnνн]+/gi,to:"n"},{from:/[ÒÓÔÕŌŎǑŐƠØǾΟΌΩΏỎỌỒỐỖỔỘỜỚỠỞỢО]+/gi,to:"O"},{from:/[òóôõōŏǒőơøǿºοόωώỏọồốỗổộờớỡởợо]+/gi,to:"o"},{from:/[П]+/gi,to:"P"},{from:/[п]+/gi,to:"p"},{from:/[ŔŖŘΡР]+/gi,to:"R"},{from:/[ŕŗřρр]+/gi,to:"r"},{from:/[ŚŜŞȘŠΣС]+/gi,to:"S"},{from:/[śŝşșšſσςс]+/gi,to:"s"},{from:/[ȚŢŤŦτТ]+/gi,to:"T"},{from:/[țţťŧт]+/gi,to:"t"},{from:/[ÙÚÛŨŪŬŮŰŲƯǓǕǗǙǛŨỦỤỪỨỮỬỰУ]+/gi,to:"U"},{from:/[ùúûũūŭůűųưǔǖǘǚǜυύϋủụừứữửựу]+/gi,to:"u"},{from:/[ÝŸŶΥΎΫỲỸỶỴЙ]+/gi,to:"Y"},{from:/[ýÿŷỳỹỷỵй]+/gi,to:"y"},{from:/[В]+/gi,to:"V"},{from:/[в]+/gi,to:"v"},{from:/[Ŵ]+/gi,to:"W"},{from:/[ŵ]+/gi,to:"w"},{from:/[ŹŻŽΖЗ]+/gi,to:"Z"},{from:/[źżžζз]+/gi,to:"z"},{from:/[ÆǼ]+/gi,to:"AE"},{from:/[ß]+/gi,to:"ss"},{from:/[IJ]+/gi,to:"IJ"},{from:/[ij]+/gi,to:"ij"},{from:/[Œ]+/gi,to:"OE"},{from:/[ƒ]+/gi,to:"f"},{from:/[ξ]+/gi,to:"ks"},{from:/[π]+/gi,to:"p"},{from:/[β]+/gi,to:"v"},{from:/[μ]+/gi,to:"m"},{from:/[ψ]+/gi,to:"ps"},{from:/[Ё]+/gi,to:"Yo"},{from:/[ё]+/gi,to:"yo"},{from:/[Є]+/gi,to:"Ye"},{from:/[є]+/gi,to:"ye"},{from:/[Ї]+/gi,to:"Yi"},{from:/[Ж]+/gi,to:"Zh"},{from:/[ж]+/gi,to:"zh"},{from:/[Х]+/gi,to:"Kh"},{from:/[х]+/gi,to:"kh"},{from:/[Ц]+/gi,to:"Ts"},{from:/[ц]+/gi,to:"ts"},{from:/[Ч]+/gi,to:"Ch"},{from:/[ч]+/gi,to:"ch"},{from:/[Ш]+/gi,to:"Sh"},{from:/[ш]+/gi,to:"sh"},{from:/[Щ]+/gi,to:"Shch"},{from:/[щ]+/gi,to:"shch"},{from:/[ЪъЬь]+/gi,to:""},{from:/[Ю]+/gi,to:"Yu"},{from:/[ю]+/gi,to:"yu"},{from:/[Я]+/gi,to:"Ya"},{from:/[я]+/gi,to:"ya"}],i=/[^a-zA-Z0-9]+/g,s=/[-]$/;let n=e;for(const l in t)t.hasOwnProperty(l)&&t[l].from.test(e)&&(n=n.replace(t[l].from,t[l].to));return n=n.replace(i,"-"),n=n.replace(s,""),n=n.toLowerCase(),n||"humany"},le=(e,t)=>{if(!e||!t)return!0;let i=t.parentNode,s=!1;for(;i!==null;)i===e&&(s=!0),i=i.parentNode;return s},L=(e={})=>(Object.keys(e).forEach(t=>{(e[t]===null||typeof e[t]>"u")&&delete e[t]}),e),me=()=>{const[e,t]=y.useState(!1);return y.useEffect(()=>{const i=()=>{t(!1)},s=n=>{n.keyCode===9&&t(!0)};return window.addEventListener("keydown",s),window.addEventListener("click",i),()=>{window.removeEventListener("keydown",s),window.removeEventListener("click",i)}},[]),e},Y=e=>{const t=o.useContainer(),i=o.useRouter(),[s,n]=y.useState({name:"",params:{}}),l=o.useIsMounted();return y.useEffect(()=>{const m=(e||t).get("$widget");if(!m)return;const{events:f}=m;return f.subscribe("router:change",(u,{next:{routeData:h}})=>{if(l.current){const{name:d,params:g}=h;L(g),n({name:d,params:g})}})},[l,e,t]),y.useEffect(()=>{if(i&&i.history&&l.current){const m=i.getRouteData(),{name:f,params:c}=m;L(c),n({name:f,params:c})}},[i,l]),s};var B=(e=>(e.HH_MM="hh:mm",e.YYYY_MM_DD="yyyy-mm-dd",e.YYYY_MM_DD_HH_MM="yyyy-mm-dd hh:mm",e))(B||{});const q=({className:e="",format:t="hh:mm",timestamp:i})=>r.jsx("span",{className:o.appendClassNames(e,"humany-timestamp"),children:de(i,t)}),R=e=>`0${e}`.slice(-2);function de(e,t){const i=new Date(e),s=i.toTimeString().split(" ")[0].split(":"),n=s.length>1?`${s[0]}:${s[1]}`:s[0],l=i.getFullYear(),m=i.getMonth()+1,f=i.getDate(),c=`${l}-${R(m)}-${R(f)}`;return t==="yyyy-mm-dd"?c:t==="hh:mm"?n:`${c} ${n}`}const ce=({title:e="",className:t,id:i,parent:s,connection:n,type:l,target:m,href:f,children:c,connectionKey:u})=>{const h={},{name:d,params:g}=Y();switch(l){case"default":case"guide":const{id:x,title:v}=s;let a=u||n;x!==i&&!u&&(a=void 0),h.routeName=d,h.params=C({...g,guide:i,connection:a,uriName:M(i===x?v:e)});break;case"link":h.href=f,h.target=m;break}return r.jsx(o.Link,{className:o.appendClassNames(t,"humany-dialog-link"),...h,children:c||r.jsxs(r.Fragment,{children:[l==="link"&&r.jsx(o.Icon,{faIcon:"link"}),r.jsx("span",{children:e})]})})};y.forwardRef(({className:e,dialog:t,...i},s)=>t.length?r.jsx(fe,{className:o.appendClassNames(e,"humany-dialog"),items:t,renderItem:n=>r.jsx("li",{"data-dialog":n.connection,children:r.jsx(ce,{...n})},n.connection),...i,ref:s}):null);const fe=o.newStyled(o.List)`
|
|
2
|
+
${o.list}
|
|
3
|
+
a {
|
|
4
|
+
min-width: 150px;
|
|
5
|
+
max-width: 400px;
|
|
6
|
+
display: block;
|
|
7
|
+
white-space: normal;
|
|
8
|
+
${e=>{var t,i;return((t=e.theme.colors)==null?void 0:t.primary)&&o.invertedHoverButton({primaryColor:(i=e.theme.colors)==null?void 0:i.primary,secondaryColor:"#FFFFFF",theme:e.theme})}}
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
i {
|
|
12
|
+
margin: 0 ${e=>{var t;return(t=e.theme.sizes)==null?void 0:t.small}} 0 0;
|
|
13
|
+
}
|
|
14
|
+
`;o.newStyled(o.ItemList)`
|
|
15
|
+
${o.itemList}
|
|
16
|
+
font-family: ${e=>{var t;return(t=e.theme.fonts)==null?void 0:t.type}};
|
|
17
|
+
padding: ${e=>{var t;return(t=e.theme.sizes)==null?void 0:t.medium}};
|
|
18
|
+
> ul > li {
|
|
19
|
+
overflow: visible;
|
|
20
|
+
font-weight: 300;
|
|
21
|
+
font-size: ${e=>{var t;return(t=e.theme.fonts)==null?void 0:t.normal}};
|
|
22
|
+
}
|
|
23
|
+
`;o.newStyled.div`
|
|
24
|
+
background: #fff;
|
|
25
|
+
border: #ccc 1px solid;
|
|
26
|
+
box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.1);
|
|
27
|
+
font-family: ${e=>{var t;return(t=e.theme.fonts)==null?void 0:t.type}};
|
|
28
|
+
font-size: ${e=>{var t;return(t=e.theme.fonts)==null?void 0:t.normal}};
|
|
29
|
+
`;o.newStyled.div`
|
|
30
|
+
padding: ${e=>{var t;return(t=e.theme.sizes)==null?void 0:t.normal}};
|
|
31
|
+
padding-bottom: 0;
|
|
32
|
+
font-size: ${e=>{var t;return(t=e.theme.fonts)==null?void 0:t.normal}};
|
|
33
|
+
font-weight: normal;
|
|
34
|
+
white-space: nowrap;
|
|
35
|
+
display: flex;
|
|
36
|
+
align-items: center;
|
|
37
|
+
|
|
38
|
+
h1,
|
|
39
|
+
h2,
|
|
40
|
+
h3,
|
|
41
|
+
h4,
|
|
42
|
+
h5,
|
|
43
|
+
h6 {
|
|
44
|
+
margin: 0;
|
|
45
|
+
font-weight: normal;
|
|
46
|
+
padding-bottom: 0;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
svg,
|
|
50
|
+
i {
|
|
51
|
+
margin-right: ${e=>{var t;return(t=e.theme.sizes)==null?void 0:t.small}};
|
|
52
|
+
}
|
|
53
|
+
`;o.newStyled(o.List)`
|
|
54
|
+
list-style: none;
|
|
55
|
+
padding: 0;
|
|
56
|
+
margin: 0;
|
|
57
|
+
padding: ${e=>{var t;return(t=e.theme.sizes)==null?void 0:t.small}} 0;
|
|
58
|
+
|
|
59
|
+
li {
|
|
60
|
+
background: #fff;
|
|
61
|
+
|
|
62
|
+
a {
|
|
63
|
+
display: block;
|
|
64
|
+
font-size: ${e=>{var t;return(t=e.theme.fonts)==null?void 0:t.small}};
|
|
65
|
+
padding: ${e=>{var t,i;return`${(t=e.theme.sizes)==null?void 0:t.small} ${(i=e.theme.sizes)==null?void 0:i.normal}`}};
|
|
66
|
+
cursor: pointer;
|
|
67
|
+
color: #555;
|
|
68
|
+
text-decoration: none;
|
|
69
|
+
|
|
70
|
+
&:hover {
|
|
71
|
+
background: #f9f9f9;
|
|
72
|
+
color: ${e=>{var t;return(t=e.theme.colors)==null?void 0:t.primary}};
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
`;o.newStyled(o.ItemList)`
|
|
77
|
+
${o.itemList}
|
|
78
|
+
font-family: ${e=>{var t;return(t=e.theme.fonts)==null?void 0:t.type}};
|
|
79
|
+
> div {
|
|
80
|
+
${e=>{var t;return o.headingElement(e)("> h1",o.css`
|
|
81
|
+
font-size: ${(t=e.theme.fonts)==null?void 0:t.normal};
|
|
82
|
+
line-height: 1.2em;
|
|
83
|
+
`)}}
|
|
84
|
+
}
|
|
85
|
+
> ul > li {
|
|
86
|
+
overflow: visible;
|
|
87
|
+
font-weight: 300;
|
|
88
|
+
font-size: ${e=>{var t;return(t=e.theme.fonts)==null?void 0:t.normal}};
|
|
89
|
+
|
|
90
|
+
a {
|
|
91
|
+
display: inline-block;
|
|
92
|
+
|
|
93
|
+
@media (hover: hover) {
|
|
94
|
+
&:hover {
|
|
95
|
+
text-decoration: underline;
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
`;const ge=e=>o.css`
|
|
101
|
+
${e["data-loading"]&&"position: relative;"};
|
|
102
|
+
${e["data-loading"]&&"min-height: 150px;"}
|
|
103
|
+
> * {
|
|
104
|
+
transition: 200ms ease-out opacity;
|
|
105
|
+
opacity: ${e["data-loading"]?"0.5":"1"};
|
|
106
|
+
}
|
|
107
|
+
.humany-loader {
|
|
108
|
+
opacity: ${e["data-loading"]?"1":"0"};
|
|
109
|
+
}
|
|
110
|
+
`;o.newStyled(o.Icon)`
|
|
111
|
+
&& {
|
|
112
|
+
font-size: ${e=>{var t;return(t=e.theme.fonts)==null?void 0:t.small}};
|
|
113
|
+
}
|
|
114
|
+
width: 1.2em;
|
|
115
|
+
`;o.newStyled(o.Text)`
|
|
116
|
+
font-size: ${e=>{var t;return(t=e.theme.fonts)==null?void 0:t.medium}};
|
|
117
|
+
font-weight: normal;
|
|
118
|
+
line-height: 1.2em;
|
|
119
|
+
color: ${e=>{var t;return(t=e.theme.colors)==null?void 0:t.text}};
|
|
120
|
+
`;const he=o.newStyled(o.Button)`
|
|
121
|
+
display: flex;
|
|
122
|
+
align-items: center;
|
|
123
|
+
|
|
124
|
+
${e=>{var t;return e["data-has-label"]==="true"&&e["data-has-symbol"]==="true"&&`
|
|
125
|
+
svg, i {
|
|
126
|
+
margin: 0 ${(t=e.theme.sizes)==null?void 0:t.small} 0 0;
|
|
127
|
+
}
|
|
128
|
+
`}}
|
|
129
|
+
|
|
130
|
+
&:focus-visible {
|
|
131
|
+
${e=>e["data-has-label"]==="true"&&o.paddedBorderTabStyle}
|
|
132
|
+
|
|
133
|
+
svg, i {
|
|
134
|
+
${e=>e["data-has-label"]==="false"&&e["data-has-symbol"]==="true"&&o.css`
|
|
135
|
+
${o.paddedBorderTabStyle(e)}
|
|
136
|
+
box-sizing: content-box;
|
|
137
|
+
`}
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
span {
|
|
142
|
+
flex: 1;
|
|
143
|
+
font-weight: 300;
|
|
144
|
+
}
|
|
145
|
+
`,ue=({addFavoriteTooltip:e,removeFavoriteCancelLabel:t,removeFavoriteConfirmLabel:i,removeFavoriteHeader:s,removeFavoriteLabel:n,removeFavoriteTooltip:l,id:m,isFavorite:f,guideTitle:c,buttonLabel:u="",actions:{addFavorite:h,removeFavorite:d}})=>{const g=y.useCallback(()=>{d(m)},[m,d]),x=y.useCallback(()=>{h(m)},[m,h]),v=`${f?l:e}${c?`: "${c}"`:""}`;return f?r.jsx(o.Confirm,{trigger:r.jsxs(P,{className:"humany-favorite-button",title:v,"aria-label":v,"data-favorite":"true","data-has-label":u?"true":"false","data-has-symbol":"true",children:[r.jsx(o.SymbolBadge,{size:16,symbol:{type:"Svg",content:"star-empty"}}),u&&r.jsx(o.StyledText,{children:u})]}),onConfirm:g,cancelLabel:t,confirmLabel:i,header:s,text:n}):r.jsxs(P,{className:"humany-favorite-button",title:v,"aria-label":v,onClick:x,"data-favorite":"false","data-has-label":u?"true":"false","data-has-symbol":"true",children:[r.jsx(o.SymbolBadge,{size:16,symbol:{type:"Svg",content:"star-empty"}}),u&&r.jsx(o.StyledText,{children:u})]})},P=o.newStyled(he)`
|
|
146
|
+
grid-area: favorite;
|
|
147
|
+
|
|
148
|
+
&:focus-visible {
|
|
149
|
+
svg {
|
|
150
|
+
${e=>{var t,i;return e["data-favorite"]==="true"?`
|
|
151
|
+
fill: transparent;
|
|
152
|
+
|
|
153
|
+
path {
|
|
154
|
+
fill: transparent;
|
|
155
|
+
}
|
|
156
|
+
`:`
|
|
157
|
+
fill: ${(t=e.theme.colors)==null?void 0:t.text};
|
|
158
|
+
|
|
159
|
+
path {
|
|
160
|
+
fill: ${(i=e.theme.colors)==null?void 0:i.text};
|
|
161
|
+
}
|
|
162
|
+
`}}
|
|
163
|
+
}
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
${e=>{var t,i,s,n,l,m,f;return((t=e.theme.colors)==null?void 0:t.text)&&o.css`
|
|
167
|
+
svg {
|
|
168
|
+
stroke: ${(i=e.theme.colors)==null?void 0:i.text};
|
|
169
|
+
|
|
170
|
+
path {
|
|
171
|
+
stroke: ${(s=e.theme.colors)==null?void 0:s.text};
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
${e["data-favorite"]==="true"&&`
|
|
175
|
+
fill: ${(n=e.theme.colors)==null?void 0:n.text};
|
|
176
|
+
|
|
177
|
+
path {
|
|
178
|
+
fill: ${(l=e.theme.colors)==null?void 0:l.text};
|
|
179
|
+
}
|
|
180
|
+
`};
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
&:hover {
|
|
184
|
+
svg {
|
|
185
|
+
${e["data-favorite"]==="true"?`
|
|
186
|
+
fill: transparent;
|
|
187
|
+
|
|
188
|
+
path {
|
|
189
|
+
fill: transparent;
|
|
190
|
+
}
|
|
191
|
+
`:`
|
|
192
|
+
fill: ${(m=e.theme.colors)==null?void 0:m.text};
|
|
193
|
+
|
|
194
|
+
path {
|
|
195
|
+
fill: ${(f=e.theme.colors)==null?void 0:f.text};
|
|
196
|
+
}
|
|
197
|
+
`};
|
|
198
|
+
}
|
|
199
|
+
}
|
|
200
|
+
`}}
|
|
201
|
+
`;y.forwardRef(({onFeedback:e=()=>{},direction:t="horizontal",className:i,header:s,positive:n,negative:l,selected:m,...f},c)=>r.jsxs(pe,{className:o.appendClassNames(i,"humany-feedback"),"data-direction":t,...o.convertToStringAttributes(f),ref:c,children:[!!s&&r.jsx(ye,{children:s}),r.jsxs(O,{className:"humany-feedback-button",disabled:!!m,"data-selected":m==="positive","data-direction":t,onClick:()=>e("positive"),children:[r.jsx(o.Icon,{faIcon:"smile-o"}),r.jsx("span",{children:n})]}),r.jsxs(O,{className:"humany-feedback-button",disabled:!!m,"data-selected":m==="negative","data-direction":t,onClick:()=>e("negative"),children:[r.jsx(o.Icon,{faIcon:"frown-o"}),r.jsx("span",{children:l})]})]}));const ye=o.newStyled(o.StyledText)`
|
|
202
|
+
font-weight: normal;
|
|
203
|
+
margin: 0 0 ${e=>{var t;return(t=e.theme.sizes)==null?void 0:t.normal}};
|
|
204
|
+
font-size: ${e=>{var t;return(t=e.theme.fonts)==null?void 0:t.normal}};
|
|
205
|
+
display: block;
|
|
206
|
+
`,O=o.newStyled(o.Button)`
|
|
207
|
+
display: inline-block;
|
|
208
|
+
font-size: ${e=>{var t;return(t=e.theme.fonts)==null?void 0:t.normal}};
|
|
209
|
+
font-weight: 300;
|
|
210
|
+
&& {
|
|
211
|
+
margin-right: ${e=>{var t;return(t=e.theme.sizes)==null?void 0:t.large}};
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
${e=>{var t,i;return e["data-direction"]==="horizontal"&&o.css`
|
|
215
|
+
width: 225px;
|
|
216
|
+
max-width: calc(50% - ${(t=e.theme.sizes)==null?void 0:t.large} - ${(i=e.theme.sizes)==null?void 0:i.small});
|
|
217
|
+
`}}
|
|
218
|
+
|
|
219
|
+
${e=>e["data-direction"]==="vertical"&&o.css`
|
|
220
|
+
min-width: 190px;
|
|
221
|
+
`}
|
|
222
|
+
|
|
223
|
+
${e=>{var t,i;return((t=e.theme.colors)==null?void 0:t.primary)&&o.invertedHoverButton({active:e["data-selected"],primaryColor:(i=e.theme.colors)==null?void 0:i.primary,secondaryColor:"#FFFFFF",theme:e.theme})}}
|
|
224
|
+
|
|
225
|
+
i {
|
|
226
|
+
margin: 0 ${e=>{var t;return(t=e.theme.sizes)==null?void 0:t.small}} 0 0;
|
|
227
|
+
}
|
|
228
|
+
`,pe=o.newStyled.div`
|
|
229
|
+
${e=>{var t;return e["data-direction"]==="vertical"&&o.css`
|
|
230
|
+
> button {
|
|
231
|
+
width: 100%;
|
|
232
|
+
&:not(:last-child) {
|
|
233
|
+
margin-bottom: ${(t=e.theme.sizes)==null?void 0:t.normal};
|
|
234
|
+
}
|
|
235
|
+
}
|
|
236
|
+
`}}
|
|
237
|
+
`,xe=()=>{const e=o.useContainer(),[t,i]=y.useState([]),s=e.get("favorites");y.useEffect(()=>{if(s){i(s.get());const{events:c}=e.get("$widget");return c.subscribe("widget:favorites-updated",(h,{updated:d})=>{i([...d])})}},[]);const n=c=>s?s.add(c):Promise.resolve([]),l=c=>s?s.remove(c):Promise.resolve([]),m=()=>s?s.clear():Promise.resolve([]),f=y.useCallback(c=>t.indexOf(c)>-1?l(c):n(c),[t]);return[t,y.useMemo(()=>({addFavorite:n,removeFavorite:l,clearFavorites:m,toggleFavorite:f}),[t])]},ve=({format:e=B.YYYY_MM_DD_HH_MM,className:t="",byLabel:i="",modifiedLabel:s="",publishedLabel:n="",modifiedBy:l="",publishedBy:m="",showModified:f=!1,showPublished:c=!1,modified:u,published:h})=>{const d=c&&h?r.jsx(_,{format:e,timestamp:h}):null,g=f&&u?r.jsx(_,{format:e,timestamp:u}):null;return!d&&!g?null:r.jsxs(E,{className:o.appendClassNames(t,"humany-metadata"),children:[d&&r.jsxs(E,{className:"humany-published",children:[n,d,i&&m&&` ${i.replace("{{editor}}",m)}`]}),g&&r.jsxs(E,{className:"humany-modified",children:[d&&", ",s,g,i&&l&&` ${i.replace("{{editor}}",l)}`]})]})},_=o.newStyled(q)`
|
|
238
|
+
&:not(:first-child) {
|
|
239
|
+
margin-left: 4px;
|
|
240
|
+
}
|
|
241
|
+
&:not(:last-child) {
|
|
242
|
+
margin-right: 4px;
|
|
243
|
+
}
|
|
244
|
+
`,E=o.newStyled(o.Text)`
|
|
245
|
+
font-style: italic;
|
|
246
|
+
`,$e=({tags:e})=>e.filter(t=>t.symbol).length?r.jsx(Se,{className:"humany-guide-list-tags",items:e,renderItem:({id:t,symbol:i,title:s})=>i&&r.jsx("li",{"data-tag":t,children:r.jsx(ke,{size:18,symbol:i,title:s})},t)}):null;y.forwardRef(({title:e,id:t,route:i,symbolSize:s,collapseUri:n,children:l},m)=>{const{params:f}=Y();return r.jsxs(be,{ref:m,"data-guide":t,children:[r.jsx(o.TextLink,{title:e,"aria-label":e,routeName:i,params:C({...f,uriName:n||void 0,id:void 0,guide:void 0,accordion:void 0}),text:e,children:r.jsx(o.SymbolBadge,{size:s,symbol:{type:"Svg",content:"caret-up"}})}),l]})});const be=o.newStyled.li`
|
|
247
|
+
> a {
|
|
248
|
+
grid-column: 1/-1;
|
|
249
|
+
font-weight: bold;
|
|
250
|
+
margin: 0 0 ${e=>{var t;return(t=e.theme.sizes)==null?void 0:t.normal}} 0;
|
|
251
|
+
}
|
|
252
|
+
|
|
253
|
+
> div {
|
|
254
|
+
grid-column: 1/-1;
|
|
255
|
+
}
|
|
256
|
+
`;y.forwardRef(({expandable:e=!1,routing:t={},paramMappers:i={},symbolSize:s=11,pageRole:n="link",pageCaret:l="down",showTags:m=!1,showFavoriteToggle:f=!1,localPaging:c=!1,onItemClick:u=()=>{},dispatch:h=()=>{},metadata:d={},pageLabel:g,className:x,children:v,items:a,renderItem:$,addFavoriteTooltip:U,removeFavoriteCancelLabel:V,removeFavoriteConfirmLabel:K,removeFavoriteHeader:W,removeFavoriteLabel:Z,removeFavoriteTooltip:G,...J},Q)=>{const F=me(),k=y.useRef(),j=o.usePrevious(a),{guide:X="guide",page:ee="index"}=t,{guide:te=({id:p})=>C({guide:p}),page:A=()=>C()}=i,[oe,ie]=xe();y.useImperativeHandle(Q,()=>k.current);const I=p=>{const{id:w,title:b,tags:S,published:N,modified:z,publishedBy:T,modifiedBy:D}=p;return r.jsxs("li",{"data-guide":w,"has-metadata":(!!(d!=null&&d.showPublished)&&!!N||!!(d!=null&&d.showModified)&&!!z).toString(),children:[r.jsx(o.TextLink,{className:"humany-guide-link",title:b,"aria-label":b,routeName:X,onClick:ae=>u(ae,p),params:te(p),text:b,children:r.jsx(o.SymbolBadge,{size:s,symbol:{type:"Svg",content:e?"caret-down":"caret-right"}})}),f&&r.jsx(ue,{guideTitle:b,addFavoriteTooltip:U,removeFavoriteCancelLabel:V,removeFavoriteConfirmLabel:K,removeFavoriteHeader:W,removeFavoriteLabel:Z,removeFavoriteTooltip:G,isFavorite:oe.indexOf(w)>-1,actions:ie,id:w}),m&&r.jsx($e,{tags:S}),r.jsx(je,{...d,indent:e?void 0:s,modified:z,published:N,publishedBy:T,modifiedBy:D})]},w)},se=y.useCallback((p,w,b)=>$?$(p,w,b,I):I(p),[$,I]),re=y.useCallback(p=>{c&&(p.preventDefault(),h("page",A()))},[h,c]);y.useEffect(()=>{if(j&&j.length<a.length&&k.current){const p=k.current.querySelectorAll(".humany-guide-list > ul > li"),w=p[j.length];if(p.length===a.length&&j.length){const b=p[j.length];if(b){const S=b.querySelector(".humany-guide-link");S&&S.focus()}}else w&&new MutationObserver((S,N)=>{S.forEach(z=>{if(z.addedNodes){const T=Array.from(z.addedNodes).find(D=>D.tagName==="A");T&&le(k.current,document.activeElement)&&(F&&T.focus(),N.disconnect())}})}).observe(w,{attributes:!1,characterData:!1,childList:!0,subtree:!0,attributeOldValue:!1,characterDataOldValue:!1})}});const ne=!!Object.keys(d).filter(p=>typeof d[p]<"u").length;return r.jsxs(we,{className:o.appendClassNames(x,"humany-guide-list"),"data-item-count":a.length,items:a,renderItem:se,isTabbing:F,expandable:e?"true":"false","grid-items":m||f||ne?"true":"false",...o.convertToStringAttributes(J),ref:k,children:[g?r.jsx(o.TextLink,{text:g,title:g,"aria-label":g,routeName:ee,role:n,params:A(),onClick:re,children:r.jsx(o.SymbolBadge,{size:s,symbol:{type:"Svg",content:`caret-${l}`}})}):null,v]})});const we=o.newStyled(o.ItemList)`
|
|
257
|
+
${o.itemList}
|
|
258
|
+
padding: ${e=>{var t;return(t=e.theme.sizes)==null?void 0:t.large}};
|
|
259
|
+
overflow: auto;
|
|
260
|
+
justify-content: flex-start;
|
|
261
|
+
white-space: nowrap;
|
|
262
|
+
font-weight: 300;
|
|
263
|
+
text-decoration: none;
|
|
264
|
+
|
|
265
|
+
> div {
|
|
266
|
+
${e=>o.headingElement(e)("> h1",o.css`
|
|
267
|
+
white-space: pre-wrap;
|
|
268
|
+
`)}
|
|
269
|
+
}
|
|
270
|
+
|
|
271
|
+
> ul > li {
|
|
272
|
+
${e=>{var t,i;return e["grid-items"]==="true"&&o.css`
|
|
273
|
+
display: grid;
|
|
274
|
+
grid-template-columns: auto 1fr 1fr;
|
|
275
|
+
gap: 0px 0px;
|
|
276
|
+
grid-template-areas: '. favorite tags';
|
|
277
|
+
align-items: center;
|
|
278
|
+
|
|
279
|
+
> button {
|
|
280
|
+
margin: 0 0 0 ${(t=e.theme.sizes)==null?void 0:t.small};
|
|
281
|
+
|
|
282
|
+
&[data-favorite='false'] {
|
|
283
|
+
${e.isTabbing?"opacity: 0;":"display: none;"};
|
|
284
|
+
&:focus {
|
|
285
|
+
opacity: 1;
|
|
286
|
+
}
|
|
287
|
+
}
|
|
288
|
+
}
|
|
289
|
+
|
|
290
|
+
> span {
|
|
291
|
+
font-size: ${(i=e.theme.fonts)==null?void 0:i.small};
|
|
292
|
+
}
|
|
293
|
+
|
|
294
|
+
&:hover {
|
|
295
|
+
button[data-favorite='false'] {
|
|
296
|
+
display: flex;
|
|
297
|
+
justify-self: flex-start;
|
|
298
|
+
}
|
|
299
|
+
}
|
|
300
|
+
|
|
301
|
+
&[has-metadata='true'] {
|
|
302
|
+
grid-template-rows: 1fr 1fr;
|
|
303
|
+
grid-template-areas:
|
|
304
|
+
'. favorite tags'
|
|
305
|
+
'metadata metadata metadata';
|
|
306
|
+
}
|
|
307
|
+
`}}
|
|
308
|
+
> a {
|
|
309
|
+
color: ${e=>{var t;return(t=e.theme.colors)==null?void 0:t.primary}};
|
|
310
|
+
overflow: hidden;
|
|
311
|
+
text-overflow: ellipsis;
|
|
312
|
+
max-width: 100%;
|
|
313
|
+
display: inline-block;
|
|
314
|
+
|
|
315
|
+
svg {
|
|
316
|
+
margin: 0 calc(${e=>{var t;return(t=e.theme.sizes)==null?void 0:t.small}}*2) 0 0;
|
|
317
|
+
line {
|
|
318
|
+
stroke: ${e=>{var t;return(t=e.theme.colors)==null?void 0:t.primary}};
|
|
319
|
+
}
|
|
320
|
+
}
|
|
321
|
+
|
|
322
|
+
${e=>{var t;return e.expandable==="true"&&o.css`
|
|
323
|
+
display: flex;
|
|
324
|
+
flex-direction: row-reverse;
|
|
325
|
+
justify-content: flex-end;
|
|
326
|
+
align-items: center;
|
|
327
|
+
|
|
328
|
+
span {
|
|
329
|
+
overflow: hidden;
|
|
330
|
+
text-overflow: ellipsis;
|
|
331
|
+
}
|
|
332
|
+
|
|
333
|
+
svg {
|
|
334
|
+
margin: 0 0 0 ${(t=e.theme.sizes)==null?void 0:t.small};
|
|
335
|
+
}
|
|
336
|
+
`}}
|
|
337
|
+
|
|
338
|
+
&:focus-visible {
|
|
339
|
+
${o.borderTabStyle}
|
|
340
|
+
text-decoration: underline;
|
|
341
|
+
}
|
|
342
|
+
|
|
343
|
+
@media (hover: hover) {
|
|
344
|
+
&:hover {
|
|
345
|
+
text-decoration: underline;
|
|
346
|
+
}
|
|
347
|
+
}
|
|
348
|
+
}
|
|
349
|
+
}
|
|
350
|
+
|
|
351
|
+
> a {
|
|
352
|
+
color: ${e=>{var t;return(t=e.theme.colors)==null?void 0:t.text}};
|
|
353
|
+
margin: ${e=>{var t;return(t=e.theme.sizes)==null?void 0:t.normal}} 0 0;
|
|
354
|
+
align-self: flex-start;
|
|
355
|
+
align-items: center;
|
|
356
|
+
display: flex;
|
|
357
|
+
|
|
358
|
+
span {
|
|
359
|
+
text-decoration: underline;
|
|
360
|
+
}
|
|
361
|
+
|
|
362
|
+
svg {
|
|
363
|
+
margin: 0 calc(${e=>{var t;return(t=e.theme.sizes)==null?void 0:t.small}}*2) 0 0;
|
|
364
|
+
line {
|
|
365
|
+
stroke: ${e=>{var t;return(t=e.theme.colors)==null?void 0:t.text}};
|
|
366
|
+
}
|
|
367
|
+
}
|
|
368
|
+
|
|
369
|
+
&:focus-visible {
|
|
370
|
+
${o.borderTabStyle}
|
|
371
|
+
text-decoration: underline;
|
|
372
|
+
}
|
|
373
|
+
}
|
|
374
|
+
`,Se=o.newStyled(o.List)`
|
|
375
|
+
${o.list}
|
|
376
|
+
display: flex;
|
|
377
|
+
margin: 0 0 0 auto;
|
|
378
|
+
grid-area: tags;
|
|
379
|
+
|
|
380
|
+
li,
|
|
381
|
+
li:last-child {
|
|
382
|
+
margin: 0 0 0 ${e=>{var t;return(t=e.theme.sizes)==null?void 0:t.small}};
|
|
383
|
+
display: flex;
|
|
384
|
+
align-items: center;
|
|
385
|
+
justify-content: space-between;
|
|
386
|
+
}
|
|
387
|
+
`,ke=o.newStyled(o.SymbolBadge)`
|
|
388
|
+
display: block;
|
|
389
|
+
color: ${e=>{var t;return(t=e.theme.colors)==null?void 0:t.primary}};
|
|
390
|
+
${e=>{if(e.symbol.type==="Uri")return`
|
|
391
|
+
width: ${e.size}px;
|
|
392
|
+
height: ${e.size}px;
|
|
393
|
+
`;if(e.symbol.type==="FontAwesome")return`
|
|
394
|
+
font-size: ${e.size}px;
|
|
395
|
+
`}}
|
|
396
|
+
`,je=o.newStyled(ve)`
|
|
397
|
+
grid-area: metadata;
|
|
398
|
+
text-overflow: ellipsis;
|
|
399
|
+
overflow: hidden;
|
|
400
|
+
font-size: ${e=>{var t;return(t=e.theme.fonts)==null?void 0:t.small}};
|
|
401
|
+
${e=>{var t;return typeof e.indent=="number"&&`text-indent: calc(${(t=e.theme.sizes)==null?void 0:t.small} * 2 + ${e.indent}px);`}}
|
|
402
|
+
`,ze=o.keyframes`
|
|
403
|
+
100% {
|
|
404
|
+
transform: rotate(360deg);
|
|
405
|
+
}
|
|
406
|
+
`,Ce=o.keyframes`
|
|
407
|
+
0% {
|
|
408
|
+
stroke-dasharray: 1, 200;
|
|
409
|
+
stroke-dashoffset: 0;
|
|
410
|
+
}
|
|
411
|
+
50% {
|
|
412
|
+
stroke-dasharray: 89, 200;
|
|
413
|
+
stroke-dashoffset: -35px;
|
|
414
|
+
}
|
|
415
|
+
100% {
|
|
416
|
+
stroke-dasharray: 89, 200;
|
|
417
|
+
stroke-dashoffset: -124px;
|
|
418
|
+
}
|
|
419
|
+
`,Ne=o.newStyled.svg`
|
|
420
|
+
animation: ${ze} 2s linear infinite;
|
|
421
|
+
height: 100%;
|
|
422
|
+
transform-origin: center center;
|
|
423
|
+
width: 100%;
|
|
424
|
+
position: absolute;
|
|
425
|
+
top: 0;
|
|
426
|
+
bottom: 0;
|
|
427
|
+
left: 0;
|
|
428
|
+
right: 0;
|
|
429
|
+
margin: auto;
|
|
430
|
+
transition: 200ms ease-out opacity;
|
|
431
|
+
`,Te=o.newStyled.div`
|
|
432
|
+
position: absolute;
|
|
433
|
+
top: 0;
|
|
434
|
+
bottom: 0;
|
|
435
|
+
left: 0;
|
|
436
|
+
right: 0;
|
|
437
|
+
height: 100%;
|
|
438
|
+
width: 100%;
|
|
439
|
+
pointer-events: ${e=>e["data-loading"]?"all":"none"};
|
|
440
|
+
display: flex;
|
|
441
|
+
flex-direction: column;
|
|
442
|
+
justify-content: center;
|
|
443
|
+
transition: 200ms ease-out opacity;
|
|
444
|
+
box-sizing: border-box;
|
|
445
|
+
overflow: hidden;
|
|
446
|
+
|
|
447
|
+
.humany-spinner-svg {
|
|
448
|
+
opacity: ${e=>e["data-loading"]?"1":"0"};
|
|
449
|
+
}
|
|
450
|
+
`,Ie=o.newStyled.div`
|
|
451
|
+
position: relative;
|
|
452
|
+
margin: 0 auto;
|
|
453
|
+
width: 100px;
|
|
454
|
+
&:before {
|
|
455
|
+
content: '';
|
|
456
|
+
display: block;
|
|
457
|
+
padding-top: 100%;
|
|
458
|
+
}
|
|
459
|
+
`,De=o.newStyled.circle`
|
|
460
|
+
stroke-dasharray: 1, 200;
|
|
461
|
+
stroke-dashoffset: 0;
|
|
462
|
+
animation: ${Ce} 1.5s ease-in-out infinite;
|
|
463
|
+
stroke-linecap: round;
|
|
464
|
+
stroke: ${e=>{var t;return(t=e.theme.colors)==null?void 0:t.primary}};
|
|
465
|
+
stroke-width: 2px;
|
|
466
|
+
`,Ee=({loading:e=!1})=>r.jsx(Te,{className:"humany-loader","data-loading":e,children:r.jsx(Ie,{className:"humany-spinner",children:r.jsx(Ne,{className:"humany-spinner-svg",viewBox:"25 25 50 50",children:r.jsx(De,{cx:"50",cy:"50",r:"20",fill:"none","stroke-width":"2","stroke-miterlimit":"10"})})})}),Me=({className:e,showHeader:t,notificationList:i,loading:s,...n})=>{const[l,m]=y.useState(null),{id:f,title:c,symbol:u,notifications:h=[],defaultHeaderOptions:d={visible:!0}}=i||{};return!h.length&&!s?null:r.jsx(Ye,{...n,"data-loading":s,"data-show-header":typeof t=="boolean"?t:d.visible,className:o.appendClassNames(e,"humany-notification-list"),"data-notification-category":f,header:c,symbol:u,items:h,renderItem:({id:g,title:x,body:v,modified:a,expandable:$})=>r.jsx(Be,{"data-notification":g,"data-expanded":$?l===g:!0,children:$?r.jsxs(r.Fragment,{children:[r.jsxs(Le,{title:x,"aria-label":x,"aria-expanded":l===g,onClick:()=>m(l===g?null:g),children:[r.jsx("span",{children:x}),r.jsx(Fe,{size:11,symbol:{type:"Svg",content:`caret-${l===g?"up":"down"}`}})]}),r.jsx(H,{html:v}),a&&r.jsx(Ae,{format:B.YYYY_MM_DD,timestamp:a})]}):r.jsx(H,{html:v})},g),children:r.jsx(Ee,{loading:s})})},Le=o.newStyled(o.Button)`
|
|
467
|
+
display: flex;
|
|
468
|
+
justify-content: space-between;
|
|
469
|
+
align-items: center;
|
|
470
|
+
width: 100%;
|
|
471
|
+
text-align: left;
|
|
472
|
+
svg,
|
|
473
|
+
i {
|
|
474
|
+
color: ${e=>{var t;return(t=e.theme.colors)==null?void 0:t.primary}};
|
|
475
|
+
}
|
|
476
|
+
span {
|
|
477
|
+
color: ${e=>{var t;return(t=e.theme.colors)==null?void 0:t.text}};
|
|
478
|
+
font-size: ${e=>{var t;return(t=e.theme.fonts)==null?void 0:t.normal}};
|
|
479
|
+
overflow: hidden;
|
|
480
|
+
text-overflow: ellipsis;
|
|
481
|
+
flex: 1;
|
|
482
|
+
white-space: nowrap;
|
|
483
|
+
}
|
|
484
|
+
&:focus-visible {
|
|
485
|
+
${o.borderTabStyle}
|
|
486
|
+
span {
|
|
487
|
+
color: ${e=>{var t;return(t=e.theme.colors)==null?void 0:t.primary}};
|
|
488
|
+
text-decoration: underline;
|
|
489
|
+
}
|
|
490
|
+
}
|
|
491
|
+
`,Ye=o.newStyled(o.ItemList)`
|
|
492
|
+
${ge}
|
|
493
|
+
${o.itemList}
|
|
494
|
+
overflow: hidden;
|
|
495
|
+
justify-content: flex-start;
|
|
496
|
+
padding: ${e=>{var t;return(t=e.theme.sizes)==null?void 0:t.large}};
|
|
497
|
+
${e=>!e["data-show-header"]&&o.css`
|
|
498
|
+
> div {
|
|
499
|
+
${o.headingElement(e)("h1",o.css`
|
|
500
|
+
display: none;
|
|
501
|
+
`)}
|
|
502
|
+
}
|
|
503
|
+
`}
|
|
504
|
+
|
|
505
|
+
@media (hover: hover) {
|
|
506
|
+
button:hover {
|
|
507
|
+
text-decoration: underline;
|
|
508
|
+
}
|
|
509
|
+
}
|
|
510
|
+
`,H=o.newStyled(o.Paragraph)`
|
|
511
|
+
${o.genericHtml}
|
|
512
|
+
font-weight: 300;
|
|
513
|
+
|
|
514
|
+
p {
|
|
515
|
+
white-space: normal;
|
|
516
|
+
}
|
|
517
|
+
`,Be=o.newStyled.li`
|
|
518
|
+
.humany-paragraph {
|
|
519
|
+
display: none;
|
|
520
|
+
&:not(:only-child) {
|
|
521
|
+
${e=>{var t,i,s;return((t=e.theme.sizes)==null?void 0:t.cardinal)&&((i=e.theme.sizes)==null?void 0:i.normal)&&o.css`
|
|
522
|
+
margin: ${(s=e.theme.sizes)==null?void 0:s.normal} 0;
|
|
523
|
+
`}}
|
|
524
|
+
}
|
|
525
|
+
}
|
|
526
|
+
|
|
527
|
+
${e=>e["data-expanded"]&&o.css`
|
|
528
|
+
.humany-paragraph {
|
|
529
|
+
display: block;
|
|
530
|
+
}
|
|
531
|
+
`}
|
|
532
|
+
|
|
533
|
+
> span {
|
|
534
|
+
display: block;
|
|
535
|
+
font-weight: 300;
|
|
536
|
+
color: ${e=>{var t;return(t=e.theme.colors)==null?void 0:t.accent}};
|
|
537
|
+
}
|
|
538
|
+
`,Fe=o.newStyled(o.SymbolBadge)`
|
|
539
|
+
margin: 0 0 0 ${e=>{var t;return(t=e.theme.sizes)==null?void 0:t.small}};
|
|
540
|
+
line {
|
|
541
|
+
stroke: ${e=>{var t;return(t=e.theme.colors)==null?void 0:t.primary}};
|
|
542
|
+
}
|
|
543
|
+
`,Ae=o.newStyled(q)`
|
|
544
|
+
font-size: ${e=>{var t;return(t=e.theme.fonts)==null?void 0:t.small}};
|
|
545
|
+
font-weight: 300;
|
|
546
|
+
`;exports.NotificationList=Me;exports.createParams=C;exports.formatUrl=M;exports.removeNullAndUndefinedValues=L;exports.useRouteData=Y;
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import { jsx as d } from "react/jsx-runtime";
|
|
2
|
+
import { e as l, n as m } from "./index-cc31f772.mjs";
|
|
3
|
+
import { useMemo as f } from "react";
|
|
4
|
+
import "react-dom";
|
|
5
|
+
import { N as p } from "./notification-list-291a2001.mjs";
|
|
6
|
+
import { m as c } from "./styles-ad5c7069.mjs";
|
|
7
|
+
const h = ({
|
|
8
|
+
id: o,
|
|
9
|
+
header: t,
|
|
10
|
+
items: e,
|
|
11
|
+
symbol: s,
|
|
12
|
+
className: a,
|
|
13
|
+
...r
|
|
14
|
+
}) => {
|
|
15
|
+
const n = f(() => ({
|
|
16
|
+
id: o,
|
|
17
|
+
title: t,
|
|
18
|
+
symbol: s,
|
|
19
|
+
defaultHeaderOptions: {
|
|
20
|
+
visible: !0
|
|
21
|
+
},
|
|
22
|
+
notifications: e.map((i) => ({
|
|
23
|
+
id: i.id.toString(),
|
|
24
|
+
title: i.title,
|
|
25
|
+
body: i.body,
|
|
26
|
+
modified: i.modified,
|
|
27
|
+
expandable: !0
|
|
28
|
+
}))
|
|
29
|
+
}), [t, e]);
|
|
30
|
+
return n ? /* @__PURE__ */ d(
|
|
31
|
+
u,
|
|
32
|
+
{
|
|
33
|
+
className: l("humany-bot-notification-list", a),
|
|
34
|
+
showHeader: !0,
|
|
35
|
+
notificationList: n,
|
|
36
|
+
loading: !1,
|
|
37
|
+
...r
|
|
38
|
+
}
|
|
39
|
+
) : null;
|
|
40
|
+
}, u = m(p)`
|
|
41
|
+
${c}
|
|
42
|
+
min-width: 10em;
|
|
43
|
+
|
|
44
|
+
span {
|
|
45
|
+
color: ${(o) => {
|
|
46
|
+
var t;
|
|
47
|
+
return (t = o.theme.colors) == null ? void 0 : t.text;
|
|
48
|
+
}};
|
|
49
|
+
}
|
|
50
|
+
`;
|
|
51
|
+
export {
|
|
52
|
+
h as default
|
|
53
|
+
};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const d=require("react/jsx-runtime"),s=require("./index-07363705.js"),c=require("react");require("react-dom");const u=require("./notification-list-876b3f3d.js"),f=require("./styles-15c941d4.js"),m=({id:e,header:t,items:o,symbol:r,className:a,...l})=>{const n=c.useMemo(()=>({id:e,title:t,symbol:r,defaultHeaderOptions:{visible:!0},notifications:o.map(i=>({id:i.id.toString(),title:i.title,body:i.body,modified:i.modified,expandable:!0}))}),[t,o]);return n?d.jsx(y,{className:s.appendClassNames("humany-bot-notification-list",a),showHeader:!0,notificationList:n,loading:!1,...l}):null},y=s.newStyled(u.NotificationList)`
|
|
2
|
+
${f.messageContentPadding}
|
|
3
|
+
min-width: 10em;
|
|
4
|
+
|
|
5
|
+
span {
|
|
6
|
+
color: ${e=>{var t;return(t=e.theme.colors)==null?void 0:t.text}};
|
|
7
|
+
}
|
|
8
|
+
`;exports.default=m;
|