survey-creator-core 1.9.101 → 1.9.102

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 v1.9.101
2
+ * SurveyJS Creator v1.9.102
3
3
  * (c) 2015-2023 Devsoft Baltic OÜ - http://surveyjs.io/
4
4
  * Github: https://github.com/surveyjs/survey-creator
5
5
  * License: https://surveyjs.io/Licenses#SurveyCreator
@@ -4080,7 +4080,9 @@ var StringEditorViewModelBase = /** @class */ (function (_super) {
4080
4080
  if (this.locString.text != clearedText &&
4081
4081
  !(!this.locString.text && clearedText == this.locString.calculatedText)) {
4082
4082
  if (!this.errorText) {
4083
- if (this.locString.owner instanceof survey_core__WEBPACK_IMPORTED_MODULE_1__["ItemValue"] && this.creator.inplaceEditForValues) {
4083
+ if (this.locString.owner instanceof survey_core__WEBPACK_IMPORTED_MODULE_1__["ItemValue"] &&
4084
+ this.creator.inplaceEditForValues &&
4085
+ ["noneText", "otherText", "selectAllText"].indexOf(this.locString.name) == -1) {
4084
4086
  var itemValue = this.locString.owner;
4085
4087
  if (itemValue.value !== clearedText) {
4086
4088
  if (!!itemValue.locOwner && !!itemValue.ownerPropertyName) {
@@ -8668,7 +8670,8 @@ var SurveyLogicUI = /** @class */ (function (_super) {
8668
8670
  };
8669
8671
  SurveyLogicUI.prototype.updateRowIsAdditionalClasses = function (index, isAdditionalClasses) {
8670
8672
  if (!!this.matrixItems.renderedTable) {
8671
- this.matrixItems.renderedTable.rows[index].isAdditionalClasses = isAdditionalClasses;
8673
+ var visibleRows = this.matrixItems.renderedTable.rows.filter(function (row) { return row.visible; });
8674
+ visibleRows[index].isAdditionalClasses = isAdditionalClasses;
8672
8675
  }
8673
8676
  };
8674
8677
  SurveyLogicUI.prototype.updateNewActionState = function () {
@@ -11117,7 +11120,7 @@ var ThemeSurveyTabViewModel = /** @class */ (function (_super) {
11117
11120
  Object(_theme_custom_questions_font_settings__WEBPACK_IMPORTED_MODULE_8__["fontsettingsFromCssVariable"])(themeEditorSurvey.getQuestionByName("pageDescription"), newCssVariables, newCssVariables["--sjs-general-dim-forecolor-light"]);
11118
11121
  Object(_theme_custom_questions_font_settings__WEBPACK_IMPORTED_MODULE_8__["fontsettingsFromCssVariable"])(themeEditorSurvey.getQuestionByName("questionTitle"), newCssVariables, newCssVariables["--sjs-general-forecolor"]);
11119
11122
  Object(_theme_custom_questions_font_settings__WEBPACK_IMPORTED_MODULE_8__["fontsettingsFromCssVariable"])(themeEditorSurvey.getQuestionByName("questionDescription"), newCssVariables, newCssVariables["--sjs-general-forecolor-light"]);
11120
- Object(_theme_custom_questions_font_settings__WEBPACK_IMPORTED_MODULE_8__["fontsettingsFromCssVariable"])(themeEditorSurvey.getQuestionByName("editorFont"), newCssVariables);
11123
+ Object(_theme_custom_questions_font_settings__WEBPACK_IMPORTED_MODULE_8__["fontsettingsFromCssVariable"])(themeEditorSurvey.getQuestionByName("editorFont"), newCssVariables, newCssVariables["--sjs-general-forecolor"]);
11121
11124
  if (!!newCssVariables["--sjs-corner-radius"]) {
11122
11125
  themeEditorSurvey.getQuestionByName("cornerRadius").value = parseFloat(newCssVariables["--sjs-corner-radius"]);
11123
11126
  }
@@ -14072,6 +14075,9 @@ var CreatorBase = /** @class */ (function (_super) {
14072
14075
  * A Survey Creator instance that raised the event.
14073
14076
  * - `options.questionName`: `String`\
14074
14077
  * The name of a question for which conditions are displayed.
14078
+ * - `options.questionName`: `String`\
14079
+ * The type of a question for which conditions are displayed.
14080
+ * The name of a question for which conditions are displayed.
14075
14081
  * - `options.operator`: `"empty"` | `"notempty"` | `"equal"` | `"notequal"` | `"contains"` | `"notcontains"` | `"anyof"` | `"allof"` | `"greater"` | `"less"` | `"greaterorequal"` | `"lessorequal"`\
14076
14082
  * A condition opeator for which the event is raised.
14077
14083
  * - `options.show`: `Boolean`\
@@ -14604,7 +14610,7 @@ var CreatorBase = /** @class */ (function (_super) {
14604
14610
  return this.getPropertyValue("allowEditSurveyTitle", true);
14605
14611
  },
14606
14612
  set: function (val) {
14607
- this.setPropertyVisibility("survey", val, "title", "description", "logo", "showTitle", "logoWidth", "logoHeight");
14613
+ this.setPropertyVisibility("survey", val, "title", "description", "logo", "logoFit", "showTitle", "logoWidth", "logoHeight");
14608
14614
  this.setPropertyValue("allowEditSurveyTitle", val);
14609
14615
  this.designerPropertyGrid && this.designerPropertyGrid.refresh();
14610
14616
  },
@@ -16452,6 +16458,7 @@ var CreatorBase = /** @class */ (function (_super) {
16452
16458
  delete this.shortcuts[name];
16453
16459
  };
16454
16460
  CreatorBase.prototype.deletePanelOrQuestion = function (obj) {
16461
+ var _this = this;
16455
16462
  var parent = obj["parent"];
16456
16463
  var elements = parent.elements;
16457
16464
  var objIndex = elements.indexOf(obj);
@@ -16461,6 +16468,9 @@ var CreatorBase = /** @class */ (function (_super) {
16461
16468
  if (this.pageEditMode === "single" && parent.getType() === "page") {
16462
16469
  parent = this.survey;
16463
16470
  }
16471
+ if (obj["questions"]) {
16472
+ obj["questions"].forEach(function (q) { return _this.updateConditionsOnRemove(q); });
16473
+ }
16464
16474
  obj["delete"]();
16465
16475
  this.selectElement(objIndex > -1 ? elements[objIndex] : parent);
16466
16476
  };
@@ -16666,11 +16676,12 @@ var CreatorBase = /** @class */ (function (_super) {
16666
16676
  this.onConditionGetTitle.fire(this, options);
16667
16677
  return options.title;
16668
16678
  };
16669
- CreatorBase.prototype.isConditionOperatorEnabled = function (questionName, operator, isEnabled) {
16679
+ CreatorBase.prototype.isConditionOperatorEnabled = function (questionName, questionType, operator, isEnabled) {
16670
16680
  if (this.onGetConditionOperator.isEmpty)
16671
16681
  return isEnabled;
16672
16682
  var options = {
16673
16683
  questionName: questionName,
16684
+ questionType: questionType,
16674
16685
  operator: operator,
16675
16686
  show: isEnabled
16676
16687
  };
@@ -17662,7 +17673,7 @@ var EmptySurveyCreatorOptions = /** @class */ (function () {
17662
17673
  EmptySurveyCreatorOptions.prototype.onConditionGetTitleCallback = function (expression, title) {
17663
17674
  return title;
17664
17675
  };
17665
- EmptySurveyCreatorOptions.prototype.isConditionOperatorEnabled = function (questionName, operator, isEnabled) { return isEnabled; };
17676
+ EmptySurveyCreatorOptions.prototype.isConditionOperatorEnabled = function (questionName, questionType, operator, isEnabled) { return isEnabled; };
17666
17677
  EmptySurveyCreatorOptions.prototype.onLogicGetTitleCallback = function (expression, displayExpression, text, logicItem) { return text; };
17667
17678
  EmptySurveyCreatorOptions.prototype.getTranslationExportedText = function (obj, name, locString, locale, text) { return text; };
17668
17679
  EmptySurveyCreatorOptions.prototype.uploadFiles = function (files, question, uploadingCallback) { };
@@ -19118,7 +19129,7 @@ __webpack_require__.r(__webpack_exports__);
19118
19129
  /* harmony import */ var survey_core__WEBPACK_IMPORTED_MODULE_70__ = __webpack_require__(/*! survey-core */ "survey-core");
19119
19130
  /* harmony import */ var survey_core__WEBPACK_IMPORTED_MODULE_70___default = /*#__PURE__*/__webpack_require__.n(survey_core__WEBPACK_IMPORTED_MODULE_70__);
19120
19131
  var Version;
19121
- Version = "" + "1.9.101";
19132
+ Version = "" + "1.9.102";
19122
19133
  //should be loaded before other styles for easier override
19123
19134
  __webpack_require__(/*! ../utils/context-button.scss */ "./src/utils/context-button.scss");
19124
19135
 
@@ -19207,7 +19218,7 @@ __webpack_require__(/*! ../utils/design.scss */ "./src/utils/design.scss");
19207
19218
  __webpack_require__(/*! ../utils/layout.scss */ "./src/utils/layout.scss");
19208
19219
 
19209
19220
  survey_core__WEBPACK_IMPORTED_MODULE_70__["settings"].supportCreatorV2 = true;
19210
- Object(survey_core__WEBPACK_IMPORTED_MODULE_70__["checkLibraryVersion"])("" + "1.9.101", "survey-creator-core");
19221
+ Object(survey_core__WEBPACK_IMPORTED_MODULE_70__["checkLibraryVersion"])("" + "1.9.102", "survey-creator-core");
19211
19222
 
19212
19223
 
19213
19224
  /***/ }),
@@ -21784,7 +21795,6 @@ var enStrings = {
21784
21795
  hideColumnsIfEmpty: "Hide columns if there are no rows",
21785
21796
  rateValues: "Custom rate values",
21786
21797
  rateCount: "Rate count",
21787
- rateDisplayMode: "Rate display mode",
21788
21798
  autoGenerate: "How to specify rate values?",
21789
21799
  hideIfChoicesEmpty: "Hide the question if it contains no choices",
21790
21800
  hideNumber: "Hide question number",
@@ -21918,12 +21928,13 @@ var enStrings = {
21918
21928
  alternateRows: "Alternate rows",
21919
21929
  columnsVisibleIf: "Columns are visible if",
21920
21930
  rowsVisibleIf: "Rows are visible if",
21921
- otherPlaceholder: "Comment area placeholder"
21931
+ otherPlaceholder: "Comment area placeholder",
21932
+ rateType: "Rate type" // Auto-generated string
21922
21933
  },
21923
21934
  // Property values
21924
21935
  pv: {
21925
- true: "true",
21926
- false: "false",
21936
+ "true": "true",
21937
+ "false": "false",
21927
21938
  inherit: "Inherit",
21928
21939
  show: "Visible",
21929
21940
  hide: "Hidden",
@@ -22065,7 +22076,9 @@ var enStrings = {
22065
22076
  buttons: "Buttons",
22066
22077
  dropdown: "Dropdown"
22067
22078
  },
22068
- rateColorMode: { default: "Default" },
22079
+ rateColorMode: {
22080
+ default: "Default"
22081
+ },
22069
22082
  autoGenerate: {
22070
22083
  "true": "Generate",
22071
22084
  "false": "Enter manually"
@@ -22074,7 +22087,7 @@ var enStrings = {
22074
22087
  labels: "Labels",
22075
22088
  stars: "Stars",
22076
22089
  smileys: "Smileys"
22077
- },
22090
+ }
22078
22091
  },
22079
22092
  // Operators
22080
22093
  op: {
@@ -22236,7 +22249,21 @@ var enStrings = {
22236
22249
  runExpression: "Run expression",
22237
22250
  showCaption: "Show caption",
22238
22251
  iconName: "Icon name",
22239
- iconSize: "Icon size" // Auto-generated string
22252
+ iconSize: "Icon size",
22253
+ precision: "Precision",
22254
+ matrixDragHandleArea: "Matrix drag handle area",
22255
+ backgroundImage: "Background image",
22256
+ backgroundImageFit: "Background image fit",
22257
+ backgroundImageAttachment: "Background image attachment",
22258
+ backgroundOpacity: "Background opacity",
22259
+ selectToRankEnabled: "Select to rank enabled",
22260
+ selectToRankAreasLayout: "Select to rank areas layout",
22261
+ allowCameraAccess: "Allow camera access",
22262
+ scaleColorMode: "Scale color mode",
22263
+ rateColorMode: "Rate color mode",
22264
+ templateTabTitle: "Template tab title",
22265
+ templateVisibleIf: "Template visible if",
22266
+ copyDisplayValue: "Copy display value" // Auto-generated string
22240
22267
  },
22241
22268
  theme: {
22242
22269
  "--background": "Background color",
@@ -22246,26 +22273,26 @@ var enStrings = {
22246
22273
  "--base-unit": "Base unit",
22247
22274
  groupGeneral: "General",
22248
22275
  groupAdvanced: "Advanced",
22249
- "themeName": "Theme",
22250
- "themeMode": "Question appearance",
22251
- "themeModePanels": "Default",
22252
- "themeModeLightweight": "Without Panels",
22253
- "themePaletteLight": "Light",
22254
- "themePaletteDark": "Dark",
22276
+ themeName: "Theme",
22277
+ themeMode: "Question appearance",
22278
+ themeModePanels: "Default",
22279
+ themeModeLightweight: "Without Panels",
22280
+ themePaletteLight: "Light",
22281
+ themePaletteDark: "Dark",
22255
22282
  primaryColor: "Accent color",
22256
22283
  primaryDefaultColor: "Default",
22257
22284
  primaryDarkColor: "Hover",
22258
22285
  primaryLightColor: "Selected",
22259
- "backgroundDimColor": "Background color",
22260
- "backgroundImage": "Background image",
22261
- "backgroundImageFitAuto": "Auto",
22262
- "backgroundImageFitCover": "Cover",
22263
- "backgroundImageFitContain": "Contain",
22264
- "backgroundOpacity": "Opacity",
22265
- "backgroundImageAttachmentFixed": "Fixed",
22266
- "backgroundImageAttachmentScroll": "Scroll",
22267
- "panelBackgroundTransparency": "Panel background opacity",
22268
- "questionBackgroundTransparency": "Question background opacity",
22286
+ backgroundDimColor: "Background color",
22287
+ backgroundImage: "Background image",
22288
+ backgroundImageFitAuto: "Auto",
22289
+ backgroundImageFitCover: "Cover",
22290
+ backgroundImageFitContain: "Contain",
22291
+ backgroundOpacity: "Opacity",
22292
+ backgroundImageAttachmentFixed: "Fixed",
22293
+ backgroundImageAttachmentScroll: "Scroll",
22294
+ panelBackgroundTransparency: "Panel background opacity",
22295
+ questionBackgroundTransparency: "Question background opacity",
22269
22296
  questionPanel: "Panel background and corner radius",
22270
22297
  questionTitle: "Question title font",
22271
22298
  questionDescription: "Question description font",
@@ -22325,7 +22352,7 @@ var enStrings = {
22325
22352
  brown: "Brown",
22326
22353
  green: "Green"
22327
22354
  }
22328
- },
22355
+ }
22329
22356
  };
22330
22357
  // Uncomment the line below if you create a custom dictionary.
22331
22358
  // Replace "en" with a custom locale code (for example, "fr" or "de"),
@@ -24227,7 +24254,7 @@ var ConditionEditor = /** @class */ (function (_super) {
24227
24254
  var qType = !!json ? json.type : null;
24228
24255
  opt.choices.forEach(function (choice, index) {
24229
24256
  var isOperatorEnabled = ConditionEditor.isOperatorEnabled(qType, _creator_settings__WEBPACK_IMPORTED_MODULE_2__["settings"].operators[choice.value]);
24230
- isOperatorEnabled = _this.options.isConditionOperatorEnabled(questionName, choice.value, isOperatorEnabled);
24257
+ isOperatorEnabled = _this.options.isConditionOperatorEnabled(questionName, qType, choice.value, isOperatorEnabled);
24231
24258
  choice.setIsEnabled(isOperatorEnabled);
24232
24259
  choice.setIsVisible(isOperatorEnabled);
24233
24260
  });
@@ -28571,6 +28598,14 @@ var SurveyQuestionEditorDefinition = /** @class */ (function () {
28571
28598
  { name: "separateSpecialChoices", tab: "choices" },
28572
28599
  ]
28573
28600
  },
28601
+ ranking: {
28602
+ properties: [
28603
+ { name: "selectToRankEnabled" },
28604
+ { name: "selectToRankAreasLayout", tab: "layout" },
28605
+ { name: "minSelectedChoices", tab: "choices" },
28606
+ { name: "maxSelectedChoices", tab: "choices" }
28607
+ ]
28608
+ },
28574
28609
  radiogroup: {
28575
28610
  properties: [
28576
28611
  { name: "showClearButton", tab: "choices" },