survey-creator-react 3.2.6 → 3.2.8

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "survey-creator-react",
3
- "version": "3.2.6",
3
+ "version": "3.2.8",
4
4
  "description": "Embeddable SurveyJS drag-and-drop form builder for JSON-based forms in React. Create dynamic surveys, polls, quizzes, and other forms, configure conditional logic and validation, and customize the editor UI.",
5
5
  "author": "DevSoft Baltic OU <info@devsoftbaltic.com>",
6
6
  "homepage": "https://surveyjs.io/",
@@ -45,7 +45,11 @@
45
45
  "main": "survey-creator-react.js",
46
46
  "repository": {
47
47
  "type": "git",
48
- "url": "https://github.com/surveyjs/survey-creator.git"
48
+ "url": "git+https://github.com/surveyjs/survey-creator.git",
49
+ "directory": "packages/survey-creator-react"
50
+ },
51
+ "bugs": {
52
+ "url": "https://github.com/surveyjs/survey-creator/issues"
49
53
  },
50
54
  "engines": {
51
55
  "node": ">=0.10.0"
@@ -67,9 +71,9 @@
67
71
  "ace-builds": "^1.4.12",
68
72
  "react": "^16.5.0 || ^17.0.1 || ^18.1.0 || ^19.0.0",
69
73
  "react-dom": "^16.5.0 || ^17.0.1 || ^18.1.0 || ^19.0.0",
70
- "survey-core": "3.2.6",
71
- "survey-react-ui": "3.2.6",
72
- "survey-creator-core": "3.2.6"
74
+ "survey-core": "3.2.8",
75
+ "survey-react-ui": "3.2.8",
76
+ "survey-creator-core": "3.2.8"
73
77
  },
74
78
  "peerDependenciesMeta": {
75
79
  "ace-builds": {
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * SurveyJS Creator v3.2.6
2
+ * SurveyJS Creator v3.2.8
3
3
  * (c) 2015-2026 Devsoft Baltic OÜ - http://surveyjs.io/
4
4
  * Github: https://github.com/surveyjs/survey-creator
5
5
  * License: https://surveyjs.io/Licenses#SurveyCreator
@@ -174,17 +174,12 @@
174
174
  const creator = this.props.creator;
175
175
  if (creator.isCreatorDisposed)
176
176
  return null;
177
- const areaClassName = "svc-full-container svc-creator__area svc-flex-column" + (this.props.creator.haveCommercialLicense ? "" : " svc-creator__area--with-banner");
177
+ const areaClassName = "svc-full-container svc-creator__area svc-flex-column" + (this.props.creator.showLicenseBanner ? " svc-creator__area--with-banner" : "");
178
178
  const contentWrapperClassName = "svc-creator__content-wrapper svc-flex-row" + (this.props.creator.isMobileView ? " svc-creator__content-wrapper--footer-toolbar" : "");
179
179
  const fullContainerClassName = "svc-flex-row svc-full-container" + (" svc-creator__side-bar--" + this.creator.sidebarLocation);
180
180
  const creatorStyles = {};
181
181
  surveyCreatorCore.assign(creatorStyles, this.style, this.props.creator.themeVariables);
182
- let licenseBanner = null;
183
- if (!this.props.creator.haveCommercialLicense) {
184
- const htmlValue = { __html: this.props.creator.licenseText };
185
- licenseBanner = (React__namespace.createElement("div", { className: "svc-creator__banner" },
186
- React__namespace.createElement("span", { className: "svc-creator__non-commercial-text", dangerouslySetInnerHTML: htmlValue })));
187
- }
182
+ const licenseBanner = this.renderLicenseBanner();
188
183
  //AM: width unrecognized by react
189
184
  return (React__namespace.createElement("div", { className: this.creator.getRootCss(), ref: this.rootNode, style: creatorStyles },
190
185
  React__namespace.createElement(surveyReactUi.SvgBundleComponent, null),
@@ -211,6 +206,25 @@
211
206
  licenseBanner,
212
207
  React__namespace.createElement(surveyReactUi.NotifierComponent, { notifier: creator.notifier }))));
213
208
  }
