solid-ui 2.4.27-80358ddf → 2.4.27-8c4294a2
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.html +1 -9
- package/dist/{main.js → solid-ui.js} +5797 -505
- package/dist/solid-ui.js.map +1 -0
- package/dist/solid-ui.min.js +3 -0
- package/dist/solid-ui.min.js.LICENSE.txt +117 -0
- package/dist/solid-ui.min.js.map +1 -0
- package/lib/acl/access-controller.d.ts +3 -2
- package/lib/acl/access-controller.d.ts.map +1 -1
- package/lib/acl/access-controller.js +15 -17
- package/lib/acl/access-controller.js.map +1 -1
- package/lib/acl/access-groups.d.ts.map +1 -1
- package/lib/acl/access-groups.js +8 -78
- package/lib/acl/access-groups.js.map +1 -1
- package/lib/acl/acl-control.d.ts.map +1 -1
- package/lib/acl/acl-control.js +11 -10
- package/lib/acl/acl-control.js.map +1 -1
- package/lib/acl/acl.d.ts +1 -1
- package/lib/acl/acl.js +1 -1
- package/lib/acl/acl.js.map +1 -1
- package/lib/acl/add-agent-buttons.d.ts.map +1 -1
- package/lib/acl/add-agent-buttons.js +3 -4
- package/lib/acl/add-agent-buttons.js.map +1 -1
- package/lib/acl/styles.d.ts +90 -0
- package/lib/acl/styles.d.ts.map +1 -0
- package/lib/acl/styles.js +98 -0
- package/lib/acl/styles.js.map +1 -0
- package/lib/footer/index.d.ts.map +1 -1
- package/lib/footer/index.js +1 -5
- package/lib/footer/index.js.map +1 -1
- package/lib/footer/styleMap.d.ts +8 -0
- package/lib/footer/styleMap.d.ts.map +1 -0
- package/lib/footer/styleMap.js +15 -0
- package/lib/footer/styleMap.js.map +1 -0
- package/lib/header/index.d.ts.map +1 -1
- package/lib/header/index.js +20 -33
- package/lib/header/index.js.map +1 -1
- package/lib/header/styleMap.d.ts +117 -0
- package/lib/header/styleMap.d.ts.map +1 -0
- package/lib/header/styleMap.js +139 -0
- package/lib/header/styleMap.js.map +1 -0
- package/lib/jss/index.d.ts +20 -0
- package/lib/jss/index.d.ts.map +1 -0
- package/lib/jss/index.js +47 -0
- package/lib/jss/index.js.map +1 -0
- package/lib/login/login.d.ts.map +1 -1
- package/lib/login/login.js +37 -33
- package/lib/login/login.js.map +1 -1
- package/lib/style.js +2 -57
- package/lib/style.js.map +1 -1
- package/lib/utils/headerFooterHelpers.d.ts +4 -0
- package/lib/utils/headerFooterHelpers.d.ts.map +1 -1
- package/lib/utils/headerFooterHelpers.js +27 -0
- package/lib/utils/headerFooterHelpers.js.map +1 -1
- package/lib/versionInfo.js +2 -2
- package/lib/versionInfo.js.map +1 -1
- package/lib/widgets/buttons.d.ts.map +1 -1
- package/lib/widgets/buttons.js +49 -43
- package/lib/widgets/buttons.js.map +1 -1
- package/package.json +8 -5
- package/dist/main.js.map +0 -1
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Contains CSS styles for the Sharing pane,
|
|
3
|
+
* see https://github.com/solidos/userguide/blob/main/views/sharing/userguide.md
|
|
4
|
+
* @packageDocumentation
|
|
5
|
+
*/
|
|
6
|
+
export declare const styles: {
|
|
7
|
+
aclControlBoxContainer: {
|
|
8
|
+
margin: string;
|
|
9
|
+
};
|
|
10
|
+
aclControlBoxHeader: {
|
|
11
|
+
fontSize: string;
|
|
12
|
+
margin: string;
|
|
13
|
+
};
|
|
14
|
+
aclControlBoxStatus: {
|
|
15
|
+
display: string;
|
|
16
|
+
margin: string;
|
|
17
|
+
};
|
|
18
|
+
aclControlBoxStatusRevealed: {
|
|
19
|
+
display: string;
|
|
20
|
+
};
|
|
21
|
+
aclGroupContent: {
|
|
22
|
+
maxWidth: number;
|
|
23
|
+
};
|
|
24
|
+
accessGroupList: {
|
|
25
|
+
display: string;
|
|
26
|
+
gridTemplateColumns: string;
|
|
27
|
+
margin: string;
|
|
28
|
+
width: string;
|
|
29
|
+
};
|
|
30
|
+
accessGroupListItem: {
|
|
31
|
+
display: string;
|
|
32
|
+
gridTemplateColumns: string;
|
|
33
|
+
};
|
|
34
|
+
defaultsController: {
|
|
35
|
+
display: string;
|
|
36
|
+
};
|
|
37
|
+
defaultsControllerNotice: {
|
|
38
|
+
color: string;
|
|
39
|
+
flexGrow: number;
|
|
40
|
+
fontSize: string;
|
|
41
|
+
};
|
|
42
|
+
bigButton: {
|
|
43
|
+
backgroundColor: string;
|
|
44
|
+
border: string;
|
|
45
|
+
borderRadius: string;
|
|
46
|
+
maxWidth: string;
|
|
47
|
+
paddingBottom: string;
|
|
48
|
+
paddingTop: string;
|
|
49
|
+
};
|
|
50
|
+
group: {
|
|
51
|
+
color: string;
|
|
52
|
+
};
|
|
53
|
+
'group-1': {
|
|
54
|
+
color: string;
|
|
55
|
+
};
|
|
56
|
+
'group-2': {
|
|
57
|
+
color: string;
|
|
58
|
+
};
|
|
59
|
+
'group-3': {
|
|
60
|
+
color: string;
|
|
61
|
+
};
|
|
62
|
+
'group-5': {
|
|
63
|
+
color: string;
|
|
64
|
+
};
|
|
65
|
+
'group-9': {
|
|
66
|
+
color: string;
|
|
67
|
+
};
|
|
68
|
+
'group-13': {
|
|
69
|
+
color: string;
|
|
70
|
+
};
|
|
71
|
+
trustedAppAddApplicationsTable: {
|
|
72
|
+
backgroundColor: string;
|
|
73
|
+
};
|
|
74
|
+
trustedAppCancelButton: {
|
|
75
|
+
float: "right";
|
|
76
|
+
};
|
|
77
|
+
trustedAppControllerI: {
|
|
78
|
+
borderColor: string;
|
|
79
|
+
borderRadius: string;
|
|
80
|
+
borderWidth: string;
|
|
81
|
+
};
|
|
82
|
+
temporaryStatusInit: {
|
|
83
|
+
background: string;
|
|
84
|
+
};
|
|
85
|
+
temporaryStatusEnd: {
|
|
86
|
+
background: string;
|
|
87
|
+
transition: string;
|
|
88
|
+
};
|
|
89
|
+
};
|
|
90
|
+
//# sourceMappingURL=styles.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../src/acl/styles.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,eAAO,MAAM,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAmFlB,CAAA"}
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.styles = void 0;
|
|
7
|
+
/**
|
|
8
|
+
* Contains CSS styles for the Sharing pane,
|
|
9
|
+
* see https://github.com/solidos/userguide/blob/main/views/sharing/userguide.md
|
|
10
|
+
* @packageDocumentation
|
|
11
|
+
*/
|
|
12
|
+
var styles = {
|
|
13
|
+
aclControlBoxContainer: {
|
|
14
|
+
margin: '1em'
|
|
15
|
+
},
|
|
16
|
+
aclControlBoxHeader: {
|
|
17
|
+
fontSize: '120%',
|
|
18
|
+
margin: '0 0 1rem'
|
|
19
|
+
},
|
|
20
|
+
aclControlBoxStatus: {
|
|
21
|
+
display: 'none',
|
|
22
|
+
margin: '1rem 0'
|
|
23
|
+
},
|
|
24
|
+
aclControlBoxStatusRevealed: {
|
|
25
|
+
display: 'block'
|
|
26
|
+
},
|
|
27
|
+
aclGroupContent: {
|
|
28
|
+
maxWidth: 650
|
|
29
|
+
},
|
|
30
|
+
accessGroupList: {
|
|
31
|
+
display: 'grid',
|
|
32
|
+
gridTemplateColumns: '1fr',
|
|
33
|
+
margin: '1em',
|
|
34
|
+
width: '100%'
|
|
35
|
+
},
|
|
36
|
+
accessGroupListItem: {
|
|
37
|
+
display: 'grid',
|
|
38
|
+
gridTemplateColumns: '100px auto 30%'
|
|
39
|
+
},
|
|
40
|
+
defaultsController: {
|
|
41
|
+
display: 'flex'
|
|
42
|
+
},
|
|
43
|
+
defaultsControllerNotice: {
|
|
44
|
+
color: '#888',
|
|
45
|
+
flexGrow: 1,
|
|
46
|
+
fontSize: '80%'
|
|
47
|
+
},
|
|
48
|
+
bigButton: {
|
|
49
|
+
backgroundColor: 'white',
|
|
50
|
+
border: '0.1em solid #888',
|
|
51
|
+
borderRadius: '0.3em',
|
|
52
|
+
maxWidth: '50%',
|
|
53
|
+
paddingBottom: '1em',
|
|
54
|
+
paddingTop: '1em'
|
|
55
|
+
},
|
|
56
|
+
group: {
|
|
57
|
+
color: '#888'
|
|
58
|
+
},
|
|
59
|
+
'group-1': {
|
|
60
|
+
color: 'green'
|
|
61
|
+
},
|
|
62
|
+
'group-2': {
|
|
63
|
+
color: '#cc0'
|
|
64
|
+
},
|
|
65
|
+
'group-3': {
|
|
66
|
+
color: 'orange'
|
|
67
|
+
},
|
|
68
|
+
'group-5': {
|
|
69
|
+
color: 'red'
|
|
70
|
+
},
|
|
71
|
+
'group-9': {
|
|
72
|
+
color: 'blue'
|
|
73
|
+
},
|
|
74
|
+
'group-13': {
|
|
75
|
+
color: 'purple'
|
|
76
|
+
},
|
|
77
|
+
trustedAppAddApplicationsTable: {
|
|
78
|
+
backgroundColor: '#eee'
|
|
79
|
+
},
|
|
80
|
+
trustedAppCancelButton: {
|
|
81
|
+
"float": 'right' // @@ a little hack - https://stackoverflow.com/questions/52781251/using-typescript-jss-with-react-throws-type-is-unassignable-for-some-css-prop
|
|
82
|
+
},
|
|
83
|
+
|
|
84
|
+
trustedAppControllerI: {
|
|
85
|
+
borderColor: 'orange',
|
|
86
|
+
borderRadius: '1em',
|
|
87
|
+
borderWidth: '0.1em'
|
|
88
|
+
},
|
|
89
|
+
temporaryStatusInit: {
|
|
90
|
+
background: 'green'
|
|
91
|
+
},
|
|
92
|
+
temporaryStatusEnd: {
|
|
93
|
+
background: 'transparent',
|
|
94
|
+
transition: 'background 5s linear'
|
|
95
|
+
}
|
|
96
|
+
};
|
|
97
|
+
exports.styles = styles;
|
|
98
|
+
//# sourceMappingURL=styles.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"styles.js","names":["styles","aclControlBoxContainer","margin","aclControlBoxHeader","fontSize","aclControlBoxStatus","display","aclControlBoxStatusRevealed","aclGroupContent","maxWidth","accessGroupList","gridTemplateColumns","width","accessGroupListItem","defaultsController","defaultsControllerNotice","color","flexGrow","bigButton","backgroundColor","border","borderRadius","paddingBottom","paddingTop","group","trustedAppAddApplicationsTable","trustedAppCancelButton","trustedAppControllerI","borderColor","borderWidth","temporaryStatusInit","background","temporaryStatusEnd","transition","exports"],"sources":["../../src/acl/styles.ts"],"sourcesContent":["/**\n * Contains CSS styles for the Sharing pane,\n * see https://github.com/solidos/userguide/blob/main/views/sharing/userguide.md\n * @packageDocumentation\n */\nexport const styles = {\n aclControlBoxContainer: {\n margin: '1em'\n },\n aclControlBoxHeader: {\n fontSize: '120%',\n margin: '0 0 1rem'\n },\n aclControlBoxStatus: {\n display: 'none',\n margin: '1rem 0'\n },\n aclControlBoxStatusRevealed: {\n display: 'block'\n },\n aclGroupContent: {\n maxWidth: 650\n },\n accessGroupList: {\n display: 'grid',\n gridTemplateColumns: '1fr',\n margin: '1em',\n width: '100%'\n },\n accessGroupListItem: {\n display: 'grid',\n gridTemplateColumns: '100px auto 30%'\n },\n defaultsController: {\n display: 'flex'\n },\n defaultsControllerNotice: {\n color: '#888',\n flexGrow: 1,\n fontSize: '80%'\n },\n bigButton: {\n backgroundColor: 'white',\n border: '0.1em solid #888',\n borderRadius: '0.3em',\n maxWidth: '50%',\n paddingBottom: '1em',\n paddingTop: '1em'\n },\n group: {\n color: '#888'\n },\n 'group-1': {\n color: 'green'\n },\n 'group-2': {\n color: '#cc0'\n },\n 'group-3': {\n color: 'orange'\n },\n 'group-5': {\n color: 'red'\n },\n 'group-9': {\n color: 'blue'\n },\n 'group-13': {\n color: 'purple'\n },\n trustedAppAddApplicationsTable: {\n backgroundColor: '#eee'\n },\n trustedAppCancelButton: {\n float: 'right' as 'right' // @@ a little hack - https://stackoverflow.com/questions/52781251/using-typescript-jss-with-react-throws-type-is-unassignable-for-some-css-prop\n },\n trustedAppControllerI: {\n borderColor: 'orange',\n borderRadius: '1em',\n borderWidth: '0.1em'\n },\n temporaryStatusInit: {\n background: 'green'\n },\n temporaryStatusEnd: {\n background: 'transparent',\n transition: 'background 5s linear'\n }\n}\n"],"mappings":";;;;;;AAAA;AACA;AACA;AACA;AACA;AACO,IAAMA,MAAM,GAAG;EACpBC,sBAAsB,EAAE;IACtBC,MAAM,EAAE;EACV,CAAC;EACDC,mBAAmB,EAAE;IACnBC,QAAQ,EAAE,MAAM;IAChBF,MAAM,EAAE;EACV,CAAC;EACDG,mBAAmB,EAAE;IACnBC,OAAO,EAAE,MAAM;IACfJ,MAAM,EAAE;EACV,CAAC;EACDK,2BAA2B,EAAE;IAC3BD,OAAO,EAAE;EACX,CAAC;EACDE,eAAe,EAAE;IACfC,QAAQ,EAAE;EACZ,CAAC;EACDC,eAAe,EAAE;IACfJ,OAAO,EAAE,MAAM;IACfK,mBAAmB,EAAE,KAAK;IAC1BT,MAAM,EAAE,KAAK;IACbU,KAAK,EAAE;EACT,CAAC;EACDC,mBAAmB,EAAE;IACnBP,OAAO,EAAE,MAAM;IACfK,mBAAmB,EAAE;EACvB,CAAC;EACDG,kBAAkB,EAAE;IAClBR,OAAO,EAAE;EACX,CAAC;EACDS,wBAAwB,EAAE;IACxBC,KAAK,EAAE,MAAM;IACbC,QAAQ,EAAE,CAAC;IACXb,QAAQ,EAAE;EACZ,CAAC;EACDc,SAAS,EAAE;IACTC,eAAe,EAAE,OAAO;IACxBC,MAAM,EAAE,kBAAkB;IAC1BC,YAAY,EAAE,OAAO;IACrBZ,QAAQ,EAAE,KAAK;IACfa,aAAa,EAAE,KAAK;IACpBC,UAAU,EAAE;EACd,CAAC;EACDC,KAAK,EAAE;IACLR,KAAK,EAAE;EACT,CAAC;EACD,SAAS,EAAE;IACTA,KAAK,EAAE;EACT,CAAC;EACD,SAAS,EAAE;IACTA,KAAK,EAAE;EACT,CAAC;EACD,SAAS,EAAE;IACTA,KAAK,EAAE;EACT,CAAC;EACD,SAAS,EAAE;IACTA,KAAK,EAAE;EACT,CAAC;EACD,SAAS,EAAE;IACTA,KAAK,EAAE;EACT,CAAC;EACD,UAAU,EAAE;IACVA,KAAK,EAAE;EACT,CAAC;EACDS,8BAA8B,EAAE;IAC9BN,eAAe,EAAE;EACnB,CAAC;EACDO,sBAAsB,EAAE;IACtB,SAAO,OAAkB,CAAC;EAC5B,CAAC;;EACDC,qBAAqB,EAAE;IACrBC,WAAW,EAAE,QAAQ;IACrBP,YAAY,EAAE,KAAK;IACnBQ,WAAW,EAAE;EACf,CAAC;EACDC,mBAAmB,EAAE;IACnBC,UAAU,EAAE;EACd,CAAC;EACDC,kBAAkB,EAAE;IAClBD,UAAU,EAAE,aAAa;IACzBE,UAAU,EAAE;EACd;AACF,CAAC;AAAAC,OAAA,CAAAlC,MAAA,GAAAA,MAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/footer/index.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,QAAQ,CAAA;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/footer/index.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,QAAQ,CAAA;AAU7C,MAAM,MAAM,aAAa,GAAG;IACxB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,gBAAgB,CAAC,EAAE,MAAM,CAAA;CAC1B,CAAA;AAEH;;;;GAIG;AACH,wBAAsB,UAAU,CAAE,KAAK,EAAE,SAAS,EAAE,OAAO,CAAC,EAAE,aAAa,iBAU1E;AACD;;GAEG;AACH,wBAAgB,aAAa,CAAE,MAAM,EAAE,WAAW,EAAE,KAAK,EAAE,SAAS,EAAE,GAAG,EAAE,SAAS,GAAG,IAAI,EAAE,QAAQ,EAAE,SAAS,GAAG,IAAI,EAAE,OAAO,CAAC,EAAE,aAAa,uBAM/I;AACD;;GAEG;AACH,wBAAgB,yBAAyB,CAAE,KAAK,EAAE,SAAS,EAAE,IAAI,EAAE,SAAS,GAAG,IAAI,EAAE,GAAG,EAAE,SAAS,GAAG,IAAI,EAAE,QAAQ,EAAE,SAAS,GAAG,IAAI,EAAE,OAAO,CAAC,EAAE,aAAa,GAAG,WAAW,CAyC5K"}
|
package/lib/footer/index.js
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
-
var _typeof = require("@babel/runtime/helpers/typeof");
|
|
5
4
|
Object.defineProperty(exports, "__esModule", {
|
|
6
5
|
value: true
|
|
7
6
|
});
|
|
@@ -11,10 +10,7 @@ exports.rebuildFooter = rebuildFooter;
|
|
|
11
10
|
var _regenerator = _interopRequireDefault(require("@babel/runtime/regenerator"));
|
|
12
11
|
var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime/helpers/asyncToGenerator"));
|
|
13
12
|
var _solidLogic = require("solid-logic");
|
|
14
|
-
var style = _interopRequireWildcard(require("../style"));
|
|
15
13
|
var _headerFooterHelpers = require("../utils/headerFooterHelpers");
|
|
16
|
-
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
17
|
-
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
18
14
|
/*
|
|
19
15
|
This file was copied from mashlib/src/global/footer.ts file. It is modified to
|
|
20
16
|
work in solid-ui by adjusting where imported functions are found.
|
|
@@ -95,7 +91,7 @@ function createControllerInfoBlock(store, user, pod, podOwner, options) {
|
|
|
95
91
|
if (!pod || !podOwner || user && user.equals(podOwner)) {
|
|
96
92
|
return profileLinkContainer;
|
|
97
93
|
}
|
|
98
|
-
|
|
94
|
+
(0, _headerFooterHelpers.addStyleClassToElement)(profileLinkContainer, ['footer-pod-info', 'footer'], 'footer');
|
|
99
95
|
var podLinkPre = document.createElement('span');
|
|
100
96
|
podLinkPre.innerText = "You're visiting ";
|
|
101
97
|
var podLink = document.createElement('a');
|
package/lib/footer/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["_solidLogic","require","
|
|
1
|
+
{"version":3,"file":"index.js","names":["_solidLogic","require","_headerFooterHelpers","DEFAULT_SOLID_PROJECT_URL","DEFAULT_SOLID_PROJECT_NAME","initFooter","_x","_x2","_initFooter","apply","arguments","_asyncToGenerator2","_regenerator","mark","_callee2","store","options","footer","pod","podOwner","wrap","_callee2$","_context2","prev","next","document","getElementById","abrupt","getPod","getPodOwner","sent","rebuildFooter","authSession","onLogin","onLogout","stop","_callee","user","_callee$","_context","authn","currentUser","innerHTML","t0","createControllerInfoBlock","t1","appendChild","call","profileLinkContainer","createElement","equals","addStyleClassToElement","podLinkPre","innerText","podLink","href","uri","profileLinkPre","profileLink","getName","solidProjectLinkPre","solidProjectLink","solidProjectUrl","solidProjectName","solidProjectLinkPost"],"sources":["../../src/footer/index.ts"],"sourcesContent":["/*\n This file was copied from mashlib/src/global/footer.ts file. It is modified to\n work in solid-ui by adjusting where imported functions are found.\n */\nimport { LiveStore, NamedNode } from 'rdflib'\nimport { authn, authSession } from 'solid-logic'\nimport { addStyleClassToElement, getName, getPod, getPodOwner } from '../utils/headerFooterHelpers'\n\nconst DEFAULT_SOLID_PROJECT_URL = 'https://solidproject.org'\nconst DEFAULT_SOLID_PROJECT_NAME = 'solidproject.org'\n\n/*\n FooterOptions allow for customizing the link and name of the link part of the footer.\n */\nexport type FooterOptions = {\n solidProjectUrl?: string,\n solidProjectName?: string\n }\n\n/**\n * Initialize footer component, the footer object returned depends on whether the user is authenticated.\n * @param store the data store\n * @returns the footer\n */\nexport async function initFooter (store: LiveStore, options?: FooterOptions) {\n const footer = document.getElementById('PageFooter')\n if (!footer) {\n return\n }\n const pod = getPod()\n const podOwner = await getPodOwner(pod, store)\n rebuildFooter(footer, store, pod, podOwner, options)()\n authSession.onLogin(rebuildFooter(footer, store, pod, podOwner, options))\n authSession.onLogout(rebuildFooter(footer, store, pod, podOwner, options))\n}\n/**\n * @ignore exporting this only for the unit test\n */\nexport function rebuildFooter (footer: HTMLElement, store: LiveStore, pod: NamedNode | null, podOwner: NamedNode | null, options?: FooterOptions) {\n return async () => {\n const user = authn.currentUser()\n footer.innerHTML = ''\n footer.appendChild(await createControllerInfoBlock(store, user, pod, podOwner, options))\n }\n}\n/**\n * @ignore exporting this only for the unit test\n */\nexport function createControllerInfoBlock (store: LiveStore, user: NamedNode | null, pod: NamedNode | null, podOwner: NamedNode | null, options?: FooterOptions): HTMLElement {\n const profileLinkContainer = document.createElement('div')\n if (!pod || !podOwner || (user && user.equals(podOwner))) {\n return profileLinkContainer\n }\n\n addStyleClassToElement(profileLinkContainer, ['footer-pod-info', 'footer'], 'footer')\n\n const podLinkPre = document.createElement('span')\n podLinkPre.innerText = \"You're visiting \"\n\n const podLink = document.createElement('a')\n podLink.href = pod.uri\n podLink.innerText = 'the Pod'\n\n const profileLinkPre = document.createElement('span')\n profileLinkPre.innerText = ' controlled by '\n\n const profileLink = document.createElement('a')\n profileLink.href = podOwner.uri\n profileLink.innerText = getName(store, podOwner)\n\n const solidProjectLinkPre = document.createElement('span')\n solidProjectLinkPre.innerText = '. For more info, check out '\n\n const solidProjectLink = document.createElement('a')\n solidProjectLink.href = options && options.solidProjectUrl ? options.solidProjectUrl : DEFAULT_SOLID_PROJECT_URL\n solidProjectLink.innerText = options && options.solidProjectName ? options.solidProjectName : DEFAULT_SOLID_PROJECT_NAME\n\n const solidProjectLinkPost = document.createElement('span')\n solidProjectLinkPost.innerText = '.'\n\n profileLinkContainer.appendChild(podLinkPre)\n profileLinkContainer.appendChild(podLink)\n profileLinkContainer.appendChild(profileLinkPre)\n profileLinkContainer.appendChild(profileLink)\n profileLinkContainer.appendChild(solidProjectLinkPre)\n profileLinkContainer.appendChild(solidProjectLink)\n profileLinkContainer.appendChild(solidProjectLinkPost)\n\n return profileLinkContainer\n}\n"],"mappings":";;;;;;;;;;;AAKA,IAAAA,WAAA,GAAAC,OAAA;AACA,IAAAC,oBAAA,GAAAD,OAAA;AANA;AACA;AACA;AACA;;AAKA,IAAME,yBAAyB,GAAG,0BAA0B;AAC5D,IAAMC,0BAA0B,GAAG,kBAAkB;;AAErD;AACA;AACA;AAMA;AACA;AACA;AACA;AACA;AAJA,SAKsBC,UAAUA,CAAAC,EAAA,EAAAC,GAAA;EAAA,OAAAC,WAAA,CAAAC,KAAA,OAAAC,SAAA;AAAA;AAWhC;AACA;AACA;AAFA,SAAAF,YAAA;EAAAA,WAAA,OAAAG,kBAAA,2BAAAC,YAAA,YAAAC,IAAA,CAXO,SAAAC,SAA2BC,KAAgB,EAAEC,OAAuB;IAAA,IAAAC,MAAA,EAAAC,GAAA,EAAAC,QAAA;IAAA,OAAAP,YAAA,YAAAQ,IAAA,UAAAC,UAAAC,SAAA;MAAA,kBAAAA,SAAA,CAAAC,IAAA,GAAAD,SAAA,CAAAE,IAAA;QAAA;UACnEP,MAAM,GAAGQ,QAAQ,CAACC,cAAc,CAAC,YAAY,CAAC;UAAA,IA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C,GAAG;EAC/BE,WAAW,CAACL,SAAS,GAAG,IAAAM,4BAAO,EAAC5C,KAAK,EAAEI,QAAQ,CAAC;EAEhD,IAAMyC,mBAAmB,GAAGnC,QAAQ,CAACwB,aAAa,CAAC,MAAM,CAAC;EAC1DW,mBAAmB,CAACP,SAAS,GAAG,6BAA6B;EAE7D,IAAMQ,gBAAgB,GAAGpC,QAAQ,CAACwB,aAAa,CAAC,GAAG,CAAC;EACpDY,gBAAgB,CAACN,IAAI,GAAGvC,OAAO,IAAIA,OAAO,CAAC8C,eAAe,GAAG9C,OAAO,CAAC8C,eAAe,GAAG3D,yBAAyB;EAChH0D,gBAAgB,CAACR,SAAS,GAAGrC,OAAO,IAAIA,OAAO,CAAC+C,gBAAgB,GAAG/C,OAAO,CAAC+C,gBAAgB,GAAG3D,0BAA0B;EAExH,IAAM4D,oBAAoB,GAAGvC,QAAQ,CAACwB,aAAa,CAAC,MAAM,CAAC;EAC3De,oBAAoB,CAACX,SAAS,GAAG,GAAG;EAEpCL,oBAAoB,CAACF,WAAW,CAACM,UAAU,CAAC;EAC5CJ,oBAAoB,CAACF,WAAW,CAACQ,OAAO,CAAC;EACzCN,oBAAoB,CAACF,WAAW,CAACW,cAAc,CAAC;EAChDT,oBAAoB,CAACF,WAAW,CAACY,WAAW,CAAC;EAC7CV,oBAAoB,CAACF,WAAW,CAACc,mBAAmB,CAAC;EACrDZ,oBAAoB,CAACF,WAAW,CAACe,gBAAgB,CAAC;EAClDb,oBAAoB,CAACF,WAAW,CAACkB,oBAAoB,CAAC;EAEtD,OAAOhB,oBAAoB;AAC7B"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"styleMap.d.ts","sourceRoot":"","sources":["../../src/footer/styleMap.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,QAAQ;;;;;;CAMpB,CAAA"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.styleMap = void 0;
|
|
7
|
+
var styleMap = {
|
|
8
|
+
footer: {
|
|
9
|
+
borderTop: 'solid 1px $divider-color',
|
|
10
|
+
fontSize: '0.9em',
|
|
11
|
+
padding: '0.5em 1.5em'
|
|
12
|
+
}
|
|
13
|
+
};
|
|
14
|
+
exports.styleMap = styleMap;
|
|
15
|
+
//# sourceMappingURL=styleMap.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"styleMap.js","names":["styleMap","footer","borderTop","fontSize","padding","exports"],"sources":["../../src/footer/styleMap.ts"],"sourcesContent":["export const styleMap = {\n footer: {\n borderTop: 'solid 1px $divider-color',\n fontSize: '0.9em',\n padding: '0.5em 1.5em'\n }\n}\n"],"mappings":";;;;;;AAAO,IAAMA,QAAQ,GAAG;EACtBC,MAAM,EAAE;IACNC,SAAS,EAAE,0BAA0B;IACrCC,QAAQ,EAAE,OAAO;IACjBC,OAAO,EAAE;EACX;AACF,CAAC;AAAAC,OAAA,CAAAL,QAAA,GAAAA,QAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/header/index.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,cAAc,EAAE,SAAS,EAAE,MAAM,QAAQ,CAAA;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/header/index.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,cAAc,EAAE,SAAS,EAAE,MAAM,QAAQ,CAAA;AAelD,MAAM,MAAM,YAAY,GAAG;IACzB,KAAK,EAAE,MAAM,CAAC;IACd,GAAG,EAAE,MAAM,CAAC;IACZ,MAAM,CAAC,EAAE,MAAM,CAAA;CAChB,CAAA;AAED,MAAM,MAAM,cAAc,GAAG;IAC3B,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,MAAM,IAAI,CAAA;CACpB,C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WAAW,CAAC,CAqD7H;AAED;;GAEG;AACH,wBAAgB,kBAAkB,CAAE,KAAK,EAAE,WAAW,GAAG,WAAW,CAKnE;AACD;;GAEG;AACH,wBAAgB,aAAa,CAAE,KAAK,EAAE,cAAc,EAAE,IAAI,EAAE,SAAS,GAAG,MAAM,GAAG,WAAW,CAe3F"}
|
package/lib/header/index.js
CHANGED
|
@@ -21,7 +21,6 @@ var _index = require("../index");
|
|
|
21
21
|
var _solidLogic = require("solid-logic");
|
|
22
22
|
var _login = require("../login/login");
|
|
23
23
|
var widgets = _interopRequireWildcard(require("../widgets"));
|
|
24
|
-
var style = _interopRequireWildcard(require("../style"));
|
|
25
24
|
var _emptyProfile = require("./empty-profile");
|
|
26
25
|
var _headerFooterHelpers = require("../utils/headerFooterHelpers");
|
|
27
26
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
@@ -115,12 +114,12 @@ function _createBanner() {
|
|
|
115
114
|
case 0:
|
|
116
115
|
podLink = document.createElement('a');
|
|
117
116
|
podLink.href = pod.uri;
|
|
118
|
-
|
|
117
|
+
(0, _headerFooterHelpers.addStyleClassToElement)(podLink, ['header-banner__link']);
|
|
119
118
|
image = document.createElement('img');
|
|
120
119
|
if (options) {
|
|
121
120
|
image.src = options.logo ? options.logo : DEFAUL_SOLID_ICON_URL;
|
|
122
121
|
}
|
|
123
|
-
|
|
122
|
+
(0, _headerFooterHelpers.addStyleClassToElement)(image, ['header-banner__icon']);
|
|
124
123
|
podLink.appendChild(image);
|
|
125
124
|
if (!user) {
|
|
126
125
|
_context3.next = 13;
|
|
@@ -137,10 +136,10 @@ function _createBanner() {
|
|
|
137
136
|
case 14:
|
|
138
137
|
userMenu = _context3.t0;
|
|
139
138
|
banner = document.createElement('div');
|
|
140
|
-
|
|
139
|
+
(0, _headerFooterHelpers.addStyleClassToElement)(banner, ['header-banner']);
|
|
141
140
|
banner.appendChild(podLink);
|
|
142
141
|
leftSideOfHeader = document.createElement('div');
|
|
143
|
-
|
|
142
|
+
(0, _headerFooterHelpers.addStyleClassToElement)(leftSideOfHeader, ['header-banner__right-menu']);
|
|
144
143
|
leftSideOfHeader.appendChild(userMenu);
|
|
145
144
|
if (options && options.helpMenuList) {
|
|
146
145
|
helpMenu = createHelpMenu(options, options.helpMenuList);
|
|
@@ -159,7 +158,7 @@ function _createBanner() {
|
|
|
159
158
|
function createHelpMenu(options, helpMenuItems) {
|
|
160
159
|
if (!helpMenuItems) return;
|
|
161
160
|
var helpMenuList = document.createElement('ul');
|
|
162
|
-
|
|
161
|
+
(0, _headerFooterHelpers.addStyleClassToElement)(helpMenuList, ['header-user-menu__list']);
|
|
163
162
|
helpMenuItems.forEach(function (menuItem) {
|
|
164
163
|
var menuItemType = menuItem.url ? 'url' : 'onclick';
|
|
165
164
|
if (menuItemType === 'url') {
|
|
@@ -169,19 +168,19 @@ function createHelpMenu(options, helpMenuItems) {
|
|
|
169
168
|
}
|
|
170
169
|
});
|
|
171
170
|
var helpMenu = document.createElement('nav');
|
|
172
|
-
|
|
171
|
+
(0, _headerFooterHelpers.addStyleClassToElement)(helpMenu, ['header-user-menu__navigation-menu']);
|
|
173
172
|
helpMenu.setAttribute('aria-hidden', 'true');
|
|
174
173
|
helpMenu.appendChild(helpMenuList);
|
|
175
174
|
var helpMenuContainer = document.createElement('div');
|
|
176
|
-
|
|
177
|
-
|
|
175
|
+
(0, _headerFooterHelpers.addStyleClassToElement)(helpMenuContainer, ['header-banner__user-menu']);
|
|
176
|
+
(0, _headerFooterHelpers.addStyleClassToElement)(helpMenuContainer, ['header-user-menu']);
|
|
178
177
|
helpMenuContainer.appendChild(helpMenu);
|
|
179
178
|
var helpMenuTrigger = document.createElement('button');
|
|
180
|
-
|
|
179
|
+
(0, _headerFooterHelpers.addStyleClassToElement)(helpMenuTrigger, ['header-user-menu__trigger']);
|
|
181
180
|
helpMenuTrigger.type = 'button';
|
|
182
181
|
var helpMenuIcon = document.createElement('img');
|
|
183
182
|
helpMenuIcon.src = options && options.helpIcon ? options.helpIcon : _index.icons.iconBase + DEFAULT_HELP_MENU_ICON;
|
|
184
|
-
|
|
183
|
+
(0, _headerFooterHelpers.addStyleClassToElement)(helpMenuIcon, ['header-banner__help-icon']);
|
|
185
184
|
helpMenuContainer.appendChild(helpMenuTrigger);
|
|
186
185
|
helpMenuTrigger.appendChild(helpMenuIcon);
|
|
187
186
|
var throttledMenuToggle = (0, _headerFooterHelpers.throttle)(function (event) {
|
|
@@ -207,7 +206,7 @@ function createHelpMenu(options, helpMenuItems) {
|
|
|
207
206
|
*/
|
|
208
207
|
function createLoginSignUpButtons() {
|
|
209
208
|
var profileLoginButtonPre = document.createElement('div');
|
|
210
|
-
|
|
209
|
+
(0, _headerFooterHelpers.addStyleClassToElement)(profileLoginButtonPre, ['header-banner__login']);
|
|
211
210
|
profileLoginButtonPre.appendChild((0, _login.loginStatusBox)(document, null, {}));
|
|
212
211
|
return profileLoginButtonPre;
|
|
213
212
|
}
|
|
@@ -216,13 +215,7 @@ function createLoginSignUpButtons() {
|
|
|
216
215
|
*/
|
|
217
216
|
function createUserMenuButton(label, onClick) {
|
|
218
217
|
var button = document.createElement('button');
|
|
219
|
-
|
|
220
|
-
button.onmouseover = function () {
|
|
221
|
-
button.setAttribute('style', style.headerUserMenuButtonHover);
|
|
222
|
-
};
|
|
223
|
-
button.onmouseout = function () {
|
|
224
|
-
button.setAttribute('style', style.headerUserMenuButton);
|
|
225
|
-
};
|
|
218
|
+
(0, _headerFooterHelpers.addStyleClassToElement)(button, ['header-user-menu__button']);
|
|
226
219
|
button.addEventListener('click', onClick);
|
|
227
220
|
button.innerText = label;
|
|
228
221
|
return button;
|
|
@@ -232,13 +225,7 @@ function createUserMenuButton(label, onClick) {
|
|
|
232
225
|
*/
|
|
233
226
|
function createUserMenuLink(label, href, target) {
|
|
234
227
|
var link = document.createElement('a');
|
|
235
|
-
|
|
236
|
-
link.onmouseover = function () {
|
|
237
|
-
link.setAttribute('style', style.headerUserMenuLinkHover);
|
|
238
|
-
};
|
|
239
|
-
link.onmouseout = function () {
|
|
240
|
-
link.setAttribute('style', style.headerUserMenuLink);
|
|
241
|
-
};
|
|
228
|
+
(0, _headerFooterHelpers.addStyleClassToElement)(link, ['header-user-menu__link']);
|
|
242
229
|
link.href = href;
|
|
243
230
|
link.innerText = label;
|
|
244
231
|
if (target) link.target = target;
|
|
@@ -269,7 +256,7 @@ function _createUserMenu() {
|
|
|
269
256
|
return fetcher.load(user);
|
|
270
257
|
case 4:
|
|
271
258
|
loggedInMenuList = document.createElement('ul');
|
|
272
|
-
|
|
259
|
+
(0, _headerFooterHelpers.addStyleClassToElement)(loggedInMenuList, ['header-user-menu__list']);
|
|
273
260
|
if (userMenuList) {
|
|
274
261
|
userMenuList.forEach(function (menuItem) {
|
|
275
262
|
var menuItemType = menuItem.url ? 'url' : 'onclick';
|
|
@@ -281,11 +268,11 @@ function _createUserMenu() {
|
|
|
281
268
|
});
|
|
282
269
|
}
|
|
283
270
|
loggedInMenu = document.createElement('nav');
|
|
284
|
-
|
|
271
|
+
(0, _headerFooterHelpers.addStyleClassToElement)(loggedInMenu, ['header-user-menu__navigation-menu']);
|
|
285
272
|
loggedInMenu.setAttribute('aria-hidden', 'true');
|
|
286
273
|
loggedInMenu.appendChild(loggedInMenuList);
|
|
287
274
|
loggedInMenuTrigger = document.createElement('button');
|
|
288
|
-
|
|
275
|
+
(0, _headerFooterHelpers.addStyleClassToElement)(loggedInMenuTrigger, ['header-user-menu__trigger']);
|
|
289
276
|
loggedInMenuTrigger.type = 'button';
|
|
290
277
|
profileImg = getProfileImg(store, user);
|
|
291
278
|
if (typeof profileImg === 'string') {
|
|
@@ -294,8 +281,8 @@ function _createUserMenu() {
|
|
|
294
281
|
loggedInMenuTrigger.appendChild(profileImg);
|
|
295
282
|
}
|
|
296
283
|
loggedInMenuContainer = document.createElement('div');
|
|
297
|
-
|
|
298
|
-
|
|
284
|
+
(0, _headerFooterHelpers.addStyleClassToElement)(loggedInMenuContainer, ['header-banner__user-menu']);
|
|
285
|
+
(0, _headerFooterHelpers.addStyleClassToElement)(loggedInMenuContainer, ['header-user-menu']);
|
|
299
286
|
loggedInMenuContainer.appendChild(loggedInMenuTrigger);
|
|
300
287
|
loggedInMenuContainer.appendChild(loggedInMenu);
|
|
301
288
|
throttledMenuToggle = (0, _headerFooterHelpers.throttle)(function (event) {
|
|
@@ -325,7 +312,7 @@ function _createUserMenu() {
|
|
|
325
312
|
}
|
|
326
313
|
function createUserMenuItem(child) {
|
|
327
314
|
var menuProfileItem = document.createElement('li');
|
|
328
|
-
|
|
315
|
+
(0, _headerFooterHelpers.addStyleClassToElement)(menuProfileItem, ['header-user-menu__list-item']);
|
|
329
316
|
menuProfileItem.appendChild(child);
|
|
330
317
|
return menuProfileItem;
|
|
331
318
|
}
|
|
@@ -343,7 +330,7 @@ function getProfileImg(store, user) {
|
|
|
343
330
|
return _emptyProfile.emptyProfile;
|
|
344
331
|
}
|
|
345
332
|
var profileImage = document.createElement('div');
|
|
346
|
-
|
|
333
|
+
(0, _headerFooterHelpers.addStyleClassToElement)(profileImage, ['header-user-menu__photo']);
|
|
347
334
|
profileImage.style.backgroundImage = "url(".concat(profileUrl, ")");
|
|
348
335
|
return profileImage;
|
|
349
336
|
}
|
package/lib/header/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["_index","require","_solidLogic","_login","widgets","_interopRequireWildcard","style","_emptyProfile","_headerFooterHelpers","_getRequireWildcardCache","nodeInterop","WeakMap","cacheBabelInterop","cacheNodeInterop","obj","__esModule","_typeof","cache","has","get","newObj","hasPropertyDescriptor","Object","defineProperty","getOwnPropertyDescriptor","key","prototype","hasOwnProperty","call","desc","set","DEFAULT_HELP_MENU_ICON","icons","iconBase","DEFAUL_SOLID_ICON_URL","initHeader","_x","_x2","_x3","_initHeader","apply","arguments","_asyncToGenerator2","_regenerator","mark","_callee2","store","userMenuList","options","header","pod","wrap","_callee2$","_context2","prev","next","document","getElementById","abrupt","getPod","rebuildHeader","authSession","onLogout","onLogin","stop","_callee","user","_callee$","_context","authn","currentUser","innerHTML","t0","createBanner","t1","sent","appendChild","_x4","_x5","_x6","_x7","_x8","_createBanner","_callee3","podLink","image","userMenu","banner","leftSideOfHeader","helpMenu","_callee3$","_context3","createElement","href","uri","setAttribute","headerBannerLink","src","logo","headerBannerIcon","createUserMenu","createLoginSignUpButtons","headerBanner","headerBannerRightMenu","helpMenuList","createHelpMenu","helpMenuItems","headerUserMenuList","forEach","menuItem","menuItemType","url","createUserMenuItem","createUserMenuLink","label","target","createUserMenuButton","onclick","headerUserMenuNavigationMenu","helpMenuContainer","headerBannerUserMenu","headerUserMenu","helpMenuTrigger","headerUserMenuTrigger","type","helpMenuIcon","helpIcon","headerUserMenuTriggerImg","throttledMenuToggle","throttle","event","toggleMenu","addEventListener","timer","setTimeout","clearTimeout","profileLoginButtonPre","headerBannerLogin","loginStatusBox","onClick","button","headerUserMenuButton","onmouseover","headerUserMenuButtonHover","onmouseout","innerText","link","headerUserMenuLink","headerUserMenuLinkHover","_x9","_x10","_x11","_createUserMenu","_callee4","fetcher","loggedInMenuList","loggedInMenu","loggedInMenuTrigger","profileImg","loggedInMenuContainer","_callee4$","_context4","load","getProfileImg","child","menuProfileItem","headerUserMenuListItem","profileUrl","findImage","emptyProfile","_unused","profileImage","headerUserMenuPhoto","backgroundImage","concat","trigger","menu","isExpanded","getAttribute","expand","close","toString"],"sources":["../../src/header/index.ts"],"sourcesContent":["/* global EventListenerOrEventListenerObject */\n/*\n This file was copied from mashlib/src/global/header.ts file. It is modified to\n work in solid-ui by adjusting where imported functions are found.\n */\nimport { IndexedFormula, NamedNode } from 'rdflib'\nimport { icons } from '../index'\nimport { authn, authSession } from 'solid-logic'\nimport { loginStatusBox } from '../login/login'\n// import { loginStatusBox, authSession, currentUser } from '../authn/authn'\nimport * as widgets from '../widgets'\nimport * as style from '../style'\nimport { emptyProfile } from './empty-profile'\nimport { getPod, throttle } from '../utils/headerFooterHelpers'\n\n/**\n * menu icons\n*/\nconst DEFAULT_HELP_MENU_ICON = icons.iconBase + 'noun_help.svg'\nconst DEFAUL_SOLID_ICON_URL = 'https://solidproject.org/assets/img/solid-emblem.svg'\n\nexport type MenuItemLink = {\n label: string,\n url: string,\n target?: string\n}\n\nexport type MenuItemButton = {\n label: string,\n onclick: () => void\n}\n\nexport type MenuItems = MenuItemLink | MenuItemButton\n\n/*\n HeaderOptions allow for customizing the logo and menu list. If a logo is not provided the default\n is solid. Menulist will always show a link to logout and to the users profile.\n */\nexport type HeaderOptions = {\n logo?: string,\n helpIcon?: string,\n helpMenuList?: MenuItems[]\n}\n\n/**\n * Initialize header component, the header object returned depends on whether the user is authenticated.\n * @param store the data store\n * @param userMenuList a list of menu items when the user is logged in\n * @param options allow the header to be customized with a personalized logo, help icon and a help menu list of links or buttons.\n * @returns a header for an authenticated user with menu items given or a login screen\n */\nexport async function initHeader (store: IndexedFormula, userMenuList: MenuItems[], options?: HeaderOptions) {\n const header = document.getElementById('PageHeader')\n if (!header) {\n return\n }\n\n const pod = getPod()\n rebuildHeader(header, store, pod, userMenuList, options)()\n authSession.onLogout(rebuildHeader(header, store, pod, userMenuList, options))\n authSession.onLogin(rebuildHeader(header, store, pod, userMenuList, options))\n}\n/**\n * @ignore exporting this only for the unit test\n */\nexport function rebuildHeader (header: HTMLElement, store: IndexedFormula, pod: NamedNode, userMenuList: MenuItems[], options?: HeaderOptions) {\n return async () => {\n const user = authn.currentUser()\n header.innerHTML = ''\n header.appendChild(await createBanner(store, pod, user, userMenuList, options))\n }\n}\n/**\n * @ignore exporting this only for the unit test\n */\nexport async function createBanner (store: IndexedFormula, pod: NamedNode, user: NamedNode | null, userMenuList: MenuItems[], options?: HeaderOptions): Promise<HTMLElement> {\n const podLink = document.createElement('a')\n podLink.href = pod.uri\n podLink.setAttribute('style', style.headerBannerLink)\n const image = document.createElement('img')\n if (options) {\n image.src = options.logo ? options.logo : DEFAUL_SOLID_ICON_URL\n }\n image.setAttribute('style', style.headerBannerIcon)\n podLink.appendChild(image)\n\n const userMenu = user\n ? await createUserMenu(store, user, userMenuList)\n : createLoginSignUpButtons()\n\n const banner = document.createElement('div')\n banner.setAttribute('style', style.headerBanner)\n banner.appendChild(podLink)\n\n const leftSideOfHeader = document.createElement('div')\n leftSideOfHeader.setAttribute('style', style.headerBannerRightMenu)\n leftSideOfHeader.appendChild(userMenu)\n\n if (options && options.helpMenuList) {\n const helpMenu = createHelpMenu(options, options.helpMenuList)\n leftSideOfHeader.appendChild(helpMenu as HTMLDivElement)\n }\n\n banner.appendChild(leftSideOfHeader)\n\n return banner\n}\n/**\n * @ignore exporting this only for the unit test\n */\nexport function createHelpMenu (options: HeaderOptions, helpMenuItems: MenuItems[]) {\n if (!helpMenuItems) return\n const helpMenuList = document.createElement('ul')\n helpMenuList.setAttribute('style', style.headerUserMenuList)\n helpMenuItems.forEach(function (menuItem) {\n const menuItemType: string = (menuItem as MenuItemLink).url ? 'url' : 'onclick'\n if (menuItemType === 'url') {\n helpMenuList.appendChild(createUserMenuItem(createUserMenuLink(menuItem.label, (menuItem as MenuItemLink).url, (menuItem as MenuItemLink).target)))\n } else {\n helpMenuList.appendChild(createUserMenuItem(createUserMenuButton(menuItem.label, (menuItem as MenuItemButton).onclick)))\n }\n })\n\n const helpMenu = document.createElement('nav')\n\n helpMenu.setAttribute('style', style.headerUserMenuNavigationMenu)\n helpMenu.setAttribute('aria-hidden', 'true')\n helpMenu.appendChild(helpMenuList)\n\n const helpMenuContainer = document.createElement('div')\n helpMenuContainer.setAttribute('style', style.headerBannerUserMenu)\n helpMenuContainer.setAttribute('style', style.headerUserMenu)\n helpMenuContainer.appendChild(helpMenu)\n\n const helpMenuTrigger = document.createElement('button')\n helpMenuTrigger.setAttribute('style', style.headerUserMenuTrigger)\n helpMenuTrigger.type = 'button'\n\n const helpMenuIcon = document.createElement('img')\n helpMenuIcon.src = (options && options.helpIcon) ? options.helpIcon : icons.iconBase + DEFAULT_HELP_MENU_ICON\n helpMenuIcon.setAttribute('style', style.headerUserMenuTriggerImg)\n helpMenuContainer.appendChild(helpMenuTrigger)\n helpMenuTrigger.appendChild(helpMenuIcon)\n\n const throttledMenuToggle = throttle((event: Event) => toggleMenu(event, helpMenuTrigger, helpMenu), 50)\n helpMenuTrigger.addEventListener('click', throttledMenuToggle)\n let timer = setTimeout(() => null, 0)\n helpMenuContainer.addEventListener('mouseover', event => {\n clearTimeout(timer)\n throttledMenuToggle(event)\n })\n helpMenuContainer.addEventListener('mouseout', event => {\n timer = setTimeout(() => throttledMenuToggle(event), 200)\n })\n\n return helpMenuContainer\n}\n/**\n * @ignore exporting this only for the unit test\n */\nexport function createLoginSignUpButtons () {\n const profileLoginButtonPre = document.createElement('div')\n profileLoginButtonPre.setAttribute('style', style.headerBannerLogin)\n profileLoginButtonPre.appendChild(loginStatusBox(document, null, {}))\n return profileLoginButtonPre\n}\n/**\n * @ignore exporting this only for the unit test\n */\nexport function createUserMenuButton (label: string, onClick: EventListenerOrEventListenerObject): HTMLElement {\n const button = document.createElement('button')\n button.setAttribute('style', style.headerUserMenuButton)\n button.onmouseover = function () {\n button.setAttribute('style', style.headerUserMenuButtonHover)\n }\n button.onmouseout = function () {\n button.setAttribute('style', style.headerUserMenuButton)\n }\n button.addEventListener('click', onClick)\n button.innerText = label\n return button\n}\n/**\n * @ignore exporting this only for the unit test\n */\nexport function createUserMenuLink (label: string, href: string, target?: string): HTMLElement {\n const link = document.createElement('a')\n link.setAttribute('style', style.headerUserMenuLink)\n link.onmouseover = function () {\n link.setAttribute('style', style.headerUserMenuLinkHover)\n }\n link.onmouseout = function () {\n link.setAttribute('style', style.headerUserMenuLink)\n }\n link.href = href\n link.innerText = label\n if (target) link.target = target\n return link\n}\n\n/**\n * @ignore exporting this only for the unit test\n */\nexport async function createUserMenu (store: IndexedFormula, user: NamedNode, userMenuList: MenuItems[]): Promise<HTMLElement> {\n const fetcher = (<any>store).fetcher\n if (fetcher) {\n // Making sure that Profile is loaded before building menu\n await fetcher.load(user)\n }\n\n const loggedInMenuList = document.createElement('ul')\n loggedInMenuList.setAttribute('style', style.headerUserMenuList)\n if (userMenuList) {\n userMenuList.forEach(function (menuItem) {\n const menuItemType: string = (menuItem as MenuItemLink).url ? 'url' : 'onclick'\n if (menuItemType === 'url') {\n loggedInMenuList.appendChild(createUserMenuItem(createUserMenuLink(menuItem.label, (menuItem as MenuItemLink).url, (menuItem as MenuItemLink).target)))\n } else {\n loggedInMenuList.appendChild(createUserMenuItem(createUserMenuButton(menuItem.label, (menuItem as MenuItemButton).onclick)))\n }\n })\n }\n const loggedInMenu = document.createElement('nav')\n\n loggedInMenu.setAttribute('style', style.headerUserMenuNavigationMenu)\n loggedInMenu.setAttribute('aria-hidden', 'true')\n loggedInMenu.appendChild(loggedInMenuList)\n\n const loggedInMenuTrigger = document.createElement('button')\n loggedInMenuTrigger.setAttribute('style', style.headerUserMenuTrigger)\n loggedInMenuTrigger.type = 'button'\n const profileImg = getProfileImg(store, user)\n if (typeof profileImg === 'string') {\n loggedInMenuTrigger.innerHTML = profileImg\n } else {\n loggedInMenuTrigger.appendChild(profileImg)\n }\n\n const loggedInMenuContainer = document.createElement('div')\n loggedInMenuContainer.setAttribute('style', style.headerBannerUserMenu)\n loggedInMenuContainer.setAttribute('style', style.headerUserMenu)\n loggedInMenuContainer.appendChild(loggedInMenuTrigger)\n loggedInMenuContainer.appendChild(loggedInMenu)\n\n const throttledMenuToggle = throttle((event: Event) => toggleMenu(event, loggedInMenuTrigger, loggedInMenu), 50)\n loggedInMenuTrigger.addEventListener('click', throttledMenuToggle)\n let timer = setTimeout(() => null, 0)\n loggedInMenuContainer.addEventListener('mouseover', event => {\n clearTimeout(timer)\n throttledMenuToggle(event)\n })\n loggedInMenuContainer.addEventListener('mouseout', event => {\n timer = setTimeout(() => throttledMenuToggle(event), 200)\n })\n\n return loggedInMenuContainer\n}\n\n/**\n * @ignore exporting this only for the unit test\n */\nexport function createUserMenuItem (child: HTMLElement): HTMLElement {\n const menuProfileItem = document.createElement('li')\n menuProfileItem.setAttribute('style', style.headerUserMenuListItem)\n menuProfileItem.appendChild(child)\n return menuProfileItem\n}\n/**\n * @ignore exporting this only for the unit test\n */\nexport function getProfileImg (store: IndexedFormula, user: NamedNode): string | HTMLElement {\n let profileUrl = null\n try {\n profileUrl = widgets.findImage(user)\n if (!profileUrl) {\n return emptyProfile\n }\n } catch {\n return emptyProfile\n }\n\n const profileImage = document.createElement('div')\n profileImage.setAttribute('style', style.headerUserMenuPhoto)\n profileImage.style.backgroundImage = `url(${profileUrl})`\n return profileImage\n}\n\n/**\n * @internal\n */\nfunction toggleMenu (event: Event, trigger: HTMLButtonElement, menu: HTMLElement): void {\n const isExpanded = trigger.getAttribute('aria-expanded') === 'true'\n const expand = event.type === 'mouseover'\n const close = event.type === 'mouseout'\n if ((isExpanded && expand) || (!isExpanded && close)) {\n return\n }\n trigger.setAttribute('aria-expanded', (!isExpanded).toString())\n menu.setAttribute('aria-hidden', isExpanded.toString())\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;AAMA,IAAAA,MAAA,GAAAC,OAAA;AACA,IAAAC,WAAA,GAAAD,OAAA;AACA,IAAAE,MAAA,GAAAF,OAAA;AAEA,IAAAG,OAAA,GAAAC,uBAAA,CAAAJ,OAAA;AACA,IAAAK,KAAA,GAAAD,uBAAA,CAAAJ,OAAA;AACA,IAAAM,aAAA,GAAAN,OAAA;AACA,IAAAO,oBAAA,GAAAP,OAAA;AAA+D,SAAAQ,yBAAAC,WAAA,eAAAC,OAAA,kCAAAC,iBAAA,OAAAD,OAAA,QAAAE,gBAAA,OAAAF,OAAA,YAAAF,wBAAA,YAAAA,yBAAAC,WAAA,WAAAA,WAAA,GAAAG,gBAAA,GAAAD,iBAAA,KAAAF,WAAA;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IAAIG,KAAM,EAAE;IACpD;EACF;EACAL,OAAO,CAAChF,YAAY,CAAC,eAAe,EAAE,CAAC,CAACkF,UAAU,EAAEI,QAAQ,EAAE,CAAC;EAC/DL,IAAI,CAACjF,YAAY,CAAC,aAAa,EAAEkF,UAAU,CAACI,QAAQ,EAAE,CAAC;AACzD"}
|
|
1
|
+
{"version":3,"file":"index.js","names":["_index","require","_solidLogic","_login","widgets","_interopRequireWildcard","_emptyProfile","_headerFooterHelpers","_getRequireWildcardCache","nodeInterop","WeakMap","cacheBabelInterop","cacheNodeInterop","obj","__esModule","_typeof","cache","has","get","newObj","hasPropertyDescriptor","Object","defineProperty","getOwnPropertyDescriptor","key","prototype","hasOwnProperty","call","desc","set","DEFAULT_HELP_MENU_ICON","icons","iconBase","DEFAUL_SOLID_ICON_URL","initHeader","_x","_x2","_x3","_initHeader","apply","arguments","_asyncToGenerator2","_regenerator","mark","_callee2","store","userMenuList","options","header","pod","wrap","_callee2$","_context2","prev","next","document","getElementById","abrupt","getPod","rebuildHeader","authSession","onLogout","onLogin","stop","_callee","user","_callee$","_context","authn","currentUser","innerHTML","t0","createBanner","t1","sent","appendChild","_x4","_x5","_x6","_x7","_x8","_createBanner","_callee3","podLink","image","userMenu","banner","leftSideOfHeader","helpMenu","_callee3$","_context3","createElement","href","uri","addStyleClassToElement","src","logo","createUserMenu","createLoginSignUpButtons","helpMenuList","createHelpMenu","helpMenuItems","forEach","menuItem","menuItemType","url","createUserMenuItem","createUserMenuLink","label","target","createUserMenuButton","onclick","setAttribute","helpMenuContainer","helpMenuTrigger","type","helpMenuIcon","helpIcon","throttledMenuToggle","throttle","event","toggleMenu","addEventListener","timer","setTimeout","clearTimeout","profileLoginButtonPre","loginStatusBox","onClick","button","innerText","link","_x9","_x10","_x11","_createUserMenu","_callee4","fetcher","loggedInMenuList","loggedInMenu","loggedInMenuTrigger","profileImg","loggedInMenuContainer","_callee4$","_context4","load","getProfileImg","child","menuProfileItem","profileUrl","findImage","emptyProfile","_unused","profileImage","style","backgroundImage","concat","trigger","menu","isExpanded","getAttribute","expand","close","toString"],"sources":["../../src/header/index.ts"],"sourcesContent":["/* global EventListenerOrEventListenerObject */\n/*\n This file was copied from mashlib/src/global/header.ts file. It is modified to\n work in solid-ui by adjusting where imported functions are found.\n */\nimport { IndexedFormula, NamedNode } from 'rdflib'\nimport { icons } from '../index'\nimport { authn, authSession } from 'solid-logic'\nimport { loginStatusBox } from '../login/login'\n// import { loginStatusBox, authSession, currentUser } from '../authn/authn'\nimport * as widgets from '../widgets'\nimport { emptyProfile } from './empty-profile'\nimport { addStyleClassToElement, getPod, throttle } from '../utils/headerFooterHelpers'\n\n/**\n * menu icons\n*/\nconst DEFAULT_HELP_MENU_ICON = icons.iconBase + 'noun_help.svg'\nconst DEFAUL_SOLID_ICON_URL = 'https://solidproject.org/assets/img/solid-emblem.svg'\n\nexport type MenuItemLink = {\n label: string,\n url: string,\n target?: string\n}\n\nexport type MenuItemButton = {\n label: string,\n onclick: () => void\n}\n\nexport type MenuItems = MenuItemLink | MenuItemButton\n\n/*\n HeaderOptions allow for customizing the logo and menu list. If a logo is not provided the default\n is solid. Menulist will always show a link to logout and to the users profile.\n */\nexport type HeaderOptions = {\n logo?: string,\n helpIcon?: string,\n helpMenuList?: MenuItems[]\n}\n\n/**\n * Initialize header component, the header object returned depends on whether the user is authenticated.\n * @param store the data store\n * @param userMenuList a list of menu items when the user is logged in\n * @param options allow the header to be customized with a personalized logo, help icon and a help menu list of links or buttons.\n * @returns a header for an authenticated user with menu items given or a login screen\n */\nexport async function initHeader (store: IndexedFormula, userMenuList: MenuItems[], options?: HeaderOptions) {\n const header = document.getElementById('PageHeader')\n if (!header) {\n return\n }\n\n const pod = getPod()\n rebuildHeader(header, store, pod, userMenuList, options)()\n authSession.onLogout(rebuildHeader(header, store, pod, userMenuList, options))\n authSession.onLogin(rebuildHeader(header, store, pod, userMenuList, options))\n}\n/**\n * @ignore exporting this only for the unit test\n */\nexport function rebuildHeader (header: HTMLElement, store: IndexedFormula, pod: NamedNode, userMenuList: MenuItems[], options?: HeaderOptions) {\n return async () => {\n const user = authn.currentUser()\n header.innerHTML = ''\n header.appendChild(await createBanner(store, pod, user, userMenuList, options))\n }\n}\n/**\n * @ignore exporting this only for the unit test\n */\nexport async function createBanner (store: IndexedFormula, pod: NamedNode, user: NamedNode | null, userMenuList: MenuItems[], options?: HeaderOptions): Promise<HTMLElement> {\n const podLink = document.createElement('a')\n podLink.href = pod.uri\n addStyleClassToElement(podLink, ['header-banner__link'])\n const image = document.createElement('img')\n if (options) {\n image.src = options.logo ? options.logo : DEFAUL_SOLID_ICON_URL\n }\n addStyleClassToElement(image, ['header-banner__icon'])\n podLink.appendChild(image)\n\n const userMenu = user\n ? await createUserMenu(store, user, userMenuList)\n : createLoginSignUpButtons()\n\n const banner = document.createElement('div')\n addStyleClassToElement(banner, ['header-banner'])\n banner.appendChild(podLink)\n\n const leftSideOfHeader = document.createElement('div')\n addStyleClassToElement(leftSideOfHeader, ['header-banner__right-menu'])\n leftSideOfHeader.appendChild(userMenu)\n\n if (options && options.helpMenuList) {\n const helpMenu = createHelpMenu(options, options.helpMenuList)\n leftSideOfHeader.appendChild(helpMenu as HTMLDivElement)\n }\n\n banner.appendChild(leftSideOfHeader)\n\n return banner\n}\n/**\n * @ignore exporting this only for the unit test\n */\nexport function createHelpMenu (options: HeaderOptions, helpMenuItems: MenuItems[]) {\n if (!helpMenuItems) return\n const helpMenuList = document.createElement('ul')\n addStyleClassToElement(helpMenuList, ['header-user-menu__list'])\n helpMenuItems.forEach(function (menuItem) {\n const menuItemType: string = (menuItem as MenuItemLink).url ? 'url' : 'onclick'\n if (menuItemType === 'url') {\n helpMenuList.appendChild(createUserMenuItem(createUserMenuLink(menuItem.label, (menuItem as MenuItemLink).url, (menuItem as MenuItemLink).target)))\n } else {\n helpMenuList.appendChild(createUserMenuItem(createUserMenuButton(menuItem.label, (menuItem as MenuItemButton).onclick)))\n }\n })\n\n const helpMenu = document.createElement('nav')\n\n addStyleClassToElement(helpMenu, ['header-user-menu__navigation-menu'])\n helpMenu.setAttribute('aria-hidden', 'true')\n helpMenu.appendChild(helpMenuList)\n\n const helpMenuContainer = document.createElement('div')\n addStyleClassToElement(helpMenuContainer, ['header-banner__user-menu'])\n addStyleClassToElement(helpMenuContainer, ['header-user-menu'])\n helpMenuContainer.appendChild(helpMenu)\n\n const helpMenuTrigger = document.createElement('button')\n addStyleClassToElement(helpMenuTrigger, ['header-user-menu__trigger'])\n helpMenuTrigger.type = 'button'\n\n const helpMenuIcon = document.createElement('img')\n helpMenuIcon.src = (options && options.helpIcon) ? options.helpIcon : icons.iconBase + DEFAULT_HELP_MENU_ICON\n addStyleClassToElement(helpMenuIcon, ['header-banner__help-icon'])\n helpMenuContainer.appendChild(helpMenuTrigger)\n helpMenuTrigger.appendChild(helpMenuIcon)\n\n const throttledMenuToggle = throttle((event: Event) => toggleMenu(event, helpMenuTrigger, helpMenu), 50)\n helpMenuTrigger.addEventListener('click', throttledMenuToggle)\n let timer = setTimeout(() => null, 0)\n helpMenuContainer.addEventListener('mouseover', event => {\n clearTimeout(timer)\n throttledMenuToggle(event)\n })\n helpMenuContainer.addEventListener('mouseout', event => {\n timer = setTimeout(() => throttledMenuToggle(event), 200)\n })\n\n return helpMenuContainer\n}\n/**\n * @ignore exporting this only for the unit test\n */\nexport function createLoginSignUpButtons () {\n const profileLoginButtonPre = document.createElement('div')\n addStyleClassToElement(profileLoginButtonPre, ['header-banner__login'])\n profileLoginButtonPre.appendChild(loginStatusBox(document, null, {}))\n return profileLoginButtonPre\n}\n/**\n * @ignore exporting this only for the unit test\n */\nexport function createUserMenuButton (label: string, onClick: EventListenerOrEventListenerObject): HTMLElement {\n const button = document.createElement('button')\n addStyleClassToElement(button, ['header-user-menu__button'])\n button.addEventListener('click', onClick)\n button.innerText = label\n return button\n}\n/**\n * @ignore exporting this only for the unit test\n */\nexport function createUserMenuLink (label: string, href: string, target?: string): HTMLElement {\n const link = document.createElement('a')\n addStyleClassToElement(link, ['header-user-menu__link'])\n link.href = href\n link.innerText = label\n if (target) link.target = target\n return link\n}\n\n/**\n * @ignore exporting this only for the unit test\n */\nexport async function createUserMenu (store: IndexedFormula, user: NamedNode, userMenuList: MenuItems[]): Promise<HTMLElement> {\n const fetcher = (<any>store).fetcher\n if (fetcher) {\n // Making sure that Profile is loaded before building menu\n await fetcher.load(user)\n }\n\n const loggedInMenuList = document.createElement('ul')\n addStyleClassToElement(loggedInMenuList, ['header-user-menu__list'])\n if (userMenuList) {\n userMenuList.forEach(function (menuItem) {\n const menuItemType: string = (menuItem as MenuItemLink).url ? 'url' : 'onclick'\n if (menuItemType === 'url') {\n loggedInMenuList.appendChild(createUserMenuItem(createUserMenuLink(menuItem.label, (menuItem as MenuItemLink).url, (menuItem as MenuItemLink).target)))\n } else {\n loggedInMenuList.appendChild(createUserMenuItem(createUserMenuButton(menuItem.label, (menuItem as MenuItemButton).onclick)))\n }\n })\n }\n const loggedInMenu = document.createElement('nav')\n\n addStyleClassToElement(loggedInMenu, ['header-user-menu__navigation-menu'])\n loggedInMenu.setAttribute('aria-hidden', 'true')\n loggedInMenu.appendChild(loggedInMenuList)\n\n const loggedInMenuTrigger = document.createElement('button')\n addStyleClassToElement(loggedInMenuTrigger, ['header-user-menu__trigger'])\n loggedInMenuTrigger.type = 'button'\n const profileImg = getProfileImg(store, user)\n if (typeof profileImg === 'string') {\n loggedInMenuTrigger.innerHTML = profileImg\n } else {\n loggedInMenuTrigger.appendChild(profileImg)\n }\n\n const loggedInMenuContainer = document.createElement('div')\n addStyleClassToElement(loggedInMenuContainer, ['header-banner__user-menu'])\n addStyleClassToElement(loggedInMenuContainer, ['header-user-menu'])\n loggedInMenuContainer.appendChild(loggedInMenuTrigger)\n loggedInMenuContainer.appendChild(loggedInMenu)\n\n const throttledMenuToggle = throttle((event: Event) => toggleMenu(event, loggedInMenuTrigger, loggedInMenu), 50)\n loggedInMenuTrigger.addEventListener('click', throttledMenuToggle)\n let timer = setTimeout(() => null, 0)\n loggedInMenuContainer.addEventListener('mouseover', event => {\n clearTimeout(timer)\n throttledMenuToggle(event)\n })\n loggedInMenuContainer.addEventListener('mouseout', event => {\n timer = setTimeout(() => throttledMenuToggle(event), 200)\n })\n\n return loggedInMenuContainer\n}\n\n/**\n * @ignore exporting this only for the unit test\n */\nexport function createUserMenuItem (child: HTMLElement): HTMLElement {\n const menuProfileItem = document.createElement('li')\n addStyleClassToElement(menuProfileItem, ['header-user-menu__list-item'])\n menuProfileItem.appendChild(child)\n return menuProfileItem\n}\n/**\n * @ignore exporting this only for the unit test\n */\nexport function getProfileImg (store: IndexedFormula, user: NamedNode): string | HTMLElement {\n let profileUrl = null\n try {\n profileUrl = widgets.findImage(user)\n if (!profileUrl) {\n return emptyProfile\n }\n } catch {\n return emptyProfile\n }\n\n const profileImage = document.createElement('div')\n addStyleClassToElement(profileImage, ['header-user-menu__photo'])\n profileImage.style.backgroundImage = `url(${profileUrl})`\n return profileImage\n}\n\n/**\n * @internal\n */\nfunction toggleMenu (event: Event, trigger: HTMLButtonElement, menu: HTMLElement): void {\n const isExpanded = trigger.getAttribute('aria-expanded') === 'true'\n const expand = event.type === 'mouseover'\n const close = event.type === 'mouseout'\n if ((isExpanded && expand) || (!isExpanded && close)) {\n return\n }\n trigger.setAttribute('aria-expanded', (!isExpanded).toString())\n menu.setAttribute('aria-hidden', isExpanded.toString())\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;AAMA,IAAAA,MAAA,GAAAC,OAAA;AACA,IAAAC,WAAA,GAAAD,OAAA;AACA,IAAAE,MAAA,GAAAF,OAAA;AAEA,IAAAG,OAAA,GAAAC,uBAAA,CAAAJ,OAAA;AACA,IAAAK,aAAA,GAAAL,OAAA;AACA,IAAAM,oBAAA,GAAAN,OAAA;AAAuF,SAAAO,yBAAAC,WAAA,eAAAC,OAAA,kCAAAC,iBAAA,OAAAD,OAAA,QAAAE,gBAAA,OAAAF,OAAA,YAAAF,wBAAA,YAAAA,yBAAAC,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