@elice/material-video-file 1.230220.2 → 1.230306.0

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.
@@ -5,6 +5,7 @@ var React = require('react');
5
5
  var reactIntl = require('react-intl');
6
6
  var apiClient = require('@elice/api-client');
7
7
  var materialSharedUtils = require('@elice/material-shared-utils');
8
+ var types = require('@elice/types');
8
9
  var classnames = require('classnames');
9
10
  var locales = require('./locales.js');
10
11
  var MaterialVideoFilePlayer = require('./MaterialVideoFilePlayer.js');
@@ -16,7 +17,7 @@ var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
16
17
  var classnames__default = /*#__PURE__*/_interopDefaultLegacy(classnames);
17
18
 
18
19
  const MaterialVideoFile = _a => {
19
- var _b, _c, _d;
20
+ var _b, _c;
20
21
 
21
22
  var {
22
23
  materialVideoFileId,
@@ -29,11 +30,14 @@ const MaterialVideoFile = _a => {
29
30
  const {
30
31
  orgNameShort
31
32
  } = materialSharedUtils.useMaterialConfig();
32
- const [materialVideoFile, materialVideoFileStatus] = materialSharedUtils.useMaterialInitFetch(apiClient.config.init, React__default["default"].useCallback(signal => apiClient.getOrgMaterialVideoFileGet({
33
+ const {
34
+ materialVideoFile,
35
+ status: materialVideoFileStatus
36
+ } = materialSharedUtils.useMaterialFetch(types.enums.LectureMaterialType.VideoFile, React__default["default"].useCallback(signal => apiClient.getOrgMaterialVideoFileGet({
33
37
  materialVideoFileId
34
38
  }, {
35
39
  signal
36
- }), [materialVideoFileId])); //
40
+ }), [materialVideoFileId]), apiClient.config.init); //
37
41
  //
38
42
  //
39
43
 
@@ -45,9 +49,9 @@ const MaterialVideoFile = _a => {
45
49
  messages: locale in locales ? locales[locale] : locales.en
46
50
  }, React__default["default"].createElement(MaterialVideoFilePlayer, Object.assign({}, playerProps, {
47
51
  orgNameShort: orgNameShort,
48
- materialVideoFile: (_b = materialVideoFile === null || materialVideoFile === void 0 ? void 0 : materialVideoFile.materialVideoFile) !== null && _b !== void 0 ? _b : null,
52
+ materialVideoFile: materialVideoFile !== null && materialVideoFile !== void 0 ? materialVideoFile : null,
49
53
  materialVideoFileStatus: materialVideoFileStatus,
50
- title: (_d = (_c = materialVideoFile === null || materialVideoFile === void 0 ? void 0 : materialVideoFile.materialVideoFile.azureMediaVideo) === null || _c === void 0 ? void 0 : _c.videoAssetName) !== null && _d !== void 0 ? _d : undefined
54
+ title: (_c = (_b = materialVideoFile === null || materialVideoFile === void 0 ? void 0 : materialVideoFile.azureMediaVideo) === null || _b === void 0 ? void 0 : _b.videoAssetName) !== null && _c !== void 0 ? _c : undefined
51
55
  }))));
52
56
  };
53
57
 
@@ -35,7 +35,7 @@ var VideoMimeType;
35
35
  VideoMimeType["Mpeg"] = "application/dash+xml";
36
36
  })(VideoMimeType || (VideoMimeType = {}));
37
37
 
38
- const ELICE_VIDEO_PLAYER_MESSAGE_EVENT = 'elice-video-player';
38
+ const ELICE_VIDEO_PLAYER_MESSAGE_EVENT = 'elice-videoplayer';
39
39
  const ELICE_VIDEO_PLAYER_MESSAGE_TYPE = 'navigate';
40
40
 
