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.
Files changed (60) hide show
  1. package/dist/index.html +1 -9
  2. package/dist/{main.js → solid-ui.js} +5797 -505
  3. package/dist/solid-ui.js.map +1 -0
  4. package/dist/solid-ui.min.js +3 -0
  5. package/dist/solid-ui.min.js.LICENSE.txt +117 -0
  6. package/dist/solid-ui.min.js.map +1 -0
  7. package/lib/acl/access-controller.d.ts +3 -2
  8. package/lib/acl/access-controller.d.ts.map +1 -1
  9. package/lib/acl/access-controller.js +15 -17
  10. package/lib/acl/access-controller.js.map +1 -1
  11. package/lib/acl/access-groups.d.ts.map +1 -1
  12. package/lib/acl/access-groups.js +8 -78
  13. package/lib/acl/access-groups.js.map +1 -1
  14. package/lib/acl/acl-control.d.ts.map +1 -1
  15. package/lib/acl/acl-control.js +11 -10
  16. package/lib/acl/acl-control.js.map +1 -1
  17. package/lib/acl/acl.d.ts +1 -1
  18. package/lib/acl/acl.js +1 -1
  19. package/lib/acl/acl.js.map +1 -1
  20. package/lib/acl/add-agent-buttons.d.ts.map +1 -1
  21. package/lib/acl/add-agent-buttons.js +3 -4
  22. package/lib/acl/add-agent-buttons.js.map +1 -1
  23. package/lib/acl/styles.d.ts +90 -0
  24. package/lib/acl/styles.d.ts.map +1 -0
  25. package/lib/acl/styles.js +98 -0
  26. package/lib/acl/styles.js.map +1 -0
  27. package/lib/footer/index.d.ts.map +1 -1
  28. package/lib/footer/index.js +1 -5
  29. package/lib/footer/index.js.map +1 -1
  30. package/lib/footer/styleMap.d.ts +8 -0
  31. package/lib/footer/styleMap.d.ts.map +1 -0
  32. package/lib/footer/styleMap.js +15 -0
  33. package/lib/footer/styleMap.js.map +1 -0
  34. package/lib/header/index.d.ts.map +1 -1
  35. package/lib/header/index.js +20 -33
  36. package/lib/header/index.js.map +1 -1
  37. package/lib/header/styleMap.d.ts +117 -0
  38. package/lib/header/styleMap.d.ts.map +1 -0
  39. package/lib/header/styleMap.js +139 -0
  40. package/lib/header/styleMap.js.map +1 -0
  41. package/lib/jss/index.d.ts +20 -0
  42. package/lib/jss/index.d.ts.map +1 -0
  43. package/lib/jss/index.js +47 -0
  44. package/lib/jss/index.js.map +1 -0
  45. package/lib/login/login.d.ts.map +1 -1
  46. package/lib/login/login.js +37 -33
  47. package/lib/login/login.js.map +1 -1
  48. package/lib/style.js +2 -57
  49. package/lib/style.js.map +1 -1
  50. package/lib/utils/headerFooterHelpers.d.ts +4 -0
  51. package/lib/utils/headerFooterHelpers.d.ts.map +1 -1
  52. package/lib/utils/headerFooterHelpers.js +27 -0
  53. package/lib/utils/headerFooterHelpers.js.map +1 -1
  54. package/lib/versionInfo.js +2 -2
  55. package/lib/versionInfo.js.map +1 -1
  56. package/lib/widgets/buttons.d.ts.map +1 -1
  57. package/lib/widgets/buttons.js +49 -43
  58. package/lib/widgets/buttons.js.map +1 -1
  59. package/package.json +8 -5
  60. package/dist/main.js.map +0 -1
