ixbrl-viewer 1.4.39__py3-none-any.whl → 1.4.41__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 +25 -22
- iXBRLViewerPlugin/_version.py +2 -2
- iXBRLViewerPlugin/constants.py +86 -1
- iXBRLViewerPlugin/featureConfig.py +4 -1
- iXBRLViewerPlugin/iXBRLViewer.py +28 -14
- iXBRLViewerPlugin/viewer/dist/ixbrlviewer.js +1 -1
- iXBRLViewerPlugin/viewer/i18next-parser.config.js +1 -1
- 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 +318 -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 +50 -25
- 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 +66 -40
- 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 +2 -1
- iXBRLViewerPlugin/viewer/src/js/aspect.js +18 -7
- iXBRLViewerPlugin/viewer/src/js/balance.js +14 -0
- iXBRLViewerPlugin/viewer/src/js/chart.js +10 -6
- iXBRLViewerPlugin/viewer/src/js/concept.js +28 -1
- 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 +3 -1
- iXBRLViewerPlugin/viewer/src/js/fact.js +16 -0
- iXBRLViewerPlugin/viewer/src/js/fact.test.js +3 -0
- iXBRLViewerPlugin/viewer/src/js/index.js +11 -3
- iXBRLViewerPlugin/viewer/src/js/inspector.js +499 -121
- iXBRLViewerPlugin/viewer/src/js/inspector.test.js +1 -1
- iXBRLViewerPlugin/viewer/src/js/ixbrlviewer.js +128 -30
- iXBRLViewerPlugin/viewer/src/js/ixbrlviewer.test.js +133 -20
- iXBRLViewerPlugin/viewer/src/js/menu.js +21 -3
- iXBRLViewerPlugin/viewer/src/js/outline.js +2 -2
- iXBRLViewerPlugin/viewer/src/js/report.js +60 -8
- iXBRLViewerPlugin/viewer/src/js/report.test.js +51 -5
- iXBRLViewerPlugin/viewer/src/js/reportset.js +20 -0
- iXBRLViewerPlugin/viewer/src/js/reportset.test.js +3 -3
- iXBRLViewerPlugin/viewer/src/js/search.js +23 -2
- iXBRLViewerPlugin/viewer/src/js/search.test.js +2 -2
- iXBRLViewerPlugin/viewer/src/js/summary.js +14 -0
- iXBRLViewerPlugin/viewer/src/js/tableExport.js +2 -1
- iXBRLViewerPlugin/viewer/src/js/taxonomynamer.js +34 -0
- iXBRLViewerPlugin/viewer/src/js/taxonomynamer.test.js +32 -0
- iXBRLViewerPlugin/viewer/src/js/theme.js +36 -0
- iXBRLViewerPlugin/viewer/src/js/unit.js +17 -2
- iXBRLViewerPlugin/viewer/src/js/util.js +16 -16
- iXBRLViewerPlugin/viewer/src/js/viewer.js +13 -7
- 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 +538 -299
- 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
- {ixbrl_viewer-1.4.39.dist-info → ixbrl_viewer-1.4.41.dist-info}/METADATA +33 -5
- {ixbrl_viewer-1.4.39.dist-info → ixbrl_viewer-1.4.41.dist-info}/RECORD +95 -66
- {ixbrl_viewer-1.4.39.dist-info → ixbrl_viewer-1.4.41.dist-info}/WHEEL +1 -1
- tests/puppeteer/framework/page_objects/doc_frame.js +1 -1
- tests/puppeteer/tests/fact_properties.test.js +4 -4
- tests/unit_tests/iXBRLViewerPlugin/test_iXBRLViewer.py +69 -28
- {ixbrl_viewer-1.4.39.dist-info → ixbrl_viewer-1.4.41.dist-info}/LICENSE +0 -0
- {ixbrl_viewer-1.4.39.dist-info → ixbrl_viewer-1.4.41.dist-info}/NOTICE +0 -0
- {ixbrl_viewer-1.4.39.dist-info → ixbrl_viewer-1.4.41.dist-info}/entry_points.txt +0 -0
- {ixbrl_viewer-1.4.39.dist-info → ixbrl_viewer-1.4.41.dist-info}/top_level.txt +0 -0
|
@@ -2,6 +2,12 @@
|
|
|
2
2
|
|
|
3
3
|
import { ReportSet } from "./reportset.js";
|
|
4
4
|
import { NAMESPACE_ISO4217 } from "./util";
|
|
5
|
+
import { TestInspector } from "./test-utils.js";
|
|
6
|
+
|
|
7
|
+
const insp = new TestInspector();
|
|
8
|
+
beforeAll(() => {
|
|
9
|
+
insp.i18nInit();
|
|
10
|
+
});
|
|
5
11
|
|
|
6
12
|
const testReportData = {
|
|
7
13
|
"prefixes": {
|
|
@@ -15,14 +21,16 @@ const testReportData = {
|
|
|
15
21
|
"std": {
|
|
16
22
|
"en": "English label"
|
|
17
23
|
}
|
|
18
|
-
}
|
|
24
|
+
},
|
|
25
|
+
"b": "debit"
|
|
19
26
|
},
|
|
20
27
|
"eg:Concept2": {
|
|
21
28
|
"labels": {
|
|
22
29
|
"std": {
|
|
23
30
|
"en": "English label for concept two"
|
|
24
31
|
}
|
|
25
|
-
}
|
|
32
|
+
},
|
|
33
|
+
"b": "credit"
|
|
26
34
|
},
|
|
27
35
|
"eg:Concept3": {
|
|
28
36
|
"labels": {
|
|
@@ -86,3 +94,16 @@ describe("Concept references", () => {
|
|
|
86
94
|
]);
|
|
87
95
|
});
|
|
88
96
|
});
|
|
97
|
+
|
|
98
|
+
describe("Balance types", () => {
|
|
99
|
+
test("Debit/Credit", () => {
|
|
100
|
+
const rs = new ReportSet(testReportData);
|
|
101
|
+
rs._initialize();
|
|
102
|
+
const r = rs.reports[0];
|
|
103
|
+
expect(r.getConcept("eg:Concept1").balance().balance).toBe("debit");
|
|
104
|
+
expect(r.getConcept("eg:Concept1").balance().label()).toBe("Debit");
|
|
105
|
+
expect(r.getConcept("eg:Concept2").balance().balance).toBe("credit");
|
|
106
|
+
expect(r.getConcept("eg:Concept2").balance().label()).toBe("Credit");
|
|
107
|
+
expect(r.getConcept("eg:Concept3").balance()).toBeUndefined();
|
|
108
|
+
});
|
|
109
|
+
});
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
// See COPYRIGHT.md for copyright information
|
|
2
|
+
|
|
3
|
+
import i18next from 'i18next';
|
|
4
|
+
import { NAMESPACE_XBRLI } from "./util.js";
|
|
5
|
+
|
|
6
|
+
export class DataType {
|
|
7
|
+
constructor(report, name) {
|
|
8
|
+
this.name = name;
|
|
9
|
+
this.report = report;
|
|
10
|
+
this.qname = report.qname(name);
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
label() {
|
|
14
|
+
if (this.qname.namespace == NAMESPACE_XBRLI) {
|
|
15
|
+
return i18next.t(`dataTypes:${this.qname.localname}`, {defaultValue: this.qname.qname});
|
|
16
|
+
}
|
|
17
|
+
return this.report.reportSet.taxonomyNamer.convertQName(this.qname);
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
}
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
// See COPYRIGHT.md for copyright information
|
|
2
|
+
|
|
3
|
+
import { ReportSet } from "./reportset.js";
|
|
4
|
+
import { NAMESPACE_ISO4217, NAMESPACE_XBRLI } from "./util";
|
|
5
|
+
import { TestInspector } from "./test-utils.js";
|
|
6
|
+
|
|
7
|
+
const testReportData = {
|
|
8
|
+
"prefixes": {
|
|
9
|
+
"eg": "http://www.example.com",
|
|
10
|
+
"iso4217": NAMESPACE_ISO4217,
|
|
11
|
+
"xbrli": NAMESPACE_XBRLI,
|
|
12
|
+
"e": "http://example.com/entity",
|
|
13
|
+
},
|
|
14
|
+
"concepts": {
|
|
15
|
+
},
|
|
16
|
+
"facts": {
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
function testReport(concept) {
|
|
21
|
+
// Deep copy of standing data
|
|
22
|
+
const data = JSON.parse(JSON.stringify(testReportData));
|
|
23
|
+
data.concepts["eg:concept"] = concept;
|
|
24
|
+
const reportSet = new ReportSet(data);
|
|
25
|
+
reportSet.setIXNodeMap({});
|
|
26
|
+
return reportSet.reports[0];
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
const insp = new TestInspector();
|
|
30
|
+
beforeAll(() => {
|
|
31
|
+
insp.i18nInit();
|
|
32
|
+
});
|
|
33
|
+
|
|
34
|
+
describe("Data types", () => {
|
|
35
|
+
test("Monetary", () => {
|
|
36
|
+
const r1 = testReport({ "dt": "xbrli:monetaryItemType" });
|
|
37
|
+
expect(r1.getConcept("eg:concept").dataType().label()).toBe("Monetary");
|
|
38
|
+
});
|
|
39
|
+
|
|
40
|
+
test("String", () => {
|
|
41
|
+
const r1 = testReport({ "dt": "xbrli:stringItemType" });
|
|
42
|
+
expect(r1.getConcept("eg:concept").dataType().label()).toBe("String");
|
|
43
|
+
});
|
|
44
|
+
|
|
45
|
+
test("Unknown xbrli", () => {
|
|
46
|
+
const r1 = testReport({ "dt": "xbrli:unknown" });
|
|
47
|
+
expect(r1.getConcept("eg:concept").dataType().label()).toBe("xbrli:unknown");
|
|
48
|
+
});
|
|
49
|
+
|
|
50
|
+
test("Custom", () => {
|
|
51
|
+
const r1 = testReport({ "dt": "eg:stringItemType" });
|
|
52
|
+
expect(r1.getConcept("eg:concept").dataType().label()).toBe("eg:stringItemType");
|
|
53
|
+
});
|
|
54
|
+
|
|
55
|
+
test("No datatype", () => {
|
|
56
|
+
const r1 = testReport({});
|
|
57
|
+
expect(r1.getConcept("eg:concept").dataType()).toBeUndefined();
|
|
58
|
+
});
|
|
59
|
+
})
|
|
60
|
+
|
|
61
|
+
|
|
62
|
+
|
|
@@ -28,11 +28,13 @@ export class Dialog {
|
|
|
28
28
|
|
|
29
29
|
close() {
|
|
30
30
|
$('.dialog-mask').hide();
|
|
31
|
-
this.node.
|
|
31
|
+
this.node.get(0).close();
|
|
32
|
+
this.node.remove();
|
|
32
33
|
}
|
|
33
34
|
|
|
34
35
|
show() {
|
|
35
36
|
$('.dialog-mask').show();
|
|
37
|
+
this.node.get(0).showModal();
|
|
36
38
|
this.node.show();
|
|
37
39
|
}
|
|
38
40
|
}
|
|
@@ -23,18 +23,34 @@ export class Fact {
|
|
|
23
23
|
return localId(this.vuid);
|
|
24
24
|
}
|
|
25
25
|
|
|
26
|
+
isMandatory() {
|
|
27
|
+
return this.f.a.m
|
|
28
|
+
}
|
|
29
|
+
|
|
26
30
|
getLabel(rolePrefix, withPrefix) {
|
|
27
31
|
return this.report.getLabel(this.f.a.c, rolePrefix, withPrefix);
|
|
28
32
|
}
|
|
29
33
|
|
|
34
|
+
getLabelAndLang(rolePrefix, withPrefix) {
|
|
35
|
+
return this.report.getLabelAndLang(this.f.a.c, rolePrefix, withPrefix);
|
|
36
|
+
}
|
|
37
|
+
|
|
30
38
|
getLabelOrName(rolePrefix, withPrefix) {
|
|
31
39
|
return this.report.getLabelOrName(this.f.a.c, rolePrefix, withPrefix);
|
|
32
40
|
}
|
|
33
41
|
|
|
42
|
+
getLabelOrNameAndLang(rolePrefix, withPrefix) {
|
|
43
|
+
return this.report.getLabelOrNameAndLang(this.f.a.c, rolePrefix, withPrefix);
|
|
44
|
+
}
|
|
45
|
+
|
|
34
46
|
conceptName() {
|
|
35
47
|
return this.f.a.c;
|
|
36
48
|
}
|
|
37
49
|
|
|
50
|
+
conceptDisplayName() {
|
|
51
|
+
return this.report.reportSet.taxonomyNamer.convertQName(this.conceptQName());
|
|
52
|
+
}
|
|
53
|
+
|
|
38
54
|
concept() {
|
|
39
55
|
return this.report.getConcept(this.f.a.c);
|
|
40
56
|
}
|
|
@@ -690,10 +690,13 @@ describe("Get Label", () => {
|
|
|
690
690
|
|
|
691
691
|
test("Get standard label", () => {
|
|
692
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")
|
|
693
695
|
});
|
|
694
696
|
|
|
695
697
|
test("Get non-existent label", () => {
|
|
696
698
|
expect(f.getLabel("doc")).toBeUndefined();
|
|
699
|
+
expect(f.getLabelAndLang("doc").label).toBeUndefined();
|
|
697
700
|
});
|
|
698
701
|
|
|
699
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
|
});
|