@elice/material-video 1.230210.0 → 1.230217.0-sepmatlec.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.
@@ -16,8 +16,6 @@ var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
16
16
  var classnames__default = /*#__PURE__*/_interopDefaultLegacy(classnames);
17
17
 
18
18
  const MaterialVideo = _a => {
19
- var _b;
20
-
21
19
  var {
22
20
  className,
23
21
  materialVideoId,
@@ -26,11 +24,14 @@ const MaterialVideo = _a => {
26
24
  youtubeProps = tslib.__rest(_a, ["className", "materialVideoId", "locale"]);
27
25
 
28
26
  const prefixCls = 'em-material-video';
29
- const [materialVideo, materialVideoStatus] = materialSharedUtils.useMaterialInitFetch(apiClient.config.init, React__default["default"].useCallback(signal => apiClient.getOrgMaterialVideoGet({
27
+ const {
28
+ materialVideo,
29
+ status: materialVideoStatus
30
+ } = materialSharedUtils.useMaterialFetch('materialVideo', React__default["default"].useCallback(signal => apiClient.getOrgMaterialVideoGet({
30
31
  materialVideoId
31
32
  }, {
32
33
  signal
33
- }), [materialVideoId]));
34
+ }), [materialVideoId]), apiClient.config.init);
34
35
  return React__default["default"].createElement(blocks.Flex, {
35
36
  className: classnames__default["default"](prefixCls, className),
36
37
  align: "center",
@@ -42,7 +43,7 @@ const MaterialVideo = _a => {
42
43
  defaultLocale: "en",
43
44
  messages: locale in locales ? locales[locale] : locales.en
44
45
  }, React__default["default"].createElement(MaterialVideoContent, Object.assign({
45
- materialVideo: (_b = materialVideo === null || materialVideo === void 0 ? void 0 : materialVideo.materialVideo) !== null && _b !== void 0 ? _b : null,
46
+ materialVideo: materialVideo !== null && materialVideo !== void 0 ? materialVideo : null,
46
47
  videoGetStatus: materialVideoStatus
47
48
  }, youtubeProps))));
48
49
  };
@@ -1,17 +1,15 @@
1
1
  import { __rest } from 'tslib';
2
2
  import React from 'react';
3
3
  import { IntlProvider } from 'react-intl';
4
- import { config, getOrgMaterialVideoGet } from '@elice/api-client';
4
+ import { getOrgMaterialVideoGet, config } from '@elice/api-client';
5
5
  import { Flex } from '@elice/blocks';
6
- import { useMaterialInitFetch } from '@elice/material-shared-utils';
6
+ import { useMaterialFetch } from '@elice/material-shared-utils';
7
7
  import classnames from 'classnames';
8
8
  import * as locales from './locales.js';
9
9
  import { en } from './locales.js';
10
10
  import MaterialVideoContent from './MaterialVideoContent.js';
11
11
 
12
12
  const MaterialVideo = _a => {
13
- var _b;
14
-
15
13
  var {
16
14
  className,
17
15
  materialVideoId,
@@ -20,11 +18,14 @@ const MaterialVideo = _a => {
20
18
  youtubeProps = __rest(_a, ["className", "materialVideoId", "locale"]);
21
19
 
22
20
  const prefixCls = 'em-material-video';
23
- const [materialVideo, materialVideoStatus] = useMaterialInitFetch(config.init, React.useCallback(signal => getOrgMaterialVideoGet({
21
+ const {
22
+ materialVideo,
23
+ status: materialVideoStatus
24
+ } = useMaterialFetch('materialVideo', React.useCallback(signal => getOrgMaterialVideoGet({
24
25
  materialVideoId
25
26
  }, {
26
27
  signal
27
- }), [materialVideoId]));
28
+ }), [materialVideoId]), config.init);
28
29
  return React.createElement(Flex, {
29
30
  className: classnames(prefixCls, className),
30
31
  align: "center",
@@ -36,7 +37,7 @@ const MaterialVideo = _a => {
36
37
  defaultLocale: "en",
37
38
  messages: locale in locales ? locales[locale] : en
38
39
  }, React.createElement(MaterialVideoContent, Object.assign({
39
- materialVideo: (_b = materialVideo === null || materialVideo === void 0 ? void 0 : materialVideo.materialVideo) !== null && _b !== void 0 ? _b : null,
40
+ materialVideo: materialVideo !== null && materialVideo !== void 0 ? materialVideo : null,
40
41
  videoGetStatus: materialVideoStatus
41
42
  }, youtubeProps))));
42
43
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@elice/material-video",
3
- "version": "1.230210.0",
3
+ "version": "1.230217.0-sepmatlec.0",
4
4
  "description": "User view and editing components of Elice material video",
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.221217.0",
32
+ "@elice/api-client": "1.230126.0-sepmatlec.3",
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.221217.0",
38
+ "@elice/types": "1.230126.0-sepmatlec.3",
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.221217.0",
50
+ "@elice/api-client": "1.230126.0-sepmatlec.3",
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.230210.0",
56
- "@elice/material-shared-utils": "1.230210.0",
57
- "@elice/types": "1.221217.0",
55
+ "@elice/material-shared-types": "1.230217.0-sepmatlec.0",
56
+ "@elice/material-shared-utils": "1.230217.0-sepmatlec.0",
57
+ "@elice/types": "1.230126.0-sepmatlec.3",
58
58
  "@types/classnames": "^2.3.1",
59
59
  "@types/react": "~17.0.9",
60
60
  "@types/styled-components": "^5.1.21",
@@ -63,5 +63,5 @@
63
63
  "react-use": "^17.2.4",
64
64
  "styled-components": "^5.3.0"
65
65
  },
66
- "gitHead": "d97a629bfa5eda5d863355cae30fdf5ec038ceba"
66
+ "gitHead": "6b2a7a2aa54b21685ea99f8bb5f240cdfd1b343a"
67
67
  }