sprint-asia-custom-component 0.1.74 → 0.1.76
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.
- package/dist/index.js +12 -9
- package/package.json +1 -1
- package/src/components/texteditor/index.js +33 -47
- package/src/index.js +2 -0
- package/src/templates/index.js +990 -1060
package/dist/index.js
CHANGED
|
@@ -44150,7 +44150,8 @@
|
|
|
44150
44150
|
title = "",
|
|
44151
44151
|
value,
|
|
44152
44152
|
onChange,
|
|
44153
|
-
isRequired = true
|
|
44153
|
+
isRequired = true,
|
|
44154
|
+
className
|
|
44154
44155
|
}) => {
|
|
44155
44156
|
// ADDED function to handle the change from parent
|
|
44156
44157
|
|
|
@@ -44158,7 +44159,7 @@
|
|
|
44158
44159
|
onChange(content);
|
|
44159
44160
|
};
|
|
44160
44161
|
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
44161
|
-
className: "w-full
|
|
44162
|
+
className: "w-full"
|
|
44162
44163
|
}, title && /*#__PURE__*/React__default["default"].createElement("div", {
|
|
44163
44164
|
className: "flex"
|
|
44164
44165
|
}, /*#__PURE__*/React__default["default"].createElement("p", {
|
|
@@ -44168,20 +44169,21 @@
|
|
|
44168
44169
|
}, "*")), /*#__PURE__*/React__default["default"].createElement(ReactQuill$1, {
|
|
44169
44170
|
value: value,
|
|
44170
44171
|
onChange: handleChange,
|
|
44172
|
+
className: className,
|
|
44171
44173
|
modules: {
|
|
44172
44174
|
toolbar: [[{
|
|
44173
|
-
|
|
44174
|
-
}], [
|
|
44175
|
-
|
|
44175
|
+
header: [1, 3, 4, 5, 6, false]
|
|
44176
|
+
}], ["bold", "italic", "link", {
|
|
44177
|
+
list: "bullet"
|
|
44176
44178
|
}, {
|
|
44177
|
-
|
|
44179
|
+
list: "ordered"
|
|
44178
44180
|
}], [{
|
|
44179
|
-
|
|
44181
|
+
indent: "-1"
|
|
44180
44182
|
}, {
|
|
44181
|
-
|
|
44183
|
+
indent: "+1"
|
|
44182
44184
|
}]]
|
|
44183
44185
|
},
|
|
44184
|
-
formats: [
|
|
44186
|
+
formats: ["header", "bold", "italic", "strike", "blockquote", "list", "bullet", "link", "indent"]
|
|
44185
44187
|
}));
|
|
44186
44188
|
};
|
|
44187
44189
|
|
|
@@ -48077,6 +48079,7 @@
|
|
|
48077
48079
|
exports.Stepper = Stepper;
|
|
48078
48080
|
exports.Switch = Switch;
|
|
48079
48081
|
exports.TabBar = TabBar;
|
|
48082
|
+
exports.TextEditor = TextEditor;
|
|
48080
48083
|
exports.TextInput = TextInput;
|
|
48081
48084
|
exports.VerticalStepBar = VerticalStepBar;
|
|
48082
48085
|
|
package/package.json
CHANGED
|
@@ -1,56 +1,42 @@
|
|
|
1
|
-
import React from
|
|
2
|
-
import ReactQuill from
|
|
3
|
-
import
|
|
4
|
-
|
|
1
|
+
import React from "react";
|
|
2
|
+
import ReactQuill from "react-quill";
|
|
3
|
+
import "../../assets/css/reactquill/quill.snow.css";
|
|
5
4
|
|
|
6
5
|
// ADDED value and onChange
|
|
7
6
|
|
|
8
|
-
const TextEditor = ({
|
|
9
|
-
|
|
10
|
-
value,
|
|
11
|
-
onChange,
|
|
12
|
-
isRequired = true,
|
|
13
|
-
}) => {
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
// ADDED function to handle the change from parent
|
|
17
|
-
|
|
18
|
-
const handleChange = (content) => {
|
|
19
|
-
onChange(content);
|
|
20
|
-
};
|
|
21
|
-
|
|
22
|
-
return (
|
|
23
|
-
<div className='w-full h-60'>
|
|
24
|
-
{title &&
|
|
25
|
-
<div className='flex'>
|
|
26
|
-
<p className="text-sm font-normal text-black mb-1">{title}</p>
|
|
27
|
-
{isRequired && <p className="text-sm font-normal text-danger500 ml-1">*</p>}
|
|
28
|
-
</div>
|
|
29
|
-
}
|
|
30
|
-
|
|
7
|
+
const TextEditor = ({ title = "", value, onChange, isRequired = true, className }) => {
|
|
8
|
+
// ADDED function to handle the change from parent
|
|
31
9
|
|
|
32
|
-
|
|
10
|
+
const handleChange = (content) => {
|
|
11
|
+
onChange(content);
|
|
12
|
+
};
|
|
33
13
|
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
['bold', 'italic', 'link', { 'list': 'bullet' }, { 'list': 'ordered' }],
|
|
41
|
-
[{ 'indent': '-1' }, { 'indent': '+1' }],
|
|
42
|
-
],
|
|
43
|
-
}}
|
|
44
|
-
formats={[
|
|
45
|
-
'header',
|
|
46
|
-
'bold', 'italic', 'strike', 'blockquote',
|
|
47
|
-
'list', 'bullet',
|
|
48
|
-
'link',
|
|
49
|
-
'indent',
|
|
50
|
-
]}
|
|
51
|
-
/>
|
|
14
|
+
return (
|
|
15
|
+
<div className="w-full">
|
|
16
|
+
{title && (
|
|
17
|
+
<div className="flex">
|
|
18
|
+
<p className="text-sm font-normal text-black mb-1">{title}</p>
|
|
19
|
+
{isRequired && <p className="text-sm font-normal text-danger500 ml-1">*</p>}
|
|
52
20
|
</div>
|
|
53
|
-
|
|
21
|
+
)}
|
|
22
|
+
|
|
23
|
+
{/* ADDED the parameters to be used in Parent*/}
|
|
24
|
+
|
|
25
|
+
<ReactQuill
|
|
26
|
+
value={value}
|
|
27
|
+
onChange={handleChange}
|
|
28
|
+
className={className}
|
|
29
|
+
modules={{
|
|
30
|
+
toolbar: [
|
|
31
|
+
[{ header: [1, 3, 4, 5, 6, false] }],
|
|
32
|
+
["bold", "italic", "link", { list: "bullet" }, { list: "ordered" }],
|
|
33
|
+
[{ indent: "-1" }, { indent: "+1" }],
|
|
34
|
+
],
|
|
35
|
+
}}
|
|
36
|
+
formats={["header", "bold", "italic", "strike", "blockquote", "list", "bullet", "link", "indent"]}
|
|
37
|
+
/>
|
|
38
|
+
</div>
|
|
39
|
+
);
|
|
54
40
|
};
|
|
55
41
|
|
|
56
42
|
export default TextEditor;
|
package/src/index.js
CHANGED
|
@@ -86,6 +86,7 @@ import SearchDropdown from "./components/searchdropdown";
|
|
|
86
86
|
import FilterDropdown from "./components/filter/filterDropdown";
|
|
87
87
|
import Footer from "./components/footer";
|
|
88
88
|
import Header from "./components/header";
|
|
89
|
+
import TextEditor from "./components/texteditor";
|
|
89
90
|
|
|
90
91
|
export {
|
|
91
92
|
Header,
|
|
@@ -144,4 +145,5 @@ export {
|
|
|
144
145
|
DepositList,
|
|
145
146
|
ModalDeposit,
|
|
146
147
|
DescriptionFile,
|
|
148
|
+
TextEditor,
|
|
147
149
|
};
|