survey-vue3-ui 2.1.1 → 2.2.0

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-vue3-ui",
3
- "version": "2.1.1",
3
+ "version": "2.2.0",
4
4
  "description": "survey.js is a JavaScript Survey Library. It is a modern way to add a survey to your website. It uses JSON for survey metadata and results.",
5
5
  "keywords": [
6
6
  "Survey",
@@ -19,7 +19,7 @@
19
19
  "url": "https://github.com/surveyjs/surveyjs.git"
20
20
  },
21
21
  "peerDependencies": {
22
- "survey-core": "2.1.1",
22
+ "survey-core": "2.2.0",
23
23
  "vue": "^3.2.41"
24
24
  }
25
25
  }
@@ -1508,32 +1508,34 @@ const As = ["name", "checked", "value", "id", "disabled", "readonly", "required"
1508
1508
  question: {}
1509
1509
  },
1510
1510
  setup(u) {
1511
- const e = u, n = k(null);
1512
- return T(e, n), (s, o) => !s.question.isReadOnlyRenderDiv() && s.question.getMaxLength() ? (i(), a("div", {
1511
+ const e = u, n = k();
1512
+ function s(o) {
1513
+ n.value = o;
1514
+ }
1515
+ return T(e, n), (o, t) => !o.question.isReadOnlyRenderDiv() && o.question.getMaxLength() ? (i(), a("div", {
1513
1516
  key: 0,
1514
1517
  ref_key: "root",
1515
1518
  ref: n
1516
1519
  }, [
1517
1520
  c(m, {
1518
1521
  is: "sv-text-area",
1519
- model: s.question.textAreaModel
1522
+ model: o.question.textAreaModel
1520
1523
  }, null, 8, ["model"]),
1521
1524
  c(m, {
1522
1525
  is: "sv-character-counter",
1523
- counter: s.question.characterCounter,
1524
- remainingCharacterCounter: s.question.cssClasses.remainingCharacterCounter
1526
+ counter: o.question.characterCounter,
1527
+ remainingCharacterCounter: o.question.cssClasses.remainingCharacterCounter
1525
1528
  }, null, 8, ["counter", "remainingCharacterCounter"])
1526
- ], 512)) : !s.question.isReadOnlyRenderDiv() && !s.question.getMaxLength() ? (i(), g(m, {
1529
+ ], 512)) : !o.question.isReadOnlyRenderDiv() && !o.question.getMaxLength() ? (i(), g(m, {
1527
1530
  key: 1,
1528
1531
  is: "sv-text-area",
1529
- ref_key: "root",
1530
- ref: n,
1531
- model: s.question.textAreaModel
1532
+ "get-ref": s,
1533
+ model: o.question.textAreaModel
1532
1534
  }, null, 8, ["model"])) : (i(), a("div", {
1533
1535
  key: 2,
1534
1536
  ref_key: "root",
1535
1537
  ref: n
1536
- }, I(s.question.value), 513));
1538
+ }, I(o.question.value), 513));
1537
1539
  }
1538
1540
  }), p1 = /* @__PURE__ */ y({
1539
1541
  inheritAttrs: !1,
@@ -2898,7 +2900,7 @@ const gn = /* @__PURE__ */ y({
2898
2900
  ], 2))), 128))
2899
2901
  ], 2));
2900
2902
  }
