ixbrl-viewer 1.4.20__py3-none-any.whl → 1.4.49__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/__init__.py +77 -49
- iXBRLViewerPlugin/_version.py +2 -2
- iXBRLViewerPlugin/constants.py +86 -1
- iXBRLViewerPlugin/featureConfig.py +4 -1
- iXBRLViewerPlugin/iXBRLViewer.py +202 -131
- iXBRLViewerPlugin/plugin.py +7 -0
- iXBRLViewerPlugin/viewer/dist/ixbrlviewer.js +1 -1
- iXBRLViewerPlugin/viewer/dist/ixbrlviewer.js.LICENSE.txt +9 -2
- iXBRLViewerPlugin/viewer/i18next-parser.config.js +1 -1
- iXBRLViewerPlugin/viewer/src/data/utr.json +1 -0
- iXBRLViewerPlugin/viewer/src/html/fact-details.html +69 -38
- iXBRLViewerPlugin/viewer/src/html/footer-logo.html +4 -0
- iXBRLViewerPlugin/viewer/src/html/footnote-details.html +1 -1
- iXBRLViewerPlugin/viewer/src/html/inspector.html +324 -211
- iXBRLViewerPlugin/viewer/src/i18n/cy/balancetypes.json +1 -0
- iXBRLViewerPlugin/viewer/src/i18n/cy/currencies.json +13 -0
- iXBRLViewerPlugin/viewer/src/i18n/cy/datatypes.json +9 -0
- iXBRLViewerPlugin/viewer/src/i18n/cy/labelroles.json +24 -0
- iXBRLViewerPlugin/viewer/src/i18n/cy/referenceparts.json +10 -0
- iXBRLViewerPlugin/viewer/src/i18n/cy/scale.json +16 -0
- iXBRLViewerPlugin/viewer/src/i18n/cy/tooltips.json +17 -0
- iXBRLViewerPlugin/viewer/src/i18n/cy/translation.json +179 -0
- iXBRLViewerPlugin/viewer/src/i18n/en/balancetypes.json +4 -0
- iXBRLViewerPlugin/viewer/src/i18n/en/datatypes.json +10 -0
- iXBRLViewerPlugin/viewer/src/i18n/en/labelroles.json +4 -0
- iXBRLViewerPlugin/viewer/src/i18n/en/scale.json +16 -0
- iXBRLViewerPlugin/viewer/src/i18n/en/tooltips.json +17 -0
- iXBRLViewerPlugin/viewer/src/i18n/en/translation.json +56 -24
- iXBRLViewerPlugin/viewer/src/i18n/es/balancetypes.json +4 -0
- iXBRLViewerPlugin/viewer/src/i18n/es/datatypes.json +10 -0
- iXBRLViewerPlugin/viewer/src/i18n/es/labelroles.json +24 -0
- iXBRLViewerPlugin/viewer/src/i18n/es/scale.json +16 -0
- iXBRLViewerPlugin/viewer/src/i18n/es/tooltips.json +17 -0
- iXBRLViewerPlugin/viewer/src/i18n/es/translation.json +70 -37
- iXBRLViewerPlugin/viewer/src/icons/dark-mode.svg +4 -0
- iXBRLViewerPlugin/viewer/src/img/arelle-dark.svg +179 -0
- iXBRLViewerPlugin/viewer/src/img/inline-viewer-dark.svg +59 -0
- iXBRLViewerPlugin/viewer/src/js/accordian.js +3 -2
- iXBRLViewerPlugin/viewer/src/js/aspect.js +18 -10
- iXBRLViewerPlugin/viewer/src/js/aspect.test.js +2 -2
- iXBRLViewerPlugin/viewer/src/js/balance.js +14 -0
- iXBRLViewerPlugin/viewer/src/js/calculation.js +45 -34
- iXBRLViewerPlugin/viewer/src/js/calculationInspector.js +4 -7
- iXBRLViewerPlugin/viewer/src/js/chart.js +23 -21
- iXBRLViewerPlugin/viewer/src/js/concept.js +27 -2
- iXBRLViewerPlugin/viewer/src/js/concept.test.js +23 -2
- iXBRLViewerPlugin/viewer/src/js/datatype.js +20 -0
- iXBRLViewerPlugin/viewer/src/js/datatype.test.js +62 -0
- iXBRLViewerPlugin/viewer/src/js/dialog.js +6 -4
- iXBRLViewerPlugin/viewer/src/js/fact.js +41 -8
- iXBRLViewerPlugin/viewer/src/js/fact.test.js +47 -13
- iXBRLViewerPlugin/viewer/src/js/index.js +11 -3
- iXBRLViewerPlugin/viewer/src/js/inspector.js +560 -160
- iXBRLViewerPlugin/viewer/src/js/inspector.test.js +1 -2
- iXBRLViewerPlugin/viewer/src/js/ixbrlviewer.js +129 -31
- iXBRLViewerPlugin/viewer/src/js/ixbrlviewer.test.js +133 -20
- iXBRLViewerPlugin/viewer/src/js/ixnode.js +1 -1
- iXBRLViewerPlugin/viewer/src/js/menu.js +25 -7
- iXBRLViewerPlugin/viewer/src/js/number-matcher.js +2 -2
- iXBRLViewerPlugin/viewer/src/js/outline.js +2 -4
- iXBRLViewerPlugin/viewer/src/js/period.js +0 -1
- iXBRLViewerPlugin/viewer/src/js/report.js +68 -13
- iXBRLViewerPlugin/viewer/src/js/report.test.js +77 -6
- iXBRLViewerPlugin/viewer/src/js/reportset.js +33 -3
- iXBRLViewerPlugin/viewer/src/js/reportset.test.js +32 -6
- iXBRLViewerPlugin/viewer/src/js/search.js +61 -35
- iXBRLViewerPlugin/viewer/src/js/search.test.js +8 -5
- iXBRLViewerPlugin/viewer/src/js/summary.js +22 -0
- iXBRLViewerPlugin/viewer/src/js/summary.test.js +50 -13
- iXBRLViewerPlugin/viewer/src/js/tableExport.js +3 -3
- iXBRLViewerPlugin/viewer/src/js/taxonomynamer.js +34 -0
- iXBRLViewerPlugin/viewer/src/js/taxonomynamer.test.js +32 -0
- iXBRLViewerPlugin/viewer/src/js/theme.js +49 -0
- iXBRLViewerPlugin/viewer/src/js/unit.js +73 -2
- iXBRLViewerPlugin/viewer/src/js/unit.test.js +14 -3
- iXBRLViewerPlugin/viewer/src/js/util.js +21 -18
- iXBRLViewerPlugin/viewer/src/js/util.test.js +1 -0
- iXBRLViewerPlugin/viewer/src/js/utr.js +27 -0
- iXBRLViewerPlugin/viewer/src/js/viewer.js +40 -29
- iXBRLViewerPlugin/viewer/src/js/viewerOptions.js +0 -2
- iXBRLViewerPlugin/viewer/src/less/accordian.less +8 -4
- iXBRLViewerPlugin/viewer/src/less/block-list.less +12 -6
- iXBRLViewerPlugin/viewer/src/less/calculation-inspector.less +2 -2
- iXBRLViewerPlugin/viewer/src/less/chart.less +8 -5
- iXBRLViewerPlugin/viewer/src/less/colours-dark-mode.less +40 -0
- iXBRLViewerPlugin/viewer/src/less/colours.less +28 -21
- iXBRLViewerPlugin/viewer/src/less/common.less +1 -1
- iXBRLViewerPlugin/viewer/src/less/components.less +3 -3
- iXBRLViewerPlugin/viewer/src/less/core.less +2 -0
- iXBRLViewerPlugin/viewer/src/less/dialog.less +13 -10
- iXBRLViewerPlugin/viewer/src/less/form-controls.less +33 -11
- iXBRLViewerPlugin/viewer/src/less/inspector.less +556 -300
- iXBRLViewerPlugin/viewer/src/less/loader.less +2 -2
- iXBRLViewerPlugin/viewer/src/less/menu.less +33 -15
- iXBRLViewerPlugin/viewer/src/less/summary.less +16 -6
- iXBRLViewerPlugin/viewer/src/less/tabs.less +5 -5
- iXBRLViewerPlugin/viewer/src/less/text-mixins.less +2 -1
- iXBRLViewerPlugin/viewer/src/less/validation-report.less +1 -1
- iXBRLViewerPlugin/viewer/src/less/viewer.less +30 -18
- iXBRLViewerPlugin/viewer/webpack.common.js +19 -9
- {ixbrl_viewer-1.4.20.dist-info → ixbrl_viewer-1.4.49.dist-info}/METADATA +41 -14
- ixbrl_viewer-1.4.49.dist-info/RECORD +197 -0
- {ixbrl_viewer-1.4.20.dist-info → ixbrl_viewer-1.4.49.dist-info}/WHEEL +1 -1
- tests/puppeteer/framework/page_objects/doc_frame.js +3 -3
- tests/puppeteer/framework/page_objects/fact_details_panel.js +28 -0
- tests/puppeteer/puppeteer_test_run_via_intellij.jpg +0 -0
- tests/puppeteer/tests/fact_properties.test.js +10 -4
- tests/unit_tests/iXBRLViewerPlugin/test_iXBRLViewer.py +117 -51
- iXBRLViewerPlugin/viewer/src/js/interact.min.js +0 -6
- ixbrl_viewer-1.4.20.dist-info/RECORD +0 -166
- {ixbrl_viewer-1.4.20.dist-info → ixbrl_viewer-1.4.49.dist-info}/LICENSE +0 -0
- {ixbrl_viewer-1.4.20.dist-info → ixbrl_viewer-1.4.49.dist-info}/NOTICE +0 -0
- {ixbrl_viewer-1.4.20.dist-info → ixbrl_viewer-1.4.49.dist-info}/entry_points.txt +0 -0
- {ixbrl_viewer-1.4.20.dist-info → ixbrl_viewer-1.4.49.dist-info}/top_level.txt +0 -0
|
@@ -33,6 +33,14 @@ var testReportData = {
|
|
|
33
33
|
}
|
|
34
34
|
}
|
|
35
35
|
},
|
|
36
|
+
"eg:TextBlockConcept1": {
|
|
37
|
+
"labels": {
|
|
38
|
+
"std": {
|
|
39
|
+
"en": "Text block concept"
|
|
40
|
+
}
|
|
41
|
+
},
|
|
42
|
+
"t": true,
|
|
43
|
+
},
|
|
36
44
|
"eg:EnumConcept": {
|
|
37
45
|
"labels": {
|
|
38
46
|
"std": {
|
|
@@ -550,20 +558,43 @@ describe("Readable value", () => {
|
|
|
550
558
|
|
|
551
559
|
});
|
|
552
560
|
|
|
553
|
-
test("
|
|
561
|
+
test("Escaped string", () => {
|
|
554
562
|
|
|
555
563
|
expect(testFact({ "v": "<b>foo</b>" }, {"escaped": true }).readableValue())
|
|
556
|
-
.toBe("foo");
|
|
564
|
+
.toBe("<b>foo</b>");
|
|
557
565
|
|
|
558
566
|
expect(testFact({ "v": " <b>foo</b>bar" }, {"escaped": true }).readableValue())
|
|
559
|
-
.toBe("
|
|
567
|
+
.toBe(" <b>foo</b>bar");
|
|
560
568
|
|
|
561
569
|
expect(testFact({ "v": "\u00a0<b>foo</b>" }, {"escaped": true }).readableValue())
|
|
570
|
+
.toBe("\u00a0<b>foo</b>");
|
|
571
|
+
|
|
572
|
+
});
|
|
573
|
+
|
|
574
|
+
test("Strip HTML tags and normalise whitespace", () => {
|
|
575
|
+
|
|
576
|
+
expect(testFact({ "a": { "c": "eg:TextBlockConcept1" }, "v": "<b>foo</b>" }, {"escaped": true }).readableValue())
|
|
577
|
+
.toBe("foo");
|
|
578
|
+
|
|
579
|
+
expect(testFact({ "a": { "c": "eg:TextBlockConcept1" }, "v": " <b>foo</b>bar" }, {"escaped": true }).readableValue())
|
|
580
|
+
.toBe("foobar");
|
|
581
|
+
|
|
582
|
+
expect(testFact({ "a": { "c": "eg:TextBlockConcept1" }, "v": "\u00a0<b>foo</b>" }, {"escaped": true }).readableValue())
|
|
583
|
+
.toBe("foo");
|
|
584
|
+
|
|
585
|
+
});
|
|
586
|
+
|
|
587
|
+
test("Strip non-escaped text block facts", () => {
|
|
588
|
+
|
|
589
|
+
expect(testFact({ "a": { "c": "eg:TextBlockConcept1" }, "v": "\u00a0<b>foo</b>" }, {"escaped": false }).readableValue())
|
|
590
|
+
.toBe("foo");
|
|
591
|
+
|
|
592
|
+
expect(testFact({ "a": { "c": "eg:TextBlockConcept1" }, "v": "\u00a0<b>foo</b>" }, { }).readableValue())
|
|
562
593
|
.toBe("foo");
|
|
563
594
|
|
|
564
595
|
});
|
|
565
596
|
|
|
566
|
-
test("Don't strip non-
|
|
597
|
+
test("Don't strip non-text-block facts", () => {
|
|
567
598
|
|
|
568
599
|
expect(testFact({ "v": "\u00a0<b>foo</b>" }, {"escaped": false }).readableValue())
|
|
569
600
|
.toBe("\u00a0<b>foo</b>");
|
|
@@ -574,40 +605,40 @@ describe("Readable value", () => {
|
|
|
574
605
|
});
|
|
575
606
|
|
|
576
607
|
test("Detect and strip HTML tags - XHTML tags and attributes", () => {
|
|
577
|
-
expect(testFact({ "v": "<xhtml:b>foo</xhtml:b>" }, {"escaped": true }).readableValue())
|
|
608
|
+
expect(testFact({ "a": { "c": "eg:TextBlockConcept1" }, "v": "<xhtml:b>foo</xhtml:b>" }, {"escaped": true }).readableValue())
|
|
578
609
|
.toBe("foo");
|
|
579
610
|
|
|
580
|
-
expect(testFact({ "v": '<xhtml:span style="font-weight: bold">foo</xhtml:span>' }, {"escaped": true }).readableValue())
|
|
611
|
+
expect(testFact({ "a": { "c": "eg:TextBlockConcept1" }, "v": '<xhtml:span style="font-weight: bold">foo</xhtml:span>' }, {"escaped": true }).readableValue())
|
|
581
612
|
.toBe("foo");
|
|
582
613
|
});
|
|
583
614
|
|
|
584
615
|
test("Detect and strip HTML tags - check behaviour with invalid HTML", () => {
|
|
585
616
|
/* Invalid HTML */
|
|
586
|
-
expect(testFact({ "v": "<b:b:b>foo</b:b:b>" }, {"escaped": true }).readableValue())
|
|
617
|
+
expect(testFact({ "a": { "c": "eg:TextBlockConcept1" }, "v": "<b:b:b>foo</b:b:b>" }, {"escaped": true }).readableValue())
|
|
587
618
|
.toBe("foo");
|
|
588
619
|
|
|
589
|
-
expect(testFact({ "v": "<foo<bar>baz</bar>" }, {"escaped": true }).readableValue())
|
|
620
|
+
expect(testFact({ "a": { "c": "eg:TextBlockConcept1" }, "v": "<foo<bar>baz</bar>" }, {"escaped": true }).readableValue())
|
|
590
621
|
.toBe("baz");
|
|
591
622
|
});
|
|
592
623
|
|
|
593
624
|
test("Text in consecutive inline elements should be contiguous", () => {
|
|
594
625
|
|
|
595
|
-
expect(testFact({ "v": "<b>foo</b><i>bar</i>" }, {"escaped":true }).readableValue())
|
|
626
|
+
expect(testFact({ "a": { "c": "eg:TextBlockConcept1" }, "v": "<b>foo</b><i>bar</i>" }, {"escaped":true }).readableValue())
|
|
596
627
|
.toBe("foobar");
|
|
597
628
|
|
|
598
629
|
});
|
|
599
630
|
|
|
600
631
|
test("Text in block/table elements should be separated.", () => {
|
|
601
632
|
|
|
602
|
-
expect(testFact({ "v": "<p>foo</p><p>bar</p>" }, {"escaped":true }).readableValue())
|
|
633
|
+
expect(testFact({ "a": { "c": "eg:TextBlockConcept1" }, "v": "<p>foo</p><p>bar</p>" }, {"escaped":true }).readableValue())
|
|
603
634
|
.toBe("foo bar");
|
|
604
635
|
|
|
605
636
|
/* This should really return "foo bar", but we don't correctly detect
|
|
606
637
|
* block tags in prefixed XHTML */
|
|
607
|
-
expect(testFact({ "v": '<xhtml:p xmlns:xhtml="https://www.w3.org/1999/xhtml/">foo</xhtml:p><xhtml:p>bar</xhtml:p>' }, {"escaped":true }).readableValue())
|
|
638
|
+
expect(testFact({ "a": { "c": "eg:TextBlockConcept1" }, "v": '<xhtml:p xmlns:xhtml="https://www.w3.org/1999/xhtml/">foo</xhtml:p><xhtml:p>bar</xhtml:p>' }, {"escaped":true }).readableValue())
|
|
608
639
|
.toBe("foobar");
|
|
609
640
|
|
|
610
|
-
expect(testFact({ "v": "<table><tr><td>cell1</td><td>cell2</td></tr></table>" }, {"escaped":true })
|
|
641
|
+
expect(testFact({ "a": { "c": "eg:TextBlockConcept1" }, "v": "<table><tr><td>cell1</td><td>cell2</td></tr></table>" }, {"escaped":true })
|
|
611
642
|
.readableValue())
|
|
612
643
|
.toBe("cell1 cell2");
|
|
613
644
|
|
|
@@ -615,7 +646,7 @@ describe("Readable value", () => {
|
|
|
615
646
|
|
|
616
647
|
test("Whitespace normalisation", () => {
|
|
617
648
|
|
|
618
|
-
expect(testFact({ "v": "<p>bar foo</p> <p>bar</p>" }, {"escaped":true }).readableValue())
|
|
649
|
+
expect(testFact({ "a": { "c": "eg:TextBlockConcept1" }, "v": "<p>bar foo</p> <p>bar</p>" }, {"escaped":true }).readableValue())
|
|
619
650
|
.toBe("bar foo bar");
|
|
620
651
|
|
|
621
652
|
});
|
|
@@ -659,10 +690,13 @@ describe("Get Label", () => {
|
|
|
659
690
|
|
|
660
691
|
test("Get standard label", () => {
|
|
661
692
|
expect(f.getLabel("std")).toEqual("English label")
|
|
693
|
+
expect(f.getLabelAndLang("std").label).toEqual("English label")
|
|
694
|
+
expect(f.getLabelAndLang("std").lang).toEqual("en")
|
|
662
695
|
});
|
|
663
696
|
|
|
664
697
|
test("Get non-existent label", () => {
|
|
665
698
|
expect(f.getLabel("doc")).toBeUndefined();
|
|
699
|
+
expect(f.getLabelAndLang("doc").label).toBeUndefined();
|
|
666
700
|
});
|
|
667
701
|
|
|
668
702
|
});
|
|
@@ -3,9 +3,17 @@
|
|
|
3
3
|
import $ from 'jquery'
|
|
4
4
|
import { iXBRLViewer } from "./ixbrlviewer.js";
|
|
5
5
|
|
|
6
|
+
const scriptSrc = document.currentScript.src;
|
|
7
|
+
|
|
6
8
|
$(() => {
|
|
7
|
-
const
|
|
8
|
-
showValidationWarningOnStart: true
|
|
9
|
-
}
|
|
9
|
+
const options = {
|
|
10
|
+
showValidationWarningOnStart: true,
|
|
11
|
+
};
|
|
12
|
+
const configUrl = new URL("ixbrlviewer.config.json", scriptSrc);
|
|
13
|
+
if (configUrl.protocol != 'file:') {
|
|
14
|
+
options["configUrl"] = configUrl;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
const iv = new iXBRLViewer(options);
|
|
10
18
|
iv.load();
|
|
11
19
|
});
|