@3cr/viewer-browser 0.0.161 → 0.0.194
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.
- package/.circleci/config.yml +53 -0
- package/__tests__/index.spec.ts +31 -24
- package/components.d.ts +32 -0
- package/dist/Viewer3CR.js +44 -27
- package/dist/Viewer3CR.mjs +22734 -17747
- package/dist/Viewer3CR.umd.js +44 -27
- package/index.html +6 -8
- package/index.ts +9 -5
- package/package.json +5 -2
- package/playground/index.html +7 -10
- package/src/App.vue +12 -4
- package/src/__tests__/app.spec.ts +2 -13
- package/src/assets/magic_wand.svg +24 -0
- package/src/components/WebGL3DR.vue +53 -92
- package/src/components/__tests__/webgl3dr.spec.ts +29 -48
- package/src/{demo → components/demo}/DemoModal.vue +1 -1
- package/src/{demo → components/demo}/DemoPatientModal.vue +4 -1
- package/src/components/demo/__tests__/DemoModal.spec.ts +25 -0
- package/src/components/demo/__tests__/DemoPatientModal.spec.ts +37 -0
- package/src/components/demo/__tests__/options.spec.ts +25 -0
- package/src/components/demo/licence/DemoLicenceEnableCloudStorageModal.vue +64 -0
- package/src/{demo → components/demo}/licence/DemoLicenceInfoModal.vue +5 -4
- package/src/{demo → components/demo}/licence/DemoLicenceSendToPartyModal.vue +6 -4
- package/src/{demo → components/demo}/licence/DemoLicenceShareToMobileModal.vue +8 -6
- package/src/components/demo/licence/__tests__/DemoLicenceEnableCloudStorageModal.spec.ts +37 -0
- package/src/components/demo/licence/__tests__/DemoLicenceInfoModal.spec.ts +37 -0
- package/src/components/demo/licence/__tests__/DemoLicenceSendToPartyModal.spec.ts +36 -0
- package/src/components/demo/licence/__tests__/DemoLicenceShareToMobileModal.spec.ts +51 -0
- package/src/{demo → components/demo}/options.ts +18 -20
- package/src/components/demo/patient/DemoPatientEnableCloudStorageModal.vue +64 -0
- package/src/{demo → components/demo}/patient/DemoPatientInfoModal.vue +5 -4
- package/src/{demo → components/demo}/patient/DemoPatientSendToPartyModal.vue +4 -3
- package/src/{demo → components/demo}/patient/DemoPatientShareToMobileModal.vue +8 -6
- package/src/components/demo/patient/__tests__/DemoPatientEnableCloudStorageModal.spec.ts +37 -0
- package/src/components/demo/patient/__tests__/DemoPatientInfoModal.spec.ts +37 -0
- package/src/components/demo/patient/__tests__/DemoPatientSendToPartyModal.spec.ts +36 -0
- package/src/components/demo/patient/__tests__/DemoPatientShareToMobileModal.spec.ts +51 -0
- package/src/components/loading/LoadingSpinner.vue +1 -1
- package/src/components/modal/ActionRail.vue +96 -0
- package/src/components/modal/AskAI.vue +250 -0
- package/src/components/modal/CloseViewerModal.vue +104 -0
- package/src/components/modal/MftpWebGL3DRModal.vue +415 -834
- package/src/components/modal/ViewerActionRail.vue +123 -0
- package/src/components/modal/ViewerAnnotationModal.vue +115 -0
- package/src/components/modal/ViewerAnnotations.vue +283 -0
- package/src/components/modal/ViewerDisplaySettings.vue +102 -0
- package/src/components/modal/ViewerNavigationDrawer.vue +90 -0
- package/src/components/modal/ViewerNavigationDrawerContent.vue +126 -0
- package/src/components/modal/ViewerNavigationDrawerFooter.vue +111 -0
- package/src/components/modal/ViewerNavigationDrawerHeader.vue +63 -0
- package/src/components/modal/__tests__/CloseViewerModal.spec.ts +60 -0
- package/src/components/modal/__tests__/{mftp-webgl-3dr-modal.spec.ts → MftpWebGL3DRModal.spec.ts} +47 -298
- package/src/components/modal/__tests__/ViewerAnnotationModal.spec.ts +79 -0
- package/src/components/modal/__tests__/ViewerDisplaySettings.spec.ts +61 -0
- package/src/components/modal/__tests__/ViewerNavigationDrawer.spec.ts +32 -0
- package/src/components/modal/__tests__/ViewerNavigationDrawerContent.spec.ts +29 -0
- package/src/components/modal/__tests__/ViewerNavigationDrawerFooter.spec.ts +43 -0
- package/src/components/modal/__tests__/ViewerNavigationDrawerHeader.spec.ts +37 -0
- package/src/components/modal/actions/Action.vue +40 -0
- package/src/components/modal/actions/Flip3dAction.vue +79 -0
- package/src/components/modal/actions/FlipHorizontalAction.vue +36 -0
- package/src/components/modal/actions/FlipVerticalAction.vue +36 -0
- package/src/components/modal/actions/FullscreenAction.vue +47 -0
- package/src/components/modal/actions/NavigationCubeAction.vue +33 -0
- package/src/components/modal/actions/PanAction.vue +78 -0
- package/src/components/modal/actions/ResetViewAction.vue +29 -0
- package/src/components/modal/actions/Rotate2dAction.vue +78 -0
- package/src/components/modal/actions/Slice3dAction.vue +71 -0
- package/src/components/modal/actions/ZoomAction.vue +70 -0
- package/src/components/modal/actions/__tests__/Action.spec.ts +29 -0
- package/src/components/modal/actions/__tests__/Flip3dAction.spec.ts +48 -0
- package/src/components/modal/actions/__tests__/FlipHorizontalAction.spec.ts +17 -0
- package/src/components/modal/actions/__tests__/FlipVerticalAction.spec.ts +17 -0
- package/src/components/modal/actions/__tests__/FullscreenAction.spec.ts +28 -0
- package/src/components/modal/actions/__tests__/NavigationCubeAction.spec.ts +25 -0
- package/src/components/modal/actions/__tests__/PanAction.spec.ts +46 -0
- package/src/components/modal/actions/__tests__/ResetViewAction.spec.ts +17 -0
- package/src/components/modal/actions/__tests__/Rotate2dAction.spec.ts +23 -0
- package/src/components/modal/actions/__tests__/Slice3dAction.spec.ts +14 -0
- package/src/components/modal/actions/__tests__/ZoomAction.spec.ts +34 -0
- package/src/components/modal/composables/__tests__/useNavigationCubeObserver.spec.ts +56 -0
- package/src/components/modal/composables/useEventListener.ts +22 -0
- package/src/components/modal/composables/useNavigationCubeObserver.ts +104 -0
- package/src/components/selectors/ValueSelector.vue +30 -33
- package/src/components/selectors/__tests__/value-selector.spec.ts +1 -1
- package/src/components/sliders/DoubleSliderSelector.vue +79 -71
- package/src/components/sliders/VerticalSliderSelector.vue +12 -17
- package/src/components/sliders/__tests__/double-slider-selector.spec.ts +1 -1
- package/src/components/sliders/__tests__/vertical-slider-selector.spec.ts +1 -1
- package/src/dataLayer/__tests__/clamp.spec.ts +16 -0
- package/src/dataLayer/__tests__/eventHandlers.spec.ts +38 -0
- package/src/dataLayer/__tests__/getIconForPreset.spec.ts +40 -0
- package/src/dataLayer/__tests__/patchDataOverlay.spec.ts +88 -0
- package/src/dataLayer/__tests__/scanState.spec.ts +93 -0
- package/src/dataLayer/__tests__/useViewer3cr.spec.ts +10 -0
- package/src/dataLayer/__tests__/viewer3cr.spec.ts +331 -0
- package/src/dataLayer/clamp.ts +9 -0
- package/src/dataLayer/eventHandlers.ts +26 -0
- package/src/dataLayer/patchDataOverlay.ts +101 -0
- package/src/dataLayer/scanState.ts +105 -26
- package/src/dataLayer/useViewer3cr.ts +7 -0
- package/src/dataLayer/viewer3cr.ts +410 -0
- package/src/helpers/__tests__/layout-overlay-style.spec.ts +24 -22
- package/src/helpers/__tests__/model-helper.spec.ts +44 -13
- package/src/helpers/layoutOverlayStyle.ts +16 -27
- package/src/helpers/modelHelper.ts +62 -10
- package/src/models/Callbacks.ts +2 -2
- package/src/models/LoadViewerOptions.ts +2 -0
- package/src/models/LoadViewerPayload.ts +1 -0
- package/src/notifications/notification.ts +3 -4
- package/src/plugins/vuetify.ts +5 -0
- package/src/services/gpt/__tests__/gpt.service.spec.ts +27 -0
- package/src/services/gpt/gpt.service.ts +27 -0
- package/static/3cr-types-browser/index.ts +74 -0
- package/static/3cr-types-browser/types/Action.ts +6 -0
- package/static/3cr-types-browser/types/ActionData.ts +4 -0
- package/static/3cr-types-browser/types/AlphaKeys.ts +5 -0
- package/static/3cr-types-browser/types/AnchorPoint.ts +12 -0
- package/static/3cr-types-browser/types/CallToAction.ts +5 -0
- package/static/3cr-types-browser/types/ColourData.ts +7 -0
- package/static/3cr-types-browser/types/ColourPresetData.ts +9 -0
- package/static/3cr-types-browser/types/CurrentDataOverlayState.ts +6 -0
- package/static/3cr-types-browser/types/CurrentScanState.ts +22 -0
- package/static/3cr-types-browser/types/DataOverlay.ts +22 -0
- package/static/3cr-types-browser/types/DataOverlayActions.ts +14 -0
- package/static/3cr-types-browser/types/DataOverlayData.ts +8 -0
- package/static/3cr-types-browser/types/DataOverlayEvent.ts +8 -0
- package/static/3cr-types-browser/types/DecryptionKey.ts +4 -0
- package/static/3cr-types-browser/types/DisplaySettings.ts +10 -0
- package/static/3cr-types-browser/types/EmptyPayload.ts +3 -0
- package/static/3cr-types-browser/types/EnumPayload.ts +4 -0
- package/static/3cr-types-browser/types/FileManagementActions.ts +11 -0
- package/static/3cr-types-browser/types/FlipValue.ts +7 -0
- package/static/3cr-types-browser/types/FrontEndInterfaces.ts +14 -0
- package/static/3cr-types-browser/types/GradientKeys.ts +7 -0
- package/static/3cr-types-browser/types/GreyscalePresetData.ts +6 -0
- package/static/3cr-types-browser/types/InitialDataOverlayState.ts +6 -0
- package/static/3cr-types-browser/types/InitialScanState.ts +19 -0
- package/static/3cr-types-browser/types/InteractionType.ts +8 -0
- package/static/3cr-types-browser/types/InteractivityActions.ts +6 -0
- package/static/3cr-types-browser/types/InteractivityState.ts +4 -0
- package/static/3cr-types-browser/types/InvertTransformData.ts +6 -0
- package/static/3cr-types-browser/types/LayoutActions.ts +6 -0
- package/static/3cr-types-browser/types/LayoutData.ts +7 -0
- package/static/3cr-types-browser/types/LoadDataSet.ts +6 -0
- package/static/3cr-types-browser/types/LoadSessionState.ts +4 -0
- package/static/3cr-types-browser/types/LocalLoadDataset.ts +3 -0
- package/static/3cr-types-browser/types/MovementData.ts +7 -0
- package/static/3cr-types-browser/types/NavigationCubeActions.ts +8 -0
- package/static/3cr-types-browser/types/NavigationCubeData.ts +12 -0
- package/static/3cr-types-browser/types/NavigationCubeTransform.ts +9 -0
- package/static/3cr-types-browser/types/NotificationPayload.ts +7 -0
- package/static/3cr-types-browser/types/NotificationsActions.ts +6 -0
- package/static/3cr-types-browser/types/Object.ts +1 -0
- package/static/3cr-types-browser/types/ObjectColour.ts +7 -0
- package/static/3cr-types-browser/types/ObjectIcon.ts +5 -0
- package/static/3cr-types-browser/types/ObjectInvert.ts +7 -0
- package/static/3cr-types-browser/types/ObjectSize.ts +7 -0
- package/static/3cr-types-browser/types/ObjectSize2D.ts +7 -0
- package/static/3cr-types-browser/types/ObjectVisible.ts +5 -0
- package/static/3cr-types-browser/types/PositionData.ts +14 -0
- package/static/3cr-types-browser/types/PresetsActions.ts +4 -0
- package/static/3cr-types-browser/types/RotationValue.ts +7 -0
- package/static/3cr-types-browser/types/ScanMovementActions.ts +27 -0
- package/static/3cr-types-browser/types/ScanMovementData.ts +3 -0
- package/static/3cr-types-browser/types/ScanOrientationActions.ts +6 -0
- package/static/3cr-types-browser/types/ScanStateActions.ts +4 -0
- package/static/3cr-types-browser/types/ScanView.ts +6 -0
- package/static/3cr-types-browser/types/SettingsData.ts +12 -0
- package/static/3cr-types-browser/types/SlicerData.ts +9 -0
- package/static/3cr-types-browser/types/SliderValue.ts +4 -0
- package/static/3cr-types-browser/types/SlidersActions.ts +18 -0
- package/static/3cr-types-browser/types/Vector2Data.ts +5 -0
- package/static/3cr-types-browser/types/Vector3Data.ts +6 -0
- package/static/3cr-types-browser/types/VectorMovementData.ts +8 -0
- package/static/3cr-types-browser/types/ViewInteractiveMode.ts +5 -0
- package/static/3cr-types-browser/types/ViewOrientation.ts +8 -0
- package/static/3cr-types-browser/types/ViewOrientations.ts +10 -0
- package/static/3cr-types-browser/types/ViewSelectionActions.ts +9 -0
- package/static/3cr-types-browser/types/ViewToggleData.ts +7 -0
- package/static/3cr-types-browser/types/VolumeOrientation.ts +7 -0
- package/test/helper.ts +10 -1
- package/test/setup.ts +13 -0
- package/tsconfig.json +1 -0
- package/vite.config.mts +1 -0
- package/coverage/3cr-viewer-browser/index.html +0 -116
- package/coverage/3cr-viewer-browser/index.ts.html +0 -199
- package/coverage/3cr-viewer-browser/src/App.vue.html +0 -316
- package/coverage/3cr-viewer-browser/src/components/WebGL3DR.vue.html +0 -442
- package/coverage/3cr-viewer-browser/src/components/icons/index.html +0 -116
- package/coverage/3cr-viewer-browser/src/components/icons/liver.vue.html +0 -148
- package/coverage/3cr-viewer-browser/src/components/index.html +0 -116
- package/coverage/3cr-viewer-browser/src/components/loading/LoadingSpinner.vue.html +0 -622
- package/coverage/3cr-viewer-browser/src/components/loading/index.html +0 -116
- package/coverage/3cr-viewer-browser/src/components/modal/MftpWebGL3DRModal.vue.html +0 -3118
- package/coverage/3cr-viewer-browser/src/components/modal/index.html +0 -116
- package/coverage/3cr-viewer-browser/src/components/selectors/ValueSelector.vue.html +0 -358
- package/coverage/3cr-viewer-browser/src/components/selectors/index.html +0 -116
- package/coverage/3cr-viewer-browser/src/components/sliders/DoubleSliderSelector.vue.html +0 -487
- package/coverage/3cr-viewer-browser/src/components/sliders/VerticalSliderSelector.vue.html +0 -358
- package/coverage/3cr-viewer-browser/src/components/sliders/index.html +0 -131
- package/coverage/3cr-viewer-browser/src/dataLayer/iconData.ts.html +0 -118
- package/coverage/3cr-viewer-browser/src/dataLayer/index.html +0 -146
- package/coverage/3cr-viewer-browser/src/dataLayer/payloadHandler.ts.html +0 -463
- package/coverage/3cr-viewer-browser/src/dataLayer/scanState.ts.html +0 -598
- package/coverage/3cr-viewer-browser/src/helpers/index.html +0 -146
- package/coverage/3cr-viewer-browser/src/helpers/layoutOverlayStyle.ts.html +0 -406
- package/coverage/3cr-viewer-browser/src/helpers/modelHelper.ts.html +0 -412
- package/coverage/3cr-viewer-browser/src/helpers/utils.ts.html +0 -133
- package/coverage/3cr-viewer-browser/src/index.html +0 -131
- package/coverage/3cr-viewer-browser/src/main.ts.html +0 -124
- package/coverage/3cr-viewer-browser/src/models/LoadViewerOptions.ts.html +0 -166
- package/coverage/3cr-viewer-browser/src/models/index.html +0 -116
- package/coverage/3cr-viewer-browser/src/notifications/index.html +0 -116
- package/coverage/3cr-viewer-browser/src/notifications/notification.ts.html +0 -238
- package/coverage/3cr-viewer-browser/src/plugins/index.html +0 -131
- package/coverage/3cr-viewer-browser/src/plugins/index.ts.html +0 -136
- package/coverage/3cr-viewer-browser/src/plugins/vuetify.ts.html +0 -220
- package/coverage/base.css +0 -224
- package/coverage/block-navigation.js +0 -87
- package/coverage/favicon.png +0 -0
- package/coverage/index.html +0 -296
- package/coverage/prettify.css +0 -1
- package/coverage/prettify.js +0 -2
- package/coverage/sort-arrow-sprite.png +0 -0
- package/coverage/sorter.js +0 -196
- package/src/dataLayer/__tests__/payload-handler.spec.ts +0 -214
- package/src/dataLayer/payloadHandler.ts +0 -138
- /package/src/dataLayer/{iconData.ts → getIconForPreset.ts} +0 -0
package/test/helper.ts
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
|
-
import { mount, shallowMount } from "@vue/test-utils";
|
|
1
|
+
import { mount, shallowMount, VueWrapper } from "@vue/test-utils";
|
|
2
2
|
import { createVuetify } from "vuetify";
|
|
3
3
|
import { expect } from "vitest";
|
|
4
|
+
import { VDialog } from "vuetify/components";
|
|
5
|
+
import { nextTick } from "vue";
|
|
4
6
|
|
|
5
7
|
export function mountVuetify<T>(
|
|
6
8
|
component: T,
|
|
@@ -33,3 +35,10 @@ export function checkComponentProps(
|
|
|
33
35
|
) {
|
|
34
36
|
expect(component.props()[propKey] as any).toBe(equal);
|
|
35
37
|
}
|
|
38
|
+
|
|
39
|
+
export async function openAllModals<T>(wrapper: VueWrapper<T>) {
|
|
40
|
+
for (const modal of wrapper.findAllComponents(VDialog)) {
|
|
41
|
+
await modal.setValue(true);
|
|
42
|
+
}
|
|
43
|
+
await nextTick();
|
|
44
|
+
}
|
package/test/setup.ts
CHANGED
|
@@ -1 +1,14 @@
|
|
|
1
|
+
import {vi} from "vitest";
|
|
2
|
+
|
|
1
3
|
global.ResizeObserver = require("resize-observer-polyfill");
|
|
4
|
+
|
|
5
|
+
vi.mock("@3cr/sdk-browser", async (importOriginal) => {
|
|
6
|
+
const mod = (await importOriginal()) as object;
|
|
7
|
+
return {
|
|
8
|
+
...mod,
|
|
9
|
+
registerVersion: vi.fn(),
|
|
10
|
+
createInstance: vi.fn(),
|
|
11
|
+
executePayload: vi.fn(),
|
|
12
|
+
registerOnPayloadHandler: vi.fn(),
|
|
13
|
+
};
|
|
14
|
+
});
|
package/tsconfig.json
CHANGED
package/vite.config.mts
CHANGED
|
@@ -67,6 +67,7 @@ if (globalThis.Viewer3CR) {
|
|
|
67
67
|
},
|
|
68
68
|
resolve: {
|
|
69
69
|
alias: {
|
|
70
|
+
'@3cr/types-ts': fileURLToPath(new URL('./static/3cr-types-browser', import.meta.url)),
|
|
70
71
|
'@': fileURLToPath(new URL('./src', import.meta.url)),
|
|
71
72
|
'~': fileURLToPath(new URL('./test', import.meta.url)),
|
|
72
73
|
},
|
|
@@ -1,116 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
<!doctype html>
|
|
3
|
-
<html lang="en">
|
|
4
|
-
|
|
5
|
-
<head>
|
|
6
|
-
<title>Code coverage report for 3cr-viewer-browser</title>
|
|
7
|
-
<meta charset="utf-8" />
|
|
8
|
-
<link rel="stylesheet" href="../prettify.css" />
|
|
9
|
-
<link rel="stylesheet" href="../base.css" />
|
|
10
|
-
<link rel="shortcut icon" type="image/x-icon" href="../favicon.png" />
|
|
11
|
-
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
|
12
|
-
<style type='text/css'>
|
|
13
|
-
.coverage-summary .sorter {
|
|
14
|
-
background-image: url(../sort-arrow-sprite.png);
|
|
15
|
-
}
|
|
16
|
-
</style>
|
|
17
|
-
</head>
|
|
18
|
-
|
|
19
|
-
<body>
|
|
20
|
-
<div class='wrapper'>
|
|
21
|
-
<div class='pad1'>
|
|
22
|
-
<h1><a href="../index.html">All files</a> 3cr-viewer-browser</h1>
|
|
23
|
-
<div class='clearfix'>
|
|
24
|
-
|
|
25
|
-
<div class='fl pad1y space-right2'>
|
|
26
|
-
<span class="strong">100% </span>
|
|
27
|
-
<span class="quiet">Statements</span>
|
|
28
|
-
<span class='fraction'>38/38</span>
|
|
29
|
-
</div>
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
<div class='fl pad1y space-right2'>
|
|
33
|
-
<span class="strong">100% </span>
|
|
34
|
-
<span class="quiet">Branches</span>
|
|
35
|
-
<span class='fraction'>3/3</span>
|
|
36
|
-
</div>
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
<div class='fl pad1y space-right2'>
|
|
40
|
-
<span class="strong">100% </span>
|
|
41
|
-
<span class="quiet">Functions</span>
|
|
42
|
-
<span class='fraction'>2/2</span>
|
|
43
|
-
</div>
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
<div class='fl pad1y space-right2'>
|
|
47
|
-
<span class="strong">100% </span>
|
|
48
|
-
<span class="quiet">Lines</span>
|
|
49
|
-
<span class='fraction'>38/38</span>
|
|
50
|
-
</div>
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
</div>
|
|
54
|
-
<p class="quiet">
|
|
55
|
-
Press <em>n</em> or <em>j</em> to go to the next uncovered block, <em>b</em>, <em>p</em> or <em>k</em> for the previous block.
|
|
56
|
-
</p>
|
|
57
|
-
<template id="filterTemplate">
|
|
58
|
-
<div class="quiet">
|
|
59
|
-
Filter:
|
|
60
|
-
<input type="search" id="fileSearch">
|
|
61
|
-
</div>
|
|
62
|
-
</template>
|
|
63
|
-
</div>
|
|
64
|
-
<div class='status-line high'></div>
|
|
65
|
-
<div class="pad1">
|
|
66
|
-
<table class="coverage-summary">
|
|
67
|
-
<thead>
|
|
68
|
-
<tr>
|
|
69
|
-
<th data-col="file" data-fmt="html" data-html="true" class="file">File</th>
|
|
70
|
-
<th data-col="pic" data-type="number" data-fmt="html" data-html="true" class="pic"></th>
|
|
71
|
-
<th data-col="statements" data-type="number" data-fmt="pct" class="pct">Statements</th>
|
|
72
|
-
<th data-col="statements_raw" data-type="number" data-fmt="html" class="abs"></th>
|
|
73
|
-
<th data-col="branches" data-type="number" data-fmt="pct" class="pct">Branches</th>
|
|
74
|
-
<th data-col="branches_raw" data-type="number" data-fmt="html" class="abs"></th>
|
|
75
|
-
<th data-col="functions" data-type="number" data-fmt="pct" class="pct">Functions</th>
|
|
76
|
-
<th data-col="functions_raw" data-type="number" data-fmt="html" class="abs"></th>
|
|
77
|
-
<th data-col="lines" data-type="number" data-fmt="pct" class="pct">Lines</th>
|
|
78
|
-
<th data-col="lines_raw" data-type="number" data-fmt="html" class="abs"></th>
|
|
79
|
-
</tr>
|
|
80
|
-
</thead>
|
|
81
|
-
<tbody><tr>
|
|
82
|
-
<td class="file high" data-value="index.ts"><a href="index.ts.html">index.ts</a></td>
|
|
83
|
-
<td data-value="100" class="pic high">
|
|
84
|
-
<div class="chart"><div class="cover-fill cover-full" style="width: 100%"></div><div class="cover-empty" style="width: 0%"></div></div>
|
|
85
|
-
</td>
|
|
86
|
-
<td data-value="100" class="pct high">100%</td>
|
|
87
|
-
<td data-value="38" class="abs high">38/38</td>
|
|
88
|
-
<td data-value="100" class="pct high">100%</td>
|
|
89
|
-
<td data-value="3" class="abs high">3/3</td>
|
|
90
|
-
<td data-value="100" class="pct high">100%</td>
|
|
91
|
-
<td data-value="2" class="abs high">2/2</td>
|
|
92
|
-
<td data-value="100" class="pct high">100%</td>
|
|
93
|
-
<td data-value="38" class="abs high">38/38</td>
|
|
94
|
-
</tr>
|
|
95
|
-
|
|
96
|
-
</tbody>
|
|
97
|
-
</table>
|
|
98
|
-
</div>
|
|
99
|
-
<div class='push'></div><!-- for sticky footer -->
|
|
100
|
-
</div><!-- /wrapper -->
|
|
101
|
-
<div class='footer quiet pad2 space-top1 center small'>
|
|
102
|
-
Code coverage generated by
|
|
103
|
-
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
104
|
-
at 2024-04-10T07:24:10.407Z
|
|
105
|
-
</div>
|
|
106
|
-
<script src="../prettify.js"></script>
|
|
107
|
-
<script>
|
|
108
|
-
window.onload = function () {
|
|
109
|
-
prettyPrint();
|
|
110
|
-
};
|
|
111
|
-
</script>
|
|
112
|
-
<script src="../sorter.js"></script>
|
|
113
|
-
<script src="../block-navigation.js"></script>
|
|
114
|
-
</body>
|
|
115
|
-
</html>
|
|
116
|
-
|
|
@@ -1,199 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
<!doctype html>
|
|
3
|
-
<html lang="en">
|
|
4
|
-
|
|
5
|
-
<head>
|
|
6
|
-
<title>Code coverage report for 3cr-viewer-browser/index.ts</title>
|
|
7
|
-
<meta charset="utf-8" />
|
|
8
|
-
<link rel="stylesheet" href="../prettify.css" />
|
|
9
|
-
<link rel="stylesheet" href="../base.css" />
|
|
10
|
-
<link rel="shortcut icon" type="image/x-icon" href="../favicon.png" />
|
|
11
|
-
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
|
12
|
-
<style type='text/css'>
|
|
13
|
-
.coverage-summary .sorter {
|
|
14
|
-
background-image: url(../sort-arrow-sprite.png);
|
|
15
|
-
}
|
|
16
|
-
</style>
|
|
17
|
-
</head>
|
|
18
|
-
|
|
19
|
-
<body>
|
|
20
|
-
<div class='wrapper'>
|
|
21
|
-
<div class='pad1'>
|
|
22
|
-
<h1><a href="../index.html">All files</a> / <a href="index.html">3cr-viewer-browser</a> index.ts</h1>
|
|
23
|
-
<div class='clearfix'>
|
|
24
|
-
|
|
25
|
-
<div class='fl pad1y space-right2'>
|
|
26
|
-
<span class="strong">100% </span>
|
|
27
|
-
<span class="quiet">Statements</span>
|
|
28
|
-
<span class='fraction'>38/38</span>
|
|
29
|
-
</div>
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
<div class='fl pad1y space-right2'>
|
|
33
|
-
<span class="strong">100% </span>
|
|
34
|
-
<span class="quiet">Branches</span>
|
|
35
|
-
<span class='fraction'>3/3</span>
|
|
36
|
-
</div>
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
<div class='fl pad1y space-right2'>
|
|
40
|
-
<span class="strong">100% </span>
|
|
41
|
-
<span class="quiet">Functions</span>
|
|
42
|
-
<span class='fraction'>2/2</span>
|
|
43
|
-
</div>
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
<div class='fl pad1y space-right2'>
|
|
47
|
-
<span class="strong">100% </span>
|
|
48
|
-
<span class="quiet">Lines</span>
|
|
49
|
-
<span class='fraction'>38/38</span>
|
|
50
|
-
</div>
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
</div>
|
|
54
|
-
<p class="quiet">
|
|
55
|
-
Press <em>n</em> or <em>j</em> to go to the next uncovered block, <em>b</em>, <em>p</em> or <em>k</em> for the previous block.
|
|
56
|
-
</p>
|
|
57
|
-
<template id="filterTemplate">
|
|
58
|
-
<div class="quiet">
|
|
59
|
-
Filter:
|
|
60
|
-
<input type="search" id="fileSearch">
|
|
61
|
-
</div>
|
|
62
|
-
</template>
|
|
63
|
-
</div>
|
|
64
|
-
<div class='status-line high'></div>
|
|
65
|
-
<pre><table class="coverage">
|
|
66
|
-
<tr><td class="line-count quiet"><a name='L1'></a><a href='#L1'>1</a>
|
|
67
|
-
<a name='L2'></a><a href='#L2'>2</a>
|
|
68
|
-
<a name='L3'></a><a href='#L3'>3</a>
|
|
69
|
-
<a name='L4'></a><a href='#L4'>4</a>
|
|
70
|
-
<a name='L5'></a><a href='#L5'>5</a>
|
|
71
|
-
<a name='L6'></a><a href='#L6'>6</a>
|
|
72
|
-
<a name='L7'></a><a href='#L7'>7</a>
|
|
73
|
-
<a name='L8'></a><a href='#L8'>8</a>
|
|
74
|
-
<a name='L9'></a><a href='#L9'>9</a>
|
|
75
|
-
<a name='L10'></a><a href='#L10'>10</a>
|
|
76
|
-
<a name='L11'></a><a href='#L11'>11</a>
|
|
77
|
-
<a name='L12'></a><a href='#L12'>12</a>
|
|
78
|
-
<a name='L13'></a><a href='#L13'>13</a>
|
|
79
|
-
<a name='L14'></a><a href='#L14'>14</a>
|
|
80
|
-
<a name='L15'></a><a href='#L15'>15</a>
|
|
81
|
-
<a name='L16'></a><a href='#L16'>16</a>
|
|
82
|
-
<a name='L17'></a><a href='#L17'>17</a>
|
|
83
|
-
<a name='L18'></a><a href='#L18'>18</a>
|
|
84
|
-
<a name='L19'></a><a href='#L19'>19</a>
|
|
85
|
-
<a name='L20'></a><a href='#L20'>20</a>
|
|
86
|
-
<a name='L21'></a><a href='#L21'>21</a>
|
|
87
|
-
<a name='L22'></a><a href='#L22'>22</a>
|
|
88
|
-
<a name='L23'></a><a href='#L23'>23</a>
|
|
89
|
-
<a name='L24'></a><a href='#L24'>24</a>
|
|
90
|
-
<a name='L25'></a><a href='#L25'>25</a>
|
|
91
|
-
<a name='L26'></a><a href='#L26'>26</a>
|
|
92
|
-
<a name='L27'></a><a href='#L27'>27</a>
|
|
93
|
-
<a name='L28'></a><a href='#L28'>28</a>
|
|
94
|
-
<a name='L29'></a><a href='#L29'>29</a>
|
|
95
|
-
<a name='L30'></a><a href='#L30'>30</a>
|
|
96
|
-
<a name='L31'></a><a href='#L31'>31</a>
|
|
97
|
-
<a name='L32'></a><a href='#L32'>32</a>
|
|
98
|
-
<a name='L33'></a><a href='#L33'>33</a>
|
|
99
|
-
<a name='L34'></a><a href='#L34'>34</a>
|
|
100
|
-
<a name='L35'></a><a href='#L35'>35</a>
|
|
101
|
-
<a name='L36'></a><a href='#L36'>36</a>
|
|
102
|
-
<a name='L37'></a><a href='#L37'>37</a>
|
|
103
|
-
<a name='L38'></a><a href='#L38'>38</a>
|
|
104
|
-
<a name='L39'></a><a href='#L39'>39</a></td><td class="line-coverage quiet"><span class="cline-any cline-yes">1x</span>
|
|
105
|
-
<span class="cline-any cline-yes">1x</span>
|
|
106
|
-
<span class="cline-any cline-yes">1x</span>
|
|
107
|
-
<span class="cline-any cline-yes">1x</span>
|
|
108
|
-
<span class="cline-any cline-yes">1x</span>
|
|
109
|
-
<span class="cline-any cline-yes">1x</span>
|
|
110
|
-
<span class="cline-any cline-yes">1x</span>
|
|
111
|
-
<span class="cline-any cline-yes">1x</span>
|
|
112
|
-
<span class="cline-any cline-yes">1x</span>
|
|
113
|
-
<span class="cline-any cline-yes">1x</span>
|
|
114
|
-
<span class="cline-any cline-yes">1x</span>
|
|
115
|
-
<span class="cline-any cline-yes">1x</span>
|
|
116
|
-
<span class="cline-any cline-yes">2x</span>
|
|
117
|
-
<span class="cline-any cline-yes">2x</span>
|
|
118
|
-
<span class="cline-any cline-yes">2x</span>
|
|
119
|
-
<span class="cline-any cline-yes">2x</span>
|
|
120
|
-
<span class="cline-any cline-yes">2x</span>
|
|
121
|
-
<span class="cline-any cline-yes">2x</span>
|
|
122
|
-
<span class="cline-any cline-yes">2x</span>
|
|
123
|
-
<span class="cline-any cline-yes">2x</span>
|
|
124
|
-
<span class="cline-any cline-yes">2x</span>
|
|
125
|
-
<span class="cline-any cline-yes">2x</span>
|
|
126
|
-
<span class="cline-any cline-yes">2x</span>
|
|
127
|
-
<span class="cline-any cline-yes">2x</span>
|
|
128
|
-
<span class="cline-any cline-yes">2x</span>
|
|
129
|
-
<span class="cline-any cline-yes">2x</span>
|
|
130
|
-
<span class="cline-any cline-yes">1x</span>
|
|
131
|
-
<span class="cline-any cline-yes">2x</span>
|
|
132
|
-
<span class="cline-any cline-yes">2x</span>
|
|
133
|
-
<span class="cline-any cline-yes">2x</span>
|
|
134
|
-
<span class="cline-any cline-yes">2x</span>
|
|
135
|
-
<span class="cline-any cline-yes">2x</span>
|
|
136
|
-
<span class="cline-any cline-yes">1x</span>
|
|
137
|
-
<span class="cline-any cline-yes">1x</span>
|
|
138
|
-
<span class="cline-any cline-yes">1x</span>
|
|
139
|
-
<span class="cline-any cline-yes">1x</span>
|
|
140
|
-
<span class="cline-any cline-yes">1x</span>
|
|
141
|
-
<span class="cline-any cline-yes">1x</span>
|
|
142
|
-
<span class="cline-any cline-neutral"> </span></td><td class="text"><pre class="prettyprint lang-js">import { registerVersion } from "@3cr/sdk-browser";
|
|
143
|
-
import { ComponentPublicInstance, createApp } from "vue";
|
|
144
|
-
import { registerPlugins } from "@/plugins";
|
|
145
|
-
import { App as BrowserViewer } from "./src/main";
|
|
146
|
-
import {
|
|
147
|
-
defaultLoadViewerOptions,
|
|
148
|
-
LoadViewerOptions,
|
|
149
|
-
} from "@/models/LoadViewerOptions";
|
|
150
|
-
import { LoadViewerPayload } from "@/models/LoadViewerPayload";
|
|
151
|
-
|
|
152
|
-
let mountedApp: ComponentPublicInstance | undefined = undefined;
|
|
153
|
-
|
|
154
|
-
export async function registerViewer(version: string) {
|
|
155
|
-
const newElement = document.createElement("div");
|
|
156
|
-
|
|
157
|
-
newElement.style.width = "0";
|
|
158
|
-
newElement.style.height = "0";
|
|
159
|
-
|
|
160
|
-
document.body.appendChild(newElement);
|
|
161
|
-
|
|
162
|
-
const app = createApp(BrowserViewer);
|
|
163
|
-
registerPlugins(app);
|
|
164
|
-
|
|
165
|
-
mountedApp = app.mount(newElement);
|
|
166
|
-
await registerVersion(version);
|
|
167
|
-
}
|
|
168
|
-
|
|
169
|
-
export async function loadViewer(
|
|
170
|
-
payload: LoadViewerPayload | undefined = undefined,
|
|
171
|
-
options: LoadViewerOptions = defaultLoadViewerOptions
|
|
172
|
-
): Promise<void> {
|
|
173
|
-
if (!mountedApp) {
|
|
174
|
-
throw new Error(
|
|
175
|
-
"Please call `registerViewer(version: string, idSelector: string)` first"
|
|
176
|
-
);
|
|
177
|
-
}
|
|
178
|
-
await (mountedApp as any).loadInstance(payload, options);
|
|
179
|
-
}
|
|
180
|
-
</pre></td></tr></table></pre>
|
|
181
|
-
|
|
182
|
-
<div class='push'></div><!-- for sticky footer -->
|
|
183
|
-
</div><!-- /wrapper -->
|
|
184
|
-
<div class='footer quiet pad2 space-top1 center small'>
|
|
185
|
-
Code coverage generated by
|
|
186
|
-
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
187
|
-
at 2024-04-10T07:24:10.407Z
|
|
188
|
-
</div>
|
|
189
|
-
<script src="../prettify.js"></script>
|
|
190
|
-
<script>
|
|
191
|
-
window.onload = function () {
|
|
192
|
-
prettyPrint();
|
|
193
|
-
};
|
|
194
|
-
</script>
|
|
195
|
-
<script src="../sorter.js"></script>
|
|
196
|
-
<script src="../block-navigation.js"></script>
|
|
197
|
-
</body>
|
|
198
|
-
</html>
|
|
199
|
-
|