@@ -0,0 +1,117 @@
1
+ export declare const styleMap: {
2
+ 'header-user-menu': {};
3
+ 'header-user-menu__link': {
4
+ background: string;
5
+ border: string;
6
+ color: string;
7
+ cursor: string;
8
+ display: string;
9
+ fontFamily: string;
10
+ fontSize: string;
11
+ textAlign: string;
12
+ padding: string;
13
+ width: string;
14
+ '&:focus, &:hover': {
15
+ backgroundColor: string;
16
+ };
17
+ a: {
18
+ textDecoration: string;
19
+ };
20
+ };
21
+ 'header-user-menu__trigger': {
22
+ background: string;
23
+ border: string;
24
+ cursor: string;
25
+ width: string;
26
+ height: string;
27
+ img: {
28
+ borderRadius: string;
29
+ height: string;
30
+ width: string;
31
+ };
32
+ };
33
+ 'header-user-menu__button': {
34
+ background: string;
35
+ border: string;
36
+ color: string;
37
+ cursor: string;
38
+ display: string;
39
+ fontFamily: string;
40
+ fontSize: string;
41
+ textAlign: string;
42
+ padding: string;
43
+ width: string;
44
+ '&:focus, &:hover': {
45
+ backgroundColor: string;
46
+ };
47
+ };
48
+ 'header-user-menu__list': {
49
+ listStyle: string;
50
+ margin: string;
51
+ padding: string;
52
+ };
53
+ 'header-user-menu__navigation-menu': {
54
+ background: string;
55
+ border: string;
56
+ borderRight: string;
57
+ position: string;
58
+ right: string;
59
+ top: string;
60
+ width: string;
61
+ 'z-index': string;
62
+ '&[aria-hidden = true]': {
63
+ display: string;
64
+ };
65
+ };
66
+ 'header-user-menu__list-item': {
67
+ borderBottom: string;
68
+ '&:last-child': {
69
+ border: string;
70
+ };
71
+ };
72
+ 'header-user-menu__photo': {
73
+ borderRadius: string;
74
+ backgroundPosition: string;
75
+ backgroundRepeat: string;
76
+ backgroundSize: string;
77
+ height: string;
78
+ width: string;
79
+ };
80
+ 'header-banner': {
81
+ boxShadow: string;
82
+ display: string;
83
+ justifyContent: string;
84
+ padding: string;
85
+ marginBottom: string;
86
+ };
87
+ 'header-banner__link': {
88
+ display: string;
89
+ };
90
+ 'header-banner__right-menu': {
91
+ display: string;
92
+ };
93
+ 'header-banner__login': {
94
+ marginLeft: string;
95
+ input: {
96
+ margin: string;
97
+ padding: string;
98
+ };
99
+ };
100
+ 'header-banner__user-menu': {
101
+ borderLeft: string;
102
+ marginLeft: string;
103
+ };
104
+ 'header-banner__help-menu': {
105
+ borderLeft: string;
106
+ marginLeft: string;
107
+ };
108
+ 'header-banner__icon': {
109
+ backgroundSize: string;
110
+ height: string;
111
+ width: string;
112
+ };
113
+ 'header-banner__help-icon': {
114
+ width: string;
115
+ };
116
+ };
117
+ //# sourceMappingURL=styleMap.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"styleMap.d.ts","sourceRoot":"","sources":["../../src/header/styleMap.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,QAAQ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAsHpB,CAAA"}
@@ -0,0 +1,139 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.styleMap = void 0;
7
+ var styleMap = {
8
+ 'header-user-menu': {},
9
+ 'header-user-menu__link': {
10
+ background: 'none',
11
+ border: '0',
12
+ color: 'black',
13
+ cursor: 'pointer',
14
+ display: 'block',
15
+ fontFamily: 'Arial',
16
+ fontSize: '1em',
17
+ textAlign: 'left',
18
+ padding: '1em',
19
+ width: '100%',
20
+ '&:focus, &:hover': {
21
+ backgroundColor: 'linear-gradient(to right, #7C4DFF 0%, #18A9E6 50%, #01C9EA 100%)'
22
+ // backgroundColor: '#eee'
23
+ },
24
+
25
+ a: {
26
+ textDecoration: 'none'
27
+ }
28
+ },
29
+ 'header-user-menu__trigger': {
30
+ background: 'none',
31
+ border: '0',
32
+ cursor: 'pointer',
33
+ width: '60px',
34
+ // defined in mashlib as a SASS variable $icon_size
35
+ height: '60px',
36
+ // defined in mashlib as a SASS variable $icon_size
37
+ img: {
38
+ borderRadius: '50%',
39
+ height: '56px',
40
+ // defined in mashlib as a SASS variable $icon_size - 4px
41
+ width: '56px'
42
+ }
43
+ },
44
+ 'header-user-menu__button': {
45
+ background: 'none',
46
+ border: '0',
47
+ color: 'black',
48
+ cursor: 'pointer',
49
+ display: 'block',
50
+ fontFamily: 'Arial',
51
+ fontSize: '1em',
52
+ textAlign: 'left',
53
+ padding: '1em',
54
+ width: '100%',
55
+ '&:focus, &:hover': {
56
+ backgroundColor: 'linear-gradient(to right, #7C4DFF 0%, #18A9E6 50%, #01C9EA 100%)'
57
+ }
58
+ },
59
+ 'header-user-menu__list': {
60
+ listStyle: 'none',
61
+ margin: '0',
62
+ padding: '0'
63
+ },
64
+ 'header-user-menu__navigation-menu': {
65
+ background: 'white',
66
+ border: 'solid 1px #000000',
67
+ // the color was defined in mashlib as a SASS variable $divider_color
68
+ borderRight: '0',
69
+ position: 'absolute',
70
+ right: '0',
71
+ top: '60px',
72
+ // defined in mashlib as a SASS variable $icon_size
73
+ width: '200px',
74
+ 'z-index': '1',
75
+ '&[aria-hidden = true]': {
76
+ display: 'none'
77
+ }
78
+ },
79
+ 'header-user-menu__list-item': {
80
+ borderBottom: 'solid 1px #000000',
81
+ // the color was defined in mashlib as a SASS variable $divider_color
82
+ '&:last-child': {
83
+ border: '0'
84
+ }
85
+ },
86
+ 'header-user-menu__photo': {
87
+ borderRadius: '50%',
88
+ backgroundPosition: 'center',
89
+ backgroundRepeat: 'no-repeat',
90
+ backgroundSize: 'cover',
91
+ height: '50px',
92
+ // $icon-size - $image-margin * 2 image-margin was 5px in mashlib and icon size 60px
93
+ width: '50px'
94
+ },
95
+ 'header-banner': {
96
+ boxShadow: '0px 1px 4px #000000',
97
+ // the color was defined in mashlib as a SASS variable $divider_color
98
+ display: 'flex',
99
+ justifyContent: 'space-between',
100
+ padding: '0 1.5em',
101
+ marginBottom: '4px'
102
+ },
103
+ 'header-banner__link': {
104
+ display: 'block'
105
+ },
106
+ 'header-banner__right-menu': {
107
+ display: 'flex'
108
+ },
109
+ 'header-banner__login': {
110
+ marginLeft: 'auto',
111
+ input: {
112
+ // hacks to override the default style of login and signup button from solid-ui
113
+ margin: '0.75em 0 0.75em 0.5em !important',
114
+ padding: '0.5em !important'
115
+ }
116
+ },
117
+ 'header-banner__user-menu': {
118
+ borderLeft: 'solid 1px #000000',
119
+ // the color was defined in mashlib as a SASS variable $divider_color
120
+ marginLeft: 'auto'
121
+ },
122
+ 'header-banner__help-menu': {
123
+ borderLeft: 'solid 1px #000000',
124
+ // the color was defined in mashlib as a SASS variable $divider_color
125
+ marginLeft: 'auto'
126
+ },
127
+ 'header-banner__icon': {
128
+ backgroundSize: '65px 60px',
129
+ height: '60px !important',
130
+ // this is the icon size
131
+ width: '65px !important' // may just be 65px round($icon-size * 352 / 322);
132
+ },
133
+
134
+ 'header-banner__help-icon': {
135
+ width: '28px !important'
136
+ }
137
+ };
138
+ exports.styleMap = styleMap;
139
+ //# sourceMappingURL=styleMap.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"styleMap.js","names":["styleMap","background","border","color","cursor","display","fontFamily","fontSize","textAlign","padding","width","backgroundColor","a","textDecoration","height","img","borderRadius","listStyle","margin","borderRight","position","right","top","borderBottom","backgroundPosition","backgroundRepeat","backgroundSize","boxShadow","justifyContent","marginBottom","marginLeft","input","borderLeft","exports"],"sources":["../../src/header/styleMap.ts"],"sourcesContent":["export const styleMap = {\n 'header-user-menu': {\n },\n 'header-user-menu__link': {\n background: 'none',\n border: '0',\n color: 'black',\n cursor: 'pointer',\n display: 'block',\n fontFamily: 'Arial',\n fontSize: '1em',\n textAlign: 'left',\n padding: '1em',\n width: '100%',\n '&:focus, &:hover': {\n backgroundColor: 'linear-gradient(to right, #7C4DFF 0%, #18A9E6 50%, #01C9EA 100%)'\n // backgroundColor: '#eee'\n },\n a: {\n textDecoration: 'none'\n }\n },\n 'header-user-menu__trigger': {\n background: 'none',\n border: '0',\n cursor: 'pointer',\n width: '60px', // defined in mashlib as a SASS variable $icon_size\n height: '60px', // defined in mashlib as a SASS variable $icon_size\n img: {\n borderRadius: '50%',\n height: '56px', // defined in mashlib as a SASS variable $icon_size - 4px\n width: '56px'\n }\n },\n 'header-user-menu__button': {\n background: 'none',\n border: '0',\n color: 'black',\n cursor: 'pointer',\n display: 'block',\n fontFamily: 'Arial',\n fontSize: '1em',\n textAlign: 'left',\n padding: '1em',\n width: '100%',\n '&:focus, &:hover': {\n backgroundColor: 'linear-gradient(to right, #7C4DFF 0%, #18A9E6 50%, #01C9EA 100%)'\n }\n },\n 'header-user-menu__list': {\n listStyle: 'none',\n margin: '0',\n padding: '0'\n },\n 'header-user-menu__navigation-menu': {\n background: 'white',\n border: 'solid 1px #000000', // the color was defined in mashlib as a SASS variable $divider_color\n borderRight: '0',\n position: 'absolute',\n right: '0',\n top: '60px', // defined in mashlib as a SASS variable $icon_size\n width: '200px',\n 'z-index': '1',\n '&[aria-hidden = true]': {\n display: 'none'\n }\n },\n 'header-user-menu__list-item': {\n borderBottom: 'solid 1px #000000', // the color was defined in mashlib as a SASS variable $divider_color\n '&:last-child': {\n border: '0'\n }\n },\n 'header-user-menu__photo': {\n borderRadius: '50%',\n backgroundPosition: 'center',\n backgroundRepeat: 'no-repeat',\n backgroundSize: 'cover',\n height: '50px', // $icon-size - $image-margin * 2 image-margin was 5px in mashlib and icon size 60px\n width: '50px'\n },\n 'header-banner': {\n boxShadow: '0px 1px 4px #000000', // the color was defined in mashlib as a SASS variable $divider_color\n display: 'flex',\n justifyContent: 'space-between',\n padding: '0 1.5em',\n marginBottom: '4px'\n },\n 'header-banner__link': {\n display: 'block'\n },\n 'header-banner__right-menu': {\n display: 'flex'\n },\n 'header-banner__login': {\n marginLeft: 'auto',\n input: {\n // hacks to override the default style of login and signup button from solid-ui\n margin: '0.75em 0 0.75em 0.5em !important',\n padding: '0.5em !important'\n }\n },\n 'header-banner__user-menu': {\n borderLeft: 'solid 1px #000000', // the color was defined in mashlib as a SASS variable $divider_color\n marginLeft: 'auto'\n },\n 'header-banner__help-menu': {\n borderLeft: 'solid 1px #000000', // the color was defined in mashlib as a SASS variable $divider_color\n marginLeft: 'auto'\n },\n 'header-banner__icon': {\n backgroundSize: '65px 60px',\n height: '60px !important', // this is the icon size\n width: '65px !important' // may just be 65px round($icon-size * 352 / 322);\n },\n 'header-banner__help-icon': {\n width: '28px !important'\n }\n}\n"],"mappings":";;;;;;AAAO,IAAMA,QAAQ,GAAG;EACtB,kBAAkB,EAAE,CACpB,CAAC;EACD,wBAAwB,EAAE;IACxBC,UAAU,EAAE,MAAM;IAClBC,MAAM,EAAE,GAAG;IACXC,KAAK,EAAE,OAAO;IACdC,MAAM,EAAE,SAAS;IACjBC,OAAO,EAAE,OAAO;IAChBC,UAAU,EAAE,OAAO;IACnBC,QAAQ,EAAE,KAAK;IACfC,SAAS,EAAE,MAAM;IACjBC,OAAO,EAAE,KAAK;IACdC,KAAK,EAAE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,YAAY,EAAE,KAAK;IACnBQ,kBAAkB,EAAE,QAAQ;IAC5BC,gBAAgB,EAAE,WAAW;IAC7BC,cAAc,EAAE,OAAO;IACvBZ,MAAM,EAAE,MAAM;IAAE;IAChBJ,KAAK,EAAE;EACT,CAAC;EACD,eAAe,EAAE;IACfiB,SAAS,EAAE,qBAAqB;IAAE;IAClCtB,OAAO,EAAE,MAAM;IACfuB,cAAc,EAAE,eAAe;IAC/BnB,OAAO,EAAE,SAAS;IAClBoB,YAAY,EAAE;EAChB,CAAC;EACD,qBAAqB,EAAE;IACrBxB,OAAO,EAAE;EACX,CAAC;EACD,2BAA2B,EAAE;IAC3BA,OAAO,EAAE;EACX,CAAC;EACD,sBAAsB,EAAE;IACtByB,UAAU,EAAE,MAAM;IAClBC,KAAK,EAAE;MACL;MACAb,MAAM,EAAE,kCAAkC;MAC1CT,OAAO,EAAE;IACX;EACF,CAAC;EACD,0BAA0B,EAAE;IAC1BuB,UAAU,EAAE,mBAAmB;IAAE;IACjCF,UAAU,EAAE;EACd,CAAC;EACD,0BAA0B,EAAE;IAC1BE,UAAU,EAAE,mBAAmB;IAAE;IACjCF,UAAU,EAAE;EACd,CAAC;EACD,qBAAqB,EAAE;IACrBJ,cAAc,EAAE,WAAW;IAC3BZ,MAAM,EAAE,iBAAiB;IAAE;IAC3BJ,KAAK,EAAE,iBAAiB,CAAC;EAC3B,CAAC;;EACD,0BAA0B,EAAE;IAC1BA,KAAK,EAAE;EACT;AACF,CAAC;AAAAuB,OAAA,CAAAjC,QAAA,GAAAA,QAAA"}
@@ -0,0 +1,20 @@
1
+ /**
2
+ * Contains [[getClasses]] and [[getStylesheet]] functions,
3
+ * usable as wrappers around JSS (A CSS authoring tool).
4
+ * See https://cssinjs.org/
5
+ * @packageDocumentation
6
+ */
7
+ import { Jss, Styles, StyleSheet } from 'jss';
8
+ /**
9
+ * returns a StyleSheet object.
10
+ * See https://cssinjs.org/ for more info about JSS.
11
+ * (despite the name, see https://github.com/solidos/solid-ui/issues/199)
12
+ */
13
+ export declare function getClasses(insertionPoint: HTMLElement, styles: Partial<Styles>): StyleSheet;
14
+ /**
15
+ * returns a JSS object.
16
+ * See https://cssinjs.org/ for more info about JSS.
17
+ * (despite the name, see https://github.com/solidos/solid-ui/issues/199)
18
+ */
19
+ export declare function getStylesheet(insertionPoint: HTMLElement): Jss;
20
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/jss/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAU,GAAG,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,KAAK,CAAA;AAKrD;;;;GAIG;AACH,wBAAgB,UAAU,CAAE,cAAc,EAAE,WAAW,EAAE,MAAM,EAAE,OAAO,CAAC,MAAM,CAAC,GAAG,UAAU,CAG5F;AAED;;;;GAIG;AACH,wBAAgB,aAAa,CAAE,cAAc,EAAE,WAAW,GAAG,GAAG,CAW/D"}
@@ -0,0 +1,47 @@
1
+ "use strict";
2
+
3
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
+ Object.defineProperty(exports, "__esModule", {
5
+ value: true
6
+ });
7
+ exports.getClasses = getClasses;
8
+ exports.getStylesheet = getStylesheet;
9
+ var _jss = require("jss");
10
+ var _jssPresetDefault = _interopRequireDefault(require("jss-preset-default"));
11
+ /**
12
+ * Contains [[getClasses]] and [[getStylesheet]] functions,
13
+ * usable as wrappers around JSS (A CSS authoring tool).
14
+ * See https://cssinjs.org/
15
+ * @packageDocumentation
16
+ */
17
+
18
+ var stylesheetsMap = new Map();
19
+
20
+ /**
21
+ * returns a StyleSheet object.
22
+ * See https://cssinjs.org/ for more info about JSS.
23
+ * (despite the name, see https://github.com/solidos/solid-ui/issues/199)
24
+ */
25
+ function getClasses(insertionPoint, styles) {
26
+ var stylesheet = getStylesheet(insertionPoint);
27
+ return stylesheet.createStyleSheet(styles).attach();
28
+ }
29
+
30
+ /**
31
+ * returns a JSS object.
32
+ * See https://cssinjs.org/ for more info about JSS.
33
+ * (despite the name, see https://github.com/solidos/solid-ui/issues/199)
34
+ */
35
+ function getStylesheet(insertionPoint) {
36
+ var cachedStylesheet = stylesheetsMap.get(insertionPoint);
37
+ if (cachedStylesheet) {
38
+ return cachedStylesheet;
39
+ }
40
+ var stylesheet = (0, _jss.create)({
41
+ insertionPoint: insertionPoint,
42
+ plugins: (0, _jssPresetDefault["default"])().plugins
43
+ });
44
+ stylesheetsMap.set(insertionPoint, stylesheet);
45
+ return stylesheet;
46
+ }
47
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","names":["_jss","require","_jssPresetDefault","_interopRequireDefault","stylesheetsMap","Map","getClasses","insertionPoint","styles","stylesheet","getStylesheet","createStyleSheet","attach","cachedStylesheet","get","create","plugins","preset","set"],"sources":["../../src/jss/index.ts"],"sourcesContent":["/**\n * Contains [[getClasses]] and [[getStylesheet]] functions,\n * usable as wrappers around JSS (A CSS authoring tool).\n * See https://cssinjs.org/\n * @packageDocumentation\n */\n\nimport { create, Jss, Styles, StyleSheet } from 'jss'\nimport preset from 'jss-preset-default'\n\nconst stylesheetsMap = new Map<HTMLElement, Jss>()\n\n/**\n * returns a StyleSheet object.\n * See https://cssinjs.org/ for more info about JSS.\n * (despite the name, see https://github.com/solidos/solid-ui/issues/199)\n */\nexport function getClasses (insertionPoint: HTMLElement, styles: Partial<Styles>): StyleSheet {\n const stylesheet = getStylesheet(insertionPoint)\n return stylesheet.createStyleSheet(styles).attach()\n}\n\n/**\n * returns a JSS object.\n * See https://cssinjs.org/ for more info about JSS.\n * (despite the name, see https://github.com/solidos/solid-ui/issues/199)\n */\nexport function getStylesheet (insertionPoint: HTMLElement): Jss {\n const cachedStylesheet = stylesheetsMap.get(insertionPoint)\n if (cachedStylesheet) {\n return cachedStylesheet\n }\n const stylesheet = create({\n insertionPoint,\n plugins: preset().plugins\n })\n stylesheetsMap.set(insertionPoint, stylesheet)\n return stylesheet\n}\n"],"mappings":";;;;;;;;AAOA,IAAAA,IAAA,GAAAC,OAAA;AACA,IAAAC,iBAAA,GAAAC,sBAAA,CAAAF,OAAA;AARA;AACA;AACA;AACA;AACA;AACA;;AAKA,IAAMG,cAAc,GAAG,IAAIC,GAAG,EAAoB;;AAElD;AACA;AACA;AACA;AACA;AACO,SAASC,UAAUA,CAAEC,cAA2B,EAAEC,MAAuB,EAAc;EAC5F,IAAMC,UAAU,GAAGC,aAAa,CAACH,cAAc,CAAC;EAChD,OAAOE,UAAU,CAACE,gBAAgB,CAACH,MAAM,CAAC,CAACI,MAAM,EAAE;AACrD;;AAEA;AACA;AACA;AACA;AACA;AACO,SAASF,aAAaA,CAAEH,cAA2B,EAAO;EAC/D,IAAMM,gBAAgB,GAAGT,cAAc,CAACU,GAAG,CAACP,cAAc,CAAC;EAC3D,IAAIM,gBAAgB,EAAE;IACpB,OAAOA,gBAAgB;EACzB;EACA,IAAMJ,UAAU,GAAG,IAAAM,WAAM,EAAC;IACxBR,cAAc,EAAdA,cAAc;IACdS,OAAO,EAAE,IAAAC,4BAAM,GAAE,CAACD;EACpB,CAAC,CAAC;EACFZ,cAAc,CAACc,GAAG,CAACX,cAAc,EAAEE,UAAU,CAAC;EAC9C,OAAOA,UAAU;AACnB"}
@@ -1 +1 @@
1
- {"version":3,"file":"login.d.ts","sourceRoot":"","sources":["../../src/login/login.ts"],"names":[],"mappings":"AACA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,OAAO,EAAE,cAAc,EAAE,MAAM,eAAe,CAAA;AAC9C,OAAO,EAAa,SAAS,EAAM,MAAM,QAAQ,CAAA;AAGjD,OAAO,EACL,UAAU,EACV,qBAAqB,EAYtB,MAAM,aAAa,CAAA;AAwBpB;;;;GAIG;AAEH,wBAAgB,cAAc,CAAE,OAAO,EAAE,qBAAqB,GAAG,OAAO,CAAC,qBAAqB,CAAC,CAwB9F;AAED;;;;;;;GAOG;AAEH,wBA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AAY,EACjB,UAAU,EAAE,UAAU,EACtB,QAAQ,EAAE,CAAC,SAAS,EAAE,MAAM,GAAG,IAAI,EAAE,OAAO,EAAE,MAAM,KAAK,IAAI,GAC5D,WAAW,CAmBb;AACD;;;GAGG;AACH,wBAAsB,YAAY,IAAK,OAAO,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC,CAgB/D;AAED;;GAEG;AACH,wBAAsB,oBAAoB,CACxC,KAAK,EAAE,KAAK,CAAC,cAAc,CAAC,GAC3B,OAAO,CAAC,KAAK,CAAC,cAAc,CAAC,CAAC,CAGhC"}
@@ -24,10 +24,10 @@ var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime/helpers/
24
24
  var _rdflib = require("rdflib");
