@elice/material-survey 1.230818.0 → 1.230825.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,7 +5,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
5
5
|
var React = require('react');
|
|
6
6
|
var reactHookForm = require('react-hook-form');
|
|
7
7
|
var reactIntl = require('react-intl');
|
|
8
|
-
var
|
|
8
|
+
var materialSharedUtils = require('@elice/material-shared-utils');
|
|
9
9
|
var editValue = require('./utils/editValue.js');
|
|
10
10
|
var context = require('./context.js');
|
|
11
11
|
var locales = require('./locales.js');
|
|
@@ -37,7 +37,7 @@ var MaterialSurveyEdit = React.forwardRef(function (_ref, ref) {
|
|
|
37
37
|
// Reset from value, when `value` changes.
|
|
38
38
|
// TODO: will be removed, since `CourseLecturesMaterialTemplate` removed at `elice-web`.
|
|
39
39
|
//
|
|
40
|
-
|
|
40
|
+
materialSharedUtils.useDeepClonedCompareEffect(function () {
|
|
41
41
|
useFormMethods.reset(editValue.manipulateValue(value), {
|
|
42
42
|
keepDirty: true,
|
|
43
43
|
keepErrors: true,
|
|
@@ -51,7 +51,7 @@ var MaterialSurveyEdit = React.forwardRef(function (_ref, ref) {
|
|
|
51
51
|
// Emit `onChange` handler when form value changed.
|
|
52
52
|
// TODO: will be removed, since `CourseLecturesMaterialTemplate` removed at `elice-web`.
|
|
53
53
|
//
|
|
54
|
-
|
|
54
|
+
materialSharedUtils.useDeepClonedCompareEffect(function () {
|
|
55
55
|
return onChange(editValue.restoreValue(watchedMaterialSurveyEditValue));
|
|
56
56
|
}, [watchedMaterialSurveyEditValue]);
|
|
57
57
|
//
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React, { forwardRef } from 'react';
|
|
2
2
|
import { useForm, FormProvider } from 'react-hook-form';
|
|
3
3
|
import { IntlProvider } from 'react-intl';
|
|
4
|
-
import {
|
|
4
|
+
import { useDeepClonedCompareEffect } from '@elice/material-shared-utils';
|
|
5
5
|
import { manipulateValue, restoreValue } from './utils/editValue.js';
|
|
6
6
|
import MaterialSurveyEditContext from './context.js';
|
|
7
7
|
import * as locales from './locales.js';
|
|
@@ -30,7 +30,7 @@ var MaterialSurveyEdit = forwardRef(function (_ref, ref) {
|
|
|
30
30
|
// Reset from value, when `value` changes.
|
|
31
31
|
// TODO: will be removed, since `CourseLecturesMaterialTemplate` removed at `elice-web`.
|
|
32
32
|
//
|
|
33
|
-
|
|
33
|
+
useDeepClonedCompareEffect(function () {
|
|
34
34
|
useFormMethods.reset(manipulateValue(value), {
|
|
35
35
|
keepDirty: true,
|
|
36
36
|
keepErrors: true,
|
|
@@ -44,7 +44,7 @@ var MaterialSurveyEdit = forwardRef(function (_ref, ref) {
|
|
|
44
44
|
// Emit `onChange` handler when form value changed.
|
|
45
45
|
// TODO: will be removed, since `CourseLecturesMaterialTemplate` removed at `elice-web`.
|
|
46
46
|
//
|
|
47
|
-
|
|
47
|
+
useDeepClonedCompareEffect(function () {
|
|
48
48
|
return onChange(restoreValue(watchedMaterialSurveyEditValue));
|
|
49
49
|
}, [watchedMaterialSurveyEditValue]);
|
|
50
50
|
//
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@elice/material-survey",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.230825.0",
|
|
4
4
|
"description": "User view and editing components of Elice material survey",
|
|
5
5
|
"repository": "https://git.elicer.io/elice/frontend/library/elice-material",
|
|
6
6
|
"license": "UNLICENSED",
|
|
@@ -51,8 +51,8 @@
|
|
|
51
51
|
"@elice/icons": "^1.230814.0",
|
|
52
52
|
"@elice/icons-legacy": "npm:@elice/icons@0.230814.0",
|
|
53
53
|
"@elice/markdown": "^1.220815.0",
|
|
54
|
-
"@elice/material-shared-types": "1.
|
|
55
|
-
"@elice/material-shared-utils": "1.
|
|
54
|
+
"@elice/material-shared-types": "1.230825.0",
|
|
55
|
+
"@elice/material-shared-utils": "1.230825.0",
|
|
56
56
|
"@elice/types": "^1.230815.0",
|
|
57
57
|
"@types/classnames": "^2.3.1",
|
|
58
58
|
"@types/react": "~17.0.9",
|
|
@@ -63,5 +63,5 @@
|
|
|
63
63
|
"react-use": "^17.2.4",
|
|
64
64
|
"styled-components": "^5.3.0"
|
|
65
65
|
},
|
|
66
|
-
"gitHead": "
|
|
66
|
+
"gitHead": "5859affd33ce2d07bb176bad73bc5cf4ed1c4138"
|
|
67
67
|
}
|