ixbrl-viewer 1.4.56__py3-none-any.whl → 1.4.58__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.
Potentially problematic release.
This version of ixbrl-viewer might be problematic. Click here for more details.
- iXBRLViewerPlugin/_version.py +2 -2
- iXBRLViewerPlugin/viewer/dist/ixbrlviewer.js +1 -1
- iXBRLViewerPlugin/viewer/src/js/inspector.js +12 -0
- iXBRLViewerPlugin/viewer/src/js/ixbrlviewer.js +2 -2
- iXBRLViewerPlugin/viewer/src/js/ixbrlviewer.test.js +3 -2
- iXBRLViewerPlugin/viewer/src/js/util.js +1 -0
- iXBRLViewerPlugin/viewer/src/js/viewer.js +11 -2
- iXBRLViewerPlugin/viewer/src/less/inspector.less +991 -994
- ixbrl_viewer-1.4.56.dist-info/LICENSE → ixbrl_viewer-1.4.58.dist-info/LICENSE.md +8 -14
- {ixbrl_viewer-1.4.56.dist-info → ixbrl_viewer-1.4.58.dist-info}/METADATA +99 -39
- {ixbrl_viewer-1.4.56.dist-info → ixbrl_viewer-1.4.58.dist-info}/RECORD +15 -15
- {ixbrl_viewer-1.4.56.dist-info → ixbrl_viewer-1.4.58.dist-info}/NOTICE +0 -0
- {ixbrl_viewer-1.4.56.dist-info → ixbrl_viewer-1.4.58.dist-info}/WHEEL +0 -0
- {ixbrl_viewer-1.4.56.dist-info → ixbrl_viewer-1.4.58.dist-info}/entry_points.txt +0 -0
- {ixbrl_viewer-1.4.56.dist-info → ixbrl_viewer-1.4.58.dist-info}/top_level.txt +0 -0
|
@@ -421,6 +421,17 @@ export class Inspector {
|
|
|
421
421
|
}
|
|
422
422
|
}
|
|
423
423
|
|
|
424
|
+
buildUserGuideLink() {
|
|
425
|
+
$('.top-bar-controls #user-guide-link').remove();
|
|
426
|
+
const userGuideUrl = this._iv.getGuideLinkUrl();
|
|
427
|
+
const userGuideLink = $('<a></a>')
|
|
428
|
+
.attr('href', userGuideUrl)
|
|
429
|
+
.attr('id', 'user-guide-link')
|
|
430
|
+
.attr('target', '_blank')
|
|
431
|
+
.text(i18next.t("menu.userGuide"));
|
|
432
|
+
userGuideLink.insertBefore('#toggle-dark-mode');
|
|
433
|
+
}
|
|
434
|
+
|
|
424
435
|
changeApplicationLanguage(lang) {
|
|
425
436
|
localStorage.setItem(STORAGE_APP_LANGUAGE, lang);
|
|
426
437
|
i18next.changeLanguage(lang);
|
|
@@ -434,6 +445,7 @@ export class Inspector {
|
|
|
434
445
|
this.buildHomeLink()
|
|
435
446
|
this.buildToolbarHighlightMenu();
|
|
436
447
|
this.buildHighlightKey();
|
|
448
|
+
this.buildUserGuideLink();
|
|
437
449
|
this.update();
|
|
438
450
|
}
|
|
439
451
|
|
|
@@ -7,7 +7,7 @@ import { Viewer, DocumentTooLargeError } from "./viewer.js";
|
|
|
7
7
|
import { Inspector } from "./inspector.js";
|
|
8
8
|
import { initializeTheme } from './theme.js';
|
|
9
9
|
import { TaxonomyNamer } from './taxonomynamer.js';
|
|
10
|
-
import { FEATURE_GUIDE_LINK, FEATURE_REVIEW, FEATURE_SUPPORT_LINK, FEATURE_SURVEY_LINK, moveNonAppAttributes } from "./util";
|
|
10
|
+
import { FEATURE_GUIDE_LINK, FEATURE_REVIEW, FEATURE_SUPPORT_LINK, FEATURE_SURVEY_LINK, USER_GUIDE_URL, moveNonAppAttributes } from "./util";
|
|
11
11
|
|
|
12
12
|
const featureFalsyValues = new Set([undefined, null, '', 'false', false]);
|
|
13
13
|
|
|
@@ -127,7 +127,7 @@ export class iXBRLViewer {
|
|
|
127
127
|
|
|
128
128
|
getGuideLinkUrl() {
|
|
129
129
|
if (!this.isStaticFeatureEnabled(FEATURE_GUIDE_LINK)) {
|
|
130
|
-
return
|
|
130
|
+
return USER_GUIDE_URL;
|
|
131
131
|
}
|
|
132
132
|
return this.resolveRelativeUrl(this.getStaticFeatureValue(FEATURE_GUIDE_LINK));
|
|
133
133
|
}
|
|
@@ -5,7 +5,8 @@ import {
|
|
|
5
5
|
FEATURE_GUIDE_LINK,
|
|
6
6
|
FEATURE_REVIEW,
|
|
7
7
|
FEATURE_SUPPORT_LINK,
|
|
8
|
-
FEATURE_SURVEY_LINK
|
|
8
|
+
FEATURE_SURVEY_LINK,
|
|
9
|
+
USER_GUIDE_URL,
|
|
9
10
|
} from "./util";
|
|
10
11
|
describe("Feature enablement", () => {
|
|
11
12
|
var viewer = null;
|
|
@@ -183,7 +184,7 @@ describe("Guide link enablement", () => {
|
|
|
183
184
|
|
|
184
185
|
test("Guide link enabled by query", () => {
|
|
185
186
|
viewer.setFeatures({}, FEATURE_GUIDE_LINK + '=/guide')
|
|
186
|
-
expect(viewer.getGuideLinkUrl()).toEqual(
|
|
187
|
+
expect(viewer.getGuideLinkUrl()).toEqual(USER_GUIDE_URL);
|
|
187
188
|
});
|
|
188
189
|
|
|
189
190
|
test("Guide link disabled by query", () => {
|
|
@@ -32,6 +32,7 @@ export const STORAGE_APP_LANGUAGE = "ixbrl-viewer-app-language";
|
|
|
32
32
|
export const STORAGE_THEME = "ixbrl-viewer-theme";
|
|
33
33
|
export const STORAGE_HIGHLIGHT_FACTS = "ixbrl-viewer-highlight-all-facts";
|
|
34
34
|
export const STORAGE_HOME_LINK_QUERY = "ixbrl-viewer-home-link-query";
|
|
35
|
+
export const USER_GUIDE_URL = "https://arelle-ixbrl-viewer.readthedocs.io/en/latest/user_guides/user_guide.html";
|
|
35
36
|
|
|
36
37
|
/*
|
|
37
38
|
* Takes a moment.js oject and converts it to a human readable date, or date
|
|
@@ -68,6 +68,8 @@ export class Viewer {
|
|
|
68
68
|
viewer._preProcessiXBRL($(this).contents().find("body").get(0), reportIndex, docIndex, false);
|
|
69
69
|
});
|
|
70
70
|
|
|
71
|
+
viewer._setContinuationMaps();
|
|
72
|
+
|
|
71
73
|
/* Call plugin promise for each document in turn */
|
|
72
74
|
(async function () {
|
|
73
75
|
for (const [docIndex, iframe] of viewer._iframes.toArray().entries()) {
|
|
@@ -259,11 +261,12 @@ export class Viewer {
|
|
|
259
261
|
}
|
|
260
262
|
|
|
261
263
|
/* Is the element the only significant content within a <td> or <th> ? If
|
|
262
|
-
* so, use that as the wrapper element.
|
|
264
|
+
* so, use that as the wrapper element.
|
|
265
|
+
* Check for 'display: table-cell' to avoid using hidden cells */
|
|
263
266
|
const tableNode = domNode.closest("td,th");
|
|
264
267
|
const nodes = [];
|
|
265
268
|
const innerText = $(domNode).text();
|
|
266
|
-
if (tableNode !== null && innerText.length > 0) {
|
|
269
|
+
if (tableNode !== null && getComputedStyle(tableNode).display === 'table-cell' && innerText.length > 0) {
|
|
267
270
|
// Use indexOf rather than a single regex because innerText may
|
|
268
271
|
// be too long for the regex engine
|
|
269
272
|
const outerText = $(tableNode).text();
|
|
@@ -345,6 +348,12 @@ export class Viewer {
|
|
|
345
348
|
this.itemContinuationMap = itemContinuationMap;
|
|
346
349
|
}
|
|
347
350
|
|
|
351
|
+
_setContinuationMaps() {
|
|
352
|
+
for (const [itemId, itemContinuations] of Object.entries(this.itemContinuationMap)) {
|
|
353
|
+
this._ixNodeMap[itemId].continuations = itemContinuations.map(id => this._ixNodeMap[id]);
|
|
354
|
+
}
|
|
355
|
+
}
|
|
356
|
+
|
|
348
357
|
_getOrCreateIXNode(vuid, nodes, docIndex, isHidden) {
|
|
349
358
|
// We may have already created an IXNode for this ID from a -sec-ix-hidden
|
|
350
359
|
// element
|