survey-creator-js 2.0.4 → 2.0.6

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.
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * SurveyJS Creator UI v2.0.4
2
+ * SurveyJS Creator UI v2.0.6
3
3
  * (c) 2015-2025 Devsoft Baltic OÜ - http://surveyjs.io/
4
4
  * Github: https://github.com/surveyjs/survey-creator
5
5
  * License: https://surveyjs.io/Licenses#SurveyCreator
@@ -207,20 +207,13 @@ class SurveyCreatorComponent extends SurveyElementBase {
207
207
  }
208
208
  }
209
209
  }
210
- class SurveyCreator extends SurveyCreatorModel {
210
+ let SurveyCreator$1 = class SurveyCreator extends SurveyCreatorModel {
211
211
  constructor(options = {}, options2) {
212
212
  super(options, options2);
213
213
  }
214
214
  render(target) {
215
- let node = target;
216
- if (typeof target === "string") {
217
- node = document.getElementById(target);
218
- }
219
- /* eslint-disable react/no-deprecated */
220
- React.unmountComponentAtNode(node);
221
- React.render(React.createElement(React.StrictMode, null,
222
- React.createElement(SurveyCreatorComponent, { creator: this })), node);
223
- /* eslint-enable react/no-deprecated */
215
+ // eslint-disable-next-line no-console
216
+ console.error("The render method is deprecated. Use SurveyCreatorComponent instead.");
224
217
  }
225
218
  //ISurveyCreator
226
219
  createQuestionElement(question) {
@@ -244,7 +237,7 @@ class SurveyCreator extends SurveyCreatorModel {
244
237
  questionErrorLocation() {
245
238
  return this.survey.questionErrorLocation;
246
239
  }
247
- }
240
+ };
248
241
  ReactElementFactory.Instance.registerElement("survey-widget", (props) => {
249
242
  return React.createElement(Survey, props);
250
243
  });
@@ -2813,22 +2806,33 @@ ReactQuestionFactory.Instance.registerQuestion("sv-boolean-switch", (props) => {
2813
2806
  RendererFactory.Instance.registerRenderer("boolean", "switch", "sv-boolean-switch");
2814
2807
 
2815
2808
  let Version;
2816
- Version = `${"2.0.4"}`;
2817
- checkLibraryVersion(`${"2.0.4"}`, "survey-creator-react");
2809
+ Version = `${"2.0.6"}`;
2810
+ checkLibraryVersion(`${"2.0.6"}`, "survey-creator-react");
2818
2811
 
2819
- const jQuery = window["jQuery"] || window["$"];
2820
2812
  function renderSurveyCreator(creator, element, props = {}) {
2813
+ let node = element;
2814
+ if (typeof element === "string") {
2815
+ node = document.getElementById(element);
2816
+ }
2821
2817
  const survey = preact.createElement(SurveyCreatorComponent, Object.assign({ creator }, props));
2822
- preact.render(survey, element);
2818
+ preact.render(survey, node);
2823
2819
  }
2824
- if (!!jQuery) {
2825
- jQuery["fn"].extend({
2826
- SurveyCreator: function (props) {
2827
- return this.each(function () {
2828
- renderSurveyCreator(props.model, this, props);
2829
- });
2830
- },
2831
- });
2820
+ class SurveyCreator extends SurveyCreator$1 {
2821
+ render(target) {
2822
+ renderSurveyCreator(this, target);
2823
+ }
2824
+ }
2825
+ if (typeof window !== "undefined") {
2826
+ const jQuery = window["jQuery"] || window["$"];
2827
+ if (!!jQuery) {
2828
+ jQuery["fn"].extend({
2829
+ SurveyCreator: function (props) {
2830
+ return this.each(function () {
2831
+ renderSurveyCreator(props.model, this, props);
2832
+ });
2833
+ },
2834
+ });
2835
+ }
2832
2836
  }
2833
2837
 
2834
2838
  export { ActionButton, AdaptiveToolbox, CellQuestionAdornerComponent, CellQuestionDropdownAdornerComponent, CreatorSurveyPageComponent, ImageItemValueAdornerComponent, ItemValueAdornerComponent, LogoImageComponent, MatrixCellAdornerComponent, PanelAdornerComponent, PropertyGridComponent, PropertyGridPlaceholderComponent, QuestionAdornerComponent, QuestionBanner, QuestionDropdownAdornerComponent, QuestionEditorContentComponent, QuestionErrorComponent, QuestionImageAdornerComponent, QuestionRatingAdornerComponent, QuestionWidgetAdornerComponent, QuestionWrapperFooter, QuestionWrapperHeader, ReactDragEvent, ReactMouseEvent, RowWrapper, SearchComponent, SideBarDefaultHeader, SidebarComponent, SurveyCreator, SurveyCreatorComponent, SurveyCreatorToolboxCategory, SurveyCreatorToolboxItem, SurveyCreatorToolboxItemGroup, SurveyCreatorToolboxTool, SurveyElementEmbeddedSurvey, SurveyLocStringEditor, SurveyLogicOpertor, SurveyNavigation, SurveyQuestionBooleanSwitch, SurveyQuestionColor, SurveyQuestionFileEditor, SurveyQuestionLinkValue, SurveyQuestionSpinEditor, SurveyQuestionTextWithReset, SurveyResults, SurveyResultsByRow, SurveySimulator, SwitcherComponent, TabButtonComponent, TabDesignerComponent, TabJsonEditorAceComponent, TabJsonEditorErrorsComponent, TabJsonEditorTextareaComponent, TabLogicAddButtonComponent, TabLogicComponent, TabPreviewSurveyComponent, TabPreviewTestSurveyAgainComponent, TabThemeSurveyComponent, TabTranslationComponent, TabbedMenuComponent, TabbedMenuItemComponent, ToolboxList, TranslateFromAction, TranslationLineSkeleton, Version, renderSurveyCreator };