25
25
  var _solidLogic = require("solid-logic");
26
26
  var debug = _interopRequireWildcard(require("../debug"));
27
- var style = _interopRequireWildcard(require("../style"));
28
27
  var _log = require("../log");
29
28
  var ns = _interopRequireWildcard(require("../ns.js"));
30
29
  var _signup = require("../signup/signup.js");
30
+ var _style = require("../style");
31
31
  var utils = _interopRequireWildcard(require("../utils"));
32
32
  var widgets = _interopRequireWildcard(require("../widgets"));
33
33
  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); }
@@ -576,7 +576,7 @@ function signInOrSignUpBox(dom, setUserCallback) {
576
576
  box.appendChild(signInPopUpButton);
577
577
  signInPopUpButton.setAttribute('type', 'button');
578
578
  signInPopUpButton.setAttribute('value', 'Log in');
579
- signInPopUpButton.setAttribute('style', "".concat(signInButtonStyle, "background-color: #eef;").concat(style.headerBannerLoginInput));
579
+ signInPopUpButton.setAttribute('style', "".concat(signInButtonStyle, "background-color: #eef;"));
580
580
  _solidLogic.authSession.onLogin(function () {
581
581
  var me = _solidLogic.authn.currentUser();
582
582
  // const sessionInfo = authSession.info
@@ -658,6 +658,8 @@ function renderSignInPopup(dom) {
658
658
  while (1) switch (_context.prev = _context.next) {
659
659
  case 0:
660
660
  _context.prev = 0;
661
+ // clear authorization metadata from store
662
+ _solidLogic.solidLogicSingleton.store.updater.flagAuthorizationMetadata();
661
663
  // Save hash
662
664
  preLoginRedirectHash = new URL(window.location.href).hash;
663
665
  if (preLoginRedirectHash) {
@@ -667,23 +669,23 @@ function renderSignInPopup(dom) {
667
669
  // Login
668
670
  locationUrl = new URL(window.location.href);
669
671
  locationUrl.hash = ''; // remove hash part
670
- _context.next = 8;
672
+ _context.next = 9;
671
673
  return _solidLogic.authSession.login({
672
674
  redirectUrl: locationUrl.href,
673
675
  oidcIssuer: issuerUri
674
676
  });
675
- case 8:
676
- _context.next = 13;
677
+ case 9:
678
+ _context.next = 14;
677
679
  break;
678
- case 10:
679
- _context.prev = 10;
680
+ case 11:
681
+ _context.prev = 11;
680
682
  _context.t0 = _context["catch"](0);
681
683
  (0, _log.alert)(_context.t0.message);
682
- case 13:
684
+ case 14:
683
685
  case "end":
684
686
  return _context.stop();
685
687
  }
686
- }, _callee, null, [[0, 10]]);
688
+ }, _callee, null, [[0, 11]]);
687
689
  }));
