ixbrl-viewer 1.4.20__py3-none-any.whl → 1.4.49__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.
- iXBRLViewerPlugin/__init__.py +77 -49
- iXBRLViewerPlugin/_version.py +2 -2
- iXBRLViewerPlugin/constants.py +86 -1
- iXBRLViewerPlugin/featureConfig.py +4 -1
- iXBRLViewerPlugin/iXBRLViewer.py +202 -131
- iXBRLViewerPlugin/plugin.py +7 -0
- iXBRLViewerPlugin/viewer/dist/ixbrlviewer.js +1 -1
- iXBRLViewerPlugin/viewer/dist/ixbrlviewer.js.LICENSE.txt +9 -2
- iXBRLViewerPlugin/viewer/i18next-parser.config.js +1 -1
- iXBRLViewerPlugin/viewer/src/data/utr.json +1 -0
- iXBRLViewerPlugin/viewer/src/html/fact-details.html +69 -38
- iXBRLViewerPlugin/viewer/src/html/footer-logo.html +4 -0
- iXBRLViewerPlugin/viewer/src/html/footnote-details.html +1 -1
- iXBRLViewerPlugin/viewer/src/html/inspector.html +324 -211
- iXBRLViewerPlugin/viewer/src/i18n/cy/balancetypes.json +1 -0
- iXBRLViewerPlugin/viewer/src/i18n/cy/currencies.json +13 -0
- iXBRLViewerPlugin/viewer/src/i18n/cy/datatypes.json +9 -0
- iXBRLViewerPlugin/viewer/src/i18n/cy/labelroles.json +24 -0
- iXBRLViewerPlugin/viewer/src/i18n/cy/referenceparts.json +10 -0
- iXBRLViewerPlugin/viewer/src/i18n/cy/scale.json +16 -0
- iXBRLViewerPlugin/viewer/src/i18n/cy/tooltips.json +17 -0
- iXBRLViewerPlugin/viewer/src/i18n/cy/translation.json +179 -0
- iXBRLViewerPlugin/viewer/src/i18n/en/balancetypes.json +4 -0
- iXBRLViewerPlugin/viewer/src/i18n/en/datatypes.json +10 -0
- iXBRLViewerPlugin/viewer/src/i18n/en/labelroles.json +4 -0
- iXBRLViewerPlugin/viewer/src/i18n/en/scale.json +16 -0
- iXBRLViewerPlugin/viewer/src/i18n/en/tooltips.json +17 -0
- iXBRLViewerPlugin/viewer/src/i18n/en/translation.json +56 -24
- iXBRLViewerPlugin/viewer/src/i18n/es/balancetypes.json +4 -0
- iXBRLViewerPlugin/viewer/src/i18n/es/datatypes.json +10 -0
- iXBRLViewerPlugin/viewer/src/i18n/es/labelroles.json +24 -0
- iXBRLViewerPlugin/viewer/src/i18n/es/scale.json +16 -0
- iXBRLViewerPlugin/viewer/src/i18n/es/tooltips.json +17 -0
- iXBRLViewerPlugin/viewer/src/i18n/es/translation.json +70 -37
- iXBRLViewerPlugin/viewer/src/icons/dark-mode.svg +4 -0
- iXBRLViewerPlugin/viewer/src/img/arelle-dark.svg +179 -0
- iXBRLViewerPlugin/viewer/src/img/inline-viewer-dark.svg +59 -0
- iXBRLViewerPlugin/viewer/src/js/accordian.js +3 -2
- iXBRLViewerPlugin/viewer/src/js/aspect.js +18 -10
- iXBRLViewerPlugin/viewer/src/js/aspect.test.js +2 -2
- iXBRLViewerPlugin/viewer/src/js/balance.js +14 -0
- iXBRLViewerPlugin/viewer/src/js/calculation.js +45 -34
- iXBRLViewerPlugin/viewer/src/js/calculationInspector.js +4 -7
- iXBRLViewerPlugin/viewer/src/js/chart.js +23 -21
- iXBRLViewerPlugin/viewer/src/js/concept.js +27 -2
- iXBRLViewerPlugin/viewer/src/js/concept.test.js +23 -2
- iXBRLViewerPlugin/viewer/src/js/datatype.js +20 -0
- iXBRLViewerPlugin/viewer/src/js/datatype.test.js +62 -0
- iXBRLViewerPlugin/viewer/src/js/dialog.js +6 -4
- iXBRLViewerPlugin/viewer/src/js/fact.js +41 -8
- iXBRLViewerPlugin/viewer/src/js/fact.test.js +47 -13
- iXBRLViewerPlugin/viewer/src/js/index.js +11 -3
- iXBRLViewerPlugin/viewer/src/js/inspector.js +560 -160
- iXBRLViewerPlugin/viewer/src/js/inspector.test.js +1 -2
- iXBRLViewerPlugin/viewer/src/js/ixbrlviewer.js +129 -31
- iXBRLViewerPlugin/viewer/src/js/ixbrlviewer.test.js +133 -20
- iXBRLViewerPlugin/viewer/src/js/ixnode.js +1 -1
- iXBRLViewerPlugin/viewer/src/js/menu.js +25 -7
- iXBRLViewerPlugin/viewer/src/js/number-matcher.js +2 -2
- iXBRLViewerPlugin/viewer/src/js/outline.js +2 -4
- iXBRLViewerPlugin/viewer/src/js/period.js +0 -1
- iXBRLViewerPlugin/viewer/src/js/report.js +68 -13
- iXBRLViewerPlugin/viewer/src/js/report.test.js +77 -6
- iXBRLViewerPlugin/viewer/src/js/reportset.js +33 -3
- iXBRLViewerPlugin/viewer/src/js/reportset.test.js +32 -6
- iXBRLViewerPlugin/viewer/src/js/search.js +61 -35
- iXBRLViewerPlugin/viewer/src/js/search.test.js +8 -5
- iXBRLViewerPlugin/viewer/src/js/summary.js +22 -0
- iXBRLViewerPlugin/viewer/src/js/summary.test.js +50 -13
- iXBRLViewerPlugin/viewer/src/js/tableExport.js +3 -3
- iXBRLViewerPlugin/viewer/src/js/taxonomynamer.js +34 -0
- iXBRLViewerPlugin/viewer/src/js/taxonomynamer.test.js +32 -0
- iXBRLViewerPlugin/viewer/src/js/theme.js +49 -0
- iXBRLViewerPlugin/viewer/src/js/unit.js +73 -2
- iXBRLViewerPlugin/viewer/src/js/unit.test.js +14 -3
- iXBRLViewerPlugin/viewer/src/js/util.js +21 -18
- iXBRLViewerPlugin/viewer/src/js/util.test.js +1 -0
- iXBRLViewerPlugin/viewer/src/js/utr.js +27 -0
- iXBRLViewerPlugin/viewer/src/js/viewer.js +40 -29
- iXBRLViewerPlugin/viewer/src/js/viewerOptions.js +0 -2
- iXBRLViewerPlugin/viewer/src/less/accordian.less +8 -4
- iXBRLViewerPlugin/viewer/src/less/block-list.less +12 -6
- iXBRLViewerPlugin/viewer/src/less/calculation-inspector.less +2 -2
- iXBRLViewerPlugin/viewer/src/less/chart.less +8 -5
- iXBRLViewerPlugin/viewer/src/less/colours-dark-mode.less +40 -0
- iXBRLViewerPlugin/viewer/src/less/colours.less +28 -21
- iXBRLViewerPlugin/viewer/src/less/common.less +1 -1
- iXBRLViewerPlugin/viewer/src/less/components.less +3 -3
- iXBRLViewerPlugin/viewer/src/less/core.less +2 -0
- iXBRLViewerPlugin/viewer/src/less/dialog.less +13 -10
- iXBRLViewerPlugin/viewer/src/less/form-controls.less +33 -11
- iXBRLViewerPlugin/viewer/src/less/inspector.less +556 -300
- iXBRLViewerPlugin/viewer/src/less/loader.less +2 -2
- iXBRLViewerPlugin/viewer/src/less/menu.less +33 -15
- iXBRLViewerPlugin/viewer/src/less/summary.less +16 -6
- iXBRLViewerPlugin/viewer/src/less/tabs.less +5 -5
- iXBRLViewerPlugin/viewer/src/less/text-mixins.less +2 -1
- iXBRLViewerPlugin/viewer/src/less/validation-report.less +1 -1
- iXBRLViewerPlugin/viewer/src/less/viewer.less +30 -18
- iXBRLViewerPlugin/viewer/webpack.common.js +19 -9
- {ixbrl_viewer-1.4.20.dist-info → ixbrl_viewer-1.4.49.dist-info}/METADATA +41 -14
- ixbrl_viewer-1.4.49.dist-info/RECORD +197 -0
- {ixbrl_viewer-1.4.20.dist-info → ixbrl_viewer-1.4.49.dist-info}/WHEEL +1 -1
- tests/puppeteer/framework/page_objects/doc_frame.js +3 -3
- tests/puppeteer/framework/page_objects/fact_details_panel.js +28 -0
- tests/puppeteer/puppeteer_test_run_via_intellij.jpg +0 -0
- tests/puppeteer/tests/fact_properties.test.js +10 -4
- tests/unit_tests/iXBRLViewerPlugin/test_iXBRLViewer.py +117 -51
- iXBRLViewerPlugin/viewer/src/js/interact.min.js +0 -6
- ixbrl_viewer-1.4.20.dist-info/RECORD +0 -166
- {ixbrl_viewer-1.4.20.dist-info → ixbrl_viewer-1.4.49.dist-info}/LICENSE +0 -0
- {ixbrl_viewer-1.4.20.dist-info → ixbrl_viewer-1.4.49.dist-info}/NOTICE +0 -0
- {ixbrl_viewer-1.4.20.dist-info → ixbrl_viewer-1.4.49.dist-info}/entry_points.txt +0 -0
- {ixbrl_viewer-1.4.20.dist-info → ixbrl_viewer-1.4.49.dist-info}/top_level.txt +0 -0
iXBRLViewerPlugin/__init__.py
CHANGED
|
@@ -10,6 +10,7 @@ import tempfile
|
|
|
10
10
|
import traceback
|
|
11
11
|
from optparse import OptionGroup, OptionParser
|
|
12
12
|
from pathlib import Path
|
|
13
|
+
from typing import Any
|
|
13
14
|
|
|
14
15
|
from arelle import Cntlr
|
|
15
16
|
from arelle.LocalViewer import LocalViewer
|
|
@@ -21,7 +22,10 @@ from .constants import CONFIG_COPY_SCRIPT, CONFIG_FEATURE_PREFIX, CONFIG_LAUNCH_
|
|
|
21
22
|
CONFIG_SCRIPT_URL, DEFAULT_COPY_SCRIPT, DEFAULT_LAUNCH_ON_LOAD, DEFAULT_OUTPUT_NAME, \
|
|
22
23
|
DEFAULT_JS_FILENAME, DEFAULT_VIEWER_PATH, ERROR_MESSAGE_CODE, \
|
|
23
24
|
EXCEPTION_MESSAGE_CODE, FEATURE_CONFIGS
|
|
24
|
-
from .iXBRLViewer import IXBRLViewerBuilder, IXBRLViewerBuilderError
|
|
25
|
+
from .iXBRLViewer import IXBRLViewerBuilder, IXBRLViewerBuilderError, isInlineDoc
|
|
26
|
+
from .plugin import IXBRLViewerPluginData
|
|
27
|
+
|
|
28
|
+
PLUGIN_NAME = 'ixbrl-viewer'
|
|
25
29
|
|
|
26
30
|
#
|
|
27
31
|
# GUI operation:
|
|
@@ -94,26 +98,45 @@ def iXBRLViewerCommandLineOptionExtender(parser, *args, **kwargs):
|
|
|
94
98
|
dest="zipViewerOutput",
|
|
95
99
|
help="Converts the viewer output into a self contained zip")
|
|
96
100
|
|
|
97
|
-
# Force "keepOpen" to true, so that all models are retained. Needed for
|
|
98
|
-
# multi-instance viewers.
|
|
99
|
-
parser.set_defaults(keepOpen = True)
|
|
100
|
-
|
|
101
101
|
featureGroup = OptionGroup(parser, "Viewer Features",
|
|
102
102
|
"See viewer README for information on enabling/disabling features.")
|
|
103
103
|
for featureConfig in FEATURE_CONFIGS:
|
|
104
|
-
arg = f'--viewer-feature-{featureConfig.key}'
|
|
105
|
-
featureGroup.add_option(
|
|
104
|
+
arg = f'--viewer-feature-{featureConfig.key}'.replace('_', '-')
|
|
105
|
+
featureGroup.add_option(
|
|
106
|
+
arg,
|
|
107
|
+
arg.lower(),
|
|
108
|
+
action=featureConfig.cliAction,
|
|
109
|
+
default=featureConfig.cliDefault,
|
|
110
|
+
help=featureConfig.description
|
|
111
|
+
)
|
|
106
112
|
parser.add_option_group(featureGroup)
|
|
107
113
|
|
|
114
|
+
def pluginData(cntlr: Cntlr):
|
|
115
|
+
pluginData = cntlr.getPluginData(PLUGIN_NAME)
|
|
116
|
+
if pluginData is None:
|
|
117
|
+
pluginData = IXBRLViewerPluginData(PLUGIN_NAME)
|
|
118
|
+
cntlr.setPluginData(pluginData)
|
|
119
|
+
return pluginData
|
|
120
|
+
|
|
121
|
+
def resetPluginData(cntlr: Cntlr):
|
|
122
|
+
pluginData(cntlr).builder = None
|
|
123
|
+
|
|
124
|
+
def processModel(cntlr: Cntlr, modelXbrl: ModelXbrl):
|
|
125
|
+
try:
|
|
126
|
+
if isInlineDoc(modelXbrl.modelDocument):
|
|
127
|
+
pluginData(cntlr).builder.processModel(modelXbrl)
|
|
128
|
+
except IXBRLViewerBuilderError as ex:
|
|
129
|
+
print(ex)
|
|
130
|
+
except Exception as ex:
|
|
131
|
+
tb = traceback.format_tb(sys.exc_info()[2])
|
|
132
|
+
cntlr.addToLog(f"Exception {ex} \nTraceback {tb}", messageCode=EXCEPTION_MESSAGE_CODE)
|
|
108
133
|
|
|
109
134
|
def generateViewer(
|
|
110
135
|
cntlr: Cntlr,
|
|
111
136
|
saveViewerDest: io.BytesIO | str | None,
|
|
112
|
-
viewerURL: str =
|
|
137
|
+
viewerURL: str | None = None,
|
|
113
138
|
showValidationMessages: bool = False,
|
|
114
|
-
useStubViewer: bool = False,
|
|
115
139
|
zipViewerOutput: bool = False,
|
|
116
|
-
features: list[str] | None = None,
|
|
117
140
|
packageDownloadURL: str | None = None,
|
|
118
141
|
copyScript: bool = True,
|
|
119
142
|
) -> None:
|
|
@@ -126,7 +149,6 @@ def generateViewer(
|
|
|
126
149
|
:param showValidationMessages: True if validation messages should be shown in the viewer.
|
|
127
150
|
:param useStubViewer: True if the stub viewer should be used.
|
|
128
151
|
:param zipViewerOutput: True if the destination is a zip archive.
|
|
129
|
-
:param features: Optional list of features to enable.
|
|
130
152
|
:param packageDownloadURL: Optional URL to use as the report package download URL.
|
|
131
153
|
: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.
|
|
132
154
|
"""
|
|
@@ -136,17 +158,12 @@ def generateViewer(
|
|
|
136
158
|
cntlr.addToLog(f"iXBRL Viewer destination not provided. {abortGenerationMsg}", messageCode=EXCEPTION_MESSAGE_CODE)
|
|
137
159
|
return
|
|
138
160
|
|
|
139
|
-
|
|
140
|
-
cntlr.addToLog(f"iXBRL Viewer script not provided. {abortGenerationMsg}", messageCode=EXCEPTION_MESSAGE_CODE)
|
|
141
|
-
return
|
|
161
|
+
viewerURL = viewerURL or DEFAULT_VIEWER_PATH
|
|
142
162
|
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
cntlr.addToLog(f"No
|
|
147
|
-
return
|
|
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)
|
|
163
|
+
bldr = pluginData(cntlr).builder
|
|
164
|
+
|
|
165
|
+
if bldr.reportCount == 0:
|
|
166
|
+
cntlr.addToLog(f"No inline XBRL documents loaded. {abortGenerationMsg}", messageCode=ERROR_MESSAGE_CODE)
|
|
150
167
|
return
|
|
151
168
|
|
|
152
169
|
copyScriptPath = None
|
|
@@ -173,11 +190,7 @@ def generateViewer(
|
|
|
173
190
|
return
|
|
174
191
|
|
|
175
192
|
try:
|
|
176
|
-
|
|
177
|
-
if features:
|
|
178
|
-
for feature in features:
|
|
179
|
-
viewerBuilder.enableFeature(feature)
|
|
180
|
-
iv = viewerBuilder.createViewer(scriptUrl=viewerURL, showValidations=showValidationMessages, useStubViewer=useStubViewer, packageDownloadURL=packageDownloadURL)
|
|
193
|
+
iv = bldr.createViewer(scriptUrl=viewerURL, showValidations=showValidationMessages, packageDownloadURL=packageDownloadURL)
|
|
181
194
|
if iv is not None:
|
|
182
195
|
iv.save(saveViewerDest, zipOutput=zipViewerOutput, copyScriptPath=copyScriptPath)
|
|
183
196
|
except IXBRLViewerBuilderError as ex:
|
|
@@ -185,26 +198,34 @@ def generateViewer(
|
|
|
185
198
|
except Exception as ex:
|
|
186
199
|
tb = traceback.format_tb(sys.exc_info()[2])
|
|
187
200
|
cntlr.addToLog(f"Exception {ex} \nTraceback {tb}", messageCode=EXCEPTION_MESSAGE_CODE)
|
|
201
|
+
resetPluginData(cntlr)
|
|
188
202
|
|
|
189
203
|
|
|
190
|
-
def getFeaturesFromOptions(options: argparse.Namespace | OptionParser):
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
204
|
+
def getFeaturesFromOptions(options: argparse.Namespace | OptionParser) -> dict[str, Any]:
|
|
205
|
+
features = {}
|
|
206
|
+
for featureConfig in FEATURE_CONFIGS:
|
|
207
|
+
key = featureConfig.key
|
|
208
|
+
option = f'viewer_feature_{key}'
|
|
209
|
+
value = getattr(options, option, None)
|
|
210
|
+
if value is not None:
|
|
211
|
+
features[key] = value
|
|
212
|
+
return features
|
|
213
|
+
|
|
196
214
|
|
|
215
|
+
def iXBRLViewerCommandLineXbrlRun(cntlr, options, modelXbrl, *args, **kwargs):
|
|
216
|
+
pd = pluginData(cntlr)
|
|
217
|
+
if pd.builder is None:
|
|
218
|
+
pd.builder = IXBRLViewerBuilder(cntlr, useStubViewer = options.useStubViewer, features=getFeaturesFromOptions(options))
|
|
219
|
+
processModel(cntlr, modelXbrl)
|
|
197
220
|
|
|
198
|
-
def
|
|
221
|
+
def iXBRLViewerCommandLineFilingEnd(cntlr, options, *args, **kwargs):
|
|
199
222
|
generateViewer(
|
|
200
223
|
cntlr=cntlr,
|
|
201
224
|
saveViewerDest=options.saveViewerDest or kwargs.get("responseZipStream"),
|
|
202
225
|
viewerURL=options.viewerURL,
|
|
203
226
|
copyScript=not options.viewerNoCopyScript,
|
|
204
227
|
showValidationMessages=options.validationMessages,
|
|
205
|
-
useStubViewer=options.useStubViewer,
|
|
206
228
|
zipViewerOutput=options.zipViewerOutput,
|
|
207
|
-
features=getFeaturesFromOptions(options),
|
|
208
229
|
packageDownloadURL=options.packageDownloadURL,
|
|
209
230
|
)
|
|
210
231
|
|
|
@@ -220,14 +241,19 @@ def iXBRLViewerSaveCommand(cntlr):
|
|
|
220
241
|
return
|
|
221
242
|
dialog = SaveViewerDialog(cntlr)
|
|
222
243
|
dialog.render()
|
|
244
|
+
features = {
|
|
245
|
+
feature: True
|
|
246
|
+
for feature in dialog.features()
|
|
247
|
+
}
|
|
248
|
+
pluginData(cntlr).builder = IXBRLViewerBuilder(cntlr, features=features)
|
|
249
|
+
processModel(cntlr, modelXbrl)
|
|
223
250
|
if dialog.accepted and dialog.filename():
|
|
224
251
|
generateViewer(
|
|
225
252
|
cntlr=cntlr,
|
|
226
253
|
saveViewerDest=dialog.filename(),
|
|
227
|
-
viewerURL=dialog.scriptUrl()
|
|
254
|
+
viewerURL=dialog.scriptUrl(),
|
|
228
255
|
copyScript=dialog.copyScript(),
|
|
229
256
|
zipViewerOutput=dialog.zipViewerOutput(),
|
|
230
|
-
features=dialog.features(),
|
|
231
257
|
)
|
|
232
258
|
|
|
233
259
|
|
|
@@ -261,9 +287,11 @@ def commandLineOptionExtender(*args, **kwargs):
|
|
|
261
287
|
iXBRLViewerCommandLineOptionExtender(*args, **kwargs)
|
|
262
288
|
|
|
263
289
|
|
|
264
|
-
def commandLineRun(*args, **kwargs):
|
|
265
|
-
iXBRLViewerCommandLineXbrlRun(*args, **kwargs)
|
|
290
|
+
def commandLineRun(cntlr, options, modelXbrl, *args, **kwargs):
|
|
291
|
+
iXBRLViewerCommandLineXbrlRun(cntlr, options, modelXbrl, *args, **kwargs)
|
|
266
292
|
|
|
293
|
+
def commandLineFilingEnd(*args, **kwargs):
|
|
294
|
+
iXBRLViewerCommandLineFilingEnd(*args, **kwargs)
|
|
267
295
|
|
|
268
296
|
class iXBRLViewerLocalViewer(LocalViewer):
|
|
269
297
|
# plugin-specific local file handler
|
|
@@ -297,18 +325,17 @@ def guiRun(cntlr, modelXbrl, attach, *args, **kwargs):
|
|
|
297
325
|
global tempViewer
|
|
298
326
|
tempViewer = tempfile.TemporaryDirectory()
|
|
299
327
|
viewer_file_name = DEFAULT_OUTPUT_NAME
|
|
300
|
-
features =
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
328
|
+
features = {}
|
|
329
|
+
for featureConfig in FEATURE_CONFIGS:
|
|
330
|
+
if cntlr.config.setdefault(f'{CONFIG_FEATURE_PREFIX}{featureConfig.key}', False):
|
|
331
|
+
features[featureConfig.key] = True
|
|
332
|
+
pluginData(cntlr).builder = IXBRLViewerBuilder(cntlr, useStubViewer=True, features=features)
|
|
333
|
+
processModel(cntlr, modelXbrl)
|
|
305
334
|
generateViewer(
|
|
306
335
|
cntlr=cntlr,
|
|
307
336
|
saveViewerDest=tempViewer.name,
|
|
308
|
-
viewerURL=cntlr.config.get(CONFIG_SCRIPT_URL)
|
|
337
|
+
viewerURL=cntlr.config.get(CONFIG_SCRIPT_URL),
|
|
309
338
|
copyScript=cntlr.config.get(CONFIG_COPY_SCRIPT, DEFAULT_COPY_SCRIPT),
|
|
310
|
-
useStubViewer=True,
|
|
311
|
-
features=features,
|
|
312
339
|
)
|
|
313
340
|
if Path(tempViewer.name, viewer_file_name).exists():
|
|
314
341
|
localViewer = iXBRLViewerLocalViewer("iXBRL Viewer", os.path.dirname(__file__))
|
|
@@ -327,7 +354,7 @@ def load_plugin_url():
|
|
|
327
354
|
|
|
328
355
|
|
|
329
356
|
__pluginInfo__ = {
|
|
330
|
-
'name':
|
|
357
|
+
'name': PLUGIN_NAME,
|
|
331
358
|
'aliases': [
|
|
332
359
|
'iXBRLViewerPlugin',
|
|
333
360
|
],
|
|
@@ -337,7 +364,8 @@ __pluginInfo__ = {
|
|
|
337
364
|
'author': 'Paul Warren',
|
|
338
365
|
'copyright': 'Copyright :: Workiva Inc. :: 2019',
|
|
339
366
|
'CntlrCmdLine.Options': commandLineOptionExtender,
|
|
340
|
-
'CntlrCmdLine.
|
|
367
|
+
'CntlrCmdLine.Xbrl.Run': commandLineRun,
|
|
368
|
+
'CntlrCmdLine.Filing.End': commandLineFilingEnd,
|
|
341
369
|
'CntlrWinMain.Menu.Tools': toolsMenuExtender,
|
|
342
370
|
'CntlrWinMain.Xbrl.Loaded': guiRun,
|
|
343
371
|
}
|
iXBRLViewerPlugin/_version.py
CHANGED
iXBRLViewerPlugin/constants.py
CHANGED
|
@@ -23,13 +23,98 @@ DEFAULT_JS_FILENAME = 'ixbrlviewer.js'
|
|
|
23
23
|
DEFAULT_VIEWER_PATH = os.path.join(os.path.dirname(__file__), "viewer", "dist", DEFAULT_JS_FILENAME)
|
|
24
24
|
|
|
25
25
|
FEATURE_CONFIGS = [
|
|
26
|
+
FeatureConfig(
|
|
27
|
+
key='home_link_label',
|
|
28
|
+
label='Home Link (Label)',
|
|
29
|
+
description='Customizes the label of the "Home" link enabled by "home_link_url".',
|
|
30
|
+
cliAction='store',
|
|
31
|
+
cliDefault=None,
|
|
32
|
+
guiVisible=False,
|
|
33
|
+
guiDefault=None,
|
|
34
|
+
),
|
|
35
|
+
FeatureConfig(
|
|
36
|
+
key='home_link_url',
|
|
37
|
+
label='Home Link (URL)',
|
|
38
|
+
description='Adds a "Home" link that directs to the specified URL. Label can be customized with "home_link_label".',
|
|
39
|
+
cliAction='store',
|
|
40
|
+
cliDefault=None,
|
|
41
|
+
guiVisible=False,
|
|
42
|
+
guiDefault=None,
|
|
43
|
+
),
|
|
44
|
+
FeatureConfig(
|
|
45
|
+
key='support_link',
|
|
46
|
+
label='Support Link',
|
|
47
|
+
description='Adds a "Support" link that directs to the specified URL.',
|
|
48
|
+
cliAction='store',
|
|
49
|
+
cliDefault=None,
|
|
50
|
+
guiVisible=False,
|
|
51
|
+
guiDefault=None,
|
|
52
|
+
),
|
|
53
|
+
FeatureConfig(
|
|
54
|
+
key='survey_link',
|
|
55
|
+
label='Survey Link',
|
|
56
|
+
description='Adds a "Survey" link that directs to the specified URL.',
|
|
57
|
+
cliAction='store',
|
|
58
|
+
cliDefault=None,
|
|
59
|
+
guiVisible=False,
|
|
60
|
+
guiDefault=None,
|
|
61
|
+
),
|
|
26
62
|
FeatureConfig(
|
|
27
63
|
key='review',
|
|
28
64
|
label='Review Mode',
|
|
29
65
|
description='Enables highlighting of untagged numbers and dates.',
|
|
66
|
+
cliAction='store_true',
|
|
67
|
+
cliDefault=False,
|
|
68
|
+
guiVisible=True,
|
|
69
|
+
guiDefault=False
|
|
70
|
+
),
|
|
71
|
+
FeatureConfig(
|
|
72
|
+
key='mandatory_facts',
|
|
73
|
+
label='Mandatory Facts',
|
|
74
|
+
description='Enables the display of mandatory facts for the selected taxonomy.',
|
|
75
|
+
cliAction='store',
|
|
76
|
+
cliDefault=None,
|
|
77
|
+
guiVisible=False,
|
|
78
|
+
guiDefault=None
|
|
79
|
+
),
|
|
80
|
+
FeatureConfig(
|
|
81
|
+
key='search_on_startup',
|
|
82
|
+
label='Search on startup',
|
|
83
|
+
description='Show the search pane by default on startup.',
|
|
84
|
+
cliAction='store_true',
|
|
85
|
+
cliDefault=None,
|
|
86
|
+
guiVisible=True,
|
|
87
|
+
guiDefault=False
|
|
88
|
+
),
|
|
89
|
+
FeatureConfig(
|
|
90
|
+
key='highlight_facts_on_startup',
|
|
91
|
+
label='Highlight facts on startup',
|
|
92
|
+
description='Default "Highlight all facts" to on.',
|
|
93
|
+
cliAction='store_true',
|
|
94
|
+
cliDefault=None,
|
|
30
95
|
guiVisible=True,
|
|
31
96
|
guiDefault=False
|
|
32
97
|
)
|
|
33
98
|
]
|
|
34
|
-
|
|
35
99
|
GUI_FEATURE_CONFIGS = [c for c in FEATURE_CONFIGS if c.guiVisible]
|
|
100
|
+
|
|
101
|
+
MANDATORY_FACTS = {
|
|
102
|
+
"companies-house": [
|
|
103
|
+
"UKCompaniesHouseRegisteredNumber",
|
|
104
|
+
"EntityCurrentLegalOrRegisteredName",
|
|
105
|
+
"BalanceSheetDate",
|
|
106
|
+
"DateAuthorisationFinancialStatementsForIssue",
|
|
107
|
+
"DirectorSigningFinancialStatements",
|
|
108
|
+
"EntityDormantTruefalse",
|
|
109
|
+
"EntityTradingStatus",
|
|
110
|
+
"AccountsStatusAuditedOrUnaudited",
|
|
111
|
+
"AccountsTypeFullOrAbbreviated",
|
|
112
|
+
"AccountingStandardsApplied",
|
|
113
|
+
"LegalFormEntity",
|
|
114
|
+
"StartDateForPeriodCoveredByReport",
|
|
115
|
+
"EndDateForPeriodCoveredByReport",
|
|
116
|
+
"CharityRegistrationNumberEnglandWales",
|
|
117
|
+
"CharityRegistrationNumberScotland",
|
|
118
|
+
"CharityRegistrationNumberNorthernIreland"
|
|
119
|
+
]
|
|
120
|
+
}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
from dataclasses import dataclass
|
|
2
|
+
from typing import Any
|
|
2
3
|
|
|
3
4
|
|
|
4
5
|
@dataclass(frozen=True, repr=False, eq=False)
|
|
@@ -6,5 +7,7 @@ class FeatureConfig:
|
|
|
6
7
|
key: str
|
|
7
8
|
label: str
|
|
8
9
|
description: str
|
|
10
|
+
cliAction: str
|
|
11
|
+
cliDefault: Any
|
|
9
12
|
guiVisible: bool
|
|
10
|
-
guiDefault:
|
|
13
|
+
guiDefault: Any
|