ixbrl-viewer 1.4.14__tar.gz → 1.4.16__tar.gz
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.
- {ixbrl-viewer-1.4.14 → ixbrl-viewer-1.4.16}/.github/workflows/npm-package.yml +4 -4
- {ixbrl-viewer-1.4.14 → ixbrl-viewer-1.4.16}/.github/workflows/puppeteer.yml +1 -1
- {ixbrl-viewer-1.4.14 → ixbrl-viewer-1.4.16}/.github/workflows/python-package.yml +4 -4
- {ixbrl-viewer-1.4.14 → ixbrl-viewer-1.4.16}/PKG-INFO +2 -2
- {ixbrl-viewer-1.4.14 → ixbrl-viewer-1.4.16}/iXBRLViewerPlugin/__init__.py +87 -66
- {ixbrl-viewer-1.4.14 → ixbrl-viewer-1.4.16}/iXBRLViewerPlugin/_version.py +2 -2
- {ixbrl-viewer-1.4.14 → ixbrl-viewer-1.4.16}/iXBRLViewerPlugin/constants.py +6 -0
- {ixbrl-viewer-1.4.14 → ixbrl-viewer-1.4.16}/iXBRLViewerPlugin/iXBRLViewer.py +36 -32
- {ixbrl-viewer-1.4.14 → ixbrl-viewer-1.4.16}/iXBRLViewerPlugin/ui.py +16 -3
- ixbrl-viewer-1.4.16/iXBRLViewerPlugin/viewer/dist/ixbrlviewer.js +2 -0
- {ixbrl-viewer-1.4.14 → ixbrl-viewer-1.4.16}/iXBRLViewerPlugin/viewer/src/html/inspector.html +27 -0
- {ixbrl-viewer-1.4.14 → ixbrl-viewer-1.4.16}/iXBRLViewerPlugin/viewer/src/i18n/en/translation.json +18 -1
- {ixbrl-viewer-1.4.14 → ixbrl-viewer-1.4.16}/iXBRLViewerPlugin/viewer/src/i18n/es/translation.json +18 -1
- ixbrl-viewer-1.4.16/iXBRLViewerPlugin/viewer/src/icons/calculator.svg +13 -0
- ixbrl-viewer-1.4.16/iXBRLViewerPlugin/viewer/src/icons/circle-cross.svg +11 -0
- ixbrl-viewer-1.4.16/iXBRLViewerPlugin/viewer/src/icons/circle-tick.svg +11 -0
- ixbrl-viewer-1.4.16/iXBRLViewerPlugin/viewer/src/icons/dimension.svg +9 -0
- ixbrl-viewer-1.4.16/iXBRLViewerPlugin/viewer/src/icons/member.svg +10 -0
- ixbrl-viewer-1.4.16/iXBRLViewerPlugin/viewer/src/icons/multi-tag.svg +10 -0
- {ixbrl-viewer-1.4.14 → ixbrl-viewer-1.4.16}/iXBRLViewerPlugin/viewer/src/js/accordian.js +2 -2
- ixbrl-viewer-1.4.16/iXBRLViewerPlugin/viewer/src/js/calculation.js +202 -0
- ixbrl-viewer-1.4.16/iXBRLViewerPlugin/viewer/src/js/calculation.test.js +306 -0
- ixbrl-viewer-1.4.16/iXBRLViewerPlugin/viewer/src/js/calculationInspector.js +190 -0
- {ixbrl-viewer-1.4.14 → ixbrl-viewer-1.4.16}/iXBRLViewerPlugin/viewer/src/js/concept.js +7 -1
- {ixbrl-viewer-1.4.14 → ixbrl-viewer-1.4.16}/iXBRLViewerPlugin/viewer/src/js/fact.js +59 -5
- {ixbrl-viewer-1.4.14 → ixbrl-viewer-1.4.16}/iXBRLViewerPlugin/viewer/src/js/factset.js +54 -5
- {ixbrl-viewer-1.4.14 → ixbrl-viewer-1.4.16}/iXBRLViewerPlugin/viewer/src/js/factset.test.js +71 -5
- {ixbrl-viewer-1.4.14 → ixbrl-viewer-1.4.16}/iXBRLViewerPlugin/viewer/src/js/inspector.js +85 -30
- ixbrl-viewer-1.4.16/iXBRLViewerPlugin/viewer/src/js/interval.js +70 -0
- ixbrl-viewer-1.4.16/iXBRLViewerPlugin/viewer/src/js/interval.test.js +153 -0
- {ixbrl-viewer-1.4.14 → ixbrl-viewer-1.4.16}/iXBRLViewerPlugin/viewer/src/js/test-utils.js +19 -0
- {ixbrl-viewer-1.4.14 → ixbrl-viewer-1.4.16}/iXBRLViewerPlugin/viewer/src/less/accordian.less +2 -2
- ixbrl-viewer-1.4.16/iXBRLViewerPlugin/viewer/src/less/calculation-inspector.less +83 -0
- {ixbrl-viewer-1.4.14 → ixbrl-viewer-1.4.16}/iXBRLViewerPlugin/viewer/src/less/colours.less +2 -0
- {ixbrl-viewer-1.4.14 → ixbrl-viewer-1.4.16}/iXBRLViewerPlugin/viewer/src/less/dialog.less +8 -4
- {ixbrl-viewer-1.4.14 → ixbrl-viewer-1.4.16}/iXBRLViewerPlugin/viewer/src/less/inspector.less +67 -23
- {ixbrl-viewer-1.4.14 → ixbrl-viewer-1.4.16}/iXBRLViewerPlugin/viewer/src/less/validation-report.less +1 -2
- {ixbrl-viewer-1.4.14 → ixbrl-viewer-1.4.16}/iXBRLViewerPlugin/viewer/src/less/viewer.less +1 -1
- {ixbrl-viewer-1.4.14 → ixbrl-viewer-1.4.16}/iXBRLViewerPlugin/xhtmlserialize.py +1 -1
- {ixbrl-viewer-1.4.14 → ixbrl-viewer-1.4.16}/ixbrl_viewer.egg-info/PKG-INFO +2 -2
- {ixbrl-viewer-1.4.14 → ixbrl-viewer-1.4.16}/ixbrl_viewer.egg-info/SOURCES.txt +14 -1
- {ixbrl-viewer-1.4.14 → ixbrl-viewer-1.4.16}/ixbrl_viewer.egg-info/requires.txt +1 -1
- {ixbrl-viewer-1.4.14 → ixbrl-viewer-1.4.16}/package-lock.json +16 -15
- {ixbrl-viewer-1.4.14 → ixbrl-viewer-1.4.16}/package.json +1 -0
- {ixbrl-viewer-1.4.14 → ixbrl-viewer-1.4.16}/pyproject.toml +1 -1
- {ixbrl-viewer-1.4.14 → ixbrl-viewer-1.4.16}/samples/build-viewer.py +1 -1
- ixbrl-viewer-1.4.16/samples/src/testdoc/build.sh +7 -0
- ixbrl-viewer-1.4.16/samples/src/testdoc/example.xsd +70 -0
- ixbrl-viewer-1.4.16/samples/src/testdoc/labels.json +22 -0
- ixbrl-viewer-1.4.16/samples/src/testdoc/testdoc.ixtmpl +349 -0
- {ixbrl-viewer-1.4.14 → ixbrl-viewer-1.4.16}/tests/puppeteer/tools/generate.sh +1 -1
- ixbrl-viewer-1.4.14/iXBRLViewerPlugin/viewer/dist/ixbrlviewer.js +0 -2
- ixbrl-viewer-1.4.14/iXBRLViewerPlugin/viewer/src/icons/dimension.svg +0 -13
- ixbrl-viewer-1.4.14/iXBRLViewerPlugin/viewer/src/icons/member.svg +0 -13
- ixbrl-viewer-1.4.14/iXBRLViewerPlugin/viewer/src/js/calculations.js +0 -111
- {ixbrl-viewer-1.4.14 → ixbrl-viewer-1.4.16}/.babelrc +0 -0
- {ixbrl-viewer-1.4.14 → ixbrl-viewer-1.4.16}/.github/ISSUE_TEMPLATE/bug.yml +0 -0
- {ixbrl-viewer-1.4.14 → ixbrl-viewer-1.4.16}/.github/ISSUE_TEMPLATE/config.yml +0 -0
- {ixbrl-viewer-1.4.14 → ixbrl-viewer-1.4.16}/.github/ISSUE_TEMPLATE/questions.yml +0 -0
- {ixbrl-viewer-1.4.14 → ixbrl-viewer-1.4.16}/.github/ISSUE_TEMPLATE/request.yml +0 -0
- {ixbrl-viewer-1.4.14 → ixbrl-viewer-1.4.16}/.github/PULL_REQUEST_TEMPLATE.md +0 -0
- {ixbrl-viewer-1.4.14 → ixbrl-viewer-1.4.16}/.github/dependabot.yml +0 -0
- {ixbrl-viewer-1.4.14 → ixbrl-viewer-1.4.16}/.github/release-drafter.yml +0 -0
- {ixbrl-viewer-1.4.14 → ixbrl-viewer-1.4.16}/.github/workflows/node-tests.yml +0 -0
- {ixbrl-viewer-1.4.14 → ixbrl-viewer-1.4.16}/.github/workflows/python-tests.yml +0 -0
- {ixbrl-viewer-1.4.14 → ixbrl-viewer-1.4.16}/.github/workflows/release-drafter.yml +0 -0
- {ixbrl-viewer-1.4.14 → ixbrl-viewer-1.4.16}/.github/workflows/release.yml +0 -0
- {ixbrl-viewer-1.4.14 → ixbrl-viewer-1.4.16}/.gitignore +0 -0
- {ixbrl-viewer-1.4.14 → ixbrl-viewer-1.4.16}/ARCHITECTURE.md +0 -0
- {ixbrl-viewer-1.4.14 → ixbrl-viewer-1.4.16}/CODEOWNERS +0 -0
- {ixbrl-viewer-1.4.14 → ixbrl-viewer-1.4.16}/COPYRIGHT.md +0 -0
- {ixbrl-viewer-1.4.14 → ixbrl-viewer-1.4.16}/LICENSE +0 -0
- {ixbrl-viewer-1.4.14 → ixbrl-viewer-1.4.16}/MANIFEST.in +0 -0
- {ixbrl-viewer-1.4.14 → ixbrl-viewer-1.4.16}/Makefile +0 -0
- {ixbrl-viewer-1.4.14 → ixbrl-viewer-1.4.16}/NOTICE +0 -0
- {ixbrl-viewer-1.4.14 → ixbrl-viewer-1.4.16}/PLUGINS.md +0 -0
- {ixbrl-viewer-1.4.14 → ixbrl-viewer-1.4.16}/README.md +0 -0
- {ixbrl-viewer-1.4.14 → ixbrl-viewer-1.4.16}/examples/README.md +0 -0
- {ixbrl-viewer-1.4.14 → ixbrl-viewer-1.4.16}/examples/clorox-2022-10-K-ixbrl-viewer/clx-20220630.xsd +0 -0
- {ixbrl-viewer-1.4.14 → ixbrl-viewer-1.4.16}/examples/clorox-2022-10-K-ixbrl-viewer/clx-20220630_cal.xml +0 -0
- {ixbrl-viewer-1.4.14 → ixbrl-viewer-1.4.16}/examples/clorox-2022-10-K-ixbrl-viewer/clx-20220630_d2.htm +0 -0
- {ixbrl-viewer-1.4.14 → ixbrl-viewer-1.4.16}/examples/clorox-2022-10-K-ixbrl-viewer/clx-20220630_def.xml +0 -0
- {ixbrl-viewer-1.4.14 → ixbrl-viewer-1.4.16}/examples/clorox-2022-10-K-ixbrl-viewer/clx-20220630_g1.jpg +0 -0
- {ixbrl-viewer-1.4.14 → ixbrl-viewer-1.4.16}/examples/clorox-2022-10-K-ixbrl-viewer/clx-20220630_lab.xml +0 -0
- {ixbrl-viewer-1.4.14 → ixbrl-viewer-1.4.16}/examples/clorox-2022-10-K-ixbrl-viewer/clx-20220630_pre.xml +0 -0
- {ixbrl-viewer-1.4.14 → ixbrl-viewer-1.4.16}/examples/clorox-2022-10-K-ixbrl-viewer/fy22clxex21subsidiaries.htm +0 -0
- {ixbrl-viewer-1.4.14 → ixbrl-viewer-1.4.16}/examples/clorox-2022-10-K-ixbrl-viewer/fy22clxex23accountingfirmc.htm +0 -0
- {ixbrl-viewer-1.4.14 → ixbrl-viewer-1.4.16}/examples/clorox-2022-10-K-ixbrl-viewer/fy22clxex311ceocertificati.htm +0 -0
- {ixbrl-viewer-1.4.14 → ixbrl-viewer-1.4.16}/examples/clorox-2022-10-K-ixbrl-viewer/fy22clxex312cfocertificati.htm +0 -0
- {ixbrl-viewer-1.4.14 → ixbrl-viewer-1.4.16}/examples/clorox-2022-10-K-ixbrl-viewer/fy22clxex32ceocfocertifica.htm +0 -0
- {ixbrl-viewer-1.4.14 → ixbrl-viewer-1.4.16}/examples/clorox-2022-10-K-ixbrl-viewer/fy22clxex992reconofeconomi.htm +0 -0
- {ixbrl-viewer-1.4.14 → ixbrl-viewer-1.4.16}/examples/clorox-2022-10-K-ixbrl-viewer/ixbrl-viewer.htm +0 -0
- {ixbrl-viewer-1.4.14 → ixbrl-viewer-1.4.16}/examples/example_plugin/README.md +0 -0
- {ixbrl-viewer-1.4.14 → ixbrl-viewer-1.4.16}/examples/example_plugin/example-plugin.gif +0 -0
- {ixbrl-viewer-1.4.14 → ixbrl-viewer-1.4.16}/examples/example_plugin/extended-viewer.js +0 -0
- {ixbrl-viewer-1.4.14 → ixbrl-viewer-1.4.16}/examples/example_plugin/index.js +0 -0
- {ixbrl-viewer-1.4.14 → ixbrl-viewer-1.4.16}/examples/example_plugin/package-lock.json +0 -0
- {ixbrl-viewer-1.4.14 → ixbrl-viewer-1.4.16}/examples/example_plugin/package.json +0 -0
- {ixbrl-viewer-1.4.14 → ixbrl-viewer-1.4.16}/examples/example_plugin/webpack.config.js +0 -0
- {ixbrl-viewer-1.4.14 → ixbrl-viewer-1.4.16}/examples/ixbrl-viewer-demo.gif +0 -0
- {ixbrl-viewer-1.4.14 → ixbrl-viewer-1.4.16}/examples/review-mode.png +0 -0
- {ixbrl-viewer-1.4.14 → ixbrl-viewer-1.4.16}/examples/workiva-january-2023-8-k-ixbrl-viewer/exhibit31abylawsofworkivai.htm +0 -0
- {ixbrl-viewer-1.4.14 → ixbrl-viewer-1.4.16}/examples/workiva-january-2023-8-k-ixbrl-viewer/exhibit31bbylawsofworkivai.htm +0 -0
- {ixbrl-viewer-1.4.14 → ixbrl-viewer-1.4.16}/examples/workiva-january-2023-8-k-ixbrl-viewer/ixbrl-viewer.htm +0 -0
- {ixbrl-viewer-1.4.14 → ixbrl-viewer-1.4.16}/examples/workiva-january-2023-8-k-ixbrl-viewer/wk-20230109.xsd +0 -0
- {ixbrl-viewer-1.4.14 → ixbrl-viewer-1.4.16}/examples/workiva-january-2023-8-k-ixbrl-viewer/wk-20230109_lab.xml +0 -0
- {ixbrl-viewer-1.4.14 → ixbrl-viewer-1.4.16}/examples/workiva-january-2023-8-k-ixbrl-viewer/wk-20230109_pre.xml +0 -0
- {ixbrl-viewer-1.4.14 → ixbrl-viewer-1.4.16}/iXBRLViewerPlugin/featureConfig.py +0 -0
- {ixbrl-viewer-1.4.14 → ixbrl-viewer-1.4.16}/iXBRLViewerPlugin/stubviewer.html +0 -0
- {ixbrl-viewer-1.4.14 → ixbrl-viewer-1.4.16}/iXBRLViewerPlugin/viewer/dist/ixbrlviewer.js.LICENSE.txt +0 -0
- {ixbrl-viewer-1.4.14 → ixbrl-viewer-1.4.16}/iXBRLViewerPlugin/viewer/i18next-parser.config.js +0 -0
- {ixbrl-viewer-1.4.14 → ixbrl-viewer-1.4.16}/iXBRLViewerPlugin/viewer/src/html/fact-details.html +0 -0
- {ixbrl-viewer-1.4.14 → ixbrl-viewer-1.4.16}/iXBRLViewerPlugin/viewer/src/html/footnote-details.html +0 -0
- {ixbrl-viewer-1.4.14 → ixbrl-viewer-1.4.16}/iXBRLViewerPlugin/viewer/src/i18n/en/currencies.json +0 -0
- {ixbrl-viewer-1.4.14 → ixbrl-viewer-1.4.16}/iXBRLViewerPlugin/viewer/src/i18n/en/referenceparts.json +0 -0
- {ixbrl-viewer-1.4.14 → ixbrl-viewer-1.4.16}/iXBRLViewerPlugin/viewer/src/i18n/es/currencies.json +0 -0
- {ixbrl-viewer-1.4.14 → ixbrl-viewer-1.4.16}/iXBRLViewerPlugin/viewer/src/i18n/es/referenceparts.json +0 -0
- {ixbrl-viewer-1.4.14 → ixbrl-viewer-1.4.16}/iXBRLViewerPlugin/viewer/src/icons/arrow-down.svg +0 -0
- {ixbrl-viewer-1.4.14 → ixbrl-viewer-1.4.16}/iXBRLViewerPlugin/viewer/src/icons/arrow-up.svg +0 -0
- {ixbrl-viewer-1.4.14 → ixbrl-viewer-1.4.16}/iXBRLViewerPlugin/viewer/src/icons/chevron-down.svg +0 -0
- {ixbrl-viewer-1.4.14 → ixbrl-viewer-1.4.16}/iXBRLViewerPlugin/viewer/src/icons/chevron-left.svg +0 -0
- {ixbrl-viewer-1.4.14 → ixbrl-viewer-1.4.16}/iXBRLViewerPlugin/viewer/src/icons/chevron-right.svg +0 -0
- {ixbrl-viewer-1.4.14 → ixbrl-viewer-1.4.16}/iXBRLViewerPlugin/viewer/src/icons/chevron-up.svg +0 -0
- {ixbrl-viewer-1.4.14 → ixbrl-viewer-1.4.16}/iXBRLViewerPlugin/viewer/src/icons/clipboard.svg +0 -0
- {ixbrl-viewer-1.4.14 → ixbrl-viewer-1.4.16}/iXBRLViewerPlugin/viewer/src/icons/close.svg +0 -0
- {ixbrl-viewer-1.4.14 → ixbrl-viewer-1.4.16}/iXBRLViewerPlugin/viewer/src/icons/cog.svg +0 -0
- {ixbrl-viewer-1.4.14 → ixbrl-viewer-1.4.16}/iXBRLViewerPlugin/viewer/src/icons/dimension-member.svg +0 -0
- {ixbrl-viewer-1.4.14 → ixbrl-viewer-1.4.16}/iXBRLViewerPlugin/viewer/src/icons/download.svg +0 -0
- {ixbrl-viewer-1.4.14 → ixbrl-viewer-1.4.16}/iXBRLViewerPlugin/viewer/src/icons/filter.svg +0 -0
- {ixbrl-viewer-1.4.14 → ixbrl-viewer-1.4.16}/iXBRLViewerPlugin/viewer/src/icons/graph.svg +0 -0
- {ixbrl-viewer-1.4.14 → ixbrl-viewer-1.4.16}/iXBRLViewerPlugin/viewer/src/icons/outline.svg +0 -0
- {ixbrl-viewer-1.4.14 → ixbrl-viewer-1.4.16}/iXBRLViewerPlugin/viewer/src/icons/print.svg +0 -0
- {ixbrl-viewer-1.4.14 → ixbrl-viewer-1.4.16}/iXBRLViewerPlugin/viewer/src/icons/question.svg +0 -0
- {ixbrl-viewer-1.4.14 → ixbrl-viewer-1.4.16}/iXBRLViewerPlugin/viewer/src/icons/search.svg +0 -0
- {ixbrl-viewer-1.4.14 → ixbrl-viewer-1.4.16}/iXBRLViewerPlugin/viewer/src/icons/select.svg +0 -0
- {ixbrl-viewer-1.4.14 → ixbrl-viewer-1.4.16}/iXBRLViewerPlugin/viewer/src/icons/summary.svg +0 -0
- {ixbrl-viewer-1.4.14 → ixbrl-viewer-1.4.16}/iXBRLViewerPlugin/viewer/src/icons/tag.svg +0 -0
- {ixbrl-viewer-1.4.14 → ixbrl-viewer-1.4.16}/iXBRLViewerPlugin/viewer/src/icons/text-block.svg +0 -0
- {ixbrl-viewer-1.4.14 → ixbrl-viewer-1.4.16}/iXBRLViewerPlugin/viewer/src/icons/tick.svg +0 -0
- {ixbrl-viewer-1.4.14 → ixbrl-viewer-1.4.16}/iXBRLViewerPlugin/viewer/src/icons/warning.svg +0 -0
- {ixbrl-viewer-1.4.14 → ixbrl-viewer-1.4.16}/iXBRLViewerPlugin/viewer/src/img/arelle.svg +0 -0
- {ixbrl-viewer-1.4.14 → ixbrl-viewer-1.4.16}/iXBRLViewerPlugin/viewer/src/img/favicon.ico +0 -0
- {ixbrl-viewer-1.4.14 → ixbrl-viewer-1.4.16}/iXBRLViewerPlugin/viewer/src/img/inline-viewer.png +0 -0
- {ixbrl-viewer-1.4.14 → ixbrl-viewer-1.4.16}/iXBRLViewerPlugin/viewer/src/img/inline-viewer.svg +0 -0
- {ixbrl-viewer-1.4.14 → ixbrl-viewer-1.4.16}/iXBRLViewerPlugin/viewer/src/img/powered-by-workiva.png +0 -0
- {ixbrl-viewer-1.4.14 → ixbrl-viewer-1.4.16}/iXBRLViewerPlugin/viewer/src/img/powered-by-workiva.svg +0 -0
- {ixbrl-viewer-1.4.14 → ixbrl-viewer-1.4.16}/iXBRLViewerPlugin/viewer/src/js/aspect.js +0 -0
- {ixbrl-viewer-1.4.14 → ixbrl-viewer-1.4.16}/iXBRLViewerPlugin/viewer/src/js/aspect.test.js +0 -0
- {ixbrl-viewer-1.4.14 → ixbrl-viewer-1.4.16}/iXBRLViewerPlugin/viewer/src/js/chart.js +0 -0
- {ixbrl-viewer-1.4.14 → ixbrl-viewer-1.4.16}/iXBRLViewerPlugin/viewer/src/js/chart.test.js +0 -0
- {ixbrl-viewer-1.4.14 → ixbrl-viewer-1.4.16}/iXBRLViewerPlugin/viewer/src/js/concept.test.js +0 -0
- {ixbrl-viewer-1.4.14 → ixbrl-viewer-1.4.16}/iXBRLViewerPlugin/viewer/src/js/dialog.js +0 -0
- {ixbrl-viewer-1.4.14 → ixbrl-viewer-1.4.16}/iXBRLViewerPlugin/viewer/src/js/docOrderIndex.js +0 -0
- {ixbrl-viewer-1.4.14 → ixbrl-viewer-1.4.16}/iXBRLViewerPlugin/viewer/src/js/fact.test.js +0 -0
- {ixbrl-viewer-1.4.14 → ixbrl-viewer-1.4.16}/iXBRLViewerPlugin/viewer/src/js/footnote.js +0 -0
- {ixbrl-viewer-1.4.14 → ixbrl-viewer-1.4.16}/iXBRLViewerPlugin/viewer/src/js/identifiers.js +0 -0
- {ixbrl-viewer-1.4.14 → ixbrl-viewer-1.4.16}/iXBRLViewerPlugin/viewer/src/js/identifiers.test.js +0 -0
- {ixbrl-viewer-1.4.14 → ixbrl-viewer-1.4.16}/iXBRLViewerPlugin/viewer/src/js/index.js +0 -0
- {ixbrl-viewer-1.4.14 → ixbrl-viewer-1.4.16}/iXBRLViewerPlugin/viewer/src/js/inspector.test.js +0 -0
- {ixbrl-viewer-1.4.14 → ixbrl-viewer-1.4.16}/iXBRLViewerPlugin/viewer/src/js/interact.min.js +0 -0
- {ixbrl-viewer-1.4.14 → ixbrl-viewer-1.4.16}/iXBRLViewerPlugin/viewer/src/js/ixbrlviewer.js +0 -0
- {ixbrl-viewer-1.4.14 → ixbrl-viewer-1.4.16}/iXBRLViewerPlugin/viewer/src/js/ixbrlviewer.test.js +0 -0
- {ixbrl-viewer-1.4.14 → ixbrl-viewer-1.4.16}/iXBRLViewerPlugin/viewer/src/js/ixnode.js +0 -0
- {ixbrl-viewer-1.4.14 → ixbrl-viewer-1.4.16}/iXBRLViewerPlugin/viewer/src/js/menu.js +0 -0
- {ixbrl-viewer-1.4.14 → ixbrl-viewer-1.4.16}/iXBRLViewerPlugin/viewer/src/js/messagebox.js +0 -0
- {ixbrl-viewer-1.4.14 → ixbrl-viewer-1.4.16}/iXBRLViewerPlugin/viewer/src/js/moment-jest.js +0 -0
- {ixbrl-viewer-1.4.14 → ixbrl-viewer-1.4.16}/iXBRLViewerPlugin/viewer/src/js/number-matcher-preprocess.test.js +0 -0
- {ixbrl-viewer-1.4.14 → ixbrl-viewer-1.4.16}/iXBRLViewerPlugin/viewer/src/js/number-matcher.js +0 -0
- {ixbrl-viewer-1.4.14 → ixbrl-viewer-1.4.16}/iXBRLViewerPlugin/viewer/src/js/number-matcher.test.js +0 -0
- {ixbrl-viewer-1.4.14 → ixbrl-viewer-1.4.16}/iXBRLViewerPlugin/viewer/src/js/outline.js +0 -0
- {ixbrl-viewer-1.4.14 → ixbrl-viewer-1.4.16}/iXBRLViewerPlugin/viewer/src/js/outline.test.js +0 -0
- {ixbrl-viewer-1.4.14 → ixbrl-viewer-1.4.16}/iXBRLViewerPlugin/viewer/src/js/period.js +0 -0
- {ixbrl-viewer-1.4.14 → ixbrl-viewer-1.4.16}/iXBRLViewerPlugin/viewer/src/js/period.test.js +0 -0
- {ixbrl-viewer-1.4.14 → ixbrl-viewer-1.4.16}/iXBRLViewerPlugin/viewer/src/js/qname.js +0 -0
- {ixbrl-viewer-1.4.14 → ixbrl-viewer-1.4.16}/iXBRLViewerPlugin/viewer/src/js/report.js +0 -0
- {ixbrl-viewer-1.4.14 → ixbrl-viewer-1.4.16}/iXBRLViewerPlugin/viewer/src/js/report.test.js +0 -0
- {ixbrl-viewer-1.4.14 → ixbrl-viewer-1.4.16}/iXBRLViewerPlugin/viewer/src/js/reportset.js +0 -0
- {ixbrl-viewer-1.4.14 → ixbrl-viewer-1.4.16}/iXBRLViewerPlugin/viewer/src/js/reportset.test.js +0 -0
- {ixbrl-viewer-1.4.14 → ixbrl-viewer-1.4.16}/iXBRLViewerPlugin/viewer/src/js/search.js +0 -0
- {ixbrl-viewer-1.4.14 → ixbrl-viewer-1.4.16}/iXBRLViewerPlugin/viewer/src/js/search.test.js +0 -0
- {ixbrl-viewer-1.4.14 → ixbrl-viewer-1.4.16}/iXBRLViewerPlugin/viewer/src/js/summary.js +0 -0
- {ixbrl-viewer-1.4.14 → ixbrl-viewer-1.4.16}/iXBRLViewerPlugin/viewer/src/js/summary.test.js +0 -0
- {ixbrl-viewer-1.4.14 → ixbrl-viewer-1.4.16}/iXBRLViewerPlugin/viewer/src/js/tableExport.js +0 -0
- {ixbrl-viewer-1.4.14 → ixbrl-viewer-1.4.16}/iXBRLViewerPlugin/viewer/src/js/textblockviewer.js +0 -0
- {ixbrl-viewer-1.4.14 → ixbrl-viewer-1.4.16}/iXBRLViewerPlugin/viewer/src/js/unit.js +0 -0
- {ixbrl-viewer-1.4.14 → ixbrl-viewer-1.4.16}/iXBRLViewerPlugin/viewer/src/js/unit.test.js +0 -0
- {ixbrl-viewer-1.4.14 → ixbrl-viewer-1.4.16}/iXBRLViewerPlugin/viewer/src/js/util.js +0 -0
- {ixbrl-viewer-1.4.14 → ixbrl-viewer-1.4.16}/iXBRLViewerPlugin/viewer/src/js/util.test.js +0 -0
- {ixbrl-viewer-1.4.14 → ixbrl-viewer-1.4.16}/iXBRLViewerPlugin/viewer/src/js/validationreport.js +0 -0
- {ixbrl-viewer-1.4.14 → ixbrl-viewer-1.4.16}/iXBRLViewerPlugin/viewer/src/js/viewer.js +0 -0
- {ixbrl-viewer-1.4.14 → ixbrl-viewer-1.4.16}/iXBRLViewerPlugin/viewer/src/js/viewerOptions.js +0 -0
- {ixbrl-viewer-1.4.14 → ixbrl-viewer-1.4.16}/iXBRLViewerPlugin/viewer/src/less/block-list.less +0 -0
- {ixbrl-viewer-1.4.14 → ixbrl-viewer-1.4.16}/iXBRLViewerPlugin/viewer/src/less/chart.less +0 -0
- {ixbrl-viewer-1.4.14 → ixbrl-viewer-1.4.16}/iXBRLViewerPlugin/viewer/src/less/clearfix.less +0 -0
- {ixbrl-viewer-1.4.14 → ixbrl-viewer-1.4.16}/iXBRLViewerPlugin/viewer/src/less/common.less +0 -0
- {ixbrl-viewer-1.4.14 → ixbrl-viewer-1.4.16}/iXBRLViewerPlugin/viewer/src/less/components.less +0 -0
- {ixbrl-viewer-1.4.14 → ixbrl-viewer-1.4.16}/iXBRLViewerPlugin/viewer/src/less/core.less +0 -0
- {ixbrl-viewer-1.4.14 → ixbrl-viewer-1.4.16}/iXBRLViewerPlugin/viewer/src/less/fonts.less +0 -0
- {ixbrl-viewer-1.4.14 → ixbrl-viewer-1.4.16}/iXBRLViewerPlugin/viewer/src/less/form-controls.less +0 -0
- {ixbrl-viewer-1.4.14 → ixbrl-viewer-1.4.16}/iXBRLViewerPlugin/viewer/src/less/icons.less.njk +0 -0
- {ixbrl-viewer-1.4.14 → ixbrl-viewer-1.4.16}/iXBRLViewerPlugin/viewer/src/less/loader.less +0 -0
- {ixbrl-viewer-1.4.14 → ixbrl-viewer-1.4.16}/iXBRLViewerPlugin/viewer/src/less/menu.less +0 -0
- {ixbrl-viewer-1.4.14 → ixbrl-viewer-1.4.16}/iXBRLViewerPlugin/viewer/src/less/summary.less +0 -0
- {ixbrl-viewer-1.4.14 → ixbrl-viewer-1.4.16}/iXBRLViewerPlugin/viewer/src/less/tabs.less +0 -0
- {ixbrl-viewer-1.4.14 → ixbrl-viewer-1.4.16}/iXBRLViewerPlugin/viewer/src/less/text-block-viewer.less +0 -0
- {ixbrl-viewer-1.4.14 → ixbrl-viewer-1.4.16}/iXBRLViewerPlugin/viewer/src/less/text-mixins.less +0 -0
- {ixbrl-viewer-1.4.14 → ixbrl-viewer-1.4.16}/iXBRLViewerPlugin/viewer/tools/build-font.js +0 -0
- {ixbrl-viewer-1.4.14 → ixbrl-viewer-1.4.16}/iXBRLViewerPlugin/viewer/version.js +0 -0
- {ixbrl-viewer-1.4.14 → ixbrl-viewer-1.4.16}/iXBRLViewerPlugin/viewer/webpack.common.js +0 -0
- {ixbrl-viewer-1.4.14 → ixbrl-viewer-1.4.16}/iXBRLViewerPlugin/viewer/webpack.dev.js +0 -0
- {ixbrl-viewer-1.4.14 → ixbrl-viewer-1.4.16}/iXBRLViewerPlugin/viewer/webpack.prod.js +0 -0
- {ixbrl-viewer-1.4.14 → ixbrl-viewer-1.4.16}/ixbrl_viewer.egg-info/dependency_links.txt +0 -0
- {ixbrl-viewer-1.4.14 → ixbrl-viewer-1.4.16}/ixbrl_viewer.egg-info/entry_points.txt +0 -0
- {ixbrl-viewer-1.4.14 → ixbrl-viewer-1.4.16}/ixbrl_viewer.egg-info/top_level.txt +0 -0
- {ixbrl-viewer-1.4.14 → ixbrl-viewer-1.4.16}/jest.config.json +0 -0
- {ixbrl-viewer-1.4.14 → ixbrl-viewer-1.4.16}/samples/Makefile +0 -0
- {ixbrl-viewer-1.4.14 → ixbrl-viewer-1.4.16}/samples/Makefile-src +0 -0
- {ixbrl-viewer-1.4.14 → ixbrl-viewer-1.4.16}/samples/fetch-sample-files.py +0 -0
- {ixbrl-viewer-1.4.14 → ixbrl-viewer-1.4.16}/samples/sample-files.list +0 -0
- {ixbrl-viewer-1.4.14 → ixbrl-viewer-1.4.16}/samples/src/continuation/continuation.html +0 -0
- {ixbrl-viewer-1.4.14 → ixbrl-viewer-1.4.16}/samples/src/ixds-test/document1.html +0 -0
- {ixbrl-viewer-1.4.14 → ixbrl-viewer-1.4.16}/samples/src/ixds-test/faurecia.html +0 -0
- {ixbrl-viewer-1.4.14 → ixbrl-viewer-1.4.16}/samples/src/ixds-test/valeo.html +0 -0
- {ixbrl-viewer-1.4.14 → ixbrl-viewer-1.4.16}/samples/src/scrollable-div/scrollable-div.html +0 -0
- {ixbrl-viewer-1.4.14 → ixbrl-viewer-1.4.16}/samples/src/xbrl-invalid-tests/xbrl-invalid-test.html +0 -0
- {ixbrl-viewer-1.4.14 → ixbrl-viewer-1.4.16}/setup.cfg +0 -0
- {ixbrl-viewer-1.4.14 → ixbrl-viewer-1.4.16}/tests/__init__.py +0 -0
- {ixbrl-viewer-1.4.14 → ixbrl-viewer-1.4.16}/tests/puppeteer/framework/core_elements.js +0 -0
- {ixbrl-viewer-1.4.14 → ixbrl-viewer-1.4.16}/tests/puppeteer/framework/page_objects/doc_frame.js +0 -0
- {ixbrl-viewer-1.4.14 → ixbrl-viewer-1.4.16}/tests/puppeteer/framework/page_objects/fact_details_panel.js +0 -0
- {ixbrl-viewer-1.4.14 → ixbrl-viewer-1.4.16}/tests/puppeteer/framework/page_objects/search_panel.js +0 -0
- {ixbrl-viewer-1.4.14 → ixbrl-viewer-1.4.16}/tests/puppeteer/framework/page_objects/toolbar.js +0 -0
- {ixbrl-viewer-1.4.14 → ixbrl-viewer-1.4.16}/tests/puppeteer/framework/utils.js +0 -0
- {ixbrl-viewer-1.4.14 → ixbrl-viewer-1.4.16}/tests/puppeteer/framework/viewer_page.js +0 -0
- {ixbrl-viewer-1.4.14 → ixbrl-viewer-1.4.16}/tests/puppeteer/puppeteer_test_run_via_intellij.jpg +0 -0
- {ixbrl-viewer-1.4.14 → ixbrl-viewer-1.4.16}/tests/puppeteer/test_filings/filing_documents_smoke_test.zip +0 -0
- {ixbrl-viewer-1.4.14 → ixbrl-viewer-1.4.16}/tests/puppeteer/test_filings/highlights.zip +0 -0
- {ixbrl-viewer-1.4.14 → ixbrl-viewer-1.4.16}/tests/puppeteer/tests/fact_properties.test.js +0 -0
- {ixbrl-viewer-1.4.14 → ixbrl-viewer-1.4.16}/tests/puppeteer/tests/highlight.test.js +0 -0
- {ixbrl-viewer-1.4.14 → ixbrl-viewer-1.4.16}/tests/puppeteer/tests/search.test.js +0 -0
- {ixbrl-viewer-1.4.14 → ixbrl-viewer-1.4.16}/tests/unit_tests/__init__.py +0 -0
- {ixbrl-viewer-1.4.14 → ixbrl-viewer-1.4.16}/tests/unit_tests/iXBRLViewerPlugin/__init__.py +0 -0
- {ixbrl-viewer-1.4.14 → ixbrl-viewer-1.4.16}/tests/unit_tests/iXBRLViewerPlugin/mock_arelle.py +0 -0
- {ixbrl-viewer-1.4.14 → ixbrl-viewer-1.4.16}/tests/unit_tests/iXBRLViewerPlugin/test_iXBRLViewer.py +0 -0
- {ixbrl-viewer-1.4.14 → ixbrl-viewer-1.4.16}/tests/unit_tests/iXBRLViewerPlugin/test_xhtmlserialize.py +0 -0
- {ixbrl-viewer-1.4.14 → ixbrl-viewer-1.4.16}/tox.ini +0 -0
|
@@ -42,13 +42,13 @@ jobs:
|
|
|
42
42
|
npm version $(git describe --tags)
|
|
43
43
|
npm pack
|
|
44
44
|
- name: Upload ixbrlviewer.js artifact
|
|
45
|
-
uses: actions/upload-artifact@v4.
|
|
45
|
+
uses: actions/upload-artifact@v4.2.0
|
|
46
46
|
with:
|
|
47
47
|
name: ixbrlviewer.js
|
|
48
48
|
if-no-files-found: error
|
|
49
49
|
path: iXBRLViewerPlugin/viewer/dist/ixbrlviewer.js
|
|
50
50
|
- name: Upload npm artifact
|
|
51
|
-
uses: actions/upload-artifact@v4.
|
|
51
|
+
uses: actions/upload-artifact@v4.2.0
|
|
52
52
|
with:
|
|
53
53
|
name: npm package
|
|
54
54
|
if-no-files-found: error
|
|
@@ -69,11 +69,11 @@ jobs:
|
|
|
69
69
|
node-version: ${{ inputs.node_version }}
|
|
70
70
|
registry-url: 'https://registry.npmjs.org' # Must explicitly set this for NODE_AUTH_TOKEN to work below
|
|
71
71
|
- name: Download ixbrlviewer.js artifact
|
|
72
|
-
uses: actions/download-artifact@v4.1.
|
|
72
|
+
uses: actions/download-artifact@v4.1.1
|
|
73
73
|
with:
|
|
74
74
|
name: ixbrlviewer.js
|
|
75
75
|
- name: Download npm artifact
|
|
76
|
-
uses: actions/download-artifact@v4.1.
|
|
76
|
+
uses: actions/download-artifact@v4.1.1
|
|
77
77
|
with:
|
|
78
78
|
name: npm package
|
|
79
79
|
- name: Publish with npm
|
|
@@ -54,7 +54,7 @@ jobs:
|
|
|
54
54
|
run: npx http-server . &> tests/puppeteer/artifacts/http_server.log &
|
|
55
55
|
- name: Run puppeteer tests
|
|
56
56
|
run: npm run test:puppeteer
|
|
57
|
-
- uses: actions/upload-artifact@v4.
|
|
57
|
+
- uses: actions/upload-artifact@v4.2.0
|
|
58
58
|
if: failure()
|
|
59
59
|
with:
|
|
60
60
|
name: ${{ github.run_id }}.${{ github.run_attempt }}_${{ matrix.os }}_${{ matrix.node-version }}_${{ matrix.python-version }}_artifacts
|
|
@@ -60,13 +60,13 @@ jobs:
|
|
|
60
60
|
- name: Build Python package
|
|
61
61
|
run: python -m build
|
|
62
62
|
- name: Upload source distribution artifact
|
|
63
|
-
uses: actions/upload-artifact@v4.
|
|
63
|
+
uses: actions/upload-artifact@v4.2.0
|
|
64
64
|
with:
|
|
65
65
|
name: source distribution
|
|
66
66
|
if-no-files-found: error
|
|
67
67
|
path: dist/*.tar.gz
|
|
68
68
|
- name: Upload wheel artifact
|
|
69
|
-
uses: actions/upload-artifact@v4.
|
|
69
|
+
uses: actions/upload-artifact@v4.2.0
|
|
70
70
|
with:
|
|
71
71
|
name: wheel
|
|
72
72
|
if-no-files-found: error
|
|
@@ -83,11 +83,11 @@ jobs:
|
|
|
83
83
|
- name: Install twine
|
|
84
84
|
run: pip install -U twine
|
|
85
85
|
- name: Download source distribution artifact
|
|
86
|
-
uses: actions/download-artifact@v4.1.
|
|
86
|
+
uses: actions/download-artifact@v4.1.1
|
|
87
87
|
with:
|
|
88
88
|
name: source distribution
|
|
89
89
|
- name: Download wheel artifact
|
|
90
|
-
uses: actions/download-artifact@v4.1.
|
|
90
|
+
uses: actions/download-artifact@v4.1.1
|
|
91
91
|
with:
|
|
92
92
|
name: wheel
|
|
93
93
|
- name: Publish package on release
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: ixbrl-viewer
|
|
3
|
-
Version: 1.4.
|
|
3
|
+
Version: 1.4.16
|
|
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
|
|
@@ -36,7 +36,7 @@ Provides-Extra: arelle
|
|
|
36
36
|
Requires-Dist: arelle_release==2.*; extra == "arelle"
|
|
37
37
|
Provides-Extra: dev
|
|
38
38
|
Requires-Dist: flake8==7.0.0; extra == "dev"
|
|
39
|
-
Requires-Dist: lxml-stubs==0.
|
|
39
|
+
Requires-Dist: lxml-stubs==0.5.1; extra == "dev"
|
|
40
40
|
Requires-Dist: mypy==1.8.0; extra == "dev"
|
|
41
41
|
Requires-Dist: pytest==7.4.4; extra == "dev"
|
|
42
42
|
Requires-Dist: typing-extensions==4.9.0; extra == "dev"
|
|
@@ -9,18 +9,20 @@ import sys
|
|
|
9
9
|
import tempfile
|
|
10
10
|
import traceback
|
|
11
11
|
from optparse import OptionGroup, OptionParser
|
|
12
|
+
from pathlib import Path
|
|
12
13
|
|
|
13
14
|
from arelle import Cntlr
|
|
14
15
|
from arelle.LocalViewer import LocalViewer
|
|
15
16
|
from arelle.ModelDocument import Type
|
|
17
|
+
from arelle.UrlUtil import isHttpUrl
|
|
16
18
|
from arelle.webserver.bottle import static_file
|
|
17
19
|
|
|
18
|
-
from .constants import CONFIG_FEATURE_PREFIX, CONFIG_LAUNCH_ON_LOAD, \
|
|
19
|
-
CONFIG_SCRIPT_URL, DEFAULT_LAUNCH_ON_LOAD, DEFAULT_OUTPUT_NAME, \
|
|
20
|
-
DEFAULT_JS_FILENAME, DEFAULT_VIEWER_PATH,
|
|
20
|
+
from .constants import CONFIG_COPY_SCRIPT, CONFIG_FEATURE_PREFIX, CONFIG_LAUNCH_ON_LOAD, \
|
|
21
|
+
CONFIG_SCRIPT_URL, DEFAULT_COPY_SCRIPT, DEFAULT_LAUNCH_ON_LOAD, DEFAULT_OUTPUT_NAME, \
|
|
22
|
+
DEFAULT_JS_FILENAME, DEFAULT_VIEWER_PATH, ERROR_MESSAGE_CODE, \
|
|
23
|
+
EXCEPTION_MESSAGE_CODE, FEATURE_CONFIGS
|
|
21
24
|
from .iXBRLViewer import IXBRLViewerBuilder, IXBRLViewerBuilderError
|
|
22
25
|
|
|
23
|
-
|
|
24
26
|
#
|
|
25
27
|
# GUI operation:
|
|
26
28
|
#
|
|
@@ -54,7 +56,18 @@ def iXBRLViewerCommandLineOptionExtender(parser, *args, **kwargs):
|
|
|
54
56
|
action="store",
|
|
55
57
|
dest="viewerURL",
|
|
56
58
|
default=DEFAULT_VIEWER_PATH,
|
|
57
|
-
help="
|
|
59
|
+
help="A filepath or URL to the iXBRL Viewer JavaScript file which will be downloaded or copied into the output directory."
|
|
60
|
+
" If a relative filepath is to be copied it will be resolved relative to the current working directory."
|
|
61
|
+
" If '--viewer-no-copy-script' is used, the '--viewer-url' file will not be copied or downloaded and instead directly referenced from the HTML file."
|
|
62
|
+
" Examples: 'customViewerScript.js', '/path/to/ixbrlviewer.js', 'https://example.com/ixbrlviewer.js'."
|
|
63
|
+
f" The default value is '{DEFAULT_JS_FILENAME}'.")
|
|
64
|
+
parser.add_option("--viewer-no-copy-script",
|
|
65
|
+
action="store_true",
|
|
66
|
+
dest="viewerNoCopyScript",
|
|
67
|
+
default=False,
|
|
68
|
+
help="Prevent copying the iXBRL Viewer's JavaScript file from '--viewer-url' into the output directory."
|
|
69
|
+
" If used, the iXBRL Viewer HTML file will reference the '--viewer-url' directly."
|
|
70
|
+
" It must be a valid script location at the time the viewer is opened in a browser.")
|
|
58
71
|
parser.add_option("--viewer-validation-messages",
|
|
59
72
|
dest="validationMessages",
|
|
60
73
|
action="store_true",
|
|
@@ -102,47 +115,63 @@ def generateViewer(
|
|
|
102
115
|
zipViewerOutput: bool = False,
|
|
103
116
|
features: list[str] | None = None,
|
|
104
117
|
packageDownloadURL: str | None = None,
|
|
118
|
+
copyScript: bool = True,
|
|
105
119
|
) -> None:
|
|
106
120
|
"""
|
|
107
|
-
Generate and save
|
|
108
|
-
If
|
|
121
|
+
Generate and save an iXBRL viewer at the given destination (file, directory, or in-memory file) with the given viewer script URL.
|
|
122
|
+
If copyScript is True the viewer script will be copied into the output destination.
|
|
109
123
|
:param cntlr: The arelle controller that contains the model to be included in the viewer
|
|
110
124
|
:param saveViewerDest: The target that viewer data/files will be written to (path to file or directory, or a file object itself).
|
|
111
|
-
:param viewerURL: The filepath or URL location of the
|
|
125
|
+
:param viewerURL: The filepath or URL location of the iXBRL Viewer JavaScript file.
|
|
112
126
|
:param showValidationMessages: True if validation messages should be shown in the viewer.
|
|
113
127
|
:param useStubViewer: True if the stub viewer should be used.
|
|
114
128
|
:param zipViewerOutput: True if the destination is a zip archive.
|
|
115
|
-
:param features:
|
|
129
|
+
:param features: Optional list of features to enable.
|
|
130
|
+
:param packageDownloadURL: Optional URL to use as the report package download URL.
|
|
131
|
+
:param copyScript: Controls if the script referenced by viewerURL is copied into the output directory, or directly set as the 'src' value of the script tag in the HTML iXBRL Viewer.
|
|
116
132
|
"""
|
|
117
133
|
# extend XBRL-loaded run processing for this option
|
|
118
|
-
|
|
134
|
+
abortGenerationMsg = "Skipping iXBRL Viewer generation."
|
|
135
|
+
if not saveViewerDest:
|
|
136
|
+
cntlr.addToLog(f"iXBRL Viewer destination not provided. {abortGenerationMsg}", messageCode=EXCEPTION_MESSAGE_CODE)
|
|
119
137
|
return
|
|
120
|
-
|
|
121
|
-
|
|
138
|
+
|
|
139
|
+
if not viewerURL:
|
|
140
|
+
cntlr.addToLog(f"iXBRL Viewer script not provided. {abortGenerationMsg}", messageCode=EXCEPTION_MESSAGE_CODE)
|
|
141
|
+
return
|
|
142
|
+
|
|
143
|
+
if (cntlr.modelManager is None
|
|
144
|
+
or len(cntlr.modelManager.loadedModelXbrls) == 0
|
|
122
145
|
or any(not mx.modelDocument for mx in cntlr.modelManager.loadedModelXbrls)):
|
|
123
|
-
cntlr.addToLog("No taxonomy loaded.")
|
|
146
|
+
cntlr.addToLog(f"No taxonomy loaded. {abortGenerationMsg}", messageCode=ERROR_MESSAGE_CODE)
|
|
124
147
|
return
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
cntlr.addToLog("No inline XBRL document loaded.")
|
|
148
|
+
if cntlr.modelManager.modelXbrl.modelDocument.type not in (Type.INLINEXBRL, Type.INLINEXBRLDOCUMENTSET):
|
|
149
|
+
cntlr.addToLog(f"No inline XBRL document loaded. {abortGenerationMsg}", messageCode=ERROR_MESSAGE_CODE)
|
|
128
150
|
return
|
|
151
|
+
|
|
129
152
|
copyScriptPath = None
|
|
130
|
-
if
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
153
|
+
if copyScript:
|
|
154
|
+
originalViewerURL = viewerURL
|
|
155
|
+
viewerPath = None
|
|
156
|
+
if isHttpUrl(originalViewerURL):
|
|
157
|
+
cacheScript = cntlr.webCache.getfilename(originalViewerURL)
|
|
158
|
+
if cacheScript and (cacheScriptPath := Path(cacheScript)).is_file():
|
|
159
|
+
viewerPath = cacheScriptPath
|
|
160
|
+
else:
|
|
161
|
+
downloadFailedErrorMessage = f"Unable to download iXBRL Viewer script '{originalViewerURL}'."
|
|
162
|
+
if cntlr.webCache.workOffline:
|
|
163
|
+
downloadFailedErrorMessage += " Disable offline mode and try again."
|
|
164
|
+
cntlr.addToLog(f"{downloadFailedErrorMessage} {abortGenerationMsg}", messageCode=EXCEPTION_MESSAGE_CODE)
|
|
165
|
+
return
|
|
166
|
+
|
|
167
|
+
if not viewerPath:
|
|
168
|
+
viewerPath = Path(viewerURL)
|
|
169
|
+
copyScriptPath = viewerPath.resolve()
|
|
170
|
+
viewerURL = viewerPath.name
|
|
171
|
+
if not viewerPath.is_file():
|
|
172
|
+
cntlr.addToLog(f"iXBRL Viewer script not found at '{viewerPath}'. {abortGenerationMsg}", messageCode=EXCEPTION_MESSAGE_CODE)
|
|
173
|
+
return
|
|
174
|
+
|
|
146
175
|
try:
|
|
147
176
|
viewerBuilder = IXBRLViewerBuilder(cntlr.modelManager.loadedModelXbrls)
|
|
148
177
|
if features:
|
|
@@ -154,20 +183,8 @@ def generateViewer(
|
|
|
154
183
|
except IXBRLViewerBuilderError as ex:
|
|
155
184
|
print(ex)
|
|
156
185
|
except Exception as ex:
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
def getAbsoluteViewerPath(saveViewerPath: str, relativeViewerPath: str) -> str:
|
|
161
|
-
"""
|
|
162
|
-
Generate a path to the viewer script given the save destination path as a starting point.
|
|
163
|
-
:param saveViewerPath: Path to file or directory where viewer output will be saved.
|
|
164
|
-
:param relativeViewerPath: Path to save destination relative to viewer save path.
|
|
165
|
-
:return: An absolute file path to the viewer.
|
|
166
|
-
"""
|
|
167
|
-
saveViewerDir = saveViewerPath
|
|
168
|
-
if os.path.isfile(saveViewerDir):
|
|
169
|
-
saveViewerDir = os.path.dirname(os.path.join(os.getcwd(), saveViewerDir))
|
|
170
|
-
return os.path.join(saveViewerDir, relativeViewerPath)
|
|
186
|
+
tb = traceback.format_tb(sys.exc_info()[2])
|
|
187
|
+
cntlr.addToLog(f"Exception {ex} \nTraceback {tb}", messageCode=EXCEPTION_MESSAGE_CODE)
|
|
171
188
|
|
|
172
189
|
|
|
173
190
|
def getFeaturesFromOptions(options: argparse.Namespace | OptionParser):
|
|
@@ -180,35 +197,37 @@ def getFeaturesFromOptions(options: argparse.Namespace | OptionParser):
|
|
|
180
197
|
|
|
181
198
|
def iXBRLViewerCommandLineXbrlRun(cntlr, options, *args, **kwargs):
|
|
182
199
|
generateViewer(
|
|
183
|
-
cntlr,
|
|
184
|
-
options.saveViewerDest or kwargs.get("responseZipStream"),
|
|
185
|
-
options.viewerURL,
|
|
186
|
-
options.
|
|
187
|
-
options.
|
|
188
|
-
options.
|
|
189
|
-
|
|
190
|
-
options
|
|
200
|
+
cntlr=cntlr,
|
|
201
|
+
saveViewerDest=options.saveViewerDest or kwargs.get("responseZipStream"),
|
|
202
|
+
viewerURL=options.viewerURL,
|
|
203
|
+
copyScript=not options.viewerNoCopyScript,
|
|
204
|
+
showValidationMessages=options.validationMessages,
|
|
205
|
+
useStubViewer=options.useStubViewer,
|
|
206
|
+
zipViewerOutput=options.zipViewerOutput,
|
|
207
|
+
features=getFeaturesFromOptions(options),
|
|
208
|
+
packageDownloadURL=options.packageDownloadURL,
|
|
191
209
|
)
|
|
192
210
|
|
|
193
211
|
|
|
194
212
|
def iXBRLViewerSaveCommand(cntlr):
|
|
195
213
|
from .ui import SaveViewerDialog
|
|
196
214
|
if cntlr.modelManager is None or cntlr.modelManager.modelXbrl is None:
|
|
197
|
-
cntlr.addToLog("No document loaded.")
|
|
215
|
+
cntlr.addToLog("No document loaded.", messageCode=ERROR_MESSAGE_CODE)
|
|
198
216
|
return
|
|
199
217
|
modelXbrl = cntlr.modelManager.modelXbrl
|
|
200
218
|
if modelXbrl.modelDocument.type not in (Type.INLINEXBRL, Type.INLINEXBRLDOCUMENTSET):
|
|
201
|
-
cntlr.addToLog("No inline XBRL document loaded.")
|
|
219
|
+
cntlr.addToLog("No inline XBRL document loaded.", messageCode=ERROR_MESSAGE_CODE)
|
|
202
220
|
return
|
|
203
221
|
dialog = SaveViewerDialog(cntlr)
|
|
204
222
|
dialog.render()
|
|
205
223
|
if dialog.accepted and dialog.filename():
|
|
206
224
|
generateViewer(
|
|
207
|
-
cntlr,
|
|
208
|
-
dialog.filename(),
|
|
209
|
-
dialog.scriptUrl() or DEFAULT_VIEWER_PATH,
|
|
225
|
+
cntlr=cntlr,
|
|
226
|
+
saveViewerDest=dialog.filename(),
|
|
227
|
+
viewerURL=dialog.scriptUrl() or DEFAULT_VIEWER_PATH,
|
|
228
|
+
copyScript=dialog.copyScript(),
|
|
210
229
|
zipViewerOutput=dialog.zipViewerOutput(),
|
|
211
|
-
features=dialog.features()
|
|
230
|
+
features=dialog.features(),
|
|
212
231
|
)
|
|
213
232
|
|
|
214
233
|
|
|
@@ -284,18 +303,20 @@ def guiRun(cntlr, modelXbrl, attach, *args, **kwargs):
|
|
|
284
303
|
if cntlr.config.setdefault(f'{CONFIG_FEATURE_PREFIX}{c.key}', False)
|
|
285
304
|
]
|
|
286
305
|
generateViewer(
|
|
287
|
-
cntlr,
|
|
306
|
+
cntlr=cntlr,
|
|
288
307
|
saveViewerDest=tempViewer.name,
|
|
289
308
|
viewerURL=cntlr.config.get(CONFIG_SCRIPT_URL) or DEFAULT_VIEWER_PATH,
|
|
309
|
+
copyScript=cntlr.config.get(CONFIG_COPY_SCRIPT, DEFAULT_COPY_SCRIPT),
|
|
290
310
|
useStubViewer=True,
|
|
291
|
-
features=features
|
|
311
|
+
features=features,
|
|
292
312
|
)
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
313
|
+
if Path(tempViewer.name, viewer_file_name).exists():
|
|
314
|
+
localViewer = iXBRLViewerLocalViewer("iXBRL Viewer", os.path.dirname(__file__))
|
|
315
|
+
localhost = localViewer.init(cntlr, tempViewer.name)
|
|
316
|
+
webbrowser.open(f'{localhost}/{viewer_file_name}')
|
|
296
317
|
except Exception as ex:
|
|
297
318
|
modelXbrl.error(
|
|
298
|
-
|
|
319
|
+
EXCEPTION_MESSAGE_CODE,
|
|
299
320
|
"Exception %(exception)s \nTraceback %(traceback)s",
|
|
300
321
|
modelObject=modelXbrl, exception=ex, traceback=traceback.format_tb(sys.exc_info()[2])
|
|
301
322
|
)
|
|
@@ -7,11 +7,17 @@ from .featureConfig import FeatureConfig
|
|
|
7
7
|
CONFIG_FEATURE_PREFIX = 'iXBRLViewerFeature_'
|
|
8
8
|
CONFIG_FILE_DIRECTORY = 'iXBRLViewerFileDir'
|
|
9
9
|
CONFIG_LAUNCH_ON_LOAD = 'iXBRLViewerLaunchOnLoad'
|
|
10
|
+
CONFIG_COPY_SCRIPT = 'iXBRLViewerCopyScript'
|
|
10
11
|
CONFIG_OUTPUT_FILE = 'iXBRLViewerOutputFile'
|
|
11
12
|
CONFIG_SCRIPT_URL = 'iXBRLViewerScriptURL'
|
|
12
13
|
CONFIG_ZIP_OUTPUT = 'iXBRLViewerZipOutput'
|
|
13
14
|
|
|
15
|
+
ERROR_MESSAGE_CODE = 'viewer:error'
|
|
16
|
+
EXCEPTION_MESSAGE_CODE = 'viewer:exception'
|
|
17
|
+
INFO_MESSAGE_CODE = 'viewer:info'
|
|
18
|
+
|
|
14
19
|
DEFAULT_LAUNCH_ON_LOAD = True
|
|
20
|
+
DEFAULT_COPY_SCRIPT = True
|
|
15
21
|
DEFAULT_OUTPUT_NAME = 'ixbrlviewer.html'
|
|
16
22
|
DEFAULT_JS_FILENAME = 'ixbrlviewer.js'
|
|
17
23
|
DEFAULT_VIEWER_PATH = os.path.join(os.path.dirname(__file__), "viewer", "dist", DEFAULT_JS_FILENAME)
|
|
@@ -12,6 +12,7 @@ import urllib.parse
|
|
|
12
12
|
import zipfile
|
|
13
13
|
from collections import defaultdict
|
|
14
14
|
from copy import deepcopy
|
|
15
|
+
from pathlib import Path
|
|
15
16
|
|
|
16
17
|
import pycountry
|
|
17
18
|
from arelle import XbrlConst
|
|
@@ -23,7 +24,7 @@ from arelle.UrlUtil import isHttpUrl
|
|
|
23
24
|
from arelle.ValidateXbrlCalcs import inferredDecimals
|
|
24
25
|
from lxml import etree
|
|
25
26
|
|
|
26
|
-
from .constants import DEFAULT_OUTPUT_NAME,
|
|
27
|
+
from .constants import DEFAULT_JS_FILENAME, DEFAULT_OUTPUT_NAME, ERROR_MESSAGE_CODE, FEATURE_CONFIGS, INFO_MESSAGE_CODE
|
|
27
28
|
from .xhtmlserialize import XHTMLSerializer
|
|
28
29
|
|
|
29
30
|
|
|
@@ -265,11 +266,15 @@ class IXBRLViewerBuilder:
|
|
|
265
266
|
factData["v"] = None
|
|
266
267
|
elif f.concept is not None and f.concept.isEnumeration:
|
|
267
268
|
qnEnums = f.xValue
|
|
268
|
-
if
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
269
|
+
if qnEnums is None:
|
|
270
|
+
factData["v"] = f.value
|
|
271
|
+
factData["err"] = 'INVALID_IX_VALUE'
|
|
272
|
+
else:
|
|
273
|
+
if not isinstance(qnEnums, list):
|
|
274
|
+
qnEnums = (qnEnums,)
|
|
275
|
+
factData["v"] = " ".join(self.nsmap.qname(qn) for qn in qnEnums)
|
|
276
|
+
for qn in qnEnums:
|
|
277
|
+
self.addConcept(report, report.qnameConcepts.get(qn))
|
|
273
278
|
else:
|
|
274
279
|
factData["v"] = f.value
|
|
275
280
|
if f.value == INVALIDixVALUE:
|
|
@@ -348,7 +353,7 @@ class IXBRLViewerBuilder:
|
|
|
348
353
|
if child.tag == '{http://www.w3.org/1999/xhtml}body':
|
|
349
354
|
for body_child in child:
|
|
350
355
|
if body_child.tag == '{http://www.w3.org/1999/xhtml}script' and body_child.get('type','') == 'application/x.ixbrl-viewer+json':
|
|
351
|
-
self.logger_model.error(
|
|
356
|
+
self.logger_model.error(ERROR_MESSAGE_CODE, "File already contains iXBRL viewer")
|
|
352
357
|
return False
|
|
353
358
|
|
|
354
359
|
child.append(etree.Comment("BEGIN IXBRL VIEWER EXTENSIONS"))
|
|
@@ -391,7 +396,7 @@ class IXBRLViewerBuilder:
|
|
|
391
396
|
|
|
392
397
|
def createViewer(
|
|
393
398
|
self,
|
|
394
|
-
scriptUrl: str =
|
|
399
|
+
scriptUrl: str = DEFAULT_JS_FILENAME,
|
|
395
400
|
useStubViewer: bool = False,
|
|
396
401
|
showValidations: bool = True,
|
|
397
402
|
packageDownloadURL: str | None = None,
|
|
@@ -426,7 +431,7 @@ class IXBRLViewerBuilder:
|
|
|
426
431
|
self.currentTargetReport["rels"] = self.getRelationships(report)
|
|
427
432
|
|
|
428
433
|
docSetFiles = None
|
|
429
|
-
report.info(
|
|
434
|
+
report.info(INFO_MESSAGE_CODE, "Creating iXBRL viewer (%d of %d)" % (n+1, len(self.reports)))
|
|
430
435
|
if report.modelDocument.type == Type.INLINEXBRLDOCUMENTSET:
|
|
431
436
|
# Sort by object index to preserve order in which files were specified.
|
|
432
437
|
xmlDocsByFilename = {
|
|
@@ -531,7 +536,7 @@ class iXBRLViewer:
|
|
|
531
536
|
def addFilingDoc(self, filingDocuments):
|
|
532
537
|
self.filingDocuments = filingDocuments
|
|
533
538
|
|
|
534
|
-
def save(self, destination: io.BytesIO | str, zipOutput: bool = False, copyScriptPath:
|
|
539
|
+
def save(self, destination: io.BytesIO | str, zipOutput: bool = False, copyScriptPath: Path | None = None):
|
|
535
540
|
"""
|
|
536
541
|
Save the iXBRL viewer.
|
|
537
542
|
:param destination: The target that viewer data/files will be written to (path to file/directory, or a file object itself).
|
|
@@ -549,15 +554,15 @@ class iXBRLViewer:
|
|
|
549
554
|
fileMode = 'w'
|
|
550
555
|
elif destination.endswith(os.sep):
|
|
551
556
|
# Looks like a directory, but isn't one
|
|
552
|
-
self.logger_model.error(
|
|
557
|
+
self.logger_model.error(ERROR_MESSAGE_CODE, "Directory %s does not exist" % destination)
|
|
553
558
|
return
|
|
554
559
|
elif not os.path.isdir(os.path.dirname(os.path.abspath(destination))):
|
|
555
560
|
# Directory part of filename doesn't exist
|
|
556
|
-
self.logger_model.error(
|
|
561
|
+
self.logger_model.error(ERROR_MESSAGE_CODE, "Directory %s does not exist" % os.path.dirname(os.path.abspath(destination)))
|
|
557
562
|
return
|
|
558
563
|
elif not destination.endswith('.zip'):
|
|
559
564
|
# File extension isn't a zip
|
|
560
|
-
self.logger_model.error(
|
|
565
|
+
self.logger_model.error(ERROR_MESSAGE_CODE, "File extension %s is not a zip" % os.path.splitext(destination)[0])
|
|
561
566
|
return
|
|
562
567
|
else:
|
|
563
568
|
file = destination
|
|
@@ -565,57 +570,56 @@ class iXBRLViewer:
|
|
|
565
570
|
|
|
566
571
|
with zipfile.ZipFile(file, fileMode, zipfile.ZIP_DEFLATED, True) as zout:
|
|
567
572
|
for f in self.files:
|
|
568
|
-
self.logger_model.info(
|
|
573
|
+
self.logger_model.info(INFO_MESSAGE_CODE, "Saving in output zip %s" % f.filename)
|
|
569
574
|
with zout.open(f.filename, "w") as fout:
|
|
570
575
|
writer = XHTMLSerializer(fout)
|
|
571
576
|
writer.serialize(f.xmlDocument)
|
|
572
577
|
if self.filingDocuments:
|
|
573
578
|
filename = os.path.basename(self.filingDocuments)
|
|
574
|
-
self.logger_model.info(
|
|
579
|
+
self.logger_model.info(INFO_MESSAGE_CODE, "Writing %s" % filename)
|
|
575
580
|
zout.write(self.filingDocuments, filename)
|
|
576
581
|
if copyScriptPath is not None:
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
zout.write(scriptSrc, os.path.basename(copyScriptPath))
|
|
582
|
+
self.logger_model.info(INFO_MESSAGE_CODE, f"Writing script from {copyScriptPath}")
|
|
583
|
+
zout.write(copyScriptPath, copyScriptPath.name)
|
|
580
584
|
elif os.path.isdir(destination):
|
|
581
585
|
# If output is a directory, write each file in the doc set to that
|
|
582
586
|
# directory using its existing filename
|
|
583
587
|
for f in self.files:
|
|
584
588
|
filename = os.path.join(destination, f.filename)
|
|
585
|
-
self.logger_model.info(
|
|
589
|
+
self.logger_model.info(INFO_MESSAGE_CODE, "Writing %s" % filename)
|
|
586
590
|
with open(filename, "wb") as fout:
|
|
587
591
|
writer = XHTMLSerializer(fout)
|
|
588
592
|
writer.serialize(f.xmlDocument)
|
|
589
593
|
if self.filingDocuments:
|
|
590
594
|
filename = os.path.basename(self.filingDocuments)
|
|
591
|
-
self.logger_model.info(
|
|
595
|
+
self.logger_model.info(INFO_MESSAGE_CODE, "Writing %s" % filename)
|
|
592
596
|
shutil.copy2(self.filingDocuments, os.path.join(destination, filename))
|
|
593
597
|
if copyScriptPath is not None:
|
|
594
|
-
self._copyScript(destination, copyScriptPath)
|
|
598
|
+
self._copyScript(Path(destination), copyScriptPath)
|
|
595
599
|
else:
|
|
596
600
|
if len(self.files) > 1:
|
|
597
|
-
self.logger_model.error(
|
|
601
|
+
self.logger_model.error(ERROR_MESSAGE_CODE, "More than one file in input, but output is not a directory")
|
|
598
602
|
elif destination.endswith(os.sep):
|
|
599
603
|
# Looks like a directory, but isn't one
|
|
600
|
-
self.logger_model.error(
|
|
604
|
+
self.logger_model.error(ERROR_MESSAGE_CODE, "Directory %s does not exist" % destination)
|
|
601
605
|
elif not os.path.isdir(os.path.dirname(os.path.abspath(destination))):
|
|
602
606
|
# Directory part of filename doesn't exist
|
|
603
|
-
self.logger_model.error(
|
|
607
|
+
self.logger_model.error(ERROR_MESSAGE_CODE, "Directory %s does not exist" % os.path.dirname(os.path.abspath(destination)))
|
|
604
608
|
else:
|
|
605
|
-
self.logger_model.info(
|
|
609
|
+
self.logger_model.info(INFO_MESSAGE_CODE, "Writing %s" % destination)
|
|
606
610
|
with open(destination, "wb") as fout:
|
|
607
611
|
writer = XHTMLSerializer(fout)
|
|
608
612
|
writer.serialize(self.files[0].xmlDocument)
|
|
609
613
|
if self.filingDocuments:
|
|
610
614
|
filename = os.path.basename(self.filingDocuments)
|
|
611
|
-
self.logger_model.info(
|
|
615
|
+
self.logger_model.info(INFO_MESSAGE_CODE, "Writing %s" % filename)
|
|
612
616
|
shutil.copy2(self.filingDocuments, os.path.join(os.path.dirname(destination), filename))
|
|
613
617
|
if copyScriptPath is not None:
|
|
614
|
-
outDirectory =
|
|
618
|
+
outDirectory = Path(destination).parent
|
|
615
619
|
self._copyScript(outDirectory, copyScriptPath)
|
|
616
620
|
|
|
617
|
-
def _copyScript(self,
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
621
|
+
def _copyScript(self, destDirectory: Path, scriptPath: Path):
|
|
622
|
+
scriptDest = destDirectory / scriptPath.name
|
|
623
|
+
if scriptPath != scriptDest:
|
|
624
|
+
self.logger_model.info(INFO_MESSAGE_CODE, f"Copying script from {scriptDest} to {scriptDest}.")
|
|
625
|
+
shutil.copy2(scriptPath, scriptDest)
|
|
@@ -8,9 +8,9 @@ except ImportError:
|
|
|
8
8
|
|
|
9
9
|
import os
|
|
10
10
|
|
|
11
|
-
from .constants import CONFIG_FEATURE_PREFIX, CONFIG_FILE_DIRECTORY,
|
|
12
|
-
CONFIG_OUTPUT_FILE, CONFIG_SCRIPT_URL, CONFIG_ZIP_OUTPUT,
|
|
13
|
-
GUI_FEATURE_CONFIGS
|
|
11
|
+
from .constants import CONFIG_COPY_SCRIPT, CONFIG_FEATURE_PREFIX, CONFIG_FILE_DIRECTORY, \
|
|
12
|
+
CONFIG_LAUNCH_ON_LOAD, CONFIG_OUTPUT_FILE, CONFIG_SCRIPT_URL, CONFIG_ZIP_OUTPUT, \
|
|
13
|
+
DEFAULT_COPY_SCRIPT, DEFAULT_LAUNCH_ON_LOAD, GUI_FEATURE_CONFIGS
|
|
14
14
|
|
|
15
15
|
UNSET_SCRIPT_URL = ''
|
|
16
16
|
|
|
@@ -30,6 +30,8 @@ class BaseViewerDialog(Toplevel):
|
|
|
30
30
|
self._features[featureConfig.key] = featureVar
|
|
31
31
|
self._scriptUrl = StringVar()
|
|
32
32
|
self._scriptUrl.set(self.cntlr.config.setdefault(CONFIG_SCRIPT_URL, UNSET_SCRIPT_URL))
|
|
33
|
+
self._copyScript = BooleanVar()
|
|
34
|
+
self._copyScript.set(self.cntlr.config.setdefault(CONFIG_COPY_SCRIPT, DEFAULT_COPY_SCRIPT))
|
|
33
35
|
|
|
34
36
|
def addButtons(self, frame: Frame, x: int, y: int) -> int:
|
|
35
37
|
"""
|
|
@@ -62,6 +64,12 @@ class BaseViewerDialog(Toplevel):
|
|
|
62
64
|
scriptUrlLabel.grid(row=y, column=0, sticky=W, pady=3, padx=3)
|
|
63
65
|
scriptUrlEntry.grid(row=y, column=1, columnspan=2, sticky=EW, pady=3, padx=3)
|
|
64
66
|
|
|
67
|
+
y += 1
|
|
68
|
+
copyScriptCheckbutton = Checkbutton(frame, text="Copy Script", variable=self._copyScript, onvalue=True, offvalue=False)
|
|
69
|
+
copyScriptLabel = Label(frame, text="Copy the iXBRL Viewer script into the output directory.")
|
|
70
|
+
copyScriptCheckbutton.grid(row=y, column=0, pady=3, padx=3, sticky=W)
|
|
71
|
+
copyScriptLabel.grid(row=y, column=1, columnspan=3, pady=3, padx=3, sticky=W)
|
|
72
|
+
|
|
65
73
|
y += 1
|
|
66
74
|
featuresLabel = Label(frame, text="Generate with optional features:")
|
|
67
75
|
featuresLabel.grid(row=y, column=0, columnspan=2, pady=3, padx=3, sticky=W)
|
|
@@ -130,6 +138,9 @@ class BaseViewerDialog(Toplevel):
|
|
|
130
138
|
self.grab_set()
|
|
131
139
|
self.wait_window(self)
|
|
132
140
|
|
|
141
|
+
def copyScript(self):
|
|
142
|
+
return self._copyScript.get()
|
|
143
|
+
|
|
133
144
|
def features(self):
|
|
134
145
|
# Return list of feature keys with corresponding BooleanVar is set to True
|
|
135
146
|
return [feature for feature, value in self._features.items() if value.get()]
|
|
@@ -238,6 +249,7 @@ class SettingsDialog(BaseViewerDialog):
|
|
|
238
249
|
"""
|
|
239
250
|
self.cntlr.config[CONFIG_LAUNCH_ON_LOAD] = self._launchOnLoad.get()
|
|
240
251
|
self.cntlr.config[CONFIG_SCRIPT_URL] = self._scriptUrl.get()
|
|
252
|
+
self.cntlr.config[CONFIG_COPY_SCRIPT] = self._copyScript.get()
|
|
241
253
|
for key, var in self._features.items():
|
|
242
254
|
self.cntlr.config[f'{CONFIG_FEATURE_PREFIX}{key}'] = var.get()
|
|
243
255
|
self.cntlr.saveConfig()
|
|
@@ -249,5 +261,6 @@ class SettingsDialog(BaseViewerDialog):
|
|
|
249
261
|
"""
|
|
250
262
|
self._launchOnLoad.set(DEFAULT_LAUNCH_ON_LOAD)
|
|
251
263
|
self._scriptUrl.set(UNSET_SCRIPT_URL)
|
|
264
|
+
self._copyScript.set(DEFAULT_COPY_SCRIPT)
|
|
252
265
|
for featureConfig in GUI_FEATURE_CONFIGS:
|
|
253
266
|
self._features[featureConfig.key].set(featureConfig.guiDefault)
|