688
690
  return function loginToIssuer(_x11) {
689
691
  return _ref.apply(this, arguments);
@@ -835,45 +837,47 @@ _solidLogic.authSession.onLogout( /*#__PURE__*/(0, _asyncToGenerator2["default"]
835
837
  case 0:
836
838
  issuer = window.localStorage.getItem('loginIssuer');
837
839
  if (!issuer) {
838
- _context2.next = 19;
840
+ _context2.next = 20;
839
841
  break;
840
842
  }
841
843
  _context2.prev = 2;
844
+ // clear authorization metadata from store
845
+ _solidLogic.solidLogicSingleton.store.updater.flagAuthorizationMetadata();
842
846
  wellKnownUri = new URL(issuer);
843
847
  wellKnownUri.pathname = '/.well-known/openid-configuration';
844
- _context2.next = 7;
848
+ _context2.next = 8;
845
849
  return fetch(wellKnownUri.toString());
846
- case 7:
850
+ case 8:
847
851
  wellKnownResult = _context2.sent;
848
852
  if (!(wellKnownResult.status === 200)) {
849
- _context2.next = 15;
853
+ _context2.next = 16;
850
854
  break;
851
855
  }
852
- _context2.next = 11;
856
+ _context2.next = 12;
853
857
  return wellKnownResult.json();
854
- case 11:
858
+ case 12:
855
859
  openidConfiguration = _context2.sent;
856
860
  if (!(openidConfiguration && openidConfiguration.end_session_endpoint)) {
857
- _context2.next = 15;
861
+ _context2.next = 16;
858
862
  break;
859
863
  }
860
- _context2.next = 15;
864
+ _context2.next = 16;
861
865
  return fetch(openidConfiguration.end_session_endpoint, {
862
866
  credentials: 'include'
863
867
  });
864
- case 15:
865
- _context2.next = 19;
868
+ case 16:
869
+ _context2.next = 20;
866
870
  break;
867
- case 17:
868
- _context2.prev = 17;
871
+ case 18:
872
+ _context2.prev = 18;
869
873
  _context2.t0 = _context2["catch"](2);
870
- case 19:
871
- window.location.reload();
872
874
  case 20:
875
+ window.location.reload();
876
+ case 21:
873
877
  case "end":
874
878
  return _context2.stop();
875
879
  }
876
- }, _callee2, null, [[2, 17]]);
880
+ }, _callee2, null, [[2, 18]]);
877
881
  })));
