ixbrl-viewer 1.4.1__py3-none-any.whl → 1.4.86__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.
Files changed (190) hide show
  1. iXBRLViewerPlugin/__init__.py +231 -127
  2. iXBRLViewerPlugin/_version.py +33 -3
  3. iXBRLViewerPlugin/constants.py +96 -2
  4. iXBRLViewerPlugin/featureConfig.py +8 -1
  5. iXBRLViewerPlugin/iXBRLViewer.py +356 -214
  6. iXBRLViewerPlugin/plugin.py +12 -0
  7. iXBRLViewerPlugin/ui.py +81 -50
  8. iXBRLViewerPlugin/viewer/dist/ixbrlviewer.js +1 -1
  9. iXBRLViewerPlugin/viewer/dist/ixbrlviewer.js.LICENSE.txt +12 -5
  10. iXBRLViewerPlugin/viewer/i18next-parser.config.js +1 -1
  11. iXBRLViewerPlugin/viewer/src/data/utr.json +1244 -0
  12. iXBRLViewerPlugin/viewer/src/html/fact-details.html +69 -38
  13. iXBRLViewerPlugin/viewer/src/html/footer-logo.html +4 -0
  14. iXBRLViewerPlugin/viewer/src/html/footnote-details.html +2 -2
  15. iXBRLViewerPlugin/viewer/src/html/inspector.html +352 -197
  16. iXBRLViewerPlugin/viewer/src/i18n/cy/balancetypes.json +1 -0
  17. iXBRLViewerPlugin/viewer/src/i18n/cy/currencies.json +13 -0
  18. iXBRLViewerPlugin/viewer/src/i18n/cy/datatypes.json +9 -0
  19. iXBRLViewerPlugin/viewer/src/i18n/cy/labelroles.json +24 -0
  20. iXBRLViewerPlugin/viewer/src/i18n/cy/referenceparts.json +10 -0
  21. iXBRLViewerPlugin/viewer/src/i18n/cy/scale.json +16 -0
  22. iXBRLViewerPlugin/viewer/src/i18n/cy/tooltips.json +17 -0
  23. iXBRLViewerPlugin/viewer/src/i18n/cy/translation.json +179 -0
  24. iXBRLViewerPlugin/viewer/src/i18n/da/balancetypes.json +4 -0
  25. iXBRLViewerPlugin/viewer/src/i18n/da/currencies.json +13 -0
  26. iXBRLViewerPlugin/viewer/src/i18n/da/datatypes.json +9 -0
  27. iXBRLViewerPlugin/viewer/src/i18n/da/labelroles.json +24 -0
  28. iXBRLViewerPlugin/viewer/src/i18n/da/referenceparts.json +10 -0
  29. iXBRLViewerPlugin/viewer/src/i18n/da/scale.json +15 -0
  30. iXBRLViewerPlugin/viewer/src/i18n/da/tooltips.json +17 -0
  31. iXBRLViewerPlugin/viewer/src/i18n/da/translation.json +179 -0
  32. iXBRLViewerPlugin/viewer/src/i18n/de/balancetypes.json +4 -0
  33. iXBRLViewerPlugin/viewer/src/i18n/de/currencies.json +13 -0
  34. iXBRLViewerPlugin/viewer/src/i18n/de/datatypes.json +9 -0
  35. iXBRLViewerPlugin/viewer/src/i18n/de/labelroles.json +24 -0
  36. iXBRLViewerPlugin/viewer/src/i18n/de/referenceparts.json +10 -0
  37. iXBRLViewerPlugin/viewer/src/i18n/de/scale.json +15 -0
  38. iXBRLViewerPlugin/viewer/src/i18n/de/tooltips.json +17 -0
  39. iXBRLViewerPlugin/viewer/src/i18n/de/translation.json +179 -0
  40. iXBRLViewerPlugin/viewer/src/i18n/en/balancetypes.json +4 -0
  41. iXBRLViewerPlugin/viewer/src/i18n/en/datatypes.json +10 -0
  42. iXBRLViewerPlugin/viewer/src/i18n/en/labelroles.json +4 -0
  43. iXBRLViewerPlugin/viewer/src/i18n/en/scale.json +16 -0
  44. iXBRLViewerPlugin/viewer/src/i18n/en/tooltips.json +17 -0
  45. iXBRLViewerPlugin/viewer/src/i18n/en/translation.json +73 -23
  46. iXBRLViewerPlugin/viewer/src/i18n/es/balancetypes.json +4 -0
  47. iXBRLViewerPlugin/viewer/src/i18n/es/datatypes.json +10 -0
  48. iXBRLViewerPlugin/viewer/src/i18n/es/labelroles.json +24 -0
  49. iXBRLViewerPlugin/viewer/src/i18n/es/scale.json +16 -0
  50. iXBRLViewerPlugin/viewer/src/i18n/es/tooltips.json +17 -0
  51. iXBRLViewerPlugin/viewer/src/i18n/es/translation.json +87 -37
  52. iXBRLViewerPlugin/viewer/src/i18n/fr/balancetypes.json +4 -0
  53. iXBRLViewerPlugin/viewer/src/i18n/fr/currencies.json +13 -0
  54. iXBRLViewerPlugin/viewer/src/i18n/fr/datatypes.json +9 -0
  55. iXBRLViewerPlugin/viewer/src/i18n/fr/labelroles.json +24 -0
  56. iXBRLViewerPlugin/viewer/src/i18n/fr/referenceparts.json +10 -0
  57. iXBRLViewerPlugin/viewer/src/i18n/fr/scale.json +15 -0
  58. iXBRLViewerPlugin/viewer/src/i18n/fr/tooltips.json +17 -0
  59. iXBRLViewerPlugin/viewer/src/i18n/fr/translation.json +179 -0
  60. iXBRLViewerPlugin/viewer/src/i18n/nl/balancetypes.json +4 -0
  61. iXBRLViewerPlugin/viewer/src/i18n/nl/currencies.json +13 -0
  62. iXBRLViewerPlugin/viewer/src/i18n/nl/datatypes.json +9 -0
  63. iXBRLViewerPlugin/viewer/src/i18n/nl/labelroles.json +24 -0
  64. iXBRLViewerPlugin/viewer/src/i18n/nl/referenceparts.json +10 -0
  65. iXBRLViewerPlugin/viewer/src/i18n/nl/scale.json +15 -0
  66. iXBRLViewerPlugin/viewer/src/i18n/nl/tooltips.json +17 -0
  67. iXBRLViewerPlugin/viewer/src/i18n/nl/translation.json +179 -0
  68. iXBRLViewerPlugin/viewer/src/i18n/uk/balancetypes.json +4 -0
  69. iXBRLViewerPlugin/viewer/src/i18n/uk/currencies.json +13 -0
  70. iXBRLViewerPlugin/viewer/src/i18n/uk/datatypes.json +9 -0
  71. iXBRLViewerPlugin/viewer/src/i18n/uk/labelroles.json +24 -0
  72. iXBRLViewerPlugin/viewer/src/i18n/uk/referenceparts.json +10 -0
  73. iXBRLViewerPlugin/viewer/src/i18n/uk/scale.json +15 -0
  74. iXBRLViewerPlugin/viewer/src/i18n/uk/tooltips.json +17 -0
  75. iXBRLViewerPlugin/viewer/src/i18n/uk/translation.json +179 -0
  76. iXBRLViewerPlugin/viewer/src/icons/calculator.svg +13 -0
  77. iXBRLViewerPlugin/viewer/src/icons/circle-cross.svg +11 -0
  78. iXBRLViewerPlugin/viewer/src/icons/circle-tick.svg +11 -0
  79. iXBRLViewerPlugin/viewer/src/icons/dark-mode.svg +4 -0
  80. iXBRLViewerPlugin/viewer/src/icons/dimension.svg +1 -5
  81. iXBRLViewerPlugin/viewer/src/icons/member.svg +2 -5
  82. iXBRLViewerPlugin/viewer/src/icons/multi-tag.svg +10 -0
  83. iXBRLViewerPlugin/viewer/src/img/arelle-dark.svg +179 -0
  84. iXBRLViewerPlugin/viewer/src/img/inline-viewer-dark.svg +59 -0
  85. iXBRLViewerPlugin/viewer/src/js/accordian.js +5 -4
  86. iXBRLViewerPlugin/viewer/src/js/aspect.js +29 -10
  87. iXBRLViewerPlugin/viewer/src/js/aspect.test.js +40 -31
  88. iXBRLViewerPlugin/viewer/src/js/balance.js +14 -0
  89. iXBRLViewerPlugin/viewer/src/js/calculation.js +213 -0
  90. iXBRLViewerPlugin/viewer/src/js/calculation.test.js +306 -0
  91. iXBRLViewerPlugin/viewer/src/js/calculationInspector.js +187 -0
  92. iXBRLViewerPlugin/viewer/src/js/chart.js +26 -24
  93. iXBRLViewerPlugin/viewer/src/js/chart.test.js +10 -9
  94. iXBRLViewerPlugin/viewer/src/js/concept.js +37 -4
  95. iXBRLViewerPlugin/viewer/src/js/concept.test.js +30 -6
  96. iXBRLViewerPlugin/viewer/src/js/datatype.js +20 -0
  97. iXBRLViewerPlugin/viewer/src/js/datatype.test.js +62 -0
  98. iXBRLViewerPlugin/viewer/src/js/dialog.js +6 -4
  99. iXBRLViewerPlugin/viewer/src/js/docOrderIndex.js +7 -7
  100. iXBRLViewerPlugin/viewer/src/js/fact.js +156 -59
  101. iXBRLViewerPlugin/viewer/src/js/fact.test.js +160 -29
  102. iXBRLViewerPlugin/viewer/src/js/factset.js +64 -15
  103. iXBRLViewerPlugin/viewer/src/js/factset.test.js +102 -31
  104. iXBRLViewerPlugin/viewer/src/js/footnote.js +8 -2
  105. iXBRLViewerPlugin/viewer/src/js/index.js +11 -3
  106. iXBRLViewerPlugin/viewer/src/js/inspector.js +747 -221
  107. iXBRLViewerPlugin/viewer/src/js/inspector.test.js +143 -25
  108. iXBRLViewerPlugin/viewer/src/js/interval.js +70 -0
  109. iXBRLViewerPlugin/viewer/src/js/interval.test.js +153 -0
  110. iXBRLViewerPlugin/viewer/src/js/ixbrlviewer.js +391 -262
  111. iXBRLViewerPlugin/viewer/src/js/ixbrlviewer.test.js +134 -20
  112. iXBRLViewerPlugin/viewer/src/js/ixnode.js +1 -1
  113. iXBRLViewerPlugin/viewer/src/js/menu.js +25 -7
  114. iXBRLViewerPlugin/viewer/src/js/number-matcher.js +7 -3
  115. iXBRLViewerPlugin/viewer/src/js/number-matcher.test.js +4 -0
  116. iXBRLViewerPlugin/viewer/src/js/outline.js +34 -13
  117. iXBRLViewerPlugin/viewer/src/js/outline.test.js +97 -91
  118. iXBRLViewerPlugin/viewer/src/js/period.js +0 -1
  119. iXBRLViewerPlugin/viewer/src/js/report.js +260 -351
  120. iXBRLViewerPlugin/viewer/src/js/report.test.js +95 -27
  121. iXBRLViewerPlugin/viewer/src/js/reportset.js +264 -0
  122. iXBRLViewerPlugin/viewer/src/js/reportset.test.js +357 -0
  123. iXBRLViewerPlugin/viewer/src/js/search.js +72 -38
  124. iXBRLViewerPlugin/viewer/src/js/search.test.js +184 -84
  125. iXBRLViewerPlugin/viewer/src/js/summary.js +34 -8
  126. iXBRLViewerPlugin/viewer/src/js/summary.test.js +69 -25
  127. iXBRLViewerPlugin/viewer/src/js/tableExport.js +9 -9
  128. iXBRLViewerPlugin/viewer/src/js/taxonomynamer.js +34 -0
  129. iXBRLViewerPlugin/viewer/src/js/taxonomynamer.test.js +32 -0
  130. iXBRLViewerPlugin/viewer/src/js/test-utils.js +46 -0
  131. iXBRLViewerPlugin/viewer/src/js/theme.js +50 -0
  132. iXBRLViewerPlugin/viewer/src/js/unit.js +90 -32
  133. iXBRLViewerPlugin/viewer/src/js/unit.test.js +62 -25
  134. iXBRLViewerPlugin/viewer/src/js/util.js +94 -0
  135. iXBRLViewerPlugin/viewer/src/js/util.test.js +33 -1
  136. iXBRLViewerPlugin/viewer/src/js/utr.js +27 -0
  137. iXBRLViewerPlugin/viewer/src/js/viewer.js +205 -181
  138. iXBRLViewerPlugin/viewer/src/js/viewerOptions.js +0 -2
  139. iXBRLViewerPlugin/viewer/src/less/accordian.less +10 -6
  140. iXBRLViewerPlugin/viewer/src/less/block-list.less +16 -5
  141. iXBRLViewerPlugin/viewer/src/less/calculation-inspector.less +83 -0
  142. iXBRLViewerPlugin/viewer/src/less/chart.less +8 -5
  143. iXBRLViewerPlugin/viewer/src/less/colours-dark-mode.less +40 -0
  144. iXBRLViewerPlugin/viewer/src/less/colours.less +32 -20
  145. iXBRLViewerPlugin/viewer/src/less/common.less +3 -3
  146. iXBRLViewerPlugin/viewer/src/less/components.less +6 -4
  147. iXBRLViewerPlugin/viewer/src/less/core.less +2 -0
  148. iXBRLViewerPlugin/viewer/src/less/dialog.less +21 -14
  149. iXBRLViewerPlugin/viewer/src/less/form-controls.less +33 -11
  150. iXBRLViewerPlugin/viewer/src/less/inspector.less +1045 -726
  151. iXBRLViewerPlugin/viewer/src/less/loader.less +2 -2
  152. iXBRLViewerPlugin/viewer/src/less/menu.less +33 -15
  153. iXBRLViewerPlugin/viewer/src/less/summary.less +16 -6
  154. iXBRLViewerPlugin/viewer/src/less/tabs.less +9 -9
  155. iXBRLViewerPlugin/viewer/src/less/text-block-viewer.less +2 -0
  156. iXBRLViewerPlugin/viewer/src/less/text-mixins.less +2 -1
  157. iXBRLViewerPlugin/viewer/src/less/validation-report.less +2 -3
  158. iXBRLViewerPlugin/viewer/src/less/viewer.less +105 -74
  159. iXBRLViewerPlugin/viewer/webpack.common.js +19 -9
  160. iXBRLViewerPlugin/xhtmlserialize.py +59 -45
  161. {ixbrl_viewer-1.4.1.dist-info → ixbrl_viewer-1.4.86.dist-info}/METADATA +181 -50
  162. ixbrl_viewer-1.4.86.dist-info/RECORD +217 -0
  163. {ixbrl_viewer-1.4.1.dist-info → ixbrl_viewer-1.4.86.dist-info}/WHEEL +1 -1
  164. ixbrl_viewer-1.4.1.dist-info/LICENSE → ixbrl_viewer-1.4.86.dist-info/licenses/LICENSE.md +8 -14
  165. {ixbrl_viewer-1.4.1.dist-info → ixbrl_viewer-1.4.86.dist-info}/top_level.txt +0 -1
  166. iXBRLViewerPlugin/viewer/src/js/calculations.js +0 -111
  167. iXBRLViewerPlugin/viewer/src/js/interact.min.js +0 -6
  168. ixbrl_viewer-1.4.1.dist-info/RECORD +0 -155
  169. tests/__init__.py +0 -0
  170. tests/puppeteer/framework/core_elements.js +0 -117
  171. tests/puppeteer/framework/page_objects/doc_frame.js +0 -105
  172. tests/puppeteer/framework/page_objects/fact_details_panel.js +0 -80
  173. tests/puppeteer/framework/page_objects/search_panel.js +0 -76
  174. tests/puppeteer/framework/page_objects/toolbar.js +0 -18
  175. tests/puppeteer/framework/utils.js +0 -3
  176. tests/puppeteer/framework/viewer_page.js +0 -103
  177. tests/puppeteer/puppeteer_test_run_via_intellij.jpg +0 -0
  178. tests/puppeteer/test_filings/filing_documents_smoke_test.zip +0 -0
  179. tests/puppeteer/test_filings/highlights.zip +0 -0
  180. tests/puppeteer/tests/fact_properties.test.js +0 -78
  181. tests/puppeteer/tests/highlight.test.js +0 -186
  182. tests/puppeteer/tests/search.test.js +0 -86
  183. tests/puppeteer/tools/generate.sh +0 -15
  184. tests/unit_tests/__init__.py +0 -0
  185. tests/unit_tests/iXBRLViewerPlugin/__init__.py +0 -0
  186. tests/unit_tests/iXBRLViewerPlugin/mock_arelle.py +0 -39
  187. tests/unit_tests/iXBRLViewerPlugin/test_iXBRLViewer.py +0 -641
  188. tests/unit_tests/iXBRLViewerPlugin/test_xhtmlserialize.py +0 -310
  189. {ixbrl_viewer-1.4.1.dist-info → ixbrl_viewer-1.4.86.dist-info}/entry_points.txt +0 -0
  190. {ixbrl_viewer-1.4.1.dist-info → ixbrl_viewer-1.4.86.dist-info/licenses}/NOTICE +0 -0
