@elice/material-quiz 1.250320.0 → 1.250321.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.
@@ -235,21 +235,19 @@ var MaterialQuizImage = function MaterialQuizImage(_ref) {
235
235
  children: intl$1.formatMessage({
236
236
  id: "materialQuiz.".concat(userId ? 'submitted' : 'upload', "_file")
237
237
  })
238
- }), jsxRuntime.jsx(fileClient.ServiceClientProvider, {
239
- service: fileClient.EliceFileService.AzureBlob,
240
- children: jsxRuntime.jsx(fileClient.FileUpload, {
241
- multiple: false,
242
- readOnly: Boolean(userId),
243
- preview: true,
244
- accept: {
245
- 'application/*': ['.mpg', '.wmv', '.avi', '.mkv', '.wavm', '.jpg', '.jpeg', '.png']
246
- },
247
- maxSize: MAX_FILE_SIZE,
248
- value: uploadResourceId,
249
- onChange: function onChange(nextResourceId) {
250
- setUploadResourceId(nextResourceId);
251
- }
252
- })
238
+ }), jsxRuntime.jsx(fileClient.FileUpload, {
239
+ multiple: false,
240
+ readOnly: Boolean(userId),
241
+ preview: true,
242
+ accept: {
243
+ 'application/*': ['.mpg', '.wmv', '.avi', '.mkv', '.wavm', '.jpg', '.jpeg', '.png']
244
+ },
245
+ maxSize: MAX_FILE_SIZE,
246
+ value: uploadResourceId,
247
+ onChange: function onChange(nextResource) {
248
+ var _a;
249
+ setUploadResourceId((_a = nextResource === null || nextResource === void 0 ? void 0 : nextResource.resourceId) !== null && _a !== void 0 ? _a : null);
250
+ }
253
251
  })]
254
252
  });
255
253
  };
@@ -4,7 +4,7 @@ import React from 'react';
4
4
  import { useMount } from 'react-use';
5
5
  import { getOrgMaterialQuizResponseGet, getOrgMaterialQuizResponseList, postOrgMaterialQuizResponseAdd } from '@elice/api-client';
6
6
  import { base } from '@elice/design-tokens';
7
- import { ServiceClientProvider, EliceFileService, FileUpload } from '@elice/file-client';
7
+ import { FileUpload } from '@elice/file-client';
8
8
  import { useRawEliceIntl } from '@elice/intl';
9
9
  import { useTheme, Stack, FormLabel } from '@mui/material';
10
10
  import { useQueryClient, useQuery } from '@tanstack/react-query';
@@ -227,21 +227,19 @@ var MaterialQuizImage = function MaterialQuizImage(_ref) {
227
227
  children: intl.formatMessage({
228
228
  id: "materialQuiz.".concat(userId ? 'submitted' : 'upload', "_file")
229
229
  })
230
- }), jsx(ServiceClientProvider, {
231
- service: EliceFileService.AzureBlob,
232
- children: jsx(FileUpload, {
233
- multiple: false,
234
- readOnly: Boolean(userId),
235
- preview: true,
236
- accept: {
237
- 'application/*': ['.mpg', '.wmv', '.avi', '.mkv', '.wavm', '.jpg', '.jpeg', '.png']
238
- },
239
- maxSize: MAX_FILE_SIZE,
240
- value: uploadResourceId,
241
- onChange: function onChange(nextResourceId) {
242
- setUploadResourceId(nextResourceId);
243
- }
244
- })
230
+ }), jsx(FileUpload, {
231
+ multiple: false,
232
+ readOnly: Boolean(userId),
233
+ preview: true,
234
+ accept: {
235
+ 'application/*': ['.mpg', '.wmv', '.avi', '.mkv', '.wavm', '.jpg', '.jpeg', '.png']
236
+ },
237
+ maxSize: MAX_FILE_SIZE,
238
+ value: uploadResourceId,
239
+ onChange: function onChange(nextResource) {
240
+ var _a;
241
+ setUploadResourceId((_a = nextResource === null || nextResource === void 0 ? void 0 : nextResource.resourceId) !== null && _a !== void 0 ? _a : null);
242
+ }
245
243
  })]
246
244
  });
247
245
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@elice/material-quiz",
3
- "version": "1.250320.0",
3
+ "version": "1.250321.0",
4
4
  "description": "User view and editing components of Elice material quiz",
5
5
  "repository": "https://git.elicer.io/elice/frontend/library/elice-material",
6
6
  "license": "UNLICENSED",
@@ -71,13 +71,13 @@
71
71
  "@elice/api-client": "^1.241220.0",
72
72
  "@elice/blocks": "1.241007.0",
73
73
  "@elice/design-tokens": "^1.220803.0",
74
- "@elice/file-client": "^1.241220.0",
74
+ "@elice/file-client": "^1.250307.0",
75
75
  "@elice/icons": "^1.230814.0",
76
76
  "@elice/icons-legacy": "npm:@elice/icons@0.230814.0",
77
77
  "@elice/intl": "0.241127.0",
78
78
  "@elice/markdown": "1.241015.0",
79
- "@elice/material-shared-types": "1.250320.0",
80
- "@elice/material-shared-utils": "1.250320.0",
79
+ "@elice/material-shared-types": "1.250321.0",
80
+ "@elice/material-shared-utils": "1.250321.0",
81
81
  "@elice/mui-elements": "^5.250108.0-controllabel.0",
82
82
  "@elice/mui-system": "^5.250108.0-controllabel.0",
83
83
  "@elice/openapi-client-course": "^1.241220.0",