878
882
 
879
883
  /**
@@ -1008,12 +1012,12 @@ function selectWorkspace(dom, appDetails, callbackWS) {
1008
1012
  box.appendChild(dom.createElement('hr')); // @@
1009
1013
 
1010
1014
  var p = box.appendChild(dom.createElement('p'));
1011
- p.setAttribute('style', style.commentStyle);
1015
+ p.style = _style.commentStyle;
1012
1016
  p.textContent = "Where would you like to store the data for the ".concat(noun, "?\n Give the URL of the folder where you would like the data stored.\n It can be anywhere in solid world - this URI is just an idea.");
1013
1017
  // @@ TODO Remove the need to cast baseField to any
1014
1018
  var baseField = box.appendChild(dom.createElement('input'));
1015
1019
  baseField.setAttribute('type', 'text');
1016
- baseField.setAttribute('style', style.textInputStyle);
1020
+ baseField.style = _style.textInputStyle;
1017
1021
  baseField.size = 80; // really a string
1018
1022
  baseField.label = 'base URL';
1019
1023
  baseField.autocomplete = 'on';
@@ -1025,7 +1029,7 @@ function selectWorkspace(dom, appDetails, callbackWS) {
1025
1029
  box.appendChild(dom.createElement('br')); // @@
1026
1030
 
1027
1031
  var button = box.appendChild(dom.createElement('button'));
1028
- button.setAttribute('style', style.buttonStyle);
1032
+ button.style = _style.buttonStyle;
1029
1033
  button.textContent = "Start new ".concat(noun, " at this URI");
1030
1034
  button.addEventListener('click', function (_event) {
1031
1035
  var newBase = baseField.value.replace(' ', '%20'); // do not re-encode in general, as % encodings may exist
@@ -1043,7 +1047,7 @@ function selectWorkspace(dom, appDetails, callbackWS) {
1043
1047
  // Ignore master workspaces
1044
1048
  ns.space('MasterWorkspace'));
1045
1049
  });
1046
- var col1, col2, col3, tr, ws, localStyle, comment;
1050
+ var col1, col2, col3, tr, ws, style, comment;
1047
1051
  var cellStyle = 'height: 3em; margin: 1em; padding: 1em white; border-radius: 0.3em;';
1048
1052
  var deselectedStyle = "".concat(cellStyle, "border: 0px;");
1049
1053
  // const selectedStyle = cellStyle + 'border: 1px solid black;'
@@ -1058,8 +1062,8 @@ function selectWorkspace(dom, appDetails, callbackWS) {
1058
1062
  tr.appendChild(col1);
1059
1063
  }
1060
1064
  col2 = dom.createElement('td');
1061
- localStyle = _solidLogic.solidLogicSingleton.store.anyValue(ws, ns.ui('style'));
1062
- if (!localStyle) {
1065
+ style = _solidLogic.solidLogicSingleton.store.anyValue(ws, ns.ui('style'));
1066
+ if (!style) {
1063
1067
  // Otherwise make up arbitrary colour
1064
1068
  var hash = function hash(x) {
1065
1069
  return x.split('').reduce(function (a, b) {
@@ -1068,9 +1072,9 @@ function selectWorkspace(dom, appDetails, callbackWS) {
1068
1072
  }, 0);
1069
1073
  };
1070
1074
  var bgcolor = "#".concat((hash(ws.uri) & 0xffffff | 0xc0c0c0).toString(16)); // c0c0c0 forces pale
1071
- localStyle = "color: black ; background-color: ".concat(bgcolor, ";");
1075
+ style = "color: black ; background-color: ".concat(bgcolor, ";");
1072
1076
  }
1073
- col2.setAttribute('style', deselectedStyle + localStyle);
1077
+ col2.setAttribute('style', deselectedStyle + style);
1074
1078
  tr.target = ws.uri;
1075
1079
  var label = _solidLogic.solidLogicSingleton.store.any(ws, ns.rdfs('label'));
1076
1080
  if (!label) {
@@ -1090,7 +1094,7 @@ function selectWorkspace(dom, appDetails, callbackWS) {
1090
1094
  comment = comment ? comment.value : 'Use this workspace';
1091
1095
  col2.addEventListener('click', function (_event) {
1092
1096
  col3.textContent = comment ? comment.value : '';
1093
- col3.setAttribute('style', deselectedStyle + localStyle);
1097
+ col3.setAttribute('style', deselectedStyle + style);
1094
1098
  var button = dom.createElement('button');
1095
1099
  button.textContent = 'Continue';
1096
1100
  // button.setAttribute('style', style);