{"_id":"@aaroncameron-wk/ixbrl-viewer","_rev":"1-06a323e6fd91852c7a4bf905b72afcc0","name":"@aaroncameron-wk/ixbrl-viewer","dist-tags":{"latest":"1.1.87-7-gd9f38a1"},"versions":{"0.0.0":{"name":"@aaroncameron-wk/ixbrl-viewer","version":"0.0.0","description":"iXBRL Viewer","main":"iXBRLViewerPlugin/viewer/src/js/ixbrlviewer.js","directories":{"test":"tests"},"scripts":{"test":"jest --roots=iXBRLViewerPlugin --env=jsdom","test:puppeteer":"jest --roots=tests/puppeteer","dev":"webpack --config iXBRLViewerPlugin/viewer/webpack.dev.js","prod":"webpack --config iXBRLViewerPlugin/viewer/webpack.prod.js","stylelint":"stylelint iXBRLViewerPlugin/viewer/src/less/*.less","i18n":"i18next -c iXBRLViewerPlugin/viewer/i18next-parser.config.js","puppeteerServe":"npm run prod && ./tests/puppeteer/tools/generate.sh && npx http-server ."},"repository":{"type":"git","url":"git+ssh://git@github.com/Workiva/ixbrl-viewer.git"},"stylelint":{"customSyntax":"postcss-less","extends":"stylelint-config-standard","rules":{"font-family-no-missing-generic-family-keyword":null,"no-descending-specificity":null,"property-no-vendor-prefix":null}},"author":"","dependencies":{"babel-core":"^6.26.3","babel-jest":"^26.0.1","babel-preset-env":"^1.7.0","base64-inline-loader":"^2.0.1","i18next":"^20.3.2","jquery-i18next":"^1.2.1","chart.js":"^2.9.3","core-js":"^3.6.4","css-loader":"^3.4.2","dateformat":"^4.5.1","exceljs":"^4.0.1","file-saver":"^2.0.2","html-loader":"^0.5.5","interactjs":"^1.8.5","jest":"^29.5.0","jquery":"^3.4.1","less":"^3.11.1","less-loader":"^6.0.0","lunr":"^2.3.8","moment":"^2.24.0","postcss-less":"^6.0.0","stylelint":"^14.9.1","stylelint-config-standard":"^28.0.0","webpack":"^5.75.0","webpack-cli":"^5.0.1","webpack-merge":"^5.8.0"},"devDependencies":{"decimal.js":"^10.4.1","http-server":"^14.1.1","i18next-parser":"^8.0.0","jest-environment-jsdom":"^29.5.0","puppeteer":"20.7.3","puppeteer-screen-recorder":"2.1.2"},"license":"Apache-2.0","gitHead":"10e2c0e87079eb09f402965357321d7c70b774e0","bugs":{"url":"https://github.com/Workiva/ixbrl-viewer/issues"},"homepage":"https://github.com/Workiva/ixbrl-viewer#readme","_id":"@aaroncameron-wk/ixbrl-viewer@0.0.0","_nodeVersion":"19.9.0","_npmVersion":"9.6.3","dist":{"integrity":"sha512-QvnV8rhYr64WOJvXBhFL5rVEu2lqOUsIrDCuZQGHo39wj8U92sxVLahz4caORtAuH6HLR0iPjQCsRQQRjpoMew==","shasum":"098e184ff0640c2331234f3d64d132d924f54777","tarball":"https://registry.npmjs.org/@aaroncameron-wk/ixbrl-viewer/-/ixbrl-viewer-0.0.0.tgz","fileCount":182,"unpackedSize":15070844,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCICnVnY91bMbXSoMOxLMW++xmP1OzsLX5uzp6J0cd0vlrAiEA0nIbcA3zkqKQqb5LMJ6ofCEPfGKO08L+owgw8ZhJFxI="}]},"_npmUser":{"name":"aaroncameron-wk","email":"aaron.cameron@workiva.com"},"maintainers":[{"name":"aaroncameron-wk","email":"aaron.cameron@workiva.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ixbrl-viewer_0.0.0_1687475668853_0.871882259401284"},"_hasShrinkwrap":false},"1.1.87-7-gd9f38a1":{"name":"@aaroncameron-wk/ixbrl-viewer","description":"iXBRL Viewer","main":"iXBRLViewerPlugin/viewer/src/js/ixbrlviewer.js","directories":{"test":"tests"},"scripts":{"test":"jest --roots=iXBRLViewerPlugin --env=jsdom","test:puppeteer":"jest --roots=tests/puppeteer","dev":"webpack --config iXBRLViewerPlugin/viewer/webpack.dev.js","prod":"webpack --config iXBRLViewerPlugin/viewer/webpack.prod.js","stylelint":"stylelint iXBRLViewerPlugin/viewer/src/less/*.less","i18n":"i18next -c iXBRLViewerPlugin/viewer/i18next-parser.config.js","puppeteerServe":"npm run prod && ./tests/puppeteer/tools/generate.sh && npx http-server ."},"repository":{"type":"git","url":"git+ssh://git@github.com/Workiva/ixbrl-viewer.git"},"stylelint":{"customSyntax":"postcss-less","extends":"stylelint-config-standard","rules":{"font-family-no-missing-generic-family-keyword":null,"no-descending-specificity":null,"property-no-vendor-prefix":null}},"author":"","devDependencies":{"babel-core":"^6.26.3","babel-jest":"^26.0.1","babel-preset-env":"^1.7.0","base64-inline-loader":"^2.0.1","chart.js":"^2.9.3","core-js":"^3.6.4","css-loader":"^3.4.2","dateformat":"^4.5.1","decimal.js":"^10.4.1","exceljs":"^4.0.1","file-saver":"^2.0.2","html-loader":"^0.5.5","http-server":"^14.1.1","i18next":"^20.3.2","i18next-parser":"^8.0.0","interactjs":"^1.8.5","jest":"^29.5.0","jest-environment-jsdom":"^29.5.0","jquery":"^3.4.1","jquery-i18next":"^1.2.1","less":"^3.11.1","less-loader":"^6.0.0","lunr":"^2.3.8","moment":"^2.24.0","postcss-less":"^6.0.0","puppeteer":"20.7.3","puppeteer-screen-recorder":"2.1.2","stylelint":"^14.9.1","stylelint-config-standard":"^28.0.0","webpack":"^5.75.0","webpack-cli":"^5.0.1","webpack-merge":"^5.8.0"},"license":"Apache-2.0","version":"1.1.87-7-gd9f38a1","gitHead":"d9f38a168b25179a65d713a0d580b17a890a9ea3","bugs":{"url":"https://github.com/Workiva/ixbrl-viewer/issues"},"homepage":"https://github.com/Workiva/ixbrl-viewer#readme","_id":"@aaroncameron-wk/ixbrl-viewer@1.1.87-7-gd9f38a1","_nodeVersion":"19.9.0","_npmVersion":"9.6.3","dist":{"integrity":"sha512-RDY0Ma8C/u4Idf/AFewnUXH65bSCc2k3MfwYvhTf1Bb3dMLOX/hn3dGOxeRfMpxLXf2S6se6AgskzBd89ugm4Q==","shasum":"4de67e492467ae4ed6e67b4b729e8a3ce251968c","tarball":"https://registry.npmjs.org/@aaroncameron-wk/ixbrl-viewer/-/ixbrl-viewer-1.1.87-7-gd9f38a1.tgz","fileCount":96,"unpackedSize":2441103,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDtGep3n6nGR6S5PbkpTXtWbyP0BfGHftL1Eg5uk0SE6QIhALGPhh3oJk5JnUDRiNBNQs8vYXivNOFz/Kx00PHJNHjN"}]},"_npmUser":{"name":"aaroncameron-wk","email":"aaron.cameron@workiva.com"},"maintainers":[{"name":"aaroncameron-wk","email":"aaron.cameron@workiva.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ixbrl-viewer_1.1.87-7-gd9f38a1_1687883477480_0.6403183938992292"},"_hasShrinkwrap":false}},"time":{"created":"2023-06-22T23:14:28.777Z","0.0.0":"2023-06-22T23:14:29.218Z","modified":"2023-06-27T16:31:17.822Z","1.1.87-7-gd9f38a1":"2023-06-27T16:31:17.721Z"},"maintainers":[{"name":"aaroncameron-wk","email":"aaron.cameron@workiva.com"}],"description":"iXBRL Viewer","homepage":"https://github.com/Workiva/ixbrl-viewer#readme","repository":{"type":"git","url":"git+ssh://git@github.com/Workiva/ixbrl-viewer.git"},"bugs":{"url":"https://github.com/Workiva/ixbrl-viewer/issues"},"license":"Apache-2.0","readme":"# Arelle iXBRL Viewer\n\n![ixbrl-viewer](examples/ixbrl-viewer-demo.gif)\n\nThe [Arelle](https://arelle.org/) iXBRL Viewer allows [Inline XBRL](https://www.xbrl.org/ixbrl) (or iXBRL) reports to be\nviewed interactively in a web browser.  The viewer allows users to access the tagged XBRL data embedded in an iXBRL\nreport.  Key features include:\n\n* Full text search on taxonomy labels and references\n* View full details of tagged facts\n* Export tables to Excel\n* Visualize and navigate calculation relationships\n* Produce on-the-fly graphs using XBRL data\n\nA sample viewer is provided in the [examples](examples/README.md) for those interested.\n\nThe viewer project consists of two components:\n\n* A plugin for the [Arelle](https://www.arelle.org) XBRL tool\n* The Javascript viewer application\n\nIn order to view an iXBRL report in the viewer, it must first be prepared using\nthe Arelle plugin.  The preparation process updates the iXBRL file to include:\n\n1. A link to the Javascript viewer\n2. A block of JSON data that contains the results of processing the XBRL data and associated taxonomy\n\nOnce prepared, the resulting file provides an entirely standalone viewer.  Once\nprepared, the viewer is entirely standalone, and does not require access to the\ntaxonomy, or to any online services.  The only dependency is on the javascript\nviewer application, which is a single file which can be accessed directly online, downloaded or built locally.\n\nThe javascript viewer application is a single Javascript file called ixbrlviewer.js. It\ncontains all of the javascript that runs the viewer functionality.\n\n## Installation\n\nThe python portion of this repo is developed using Python 3.9.\n\n1. Clone the [iXBRL Viewer git repository][ixbrlviewer-github].\n2. Download and install [Arelle][arelle-download]\n\n## Accessing the JavaScript viewer application\n\n### Accessing via the CDN\n\nThe JavaScript file is available via a CDN. It can be accessed via the following url:\n\n```text\nhttps://cdn-prod.wdesk.com/ixbrl-viewer/<version tag>/ixbrlviewer.js\n```\n\nWhere `<version tag>` is the current version of ixbrl-viewer you are using. For instance [1.0.0][CDN].\n\n### Accessing via Github\n\nWhen a new version of ixbrl-viewer is released, the javascript is included as a\nrelease asset. The asset can be found on the releases [page][ixbrlviewer-github-releases] for each version of\nthe ixbrl-viewer.  \n\n### Building the JavaScript locally\n\n1. Install npm. Instructions can be found here: <https://www.npmjs.com/get-npm>\n2. Install the dependencies for javascript by running: `npm install`.  This\n   command must be run from within the `ixbrl-viewer directory` (i.e. the root\n   of your checkout of the repository).\n3. Run `npm run prod`. This will create the ixbrlviewer.js in the\n   iXBRLViewerPlugin/viewer/dist directory.\n\n[ixbrlviewer-github]: https://github.com/Workiva/ixbrl-viewer\n[CDN]: https://cdn-prod.wdesk.com/ixbrl-viewer/1.0.0/ixbrlviewer.js\n[ixbrlviewer-github-releases]: https://github.com/Workiva/ixbrl-viewer/releases/tag/0.1.58\n[arelle-download]: http://arelle.org/pub\n\n## JavaScript Versioning\n\nThe ixbrl-viewer plugin embeds processed XBRL metadata in the HTML that has a specific format read\nby the JavaScript. The metadata produced by a version will be broken if a major version bump is\nreleased. The new javascript won't necessarily work with older versions of the generated metadata.\nif a minor version bump is released, then the metadata format was updated, any ixbrl-viewer produced\non that minor version will have to use at least that minor version for the javascript.\n\n## Producing an ixbrl-viewer via the Arelle GUI\n\n### Preparing an iXBRL file via the GUI\n\n1. Open Arelle and select **Manage Plugins** from the **Help** menu.\n2. Press **Browse** under \"Find plug-in modules\".\n3. Browse to the **iXBRLViewerPlugin** directory within your checkout of the iXBRL Viewer git repository and select\n   the **\\_\\_init\\_\\_.py** file within it.\n4. Press **Close** and then **Yes** when prompted to restart Arelle.\n5. You should now have a **Save iXBRL Viewer instance** on the **Tools** menu.\n6. Open the ixbrl filing zip in Arelle\n7. Select **Save iXBRL Viewer instance** option on the **Tools** menu\n8. Provide a **script URL** to the **ixbrlviewer.js** file.\n\n   This url can be one of the following:\n\n   1. `https://cdn-prod.wdesk.com/ixbrl-viewer/<version tag>/ixbrlviewer.js`\n   2. A relative url to the downloaded ixviewer.js from github\n   3. A relative url to the locally built ixviewer.js\n\n9. Save the viewer iXBRL file to a new file in the newly created directory by\n   selecting **Browse**, browsing to the directory, and providing a file name.\n\n10. You should now be able to open the created file in Chrome, and the iXBRL viewer\n    should load.\n\n### Preparing an iXBRL document set using the Arelle GUI\n\nTo prepare an iXBRL document set, open the document set in Arelle.  The process\nis as for a single file, except that a directory should be selected as the\noutput location, rather than a file.\n\n## Producing an ixbrl-viewer via the Arelle command line\n\n### Preparing an iXBRL file via the command line\n\nThe plugin can also be used on the command line:\n\n```shell\npython3 Arelle/arelleCmdLine.py --plugins=<path to iXBRLViewerPlugin> -f ixbrl-report.html --save-viewer ixbrl-report-viewer.html --viewer-url https://cdn-prod.wdesk.com/ixbrl-viewer/<version tag>/ixbrlviewer.js\n```\n\nNotes:\n\n* \"Arelle/arelleCmdLine.py\" should be the path to your installation of Arelle\n* The plugin path needs to an absolute file path to the ixbrl-viewer plugin\n* The viewer url can be one of the following:\n\n  1. `https://cdn-prod.wdesk.com/ixbrl-viewer/<version tag>/ixbrlviewer.js`\n  2. A relative url to the downloaded ixviewer.js from github\n  3. A relative url to the locally built ixviewer.js\n\n### Preparing an iXBRL document set\n\nThe iXBRL Viewer supports Inline XBRL document sets.  This requires the `inlineXbrlDocumentSet` plugin.\nThe input is specified using JSON in the following form:\n\n```json\n[\n  {\n    \"ixds\": [\n      { \"file\": \"file1.html\" },\n      { \"file\": \"file2.html\" },\n    ]\n  }\n]\n```\n\nThe output must be specified as a directory.  For example:\n\n```shell\npython3 Arelle/arelleCmdLine.py --plugins '/path/to/iXBRLViewerPlugin|inlineXbrlDocumentSet' -f '[{\"ixds\":[{\"file\":\"document1.html\"},{\"file\":\"document2.html\"}]}]'  --save-viewer out-dir --viewer-url https://cdn-prod.wdesk.com/ixbrl-viewer/<version tag>/ixbrlviewer.js\n```\n\nNotes:\n\n* The first file specified is the \"primary\" file, and should be opened in a\n  browser to use the viewer.  The other files will be loaded in separate tabs\n  within the viewer.\n* \"Arelle/arelleCmdLine.py\" should be the path to your installation of Arelle\n* The plugin path needs to an absolute file path to the ixbrl-viewer plugin\n* The viewer url can be one of the following:\n\n  1. `https://cdn-prod.wdesk.com/ixbrl-viewer/<version tag>/ixbrlviewer.js`\n  2. A relative url to the downloaded ixviewer.js from github\n  3. A relative url to the locally built ixviewer.js\n\n### Using build-viewer.py\n\nAs an alternative to the standard Arelle command line, the\n`samples/build-viewer.py` script can also be used.  To use the script, both the\nArelle source code and the iXBRLViewerPlugin must be on the Python path. e.g.:\n\n```shell\nPYTHONPATH=/path/to/Arelle:/path/to/ixbrl-viewer ./samples/build-viewer.py --help\n```\n\nA document set can be processed by passing a directory as input.  All `.html`\nand `.xhtml` in the directory will be combined into a document set.  The\ngenerated files will be saved into the directory specified by the `--out`\noption.  \n\nTaxonomy packages can be specified using `--package-dir`.  All ZIP files in the\nspecified directories will be loaded as taxonomy packages.\n\ne.g.\n\n```shell\nPYTHONPATH=/path/to/Arelle:/path/to/ixbrl-viewer ./samples/build-viewer.py --out out-dir --package-dir /my/packages/ ixds-dir\n```\n\n## Running tests\n\n### Running unit tests\n\nIn order to run the javascript unit tests make sure that you have installed all of the npm requirements.\n\nRun the following command to run javascript unit tests: `npm run test`\n\nIn order to run the python unit tests make sure that you have pip installed requirements-dev.txt.\n\nRun the following command to run python unit tests: `nose2`\n\n### Running Puppeteer tests\n\nAll commands should be run from repository root\n\n1. Install the npm requirements(instructions under [Building the javascript locally](#building-the-javascript-locally)).\n2. Install Arelle\n\n    ```shell\n    pip install arelle-release .\n    ```\n\n3. [Terminal 1] Start the puppeteer serve\n\n    ```shell\n    npm run puppeteerServe \n    ```\n\n    * This command generates the `ixbrlviewer.js`, uses Arelle to generate several test files, then serves the files via a nodejs http-server.\n    * Currently changes to application code require restarting this step to take effect.\n4. Start the puppeteer tests\n    * [Terminal 2]:\n\n       ```shell\n       npm run test:puppeteer\n       ```\n\n    * IDE:\n      * Many of the IDE's on the market can run tests via the UI.  The following is an example configuration for intellij.  Once set you can right-click on the test name or file and select the run option.\n      ![ixbrl-viewer](tests/puppeteer/puppeteer_test_run_via_intellij.jpg)\n      * Debug runs with breakpoints are also typically supported.\n","readmeFilename":"README.md"}