@elice/material-survey 1.240715.0-touch.5 → 1.240715.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.
@@ -6,14 +6,9 @@ var React = require('react');
6
6
  var blocks = require('@elice/blocks');
7
7
  var designTokens = require('@elice/design-tokens');
8
8
  var markdown = require('@elice/markdown');
9
- var wysiwyg = require('@elice/wysiwyg');
10
- var styled = require('styled-components');
11
9
  var SurveyContentBox = require('../shared/SurveyContentBox.js');
12
10
  var MaterialSurveyContext = require('./context/MaterialSurveyContext.js');
13
11
 
14
- const StyledMarkdownSSR = styled(markdown.MarkdownSSR).withConfig({
15
- componentId: "sc-1b9l43w-0"
16
- })(["", ""], wysiwyg.EliceWysiwygEditorTheme.resetMarkdownSSR);
17
12
  const MaterialSurveyInfo = () => {
18
13
  const {
19
14
  materialSurvey
@@ -39,7 +34,7 @@ const MaterialSurveyInfo = () => {
39
34
  height: '40px'
40
35
  }), React.createElement(blocks.Vspace, {
41
36
  height: 1
42
- }), materialSurvey ? React.createElement(StyledMarkdownSSR, {
37
+ }), materialSurvey ? React.createElement(markdown.MarkdownSSR, {
43
38
  children: materialSurvey.questionInfoList[0].questionDescription,
44
39
  dark: true,
45
40
  paddingx: 0,
@@ -6,9 +6,9 @@ var React = require('react');
6
6
  var reactHookForm = require('react-hook-form');
7
7
  var blocks = require('@elice/blocks');
8
8
  var intl = require('@elice/intl');
9
+ var markdown = require('@elice/markdown');
9
10
  var types = require('@elice/types');
10
11
  var styled = require('styled-components');
11
- var index = require('../markdown-editor/index.js');
12
12
  var randomId = require('./utils/randomId.js');
13
13
  var context = require('./context.js');
14
14
  var MaterialSurveyEditOptionSelect = require('./MaterialSurveyEditOptionSelect.js');
@@ -154,7 +154,8 @@ const MaterialSurveyEditContent = () => {
154
154
  name: "questionInfoList.0.questionDescription",
155
155
  render: ({
156
156
  field
157
- }) => React.createElement(index.MarkdownEditor, Object.assign({
157
+ }) => React.createElement(markdown.MarkdownEditor, Object.assign({
158
+ enableFooter: true,
158
159
  placeholder: intl$1.formatMessage({
159
160
  id: 'content.description.placeholder'
160
161
  }),
@@ -2,14 +2,9 @@ import React from 'react';
2
2
  import { Flex, Text, Shimmer, Vspace } from '@elice/blocks';
3
3
  import { base } from '@elice/design-tokens';
4
4
  import { MarkdownSSR } from '@elice/markdown';
5
- import { EliceWysiwygEditorTheme } from '@elice/wysiwyg';
6
- import styled from 'styled-components';
7
5
  import SurveyContentBox from '../shared/SurveyContentBox.js';
8
6
  import { useMaterialSurveyState } from './context/MaterialSurveyContext.js';
9
7
 
10
- const StyledMarkdownSSR = styled(MarkdownSSR).withConfig({
11
- componentId: "sc-1b9l43w-0"
12
- })(["", ""], EliceWysiwygEditorTheme.resetMarkdownSSR);
13
8
  const MaterialSurveyInfo = () => {
14
9
  const {
15
10
  materialSurvey
@@ -35,7 +30,7 @@ const MaterialSurveyInfo = () => {
35
30
  height: '40px'
36
31
  }), React.createElement(Vspace, {
37
32
  height: 1
38
- }), materialSurvey ? React.createElement(StyledMarkdownSSR, {
33
+ }), materialSurvey ? React.createElement(MarkdownSSR, {
39
34
  children: materialSurvey.questionInfoList[0].questionDescription,
40
35
  dark: true,
41
36
  paddingx: 0,
@@ -2,9 +2,9 @@ import React from 'react';
2
2
  import { useFormContext, Controller } from 'react-hook-form';
3
3
  import { FormInputVerticalLayout, Label, Input, Tooltip, Select, Vspace } from '@elice/blocks';
4
4
  import { useRawEliceIntl } from '@elice/intl';
5
+ import { MarkdownEditor } from '@elice/markdown';
5
6
  import { enums } from '@elice/types';
6
7
  import styled from 'styled-components';
7
- import { MarkdownEditor } from '../markdown-editor/index.js';
8
8
  import { createRandomId } from './utils/randomId.js';
9
9
  import { useMaterialSurveyEditContext } from './context.js';
10
10
  import OptionSelectOne from './MaterialSurveyEditOptionSelect.js';
@@ -151,6 +151,7 @@ const MaterialSurveyEditContent = () => {
151
151
  render: ({
152
152
  field
153
153
  }) => React.createElement(MarkdownEditor, Object.assign({
154
+ enableFooter: true,
154
155
  placeholder: intl.formatMessage({
155
156
  id: 'content.description.placeholder'
156
157
  }),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@elice/material-survey",
3
- "version": "1.240715.0-touch.5",
3
+ "version": "1.240715.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",
@@ -34,7 +34,6 @@
34
34
  "@elice/material-shared-types": "*",
35
35
  "@elice/material-shared-utils": "*",
36
36
  "@elice/types": "^1",
37
- "@elice/wysiwyg": "^1",
38
37
  "react": "^16.8.0 || ^17.0.0 || ^18.0.0",
39
38
  "react-use": "^17.0.0",
40
39
  "styled-components": "^5.2.0"
@@ -53,10 +52,9 @@
53
52
  "@elice/icons-legacy": "npm:@elice/icons@0.230814.0",
54
53
  "@elice/intl": "0.240425.0-rc.2",
55
54
  "@elice/markdown": "^1.220815.0",
56
- "@elice/material-shared-types": "1.240715.0-touch.5",
57
- "@elice/material-shared-utils": "1.240715.0-touch.5",
55
+ "@elice/material-shared-types": "1.240715.0",
56
+ "@elice/material-shared-utils": "1.240715.0",
58
57
  "@elice/types": "^1.240619.0",
59
- "@elice/wysiwyg": "1.240716.1",
60
58
  "@types/classnames": "^2.3.1",
61
59
  "@types/react": "~17.0.9",
62
60
  "@types/react-transition-group": "^4.4.4",
@@ -65,5 +63,5 @@
65
63
  "react-use": "^17.2.4",
66
64
  "styled-components": "^5.3.0"
67
65
  },
68
- "gitHead": "3b07b7d94b53db047b1866600eb51b52d259ddc7"
66
+ "gitHead": "c379e8820a96c12637f75eab96edc18a06188009"
69
67
  }
@@ -1,3 +0,0 @@
1
- import React from 'react';
2
- import type { EliceWysiwygEditorProps } from '@elice/wysiwyg';
3
- export declare const MarkdownEditor: ({ value, onChange, ...props }: EliceWysiwygEditorProps) => React.JSX.Element;
@@ -1,28 +0,0 @@
1
- 'use strict';
2
-
3
- var tslib = require('tslib');
4
- var React = require('react');
5
- var reactUse = require('react-use');
6
- var wysiwyg = require('@elice/wysiwyg');
7
-
8
- const STATE_SYNC_DEBOUNCE_TIME = 50;
9
- const MarkdownEditor = _a => {
10
- var {
11
- value,
12
- onChange
13
- } = _a,
14
- props = tslib.__rest(_a, ["value", "onChange"]);
15
- const [__value, __setValue] = React.useState(value);
16
- reactUse.useDebounce(() => __setValue(value), STATE_SYNC_DEBOUNCE_TIME, [value]);
17
- reactUse.useDebounce(() => {
18
- if (__value !== value && typeof onChange === 'function') {
19
- onChange(__value !== null && __value !== void 0 ? __value : '');
20
- }
21
- }, STATE_SYNC_DEBOUNCE_TIME, [__value]);
22
- return React.createElement(wysiwyg.EliceWysiwygEditor, Object.assign({
23
- value: value,
24
- onChange: __setValue
25
- }, props));
26
- };
27
-
28
- exports.MarkdownEditor = MarkdownEditor;
@@ -1,3 +0,0 @@
1
- import React from 'react';
2
- import type { EliceWysiwygEditorProps } from '@elice/wysiwyg';
3
- export declare const MarkdownEditor: ({ value, onChange, ...props }: EliceWysiwygEditorProps) => React.JSX.Element;
@@ -1,26 +0,0 @@
1
- import { __rest } from 'tslib';
2
- import React from 'react';
3
- import { useDebounce } from 'react-use';
4
- import { EliceWysiwygEditor } from '@elice/wysiwyg';
5
-
6
- const STATE_SYNC_DEBOUNCE_TIME = 50;
7
- const MarkdownEditor = _a => {
8
- var {
9
- value,
10
- onChange
11
- } = _a,
12
- props = __rest(_a, ["value", "onChange"]);
13
- const [__value, __setValue] = React.useState(value);
14
- useDebounce(() => __setValue(value), STATE_SYNC_DEBOUNCE_TIME, [value]);
15
- useDebounce(() => {
16
- if (__value !== value && typeof onChange === 'function') {
17
- onChange(__value !== null && __value !== void 0 ? __value : '');
18
- }
19
- }, STATE_SYNC_DEBOUNCE_TIME, [__value]);
20
- return React.createElement(EliceWysiwygEditor, Object.assign({
21
- value: value,
22
- onChange: __setValue
23
- }, props));
24
- };
25
-
26
- export { MarkdownEditor };