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

Files changed (30) hide show
  1. iXBRLViewerPlugin/_version.py +2 -2
  2. iXBRLViewerPlugin/viewer/dist/ixbrlviewer.js +1 -1
  3. iXBRLViewerPlugin/viewer/dist/ixbrlviewer.js.LICENSE.txt +1 -1
  4. {ixbrl_viewer-1.4.67.dist-info → ixbrl_viewer-1.4.69.dist-info}/METADATA +7 -8
  5. {ixbrl_viewer-1.4.67.dist-info → ixbrl_viewer-1.4.69.dist-info}/RECORD +10 -30
  6. {ixbrl_viewer-1.4.67.dist-info → ixbrl_viewer-1.4.69.dist-info}/top_level.txt +0 -1
  7. tests/__init__.py +0 -0
  8. tests/puppeteer/framework/core_elements.js +0 -117
  9. tests/puppeteer/framework/page_objects/doc_frame.js +0 -105
  10. tests/puppeteer/framework/page_objects/fact_details_panel.js +0 -112
  11. tests/puppeteer/framework/page_objects/search_panel.js +0 -73
  12. tests/puppeteer/framework/page_objects/toolbar.js +0 -18
  13. tests/puppeteer/framework/utils.js +0 -3
  14. tests/puppeteer/framework/viewer_page.js +0 -103
  15. tests/puppeteer/puppeteer_test_run_via_intellij.jpg +0 -0
  16. tests/puppeteer/test_filings/filing_documents_smoke_test.zip +0 -0
  17. tests/puppeteer/test_filings/highlights.zip +0 -0
  18. tests/puppeteer/tests/fact_properties.test.js +0 -84
  19. tests/puppeteer/tests/highlight.test.js +0 -186
  20. tests/puppeteer/tests/search.test.js +0 -86
  21. tests/puppeteer/tools/generate.sh +0 -15
  22. tests/unit_tests/__init__.py +0 -0
  23. tests/unit_tests/iXBRLViewerPlugin/__init__.py +0 -0
  24. tests/unit_tests/iXBRLViewerPlugin/mock_arelle.py +0 -41
  25. tests/unit_tests/iXBRLViewerPlugin/test_iXBRLViewer.py +0 -801
  26. tests/unit_tests/iXBRLViewerPlugin/test_xhtmlserialize.py +0 -310
  27. {ixbrl_viewer-1.4.67.dist-info → ixbrl_viewer-1.4.69.dist-info}/WHEEL +0 -0
  28. {ixbrl_viewer-1.4.67.dist-info → ixbrl_viewer-1.4.69.dist-info}/entry_points.txt +0 -0
  29. {ixbrl_viewer-1.4.67.dist-info → ixbrl_viewer-1.4.69.dist-info}/licenses/LICENSE.md +0 -0
  30. {ixbrl_viewer-1.4.67.dist-info → ixbrl_viewer-1.4.69.dist-info}/licenses/NOTICE +0 -0
