@elice/material-external 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.
|
@@ -4,6 +4,7 @@ var React = require('react');
|
|
|
4
4
|
var reactIntl = require('react-intl');
|
|
5
5
|
var apiClient = require('@elice/api-client');
|
|
6
6
|
var materialSharedUtils = require('@elice/material-shared-utils');
|
|
7
|
+
var types = require('@elice/types');
|
|
7
8
|
var classnames = require('classnames');
|
|
8
9
|
var locales = require('./locales.js');
|
|
9
10
|
var MaterialExternalContent = require('./MaterialExternalContent.js');
|
|
@@ -19,14 +20,15 @@ const MaterialExternal = ({
|
|
|
19
20
|
className,
|
|
20
21
|
locale = 'en'
|
|
21
22
|
}) => {
|
|
22
|
-
var _a;
|
|
23
|
-
|
|
24
23
|
const prefixCls = 'em-material-external';
|
|
25
|
-
const
|
|
24
|
+
const {
|
|
25
|
+
materialExternal,
|
|
26
|
+
status: materialExternalStatus
|
|
27
|
+
} = materialSharedUtils.useMaterialFetch(types.enums.LectureMaterialType.External, React__default["default"].useCallback(signal => apiClient.getOrgMaterialExternalGet({
|
|
26
28
|
materialExternalId
|
|
27
29
|
}, {
|
|
28
30
|
signal
|
|
29
|
-
}), [materialExternalId])); //
|
|
31
|
+
}), [materialExternalId]), apiClient.config.init); //
|
|
30
32
|
//
|
|
31
33
|
//
|
|
32
34
|
|
|
@@ -37,7 +39,7 @@ const MaterialExternal = ({
|
|
|
37
39
|
defaultLocale: "en",
|
|
38
40
|
messages: locale in locales ? locales[locale] : locales.en
|
|
39
41
|
}, React__default["default"].createElement(MaterialExternalContent, {
|
|
40
|
-
materialExternal:
|
|
42
|
+
materialExternal: materialExternal,
|
|
41
43
|
externalGetStatus: materialExternalStatus
|
|
42
44
|
})));
|
|
43
45
|
};
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { IntlProvider } from 'react-intl';
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
3
|
+
import { getOrgMaterialExternalGet, config } from '@elice/api-client';
|
|
4
|
+
import { useMaterialFetch } from '@elice/material-shared-utils';
|
|
5
|
+
import { enums } from '@elice/types';
|
|
5
6
|
import classnames from 'classnames';
|
|
6
7
|
import * as locales from './locales.js';
|
|
7
8
|
import { en } from './locales.js';
|
|
@@ -13,14 +14,15 @@ const MaterialExternal = ({
|
|
|
13
14
|
className,
|
|
14
15
|
locale = 'en'
|
|
15
16
|
}) => {
|
|
16
|
-
var _a;
|
|
17
|
-
|
|
18
17
|
const prefixCls = 'em-material-external';
|
|
19
|
-
const
|
|
18
|
+
const {
|
|
19
|
+
materialExternal,
|
|
20
|
+
status: materialExternalStatus
|
|
21
|
+
} = useMaterialFetch(enums.LectureMaterialType.External, React.useCallback(signal => getOrgMaterialExternalGet({
|
|
20
22
|
materialExternalId
|
|
21
23
|
}, {
|
|
22
24
|
signal
|
|
23
|
-
}), [materialExternalId])); //
|
|
25
|
+
}), [materialExternalId]), config.init); //
|
|
24
26
|
//
|
|
25
27
|
//
|
|
26
28
|
|
|
@@ -31,7 +33,7 @@ const MaterialExternal = ({
|
|
|
31
33
|
defaultLocale: "en",
|
|
32
34
|
messages: locale in locales ? locales[locale] : en
|
|
33
35
|
}, React.createElement(MaterialExternalContent, {
|
|
34
|
-
materialExternal:
|
|
36
|
+
materialExternal: materialExternal,
|
|
35
37
|
externalGetStatus: materialExternalStatus
|
|
36
38
|
})));
|
|
37
39
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@elice/material-external",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.230306.0",
|
|
4
4
|
"description": "User view and editing components of Elice material external",
|
|
5
5
|
"repository": "https://git.elicer.io/elice/frontend/library/elice-material",
|
|
6
6
|
"license": "UNLICENSED",
|
|
@@ -29,14 +29,14 @@
|
|
|
29
29
|
"clean": "del-cli \"es/*\" \"cjs/*\" \"dist/*\""
|
|
30
30
|
},
|
|
31
31
|
"peerDependencies": {
|
|
32
|
-
"@elice/api-client": "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/markdown": "^1.220803.0",
|
|
37
37
|
"@elice/material-shared-types": "*",
|
|
38
38
|
"@elice/material-shared-utils": "*",
|
|
39
|
-
"@elice/types": "1.
|
|
39
|
+
"@elice/types": "^1.230306.0",
|
|
40
40
|
"react": "^16.8.0 || ^17.0.0 || ^18.0.0",
|
|
41
41
|
"react-intl": "^5.0.0",
|
|
42
42
|
"react-use": "^17.0.0",
|
|
@@ -47,15 +47,15 @@
|
|
|
47
47
|
"tslib": "^2.3.1"
|
|
48
48
|
},
|
|
49
49
|
"devDependencies": {
|
|
50
|
-
"@elice/api-client": "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
55
|
"@elice/markdown": "^1.220803.0",
|
|
56
|
-
"@elice/material-shared-types": "1.
|
|
57
|
-
"@elice/material-shared-utils": "1.
|
|
58
|
-
"@elice/types": "1.
|
|
56
|
+
"@elice/material-shared-types": "1.230306.0",
|
|
57
|
+
"@elice/material-shared-utils": "1.230306.0",
|
|
58
|
+
"@elice/types": "^1.230306.0",
|
|
59
59
|
"@types/classnames": "^2.3.1",
|
|
60
60
|
"@types/react": "~17.0.9",
|
|
61
61
|
"@types/styled-components": "^5.1.21",
|
|
@@ -64,5 +64,5 @@
|
|
|
64
64
|
"react-use": "^17.2.4",
|
|
65
65
|
"styled-components": "^5.3.0"
|
|
66
66
|
},
|
|
67
|
-
"gitHead": "
|
|
67
|
+
"gitHead": "2ba30b7324d9fd782970a0343a6573827159b737"
|
|
68
68
|
}
|