jamespot-react-components 1.0.2 → 1.0.3

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.
@@ -65,7 +65,6 @@ export { JRCGrid };
65
65
  import JRCPagination from './components/JRCPagination/JRCPagination';
66
66
  export { JRCPagination };
67
67
  export { JRCFormTextarea, JRCFormTextareaField } from './components/Form/Input/JRCFormTextarea/JRCFormTextarea';
68
- export { JRCFormTextEditorField } from './components/Form/Input/JRCFormTextEditor/JRCFormTextEditor';
69
68
  export { JRCList } from './components/JRCList/JRCList';
70
69
  import JRCModalImg from './components/JRCModalImg/JRCModalImg';
71
70
  export { JRCModalImg };
package/externals.d.ts CHANGED
@@ -2,4 +2,3 @@ declare module '*.scss';
2
2
  declare module '*.css';
3
3
  declare module '*.json';
4
4
  declare module 'react-intl-translations-manager';
5
- declare module 'react-quill';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "jamespot-react-components",
3
- "version": "1.0.2",
3
+ "version": "1.0.3",
4
4
  "description": "",
5
5
  "main": "./build/jamespot-react-components.js",
6
6
  "types": "./build/src/index.d.ts",
@@ -96,7 +96,7 @@
96
96
  "@types/redux-logger": "^3.0.8",
97
97
  "chroma-js": "^2.1.1",
98
98
  "classnames": "^2.3.1",
99
- "jamespot-user-api": "^1.0.0",
99
+ "jamespot-user-api": "file:../jamespot-user-api",
100
100
  "moment": "^2.29.1",
101
101
  "react": "^17.x",
102
102
  "react-dnd": "^14.0.4",
@@ -104,7 +104,6 @@
104
104
  "react-dom": "^17.0.2",
105
105
  "react-hook-form": "^7.25.0",
106
106
  "react-intl": "^5.8.6",
107
- "react-quill": "^1.3.5",
108
107
  "react-redux": "^7.2.3",
109
108
  "react-select": "^3.2.0",
110
109
  "react-slick": "^0.28.1",
package/src/index.tsx CHANGED
@@ -128,8 +128,6 @@ export { JRCPagination };
128
128
 
129
129
  export { JRCFormTextarea, JRCFormTextareaField } from './components/Form/Input/JRCFormTextarea/JRCFormTextarea';
130
130
 
131
- export { JRCFormTextEditorField } from './components/Form/Input/JRCFormTextEditor/JRCFormTextEditor';
132
-
133
131
  export { JRCList } from './components/JRCList/JRCList';
134
132
 
135
133
  import JRCModalImg from './components/JRCModalImg/JRCModalImg';
@@ -1,10 +0,0 @@
1
- import { JRCWritableFormInputProps } from '../JRCFormFieldRender';
2
- import 'react-quill/dist/quill.snow.css';
3
- /**
4
- * @deprecated The component @link JRCFormRichTextField must be used to replace JRCFormTextEditorField
5
- * Component used as a rich text editor
6
- * @param props JRCWritableFormInputProps
7
- * validation props: minValue, maxValue, required
8
- * @returns JSX.Element
9
- */
10
- export declare const JRCFormTextEditorField: (props: JRCWritableFormInputProps) => JSX.Element;
@@ -1,5 +0,0 @@
1
- import { JRCWritableFormInputProps } from '../JRCFormFieldRender';
2
- import { Meta, Story } from '@storybook/react';
3
- declare const _default: Meta<import("@storybook/react").Args>;
4
- export default _default;
5
- export declare const InputTextEditor: Story<JRCWritableFormInputProps>;
@@ -1,30 +0,0 @@
1
- import * as React from 'react';
2
- import { withReduxForm } from '../../../../storybook/decorators';
3
- import { JRCWritableFormInputProps } from '../JRCFormFieldRender';
4
- import { JRCFormTextEditorField } from './JRCFormTextEditor';
5
- import { Meta, Story } from '@storybook/react';
6
-
7
- export default {
8
- title: 'Inputs/old',
9
- component: JRCFormTextEditorField,
10
- decorators: [withReduxForm],
11
- } as Meta;
12
-
13
- const Template: Story<JRCWritableFormInputProps> = (args) => (
14
- <>
15
- <h1>Deprecated: use RichTextEditor</h1>
16
- <JRCFormTextEditorField {...args} />
17
- </>
18
- );
19
-
20
- export const InputTextEditor = Template.bind({});
21
- InputTextEditor.args = {
22
- name: 'name-storybook',
23
- label: 'Article',
24
- description: 'Ecrivez un article captivant pour vos auditeurs, ni trop long, ni trop court, juste suffisant.',
25
- placeholder: "Moi, j'aime les haricots",
26
- helper: { description: 'Si vis pacem, para bellum', title: 'Indication' },
27
- minLength: 3,
28
- maxLength: 2500,
29
- required: false,
30
- };
@@ -1,36 +0,0 @@
1
- import * as React from 'react';
2
- import { Field, WrappedFieldInputProps } from 'redux-form';
3
- import JRCFormFieldRender, { JRCWritableFormInputProps } from '../JRCFormFieldRender';
4
- import { useControls } from '../ReduxFormControls';
5
- import ReactQuill from 'react-quill';
6
- import 'react-quill/dist/quill.snow.css';
7
- import { useIntl } from 'react-intl';
8
-
9
- const renderInput = (input: WrappedFieldInputProps) => {
10
- return <ReactQuill theme="snow" value={input.value} onChange={input.onChange} />;
11
- };
12
-
13
- /**
14
- * @deprecated The component @link JRCFormRichTextField must be used to replace JRCFormTextEditorField
15
- * Component used as a rich text editor
16
- * @param props JRCWritableFormInputProps
17
- * validation props: minValue, maxValue, required
18
- * @returns JSX.Element
19
- */
20
- export const JRCFormTextEditorField = (props: JRCWritableFormInputProps) => {
21
- const validate = useControls({
22
- intl: useIntl(),
23
- minLength: props.minLength,
24
- maxLength: props.maxLength,
25
- required: props.required,
26
- });
27
- return (
28
- <Field
29
- component={JRCFormFieldRender}
30
- renderInputFct={(input: WrappedFieldInputProps) => renderInput(input)}
31
- validate={validate}
32
- htmlFor={props.name}
33
- {...props}
34
- />
35
- );
36
- };