2901
- }), In = ["min", "max", "step"], Vn = ["id", "value", "min", "max", "step", "disabled", "onInput", "onFocus", "aria-required", "aria-label", "aria-labelledby", "aria-describedby", "aria-invalid", "aria-errormessage"], Sn = ["onPointerup"], Rn = /* @__PURE__ */ y({
2903
+ }), In = ["min", "max", "step"], Vn = ["id", "value", "min", "max", "step", "disabled", "onInput", "onFocus", "aria-required", "aria-label", "aria-labelledby", "aria-describedby", "aria-invalid", "aria-errormessage"], Sn = /* @__PURE__ */ y({
2902
2904
  inheritAttrs: !1,
2903
2905
  __name: "Slider",
2904
2906
  props: {
@@ -2956,7 +2958,7 @@ const gn = /* @__PURE__ */ y({
2956
2958
  class: r(o.question.cssClasses.rangeTrack),
2957
2959
  style: f({ left: o.question.getTrackPercentLeft() + "%", right: o.question.getTrackPercentRight() + "%" })
2958
2960
  }, null, 6),
2959
- (i(!0), a(M, null, V(o.question.getRenderedValue(), (l, d) => (i(), a(M, { key: d }, [
2961
+ (i(!0), a(M, null, V(o.question.renderedValue, (l, d) => (i(), a(M, { key: d }, [
2960
2962
  v("input", {
2961
2963
  class: r(o.question.cssClasses.input),
2962
2964
  id: "sjs-slider-input-" + d,
@@ -3026,30 +3028,44 @@ const gn = /* @__PURE__ */ y({
3026
3028
  class: r(o.question.cssClasses.labelsContainer)
3027
3029
  }, [
3028
3030
  v("div", null, [
3029
- (i(!0), a(M, null, V(o.question.renderedLabels, (l, d) => (i(), a("div", {
3030
- key: d,
3031
- class: r(o.question.getLabelCss(d)),
3032
- style: f({ left: l.value + "%" }),
3033
- onPointerup: (C) => {
3034
- o.question.handleLabelPointerUp(C, d);
3035
- }
3036
- }, [
3037
- v("div", {
3038
- class: r(o.question.cssClasses.labelTick)
3039
- }, null, 2),
3040
- v("div", {
3041
- class: r(o.question.cssClasses.labelText)
3042
- }, [
3043
- c(m, {
3044
- is: "survey-string",
3045
- locString: l.locText
3046
- }, null, 8, ["locString"])
3047
- ], 2)
3048
- ], 46, Sn))), 128))
3031
+ (i(!0), a(M, null, V(o.question.renderedLabels, (l) => (i(), g(m, {
3032
+ key: l.id,
3033
+ is: "sv-slider-label-item",
3034
+ item: l,
3035
+ question: o.question
3036
+ }, null, 8, ["item", "question"]))), 128))
3049
3037
  ])
3050
3038
  ], 2)) : p("", !0)
3051
3039
  ], 2));
3052
3040
  }
3041
+ }), Rn = /* @__PURE__ */ y({
3042
+ __name: "SliderLabelItem",
3043
+ props: {
3044
+ question: {},
3045
+ item: {}
3046
+ },
3047
+ setup(u) {
3048
+ const e = u;
3049
+ return S(() => e.item), (n, s) => (i(), a("div", {
3050
+ class: r(n.question.getLabelCss(n.item.locText)),
3051
+ style: f({ left: n.question.getPercent(n.item.value) + "%" }),
3052
+ onPointerup: s[0] || (s[0] = (o) => {
3053
+ n.question.handleLabelPointerUp(o, n.item.value);
3054
+ })
3055
+ }, [
3056
+ v("div", {
3057
+ class: r(n.question.cssClasses.labelTick)
3058
+ }, null, 2),
3059
+ v("div", {
3060
+ class: r(n.question.cssClasses.labelText)
3061
+ }, [
3062
+ c(m, {
3063
+ is: "survey-string",
3064
+ locString: n.item.locText
3065
+ }, null, 8, ["locString"])
3066
+ ], 2)
3067
+ ], 38));
3068
+ }
3053
3069
  }), Tn = { role: "radiogroup" }, Bn = { class: "sv-visuallyhidden" }, Zn = {
3054
3070
  key: 0,
3055
3071
  role: "presentation"
@@ -5001,7 +5017,7 @@ const Wt = /* @__PURE__ */ $t(Dt, [["render", Et]]), Ft = /* @__PURE__ */ v("use
5001
5017
  }
5002
5018
  });
5003
5019
  /*!
5004
- * surveyjs - Survey JavaScript library v2.1.1
5020
+ * surveyjs - Survey JavaScript library v2.2.0
5005
5021
  * Copyright (c) 2015-2025 Devsoft Baltic OÜ - http://surveyjs.io/
5006
5022
  * License: MIT (http://www.opensource.org/licenses/mit-license.php)
5007
5023
  */
@@ -5069,7 +5085,7 @@ var Ro = {
5069
5085
  "smiley-rate9-24x24": '<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M12.01 24C6.85767 24 1.15509 20.96 0.0145752 14.16C-0.0354475 13.87 0.0445888 13.57 0.234675 13.35C0.424761 13.13 0.704888 13 0.995019 13H23.005C23.2951 13 23.5752 13.13 23.7653 13.35C23.9554 13.57 24.0354 13.87 23.9854 14.16C22.8549 20.95 17.1423 24 11.99 24H12.01ZM2.25559 15C3.61621 19.82 8.0182 22 12.01 22C16.0018 22 20.4038 19.82 21.7644 15H2.25559ZM8.00819 6V2C8.00819 1.45 7.55799 1 7.00774 1C6.45749 1 6.00729 1.45 6.00729 2V6C6.00729 6.55 6.45749 7 7.00774 7C7.55799 7 8.00819 6.55 8.00819 6ZM18.0127 6V2C18.0127 1.45 17.5625 1 17.0123 1C16.462 1 16.0118 1.45 16.0118 2V6C16.0118 6.55 16.462 7 17.0123 7C17.5625 7 18.0127 6.55 18.0127 6Z"></path></svg>'
5070
5086
  };
5071
5087
  /*!
5072
- * surveyjs - Survey JavaScript library v2.1.1
5088
+ * surveyjs - Survey JavaScript library v2.2.0
5073
5089
  * Copyright (c) 2015-2025 Devsoft Baltic OÜ - http://surveyjs.io/
5074
5090
  * License: MIT (http://www.opensource.org/licenses/mit-license.php)
5075
5091
  */
@@ -5557,52 +5573,54 @@ const ae = /* @__PURE__ */ y({
5557
5573
  }), Go = ["readonly", "disabled", "value", "id", "maxlength", "cols", "rows", "placeholder", "aria-required", "aria-label", "aria-labelledby", "aria-describedby", "aria-invalid", "aria-errormessage"], Xo = /* @__PURE__ */ y({
5558
5574
  __name: "TextArea",
5559
5575
  props: {
5560
- model: {}
5576
+ model: {},
5577
+ getRef: { type: Function }
5561
5578
  },
5562
5579
  setup(u) {
5563
5580
  const e = u, n = k(
5564
5581
  null
5565
- ), s = H(() => e.model.getTextValue() || "");
5582
+ ), s = function(t) {
5583
+ n.value = t, e.getRef && e.getRef(t);
5584
+ }, o = H(() => e.model.getTextValue() || "");
5566
5585
  return Z(() => {
5567
5586
  e.model.setElement(n.value);
5568
5587
  }), j(() => {
5569
5588
  e.model.setElement(n.value);
5570
5589
  }), D(() => {
5571
5590
  e.model.resetElement();
5572
- }), (o, t) => (i(), a("textarea", {
5573
- ref_key: "contentElement",
5574
- ref: n,
5575
- readonly: o.model.isReadOnlyAttr,
5576
- disabled: o.model.isDisabledAttr,
5577
- value: s.value,
5578
- id: o.model.id,
5579
- maxlength: o.model.maxLength,
5580
- cols: o.model.cols,
5581
- rows: o.model.rows,
5582
- placeholder: o.model.placeholder,
5583
- class: r(o.model.className),
5584
- onBlur: t[0] || (t[0] = (l) => {
5585
- o.model.onTextAreaBlur(l);
5591
+ }), (t, l) => (i(), a("textarea", {
5592
+ ref: (d) => s(d),
5593
+ readonly: t.model.isReadOnlyAttr,
5594
+ disabled: t.model.isDisabledAttr,
5595
+ value: o.value,
5596
+ id: t.model.id,
5597
+ maxlength: t.model.maxLength,
5598
+ cols: t.model.cols,
5599
+ rows: t.model.rows,
5600
+ placeholder: t.model.placeholder,
5601
+ class: r(t.model.className),
5602
+ onBlur: l[0] || (l[0] = (d) => {
5603
+ t.model.onTextAreaBlur(d);
5586
5604
  }),
5587
- onFocus: t[1] || (t[1] = (l) => {
5588
- o.model.onTextAreaFocus(l);
5605
+ onFocus: l[1] || (l[1] = (d) => {
5606
+ t.model.onTextAreaFocus(d);
5589
5607
  }),
5590
- onChange: t[2] || (t[2] = (l) => {
5591
- o.model.onTextAreaChange(l);
5608
+ onChange: l[2] || (l[2] = (d) => {
5609
+ t.model.onTextAreaChange(d);
5592
5610
  }),
5593
- onInput: t[3] || (t[3] = (l) => {
5594
- o.model.onTextAreaInput(l);
5611
+ onInput: l[3] || (l[3] = (d) => {
5612
+ t.model.onTextAreaInput(d);
5595
5613
  }),
5596
- onKeydown: t[4] || (t[4] = (l) => {
5597
- o.model.onTextAreaKeyDown(l);
5614
+ onKeydown: l[4] || (l[4] = (d) => {
5615
+ t.model.onTextAreaKeyDown(d);
5598
5616
  }),
5599
- "aria-required": o.model.ariaRequired,
5600
- "aria-label": o.model.ariaLabel,
5601
- "aria-labelledby": o.model.ariaLabelledBy,
5602
- "aria-describedby": o.model.ariaDescribedBy,
5603
- "aria-invalid": o.model.ariaInvalid,
5604
- "aria-errormessage": o.model.ariaErrormessage,
5605
- style: f({ resize: o.model.question.resizeStyle })
5617
+ "aria-required": t.model.ariaRequired,
5618
+ "aria-label": t.model.ariaLabel,
5619
+ "aria-labelledby": t.model.ariaLabelledBy,
5620
+ "aria-describedby": t.model.ariaDescribedBy,
5621
+ "aria-invalid": t.model.ariaInvalid,
5622
+ "aria-errormessage": t.model.ariaErrormessage,
5623
+ style: f({ resize: t.model.question.resizeStyle })
5606
5624
  }, null, 46, Go));
5607
5625
  }
5608
5626
  }), Jo = /* @__PURE__ */ y({
@@ -6284,7 +6302,7 @@ function He(u) {
6284
6302
  void 0,
6285
6303
  u
6286
6304
  );
6287
- e("sv-svg-bundle", Si), e("popup-survey", fe), e("survey-header", ns), e("sv-logo-image", Vi), e("survey-page", ss), e("survey-row", ts), e("survey-question", ls), e("survey-panel", ms), e("survey-element-header", vs), e("survey-string", Cs), e("sv-string-viewer", gs), e("sv-string-editor", hs), e("sv-skeleton", ws), e("sv-scroll", fs), e("survey-text", Is), e("survey-text-input", Rs), e("survey-checkbox", Ds), e("survey-checkbox-item", Ns), e("survey-radiogroup", Es), e("survey-radiogroup-item", Os), e("survey-signaturepad", Ks), e("survey-html", Gs), e("survey-image", _s), e("survey-expression", xs), e("survey-file", t1), e("sv-file-choose-btn", qi), e("sv-file-clean-btn", ci), e("sv-file-preview", wi), e("sv-file-page", Ti), e("sv-file-item", Di), e("sv-file-video", yi), e("survey-imagepicker", i1), e("survey-imagepicker-item", d1), e("survey-comment", m1), e("survey-dropdown", p1), e("sv-dropdown-select", g1), e("sv-dropdown-option-item", h1), e("sv-dropdown", k1), e("survey-tagbox", f1), e("sv-tagbox", I1), e("sv-tagbox-item", B1), e("sv-tagbox-filter", R1), e("survey-ranking", Z1), e("survey-ranking-item", E1), e("sv-ranking-item", W1), e("survey-rating", z1), e("sv-rating-item", K1), e("sv-rating-item-smiley", X1), e("sv-rating-item-star", _1), e("sv-rating-dropdown", tn), e("sv-rating-dropdown-item", nn), e("survey-boolean", rn), e("sv-boolean-radio", ln), e("sv-boolean-radio-item", dn), e("sv-boolean-checkbox", gn), e("survey-multipletext", yn), e("survey-multipletext-item", wn), e("sv-breadcrumbs", bn), e("sv-single-input-summary", Mn), e("survey-slider", Rn), e("survey-matrix", Pn), e("survey-matrix-row", En), e("survey-matrix-cell", On), e("survey-matrixdropdown", zn), e("survey-matrixtable", Kn), e("survey-matrixheaderrequired", Gn), e("survey-matrixdropdown-cell", Jn), e("survey-matrixdynamic", Yn), e("survey-placeholder-matrixdynamic", _n), e("sv-matrix-remove-button", et), e("sv-matrix-drag-drop-icon", nt), e("sv-matrix-detail-button", ot), e("survey-paneldynamic", rt), e("survey-paneldynamicprogress", at), e("survey-paneldynamicprogress-v2", dt), e("survey-placeholder-paneldynamic", mt), e("sv-paneldynamic-add-btn", vt), e("sv-paneldynamic-next-btn", ct), e("sv-paneldynamic-prev-btn", yt), e("sv-paneldynamic-remove-btn", qt), e("sv-paneldynamic-progress-text", wt), e("sv-components-container", wo), e("sv-progress-buttons", Vo), e("sv-navigation-toc", So), e("sv-progress-pages", Y), e("sv-progress-questions", Y), e("sv-progress-correctquestions", Y), e("sv-progress-requiredquestions", Y), e("survey-errors", Lt), e("survey-question-comment", ft), e("survey-element-title", Ht), e("survey-element-title-content", Rt), e("sv-title-actions", Zt), e("sv-brand-info", Wt), e("sv-question-error", Ut), e("sv-svg-icon", zt), e("sv-action-bar", Qt), e("sv-action", Gt), e("sv-action-bar-item", Yt), e("sv-action-bar-item-dropdown", eo), e("sv-action-bar-separator", so), e("sv-list", io), e("sv-list-item-content", uo), e("sv-list-item-group", mo), e("sv-list-item", ao), e("sv-popup", po), e("sv-popup-container", ho), e("popup-pointer", qo), e("sv-notifier", Wo), e("survey-other-choice", Oo), e("sv-nav-btn", Uo), e("survey-customwidget", Ko), e("survey-popup-modal", jo), e("survey-composite", Yo), e("survey-custom", _o), e("sv-timerpanel", si), e("sv-loading-indicator", ti), e("sv-header", ii), e("sv-header-cell", ai), e("sv-header-mobile", pi), e("sv-template-renderer", Ci), e("sv-character-counter", Jo), e("sv-text-area", Xo), e("survey-element", vi), e("survey-buttongroup", bi), e("sv-button-group-item", Hi), e("sv-buttongroup-dropdown", Mi), e("survey", ae);
6305
+ e("sv-svg-bundle", Si), e("popup-survey", fe), e("survey-header", ns), e("sv-logo-image", Vi), e("survey-page", ss), e("survey-row", ts), e("survey-question", ls), e("survey-panel", ms), e("survey-element-header", vs), e("survey-string", Cs), e("sv-string-viewer", gs), e("sv-string-editor", hs), e("sv-skeleton", ws), e("sv-scroll", fs), e("survey-text", Is), e("survey-text-input", Rs), e("survey-checkbox", Ds), e("survey-checkbox-item", Ns), e("survey-radiogroup", Es), e("survey-radiogroup-item", Os), e("survey-signaturepad", Ks), e("survey-html", Gs), e("survey-image", _s), e("survey-expression", xs), e("survey-file", t1), e("sv-file-choose-btn", qi), e("sv-file-clean-btn", ci), e("sv-file-preview", wi), e("sv-file-page", Ti), e("sv-file-item", Di), e("sv-file-video", yi), e("survey-imagepicker", i1), e("survey-imagepicker-item", d1), e("survey-comment", m1), e("survey-dropdown", p1), e("sv-dropdown-select", g1), e("sv-dropdown-option-item", h1), e("sv-dropdown", k1), e("survey-tagbox", f1), e("sv-tagbox", I1), e("sv-tagbox-item", B1), e("sv-tagbox-filter", R1), e("survey-ranking", Z1), e("survey-ranking-item", E1), e("sv-ranking-item", W1), e("survey-rating", z1), e("sv-rating-item", K1), e("sv-rating-item-smiley", X1), e("sv-rating-item-star", _1), e("sv-rating-dropdown", tn), e("sv-rating-dropdown-item", nn), e("survey-boolean", rn), e("sv-boolean-radio", ln), e("sv-boolean-radio-item", dn), e("sv-boolean-checkbox", gn), e("survey-multipletext", yn), e("survey-multipletext-item", wn), e("sv-breadcrumbs", bn), e("sv-single-input-summary", Mn), e("survey-slider", Sn), e("sv-slider-label-item", Rn), e("survey-matrix", Pn), e("survey-matrix-row", En), e("survey-matrix-cell", On), e("survey-matrixdropdown", zn), e("survey-matrixtable", Kn), e("survey-matrixheaderrequired", Gn), e("survey-matrixdropdown-cell", Jn), e("survey-matrixdynamic", Yn), e("survey-placeholder-matrixdynamic", _n), e("sv-matrix-remove-button", et), e("sv-matrix-drag-drop-icon", nt), e("sv-matrix-detail-button", ot), e("survey-paneldynamic", rt), e("survey-paneldynamicprogress", at), e("survey-paneldynamicprogress-v2", dt), e("survey-placeholder-paneldynamic", mt), e("sv-paneldynamic-add-btn", vt), e("sv-paneldynamic-next-btn", ct), e("sv-paneldynamic-prev-btn", yt), e("sv-paneldynamic-remove-btn", qt), e("sv-paneldynamic-progress-text", wt), e("sv-components-container", wo), e("sv-progress-buttons", Vo), e("sv-navigation-toc", So), e("sv-progress-pages", Y), e("sv-progress-questions", Y), e("sv-progress-correctquestions", Y), e("sv-progress-requiredquestions", Y), e("survey-errors", Lt), e("survey-question-comment", ft), e("survey-element-title", Ht), e("survey-element-title-content", Rt), e("sv-title-actions", Zt), e("sv-brand-info", Wt), e("sv-question-error", Ut), e("sv-svg-icon", zt), e("sv-action-bar", Qt), e("sv-action", Gt), e("sv-action-bar-item", Yt), e("sv-action-bar-item-dropdown", eo), e("sv-action-bar-separator", so), e("sv-list", io), e("sv-list-item-content", uo), e("sv-list-item-group", mo), e("sv-list-item", ao), e("sv-popup", po), e("sv-popup-container", ho), e("popup-pointer", qo), e("sv-notifier", Wo), e("survey-other-choice", Oo), e("sv-nav-btn", Uo), e("survey-customwidget", Ko), e("survey-popup-modal", jo), e("survey-composite", Yo), e("survey-custom", _o), e("sv-timerpanel", si), e("sv-loading-indicator", ti), e("sv-header", ii), e("sv-header-cell", ai), e("sv-header-mobile", pi), e("sv-template-renderer", Ci), e("sv-character-counter", Jo), e("sv-text-area", Xo), e("survey-element", vi), e("survey-buttongroup", bi), e("sv-button-group-item", Hi), e("sv-buttongroup-dropdown", Mi), e("survey", ae);
6288
6306
  }
6289
6307
  He(
6290
6308
  (u, e) => F.Instance.registerComponent(u, e)