@inrupt/solid-client-authn-browser 1.11.9-alpha.1 → 1.11.9-alpha.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.es.js +4 -352
- package/dist/index.es.js.map +1 -0
- package/dist/index.js +12 -360
- package/dist/index.js.map +1 -1
- package/dist/solid-client-authn.bundle.js +14 -363
- package/dist/solid-client-authn.bundle.js.map +1 -0
- package/package.json +8 -5
- package/.eslintrc.js +0 -16
- package/NOTICE +0 -5
- package/coverage/clover.xml +0 -547
- package/coverage/coverage-final.json +0 -28
- package/coverage/lcov-report/base.css +0 -224
- package/coverage/lcov-report/block-navigation.js +0 -87
- package/coverage/lcov-report/favicon.png +0 -0
- package/coverage/lcov-report/index.html +0 -266
- package/coverage/lcov-report/prettify.css +0 -1
- package/coverage/lcov-report/prettify.js +0 -2
- package/coverage/lcov-report/sort-arrow-sprite.png +0 -0
- package/coverage/lcov-report/sorter.js +0 -196
- package/coverage/lcov-report/src/ClientAuthentication.ts.html +0 -631
- package/coverage/lcov-report/src/Session.ts.html +0 -1435
- package/coverage/lcov-report/src/constant.ts.html +0 -163
- package/coverage/lcov-report/src/defaultSession.ts.html +0 -460
- package/coverage/lcov-report/src/dependencies.ts.html +0 -400
- package/coverage/lcov-report/src/iframe.ts.html +0 -394
- package/coverage/lcov-report/src/index.browser.ts.html +0 -157
- package/coverage/lcov-report/src/index.html +0 -206
- package/coverage/lcov-report/src/login/AggregateLoginHandler.ts.html +0 -226
- package/coverage/lcov-report/src/login/index.html +0 -116
- package/coverage/lcov-report/src/login/oidc/AggregateOidcHandler.ts.html +0 -226
- package/coverage/lcov-report/src/login/oidc/ClientRegistrar.ts.html +0 -415
- package/coverage/lcov-report/src/login/oidc/IssuerConfigFetcher.ts.html +0 -646
- package/coverage/lcov-report/src/login/oidc/OidcLoginHandler.ts.html +0 -436
- package/coverage/lcov-report/src/login/oidc/Redirector.ts.html +0 -229
- package/coverage/lcov-report/src/login/oidc/index.html +0 -176
- package/coverage/lcov-report/src/login/oidc/oidcHandlers/AuthorizationCodeWithPkceOidcHandler.ts.html +0 -478
- package/coverage/lcov-report/src/login/oidc/oidcHandlers/OidcHandlerCanHandleTest.ts.html +0 -319
- package/coverage/lcov-report/src/login/oidc/oidcHandlers/index.html +0 -131
- package/coverage/lcov-report/src/login/oidc/redirectHandler/AggregateRedirectHandler.ts.html +0 -226
- package/coverage/lcov-report/src/login/oidc/redirectHandler/AuthCodeRedirectHandler.ts.html +0 -667
- package/coverage/lcov-report/src/login/oidc/redirectHandler/ErrorOidcHandler.ts.html +0 -283
- package/coverage/lcov-report/src/login/oidc/redirectHandler/FallbackRedirectHandler.ts.html +0 -265
- package/coverage/lcov-report/src/login/oidc/redirectHandler/index.html +0 -161
- package/coverage/lcov-report/src/login/oidc/refresh/TokenRefresher.ts.html +0 -385
- package/coverage/lcov-report/src/login/oidc/refresh/index.html +0 -116
- package/coverage/lcov-report/src/login/webid/WebIdLoginHandler.ts.html +0 -250
- package/coverage/lcov-report/src/login/webid/index.html +0 -116
- package/coverage/lcov-report/src/logout/GeneralLogoutHandler.ts.html +0 -220
- package/coverage/lcov-report/src/logout/index.html +0 -116
- package/coverage/lcov-report/src/sessionInfo/SessionInfoManager.ts.html +0 -775
- package/coverage/lcov-report/src/sessionInfo/index.html +0 -116
- package/coverage/lcov-report/src/storage/BrowserStorage.ts.html +0 -229
- package/coverage/lcov-report/src/storage/StorageUtility.ts.html +0 -214
- package/coverage/lcov-report/src/storage/index.html +0 -131
- package/coverage/lcov-report/src/util/UuidGenerator.ts.html +0 -226
- package/coverage/lcov-report/src/util/index.html +0 -131
- package/coverage/lcov-report/src/util/urlPath.ts.html +0 -208
- package/coverage/lcov.info +0 -1001
- package/dist/ClientAuthentication.js +0 -64
- package/dist/ClientAuthentication.js.map +0 -1
- package/dist/Session.js +0 -165
- package/dist/Session.js.map +0 -1
- package/dist/constant.js +0 -7
- package/dist/constant.js.map +0 -1
- package/dist/defaultSession.js +0 -48
- package/dist/defaultSession.js.map +0 -1
- package/dist/dependencies.js +0 -41
- package/dist/dependencies.js.map +0 -1
- package/dist/iframe.js +0 -43
- package/dist/iframe.js.map +0 -1
- package/dist/index.browser.d.ts +0 -1
- package/dist/index.browser.js +0 -28
- package/dist/index.browser.js.map +0 -1
- package/dist/login/AggregateLoginHandler.js +0 -10
- package/dist/login/AggregateLoginHandler.js.map +0 -1
- package/dist/login/oidc/AggregateOidcHandler.js +0 -10
- package/dist/login/oidc/AggregateOidcHandler.js.map +0 -1
- package/dist/login/oidc/ClientRegistrar.js +0 -51
- package/dist/login/oidc/ClientRegistrar.js.map +0 -1
- package/dist/login/oidc/IssuerConfigFetcher.js +0 -124
- package/dist/login/oidc/IssuerConfigFetcher.js.map +0 -1
- package/dist/login/oidc/OidcLoginHandler.js +0 -40
- package/dist/login/oidc/OidcLoginHandler.js.map +0 -1
- package/dist/login/oidc/Redirector.js +0 -21
- package/dist/login/oidc/Redirector.js.map +0 -1
- package/dist/login/oidc/__mocks__/IOidcOptions.d.ts +0 -2
- package/dist/login/oidc/__mocks__/IOidcOptions.js +0 -25
- package/dist/login/oidc/__mocks__/IOidcOptions.js.map +0 -1
- package/dist/login/oidc/oidcHandlers/AuthorizationCodeWithPkceOidcHandler.js +0 -56
- package/dist/login/oidc/oidcHandlers/AuthorizationCodeWithPkceOidcHandler.js.map +0 -1
- package/dist/login/oidc/oidcHandlers/OidcHandlerCanHandleTest.js +0 -47
- package/dist/login/oidc/oidcHandlers/OidcHandlerCanHandleTest.js.map +0 -1
- package/dist/login/oidc/redirectHandler/AggregateRedirectHandler.js +0 -10
- package/dist/login/oidc/redirectHandler/AggregateRedirectHandler.js.map +0 -1
- package/dist/login/oidc/redirectHandler/AuthCodeRedirectHandler.js +0 -92
- package/dist/login/oidc/redirectHandler/AuthCodeRedirectHandler.js.map +0 -1
- package/dist/login/oidc/redirectHandler/ErrorOidcHandler.js +0 -26
- package/dist/login/oidc/redirectHandler/ErrorOidcHandler.js.map +0 -1
- package/dist/login/oidc/redirectHandler/FallbackRedirectHandler.js +0 -20
- package/dist/login/oidc/redirectHandler/FallbackRedirectHandler.js.map +0 -1
- package/dist/login/oidc/refresh/TokenRefresher.js +0 -31
- package/dist/login/oidc/refresh/TokenRefresher.js.map +0 -1
- package/dist/login/webid/WebIdLoginHandler.js +0 -12
- package/dist/login/webid/WebIdLoginHandler.js.map +0 -1
- package/dist/logout/GeneralLogoutHandler.js +0 -15
- package/dist/logout/GeneralLogoutHandler.js.map +0 -1
- package/dist/sessionInfo/SessionInfoManager.js +0 -95
- package/dist/sessionInfo/SessionInfoManager.js.map +0 -1
- package/dist/solid-client-authn.bundle.js.LICENSE.txt +0 -17
- package/dist/storage/BrowserStorage.js +0 -18
- package/dist/storage/BrowserStorage.js.map +0 -1
- package/dist/storage/StorageUtility.js +0 -10
- package/dist/storage/StorageUtility.js.map +0 -1
- package/dist/util/UuidGenerator.js +0 -10
- package/dist/util/UuidGenerator.js.map +0 -1
- package/dist/util/urlPath.js +0 -11
- package/dist/util/urlPath.js.map +0 -1
- package/docs/api/Makefile +0 -76
- package/docs/api/README.md +0 -46
- package/docs/api/build/docs-assets/README.md +0 -183
- package/docs/api/build/docs-assets/_static/css/inrupt.css +0 -349
- package/docs/api/build/docs-assets/_templates/breadcrumb-navigation.html +0 -10
- package/docs/api/build/docs-assets/_templates/copyright.html +0 -3
- package/docs/api/build/docs-assets/_templates/docs-sidebar.html +0 -32
- package/docs/api/build/docs-assets/_templates/docs-version-selector.html +0 -21
- package/docs/api/build/docs-assets/_templates/jira-feedback.html +0 -21
- package/docs/api/build/docs-assets/_templates/layout.html +0 -34
- package/docs/api/build/docs-assets/_templates/matomo.html +0 -18
- package/docs/api/build/docs-assets/_templates/navbar-logo.html +0 -5
- package/docs/api/build/docs-assets/_templates/navbar-nav.html +0 -44
- package/docs/api/build/docs-assets/_templates/prev-next.html +0 -19
- package/docs/api/build/docs-assets/_templates/versioned-canonical.html +0 -8
- package/docs/api/build/docs-assets/themes/inrupt/theme.conf +0 -18
- package/docs/api/build/doctrees/classes/ConfigurationError.doctree +0 -0
- package/docs/api/build/doctrees/classes/InMemoryStorage.doctree +0 -0
- package/docs/api/build/doctrees/classes/NotImplementedError.doctree +0 -0
- package/docs/api/build/doctrees/classes/Session.doctree +0 -0
- package/docs/api/build/doctrees/environment.pickle +0 -0
- package/docs/api/build/doctrees/functions.doctree +0 -0
- package/docs/api/build/doctrees/index.doctree +0 -0
- package/docs/api/build/doctrees/interfaces/ILoginInputOptions.doctree +0 -0
- package/docs/api/build/doctrees/interfaces/ISessionInfo.doctree +0 -0
- package/docs/api/build/doctrees/interfaces/ISessionOptions.doctree +0 -0
- package/docs/api/build/doctrees/interfaces/IStorage.doctree +0 -0
- package/docs/api/build/html/.buildinfo +0 -4
- package/docs/api/build/html/_static/basic.css +0 -905
- package/docs/api/build/html/_static/css/blank.css +0 -2
- package/docs/api/build/html/_static/css/index.ff1ffe594081f20da1ef19478df9384b.css +0 -6
- package/docs/api/build/html/_static/css/inrupt.css +0 -349
- package/docs/api/build/html/_static/css/theme.css +0 -120
- package/docs/api/build/html/_static/doctools.js +0 -323
- package/docs/api/build/html/_static/documentation_options.js +0 -12
- package/docs/api/build/html/_static/file.png +0 -0
- package/docs/api/build/html/_static/jquery-3.5.1.js +0 -10872
- package/docs/api/build/html/_static/jquery.js +0 -2
- package/docs/api/build/html/_static/js/index.be7d3bbb2ef33a8344ce.js +0 -32
- package/docs/api/build/html/_static/language_data.js +0 -297
- package/docs/api/build/html/_static/minus.png +0 -0
- package/docs/api/build/html/_static/plus.png +0 -0
- package/docs/api/build/html/_static/pygments.css +0 -74
- package/docs/api/build/html/_static/searchtools.js +0 -529
- package/docs/api/build/html/_static/underscore-1.13.1.js +0 -2042
- package/docs/api/build/html/_static/underscore.js +0 -6
- package/docs/api/build/html/_static/vendor/fontawesome/5.13.0/LICENSE.txt +0 -34
- package/docs/api/build/html/_static/vendor/fontawesome/5.13.0/css/all.min.css +0 -5
- package/docs/api/build/html/_static/vendor/fontawesome/5.13.0/webfonts/fa-brands-400.eot +0 -0
- package/docs/api/build/html/_static/vendor/fontawesome/5.13.0/webfonts/fa-brands-400.svg +0 -3570
- package/docs/api/build/html/_static/vendor/fontawesome/5.13.0/webfonts/fa-brands-400.ttf +0 -0
- package/docs/api/build/html/_static/vendor/fontawesome/5.13.0/webfonts/fa-brands-400.woff +0 -0
- package/docs/api/build/html/_static/vendor/fontawesome/5.13.0/webfonts/fa-brands-400.woff2 +0 -0
- package/docs/api/build/html/_static/vendor/fontawesome/5.13.0/webfonts/fa-regular-400.eot +0 -0
- package/docs/api/build/html/_static/vendor/fontawesome/5.13.0/webfonts/fa-regular-400.svg +0 -803
- package/docs/api/build/html/_static/vendor/fontawesome/5.13.0/webfonts/fa-regular-400.ttf +0 -0
- package/docs/api/build/html/_static/vendor/fontawesome/5.13.0/webfonts/fa-regular-400.woff +0 -0
- package/docs/api/build/html/_static/vendor/fontawesome/5.13.0/webfonts/fa-regular-400.woff2 +0 -0
- package/docs/api/build/html/_static/vendor/fontawesome/5.13.0/webfonts/fa-solid-900.eot +0 -0
- package/docs/api/build/html/_static/vendor/fontawesome/5.13.0/webfonts/fa-solid-900.svg +0 -4938
- package/docs/api/build/html/_static/vendor/fontawesome/5.13.0/webfonts/fa-solid-900.ttf +0 -0
- package/docs/api/build/html/_static/vendor/fontawesome/5.13.0/webfonts/fa-solid-900.woff +0 -0
- package/docs/api/build/html/_static/vendor/fontawesome/5.13.0/webfonts/fa-solid-900.woff2 +0 -0
- package/docs/api/build/html/_static/webpack-macros.html +0 -25
- package/docs/api/build/html/classes/ConfigurationError.html +0 -726
- package/docs/api/build/html/classes/InMemoryStorage.html +0 -636
- package/docs/api/build/html/classes/NotImplementedError.html +0 -726
- package/docs/api/build/html/classes/Session.html +0 -2428
- package/docs/api/build/html/functions.html +0 -834
- package/docs/api/build/html/genindex.html +0 -311
- package/docs/api/build/html/index.html +0 -342
- package/docs/api/build/html/interfaces/ILoginInputOptions.html +0 -595
- package/docs/api/build/html/interfaces/ISessionInfo.html +0 -481
- package/docs/api/build/html/interfaces/ISessionOptions.html +0 -463
- package/docs/api/build/html/interfaces/IStorage.html +0 -531
- package/docs/api/build/html/objects.inv +0 -0
- package/docs/api/build/html/search.html +0 -340
- package/docs/api/build/html/searchindex.js +0 -1
- package/docs/api/build/source/classes/ConfigurationError.md +0 -159
- package/docs/api/build/source/classes/InMemoryStorage.md +0 -112
- package/docs/api/build/source/classes/NotImplementedError.md +0 -159
- package/docs/api/build/source/classes/Session.md +0 -907
- package/docs/api/build/source/functions.md +0 -235
- package/docs/api/build/source/index.rst +0 -13
- package/docs/api/build/source/interfaces/ILoginInputOptions.md +0 -109
- package/docs/api/build/source/interfaces/ISessionInfo.md +0 -63
- package/docs/api/build/source/interfaces/ISessionOptions.md +0 -60
- package/docs/api/build/source/interfaces/IStorage.md +0 -76
- package/docs/api/conf.py +0 -135
- package/docs/api/redirects.txt +0 -41
- package/docs/api/requirements.txt +0 -5
- package/docs/api/source/api/.nojekyll +0 -1
- package/docs/api/source/api/classes/ConfigurationError.md +0 -163
- package/docs/api/source/api/classes/InMemoryStorage.md +0 -112
- package/docs/api/source/api/classes/NotImplementedError.md +0 -163
- package/docs/api/source/api/classes/Session.md +0 -1426
- package/docs/api/source/api/index.md +0 -251
- package/docs/api/source/api/interfaces/ILoginInputOptions.md +0 -109
- package/docs/api/source/api/interfaces/ISessionInfo.md +0 -63
- package/docs/api/source/api/interfaces/ISessionOptions.md +0 -60
- package/docs/api/source/api/interfaces/IStorage.md +0 -76
- package/docs/api/source/functions.md +0 -3
- package/docs/api/source/index.rst +0 -13
- package/examples/demoAuthentiationMonitor/index.js +0 -34
- package/examples/demoAuthentiationMonitor/package-lock.json +0 -916
- package/examples/demoAuthentiationMonitor/package.json +0 -15
- package/examples/demoClientApp/.babelrc +0 -3
- package/examples/demoClientApp/package-lock.json +0 -11710
- package/examples/demoClientApp/package.json +0 -37
- package/examples/demoClientApp/src/DemoClientApp.js +0 -686
- package/examples/demoClientApp/src/index.html +0 -142
- package/examples/demoClientApp/src/index.js +0 -26
- package/examples/demoClientApp/webpack.config.js +0 -39
- package/examples/single/bundle/.babelrc +0 -3
- package/examples/single/bundle/README.md +0 -11
- package/examples/single/bundle/client-app-profile.ttl +0 -10
- package/examples/single/bundle/package-lock.json +0 -11196
- package/examples/single/bundle/package.json +0 -31
- package/examples/single/bundle/src/App.js +0 -123
- package/examples/single/bundle/src/index.html +0 -10
- package/examples/single/bundle/src/index.js +0 -26
- package/examples/single/bundle/webpack.config.js +0 -33
- package/examples/single/script/README.md +0 -11
- package/examples/single/script/index.html +0 -36
- package/examples/single/script/package-lock.json +0 -1293
- package/examples/single/script/package.json +0 -20
- package/examples/single/script/server.ts +0 -18
- package/jest.config.js +0 -10
- package/licenses.csv +0 -147
- package/rollup.config.js +0 -54
- package/sampleFlows/SolidAuthClientArchitecture.png +0 -0
- package/sampleFlows/authorization-code-with-pkce.png +0 -0
- package/sampleFlows/authorization-code-with-pkce.seqdiag +0 -46
- package/sampleFlows/authorization-code.png +0 -0
- package/sampleFlows/authorization-code.seqdiag +0 -50
- package/sampleFlows/client-credentials.png +0 -0
- package/sampleFlows/client-credentials.seqdiag +0 -38
- package/sampleFlows/legacy-implicit-flow.png +0 -0
- package/sampleFlows/legacy-implicit-flow.seqdiag +0 -43
- package/sampleFlows/self-signed.png +0 -0
- package/sampleFlows/self-signed.seqdiag +0 -49
- package/sampleFlows/signatory-access-control.seqdiag +0 -36
- package/sampleFlows/signatory-access-control.svg +0 -1
- package/tsconfig.eslint.json +0 -6
- package/tsconfig.json +0 -17
|
@@ -1,323 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* doctools.js
|
|
3
|
-
* ~~~~~~~~~~~
|
|
4
|
-
*
|
|
5
|
-
* Sphinx JavaScript utilities for all documentation.
|
|
6
|
-
*
|
|
7
|
-
* :copyright: Copyright 2007-2021 by the Sphinx team, see AUTHORS.
|
|
8
|
-
* :license: BSD, see LICENSE for details.
|
|
9
|
-
*
|
|
10
|
-
*/
|
|
11
|
-
|
|
12
|
-
/**
|
|
13
|
-
* select a different prefix for underscore
|
|
14
|
-
*/
|
|
15
|
-
$u = _.noConflict();
|
|
16
|
-
|
|
17
|
-
/**
|
|
18
|
-
* make the code below compatible with browsers without
|
|
19
|
-
* an installed firebug like debugger
|
|
20
|
-
if (!window.console || !console.firebug) {
|
|
21
|
-
var names = ["log", "debug", "info", "warn", "error", "assert", "dir",
|
|
22
|
-
"dirxml", "group", "groupEnd", "time", "timeEnd", "count", "trace",
|
|
23
|
-
"profile", "profileEnd"];
|
|
24
|
-
window.console = {};
|
|
25
|
-
for (var i = 0; i < names.length; ++i)
|
|
26
|
-
window.console[names[i]] = function() {};
|
|
27
|
-
}
|
|
28
|
-
*/
|
|
29
|
-
|
|
30
|
-
/**
|
|
31
|
-
* small helper function to urldecode strings
|
|
32
|
-
*
|
|
33
|
-
* See https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/decodeURIComponent#Decoding_query_parameters_from_a_URL
|
|
34
|
-
*/
|
|
35
|
-
jQuery.urldecode = function(x) {
|
|
36
|
-
if (!x) {
|
|
37
|
-
return x
|
|
38
|
-
}
|
|
39
|
-
return decodeURIComponent(x.replace(/\+/g, ' '));
|
|
40
|
-
};
|
|
41
|
-
|
|
42
|
-
/**
|
|
43
|
-
* small helper function to urlencode strings
|
|
44
|
-
*/
|
|
45
|
-
jQuery.urlencode = encodeURIComponent;
|
|
46
|
-
|
|
47
|
-
/**
|
|
48
|
-
* This function returns the parsed url parameters of the
|
|
49
|
-
* current request. Multiple values per key are supported,
|
|
50
|
-
* it will always return arrays of strings for the value parts.
|
|
51
|
-
*/
|
|
52
|
-
jQuery.getQueryParameters = function(s) {
|
|
53
|
-
if (typeof s === 'undefined')
|
|
54
|
-
s = document.location.search;
|
|
55
|
-
var parts = s.substr(s.indexOf('?') + 1).split('&');
|
|
56
|
-
var result = {};
|
|
57
|
-
for (var i = 0; i < parts.length; i++) {
|
|
58
|
-
var tmp = parts[i].split('=', 2);
|
|
59
|
-
var key = jQuery.urldecode(tmp[0]);
|
|
60
|
-
var value = jQuery.urldecode(tmp[1]);
|
|
61
|
-
if (key in result)
|
|
62
|
-
result[key].push(value);
|
|
63
|
-
else
|
|
64
|
-
result[key] = [value];
|
|
65
|
-
}
|
|
66
|
-
return result;
|
|
67
|
-
};
|
|
68
|
-
|
|
69
|
-
/**
|
|
70
|
-
* highlight a given string on a jquery object by wrapping it in
|
|
71
|
-
* span elements with the given class name.
|
|
72
|
-
*/
|
|
73
|
-
jQuery.fn.highlightText = function(text, className) {
|
|
74
|
-
function highlight(node, addItems) {
|
|
75
|
-
if (node.nodeType === 3) {
|
|
76
|
-
var val = node.nodeValue;
|
|
77
|
-
var pos = val.toLowerCase().indexOf(text);
|
|
78
|
-
if (pos >= 0 &&
|
|
79
|
-
!jQuery(node.parentNode).hasClass(className) &&
|
|
80
|
-
!jQuery(node.parentNode).hasClass("nohighlight")) {
|
|
81
|
-
var span;
|
|
82
|
-
var isInSVG = jQuery(node).closest("body, svg, foreignObject").is("svg");
|
|
83
|
-
if (isInSVG) {
|
|
84
|
-
span = document.createElementNS("http://www.w3.org/2000/svg", "tspan");
|
|
85
|
-
} else {
|
|
86
|
-
span = document.createElement("span");
|
|
87
|
-
span.className = className;
|
|
88
|
-
}
|
|
89
|
-
span.appendChild(document.createTextNode(val.substr(pos, text.length)));
|
|
90
|
-
node.parentNode.insertBefore(span, node.parentNode.insertBefore(
|
|
91
|
-
document.createTextNode(val.substr(pos + text.length)),
|
|
92
|
-
node.nextSibling));
|
|
93
|
-
node.nodeValue = val.substr(0, pos);
|
|
94
|
-
if (isInSVG) {
|
|
95
|
-
var rect = document.createElementNS("http://www.w3.org/2000/svg", "rect");
|
|
96
|
-
var bbox = node.parentElement.getBBox();
|
|
97
|
-
rect.x.baseVal.value = bbox.x;
|
|
98
|
-
rect.y.baseVal.value = bbox.y;
|
|
99
|
-
rect.width.baseVal.value = bbox.width;
|
|
100
|
-
rect.height.baseVal.value = bbox.height;
|
|
101
|
-
rect.setAttribute('class', className);
|
|
102
|
-
addItems.push({
|
|
103
|
-
"parent": node.parentNode,
|
|
104
|
-
"target": rect});
|
|
105
|
-
}
|
|
106
|
-
}
|
|
107
|
-
}
|
|
108
|
-
else if (!jQuery(node).is("button, select, textarea")) {
|
|
109
|
-
jQuery.each(node.childNodes, function() {
|
|
110
|
-
highlight(this, addItems);
|
|
111
|
-
});
|
|
112
|
-
}
|
|
113
|
-
}
|
|
114
|
-
var addItems = [];
|
|
115
|
-
var result = this.each(function() {
|
|
116
|
-
highlight(this, addItems);
|
|
117
|
-
});
|
|
118
|
-
for (var i = 0; i < addItems.length; ++i) {
|
|
119
|
-
jQuery(addItems[i].parent).before(addItems[i].target);
|
|
120
|
-
}
|
|
121
|
-
return result;
|
|
122
|
-
};
|
|
123
|
-
|
|
124
|
-
/*
|
|
125
|
-
* backward compatibility for jQuery.browser
|
|
126
|
-
* This will be supported until firefox bug is fixed.
|
|
127
|
-
*/
|
|
128
|
-
if (!jQuery.browser) {
|
|
129
|
-
jQuery.uaMatch = function(ua) {
|
|
130
|
-
ua = ua.toLowerCase();
|
|
131
|
-
|
|
132
|
-
var match = /(chrome)[ \/]([\w.]+)/.exec(ua) ||
|
|
133
|
-
/(webkit)[ \/]([\w.]+)/.exec(ua) ||
|
|
134
|
-
/(opera)(?:.*version|)[ \/]([\w.]+)/.exec(ua) ||
|
|
135
|
-
/(msie) ([\w.]+)/.exec(ua) ||
|
|
136
|
-
ua.indexOf("compatible") < 0 && /(mozilla)(?:.*? rv:([\w.]+)|)/.exec(ua) ||
|
|
137
|
-
[];
|
|
138
|
-
|
|
139
|
-
return {
|
|
140
|
-
browser: match[ 1 ] || "",
|
|
141
|
-
version: match[ 2 ] || "0"
|
|
142
|
-
};
|
|
143
|
-
};
|
|
144
|
-
jQuery.browser = {};
|
|
145
|
-
jQuery.browser[jQuery.uaMatch(navigator.userAgent).browser] = true;
|
|
146
|
-
}
|
|
147
|
-
|
|
148
|
-
/**
|
|
149
|
-
* Small JavaScript module for the documentation.
|
|
150
|
-
*/
|
|
151
|
-
var Documentation = {
|
|
152
|
-
|
|
153
|
-
init : function() {
|
|
154
|
-
this.fixFirefoxAnchorBug();
|
|
155
|
-
this.highlightSearchWords();
|
|
156
|
-
this.initIndexTable();
|
|
157
|
-
if (DOCUMENTATION_OPTIONS.NAVIGATION_WITH_KEYS) {
|
|
158
|
-
this.initOnKeyListeners();
|
|
159
|
-
}
|
|
160
|
-
},
|
|
161
|
-
|
|
162
|
-
/**
|
|
163
|
-
* i18n support
|
|
164
|
-
*/
|
|
165
|
-
TRANSLATIONS : {},
|
|
166
|
-
PLURAL_EXPR : function(n) { return n === 1 ? 0 : 1; },
|
|
167
|
-
LOCALE : 'unknown',
|
|
168
|
-
|
|
169
|
-
// gettext and ngettext don't access this so that the functions
|
|
170
|
-
// can safely bound to a different name (_ = Documentation.gettext)
|
|
171
|
-
gettext : function(string) {
|
|
172
|
-
var translated = Documentation.TRANSLATIONS[string];
|
|
173
|
-
if (typeof translated === 'undefined')
|
|
174
|
-
return string;
|
|
175
|
-
return (typeof translated === 'string') ? translated : translated[0];
|
|
176
|
-
},
|
|
177
|
-
|
|
178
|
-
ngettext : function(singular, plural, n) {
|
|
179
|
-
var translated = Documentation.TRANSLATIONS[singular];
|
|
180
|
-
if (typeof translated === 'undefined')
|
|
181
|
-
return (n == 1) ? singular : plural;
|
|
182
|
-
return translated[Documentation.PLURALEXPR(n)];
|
|
183
|
-
},
|
|
184
|
-
|
|
185
|
-
addTranslations : function(catalog) {
|
|
186
|
-
for (var key in catalog.messages)
|
|
187
|
-
this.TRANSLATIONS[key] = catalog.messages[key];
|
|
188
|
-
this.PLURAL_EXPR = new Function('n', 'return +(' + catalog.plural_expr + ')');
|
|
189
|
-
this.LOCALE = catalog.locale;
|
|
190
|
-
},
|
|
191
|
-
|
|
192
|
-
/**
|
|
193
|
-
* add context elements like header anchor links
|
|
194
|
-
*/
|
|
195
|
-
addContextElements : function() {
|
|
196
|
-
$('div[id] > :header:first').each(function() {
|
|
197
|
-
$('<a class="headerlink">\u00B6</a>').
|
|
198
|
-
attr('href', '#' + this.id).
|
|
199
|
-
attr('title', _('Permalink to this headline')).
|
|
200
|
-
appendTo(this);
|
|
201
|
-
});
|
|
202
|
-
$('dt[id]').each(function() {
|
|
203
|
-
$('<a class="headerlink">\u00B6</a>').
|
|
204
|
-
attr('href', '#' + this.id).
|
|
205
|
-
attr('title', _('Permalink to this definition')).
|
|
206
|
-
appendTo(this);
|
|
207
|
-
});
|
|
208
|
-
},
|
|
209
|
-
|
|
210
|
-
/**
|
|
211
|
-
* workaround a firefox stupidity
|
|
212
|
-
* see: https://bugzilla.mozilla.org/show_bug.cgi?id=645075
|
|
213
|
-
*/
|
|
214
|
-
fixFirefoxAnchorBug : function() {
|
|
215
|
-
if (document.location.hash && $.browser.mozilla)
|
|
216
|
-
window.setTimeout(function() {
|
|
217
|
-
document.location.href += '';
|
|
218
|
-
}, 10);
|
|
219
|
-
},
|
|
220
|
-
|
|
221
|
-
/**
|
|
222
|
-
* highlight the search words provided in the url in the text
|
|
223
|
-
*/
|
|
224
|
-
highlightSearchWords : function() {
|
|
225
|
-
var params = $.getQueryParameters();
|
|
226
|
-
var terms = (params.highlight) ? params.highlight[0].split(/\s+/) : [];
|
|
227
|
-
if (terms.length) {
|
|
228
|
-
var body = $('div.body');
|
|
229
|
-
if (!body.length) {
|
|
230
|
-
body = $('body');
|
|
231
|
-
}
|
|
232
|
-
window.setTimeout(function() {
|
|
233
|
-
$.each(terms, function() {
|
|
234
|
-
body.highlightText(this.toLowerCase(), 'highlighted');
|
|
235
|
-
});
|
|
236
|
-
}, 10);
|
|
237
|
-
$('<p class="highlight-link"><a href="javascript:Documentation.' +
|
|
238
|
-
'hideSearchWords()">' + _('Hide Search Matches') + '</a></p>')
|
|
239
|
-
.appendTo($('#searchbox'));
|
|
240
|
-
}
|
|
241
|
-
},
|
|
242
|
-
|
|
243
|
-
/**
|
|
244
|
-
* init the domain index toggle buttons
|
|
245
|
-
*/
|
|
246
|
-
initIndexTable : function() {
|
|
247
|
-
var togglers = $('img.toggler').click(function() {
|
|
248
|
-
var src = $(this).attr('src');
|
|
249
|
-
var idnum = $(this).attr('id').substr(7);
|
|
250
|
-
$('tr.cg-' + idnum).toggle();
|
|
251
|
-
if (src.substr(-9) === 'minus.png')
|
|
252
|
-
$(this).attr('src', src.substr(0, src.length-9) + 'plus.png');
|
|
253
|
-
else
|
|
254
|
-
$(this).attr('src', src.substr(0, src.length-8) + 'minus.png');
|
|
255
|
-
}).css('display', '');
|
|
256
|
-
if (DOCUMENTATION_OPTIONS.COLLAPSE_INDEX) {
|
|
257
|
-
togglers.click();
|
|
258
|
-
}
|
|
259
|
-
},
|
|
260
|
-
|
|
261
|
-
/**
|
|
262
|
-
* helper function to hide the search marks again
|
|
263
|
-
*/
|
|
264
|
-
hideSearchWords : function() {
|
|
265
|
-
$('#searchbox .highlight-link').fadeOut(300);
|
|
266
|
-
$('span.highlighted').removeClass('highlighted');
|
|
267
|
-
},
|
|
268
|
-
|
|
269
|
-
/**
|
|
270
|
-
* make the url absolute
|
|
271
|
-
*/
|
|
272
|
-
makeURL : function(relativeURL) {
|
|
273
|
-
return DOCUMENTATION_OPTIONS.URL_ROOT + '/' + relativeURL;
|
|
274
|
-
},
|
|
275
|
-
|
|
276
|
-
/**
|
|
277
|
-
* get the current relative url
|
|
278
|
-
*/
|
|
279
|
-
getCurrentURL : function() {
|
|
280
|
-
var path = document.location.pathname;
|
|
281
|
-
var parts = path.split(/\//);
|
|
282
|
-
$.each(DOCUMENTATION_OPTIONS.URL_ROOT.split(/\//), function() {
|
|
283
|
-
if (this === '..')
|
|
284
|
-
parts.pop();
|
|
285
|
-
});
|
|
286
|
-
var url = parts.join('/');
|
|
287
|
-
return path.substring(url.lastIndexOf('/') + 1, path.length - 1);
|
|
288
|
-
},
|
|
289
|
-
|
|
290
|
-
initOnKeyListeners: function() {
|
|
291
|
-
$(document).keydown(function(event) {
|
|
292
|
-
var activeElementType = document.activeElement.tagName;
|
|
293
|
-
// don't navigate when in search box, textarea, dropdown or button
|
|
294
|
-
if (activeElementType !== 'TEXTAREA' && activeElementType !== 'INPUT' && activeElementType !== 'SELECT'
|
|
295
|
-
&& activeElementType !== 'BUTTON' && !event.altKey && !event.ctrlKey && !event.metaKey
|
|
296
|
-
&& !event.shiftKey) {
|
|
297
|
-
switch (event.keyCode) {
|
|
298
|
-
case 37: // left
|
|
299
|
-
var prevHref = $('link[rel="prev"]').prop('href');
|
|
300
|
-
if (prevHref) {
|
|
301
|
-
window.location.href = prevHref;
|
|
302
|
-
return false;
|
|
303
|
-
}
|
|
304
|
-
break;
|
|
305
|
-
case 39: // right
|
|
306
|
-
var nextHref = $('link[rel="next"]').prop('href');
|
|
307
|
-
if (nextHref) {
|
|
308
|
-
window.location.href = nextHref;
|
|
309
|
-
return false;
|
|
310
|
-
}
|
|
311
|
-
break;
|
|
312
|
-
}
|
|
313
|
-
}
|
|
314
|
-
});
|
|
315
|
-
}
|
|
316
|
-
};
|
|
317
|
-
|
|
318
|
-
// quick alias for translations
|
|
319
|
-
_ = Documentation.gettext;
|
|
320
|
-
|
|
321
|
-
$(document).ready(function() {
|
|
322
|
-
Documentation.init();
|
|
323
|
-
});
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
var DOCUMENTATION_OPTIONS = {
|
|
2
|
-
URL_ROOT: document.getElementById("documentation_options").getAttribute('data-url_root'),
|
|
3
|
-
VERSION: '',
|
|
4
|
-
LANGUAGE: 'None',
|
|
5
|
-
COLLAPSE_INDEX: false,
|
|
6
|
-
BUILDER: 'html',
|
|
7
|
-
FILE_SUFFIX: '.html',
|
|
8
|
-
LINK_SUFFIX: '.html',
|
|
9
|
-
HAS_SOURCE: false,
|
|
10
|
-
SOURCELINK_SUFFIX: '.txt',
|
|
11
|
-
NAVIGATION_WITH_KEYS: true
|
|
12
|
-
};
|
|
Binary file
|