@@ -0,0 +1,179 @@
1
+ <?xml version="1.0" encoding="UTF-8" standalone="no"?>
2
+ <!-- Created with Inkscape (http://www.inkscape.org/) -->
3
+
4
+ <svg
5
+ xmlns:dc="http://purl.org/dc/elements/1.1/"
6
+ xmlns:cc="http://creativecommons.org/ns#"
7
+ xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
8
+ xmlns:svg="http://www.w3.org/2000/svg"
9
+ xmlns="http://www.w3.org/2000/svg"
10
+ xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
11
+ xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
12
+ version="1.1"
13
+ id="svg2"
14
+ xml:space="preserve"
15
+ width="536.36475"
16
+ height="150.31003"
17
+ viewBox="0 0 536.36473 150.31003"
18
+ sodipodi:docname="arelle-logo.svg"
19
+ inkscape:version="0.92.5 (2060ec1f9f, 2020-04-08)"><metadata
20
+ id="metadata8"><rdf:RDF><cc:Work
21
+ rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type
22
+ rdf:resource="http://purl.org/dc/dcmitype/StillImage" /><dc:title></dc:title></cc:Work></rdf:RDF></metadata><defs
23
+ id="defs6"><clipPath
24
+ clipPathUnits="userSpaceOnUse"
25
+ id="clipPath18"><path
26
+ d="M 0,122 H 768.505 V 0 H 0 Z"
27
+ id="path16"
28
+ inkscape:connector-curvature="0" /></clipPath></defs><sodipodi:namedview
29
+ pagecolor="#000000"
30
+ bordercolor="#666666"
31
+ borderopacity="1"
32
+ objecttolerance="10"
33
+ gridtolerance="10"
34
+ guidetolerance="10"
35
+ inkscape:pageopacity="0"
36
+ inkscape:pageshadow="2"
37
+ inkscape:window-width="1864"
38
+ inkscape:window-height="1024"
39
+ id="namedview4"
40
+ showgrid="false"
41
+ inkscape:zoom="0.72022953"
42
+ inkscape:cx="788.72058"
43
+ inkscape:cy="-84.442204"
44
+ inkscape:window-x="56"
45
+ inkscape:window-y="27"
46
+ inkscape:window-maximized="1"
47
+ inkscape:current-layer="g10"
48
+ fit-margin-top="0"
49
+ fit-margin-left="0"
50
+ fit-margin-right="0"
51
+ fit-margin-bottom="0" /><g
52
+ id="g10"
53
+ inkscape:groupmode="layer"
54
+ inkscape:label="arelle-logo"
55
+ transform="matrix(1.3333333,0,0,-1.3333333,-3.6508141,159.32777)"><g
56
+ id="g12"><g
57
+ id="g14"
58
+ clip-path="url(#clipPath18)"><g
59
+ id="g20"
60
+ transform="translate(109.6689,67.1631)"><path
61
+ d="m 0,0 c -1.598,2.653 -7.292,5.987 -8.808,15.307 -0.804,4.949 0.569,7.994 1.955,12.181 1.488,4.471 -1.059,7.244 -5.38,7.408 -8.644,0.33 -31.907,-2.211 -57.638,11.288 -10.066,5.28 -10.759,3.922 -7.076,-2.566 5.645,-9.952 19.378,-15.334 35.687,-18.005 -45.397,9.825 -17.166,-2.174 5.098,-7.127 -41.056,8.484 -15.625,-3.035 4.448,-6.711 -38.475,6.821 -11.387,-2.978 1.477,-5.428 3.862,-0.736 12.391,-13.026 18.054,-10.273 6.317,3.069 4.488,0.689 7.479,2.026 C 0.566,0.458 0,0 0,0"
62
+ style="fill:#aa118e;fill-opacity:1;fill-rule:nonzero;stroke:none"
63
+ id="path22"
64
+ inkscape:connector-curvature="0" /></g><g
65
+ id="g24"
66
+ transform="translate(109.6689,67.1631)"><path
67
+ d="m 0,0 c -1.598,2.653 -7.292,5.987 -8.808,15.307 -0.804,4.949 0.569,7.994 1.955,12.181 1.488,4.471 -1.059,7.244 -5.38,7.408 -8.644,0.33 -31.907,-2.211 -57.638,11.288 -10.066,5.28 -10.759,3.922 -7.076,-2.566 5.645,-9.952 19.378,-15.334 35.687,-18.005 -45.397,9.825 -17.166,-2.174 5.098,-7.127 -41.056,8.484 -15.625,-3.035 4.448,-6.711 -38.475,6.821 -11.387,-2.978 1.477,-5.428 3.862,-0.736 12.391,-13.026 18.054,-10.273 6.317,3.069 4.488,0.689 7.479,2.026 C 0.566,0.458 0,0 0,0 Z"
68
+ style="fill:none;stroke:#000000;stroke-width:1.03100002;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:10;stroke-dasharray:none;stroke-opacity:1"
69
+ id="path26"
70
+ inkscape:connector-curvature="0" /></g><g
71
+ id="g28"
72
+ transform="translate(137.8633,43.0234)"><path
73
+ d="m 0,0 c 0,-16.712 -13.548,-30.262 -30.263,-30.262 -16.715,0 -30.263,13.55 -30.263,30.262 0,16.714 13.548,30.264 30.263,30.264 C -13.548,30.264 0,16.714 0,0"
74
+ style="fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none"
75
+ id="path30"
76
+ inkscape:connector-curvature="0" /></g><g
77
+ id="g32"
78
+ transform="translate(137.8633,43.0234)"><path
79
+ d="m 0,0 c 0,-16.712 -13.548,-30.262 -30.263,-30.262 -16.715,0 -30.263,13.55 -30.263,30.262 0,16.714 13.548,30.264 30.263,30.264 C -13.548,30.264 0,16.714 0,0 Z"
80
+ style="fill:none;stroke:#aa118e;stroke-width:3.80500007;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:10;stroke-dasharray:none;stroke-opacity:1"
81
+ id="path34"
82
+ inkscape:connector-curvature="0" /></g><g
83
+ id="g36"
84
+ transform="translate(126.1572,10.4326)"><path
85
+ d="M 0,0 13.452,63.586 H 24.458 L 22.012,-1.222 Z"
86
+ style="fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none"
87
+ id="path38"
88
+ inkscape:connector-curvature="0" /></g><g
89
+ id="g40"
90
+ transform="translate(140,73.6753)"><path
91
+ d="M 0,0 -13.086,-61.553"
92
+ style="fill:none;stroke:#aa118e;stroke-width:3.80500007;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:10;stroke-dasharray:none;stroke-opacity:1"
93
+ id="path42"
94
+ inkscape:connector-curvature="0" /></g><g
95
+ id="g44"
96
+ transform="translate(208.7871,43.0234)"><path
97
+ d="m 0,0 c 0,-16.712 -13.548,-30.262 -30.265,-30.262 -16.71,0 -30.26,13.55 -30.26,30.262 0,16.714 13.55,30.264 30.26,30.264 C -13.548,30.264 0,16.714 0,0 Z"
98
+ style="fill:none;stroke:#aa118e;stroke-width:3.80500007;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:10;stroke-dasharray:none;stroke-opacity:1"
99
+ id="path46"
100
+ inkscape:connector-curvature="0" /></g><g
101
+ id="g48"
102
+ transform="translate(150.6152,64.2373)"><path
103
+ d="m 0,0 8.558,-7.339 39.132,2.447 11.006,3.669 4.89,-31.793 -23.232,-24.458 H 14.673 l -23.848,25.679 z"
104
+ style="fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none"
105
+ id="path50"
106
+ inkscape:connector-curvature="0" /></g><g
107
+ id="g52"
108
+ transform="translate(157.1191,73.6753)"><path
109
+ d="M 0,0 -13.083,-61.553"
110
+ style="fill:none;stroke:#aa118e;stroke-width:3.80500007;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:10;stroke-dasharray:none;stroke-opacity:1"
111
+ id="path54"
112
+ inkscape:connector-curvature="0" /></g><g
113
+ id="g56"
114
+ transform="translate(302.4053,112.8701)"><path
115
+ d="M 0,0 -21.413,-100.748"
116
+ style="fill:none;stroke:#aa118e;stroke-width:3.80500007;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:10;stroke-dasharray:none;stroke-opacity:1"
117
+ id="path58"
118
+ inkscape:connector-curvature="0" /></g><g
119
+ id="g60"
120
+ transform="translate(321.9688,112.8701)"><path
121
+ d="M 0,0 -21.411,-100.748"
122
+ style="fill:none;stroke:#aa118e;stroke-width:3.80500007;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:10;stroke-dasharray:none;stroke-opacity:1"
123
+ id="path62"
124
+ inkscape:connector-curvature="0" /></g><g
125
+ id="g64"
126
+ transform="translate(386.0977,43.0234)"><path
127
+ d="m 0,0 c 0,-16.712 -13.548,-30.262 -30.262,-30.262 -16.717,0 -30.264,13.55 -30.264,30.262 0,16.714 13.547,30.264 30.264,30.264 C -13.548,30.264 0,16.714 0,0 Z"
128
+ style="fill:none;stroke:#aa118e;stroke-width:3.80500007;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:10;stroke-dasharray:none;stroke-opacity:1"
129
+ id="path66"
130
+ inkscape:connector-curvature="0" /></g><g
131
+ id="g68"
132
+ transform="translate(373.2832,68.3525)"><path
133
+ d="M 0,0 -36.029,-49.586"
134
+ style="fill:none;stroke:#aa118e;stroke-width:3.80500007;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:10;stroke-dasharray:none;stroke-opacity:1"
135
+ id="path70"
136
+ inkscape:connector-curvature="0" /></g><g
137
+ id="g72"
138
+ transform="translate(272.374,43.0234)"><path
139
+ d="m 0,0 c 0,-16.712 -13.549,-30.262 -30.263,-30.262 -16.713,0 -30.261,13.55 -30.261,30.262 0,16.714 13.548,30.264 30.261,30.264 C -13.549,30.264 0,16.714 0,0 Z"
140
+ style="fill:none;stroke:#aa118e;stroke-width:3.80500007;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:10;stroke-dasharray:none;stroke-opacity:1"
141
+ id="path74"
142
+ inkscape:connector-curvature="0" /></g><g
143
+ id="g76"
144
+ transform="translate(259.5596,68.3525)"><path
145
+ d="M 0,0 -36.026,-49.586"
146
+ style="fill:none;stroke:#aa118e;stroke-width:3.80500007;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:10;stroke-dasharray:none;stroke-opacity:1"
147
+ id="path78"
148
+ inkscape:connector-curvature="0" /></g><g
149
+ id="g80"
150
+ transform="translate(274.7334,17.7705)"><path
151
+ d="m 0,0 -18.342,6.114 1.836,38.721 4.89,7.542 14.062,-12.024 z"
152
+ style="fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none"
153
+ id="path82"
154
+ inkscape:connector-curvature="0" /></g><g
155
+ id="g84"
156
+ transform="translate(388.2529,17.5659)"><path
157
+ d="m 0,0 -18.343,6.114 1.837,38.721 4.889,7.543 14.063,-12.024 z"
158
+ style="fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none"
159
+ id="path86"
160
+ inkscape:connector-curvature="0" /></g><g
161
+ id="g88"
162
+ transform="translate(97.2607,72.8652)"><path
163
+ d="m 0,0 c -2.121,2.782 -8.539,5.239 -11.39,15.521 -1.514,5.458 -0.348,9.048 0.697,13.92 1.117,5.205 -2.088,8.004 -6.961,7.656 -9.744,-0.696 -35.559,-6.418 -66.122,5.569 -11.956,4.688 -10.765,4.068 -7.63,-3.755 4.984,-12.439 26.507,-21.789 45.152,-22.777 -10.106,0.909 -22.14,3.129 -25.502,4.001 -13.5,3.5 7,-13.5 34.502,-14.251 -7.484,0.237 -19.598,1.486 -22.5,2.25 -19,5 4,-11.999 32.25,-13.502 4.436,-0.236 15.731,-6.892 21.869,-3.295 3.834,2.246 1.379,0.801 3.834,2.246 C 3.888,-3.068 0,0 0,0"
164
+ style="fill:#77d1c8;fill-opacity:1;fill-rule:nonzero;stroke:none"
165
+ id="path90"
166
+ inkscape:connector-curvature="0" /></g><g
167
+ id="g92"
168
+ transform="translate(97.2607,72.8652)"><path
169
+ d="m 0,0 c -2.121,2.782 -8.539,5.239 -11.39,15.521 -1.514,5.458 -0.348,9.048 0.697,13.92 1.117,5.205 -2.088,8.004 -6.961,7.656 -9.744,-0.696 -35.559,-6.418 -66.122,5.569 -11.956,4.688 -10.765,4.068 -7.63,-3.755 4.984,-12.439 26.507,-21.789 45.152,-22.777 -10.106,0.909 -22.14,3.129 -25.502,4.001 -13.5,3.5 7,-13.5 34.502,-14.251 -7.484,0.237 -19.598,1.486 -22.5,2.25 -19,5 4,-11.999 32.25,-13.502 4.436,-0.236 15.731,-6.892 21.869,-3.295 3.834,2.246 1.379,0.801 3.834,2.246 C 3.888,-3.068 0,0 0,0 Z"
170
+ style="fill:none;stroke:#000000;stroke-width:2;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:10;stroke-dasharray:none;stroke-opacity:1"
171
+ id="path94"
172
+ inkscape:connector-curvature="0" /></g></g></g><text
173
+ transform="matrix(1,0,0,-1,389.499,62.9961)"
174
+ style="font-variant:normal;font-weight:normal;font-stretch:normal;font-size:18px;font-family:'Trebuchet MS';-inkscape-font-specification:TrebuchetMS;writing-mode:lr-tb;fill:#aa118e;fill-opacity:1;fill-rule:nonzero;stroke:none"
175
+ id="text98"><tspan
176
+ x="0"
177
+ y="0"
178
+ id="tspan96">®</tspan></text>
179
+ </g></svg>
@@ -0,0 +1,59 @@
1
+ <?xml version="1.0" encoding="utf-8"?>
2
+ <!-- Generator: Adobe Illustrator 22.1.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
3
+ <svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
4
+ viewBox="0 0 134.9 30" style="enable-background:new 0 0 134.9 30;" xml:space="preserve">
5
+ <style type="text/css">
6
+ .st0{fill:#bcbcbc;}
7
+ .st1{fill:#66CC00;}
8
+ </style>
9
+ <g>
10
+ <path class="st0" d="M16.3,21.6h-2.4v-13h2.4V21.6z"/>
11
+ <path class="st0" d="M21.3,13.5c0.2-0.2,0.4-0.4,0.6-0.5c0.2-0.2,0.4-0.3,0.7-0.4c0.2-0.1,0.5-0.2,0.7-0.3c0.3-0.1,0.6-0.1,0.9-0.1
12
+ c0.5,0,1,0.1,1.3,0.3s0.7,0.4,1,0.7s0.5,0.7,0.6,1.1c0.1,0.4,0.2,0.9,0.2,1.4v5.9h-2.2v-5.9c0-0.6-0.1-1-0.4-1.3S24,14,23.5,14
13
+ c-0.4,0-0.7,0.1-1.1,0.3c-0.3,0.2-0.7,0.4-1,0.7v6.7h-2.2v-9.2h1.4c0.3,0,0.5,0.1,0.6,0.4L21.3,13.5z"/>
14
+ <path class="st0" d="M32.1,8.2v13.4h-2.2V8.2H32.1z"/>
15
+ <path class="st0" d="M37.3,9.7c0,0.2,0,0.4-0.1,0.5s-0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.4,0.6,0.8,0.8,1.3c0.2,0.5,0.3,1.1,0.3,1.8
53
+ c0,0.3,0,0.6-0.1,0.7c-0.1,0.1-0.2,0.2-0.4,0.2H109.1z M113.4,15.9c0-0.3,0-0.6-0.1-0.8c-0.1-0.3-0.2-0.5-0.4-0.7
54
+ c-0.2-0.2-0.4-0.3-0.6-0.5c-0.2-0.1-0.5-0.2-0.9-0.2c-0.6,0-1.1,0.2-1.5,0.5c-0.4,0.4-0.6,0.9-0.7,1.6H113.4z"/>
55
+ <path class="st0" d="M119.6,14c0.3-0.6,0.6-1,1-1.3c0.4-0.3,0.9-0.5,1.4-0.5c0.4,0,0.8,0.1,1,0.3l-0.1,1.7c0,0.1-0.1,0.2-0.1,0.2
56
+ c-0.1,0-0.1,0.1-0.2,0.1c-0.1,0-0.2,0-0.4,0c-0.2,0-0.3,0-0.5,0c-0.2,0-0.5,0-0.7,0.1s-0.4,0.2-0.5,0.3c-0.2,0.1-0.3,0.3-0.4,0.5
57
+ c-0.1,0.2-0.2,0.4-0.3,0.7v5.7h-2.2v-9.2h1.3c0.2,0,0.4,0,0.5,0.1c0.1,0.1,0.2,0.2,0.2,0.4L119.6,14z"/>
58
+ </g>
59
+ </svg>
@@ -15,9 +15,10 @@ export class Accordian {
15
15
  addCard(title, body, selected, data) {
16
16
  const a = this;
17
17
  const card = $('<div class="card"></div>')
18
- .append($('<div class="title"></div>')
18
+ .append($('<button class="title"></button>')
19
+ .attr("aria-label", "Expand section")
19
20
  .append(title)
20
- .click(function () {
21
+ .on("click", function () {
21
22
  var thisCard = $(this).closest(".card");
22
23
  if (thisCard.hasClass("active")) {
23
24
  if (!a.options.alwaysOpen) {
@@ -31,7 +32,7 @@ export class Accordian {
31
32
  }
32
33
  })
33
34
  )
34
- .append($('<div class="body"></div>').append(body))
35
+ .append($('<div class="card-body"></div>').append(body))
35
36
  .appendTo(this._contents);
36
37
 
37
38
  if (data !== null) {
@@ -48,7 +49,7 @@ export class Accordian {
48
49
  this._contents.find(".card").first().addClass("active");
49
50
  }
50
51
  if (this.options.dissolveSingle && this._contents.children().length == 1) {
51
- return this._contents.children().first().find(".body");
52
+ return this._contents.children().first().find(".card-body");
52
53
  }
53
54
  return this._contents;
54
55
  }
@@ -1,8 +1,5 @@
1
1
  // See COPYRIGHT.md for copyright information
2
2
 
3
- import $ from 'jquery';
4
- import i18next from 'i18next';
5
- import { QName } from './qname.js';
6
3
  import { Period } from './period.js';
7
4
  import { Identifiers } from './identifiers.js';
8
5
 
@@ -28,6 +25,13 @@ export class Aspect {
28
25
  return aspectLabelMap[this._aspect] ?? this._report.getLabel(this._aspect);
29
26
  }
30
27
 
28
+ labelOrNameAndLang() {
29
+ if (this._aspect in aspectLabelMap) {
30
+ return {label: aspectLabelMap};
31
+ }
32
+ return this._report.getLabelOrNameAndLang(this._aspect);
33
+ }
34
+
31
35
  value() {
32
36
  return this._value;
33
37
  }
@@ -36,6 +40,17 @@ export class Aspect {
36
40
  return a !== undefined && this._aspect === a._aspect && this._value === a._value;
37
41
  }
38
42
 
43
+ /**
44
+ * Compares this Aspect to another
45
+ *
46
+ *
47
+ * @param {Aspect} b - The Aspect instance to compare against.
48
+ * @returns {number} - Negative if this < b, positive if this > b, zero if
49
+ * equal.
50
+ */
51
+ compareTo(b) {
52
+ return this._aspect.localeCompare(b._aspect);
53
+ }
39
54
 
40
55
  isTaxonomyDefined() {
41
56
  return this._aspect.includes(":");
@@ -46,27 +61,31 @@ export class Aspect {
46
61
  }
47
62
 
48
63
  valueLabel(rolePrefix) {
64
+ return this.valueLabelAndLang(rolePrefix).label;
65
+ }
66
+
67
+ valueLabelAndLang(rolePrefix) {
49
68
  if (this._aspect === 'c') {
50
- return this._report.getLabel(this._value, rolePrefix) || this._value;
69
+ return this._report.getLabelOrNameAndLang(this._value, rolePrefix);
51
70
  }
52
71
  if (this.isTaxonomyDefined()) {
53
72
  if (this._report.getConcept(this._aspect).isTypedDimension()) {
54
- return this._value === null ? "nil" : this._value;
73
+ return {label: (this._value === null ? "nil" : this._value)};
55
74
  }
56
- return this._report.getLabel(this._value, rolePrefix) || this._value;
75
+ return this._report.getLabelOrNameAndLang(this._value, rolePrefix);
57
76
  }
58
77
  else if (this._aspect === 'u') {
59
- return this._report.getUnit(this._value).measureLabel();
78
+ return {label: this._report.reportSet.getUnit(this._value).label()};
60
79
  }
61
80
  else if (this._aspect === 'p') {
62
81
  const p = new Period(this._value);
63
- return p.toString();
82
+ return {label: p.toString()};
64
83
  }
65
84
  else if (this._aspect === 'e') {
66
- return Identifiers.readableName(this._report.qname(this._value));
85
+ return {label: Identifiers.readableName(this._report.qname(this._value))};
67
86
  }
68
87
  else {
69
- return this._value;
88
+ return {label: this._value};
70
89
  }
71
90
  }
72
91
  }
@@ -1,14 +1,16 @@
1
1
  // See COPYRIGHT.md for copyright information
2
2
 
3
3
  import { Aspect, AspectSet } from "./aspect.js";
4
- import { iXBRLReport } from "./report.js";
4
+ import { ReportSet } from "./reportset.js";
5
5
  import { TestInspector } from "./test-utils.js";
6
+ import { NAMESPACE_ISO4217 } from "./util";
6
7
 
7
- var testReportData = {
8
+ const testReportData = {
8
9
  "prefixes": {
9
10
  "eg": "http://www.example.com",
10
- "iso4217": "http://www.xbrl.org/2003/iso4217"
11
+ "iso4217": NAMESPACE_ISO4217
11
12
  },
13
+ "facts" : {},
12
14
  "concepts": {
13
15
  "eg:Concept1": {
14
16
  "labels": {
@@ -43,75 +45,82 @@ var testReportData = {
43
45
  }
44
46
  };
45
47
 
46
- var insp = new TestInspector();
48
+ const insp = new TestInspector();
47
49
  beforeAll(() => {
48
50
  return insp.i18nInit();
49
51
  });
50
52
 
51
- var testReport = new iXBRLReport(testReportData);
53
+ const testReportSet = new ReportSet(testReportData);
54
+ testReportSet._initialize();
55
+ const testReport = testReportSet.reports[0];
52
56
 
53
57
  test("Concept aspect labels", () => {
54
- var conceptAspect = new Aspect("c", "eg:Concept1", testReport);
58
+ const conceptAspect = new Aspect("c", "eg:Concept1", testReport);
55
59
  expect(conceptAspect.label()).toBe("Concept");
56
60
  expect(conceptAspect.valueLabel()).toBe("English label");
57
61
  });
58
62
 
59
63
  test("Period aspect labels", () => {
60
- var periodAspect = new Aspect("p", "2018-01-01/2019-01-01", testReport);
64
+ const periodAspect = new Aspect("p", "2018-01-01/2019-01-01", testReport);
61
65
  expect(periodAspect.label()).toBe("Period");
62
66
  expect(periodAspect.valueLabel()).toBe("1 Jan 2018 to 31 Dec 2018");
63
67
  });
64
68
 
65
69
  test("Unit aspects label - known currency", () => {
66
- var unitAspect = new Aspect("u", "iso4217:GBP", testReport);
70
+ const unitAspect = new Aspect("u", "iso4217:GBP", testReport);
67
71
  expect(unitAspect.label()).toBe("Unit");
68
72
  expect(unitAspect.valueLabel()).toBe("£");
69
73
  });
70
74
 
71
75
  test("Unit aspects label - known currency (EUR)", () => {
72
- var unitAspect = new Aspect("u", "iso4217:EUR", testReport);
76
+ const unitAspect = new Aspect("u", "iso4217:EUR", testReport);
73
77
  expect(unitAspect.label()).toBe("Unit");
74
78
  expect(unitAspect.valueLabel()).toBe("€");
75
79
  });
76
80
 
77
81
  test("Unit aspects label - unknown currency", () => {
78
- var unitAspect = new Aspect("u", "iso4217:ZAR", testReport);
82
+ const unitAspect = new Aspect("u", "iso4217:ZZZZ", testReport);
79
83
  expect(unitAspect.label()).toBe("Unit");
80
- expect(unitAspect.valueLabel()).toBe("ZAR");
84
+ expect(unitAspect.valueLabel()).toBe("ZZZZ");
81
85
  });
82
86
 
83
87
  test("Entity aspect labels - unknown scheme", () => {
84
- var tda = new Aspect("e", "eg:1234567", testReport);
88
+ const tda = new Aspect("e", "eg:1234567", testReport);
85
89
  expect(tda.label()).toBe("Entity");
86
90
  expect(tda.valueLabel()).toBe("eg:1234567");
87
91
  });
88
92
 
89
- test("Taxonomy defined dimension labels", () => {
90
- var tda = new Aspect("eg:ExplicitDimension", "eg:Concept2", testReport);
91
- expect(tda.label()).toBe("Explicit dimension");
92
- expect(tda.valueLabel()).toBe("English label for concept two");
93
-
94
- tda = new Aspect("eg:TypedDimension", "eg:Concept2", testReport);
95
- expect(tda.label()).toBe("Typed dimension");
96
- // "eg:Concept2" should be treated as a string, not a member name
97
- expect(tda.valueLabel()).toBe("eg:Concept2");
98
-
99
- tda = new Aspect("eg:TypedDimension", "1 2 3 4", testReport);
100
- expect(tda.label()).toBe("Typed dimension");
101
- expect(tda.valueLabel()).toBe("1 2 3 4");
102
-
103
- tda = new Aspect("eg:TypedDimension", null, testReport);
104
- expect(tda.label()).toBe("Typed dimension");
105
- expect(tda.valueLabel()).toBe("nil");
93
+ describe("Taxonomy defined dimension labels", () => {
94
+ test("Explicit dimension", () => {
95
+ const tda = new Aspect("eg:ExplicitDimension", "eg:Concept2", testReport);
96
+ expect(tda.label()).toBe("Explicit dimension");
97
+ expect(tda.valueLabel()).toBe("English label for concept two");
98
+ });
99
+ test("Typed dimension - qname-like value", () => {
100
+ const tda = new Aspect("eg:TypedDimension", "eg:Concept2", testReport);
101
+ expect(tda.label()).toBe("Typed dimension");
102
+ // "eg:Concept2" should be treated as a string, not a member name
103
+ expect(tda.valueLabel()).toBe("eg:Concept2");
104
+ });
105
+ test("Typed dimension - string value", () => {
106
+ const tda = new Aspect("eg:TypedDimension", "1 2 3 4", testReport);
107
+ expect(tda.label()).toBe("Typed dimension");
108
+ expect(tda.valueLabel()).toBe("1 2 3 4");
109
+ });
110
+ test("Typed dimension - nil value", () => {
111
+ const tda = new Aspect("eg:TypedDimension", null, testReport);
112
+ expect(tda.label()).toBe("Typed dimension");
113
+ expect(tda.valueLabel()).toBe("nil");
114
+ });
106
115
  });
107
116
 
108
117
  describe("AspectSet", () => {
109
118
  test("Unique values", () => {
110
- var as = new AspectSet()
119
+ const as = new AspectSet()
111
120
  as.add(new Aspect("c", "eg:Concept1", testReport));
112
121
  as.add(new Aspect("c", "eg:Concept2", testReport));
113
122
  as.add(new Aspect("c", "eg:Concept1", testReport));
114
- var uv = as.uniqueValues()
123
+ const uv = as.uniqueValues()
115
124
  expect(uv).toHaveLength(2);
116
125
  expect(uv.map(x => x.value())).toEqual(expect.arrayContaining(["eg:Concept1", "eg:Concept2"]));
117
126
  });
@@ -0,0 +1,14 @@
1
+ // See COPYRIGHT.md for copyright information
2
+
3
+ import i18next from 'i18next';
4
+ import { NAMESPACE_XBRLI } from "./util.js";
5
+
6
+ export class Balance {
7
+ constructor(balance) {
8
+ this.balance = balance;
9
+ }
10
+
11
+ label() {
12
+ return i18next.t(`balanceTypes:${this.balance}`, {defaultValue: this.balance});
13
+ }
14
+ }