ixbrl-viewer 1.4.57__py3-none-any.whl → 1.4.59__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 +15 -4
- iXBRLViewerPlugin/viewer/src/js/ixbrlviewer.js +2 -2
- iXBRLViewerPlugin/viewer/src/js/ixbrlviewer.test.js +3 -2
- iXBRLViewerPlugin/viewer/src/js/util.js +2 -0
- iXBRLViewerPlugin/viewer/src/js/viewer.js +3 -2
- iXBRLViewerPlugin/viewer/src/less/inspector.less +991 -994
- {ixbrl_viewer-1.4.57.dist-info → ixbrl_viewer-1.4.59.dist-info}/METADATA +97 -37
- {ixbrl_viewer-1.4.57.dist-info → ixbrl_viewer-1.4.59.dist-info}/RECORD +15 -15
- {ixbrl_viewer-1.4.57.dist-info → ixbrl_viewer-1.4.59.dist-info}/LICENSE.md +0 -0
- {ixbrl_viewer-1.4.57.dist-info → ixbrl_viewer-1.4.59.dist-info}/NOTICE +0 -0
- {ixbrl_viewer-1.4.57.dist-info → ixbrl_viewer-1.4.59.dist-info}/WHEEL +0 -0
- {ixbrl_viewer-1.4.57.dist-info → ixbrl_viewer-1.4.59.dist-info}/entry_points.txt +0 -0
- {ixbrl_viewer-1.4.57.dist-info → ixbrl_viewer-1.4.59.dist-info}/top_level.txt +0 -0
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
import $ from 'jquery'
|
|
4
4
|
import i18next from 'i18next';
|
|
5
5
|
import jqueryI18next from 'jquery-i18next';
|
|
6
|
-
import {formatNumber, wrapLabel, truncateLabel, runGenerator, SHOW_FACT, HIGHLIGHT_COLORS, viewerUniqueId, GLOSSARY_URL, FEATURE_HOME_LINK_URL, FEATURE_HOME_LINK_LABEL, FEATURE_SEARCH_ON_STARTUP, FEATURE_HIGHLIGHT_FACTS_ON_STARTUP, STORAGE_APP_LANGUAGE, STORAGE_HIGHLIGHT_FACTS, STORAGE_HOME_LINK_QUERY} from "./util.js";
|
|
6
|
+
import {formatNumber, wrapLabel, truncateLabel, runGenerator, SHOW_FACT, HIGHLIGHT_COLORS, viewerUniqueId, GLOSSARY_URL, FEATURE_HOME_LINK_URL, FEATURE_HOME_LINK_LABEL, FEATURE_SEARCH_ON_STARTUP, FEATURE_HIGHLIGHT_FACTS_ON_STARTUP, STORAGE_APP_LANGUAGE, STORAGE_HIGHLIGHT_FACTS, STORAGE_HOME_LINK_QUERY, FEATURE_HIDE_CALCULATION_MODE_OPTION} from "./util.js";
|
|
7
7
|
import { ReportSearch } from "./search.js";
|
|
8
8
|
import { IXBRLChart } from './chart.js';
|
|
9
9
|
import { ViewerOptions } from './viewerOptions.js';
|
|
@@ -304,9 +304,8 @@ export class Inspector {
|
|
|
304
304
|
}
|
|
305
305
|
|
|
306
306
|
// Options
|
|
307
|
-
this.
|
|
308
|
-
|
|
309
|
-
if (this._reportSet.usesCalculations()) {
|
|
307
|
+
if (this._reportSet.usesCalculations() && !this._iv.isFeatureEnabled(FEATURE_HIDE_CALCULATION_MODE_OPTION)) {
|
|
308
|
+
this._optionsMenu.addLabel(i18next.t("menu.options"));
|
|
310
309
|
this._optionsMenu.addCheckboxItem(i18next.t("calculation.useCalculations11"), (useCalc11) => this.setCalculationMode(useCalc11), "calculation-mode", "select-language", this._useCalc11);
|
|
311
310
|
}
|
|
312
311
|
}
|
|
@@ -421,6 +420,17 @@ export class Inspector {
|
|
|
421
420
|
}
|
|
422
421
|
}
|
|
423
422
|
|
|
423
|
+
buildUserGuideLink() {
|
|
424
|
+
$('.top-bar-controls #user-guide-link').remove();
|
|
425
|
+
const userGuideUrl = this._iv.getGuideLinkUrl();
|
|
426
|
+
const userGuideLink = $('<a></a>')
|
|
427
|
+
.attr('href', userGuideUrl)
|
|
428
|
+
.attr('id', 'user-guide-link')
|
|
429
|
+
.attr('target', '_blank')
|
|
430
|
+
.text(i18next.t("menu.userGuide"));
|
|
431
|
+
userGuideLink.insertBefore('#toggle-dark-mode');
|
|
432
|
+
}
|
|
433
|
+
|
|
424
434
|
changeApplicationLanguage(lang) {
|
|
425
435
|
localStorage.setItem(STORAGE_APP_LANGUAGE, lang);
|
|
426
436
|
i18next.changeLanguage(lang);
|
|
@@ -434,6 +444,7 @@ export class Inspector {
|
|
|
434
444
|
this.buildHomeLink()
|
|
435
445
|
this.buildToolbarHighlightMenu();
|
|
436
446
|
this.buildHighlightKey();
|
|
447
|
+
this.buildUserGuideLink();
|
|
437
448
|
this.update();
|
|
438
449
|
}
|
|
439
450
|
|
|
@@ -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", () => {
|
|
@@ -25,6 +25,7 @@ export const FEATURE_SUPPORT_LINK = 'support_link';
|
|
|
25
25
|
export const FEATURE_SURVEY_LINK = 'survey_link';
|
|
26
26
|
export const FEATURE_SEARCH_ON_STARTUP = 'search_on_startup';
|
|
27
27
|
export const FEATURE_HIGHLIGHT_FACTS_ON_STARTUP = 'highlight_facts_on_startup';
|
|
28
|
+
export const FEATURE_HIDE_CALCULATION_MODE_OPTION = 'hide_calculation_mode_option';
|
|
28
29
|
|
|
29
30
|
export const IXBRL_VIEWER_DATASET_PREFIX = 'ixbrlViewer';
|
|
30
31
|
|
|
@@ -32,6 +33,7 @@ export const STORAGE_APP_LANGUAGE = "ixbrl-viewer-app-language";
|
|
|
32
33
|
export const STORAGE_THEME = "ixbrl-viewer-theme";
|
|
33
34
|
export const STORAGE_HIGHLIGHT_FACTS = "ixbrl-viewer-highlight-all-facts";
|
|
34
35
|
export const STORAGE_HOME_LINK_QUERY = "ixbrl-viewer-home-link-query";
|
|
36
|
+
export const USER_GUIDE_URL = "https://arelle-ixbrl-viewer.readthedocs.io/en/latest/user_guides/user_guide.html";
|
|
35
37
|
|
|
36
38
|
/*
|
|
37
39
|
* Takes a moment.js oject and converts it to a human readable date, or date
|
|
@@ -261,11 +261,12 @@ export class Viewer {
|
|
|
261
261
|
}
|
|
262
262
|
|
|
263
263
|
/* Is the element the only significant content within a <td> or <th> ? If
|
|
264
|
-
* 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 */
|
|
265
266
|
const tableNode = domNode.closest("td,th");
|
|
266
267
|
const nodes = [];
|
|
267
268
|
const innerText = $(domNode).text();
|
|
268
|
-
if (tableNode !== null && innerText.length > 0) {
|
|
269
|
+
if (tableNode !== null && getComputedStyle(tableNode).display === 'table-cell' && innerText.length > 0) {
|
|
269
270
|
// Use indexOf rather than a single regex because innerText may
|
|
270
271
|
// be too long for the regex engine
|
|
271
272
|
const outerText = $(tableNode).text();
|