mirador-annotation-editor-video 0.0.17 → 0.0.19
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.
|
@@ -1,42 +1,48 @@
|
|
|
1
|
-
|
|
1
|
+
"use strict";
|
|
2
2
|
|
|
3
|
-
Object.defineProperty(exports,
|
|
4
|
-
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
5
|
});
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
6
|
+
Object.defineProperty(exports, "AnnotationCreationCompanionWindowWrapper", {
|
|
7
|
+
enumerable: true,
|
|
8
|
+
get: function () {
|
|
9
|
+
return _AnnotationCreationCompanionWindowWrapper.default;
|
|
10
|
+
}
|
|
11
|
+
});
|
|
12
|
+
Object.defineProperty(exports, "AnnotationCreationWindowWrapper", {
|
|
13
|
+
enumerable: true,
|
|
14
|
+
get: function () {
|
|
15
|
+
return _AnnotationCreationWindowWrapper.default;
|
|
16
|
+
}
|
|
17
|
+
});
|
|
18
|
+
Object.defineProperty(exports, "canvasAnnotationsPlugin", {
|
|
19
|
+
enumerable: true,
|
|
20
|
+
get: function () {
|
|
21
|
+
return _canvasAnnotationsPlugin.default;
|
|
22
|
+
}
|
|
23
|
+
});
|
|
24
|
+
exports.default = void 0;
|
|
25
|
+
Object.defineProperty(exports, "externalStorageAnnotationPlugin", {
|
|
26
|
+
enumerable: true,
|
|
27
|
+
get: function () {
|
|
28
|
+
return _externalStorageAnnotationPlugin.default;
|
|
29
|
+
}
|
|
30
|
+
});
|
|
31
|
+
Object.defineProperty(exports, "windowSideBarButtonsPlugin", {
|
|
32
|
+
enumerable: true,
|
|
33
|
+
get: function () {
|
|
34
|
+
return _windowSideBarButtonsPlugin.default;
|
|
35
|
+
}
|
|
36
|
+
});
|
|
37
|
+
var _AnnotationCreationWindowWrapper = _interopRequireDefault(require("../wrapper/AnnotationCreationWindowWrapper"));
|
|
38
|
+
var _externalStorageAnnotationPlugin = _interopRequireDefault(require("mirador-annotations/src/plugins/externalStorageAnnotationPlugin"));
|
|
39
|
+
var _canvasAnnotationsPlugin = _interopRequireDefault(require("mirador-annotations/src/plugins/canvasAnnotationsPlugin"));
|
|
40
|
+
var _annotationCreationCompanionWindow = _interopRequireDefault(require("mirador-annotations/src/plugins/annotationCreationCompanionWindow"));
|
|
41
|
+
var _windowSideBarButtonsPlugin = _interopRequireDefault(require("mirador-annotations/src/plugins/windowSideBarButtonsPlugin"));
|
|
42
|
+
var _AnnotationCreationCompanionWindowWrapper = _interopRequireDefault(require("../wrapper/AnnotationCreationCompanionWindowWrapper"));
|
|
43
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
44
|
+
var _default = exports.default = [{
|
|
45
|
+
component: _AnnotationCreationWindowWrapper.default,
|
|
46
|
+
mode: 'wrap',
|
|
47
|
+
target: 'AnnotationSettings'
|
|
48
|
+
}, _externalStorageAnnotationPlugin.default, _canvasAnnotationsPlugin.default, _AnnotationCreationCompanionWindowWrapper.default, _windowSideBarButtonsPlugin.default];
|
|
@@ -1,96 +1,81 @@
|
|
|
1
|
-
|
|
1
|
+
"use strict";
|
|
2
2
|
|
|
3
|
-
Object.defineProperty(exports,
|
|
4
|
-
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
5
|
});
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
var
|
|
12
|
-
|
|
13
|
-
var
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
var
|
|
18
|
-
|
|
19
|
-
var _miradorDistEsSrcStateSelectorsAnnotations = require('mirador/dist/es/src/state/selectors/annotations');
|
|
20
|
-
|
|
21
|
-
var _miradorAnnotationsSrcAnnotationFormAnnotationForm = require('mirador-annotations/src/annotationForm/AnnotationForm');
|
|
22
|
-
|
|
23
|
-
var _miradorAnnotationsSrcAnnotationFormAnnotationForm2 = _interopRequireDefault(_miradorAnnotationsSrcAnnotationFormAnnotationForm);
|
|
24
|
-
|
|
25
|
-
var _miradorAnnotationsSrcPlayerReferences = require('mirador-annotations/src/playerReferences');
|
|
26
|
-
|
|
27
|
-
var _miradorDistEsSrcPluginsOSDReferences = require('mirador/dist/es/src/plugins/OSDReferences');
|
|
28
|
-
|
|
29
|
-
var _miradorDistEsSrcPluginsVideosReferences = require("mirador/dist/es/src/plugins/VideosReferences");
|
|
30
|
-
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
var actions = _interopRequireWildcard(require("mirador/dist/es/src/state/actions"));
|
|
8
|
+
var _companionWindows = require("mirador/dist/es/src/state/selectors/companionWindows");
|
|
9
|
+
var _canvases = require("mirador/dist/es/src/state/selectors/canvases");
|
|
10
|
+
var _annotations = require("mirador/dist/es/src/state/selectors/annotations");
|
|
11
|
+
var _AnnotationForm = _interopRequireDefault(require("mirador-annotations/src/annotationForm/AnnotationForm"));
|
|
12
|
+
var _playerReferences = require("mirador-annotations/src/playerReferences");
|
|
13
|
+
var _OSDReferences = require("mirador/dist/es/src/plugins/OSDReferences");
|
|
14
|
+
var _VideosReferences = require("mirador/dist/es/src/plugins/VideosReferences");
|
|
15
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
16
|
+
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
|
|
17
|
+
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
31
18
|
/** */
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
}
|
|
42
|
-
};
|
|
43
|
-
};
|
|
19
|
+
const mapDispatchToProps = (dispatch, {
|
|
20
|
+
id,
|
|
21
|
+
windowId
|
|
22
|
+
}) => ({
|
|
23
|
+
closeCompanionWindow: () => dispatch(actions.removeCompanionWindow(windowId, id)),
|
|
24
|
+
receiveAnnotation: (targetId, annoId, annotation) => dispatch(actions.receiveAnnotation(targetId, annoId, annotation))
|
|
25
|
+
// setCurrentTime: (...args) => dispatch(actions.setWindowCurrentTime(windowId, ...args)),
|
|
26
|
+
// setSeekTo: (...args) => dispatch(actions.setWindowSeekTo(windowId, ...args)),
|
|
27
|
+
});
|
|
44
28
|
|
|
45
29
|
/** */
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
return {
|
|
82
|
-
currentTime: currentTime,
|
|
83
|
-
annotation: annotation,
|
|
84
|
-
canvases: canvases,
|
|
85
|
-
config: state.config,
|
|
86
|
-
getMediaAudio: (0, _miradorDistEsSrcStateSelectorsCanvases.getVisibleCanvasAudioResources)(state, { windowId: windowId })
|
|
30
|
+
function mapStateToProps(state, {
|
|
31
|
+
id: companionWindowId,
|
|
32
|
+
windowId
|
|
33
|
+
}) {
|
|
34
|
+
const currentTime = null;
|
|
35
|
+
const cw = (0, _companionWindows.getCompanionWindow)(state, {
|
|
36
|
+
companionWindowId,
|
|
37
|
+
windowId
|
|
38
|
+
});
|
|
39
|
+
const {
|
|
40
|
+
annotationid
|
|
41
|
+
} = cw;
|
|
42
|
+
const canvases = (0, _canvases.getVisibleCanvases)(state, {
|
|
43
|
+
windowId
|
|
44
|
+
});
|
|
45
|
+
if (canvases[0].__jsonld.items) {
|
|
46
|
+
_playerReferences.playerReferences.init(state, windowId, _VideosReferences.VideosReferences, actions);
|
|
47
|
+
} else {
|
|
48
|
+
_playerReferences.playerReferences.init(state, windowId, _OSDReferences.OSDReferences, actions);
|
|
49
|
+
}
|
|
50
|
+
console.log('overlay :', _playerReferences.playerReferences.getOverlay());
|
|
51
|
+
console.log('mediaType :', _playerReferences.playerReferences.getMediaType());
|
|
52
|
+
// This could be removed but it's serve the useEffect in AnnotationForm for now.
|
|
53
|
+
let annotation = (0, _annotations.getPresentAnnotationsOnSelectedCanvases)(state, {
|
|
54
|
+
windowId
|
|
55
|
+
}).flatMap(annoPage => annoPage.json.items || []).find(annot => annot.id === annotationid);
|
|
56
|
+
|
|
57
|
+
// New annotation has no ID and no templateType defined
|
|
58
|
+
if (!annotation) {
|
|
59
|
+
annotation = {
|
|
60
|
+
id: null,
|
|
61
|
+
maeData: {
|
|
62
|
+
templateType: null
|
|
63
|
+
}
|
|
87
64
|
};
|
|
65
|
+
}
|
|
66
|
+
return {
|
|
67
|
+
currentTime,
|
|
68
|
+
annotation,
|
|
69
|
+
canvases,
|
|
70
|
+
config: state.config,
|
|
71
|
+
getMediaAudio: (0, _canvases.getVisibleCanvasAudioResources)(state, {
|
|
72
|
+
windowId
|
|
73
|
+
})
|
|
74
|
+
};
|
|
88
75
|
}
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
};
|
|
96
|
-
module.exports = exports['default'];
|
|
76
|
+
var _default = exports.default = {
|
|
77
|
+
companionWindowKey: 'annotationCreation',
|
|
78
|
+
component: _AnnotationForm.default,
|
|
79
|
+
mapDispatchToProps,
|
|
80
|
+
mapStateToProps
|
|
81
|
+
};
|
|
@@ -1,42 +1,43 @@
|
|
|
1
|
-
|
|
1
|
+
"use strict";
|
|
2
2
|
|
|
3
|
-
Object.defineProperty(exports,
|
|
4
|
-
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
5
|
});
|
|
6
|
-
|
|
7
|
-
var _redux = require(
|
|
8
|
-
|
|
9
|
-
var
|
|
10
|
-
|
|
11
|
-
var
|
|
12
|
-
|
|
13
|
-
var _miradorDistEsSrcStateSelectorsCanvases = require('mirador/dist/es/src/state/selectors/canvases');
|
|
14
|
-
|
|
15
|
-
var _miradorDistEsSrcStateSelectorsCompanionWindows = require('mirador/dist/es/src/state/selectors/companionWindows');
|
|
16
|
-
|
|
17
|
-
var MiradorAnnotation = require('mirador-annotations/src/plugins/miradorAnnotationPlugin')['default'];
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
var _redux = require("redux");
|
|
8
|
+
var _reactRedux = require("react-redux");
|
|
9
|
+
var _selectors = require("mirador/dist/es/src/state/selectors");
|
|
10
|
+
var _canvases = require("mirador/dist/es/src/state/selectors/canvases");
|
|
11
|
+
var _companionWindows = require("mirador/dist/es/src/state/selectors/companionWindows");
|
|
12
|
+
const MiradorAnnotation = require('mirador-annotations/src/plugins/miradorAnnotationPlugin').default;
|
|
18
13
|
// TODO use selector in main componenent
|
|
19
14
|
/**
|
|
20
15
|
* this function map the state to the annotationPlugin's props
|
|
21
16
|
* */
|
|
22
|
-
function mapStateToProps(state,
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
17
|
+
function mapStateToProps(state, {
|
|
18
|
+
targetProps: {
|
|
19
|
+
windowId
|
|
20
|
+
}
|
|
21
|
+
}) {
|
|
22
|
+
// Annotation edit companion window ou annotation creation companion window is the same thing
|
|
23
|
+
const annotationCreationCompanionWindows = (0, _companionWindows.getCompanionWindowsForContent)(state, {
|
|
24
|
+
content: 'annotationCreation',
|
|
25
|
+
windowId
|
|
26
|
+
});
|
|
27
|
+
let annotationEditCompanionWindowIsOpened = true;
|
|
28
|
+
if (Object.keys(annotationCreationCompanionWindows).length !== 0) {
|
|
29
|
+
annotationEditCompanionWindowIsOpened = false;
|
|
30
|
+
}
|
|
31
|
+
return {
|
|
32
|
+
annotationEditCompanionWindowIsOpened,
|
|
33
|
+
canvases: (0, _canvases.getVisibleCanvases)(state, {
|
|
34
|
+
windowId
|
|
35
|
+
}),
|
|
36
|
+
config: state.config,
|
|
37
|
+
windowViewType: (0, _selectors.getWindowViewType)(state, {
|
|
38
|
+
windowId
|
|
39
|
+
})
|
|
40
|
+
};
|
|
37
41
|
}
|
|
38
|
-
|
|
39
|
-
var
|
|
40
|
-
|
|
41
|
-
exports['default'] = enhance(MiradorAnnotation);
|
|
42
|
-
module.exports = exports['default'];
|
|
42
|
+
const enhance = (0, _redux.compose)((0, _reactRedux.connect)(mapStateToProps));
|
|
43
|
+
var _default = exports.default = enhance(MiradorAnnotation);
|
package/package.json
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "mirador-annotation-editor-video",
|
|
3
|
-
"version": "0.0.
|
|
4
|
-
|
|
3
|
+
"version": "0.0.19",
|
|
5
4
|
"description": "Mirador 4 plugin wrapping Mirador Annotation Editor plugin and adding video annotation support",
|
|
6
5
|
"main": "es/index.js",
|
|
7
6
|
"module": "es/index.js",
|
|
@@ -23,9 +22,9 @@
|
|
|
23
22
|
"test:ci": "jest --ci --reporters=default --reporters=jest-junit --watchAll=false"
|
|
24
23
|
},
|
|
25
24
|
"dependencies": {
|
|
26
|
-
"@mui/icons-material": "^
|
|
27
|
-
"mirador": "npm:mirador-video@1.0.
|
|
28
|
-
"mirador-annotations": "npm:mirador-annotation-editor@1.0.
|
|
25
|
+
"@mui/icons-material": "^5.11.16",
|
|
26
|
+
"mirador": "npm:mirador-video@1.0.14",
|
|
27
|
+
"mirador-annotations": "npm:mirador-annotation-editor@1.0.57"
|
|
29
28
|
},
|
|
30
29
|
"peerDependencies": {
|
|
31
30
|
"lodash": "^4.17.11",
|
|
@@ -33,6 +32,7 @@
|
|
|
33
32
|
"react-dom": "^18.0.0"
|
|
34
33
|
},
|
|
35
34
|
"devDependencies": {
|
|
35
|
+
"@emotion/styled": "^11.11.0",
|
|
36
36
|
"@babel/cli": "^7.25.9",
|
|
37
37
|
"@babel/core": "^7.26.0",
|
|
38
38
|
"@babel/node": "^7.26.0",
|