@@ -1,84 +0,0 @@
1
- import { ViewerPage } from '../framework/viewer_page.js';
2
- import { getTextContent } from '../framework/utils.js';
3
-
4
- jest.setTimeout(60000);
5
-
6
- describe('ixbrl-viewer',() => {
7
- let viewerPage;
8
-
9
- beforeEach(async () => {
10
- viewerPage = new ViewerPage();
11
- await viewerPage.buildPage();
12
- })
13
-
14
- afterEach(async () => {
15
- await viewerPage.tearDown();
16
- });
17
-
18
- test('Fact Properties', async () => {
19
- const detailsPanel = viewerPage.factDetailsPanel;
20
- const documentType = '10-K';
21
-
22
- await viewerPage.navigateToViewer('filing_documents_smoke_test.zip');
23
-
24
- await expect(await viewerPage.page.title()).toContain('Inline Viewer');
25
-
26
- // Click on the Document Type fact
27
- await viewerPage.docFrame.selectFact('dei:DocumentType');
28
-
29
- // Assert the fact details
30
- await detailsPanel.concept.assertText('(dei) Document Type');
31
- await detailsPanel.date.assertText('1 Jan 2020 to 30 Sep 2020');
32
- await detailsPanel.factValue.assertText(documentType);
33
- await detailsPanel.accuracy.assertText('n/a');
34
- await detailsPanel.entity.assertText('[CIK] 0000990763');
35
-
36
- // Navigate to the previous fact (last fact in document)
37
- await detailsPanel.previousFact.select();
38
-
39
- // Assert the previous fact was selected
40
- await detailsPanel.concept.assertText('(us-gaap) Revenues');
41
- await detailsPanel.date.assertText('1 Jan 2011 to 31 Mar 2011');
42
- await detailsPanel.factValue.assertText('US $ 5,117,000,000');
43
- await detailsPanel.accuracy.assertText('millions');
44
- await detailsPanel.entity.assertText('[CIK] 0000990763');
45
-
46
- // Assert Calculations
47
- await detailsPanel.assertCalculation('1001002 - Statement - Statement', {
48
- 'Gain (Loss) on Investments': '+',
49
- 'Other Income': '+',
50
- 'Net Investment Income': '+',
51
- 'Premiums Earned, Net': '+',
52
- 'Revenues': ''
53
- });
54
-
55
- // Assert footnotes applied
56
- await detailsPanel.assertFootnotes(['This is a footnote']);
57
-
58
- // Navigate to next fact and assert it takes us back to the first one
59
- await detailsPanel.nextFact.select();
60
- await detailsPanel.concept.assertText('(dei) Document Type');
61
-
62
- // Duplicate Facts - Verify we're looking at fact 1 of 2
63
- await detailsPanel.duplicateText.assertText('1 of 2');
64
- const oldFact = await viewerPage.docFrame.getSelectedFact();
65
- const oldFactBox = await oldFact.boundingBox();
66
- const oldFactText = await getTextContent(oldFact);
67
- expect(oldFactText).toEqual(documentType);
68
-
69
- // Duplicate Facts - Test navigation to fact 2
70
- await detailsPanel.duplicateNext.select();
71
- await detailsPanel.duplicateText.assertText('2 of 2');
72
- const newFact = await viewerPage.docFrame.getSelectedFact();
73
- const newFactBox = await newFact.boundingBox();
74
- const newFactText = await getTextContent(newFact);
75
- expect(newFactText).toEqual(documentType);
76
- expect(newFactBox).not.toEqual(oldFactBox);
77
-
78
- // Test panel resizing
79
- const startingWidth = await detailsPanel.getPanelWidth();
80
- await detailsPanel.resizePanel(-100);
81
- const endWidth = await detailsPanel.getPanelWidth();
82
- expect(endWidth).toBeGreaterThan(startingWidth);
83
- });
84
- });
@@ -1,186 +0,0 @@
1
- import { ViewerPage } from '../framework/viewer_page.js';
2
- import { Highlight } from '../framework/page_objects/doc_frame.js';
3
-
4
- jest.setTimeout(60000);
5
-
6
- describe('ixbrl-viewer:', () => {
7
- let viewerPage;
8
-
9
- const gaapFactValues = [
10
- 'Feb 2023',
11
- 'March 2023',
12
- 'Apr 15, 2023',
13
- 'zero',
14
- 'one hundred',
15
- 'none',
16
- 'two trillion three hundred thirty-four billion five hundred sixty-seven million eight hundred ninety thousand',
17
- '5', // 5 Months
18
- '26', // 26 Months
19
- '123,000', // $123,000
20
- '12', // ¢12
21
- '22,213', // US$22,213
22
- '123,456', // €123,456
23
- '332,234', // £332,234
24
- '312,321', // ¥312,321
25
- '77,986', // C$77,986
26
- '12,134', // A$12,134
27
- '123,421', // NT$123,421
28
- '565,928', // S$565,928
29
- '13,123', // ₩13,123
30
- '33,445', // ₱33,445
31
- '88,123', // ₨88,123
32
- '99,192', // kr99,192
33
- '123,234', // Fr.123,234
34
- '84,234', // RM84,234
35
- '11,234', // R$11,234
36
- '93,383', // R93,383
37
- ];
38
-
39
- const untaggedDates = [
40
- 'Jan 22',
41
- 'Feb 2022',
42
- 'March 2022',
43
- 'Apr 15, 2022',
44
- 'Aug 1st',
45
- '2022'
46
- ];
47
-
48
- const untaggedNumbers = [
49
- 'zero',
50
- 'two hundred',
51
- 'no',
52
- 'none',
53
- 'three trillion four hundred thirty-four billion five hundred sixty-seven million eight hundred ninety thousand',
54
- '4 months',
55
- '25 months',
56
- '$123,001',
57
- '¢13',
58
- 'US$22,214',
59
- '€123,457',
60
- '£332,235',
61
- '¥312,322',
62
- 'C$77,987',
63
- 'A$12,135',
64
- 'NT$123,422',
65
- 'S$565,929',
66
- '₩13,124',
67
- '₱33,446',
68
- '₨88,124',
69
- 'kr99,193',
70
- 'Fr.123,235',
71
- 'RM84,235',
72
- 'R$11,235',
73
- 'R93,384'
74
- ];
75
-
76
- const deiFactValues = ['Jan 23', 'Aug 1st 2023'];
77
-
78
- const activeDeiFactHighlights = deiFactValues
79
- .map((entry) => Highlight.factNamespace2(entry));
80
-
81
- const activeGaapFactHighlights = gaapFactValues
82
- .map((entry) => Highlight.fact(entry));
83
-
84
- const activeReviewFactHighlights = [...deiFactValues, ...gaapFactValues]
85
- .map((entry) => Highlight.fact(entry));
86
-
87
- const activeUntaggedDateHighlights = untaggedDates
88
- .map((entry) => Highlight.untaggedDate(entry))
89
-
90
- const activeUntaggedNumberHighlights = untaggedNumbers
91
- .map((entry) => Highlight.untaggedNumber(entry))
92
-
93
- const inactiveGaapFactHighlights = gaapFactValues
94
- .map((entry) => Highlight.fact(entry, false));
95
-
96
- const inactiveDeiFactHighlights = deiFactValues
97
- .map((entry) => Highlight.factNamespace2(entry, false));
98
-
99
- const inactiveReviewFactHighlights = [...deiFactValues, ...gaapFactValues]
100
- .map((entry) => Highlight.fact(entry, false));
101
-
102
- const inactiveUntaggedDateHighlights = untaggedDates
103
- .map((entry) => Highlight.untaggedDate(entry, false));
104
-
105
- const inactiveUntaggedNumberHighlights = untaggedNumbers
106
- .map((entry) => Highlight.untaggedNumber(entry, false));
107
-
108
- beforeEach(async () => {
109
- viewerPage = new ViewerPage();
110
- await viewerPage.buildPage();
111
- });
112
-
113
- afterEach(async () => {
114
- await viewerPage.tearDown();
115
- });
116
-
117
- test('Highlight Test', async () => {
118
- await viewerPage.navigateToViewer('highlights.zip');
119
-
120
- // Assert on load values are not highlighted
121
- await viewerPage.docFrame.assertHighlights([
122
- ...inactiveGaapFactHighlights, ...inactiveDeiFactHighlights]);
123
-
124
- // Enable fact highlights and assert values
125
- await viewerPage.toolbar.xbrlElementHighlight.toggleOn();
126
- await viewerPage.docFrame.assertHighlights([
127
- ...activeGaapFactHighlights, ...activeDeiFactHighlights]);
128
-
129
- // Disable highlights
130
- await viewerPage.toolbar.xbrlElementHighlight.toggleOff();
131
-
132
- // Assert values are no longer highlighted
133
- await viewerPage.docFrame.assertHighlights([
134
- ...inactiveGaapFactHighlights, ...inactiveDeiFactHighlights]);
135
- });
136
-
137
- test('Highlight Test - Review', async () => {
138
- await viewerPage.navigateToViewer('highlights.zip', '?review=true');
139
-
140
- // Assert on load values are not highlighted
141
- await viewerPage.docFrame.assertHighlights([
142
- ...inactiveReviewFactHighlights,
143
- ...inactiveUntaggedDateHighlights,
144
- ...inactiveUntaggedNumberHighlights
145
- ]);
146
-
147
- // Enable untagged date highlighting and assert values
148
- await viewerPage.toolbar.unTaggedDateHighlight.toggleOn();
149
- await viewerPage.docFrame.assertHighlights([
150
- ...activeUntaggedDateHighlights,
151
- ...inactiveUntaggedNumberHighlights,
152
- ...inactiveReviewFactHighlights
153
- ]);
154
-
155
- // Enable untagged number highlighting and assert values
156
- await viewerPage.toolbar.unTaggedNumberHighlight.toggleOn();
157
- await viewerPage.docFrame.assertHighlights([
158
- ...activeUntaggedNumberHighlights,
159
- ...activeUntaggedDateHighlights,
160
- ...inactiveGaapFactHighlights,
161
- ...inactiveDeiFactHighlights
162
- ]);
163
-
164
- // Enable fact highlights and assert values
165
- await viewerPage.toolbar.xbrlElementHighlight.toggleOn();
166
- await viewerPage.docFrame.assertHighlights([
167
- ...activeReviewFactHighlights,
168
- ...activeUntaggedNumberHighlights,
169
- ...activeUntaggedDateHighlights,
170
- ]);
171
-
172
- // Disable highlights
173
- await viewerPage.toolbar.unTaggedDateHighlight.toggleOff();
174
- await viewerPage.waitMilliseconds(100);
175
- await viewerPage.toolbar.unTaggedNumberHighlight.toggleOff();
176
- await viewerPage.waitMilliseconds(100);
177
- await viewerPage.toolbar.xbrlElementHighlight.toggleOff();
178
-
179
- // Assert values are no longer highlighted
180
- await viewerPage.docFrame.assertHighlights([
181
- ...inactiveReviewFactHighlights,
182
- ...inactiveUntaggedDateHighlights,
183
- ...inactiveUntaggedNumberHighlights
184
- ]);
185
- });
186
- });
@@ -1,86 +0,0 @@
1
- import { ViewerPage } from '../framework/viewer_page.js';
2
- import { Highlight } from '../framework/page_objects/doc_frame.js';
3
-
4
- jest.setTimeout(60000);
5
-
6
- describe('ixbrl-viewer:', () => {
7
- let viewerPage;
8
-
9
- beforeEach(async () => {
10
- viewerPage = new ViewerPage();
11
- await viewerPage.buildPage();
12
- });
13
-
14
- afterEach(async () => {
15
- await viewerPage.tearDown();
16
- });
17
-
18
- test('Search Test', async () => {
19
- const concept1 = 'Entity Address, City or Town';
20
- const concept2 = 'Entity Address, State or Province';
21
- const concept3 = 'Contact Personnel Name';
22
- const concept4 = 'Entity Public Float';
23
-
24
- const docFrame = viewerPage.docFrame;
25
- const search = viewerPage.search;
26
-
27
- await viewerPage.navigateToViewer('filing_documents_smoke_test.zip');
28
- await viewerPage.waitMilliseconds('3000'); // Give search time to index
29
-
30
- // // Open search and assert all concepts are shown
31
- await search.searchButton.select();
32
- await search.assertSearchResultsContain(
33
- [concept1, concept2, concept3, concept4]);
34
-
35
- // Search for Entity Address and assert results update
36
- await search.searchInput.enterText('Entity Address', true);
37
- await search.assertSearchResultsDoNotContain([concept3]);
38
- await search.assertSearchResultsContain([concept1, concept2, concept4]);
39
-
40
- // Navigate to the fact details for concept1
41
- await search.getSearchResultCard(concept1).selectButton.select();
42
- await viewerPage.factDetailsPanel.concept
43
- .assertText('(dei) Entity Address, City or Town');
44
-
45
- // Assert the fact was highlighted in the document
46
- await docFrame.assertHighlights([Highlight.selectedFact('Ames')]);
47
-
48
- // Go back to search and assert it still contains our results
49
- await search.searchButton.select();
50
- await search.assertSearchResultsDoNotContain([concept3]);
51
- await search.assertSearchResultsContain([concept1, concept2, concept4]);
52
-
53
- // Select concept2 fact and assert selection changes
54
- await search.getSearchResultCard(concept2).selectButton.select();
55
- await docFrame.assertHighlights(
56
- [Highlight.selectedFact('Ames', false)]);
57
- await docFrame.assertHighlights([Highlight.selectedFact('IA')]);
58
- await viewerPage.factDetailsPanel.concept.assertText(
59
- '(dei) Entity Address, State or Province');
60
-
61
- // Return to search and test hover highlight
62
- await search.searchButton.select();
63
- await search.getSearchResultCard(concept1).selectButton.hover();
64
- await docFrame.assertHighlights([Highlight.searchHover('Ames')]);
65
-
66
- // Mouse off and assert hover is removed
67
- await search.searchButton.hover();
68
- await docFrame
69
- .assertHighlights([Highlight.searchHover('Ames', false)]);
70
-
71
- // Filter by concept type and assert values have been filtered
72
- await search.filterToggle.select();
73
- await search.filterConceptType('numeric');
74
- await search.assertSearchResultsContain([concept4]);
75
- await search.assertSearchResultsDoNotContain([concept1, concept2]);
76
-
77
- // Reset concept type filter
78
- await search.reset.select();
79
- await search.assertSearchResultsContain([concept4, concept1, concept2]);
80
-
81
- // Filter by period
82
- await search.filterPeriod('2020-10-01');
83
- await search.assertSearchResultsContain([concept4]);
84
- await search.assertSearchResultsDoNotContain([concept1, concept2]);
85
- });
86
- });
@@ -1,15 +0,0 @@
1
- #!/bin/bash
2
-
3
- set -e
4
-
5
- testFilingDir=tests/puppeteer/test_filings
6
- genDir=tests/puppeteer/artifacts/generated_output
7
- mkdir -p $genDir
8
-
9
- for file in "$testFilingDir"/*.zip; do
10
- echo "Generating ixbrl-viewer for: $file"
11
- outputFilename=$(basename -- "$file")
12
- viewerName=${outputFilename%.zip}.htm
13
- arelleCmdLine --plugins ixbrl-viewer -f $file --save-viewer $genDir/$viewerName --viewer-url ../../../../iXBRLViewerPlugin/viewer/dist/ixbrlviewer.js --viewer-no-copy-script
14
- done
15
- echo "iXBRL-Viewer Generation Complete"
File without changes
File without changes
@@ -1,41 +0,0 @@
1
- import sys
2
- from unittest.mock import Mock
3
-
4
-
5
- def qname_effect(prefix, namespaceURI, localName):
6
- return Mock(
7
- prefix=prefix,
8
- namespaceURI=namespaceURI,
9
- localName=localName
10
- )
11
-
12
- def mrs_effect(dts, reltype):
13
- return Mock(
14
- fromModelObject = lambda source: []
15
- )
16
-
17
- def inferredDecimals_effect(fact):
18
- return float("INF")
19
-
20
- def mock_arelle():
21
-
22
- # Don't replace an existing mocked arelle, as otherwise @patch calls will
23
- # patch the wrong Mock instance.
24
- if 'arelle' not in sys.modules:
25
- sys.modules['arelle'] = Mock()
26
- sys.modules['arelle.FileSource'] = Mock()
27
- sys.modules['arelle.LocalViewer'] = Mock()
28
- sys.modules['arelle.ModelDocument'] = Mock()
29
- sys.modules['arelle.ModelRelationshipSet'] = Mock(ModelRelationshipSet = mrs_effect)
30
- sys.modules['arelle.ModelValue'] = Mock(
31
- QName=qname_effect
32
- )
33
- sys.modules['arelle.ModelXbrl'] = Mock()
34
- sys.modules['arelle.PythonUtil'] = Mock()
35
- sys.modules['arelle.UrlUtil'] = Mock(
36
- isHttpUrl=lambda path: path.startswith('http')
37
- )
38
- sys.modules['arelle.ValidateXbrlCalcs'] = Mock(
39
- inferredDecimals=inferredDecimals_effect
40
- )
41
- sys.modules['arelle.webserver.bottle'] = Mock()