react-survey-builder 1.0.18 → 1.0.19
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 +1 -1
- package/lib/index.js +8 -3
- package/lib/language-provider/locales/en-us.json +1 -1
- package/package.json +1 -1
- package/types/index.d.ts +3 -0
package/lib/index.js
CHANGED
@@ -92,7 +92,8 @@ var ReactSurveyBuilder = exports.ReactSurveyBuilder = /*#__PURE__*/function (_Re
|
|
92
92
|
}, {
|
93
93
|
key: "render",
|
94
94
|
value: function render() {
|
95
|
-
var _this$props$
|
95
|
+
var _this$props$editSurve,
|
96
|
+
_this$props$surveyNam,
|
96
97
|
_this2 = this,
|
97
98
|
_this$props$saveSurve;
|
98
99
|
var toolbarProps = {
|
@@ -132,14 +133,18 @@ var ReactSurveyBuilder = exports.ReactSurveyBuilder = /*#__PURE__*/function (_Re
|
|
132
133
|
saveAlways: this.props.saveAlways
|
133
134
|
})), /*#__PURE__*/_react["default"].createElement(_reactBootstrap.Col, {
|
134
135
|
md: 3
|
136
|
+
}, /*#__PURE__*/_react["default"].createElement("div", {
|
137
|
+
className: this.props.surveyToolbarClassName
|
135
138
|
}, /*#__PURE__*/_react["default"].createElement("div", {
|
136
139
|
className: "border border-light border-3 p-3 d-grid gap-1 mb-3"
|
137
|
-
}, /*#__PURE__*/_react["default"].createElement("div", null, /*#__PURE__*/_react["default"].createElement("h4", null, (_this$props$surveyNam = this.props.surveyName) !== null && _this$props$surveyNam !== void 0 ? _this$props$surveyNam : 'Preview')), /*#__PURE__*/_react["default"].createElement(_reactBootstrap.Button, {
|
140
|
+
}, (_this$props$editSurve = this.props.editSurveyBlock) !== null && _this$props$editSurve !== void 0 ? _this$props$editSurve : /*#__PURE__*/_react["default"].createElement("div", null, /*#__PURE__*/_react["default"].createElement("h4", null, (_this$props$surveyNam = this.props.surveyName) !== null && _this$props$surveyNam !== void 0 ? _this$props$surveyNam : 'Preview')), !!!this.props.saveAlways && /*#__PURE__*/_react["default"].createElement(_reactBootstrap.Button, {
|
138
141
|
variant: "primary",
|
139
142
|
onClick: function onClick() {
|
140
143
|
_this2.saveFormData();
|
141
144
|
}
|
142
|
-
}, (_this$props$saveSurve = this.props.saveSurveyName) !== null && _this$props$saveSurve !== void 0 ? _this$props$saveSurve : 'Save Survey')), /*#__PURE__*/_react["default"].createElement(
|
145
|
+
}, (_this$props$saveSurve = this.props.saveSurveyName) !== null && _this$props$saveSurve !== void 0 ? _this$props$saveSurve : 'Save Survey')), this.props.previewSurveyBlock ? /*#__PURE__*/_react["default"].createElement("div", {
|
146
|
+
className: "border border-light border-3 p-3 d-grid gap-1 mb-3"
|
147
|
+
}, this.props.previewSurveyBlock) : null), /*#__PURE__*/_react["default"].createElement(_toolbar["default"], (0, _extends2["default"])({}, toolbarProps, {
|
143
148
|
customItems: this.props.customToolbarItems
|
144
149
|
}))))))));
|
145
150
|
}
|
@@ -50,7 +50,7 @@
|
|
50
50
|
"place-holder-tag-1": "Place holder option 1",
|
51
51
|
"place-holder-tag-2": "Place holder option 2",
|
52
52
|
"place-holder-tag-3": "Place holder option 3",
|
53
|
-
"toolbox": "Toolbox",
|
53
|
+
"toolbox": "Survey Blocks Toolbox",
|
54
54
|
"header-text": "Header Text",
|
55
55
|
"label": "Label",
|
56
56
|
"paragraph": "Paragraph",
|
package/package.json
CHANGED
package/types/index.d.ts
CHANGED
@@ -128,6 +128,9 @@ export type ToolbarItem = {
|
|
128
128
|
export interface SurveyBuilderProps {
|
129
129
|
surveyName?: string;
|
130
130
|
saveSurveyName?: string;
|
131
|
+
editSurveyBlock?: React.ReactNode;
|
132
|
+
previewSurveyBlock?: React.ReactNode;
|
133
|
+
surveyToolbarClassName?: string;
|
131
134
|
toolbarItems?: ToolbarItem[];
|
132
135
|
files?: any[];
|
133
136
|
url?: string;
|