solid-ui 2.4.14 → 2.4.15-fb2b21e1
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/lib/acl/access-groups.d.ts +1 -2
- package/lib/acl/access-groups.d.ts.map +1 -1
- package/lib/acl/access-groups.js +4 -1
- package/lib/acl/access-groups.js.map +1 -1
- package/lib/acl/acl.d.ts +1 -2
- package/lib/acl/acl.d.ts.map +1 -1
- package/lib/acl/acl.js +6 -2
- package/lib/acl/acl.js.map +1 -1
- package/lib/footer/index.d.ts +20 -0
- package/lib/footer/index.d.ts.map +1 -0
- package/lib/footer/index.js +147 -0
- package/lib/footer/index.js.map +1 -0
- 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 +11 -8
- package/lib/header/index.d.ts.map +1 -1
- package/lib/header/index.js +81 -69
- package/lib/header/index.js.map +1 -1
- package/lib/header/styleMap.d.ts +0 -2
- package/lib/header/styleMap.d.ts.map +1 -1
- package/lib/header/styleMap.js +1 -5
- package/lib/header/styleMap.js.map +1 -1
- package/lib/index.d.ts +3 -2
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +10 -1
- package/lib/index.js.map +1 -1
- package/lib/logic.d.ts +2 -2
- package/lib/logic.d.ts.map +1 -1
- package/lib/logic.js +16 -12
- package/lib/logic.js.map +1 -1
- package/lib/{header/headerHelpers.d.ts → utils/headerFooterHelpers.d.ts} +11 -3
- package/lib/utils/headerFooterHelpers.d.ts.map +1 -0
- package/lib/utils/headerFooterHelpers.js +189 -0
- package/lib/utils/headerFooterHelpers.js.map +1 -0
- package/lib/versionInfo.js +4 -4
- package/lib/versionInfo.js.map +1 -1
- package/lib/webpack-bundle.js +16998 -326
- package/lib/webpack-bundle.js.map +1 -1
- package/lib/widgets/forms/autocomplete/autocompleteField.js +9 -5
- package/lib/widgets/forms/autocomplete/autocompleteField.js.map +1 -1
- package/lib/widgets/forms/autocomplete/language.js +3 -1
- package/lib/widgets/forms/autocomplete/language.js.map +1 -1
- package/lib/widgets/forms/autocomplete/publicData.js +15 -8
- package/lib/widgets/forms/autocomplete/publicData.js.map +1 -1
- package/package.json +5 -4
- package/lib/header/headerHelpers.d.ts.map +0 -1
- package/lib/header/headerHelpers.js +0 -96
- package/lib/header/headerHelpers.js.map +0 -1
|
@@ -1,96 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
-
|
|
5
|
-
Object.defineProperty(exports, "__esModule", {
|
|
6
|
-
value: true
|
|
7
|
-
});
|
|
8
|
-
exports.addStyleClassToElement = addStyleClassToElement;
|
|
9
|
-
exports.getPod = getPod;
|
|
10
|
-
exports.throttle = throttle;
|
|
11
|
-
|
|
12
|
-
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
13
|
-
|
|
14
|
-
var _rdflib = require("rdflib");
|
|
15
|
-
|
|
16
|
-
var _styleMap = require("./styleMap");
|
|
17
|
-
|
|
18
|
-
var _jss = require("../jss");
|
|
19
|
-
|
|
20
|
-
/*
|
|
21
|
-
Copied from mashlib/src/global/metadata.ts
|
|
22
|
-
*/
|
|
23
|
-
|
|
24
|
-
/**
|
|
25
|
-
* @internal
|
|
26
|
-
*/
|
|
27
|
-
function getStyle(styleClass) {
|
|
28
|
-
return _styleMap.styleMap[styleClass];
|
|
29
|
-
}
|
|
30
|
-
/**
|
|
31
|
-
* @ignore exporting this only for the unit test
|
|
32
|
-
*/
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
function addStyleClassToElement(element, styleClasses) {
|
|
36
|
-
styleClasses.forEach(function (styleClass) {
|
|
37
|
-
var style = getStyle(styleClass);
|
|
38
|
-
|
|
39
|
-
var _getClasses = (0, _jss.getClasses)(document.head, (0, _defineProperty2["default"])({}, styleClass, style)),
|
|
40
|
-
classes = _getClasses.classes;
|
|
41
|
-
|
|
42
|
-
element.classList.add(classes[styleClass]);
|
|
43
|
-
});
|
|
44
|
-
}
|
|
45
|
-
/**
|
|
46
|
-
* @ignore exporting this only for the unit test
|
|
47
|
-
*/
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
function getPod() {
|
|
51
|
-
// @@ TODO: This is given that mashlib runs on NSS - might need to change when we want it to run on other Pod servers
|
|
52
|
-
return (0, _rdflib.sym)(document.location.origin).site();
|
|
53
|
-
}
|
|
54
|
-
/**
|
|
55
|
-
* @ignore exporting this only for the unit test
|
|
56
|
-
*/
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
function throttle(func, wait) {
|
|
60
|
-
var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
|
61
|
-
var context, args, result;
|
|
62
|
-
var timeout = null;
|
|
63
|
-
var previous = 0;
|
|
64
|
-
|
|
65
|
-
var later = function later() {
|
|
66
|
-
previous = !options.leading ? 0 : Date.now();
|
|
67
|
-
timeout = null;
|
|
68
|
-
result = func.apply(context, args);
|
|
69
|
-
if (!timeout) context = args = null;
|
|
70
|
-
};
|
|
71
|
-
|
|
72
|
-
return function () {
|
|
73
|
-
var now = Date.now();
|
|
74
|
-
if (!previous && !options.leading) previous = now;
|
|
75
|
-
var remaining = wait - (now - previous); // @ts-ignore
|
|
76
|
-
|
|
77
|
-
context = this;
|
|
78
|
-
args = arguments;
|
|
79
|
-
|
|
80
|
-
if (remaining <= 0 || remaining > wait) {
|
|
81
|
-
if (timeout) {
|
|
82
|
-
clearTimeout(timeout);
|
|
83
|
-
timeout = null;
|
|
84
|
-
}
|
|
85
|
-
|
|
86
|
-
previous = now;
|
|
87
|
-
result = func.apply(context, args);
|
|
88
|
-
if (!timeout) context = args = null;
|
|
89
|
-
} else if (!timeout && options.trailing !== false) {
|
|
90
|
-
timeout = setTimeout(later, remaining);
|
|
91
|
-
}
|
|
92
|
-
|
|
93
|
-
return result;
|
|
94
|
-
};
|
|
95
|
-
}
|
|
96
|
-
//# sourceMappingURL=headerHelpers.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/header/headerHelpers.ts"],"names":["getStyle","styleClass","styleMap","addStyleClassToElement","element","styleClasses","forEach","style","document","head","classes","classList","add","getPod","location","origin","site","throttle","func","wait","options","context","args","result","timeout","previous","later","leading","Date","now","apply","remaining","arguments","clearTimeout","trailing","setTimeout"],"mappings":";;;;;;;;;;;;;AAGA;;AACA;;AACA;;AALA;AACA;AACA;;AAUA;AACA;AACA;AACA,SAASA,QAAT,CAAmBC,UAAnB,EAA+B;AAC7B,SAAOC,mBAASD,UAAT,CAAP;AACD;AAED;AACA;AACA;;;AACO,SAASE,sBAAT,CAAiCC,OAAjC,EAA+CC,YAA/C,EAAuE;AAC5EA,EAAAA,YAAY,CAACC,OAAb,CAAqB,UAACL,UAAD,EAAgB;AACnC,QAAMM,KAAK,GAAGP,QAAQ,CAACC,UAAD,CAAtB;;AACA,sBAAoB,qBAAWO,QAAQ,CAACC,IAApB,uCAA6BR,UAA7B,EAA0CM,KAA1C,EAApB;AAAA,QAAQG,OAAR,eAAQA,OAAR;;AACAN,IAAAA,OAAO,CAACO,SAAR,CAAkBC,GAAlB,CAAsBF,OAAO,CAACT,UAAD,CAA7B;AACD,GAJD;AAKD;AACD;AACA;AACA;;;AACO,SAASY,MAAT,GAA8B;AACnC;AACA,SAAO,iBAAIL,QAAQ,CAACM,QAAT,CAAkBC,MAAtB,EAA8BC,IAA9B,EAAP;AACD;AACD;AACA;AACA;;;AACO,SAASC,QAAT,CAAmBC,IAAnB,EAAmCC,IAAnC,EAAyG;AAAA,MAAxDC,OAAwD,uEAA7B,EAA6B;AAC9G,MAAIC,OAAJ,EACEC,IADF,EAEEC,MAFF;AAGA,MAAIC,OAAY,GAAG,IAAnB;AACA,MAAIC,QAAQ,GAAG,CAAf;;AACA,MAAMC,KAAK,GAAG,SAARA,KAAQ,GAAY;AACxBD,IAAAA,QAAQ,GAAG,CAACL,OAAO,CAACO,OAAT,GAAmB,CAAnB,GAAuBC,IAAI,CAACC,GAAL,EAAlC;AACAL,IAAAA,OAAO,GAAG,IAAV;AACAD,IAAAA,MAAM,GAAGL,IAAI,CAACY,KAAL,CAAWT,OAAX,EAAoBC,IAApB,CAAT;AACA,QAAI,CAACE,OAAL,EAAcH,OAAO,GAAGC,IAAI,GAAG,IAAjB;AACf,GALD;;AAMA,SAAO,YAAY;AACjB,QAAMO,GAAG,GAAGD,IAAI,CAACC,GAAL,EAAZ;AACA,QAAI,CAACJ,QAAD,IAAa,CAACL,OAAO,CAACO,OAA1B,EAAmCF,QAAQ,GAAGI,GAAX;AACnC,QAAME,SAAS,GAAGZ,IAAI,IAAIU,GAAG,GAAGJ,QAAV,CAAtB,CAHiB,CAIjB;;AACAJ,IAAAA,OAAO,GAAG,IAAV;AACAC,IAAAA,IAAI,GAAGU,SAAP;;AACA,QAAID,SAAS,IAAI,CAAb,IAAkBA,SAAS,GAAGZ,IAAlC,EAAwC;AACtC,UAAIK,OAAJ,EAAa;AACXS,QAAAA,YAAY,CAACT,OAAD,CAAZ;AACAA,QAAAA,OAAO,GAAG,IAAV;AACD;;AACDC,MAAAA,QAAQ,GAAGI,GAAX;AACAN,MAAAA,MAAM,GAAGL,IAAI,CAACY,KAAL,CAAWT,OAAX,EAAoBC,IAApB,CAAT;AACA,UAAI,CAACE,OAAL,EAAcH,OAAO,GAAGC,IAAI,GAAG,IAAjB;AACf,KARD,MAQO,IAAI,CAACE,OAAD,IAAYJ,OAAO,CAACc,QAAR,KAAqB,KAArC,EAA4C;AACjDV,MAAAA,OAAO,GAAGW,UAAU,CAACT,KAAD,EAAQK,SAAR,CAApB;AACD;;AACD,WAAOR,MAAP;AACD,GAnBD;AAoBD","sourcesContent":["/*\n Copied from mashlib/src/global/metadata.ts\n */\nimport { NamedNode, sym } from 'rdflib'\nimport { styleMap } from './styleMap'\nimport { getClasses } from '../jss'\n\ntype ThrottleOptions = {\n leading?: boolean;\n throttling?: boolean;\n trailing?: boolean;\n}\n/**\n * @internal\n */\nfunction getStyle (styleClass) {\n return styleMap[styleClass]\n}\n\n/**\n * @ignore exporting this only for the unit test\n */\nexport function addStyleClassToElement (element: any, styleClasses: string[]) {\n styleClasses.forEach((styleClass) => {\n const style = getStyle(styleClass)\n const { classes } = getClasses(document.head, { [styleClass]: style })\n element.classList.add(classes[styleClass])\n })\n}\n/**\n * @ignore exporting this only for the unit test\n */\nexport function getPod (): NamedNode {\n // @@ TODO: This is given that mashlib runs on NSS - might need to change when we want it to run on other Pod servers\n return sym(document.location.origin).site()\n}\n/**\n * @ignore exporting this only for the unit test\n */\nexport function throttle (func: Function, wait: number, options: ThrottleOptions = {}): (...args: any[]) => any {\n let context: any,\n args: any,\n result: any\n let timeout: any = null\n let previous = 0\n const later = function () {\n previous = !options.leading ? 0 : Date.now()\n timeout = null\n result = func.apply(context, args)\n if (!timeout) context = args = null\n }\n return function () {\n const now = Date.now()\n if (!previous && !options.leading) previous = now\n const remaining = wait - (now - previous)\n // @ts-ignore\n context = this\n args = arguments\n if (remaining <= 0 || remaining > wait) {\n if (timeout) {\n clearTimeout(timeout)\n timeout = null\n }\n previous = now\n result = func.apply(context, args)\n if (!timeout) context = args = null\n } else if (!timeout && options.trailing !== false) {\n timeout = setTimeout(later, remaining)\n }\n return result\n }\n}\n"],"file":"headerHelpers.js"}
|