41
41
  const MaterialVideoFilePlayer = ({
@@ -53,7 +53,7 @@ const MaterialVideoFilePlayer = ({
53
53
  locale,
54
54
  eliceVideoPlayerUrl,
55
55
  emptyComponent = null,
56
- title = 'elice-video-player',
56
+ title = 'elice-videoplayer',
57
57
  onNavigatePreviousLecturePage,
58
58
  onNavigateNextLecturePage
59
59
  }) => {
@@ -1,8 +1,9 @@
1
1
  import { __rest } from 'tslib';
2
2
  import React from 'react';
3
3
  import { IntlProvider } from 'react-intl';
4
- import { config, getOrgMaterialVideoFileGet } from '@elice/api-client';
5
- import { useMaterialConfig, useMaterialInitFetch } from '@elice/material-shared-utils';
4
+ import { getOrgMaterialVideoFileGet, config } from '@elice/api-client';
5
+ import { useMaterialConfig, useMaterialFetch } from '@elice/material-shared-utils';
6
+ import { enums } from '@elice/types';
6
7
  import classnames from 'classnames';
7
8
  import * as locales from './locales.js';
8
9
  import { en } from './locales.js';
@@ -10,7 +11,7 @@ import MaterialVideoFilePlayer from './MaterialVideoFilePlayer.js';
10
11
  import { StyledMaterialVideoFileWrap } from './MaterialVideoFile.styled.js';
11
12
 
12
13
  const MaterialVideoFile = _a => {
13
- var _b, _c, _d;
14
+ var _b, _c;
14
15
 
15
16
  var {
16
17
  materialVideoFileId,
@@ -23,11 +24,14 @@ const MaterialVideoFile = _a => {
23
24
  const {
24
25
  orgNameShort
25
26
  } = useMaterialConfig();
26
- const [materialVideoFile, materialVideoFileStatus] = useMaterialInitFetch(config.init, React.useCallback(signal => getOrgMaterialVideoFileGet({
27
+ const {
28
+ materialVideoFile,
29
+ status: materialVideoFileStatus
30
+ } = useMaterialFetch(enums.LectureMaterialType.VideoFile, React.useCallback(signal => getOrgMaterialVideoFileGet({
27
31
  materialVideoFileId
28
32
  }, {
29
33
  signal
30
- }), [materialVideoFileId])); //
34
+ }), [materialVideoFileId]), config.init); //
31
35
  //
32
36
  //
33
37
 
@@ -39,9 +43,9 @@ const MaterialVideoFile = _a => {
39
43
  messages: locale in locales ? locales[locale] : en
40
44
  }, React.createElement(MaterialVideoFilePlayer, Object.assign({}, playerProps, {
41
45
  orgNameShort: orgNameShort,
42
- materialVideoFile: (_b = materialVideoFile === null || materialVideoFile === void 0 ? void 0 : materialVideoFile.materialVideoFile) !== null && _b !== void 0 ? _b : null,
46
+ materialVideoFile: materialVideoFile !== null && materialVideoFile !== void 0 ? materialVideoFile : null,
43
47
  materialVideoFileStatus: materialVideoFileStatus,
44
- title: (_d = (_c = materialVideoFile === null || materialVideoFile === void 0 ? void 0 : materialVideoFile.materialVideoFile.azureMediaVideo) === null || _c === void 0 ? void 0 : _c.videoAssetName) !== null && _d !== void 0 ? _d : undefined
48
+ title: (_c = (_b = materialVideoFile === null || materialVideoFile === void 0 ? void 0 : materialVideoFile.azureMediaVideo) === null || _b === void 0 ? void 0 : _b.videoAssetName) !== null && _c !== void 0 ? _c : undefined
45
49
  }))));
46
50
  };
47
51
 
@@ -28,7 +28,7 @@ var VideoMimeType;
28
28
  VideoMimeType["Mpeg"] = "application/dash+xml";
29
29
  })(VideoMimeType || (VideoMimeType = {}));
30
30
 
31
- const ELICE_VIDEO_PLAYER_MESSAGE_EVENT = 'elice-video-player';
31
+ const ELICE_VIDEO_PLAYER_MESSAGE_EVENT = 'elice-videoplayer';
32
32
  const ELICE_VIDEO_PLAYER_MESSAGE_TYPE = 'navigate';
33
33
 
34
34
  const MaterialVideoFilePlayer = ({
@@ -46,7 +46,7 @@ const MaterialVideoFilePlayer = ({
46
46
  locale,
47
47
  eliceVideoPlayerUrl,
48
48
  emptyComponent = null,
49
- title = 'elice-video-player',
49
+ title = 'elice-videoplayer',
50
50
  onNavigatePreviousLecturePage,
51
51
  onNavigateNextLecturePage
52
52
  }) => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@elice/material-video-file",
3
- "version": "1.230220.2",
3
+ "version": "1.230306.0",
4
4
  "description": "User view and editing components of Elice material video file",
5
5
  "repository": "https://git.elicer.io/elice/frontend/library/elice-material",
6
6
  "license": "UNLICENSED",
@@ -29,13 +29,13 @@
29
29
  "clean": "del-cli \"es/*\" \"cjs/*\" \"dist/*\""
30
30
  },
31
31
  "peerDependencies": {
32
- "@elice/api-client": "1.230215.1",
32
+ "@elice/api-client": "^1.230306.0",
33
33
  "@elice/blocks": "^1.220803.0",
34
34
  "@elice/design-tokens": "^1.220803.0",
35
35
  "@elice/icons": "^1.220803.0",
36
36
  "@elice/material-shared-types": "*",
37
37
  "@elice/material-shared-utils": "*",
38
- "@elice/types": "1.230215.1",
38
+ "@elice/types": "^1.230306.0",
39
39
  "react": "^16.8.0 || ^17.0.0 || ^18.0.0",
40
40
  "react-intl": "^5.0.0",
41
41
  "react-use": "^17.0.0",
@@ -47,14 +47,14 @@
47
47
  "tslib": "^2.3.1"
48
48
  },
49
49
  "devDependencies": {
50
- "@elice/api-client": "1.230215.1",
50
+ "@elice/api-client": "^1.230306.0",
51
51
  "@elice/blocks": "^1.220803.0",
52
52
  "@elice/design-tokens": "^1.220803.0",
53
53
  "@elice/icons": "^1.220803.0",
54
54
  "@elice/icons-legacy": "npm:@elice/icons@0.220803.1",
55
- "@elice/material-shared-types": "1.230220.2",
56
- "@elice/material-shared-utils": "1.230220.2",
57
- "@elice/types": "1.230215.1",
55
+ "@elice/material-shared-types": "1.230306.0",
56
+ "@elice/material-shared-utils": "1.230306.0",
57
+ "@elice/types": "^1.230306.0",
58
58
  "@types/classnames": "^2.3.1",
59
59
  "@types/query-string": "^6.3.0",
60
60
  "@types/react": "~17.0.9",
@@ -64,5 +64,5 @@
64
64
  "react-use": "^17.2.4",
65
65
  "styled-components": "^5.3.0"
66
66
  },
67
- "gitHead": "f49499e86ce2ccbea6a1b83e070649a3167f8074"
67
+ "gitHead": "2ba30b7324d9fd782970a0343a6573827159b737"
68
68
  }