ixbrl-viewer 1.4.28__py3-none-any.whl → 1.4.29__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.

@@ -23,6 +23,7 @@
23
23
  "calculationIsConsistent": "Calculation is consistent",
24
24
  "calculationIsInconsistent": "Calculation is inconsistent",
25
25
  "calculationUnchecked": "Calculation not checked due to presence of duplicate facts",
26
+ "calculationUncheckedIncorrectVersion": "Calculation 1.1 relationships not checked in legacy calculation mode",
26
27
  "change": "Change",
27
28
  "changeFromIn": "From {{from}} in ",
28
29
  "changePercentageDecrease": "{{decrease}}% decrease on ",
@@ -4,6 +4,7 @@ import Decimal from 'decimal.js';
4
4
  import { setDefault } from './util.js';
5
5
  import { Interval } from './interval.js';
6
6
  import { FactSet } from './factset.js';
7
+ import { CALC11_ARCROLE, CALC_ARCROLE } from './util.js';
7
8
 
8
9
  export class Calculation {
9
10
 
@@ -18,13 +19,16 @@ export class Calculation {
18
19
  const fact = this.fact;
19
20
  const report = fact.report;
20
21
  if (!this._conceptToFact) {
21
- const rels = report.getChildRelationships(fact.conceptName(), "calc")
22
22
  const ctf = {};
23
- for (const [elr, rr] of Object.entries(rels)) {
24
- ctf[elr] = {};
25
- if (rr.length > 0) {
26
- const otherFacts = report.getAlignedFacts(fact, {"c": rr.map(r => r.t )});
27
- otherFacts.forEach(otherFact => setDefault(ctf[elr], otherFact.conceptName(), new FactSet()).add(otherFact));
23
+ for (const version of [CALC_ARCROLE, CALC11_ARCROLE]) {
24
+ const rels = report.getChildRelationships(fact.conceptName(), version)
25
+ for (const [elr, rr] of Object.entries(rels)) {
26
+ setDefault(ctf, version, {});
27
+ ctf[version][elr] = {};
28
+ if (rr.length > 0) {
29
+ const otherFacts = report.getAlignedFacts(fact, {"c": rr.map(r => r.t )});
30
+ otherFacts.forEach(otherFact => setDefault(ctf[version][elr], otherFact.conceptName(), new FactSet()).add(otherFact));
31
+ }
28
32
  }
29
33
  }
30
34
  this._conceptToFact = ctf;
@@ -40,11 +44,13 @@ export class Calculation {
40
44
  resolvedCalculations() {
41
45
  const calculations = [];
42
46
  const ctf = this.calculationFacts();
43
- for (const [elr, concepts] of Object.entries(ctf)) {
44
- if (Object.keys(concepts).length > 0) {
45
- calculations.push(this.resolvedCalculation(elr));
46
- }
47
- }
47
+ for (const [version, o] of Object.entries(ctf)) {
48
+ for (const [elr, concepts] of Object.entries(o)) {
49
+ if (Object.keys(concepts).length > 0) {
50
+ calculations.push(this.resolvedCalculation(elr, version));
51
+ }
52
+ }
53
+ }
48
54
  return calculations;
49
55
  }
50
56
 
@@ -55,34 +61,36 @@ export class Calculation {
55
61
  const ctf = this.calculationFacts();
56
62
  let bestMatchELR = "";
57
63
  let bestMatchCount = -1;
58
- for (const [elr, rr] of Object.entries(ctf)) {
59
- let matchCount = 0;
60
- for (const [concept, calcFactSet] of Object.entries(rr)) {
61
- let matched = 0;
62
- for (const calcFact of calcFactSet.items()) {
63
- if (facts.includes(calcFact.vuid)) {
64
- matched = 1;
65
- }
64
+ for (const [version, o] of Object.entries(ctf)) {
65
+ for (const [elr, rr] of Object.entries(o)) {
66
+ let matchCount = 0;
67
+ for (const [concept, calcFactSet] of Object.entries(rr)) {
68
+ let matched = 0;
69
+ for (const calcFact of calcFactSet.items()) {
70
+ if (facts.includes(calcFact.vuid)) {
71
+ matched = 1;
72
+ }
73
+ }
74
+ matchCount += matched;
66
75
  }
67
- matchCount += matched;
68
- }
69
- if (matchCount/Object.keys(rr).length > bestMatchCount) {
70
- bestMatchCount = matchCount/Object.keys(rr).length;
71
- bestMatchELR = elr;
72
- }
73
- }
76
+ if (matchCount/Object.keys(rr).length > bestMatchCount) {
77
+ bestMatchCount = matchCount/Object.keys(rr).length;
78
+ bestMatchELR = elr;
79
+ }
80
+ }
81
+ }
74
82
  return bestMatchELR;
75
83
  }
76
84
 
77
85
  /*
78
86
  * Returns a ResolvedCalculation object for the specified ELR
79
87
  */
80
- resolvedCalculation(elr) {
81
- const calcFacts = this.calculationFacts()[elr];
88
+ resolvedCalculation(elr, version) {
89
+ const calcFacts = this.calculationFacts()[version][elr];
82
90
  const report = this.fact.report;
83
- const rels = report.getChildRelationships(this.fact.conceptName(), "calc")[elr];
91
+ const rels = report.getChildRelationships(this.fact.conceptName(), version)[elr];
84
92
  const resolvedCalcClass = this.calc11 ? ResolvedCalc11Calculation : ResolvedLegacyCalculation;
85
- const resolvedCalculation = new resolvedCalcClass(elr, this.fact);
93
+ const resolvedCalculation = new resolvedCalcClass(elr, this.fact, version);
86
94
  for (const r of rels) {
87
95
  const factset = calcFacts[r.t] ?? new FactSet();
88
96
  resolvedCalculation.addRow(new CalculationContribution(report.getConcept(r.t), r.w, factset));
@@ -120,11 +128,12 @@ class CalculationContribution {
120
128
 
121
129
  class AbstractResolvedCalculation {
122
130
 
123
- constructor(elr, fact) {
131
+ constructor(elr, fact, relationshipVersion) {
124
132
  this.totalFact = fact;
125
133
  this.totalFactSet = new FactSet(fact.report.getAlignedFacts(fact));
126
134
  this.elr = elr;
127
135
  this.rows = [];
136
+ this.relationshipVersion = relationshipVersion;
128
137
  }
129
138
 
130
139
  addRow(contribution) {
@@ -171,13 +180,17 @@ export class ResolvedCalc11Calculation extends AbstractResolvedCalculation {
171
180
  export class ResolvedLegacyCalculation extends AbstractResolvedCalculation {
172
181
 
173
182
  binds() {
174
- return super.binds() && this.rows.every((r) => r.facts.completeDuplicates());
183
+ return this.relationshipVersion == CALC_ARCROLE && super.binds() && this.rows.every((r) => r.facts.completeDuplicates());
175
184
  }
176
185
 
177
186
  unchecked() {
178
187
  return super.binds() && !this.binds();
179
188
  }
180
189
 
190
+ uncheckedDueToVersionMismatch() {
191
+ return this.relationshipVersion !== CALC_ARCROLE;
192
+ }
193
+
181
194
  calculatedTotal() {
182
195
  let total = new Decimal(0);
183
196
 
@@ -821,7 +821,12 @@ export class Inspector {
821
821
  calcStatusIcon
822
822
  .addClass("unchecked-flag")
823
823
  .attr("title", i18next.t('factDetails.calculationUnchecked'))
824
- calcStatusText.text(i18next.t('factDetails.calculationUnchecked'));
824
+ if (rCalc.uncheckedDueToVersionMismatch()) {
825
+ calcStatusText.text(i18next.t('factDetails.calculationUncheckedIncorrectVersion'));
826
+ }
827
+ else {
828
+ calcStatusText.text(i18next.t('factDetails.calculationUnchecked'));
829
+ }
825
830
  }
826
831
 
827
832
  a.addCard(cardTitle, calcBody, rCalc.elr == selectedELR);
@@ -9,6 +9,9 @@ export const SHOW_FACT = 'SHOW_FACT';
9
9
 
10
10
  export const NAMESPACE_ISO4217 = 'http://www.xbrl.org/2003/iso4217';
11
11
 
12
+ export const CALC_ARCROLE = "calc";
13
+ export const CALC11_ARCROLE = "calc11";
14
+
12
15
  // The number of distinct highlight colors defined in inspector.less
13
16
  export const HIGHLIGHT_COLORS = 3;
14
17
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: ixbrl-viewer
3
- Version: 1.4.28
3
+ Version: 1.4.29
4
4
  Summary: The Arelle iXBRL Viewer allows iXBRL reports to be viewed interactively in a web browser.
5
5
  Author-email: "arelle.org" <support@arelle.org>
6
6
  License: Apache-2.0
@@ -34,11 +34,11 @@ Requires-Dist: lxml <6,>=4
34
34
  Provides-Extra: arelle
35
35
  Requires-Dist: arelle-release ==2.* ; extra == 'arelle'
36
36
  Provides-Extra: dev
37
- Requires-Dist: flake8 ==7.0.0 ; extra == 'dev'
37
+ Requires-Dist: flake8 ==7.1.0 ; extra == 'dev'
38
38
  Requires-Dist: lxml-stubs ==0.5.1 ; extra == 'dev'
39
- Requires-Dist: mypy ==1.10.0 ; extra == 'dev'
40
- Requires-Dist: pytest ==8.2.1 ; extra == 'dev'
41
- Requires-Dist: typing-extensions ==4.12.0 ; extra == 'dev'
39
+ Requires-Dist: mypy ==1.10.1 ; extra == 'dev'
40
+ Requires-Dist: pytest ==8.2.2 ; extra == 'dev'
41
+ Requires-Dist: typing-extensions ==4.12.2 ; extra == 'dev'
42
42
 
43
43
  # Arelle iXBRL Viewer
44
44
 
@@ -1,8 +1,8 @@
1
1
  iXBRLViewerPlugin/__init__.py,sha256=11uzkyzBvzgrFDf5EKwBZZ70iZER9LBCY7-6Eu3kXFM,15808
2
- iXBRLViewerPlugin/_version.py,sha256=xRKV1NGkyiyyNzFGzdbk5IVPLceRrq8H5_kp9SYw6Qc,413
2
+ iXBRLViewerPlugin/_version.py,sha256=kfVf-BkLnZrW3kthFiwCq4HHUs_dNkoJYhqseJxaTjY,413
3
3
  iXBRLViewerPlugin/constants.py,sha256=gXwZxPp5PJETC-sOvLxOToSe5pIjmQv2WMhZMNoPpKw,1062
4
4
  iXBRLViewerPlugin/featureConfig.py,sha256=tOViPYmN32i2uIf_T9HGgbkkv41VoTpTjqhn4w9rTgw,194
5
- iXBRLViewerPlugin/iXBRLViewer.py,sha256=7imzjiyaTMxqFuI-TcGu3nzo7JQvIvHIsJ9XMZ-BIW0,27825
5
+ iXBRLViewerPlugin/iXBRLViewer.py,sha256=LcSUontEDcJAb4TkRKssf-PNhUB24IUAx8kxEzJYI9E,27920
6
6
  iXBRLViewerPlugin/stubviewer.html,sha256=hc5BeIR7y3ojGRux_Hy5oqEAHdlQ34kk3lL5eH-B4AU,158
7
7
  iXBRLViewerPlugin/ui.py,sha256=OismWQzm_T16j-6O8cfGZ7qLMKIMIA36rRlb9mbOOh0,10512
8
8
  iXBRLViewerPlugin/xhtmlserialize.py,sha256=2fV88KD5XOXqDzYaQgovbvuUQINF0n6E-6Nw174zniY,6771
@@ -11,14 +11,14 @@ iXBRLViewerPlugin/viewer/version.js,sha256=7b5si8UmaS7QqALQIP-wJ0I8onKFox8VyaAiU
11
11
  iXBRLViewerPlugin/viewer/webpack.common.js,sha256=hpXufjShXAESQh8Ds7ViJ_tbr8XSb7EdqQLRvyu_mQg,1691
12
12
  iXBRLViewerPlugin/viewer/webpack.dev.js,sha256=R9AwY_TBrg9otvXpDxT1UsGg5eMqi4aXW7C7EIsHzZk,551
13
13
  iXBRLViewerPlugin/viewer/webpack.prod.js,sha256=vfLowWC1EOty0zbq9P-usGaJ3w-JoERpJrYaE9MfoSE,499
14
- iXBRLViewerPlugin/viewer/dist/ixbrlviewer.js,sha256=1azWxmA_bsZo8_9mDeSf3EyEMqLjILYQKk6pgWRnx_k,800179
14
+ iXBRLViewerPlugin/viewer/dist/ixbrlviewer.js,sha256=s4sZHdzc14ZlVMbHkWUhxoE49mL8w8eUG_zm6Z_phEA,800919
15
15
  iXBRLViewerPlugin/viewer/dist/ixbrlviewer.js.LICENSE.txt,sha256=2bD4VShd311WquXvtJNpD0aHN3ru67ZeolE1OxkV5Ys,1832
16
16
  iXBRLViewerPlugin/viewer/src/html/fact-details.html,sha256=P9BJw1OK4nIYfoT4KPwW1WP94ZeD7v1nisvSKMeSnU8,1495
17
17
  iXBRLViewerPlugin/viewer/src/html/footnote-details.html,sha256=9I7y0KM7xsPzbiZheuHkm1k4nHNXD8S9qxvD_Y0I1Us,278
18
18
  iXBRLViewerPlugin/viewer/src/html/inspector.html,sha256=Uze8Y_uSeeYqz_eMNkABc2VP2yRvlfIdg8Zo-kOfTTo,20062
19
19
  iXBRLViewerPlugin/viewer/src/i18n/en/currencies.json,sha256=p2vXnQcaRWX3tDY8E52AaIeKhbmcNNhPfTBHlL5AL_U,315
20
20
  iXBRLViewerPlugin/viewer/src/i18n/en/referenceparts.json,sha256=rp0p7aWt0U2Ny3ai_fadZhdV-LWx-9-tgKWQmggoewM,207
21
- iXBRLViewerPlugin/viewer/src/i18n/en/translation.json,sha256=g7PNlozn0xVXN8bg_JGAaXjy6lyae8nzSPGpBR79B0A,4915
21
+ iXBRLViewerPlugin/viewer/src/i18n/en/translation.json,sha256=UD9iueMSeOWWY3SHjLVSzlteG67TwzDUFR7wtsqH3Vs,5031
22
22
  iXBRLViewerPlugin/viewer/src/i18n/es/currencies.json,sha256=YzzYkYpUAgYFBDROUosaxoVbft5zPXKJ4zI9Zb2nsqQ,171
23
23
  iXBRLViewerPlugin/viewer/src/i18n/es/referenceparts.json,sha256=X6l9IS1w9LSItMaS14q9gqDIu1jaeHthuhOogaBLRTI,237
24
24
  iXBRLViewerPlugin/viewer/src/i18n/es/translation.json,sha256=PtjbAS002o6kb2eKlyV5K3UeTs0LPgIfDb0WkldI0_A,4177
@@ -60,7 +60,7 @@ iXBRLViewerPlugin/viewer/src/img/powered-by-workiva.svg,sha256=Zf2JArzszZCn7zCkH
60
60
  iXBRLViewerPlugin/viewer/src/js/accordian.js,sha256=l1OgFe55zuLnr2QwN8cJe3qa4bb_b9P0RjYl_FRgwKk,1858
61
61
  iXBRLViewerPlugin/viewer/src/js/aspect.js,sha256=E8biCCoCIB9rEZoum4AmwtC1jJ3c4b8WjjXkoIsuBtY,2120
62
62
  iXBRLViewerPlugin/viewer/src/js/aspect.test.js,sha256=ctDakUsDdJ65uuW70WcnsRW7keVBOsxWrKqD6PZsPC8,4269
63
- iXBRLViewerPlugin/viewer/src/js/calculation.js,sha256=JJvoyC09QuzL5-TbiB7iC1Wdygtg6GvfV-4p3VIySGw,6060
63
+ iXBRLViewerPlugin/viewer/src/js/calculation.js,sha256=tB5Tzr6aMrnERkBlLcPjJ0_SfGUT94FvXUbUR0id1iU,6778
64
64
  iXBRLViewerPlugin/viewer/src/js/calculation.test.js,sha256=XjrEimf3frSjpWh8PX0eu7ZX3ZLOlJd95op5FMEvUwA,11223
65
65
  iXBRLViewerPlugin/viewer/src/js/calculationInspector.js,sha256=TLShvzn-OJDS0tJ72K6dYpmQ970WuY74_xp9-ssrMSE,8534
66
66
  iXBRLViewerPlugin/viewer/src/js/chart.js,sha256=ZRoL4QZM1TnDw96HhA0kpvLZSaCvLMjLMIO7Kxo_LpA,7066
@@ -77,7 +77,7 @@ iXBRLViewerPlugin/viewer/src/js/footnote.js,sha256=jZreicIBPAtBjbpoRbLnkSs8fHdCY
77
77
  iXBRLViewerPlugin/viewer/src/js/identifiers.js,sha256=gcGitF1CfiyiUvzWDG6INnFDIBi5jXdBgiqCB8Ip0YE,2260
78
78
  iXBRLViewerPlugin/viewer/src/js/identifiers.test.js,sha256=eu2TkHVpuRItIyNdNAuoITnpGFwwAicqMynf0dFreRk,2112
79
79
  iXBRLViewerPlugin/viewer/src/js/index.js,sha256=SdxunWx8kNw0-vwwnr58-ac1-eQIE1__Ll7ekNNK79E,232
80
- iXBRLViewerPlugin/viewer/src/js/inspector.js,sha256=c7s1kMxGbcRIl2LQEzYwV478efbWrMZBFp7c_As7g-A,50423
80
+ iXBRLViewerPlugin/viewer/src/js/inspector.js,sha256=USIN_ciPzp-6mNKI29c1wOciBKZddgmi0JWfpY0yFRY,50651
81
81
  iXBRLViewerPlugin/viewer/src/js/inspector.test.js,sha256=AQjbwTllw_dZfovCfjfHWtt0kdjzDnoXw-mQ0IrHKWk,10086
82
82
  iXBRLViewerPlugin/viewer/src/js/interval.js,sha256=ZEIbH4uwTIvF1jmulEWnJI5ZD1AamgKtkyplOwlcrv0,1889
83
83
  iXBRLViewerPlugin/viewer/src/js/interval.test.js,sha256=pLbukwlcS38ycDJaNYV_9pAca7wiprunXHqD4TkHEi8,4577
@@ -108,7 +108,7 @@ iXBRLViewerPlugin/viewer/src/js/test-utils.js,sha256=MXhrubSf0PmSRsrDrqHftPgTrK5
108
108
  iXBRLViewerPlugin/viewer/src/js/textblockviewer.js,sha256=lCAZeN_wrSwmYie_rwdeIFCIjiOSblT0K9Vslqwktc8,1874
109
109
  iXBRLViewerPlugin/viewer/src/js/unit.js,sha256=eHaCTE3snK7uuXK48VK1yPPpl0MAQReqPGWKhBvzwPQ,1638
110
110
  iXBRLViewerPlugin/viewer/src/js/unit.test.js,sha256=l4nELK-gK2uJG6jXHEXwnAKzCCCQ7V_oTySaUN_JnhQ,2801
111
- iXBRLViewerPlugin/viewer/src/js/util.js,sha256=oF6wGOTODyMNrQ9N91FqOYamW_bLmLYUdiYaGnviH-c,6793
111
+ iXBRLViewerPlugin/viewer/src/js/util.js,sha256=ESRvK3v3Vaf0NcF4WV3bPKbiuVJjH1xZr0U6F8uX6CQ,6870
112
112
  iXBRLViewerPlugin/viewer/src/js/util.test.js,sha256=9z1y2ImH2t8GKAF5wpkXBADkeQd6X6H7JBejbaSHRwg,6460
113
113
  iXBRLViewerPlugin/viewer/src/js/validationreport.js,sha256=zWA9_8sWavX2Fi8fwEyDPABxWL_XSzvNQ21O1Qu2ayY,644
114
114
  iXBRLViewerPlugin/viewer/src/js/viewer.js,sha256=Zqyj3ROu4v8u0-gcFp84YAPyj3ncljsxXuG9ftoOdBY,35018
@@ -156,10 +156,10 @@ tests/unit_tests/iXBRLViewerPlugin/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQe
156
156
  tests/unit_tests/iXBRLViewerPlugin/mock_arelle.py,sha256=fQKJGwceaEVaxvqV9tyuvT6DJB5s1X3-oSMjbFMKlS8,1301
157
157
  tests/unit_tests/iXBRLViewerPlugin/test_iXBRLViewer.py,sha256=1Q4O_1SzJaDjouRbkgn2PGFsWfJ4_lK-zzsgV9iXXF0,31725
158
158
  tests/unit_tests/iXBRLViewerPlugin/test_xhtmlserialize.py,sha256=kdrg4i-YXnYAGl9TLWEACPQF0V69OAMXdXLYJwefsH0,12521
159
- ixbrl_viewer-1.4.28.dist-info/LICENSE,sha256=TZJhu77S_2-WQcPAkuIAlQiuuiNqVcuHBjd7z3Y5S08,16645
160
- ixbrl_viewer-1.4.28.dist-info/METADATA,sha256=R6OQwhHoICv5CpMmyjeBWtHbThTNVTf0Ag4SXMOt-8A,14716
161
- ixbrl_viewer-1.4.28.dist-info/NOTICE,sha256=-SHDY0OY7s4gm4Rdk5AB3nbnUsrdHEHPdJuGFR_vuM4,566
162
- ixbrl_viewer-1.4.28.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
163
- ixbrl_viewer-1.4.28.dist-info/entry_points.txt,sha256=2XUzP20WGwxdvnugdBybUBwAB3xf_zvrOR5W_smFz_4,65
164
- ixbrl_viewer-1.4.28.dist-info/top_level.txt,sha256=h8MkrMhC_t2-KbfS1oxJVnFAbn5NZJH8END_BL40mv8,24
165
- ixbrl_viewer-1.4.28.dist-info/RECORD,,
159
+ ixbrl_viewer-1.4.29.dist-info/LICENSE,sha256=TZJhu77S_2-WQcPAkuIAlQiuuiNqVcuHBjd7z3Y5S08,16645
160
+ ixbrl_viewer-1.4.29.dist-info/METADATA,sha256=0UAizayrUu0S1uxbyIIY5IXDZf19PZHp0Rb6unpICuQ,14716
161
+ ixbrl_viewer-1.4.29.dist-info/NOTICE,sha256=-SHDY0OY7s4gm4Rdk5AB3nbnUsrdHEHPdJuGFR_vuM4,566
162
+ ixbrl_viewer-1.4.29.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
163
+ ixbrl_viewer-1.4.29.dist-info/entry_points.txt,sha256=2XUzP20WGwxdvnugdBybUBwAB3xf_zvrOR5W_smFz_4,65
164
+ ixbrl_viewer-1.4.29.dist-info/top_level.txt,sha256=h8MkrMhC_t2-KbfS1oxJVnFAbn5NZJH8END_BL40mv8,24
165
+ ixbrl_viewer-1.4.29.dist-info/RECORD,,