quarchpy 2.2.8.dev1__py2.py3-none-any.whl → 2.2.9.dev1__py2.py3-none-any.whl
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.
- quarchpy/__pycache__/__init__.cpython-311.pyc +0 -0
- quarchpy/__pycache__/__init__.cpython-313.pyc +0 -0
- quarchpy/__pycache__/_version.cpython-311.pyc +0 -0
- quarchpy/__pycache__/_version.cpython-313.pyc +0 -0
- quarchpy/__pycache__/connection.cpython-311.pyc +0 -0
- quarchpy/__pycache__/connection.cpython-313.pyc +0 -0
- quarchpy/_version.py +1 -1
- quarchpy/config_files/__pycache__/__init__.cpython-311.pyc +0 -0
- quarchpy/config_files/__pycache__/__init__.cpython-313.pyc +0 -0
- quarchpy/config_files/__pycache__/quarch_config_parser.cpython-311.pyc +0 -0
- quarchpy/config_files/__pycache__/quarch_config_parser.cpython-313.pyc +0 -0
- quarchpy/connection_specific/QPS/win-amd64/qis/3rdPartyLicenses/com.sun.istack-license.html +59 -0
- quarchpy/connection_specific/QPS/win-amd64/qis/3rdPartyLicenses/dorkbox-LICENSE.Apachev2 +218 -0
- quarchpy/connection_specific/QPS/win-amd64/qis/3rdPartyLicenses/jSerialComm-LICENSE-APACHE-2.0 +202 -0
- quarchpy/connection_specific/QPS/win-amd64/qis/3rdPartyLicenses/jSerialComm-LICENSE-LGPL-3.0 +165 -0
- quarchpy/connection_specific/QPS/win-amd64/qis/3rdPartyLicenses/jakarta.activation-license.html +59 -0
- quarchpy/connection_specific/QPS/win-amd64/qis/3rdPartyLicenses/jakarta.xml.bind-api-license.html +59 -0
- quarchpy/connection_specific/QPS/win-amd64/qis/3rdPartyLicenses/javassist-License.html +381 -0
- quarchpy/connection_specific/QPS/win-amd64/qis/3rdPartyLicenses/jmdns-LICENSE.txt +202 -0
- quarchpy/connection_specific/QPS/win-amd64/qis/3rdPartyLicenses/jna-AL2.0 +177 -0
- quarchpy/connection_specific/QPS/win-amd64/qis/3rdPartyLicenses/kotlin-stdlib-LICENSE-2.0.txt +202 -0
- quarchpy/connection_specific/QPS/win-amd64/qis/3rdPartyLicenses/netty-LICENSE.txt +202 -0
- quarchpy/connection_specific/QPS/win-amd64/qis/3rdPartyLicenses/netty-NOTICE.txt +239 -0
- quarchpy/connection_specific/QPS/win-amd64/qis/3rdPartyLicenses/slf4j-LICENSE.txt +24 -0
- quarchpy/connection_specific/QPS/win-amd64/qis/3rdPartyLicenses/usb4java-LICENSE.md +20 -0
- quarchpy/connection_specific/QPS/win-amd64/qis/help.txt +50 -17
- quarchpy/connection_specific/QPS/win-amd64/qis/license.txt +1 -0
- quarchpy/connection_specific/QPS/win-amd64/qis/qis.jar +0 -0
- quarchpy/connection_specific/QPS/win-amd64/qis/qis_lib/CInterface-2.5.jar +0 -0
- quarchpy/connection_specific/QPS/win-amd64/qis/qis_lib/QuarchCommon-2.0.jar +0 -0
- quarchpy/connection_specific/QPS/win-amd64/qis/qis_lib/TorridonCommon-1.3.jar +0 -0
- quarchpy/connection_specific/QPS/win-amd64/qis/qis_lib/usb4java-1.3.1.jar +0 -0
- quarchpy/connection_specific/__pycache__/StreamChannels.cpython-311.pyc +0 -0
- quarchpy/connection_specific/__pycache__/StreamChannels.cpython-313.pyc +0 -0
- quarchpy/connection_specific/__pycache__/__init__.cpython-311.pyc +0 -0
- quarchpy/connection_specific/__pycache__/__init__.cpython-313.pyc +0 -0
- quarchpy/connection_specific/__pycache__/connection_QIS.cpython-311.pyc +0 -0
- quarchpy/connection_specific/__pycache__/connection_QIS.cpython-313.pyc +0 -0
- quarchpy/connection_specific/__pycache__/connection_QPS.cpython-311.pyc +0 -0
- quarchpy/connection_specific/__pycache__/connection_QPS.cpython-313.pyc +0 -0
- quarchpy/connection_specific/__pycache__/connection_ReST.cpython-311.pyc +0 -0
- quarchpy/connection_specific/__pycache__/connection_ReST.cpython-313.pyc +0 -0
- quarchpy/connection_specific/__pycache__/connection_Serial.cpython-311.pyc +0 -0
- quarchpy/connection_specific/__pycache__/connection_Serial.cpython-313.pyc +0 -0
- quarchpy/connection_specific/__pycache__/connection_TCP.cpython-311.pyc +0 -0
- quarchpy/connection_specific/__pycache__/connection_TCP.cpython-313.pyc +0 -0
- quarchpy/connection_specific/__pycache__/connection_USB.cpython-311.pyc +0 -0
- quarchpy/connection_specific/__pycache__/connection_USB.cpython-313.pyc +0 -0
- quarchpy/connection_specific/__pycache__/mDNS.cpython-311.pyc +0 -0
- quarchpy/connection_specific/__pycache__/mDNS.cpython-313.pyc +0 -0
- quarchpy/connection_specific/jdk_j21_jres/__pycache__/__init__.cpython-311.pyc +0 -0
- quarchpy/connection_specific/jdk_j21_jres/__pycache__/__init__.cpython-313.pyc +0 -0
- quarchpy/connection_specific/jdk_j21_jres/__pycache__/fix_permissions.cpython-311.pyc +0 -0
- quarchpy/connection_specific/jdk_j21_jres/__pycache__/fix_permissions.cpython-313.pyc +0 -0
- quarchpy/connection_specific/serial/__pycache__/__init__.cpython-311.pyc +0 -0
- quarchpy/connection_specific/serial/__pycache__/__init__.cpython-313.pyc +0 -0
- quarchpy/connection_specific/serial/__pycache__/serialutil.cpython-311.pyc +0 -0
- quarchpy/connection_specific/serial/__pycache__/serialutil.cpython-313.pyc +0 -0
- quarchpy/connection_specific/serial/__pycache__/serialwin32.cpython-311.pyc +0 -0
- quarchpy/connection_specific/serial/__pycache__/serialwin32.cpython-313.pyc +0 -0
- quarchpy/connection_specific/serial/__pycache__/win32.cpython-311.pyc +0 -0
- quarchpy/connection_specific/serial/__pycache__/win32.cpython-313.pyc +0 -0
- quarchpy/connection_specific/serial/tools/__pycache__/__init__.cpython-311.pyc +0 -0
- quarchpy/connection_specific/serial/tools/__pycache__/__init__.cpython-313.pyc +0 -0
- quarchpy/connection_specific/serial/tools/__pycache__/list_ports.cpython-311.pyc +0 -0
- quarchpy/connection_specific/serial/tools/__pycache__/list_ports.cpython-313.pyc +0 -0
- quarchpy/connection_specific/serial/tools/__pycache__/list_ports_common.cpython-311.pyc +0 -0
- quarchpy/connection_specific/serial/tools/__pycache__/list_ports_common.cpython-313.pyc +0 -0
- quarchpy/connection_specific/serial/tools/__pycache__/list_ports_windows.cpython-311.pyc +0 -0
- quarchpy/connection_specific/serial/tools/__pycache__/list_ports_windows.cpython-313.pyc +0 -0
- quarchpy/connection_specific/usb_libs/__pycache__/libusb1.cpython-311.pyc +0 -0
- quarchpy/connection_specific/usb_libs/__pycache__/usb1.cpython-311.pyc +0 -0
- quarchpy/connection_specific/usb_libs/usb1.py +2360 -2360
- quarchpy/debug/SystemTest.py +9 -2
- quarchpy/debug/__pycache__/SystemTest.cpython-311.pyc +0 -0
- quarchpy/debug/__pycache__/SystemTest.cpython-313.pyc +0 -0
- quarchpy/debug/__pycache__/__init__.cpython-311.pyc +0 -0
- quarchpy/debug/__pycache__/__init__.cpython-313.pyc +0 -0
- quarchpy/debug/__pycache__/module_debug.cpython-313.pyc +0 -0
- quarchpy/debug/__pycache__/simple_terminal.cpython-313.pyc +0 -0
- quarchpy/debug/__pycache__/upgrade_quarchpy.cpython-313.pyc +0 -0
- quarchpy/debug/__pycache__/versionCompare.cpython-311.pyc +0 -0
- quarchpy/debug/__pycache__/versionCompare.cpython-313.pyc +0 -0
- quarchpy/device/__pycache__/__init__.cpython-311.pyc +0 -0
- quarchpy/device/__pycache__/__init__.cpython-313.pyc +0 -0
- quarchpy/device/__pycache__/device.cpython-311.pyc +0 -0
- quarchpy/device/__pycache__/device.cpython-313.pyc +0 -0
- quarchpy/device/__pycache__/quarchArray.cpython-311.pyc +0 -0
- quarchpy/device/__pycache__/quarchArray.cpython-313.pyc +0 -0
- quarchpy/device/__pycache__/quarchPPM.cpython-311.pyc +0 -0
- quarchpy/device/__pycache__/quarchPPM.cpython-313.pyc +0 -0
- quarchpy/device/__pycache__/quarchQPS.cpython-311.pyc +0 -0
- quarchpy/device/__pycache__/quarchQPS.cpython-313.pyc +0 -0
- quarchpy/device/__pycache__/scanDevices.cpython-311.pyc +0 -0
- quarchpy/device/__pycache__/scanDevices.cpython-313.pyc +0 -0
- quarchpy/device/quarchQPS.py +96 -67
- quarchpy/disk_test/__pycache__/AbsDiskFinder.cpython-311.pyc +0 -0
- quarchpy/disk_test/__pycache__/AbsDiskFinder.cpython-313.pyc +0 -0
- quarchpy/disk_test/__pycache__/DiskTargetSelection.cpython-311.pyc +0 -0
- quarchpy/disk_test/__pycache__/DiskTargetSelection.cpython-313.pyc +0 -0
- quarchpy/disk_test/__pycache__/__init__.cpython-311.pyc +0 -0
- quarchpy/disk_test/__pycache__/__init__.cpython-313.pyc +0 -0
- quarchpy/disk_test/__pycache__/iometerDiskFinder.cpython-311.pyc +0 -0
- quarchpy/disk_test/__pycache__/iometerDiskFinder.cpython-313.pyc +0 -0
- quarchpy/docs/CHANGES.rst +4 -0
- quarchpy/docs/Makefile +20 -20
- quarchpy/docs/_build/html/_static/custom.css +1 -1
- quarchpy/docs/_build/html/_static/doctools.js +149 -149
- quarchpy/docs/_build/html/_static/jquery-3.4.1.js +10598 -10598
- quarchpy/docs/_build/html/_static/jquery.js +2 -2
- quarchpy/docs/_build/html/_static/searchtools.js +632 -632
- quarchpy/docs/_build/html/_static/sphinx_highlight.js +154 -154
- quarchpy/docs/_build/html/_static/underscore-1.3.1.js +999 -999
- quarchpy/docs/_build/html/_static/underscore.js +5 -5
- quarchpy/fio/__pycache__/FIO_interface.cpython-311.pyc +0 -0
- quarchpy/fio/__pycache__/FIO_interface.cpython-313.pyc +0 -0
- quarchpy/fio/__pycache__/__init__.cpython-311.pyc +0 -0
- quarchpy/fio/__pycache__/__init__.cpython-313.pyc +0 -0
- quarchpy/iometer/__pycache__/__init__.cpython-311.pyc +0 -0
- quarchpy/iometer/__pycache__/__init__.cpython-313.pyc +0 -0
- quarchpy/iometer/__pycache__/gen_iometer_template.cpython-311.pyc +0 -0
- quarchpy/iometer/__pycache__/{gen_iometer_template.cpython-312.pyc → gen_iometer_template.cpython-313.pyc} +0 -0
- quarchpy/iometer/__pycache__/iometerFuncs.cpython-311.pyc +0 -0
- quarchpy/iometer/__pycache__/iometerFuncs.cpython-313.pyc +0 -0
- quarchpy/qis/__pycache__/StreamHeaderInfo.cpython-311.pyc +0 -0
- quarchpy/qis/__pycache__/StreamHeaderInfo.cpython-313.pyc +0 -0
- quarchpy/qis/__pycache__/__init__.cpython-311.pyc +0 -0
- quarchpy/qis/__pycache__/__init__.cpython-313.pyc +0 -0
- quarchpy/qis/__pycache__/qisFuncs.cpython-311.pyc +0 -0
- quarchpy/qis/__pycache__/qisFuncs.cpython-313.pyc +0 -0
- quarchpy/qis/qisFuncs.py +4 -2
- quarchpy/qps/__pycache__/__init__.cpython-311.pyc +0 -0
- quarchpy/qps/__pycache__/__init__.cpython-313.pyc +0 -0
- quarchpy/qps/__pycache__/qpsFuncs.cpython-311.pyc +0 -0
- quarchpy/qps/__pycache__/qpsFuncs.cpython-313.pyc +0 -0
- quarchpy/user_interface/__pycache__/__init__.cpython-311.pyc +0 -0
- quarchpy/user_interface/__pycache__/__init__.cpython-313.pyc +0 -0
- quarchpy/user_interface/__pycache__/user_interface.cpython-311.pyc +0 -0
- quarchpy/user_interface/__pycache__/user_interface.cpython-313.pyc +0 -0
- quarchpy/utilities/__pycache__/TestCenter.cpython-311.pyc +0 -0
- quarchpy/utilities/__pycache__/TestCenter.cpython-313.pyc +0 -0
- quarchpy/utilities/__pycache__/TimeValue.cpython-311.pyc +0 -0
- quarchpy/utilities/__pycache__/TimeValue.cpython-313.pyc +0 -0
- quarchpy/utilities/__pycache__/Version.cpython-311.pyc +0 -0
- quarchpy/utilities/__pycache__/Version.cpython-313.pyc +0 -0
- quarchpy/utilities/__pycache__/__init__.cpython-311.pyc +0 -0
- quarchpy/utilities/__pycache__/__init__.cpython-313.pyc +0 -0
- {quarchpy-2.2.8.dev1.dist-info → quarchpy-2.2.9.dev1.dist-info}/METADATA +5 -1
- {quarchpy-2.2.8.dev1.dist-info → quarchpy-2.2.9.dev1.dist-info}/RECORD +152 -150
- quarchpy/.idea/.name +0 -1
- quarchpy/.idea/inspectionProfiles/Project_Default.xml +0 -50
- quarchpy/.idea/inspectionProfiles/profiles_settings.xml +0 -6
- quarchpy/.idea/misc.xml +0 -7
- quarchpy/.idea/modules.xml +0 -8
- quarchpy/.idea/quarchpy.iml +0 -12
- quarchpy/.idea/vcs.xml +0 -6
- quarchpy/.idea/workspace.xml +0 -173
- quarchpy/__pycache__/__init__.cpython-312.pyc +0 -0
- quarchpy/__pycache__/_version.cpython-312.pyc +0 -0
- quarchpy/__pycache__/connection.cpython-312.pyc +0 -0
- quarchpy/__pycache__/run.cpython-311.pyc +0 -0
- quarchpy/__pycache__/run.cpython-312.pyc +0 -0
- quarchpy/config_files/__pycache__/__init__.cpython-312.pyc +0 -0
- quarchpy/config_files/__pycache__/quarch_config_parser.cpython-312.pyc +0 -0
- quarchpy/connection_specific/QPS/win-amd64/InstallType.dat +0 -1
- quarchpy/connection_specific/QPS/win-amd64/qis/myFile.csv +0 -50
- quarchpy/connection_specific/__pycache__/StreamChannels.cpython-312.pyc +0 -0
- quarchpy/connection_specific/__pycache__/__init__.cpython-312.pyc +0 -0
- quarchpy/connection_specific/__pycache__/connection_QIS.cpython-312.pyc +0 -0
- quarchpy/connection_specific/__pycache__/connection_QPS.cpython-312.pyc +0 -0
- quarchpy/connection_specific/__pycache__/connection_ReST.cpython-312.pyc +0 -0
- quarchpy/connection_specific/__pycache__/connection_Serial.cpython-312.pyc +0 -0
- quarchpy/connection_specific/__pycache__/connection_TCP.cpython-312.pyc +0 -0
- quarchpy/connection_specific/__pycache__/connection_USB.cpython-312.pyc +0 -0
- quarchpy/connection_specific/__pycache__/mDNS.cpython-312.pyc +0 -0
- quarchpy/connection_specific/jdk_j21_jres/__pycache__/__init__.cpython-312.pyc +0 -0
- quarchpy/connection_specific/jdk_j21_jres/__pycache__/fix_permissions.cpython-312.pyc +0 -0
- quarchpy/connection_specific/serial/__pycache__/__init__.cpython-312.pyc +0 -0
- quarchpy/connection_specific/serial/__pycache__/serialutil.cpython-312.pyc +0 -0
- quarchpy/connection_specific/serial/__pycache__/serialwin32.cpython-312.pyc +0 -0
- quarchpy/connection_specific/serial/__pycache__/win32.cpython-312.pyc +0 -0
- quarchpy/connection_specific/serial/tools/__pycache__/__init__.cpython-312.pyc +0 -0
- quarchpy/connection_specific/serial/tools/__pycache__/list_ports.cpython-312.pyc +0 -0
- quarchpy/connection_specific/serial/tools/__pycache__/list_ports_common.cpython-312.pyc +0 -0
- quarchpy/connection_specific/serial/tools/__pycache__/list_ports_windows.cpython-312.pyc +0 -0
- quarchpy/connection_specific/usb_libs/__pycache__/libusb1.cpython-312.pyc +0 -0
- quarchpy/connection_specific/usb_libs/__pycache__/usb1.cpython-312.pyc +0 -0
- quarchpy/debug/__pycache__/SystemTest.cpython-312.pyc +0 -0
- quarchpy/debug/__pycache__/__init__.cpython-312.pyc +0 -0
- quarchpy/debug/__pycache__/module_debug.cpython-311.pyc +0 -0
- quarchpy/debug/__pycache__/module_debug.cpython-312.pyc +0 -0
- quarchpy/debug/__pycache__/simple_terminal.cpython-311.pyc +0 -0
- quarchpy/debug/__pycache__/simple_terminal.cpython-312.pyc +0 -0
- quarchpy/debug/__pycache__/upgrade_quarchpy.cpython-311.pyc +0 -0
- quarchpy/debug/__pycache__/upgrade_quarchpy.cpython-312.pyc +0 -0
- quarchpy/debug/__pycache__/versionCompare.cpython-312.pyc +0 -0
- quarchpy/device/__pycache__/__init__.cpython-312.pyc +0 -0
- quarchpy/device/__pycache__/device.cpython-312.pyc +0 -0
- quarchpy/device/__pycache__/quarchArray.cpython-312.pyc +0 -0
- quarchpy/device/__pycache__/quarchPPM.cpython-312.pyc +0 -0
- quarchpy/device/__pycache__/quarchQPS.cpython-312.pyc +0 -0
- quarchpy/device/__pycache__/scanDevices.cpython-312.pyc +0 -0
- quarchpy/disk_test/__pycache__/AbsDiskFinder.cpython-312.pyc +0 -0
- quarchpy/disk_test/__pycache__/DiskTargetSelection.cpython-312.pyc +0 -0
- quarchpy/disk_test/__pycache__/__init__.cpython-312.pyc +0 -0
- quarchpy/disk_test/__pycache__/iometerDiskFinder.cpython-312.pyc +0 -0
- quarchpy/fio/__pycache__/FIO_interface.cpython-312.pyc +0 -0
- quarchpy/fio/__pycache__/__init__.cpython-312.pyc +0 -0
- quarchpy/iometer/__pycache__/__init__.cpython-312.pyc +0 -0
- quarchpy/iometer/__pycache__/iometerFuncs.cpython-312.pyc +0 -0
- quarchpy/qis/__pycache__/StreamHeaderInfo.cpython-312.pyc +0 -0
- quarchpy/qis/__pycache__/__init__.cpython-312.pyc +0 -0
- quarchpy/qis/__pycache__/qisFuncs.cpython-312.pyc +0 -0
- quarchpy/qps/__pycache__/__init__.cpython-312.pyc +0 -0
- quarchpy/qps/__pycache__/qpsFuncs.cpython-312.pyc +0 -0
- quarchpy/user_interface/__pycache__/__init__.cpython-312.pyc +0 -0
- quarchpy/user_interface/__pycache__/user_interface.cpython-312.pyc +0 -0
- quarchpy/utilities/__pycache__/TestCenter.cpython-312.pyc +0 -0
- quarchpy/utilities/__pycache__/TimeValue.cpython-312.pyc +0 -0
- quarchpy/utilities/__pycache__/Version.cpython-312.pyc +0 -0
- quarchpy/utilities/__pycache__/__init__.cpython-312.pyc +0 -0
- /quarchpy/fio/{test_performance_class.py → HIDEtest_performance_class.py} +0 -0
- {quarchpy-2.2.8.dev1.dist-info → quarchpy-2.2.9.dev1.dist-info}/WHEEL +0 -0
- {quarchpy-2.2.8.dev1.dist-info → quarchpy-2.2.9.dev1.dist-info}/top_level.txt +0 -0
@@ -1,149 +1,149 @@
|
|
1
|
-
/*
|
2
|
-
* Base JavaScript utilities for all Sphinx HTML documentation.
|
3
|
-
*/
|
4
|
-
"use strict";
|
5
|
-
|
6
|
-
const BLACKLISTED_KEY_CONTROL_ELEMENTS = new Set([
|
7
|
-
"TEXTAREA",
|
8
|
-
"INPUT",
|
9
|
-
"SELECT",
|
10
|
-
"BUTTON",
|
11
|
-
]);
|
12
|
-
|
13
|
-
const _ready = (callback) => {
|
14
|
-
if (document.readyState !== "loading") {
|
15
|
-
callback();
|
16
|
-
} else {
|
17
|
-
document.addEventListener("DOMContentLoaded", callback);
|
18
|
-
}
|
19
|
-
};
|
20
|
-
|
21
|
-
/**
|
22
|
-
* Small JavaScript module for the documentation.
|
23
|
-
*/
|
24
|
-
const Documentation = {
|
25
|
-
init: () => {
|
26
|
-
Documentation.initDomainIndexTable();
|
27
|
-
Documentation.initOnKeyListeners();
|
28
|
-
},
|
29
|
-
|
30
|
-
/**
|
31
|
-
* i18n support
|
32
|
-
*/
|
33
|
-
TRANSLATIONS: {},
|
34
|
-
PLURAL_EXPR: (n) => (n === 1 ? 0 : 1),
|
35
|
-
LOCALE: "unknown",
|
36
|
-
|
37
|
-
// gettext and ngettext don't access this so that the functions
|
38
|
-
// can safely bound to a different name (_ = Documentation.gettext)
|
39
|
-
gettext: (string) => {
|
40
|
-
const translated = Documentation.TRANSLATIONS[string];
|
41
|
-
switch (typeof translated) {
|
42
|
-
case "undefined":
|
43
|
-
return string; // no translation
|
44
|
-
case "string":
|
45
|
-
return translated; // translation exists
|
46
|
-
default:
|
47
|
-
return translated[0]; // (singular, plural) translation tuple exists
|
48
|
-
}
|
49
|
-
},
|
50
|
-
|
51
|
-
ngettext: (singular, plural, n) => {
|
52
|
-
const translated = Documentation.TRANSLATIONS[singular];
|
53
|
-
if (typeof translated !== "undefined")
|
54
|
-
return translated[Documentation.PLURAL_EXPR(n)];
|
55
|
-
return n === 1 ? singular : plural;
|
56
|
-
},
|
57
|
-
|
58
|
-
addTranslations: (catalog) => {
|
59
|
-
Object.assign(Documentation.TRANSLATIONS, catalog.messages);
|
60
|
-
Documentation.PLURAL_EXPR = new Function(
|
61
|
-
"n",
|
62
|
-
`return (${catalog.plural_expr})`
|
63
|
-
);
|
64
|
-
Documentation.LOCALE = catalog.locale;
|
65
|
-
},
|
66
|
-
|
67
|
-
/**
|
68
|
-
* helper function to focus on search bar
|
69
|
-
*/
|
70
|
-
focusSearchBar: () => {
|
71
|
-
document.querySelectorAll("input[name=q]")[0]?.focus();
|
72
|
-
},
|
73
|
-
|
74
|
-
/**
|
75
|
-
* Initialise the domain index toggle buttons
|
76
|
-
*/
|
77
|
-
initDomainIndexTable: () => {
|
78
|
-
const toggler = (el) => {
|
79
|
-
const idNumber = el.id.substr(7);
|
80
|
-
const toggledRows = document.querySelectorAll(`tr.cg-${idNumber}`);
|
81
|
-
if (el.src.substr(-9) === "minus.png") {
|
82
|
-
el.src = `${el.src.substr(0, el.src.length - 9)}plus.png`;
|
83
|
-
toggledRows.forEach((el) => (el.style.display = "none"));
|
84
|
-
} else {
|
85
|
-
el.src = `${el.src.substr(0, el.src.length - 8)}minus.png`;
|
86
|
-
toggledRows.forEach((el) => (el.style.display = ""));
|
87
|
-
}
|
88
|
-
};
|
89
|
-
|
90
|
-
const togglerElements = document.querySelectorAll("img.toggler");
|
91
|
-
togglerElements.forEach((el) =>
|
92
|
-
el.addEventListener("click", (event) => toggler(event.currentTarget))
|
93
|
-
);
|
94
|
-
togglerElements.forEach((el) => (el.style.display = ""));
|
95
|
-
if (DOCUMENTATION_OPTIONS.COLLAPSE_INDEX) togglerElements.forEach(toggler);
|
96
|
-
},
|
97
|
-
|
98
|
-
initOnKeyListeners: () => {
|
99
|
-
// only install a listener if it is really needed
|
100
|
-
if (
|
101
|
-
!DOCUMENTATION_OPTIONS.NAVIGATION_WITH_KEYS &&
|
102
|
-
!DOCUMENTATION_OPTIONS.ENABLE_SEARCH_SHORTCUTS
|
103
|
-
)
|
104
|
-
return;
|
105
|
-
|
106
|
-
document.addEventListener("keydown", (event) => {
|
107
|
-
// bail for input elements
|
108
|
-
if (BLACKLISTED_KEY_CONTROL_ELEMENTS.has(document.activeElement.tagName)) return;
|
109
|
-
// bail with special keys
|
110
|
-
if (event.altKey || event.ctrlKey || event.metaKey) return;
|
111
|
-
|
112
|
-
if (!event.shiftKey) {
|
113
|
-
switch (event.key) {
|
114
|
-
case "ArrowLeft":
|
115
|
-
if (!DOCUMENTATION_OPTIONS.NAVIGATION_WITH_KEYS) break;
|
116
|
-
|
117
|
-
const prevLink = document.querySelector('link[rel="prev"]');
|
118
|
-
if (prevLink && prevLink.href) {
|
119
|
-
window.location.href = prevLink.href;
|
120
|
-
event.preventDefault();
|
121
|
-
}
|
122
|
-
break;
|
123
|
-
case "ArrowRight":
|
124
|
-
if (!DOCUMENTATION_OPTIONS.NAVIGATION_WITH_KEYS) break;
|
125
|
-
|
126
|
-
const nextLink = document.querySelector('link[rel="next"]');
|
127
|
-
if (nextLink && nextLink.href) {
|
128
|
-
window.location.href = nextLink.href;
|
129
|
-
event.preventDefault();
|
130
|
-
}
|
131
|
-
break;
|
132
|
-
}
|
133
|
-
}
|
134
|
-
|
135
|
-
// some keyboard layouts may need Shift to get /
|
136
|
-
switch (event.key) {
|
137
|
-
case "/":
|
138
|
-
if (!DOCUMENTATION_OPTIONS.ENABLE_SEARCH_SHORTCUTS) break;
|
139
|
-
Documentation.focusSearchBar();
|
140
|
-
event.preventDefault();
|
141
|
-
}
|
142
|
-
});
|
143
|
-
},
|
144
|
-
};
|
145
|
-
|
146
|
-
// quick alias for translations
|
147
|
-
const _ = Documentation.gettext;
|
148
|
-
|
149
|
-
_ready(Documentation.init);
|
1
|
+
/*
|
2
|
+
* Base JavaScript utilities for all Sphinx HTML documentation.
|
3
|
+
*/
|
4
|
+
"use strict";
|
5
|
+
|
6
|
+
const BLACKLISTED_KEY_CONTROL_ELEMENTS = new Set([
|
7
|
+
"TEXTAREA",
|
8
|
+
"INPUT",
|
9
|
+
"SELECT",
|
10
|
+
"BUTTON",
|
11
|
+
]);
|
12
|
+
|
13
|
+
const _ready = (callback) => {
|
14
|
+
if (document.readyState !== "loading") {
|
15
|
+
callback();
|
16
|
+
} else {
|
17
|
+
document.addEventListener("DOMContentLoaded", callback);
|
18
|
+
}
|
19
|
+
};
|
20
|
+
|
21
|
+
/**
|
22
|
+
* Small JavaScript module for the documentation.
|
23
|
+
*/
|
24
|
+
const Documentation = {
|
25
|
+
init: () => {
|
26
|
+
Documentation.initDomainIndexTable();
|
27
|
+
Documentation.initOnKeyListeners();
|
28
|
+
},
|
29
|
+
|
30
|
+
/**
|
31
|
+
* i18n support
|
32
|
+
*/
|
33
|
+
TRANSLATIONS: {},
|
34
|
+
PLURAL_EXPR: (n) => (n === 1 ? 0 : 1),
|
35
|
+
LOCALE: "unknown",
|
36
|
+
|
37
|
+
// gettext and ngettext don't access this so that the functions
|
38
|
+
// can safely bound to a different name (_ = Documentation.gettext)
|
39
|
+
gettext: (string) => {
|
40
|
+
const translated = Documentation.TRANSLATIONS[string];
|
41
|
+
switch (typeof translated) {
|
42
|
+
case "undefined":
|
43
|
+
return string; // no translation
|
44
|
+
case "string":
|
45
|
+
return translated; // translation exists
|
46
|
+
default:
|
47
|
+
return translated[0]; // (singular, plural) translation tuple exists
|
48
|
+
}
|
49
|
+
},
|
50
|
+
|
51
|
+
ngettext: (singular, plural, n) => {
|
52
|
+
const translated = Documentation.TRANSLATIONS[singular];
|
53
|
+
if (typeof translated !== "undefined")
|
54
|
+
return translated[Documentation.PLURAL_EXPR(n)];
|
55
|
+
return n === 1 ? singular : plural;
|
56
|
+
},
|
57
|
+
|
58
|
+
addTranslations: (catalog) => {
|
59
|
+
Object.assign(Documentation.TRANSLATIONS, catalog.messages);
|
60
|
+
Documentation.PLURAL_EXPR = new Function(
|
61
|
+
"n",
|
62
|
+
`return (${catalog.plural_expr})`
|
63
|
+
);
|
64
|
+
Documentation.LOCALE = catalog.locale;
|
65
|
+
},
|
66
|
+
|
67
|
+
/**
|
68
|
+
* helper function to focus on search bar
|
69
|
+
*/
|
70
|
+
focusSearchBar: () => {
|
71
|
+
document.querySelectorAll("input[name=q]")[0]?.focus();
|
72
|
+
},
|
73
|
+
|
74
|
+
/**
|
75
|
+
* Initialise the domain index toggle buttons
|
76
|
+
*/
|
77
|
+
initDomainIndexTable: () => {
|
78
|
+
const toggler = (el) => {
|
79
|
+
const idNumber = el.id.substr(7);
|
80
|
+
const toggledRows = document.querySelectorAll(`tr.cg-${idNumber}`);
|
81
|
+
if (el.src.substr(-9) === "minus.png") {
|
82
|
+
el.src = `${el.src.substr(0, el.src.length - 9)}plus.png`;
|
83
|
+
toggledRows.forEach((el) => (el.style.display = "none"));
|
84
|
+
} else {
|
85
|
+
el.src = `${el.src.substr(0, el.src.length - 8)}minus.png`;
|
86
|
+
toggledRows.forEach((el) => (el.style.display = ""));
|
87
|
+
}
|
88
|
+
};
|
89
|
+
|
90
|
+
const togglerElements = document.querySelectorAll("img.toggler");
|
91
|
+
togglerElements.forEach((el) =>
|
92
|
+
el.addEventListener("click", (event) => toggler(event.currentTarget))
|
93
|
+
);
|
94
|
+
togglerElements.forEach((el) => (el.style.display = ""));
|
95
|
+
if (DOCUMENTATION_OPTIONS.COLLAPSE_INDEX) togglerElements.forEach(toggler);
|
96
|
+
},
|
97
|
+
|
98
|
+
initOnKeyListeners: () => {
|
99
|
+
// only install a listener if it is really needed
|
100
|
+
if (
|
101
|
+
!DOCUMENTATION_OPTIONS.NAVIGATION_WITH_KEYS &&
|
102
|
+
!DOCUMENTATION_OPTIONS.ENABLE_SEARCH_SHORTCUTS
|
103
|
+
)
|
104
|
+
return;
|
105
|
+
|
106
|
+
document.addEventListener("keydown", (event) => {
|
107
|
+
// bail for input elements
|
108
|
+
if (BLACKLISTED_KEY_CONTROL_ELEMENTS.has(document.activeElement.tagName)) return;
|
109
|
+
// bail with special keys
|
110
|
+
if (event.altKey || event.ctrlKey || event.metaKey) return;
|
111
|
+
|
112
|
+
if (!event.shiftKey) {
|
113
|
+
switch (event.key) {
|
114
|
+
case "ArrowLeft":
|
115
|
+
if (!DOCUMENTATION_OPTIONS.NAVIGATION_WITH_KEYS) break;
|
116
|
+
|
117
|
+
const prevLink = document.querySelector('link[rel="prev"]');
|
118
|
+
if (prevLink && prevLink.href) {
|
119
|
+
window.location.href = prevLink.href;
|
120
|
+
event.preventDefault();
|
121
|
+
}
|
122
|
+
break;
|
123
|
+
case "ArrowRight":
|
124
|
+
if (!DOCUMENTATION_OPTIONS.NAVIGATION_WITH_KEYS) break;
|
125
|
+
|
126
|
+
const nextLink = document.querySelector('link[rel="next"]');
|
127
|
+
if (nextLink && nextLink.href) {
|
128
|
+
window.location.href = nextLink.href;
|
129
|
+
event.preventDefault();
|
130
|
+
}
|
131
|
+
break;
|
132
|
+
}
|
133
|
+
}
|
134
|
+
|
135
|
+
// some keyboard layouts may need Shift to get /
|
136
|
+
switch (event.key) {
|
137
|
+
case "/":
|
138
|
+
if (!DOCUMENTATION_OPTIONS.ENABLE_SEARCH_SHORTCUTS) break;
|
139
|
+
Documentation.focusSearchBar();
|
140
|
+
event.preventDefault();
|
141
|
+
}
|
142
|
+
});
|
143
|
+
},
|
144
|
+
};
|
145
|
+
|
146
|
+
// quick alias for translations
|
147
|
+
const _ = Documentation.gettext;
|
148
|
+
|
149
|
+
_ready(Documentation.init);
|