209
+ renderLicenseBanner() {
210
+ const creator = this.props.creator;
211
+ if (!creator.showLicenseBanner)
212
+ return null;
213
+ const embedded = creator.embeddedLicenseBanner;
214
+ if (!embedded) {
215
+ const htmlValue = { __html: creator.licenseText };
216
+ return (React__namespace.createElement("div", { className: "svc-creator__banner" },
217
+ React__namespace.createElement("span", { className: "svc-creator__non-commercial-text", dangerouslySetInnerHTML: htmlValue })));
218
+ }
219
+ return (React__namespace.createElement("div", { className: "svc-embedded-banner" },
220
+ React__namespace.createElement("div", { className: "svc-embedded-banner__caption" },
221
+ React__namespace.createElement("span", { className: "svc-embedded-banner__powered-by" }, embedded.poweredByText),
222
+ React__namespace.createElement("span", { className: "svc-embedded-banner__brand", role: "img", "aria-label": embedded.brandText },
223
+ React__namespace.createElement(surveyReactUi.SvgIcon, { iconName: embedded.brandIconName, size: "auto" }))),
224
+ React__namespace.createElement("a", { className: "svc-embedded-banner__link", href: embedded.linkUrl, target: "_blank", rel: "noopener noreferrer" }, embedded.linkText),
225
+ React__namespace.createElement("button", { type: "button", className: "svc-embedded-banner__close", title: embedded.closeText, "aria-label": embedded.closeText, onClick: () => creator.closeLicenseBanner() },
226
+ React__namespace.createElement(surveyReactUi.SvgIcon, { iconName: embedded.closeIconName, size: "auto" }))));
227
+ }
214
228
  // The strip is a plain ComponentContainerModel, so the generic container
215
229
  // component draws it. `collabBar` is typed as Base in creator-core to keep the
216
230
  // creator free of a dependency on the collaboration plugin, hence the cast.
@@ -3014,20 +3028,14 @@
3014
3028
 
3015
3029
  let ItemTemplateComponent$1 = class ItemTemplateComponent extends surveyReactUi.SurveyElementBase {
3016
3030
  renderElement() {
3031
+ var _a;
3017
3032
  const item = this.props.item;
3018
3033
  return (React__namespace.createElement(React__namespace.Fragment, null,
3019
3034
  React__namespace.createElement(surveyReactUi.SvgIcon, { iconName: item.iconName, size: item.iconSize, className: "svc-json-error__icon" }),
3020
3035
  React__namespace.createElement("div", { className: "svc-json-error__container" },
3021
- React__namespace.createElement("div", { className: "svc-json-error__title" },
3036
+ React__namespace.createElement("div", { className: "svc-json-error__title", title: (_a = item.data.error) === null || _a === void 0 ? void 0 : _a.text, onMouseDown: (event) => event.stopPropagation() },
3022
3037
  React__namespace.createElement("span", { key: 2 }, this.renderLocString(item.locTitle, undefined, "locString"))),
3023
- this.renderFixButton())));
3024
- }
3025
- renderFixButton() {
3026
- if (!this.props.item.data.showFixButton)
3027
- return null;
3028
- const item = this.props.item;
3029
- return (surveyReactUi.attachKey2click(React__namespace.createElement("button", { type: "button", onClick: (event) => { event.stopPropagation(); item.data.fixError(); }, title: item.data.fixButtonTitle, "data-sv-tooltip": item.data.fixButtonTitle, className: "svc-json-error__fix-button" },
3030
- React__namespace.createElement(surveyReactUi.SvgIcon, { iconName: item.data.fixButtonIcon, size: "auto" }))));
3038
+ React__namespace.createElement(surveyReactUi.SurveyActionBar, { model: item.data.actions }))));
3031
3039
  }
3032
3040
  };
3033
3041
  surveyReactUi.ReactElementFactory.Instance.registerElement("json-error-item", (props) => {
@@ -3233,8 +3241,8 @@
3233
3241
  });
3234
3242
 
3235
3243
  exports.Version = void 0;
3236
- exports.Version = `${"3.2.6"}`;
3237
- surveyCore.checkLibraryVersion(`${"3.2.6"}`, "survey-creator-react");
3244
+ exports.Version = `${"3.2.8"}`;
3245
+ surveyCore.checkLibraryVersion(`${"3.2.8"}`, "survey-creator-react");
3238
3246
 
3239
3247
  Object.defineProperty(exports, "PropertyGridEditorCollection", {
3240
3248
  enumerable: true,