comand-component-library 4.0.3 → 4.0.5

Sign up to get free protection for your applications and to get access to all the features.
@@ -1755,8 +1755,7 @@ function Xl(e, n, t, a, l, i) {
1755
1755
  }),
1756
1756
  _: 3
1757
1757
  })) : u("", !0)
1758
- ], 64)) : u("", !0),
1759
- (s(), b(xe(i.headlineTag), null, {
1758
+ ], 64)) : (s(), b(xe(i.headlineTag), { key: 1 }, {
1760
1759
  default: P(() => {
1761
1760
  var g, m;
1762
1761
  return [
@@ -3101,7 +3100,7 @@ const bs = ["color", "date", "datetime-local", "file", "number", "range"], Cs =
3101
3100
  }, zs = ["id", "maxlength", "value"], qs = ["title"], Rs = ["title"], Us = { key: 1 };
3102
3101
  function Gs(e, n, t, a, l, i) {
3103
3102
  var c, f, g, m, k, y, v, w, S, M, D, E, T, q, N, H, U, Q, z, Y, Z, le, W, _e;
3104
- const d = Dt, r = V;
3103
+ const d = V, r = Dt;
3105
3104
  return t.element === "input" || t.element === "select" || t.element === "textarea" ? (s(), o("label", {
3106
3105
  key: 0,
3107
3106
  class: C([
@@ -3130,16 +3129,8 @@ function Gs(e, n, t, a, l, i) {
3130
3129
  ], 64)) : j(e.$slots, "labeltext", { key: 1 }),
3131
3130
  e.$attrs.required ? (s(), o("sup", ks, "*")) : u("", !0)
3132
3131
  ]),
3133
- e.useCustomTooltip && (e.validationStatus === "" || e.validationStatus === "error") ? (s(), b(d, {
3134
- key: 0,
3135
- ref: "tooltip",
3136
- validationStatus: e.validationStatus,
3137
- relatedId: e.tooltipId,
3138
- cmdListOfRequirements: e.listOfRequirements,
3139
- role: e.validationStatus === "error" ? "alert" : "dialog"
3140
- }, null, 8, ["validationStatus", "relatedId", "cmdListOfRequirements", "role"])) : u("", !0),
3141
3132
  (e.$attrs.required || e.inputRequirements.length) && t.showStatusIcon ? (s(), o("a", {
3142
- key: 1,
3133
+ key: 0,
3143
3134
  href: "#",
3144
3135
  onClick: n[0] || (n[0] = I(() => {
3145
3136
  }, ["prevent"])),
@@ -3148,11 +3139,19 @@ function Gs(e, n, t, a, l, i) {
3148
3139
  "aria-live": "assertive",
3149
3140
  id: e.tooltipId
3150
3141
  }, [
3151
- x(r, { iconClass: e.getStatusIconClass }, null, 8, ["iconClass"])
3152
- ], 8, xs)) : u("", !0)
3142
+ x(d, { iconClass: e.getStatusIconClass }, null, 8, ["iconClass"])
3143
+ ], 8, xs)) : u("", !0),
3144
+ e.useCustomTooltip && (e.validationStatus === "" || e.validationStatus === "error") ? (s(), b(r, {
3145
+ key: 1,
3146
+ ref: "tooltip",
3147
+ validationStatus: e.validationStatus,
3148
+ relatedId: e.tooltipId,
3149
+ cmdListOfRequirements: e.listOfRequirements,
3150
+ role: e.validationStatus === "error" ? "alert" : "dialog"
3151
+ }, null, 8, ["validationStatus", "relatedId", "cmdListOfRequirements", "role"])) : u("", !0)
3153
3152
  ], 2)) : u("", !0),
3154
3153
  e.$attrs.type !== "checkbox" && e.$attrs.type !== "radio" ? (s(), o("span", vs, [
3155
- t.fieldIconClass ? (s(), b(r, {
3154
+ t.fieldIconClass ? (s(), b(d, {
3156
3155
  key: 0,
3157
3156
  class: "place-inside",
3158
3157
  iconClass: t.fieldIconClass
@@ -3183,7 +3182,7 @@ function Gs(e, n, t, a, l, i) {
3183
3182
  }, ["prevent"])),
3184
3183
  title: t.iconPasswordVisible.tooltip
3185
3184
  }, [
3186
- x(r, {
3185
+ x(d, {
3187
3186
  iconClass: t.iconPasswordVisible.iconClass
3188
3187
  }, null, 8, ["iconClass"])
3189
3188
  ], 40, Ts)) : u("", !0)
@@ -3283,7 +3282,7 @@ function Gs(e, n, t, a, l, i) {
3283
3282
  title: t.iconSearch.tooltip,
3284
3283
  onClick: n[21] || (n[21] = I((...L) => i.executeSearch && i.executeSearch(...L), ["prevent"]))
3285
3284
  }, [
3286
- x(r, {
3285
+ x(d, {
3287
3286
  iconClass: t.iconSearch.iconClass
3288
3287
  }, null, 8, ["iconClass"])
3289
3288
  ], 10, qs)) : u("", !0),
@@ -3293,7 +3292,7 @@ function Gs(e, n, t, a, l, i) {
3293
3292
  onClick: n[22] || (n[22] = I((L) => e.$emit("update:modelValue", ""), ["prevent"])),
3294
3293
  title: (f = t.iconDelete) == null ? void 0 : f.tooltip
3295
3294
  }, [
3296
- x(r, {
3295
+ x(d, {
3297
3296
  iconClass: (g = t.iconDelete) == null ? void 0 : g.iconClass,
3298
3297
  type: (m = t.iconDelete) == null ? void 0 : m.iconType
3299
3298
  }, null, 8, ["iconClass", "type"])
@@ -3305,7 +3304,7 @@ function Gs(e, n, t, a, l, i) {
3305
3304
  }, i.buttonAttrs, {
3306
3305
  onClick: n[23] || (n[23] = (...L) => i.submit && i.submit(...L))
3307
3306
  }), [
3308
- (y = (k = t.nativeButton) == null ? void 0 : k.icon) != null && y.show && (((w = (v = t.nativeButton) == null ? void 0 : v.icon) == null ? void 0 : w.position) === "before" || !((M = (S = t.nativeButton) == null ? void 0 : S.icon) != null && M.position)) ? (s(), b(r, {
3307
+ (y = (k = t.nativeButton) == null ? void 0 : k.icon) != null && y.show && (((w = (v = t.nativeButton) == null ? void 0 : v.icon) == null ? void 0 : w.position) === "before" || !((M = (S = t.nativeButton) == null ? void 0 : S.icon) != null && M.position)) ? (s(), b(d, {
3309
3308
  key: 0,
3310
3309
  iconClass: (E = (D = t.nativeButton) == null ? void 0 : D.icon) == null ? void 0 : E.iconClass,
3311
3310
  type: (q = (T = t.nativeButton) == null ? void 0 : T.icon) == null ? void 0 : q.iconType
@@ -3313,7 +3312,7 @@ function Gs(e, n, t, a, l, i) {
3313
3312
  (N = t.nativeButton) != null && N.icon && ((H = t.nativeButton) != null && H.text) ? (s(), o("span", Us, p(t.nativeButton.text), 1)) : (s(), o(_, { key: 2 }, [
3314
3313
  F(p(t.nativeButton.text), 1)
3315
3314
  ], 64)),
3316
- (Q = (U = t.nativeButton) == null ? void 0 : U.icon) != null && Q.show && ((Y = (z = t.nativeButton) == null ? void 0 : z.icon) == null ? void 0 : Y.position) === "after" ? (s(), b(r, {
3315
+ (Q = (U = t.nativeButton) == null ? void 0 : U.icon) != null && Q.show && ((Y = (z = t.nativeButton) == null ? void 0 : z.icon) == null ? void 0 : Y.position) === "after" ? (s(), b(d, {
3317
3316
  key: 3,
3318
3317
  iconClass: (le = (Z = t.nativeButton) == null ? void 0 : Z.icon) == null ? void 0 : le.iconClass,
3319
3318
  type: (_e = (W = t.nativeButton) == null ? void 0 : W.icon) == null ? void 0 : _e.iconType
@@ -5660,16 +5659,28 @@ const At = {
5660
5659
  // for boxType === product
5661
5660
  clickOnProduct(e) {
5662
5661
  this.$emit("click", e);
5662
+ },
5663
+ // set focus on first input if box contains form-elements
5664
+ setFocus() {
5665
+ this.$nextTick(() => {
5666
+ if (this.open) {
5667
+ const e = this.$refs.cmdBox.querySelector(":is(input, select, textarea):first-of-type");
5668
+ e && e.focus();
5669
+ }
5670
+ });
5663
5671
  }
5664
5672
  },
5665
5673
  watch: {
5666
5674
  openCollapsedBox() {
5667
- this.collapsible && (this.open = this.openCollapsedBox);
5675
+ this.collapsible && (this.open = this.openCollapsedBox, this.setFocus());
5676
+ },
5677
+ open() {
5678
+ this.setFocus();
5668
5679
  }
5669
5680
  }
5670
5681
  }, cn = () => {
5671
5682
  zn((e) => ({
5672
- "297e2a4d": e.cutoffTextLines
5683
+ "29b0cfc8": e.cutoffTextLines
5673
5684
  }));
5674
5685
  }, un = At.setup;
5675
5686
  At.setup = un ? (e, n) => (cn(), un(e, n)) : cn;
@@ -5691,8 +5702,11 @@ const ar = ["title"], rr = {
5691
5702
  }, kr = ["title"], xr = { key: 2 }, vr = { class: "box-header flex-container vertical" }, wr = { key: 0 }, Tr = ["src", "alt"], Ir = { key: 0 }, Sr = { key: 1 }, Mr = ["title"], Or = { key: 0 }, Lr = { class: "box-body" }, Dr = { key: 0 }, Nr = { key: 1 }, Pr = { key: 2 }, Br = {
5692
5703
  key: 3,
5693
5704
  class: "description"
5694
- }, Ar = { class: "tags" }, jr = {
5705
+ }, Ar = {
5695
5706
  key: 0,
5707
+ class: "tags"
5708
+ }, jr = {
5709
+ key: 1,
5696
5710
  class: "box-footer"
5697
5711
  };
5698
5712
  function Fr(e, n, t, a, l, i) {
@@ -5700,6 +5714,7 @@ function Fr(e, n, t, a, l, i) {
5700
5714
  const d = R, r = V, c = lr;
5701
5715
  return t.boxType === "content" ? (s(), o("div", {
5702
5716
  key: 0,
5717
+ ref: "cmdBox",
5703
5718
  class: C([
5704
5719
  "cmd-box box content",
5705
5720
  {
@@ -5845,10 +5860,10 @@ function Fr(e, n, t, a, l, i) {
5845
5860
  t.user.position ? (s(), o("p", Pr, p(t.user.position), 1)) : u("", !0),
5846
5861
  t.user.description ? (s(), o("p", Br, p(t.user.description), 1)) : u("", !0)
5847
5862
  ]),
5848
- h("ul", Ar, [
5863
+ t.user.tags && t.user.tags.length ? (s(), o("ul", Ar, [
5849
5864
  (s(!0), o(_, null, B(t.user.tags, (D, E) => (s(), o("li", { key: E }, p(D), 1))), 128))
5850
- ]),
5851
- t.user.links ? (s(), o("div", jr, [
5865
+ ])) : u("", !0),
5866
+ t.user.links && t.user.links.length ? (s(), o("div", jr, [
5852
5867
  x(c, {
5853
5868
  links: t.user.links,
5854
5869
  orientation: "horizontal",
@@ -6896,7 +6911,7 @@ const Dd = {
6896
6911
  };
6897
6912
  function Kd(e, n, t, a, l, i) {
6898
6913
  var f, g, m, k;
6899
- const d = Dt, r = V, c = se("router-link");
6914
+ const d = V, r = Dt, c = se("router-link");
6900
6915
  return s(), o("div", {
6901
6916
  class: C([
6902
6917
  l.validationStatus,
@@ -6918,17 +6933,8 @@ function Kd(e, n, t, a, l, i) {
6918
6933
  F(p(t.labelText), 1),
6919
6934
  e.$attrs.required !== void 0 ? (s(), o("sup", Ad, "*")) : u("", !0)
6920
6935
  ], 8, Bd),
6921
- e.useCustomTooltip && (l.validationStatus === "" || l.validationStatus === "error") ? (s(), b(d, {
6922
- key: 0,
6923
- ref: "tooltip",
6924
- validationStatus: l.validationStatus,
6925
- validationMessage: e.getValidationMessage,
6926
- relatedId: e.tooltipId,
6927
- cmdListOfRequirements: e.listOfRequirements,
6928
- role: l.validationStatus === "error" ? "alert" : "dialog"
6929
- }, null, 8, ["validationStatus", "validationMessage", "relatedId", "cmdListOfRequirements", "role"])) : u("", !0),
6930
6936
  (e.$attrs.required || e.inputRequirements.length) && t.showStatusIcon ? (s(), o("a", {
6931
- key: 1,
6937
+ key: 0,
6932
6938
  href: "#",
6933
6939
  onClick: n[0] || (n[0] = I(() => {
6934
6940
  }, ["prevent"])),
@@ -6937,8 +6943,17 @@ function Kd(e, n, t, a, l, i) {
6937
6943
  "aria-live": "assertive",
6938
6944
  id: e.tooltipId
6939
6945
  }, [
6940
- x(r, { iconClass: e.getStatusIconClass }, null, 8, ["iconClass"])
6941
- ], 8, jd)) : u("", !0)
6946
+ x(d, { iconClass: e.getStatusIconClass }, null, 8, ["iconClass"])
6947
+ ], 8, jd)) : u("", !0),
6948
+ e.useCustomTooltip && (l.validationStatus === "" || l.validationStatus === "error") ? (s(), b(r, {
6949
+ key: 1,
6950
+ ref: "tooltip",
6951
+ validationStatus: l.validationStatus,
6952
+ validationMessage: e.getValidationMessage,
6953
+ relatedId: e.tooltipId,
6954
+ cmdListOfRequirements: e.listOfRequirements,
6955
+ role: l.validationStatus === "error" ? "alert" : "dialog"
6956
+ }, null, 8, ["validationStatus", "validationMessage", "relatedId", "cmdListOfRequirements", "role"])) : u("", !0)
6942
6957
  ])) : u("", !0),
6943
6958
  h("ul", {
6944
6959
  class: C({ open: l.showOptions }),
@@ -6961,7 +6976,7 @@ function Kd(e, n, t, a, l, i) {
6961
6976
  key: 1,
6962
6977
  style: we("background: " + i.optionColor)
6963
6978
  }, null, 4)) : u("", !0),
6964
- (g = i.optionIcon) != null && g.iconClass ? (s(), b(r, {
6979
+ (g = i.optionIcon) != null && g.iconClass ? (s(), b(d, {
6965
6980
  key: 2,
6966
6981
  type: (m = i.optionIcon) == null ? void 0 : m.iconType,
6967
6982
  iconClass: (k = i.optionIcon) == null ? void 0 : k.iconClass
@@ -6971,7 +6986,7 @@ function Kd(e, n, t, a, l, i) {
6971
6986
  class: "option-name",
6972
6987
  style: we(l.limitWidthStyle)
6973
6988
  }, p(i.optionName), 5)) : u("", !0),
6974
- t.iconDropdown ? (s(), b(r, {
6989
+ t.iconDropdown ? (s(), b(d, {
6975
6990
  key: 4,
6976
6991
  iconClass: t.iconDropdown.iconClass,
6977
6992
  type: t.iconDropdown.iconType,
@@ -6991,7 +7006,7 @@ function Kd(e, n, t, a, l, i) {
6991
7006
  class: C({ active: y.value === t.modelValue }),
6992
7007
  title: y.tooltip
6993
7008
  }, [
6994
- y.iconClass ? (s(), b(r, {
7009
+ y.iconClass ? (s(), b(d, {
6995
7010
  key: 0,
6996
7011
  iconClass: y.iconClass,
6997
7012
  type: y.iconType
@@ -7005,7 +7020,7 @@ function Kd(e, n, t, a, l, i) {
7005
7020
  class: C({ active: y.value === t.modelValue })
7006
7021
  }, {
7007
7022
  default: P(() => [
7008
- y.iconClass ? (s(), b(r, {
7023
+ y.iconClass ? (s(), b(d, {
7009
7024
  key: 0,
7010
7025
  iconClass: y.iconClass,
7011
7026
  type: y.iconType
@@ -7064,11 +7079,11 @@ function Kd(e, n, t, a, l, i) {
7064
7079
  href: "#",
7065
7080
  onClick: n[4] || (n[4] = I((...y) => i.toggleAllOptions && i.toggleAllOptions(...y), ["prevent"]))
7066
7081
  }, [
7067
- l.allOptionsSelected ? (s(), b(r, {
7082
+ l.allOptionsSelected ? (s(), b(d, {
7068
7083
  key: 1,
7069
7084
  iconClass: t.iconDeselectAllOptions.iconClass,
7070
7085
  type: t.iconDeselectAllOptions.iconType
7071
- }, null, 8, ["iconClass", "type"])) : (s(), b(r, {
7086
+ }, null, 8, ["iconClass", "type"])) : (s(), b(d, {
7072
7087
  key: 0,
7073
7088
  iconClass: t.iconSelectAllOptions.iconClass,
7074
7089
  type: t.iconSelectAllOptions.iconType
@@ -7660,7 +7675,7 @@ const Dc = {
7660
7675
  /**
7661
7676
  * for replacing native checkboxes/radio-buttons by custom ones (based on frontend-framework)
7662
7677
  *
7663
- * toggleSwitch-property must be set to 'false'
7678
+ * toggleSwitches-property must be set to 'false'
7664
7679
  *
7665
7680
  * @affectsStyling: true
7666
7681
  */
@@ -7675,7 +7690,7 @@ const Dc = {
7675
7690
  *
7676
7691
  * @affectsStyling: true
7677
7692
  */
7678
- toggleSwitch: {
7693
+ toggleSwitches: {
7679
7694
  type: Boolean,
7680
7695
  default: !1
7681
7696
  },
@@ -7788,7 +7803,7 @@ const Dc = {
7788
7803
  class: "flex-container no-flex"
7789
7804
  };
7790
7805
  function zc(e, n, t, a, l, i) {
7791
- const d = Dt, r = V;
7806
+ const d = V, r = Dt;
7792
7807
  return s(), o("div", {
7793
7808
  class: C([
7794
7809
  "cmd-input-group label",
@@ -7797,7 +7812,7 @@ function zc(e, n, t, a, l, i) {
7797
7812
  inline: t.labelInline,
7798
7813
  "multiple-switch": t.multipleSwitch,
7799
7814
  disabled: t.disabled,
7800
- "toggle-switch": t.toggleSwitch,
7815
+ "toggle-switches": t.toggleSwitches,
7801
7816
  "has-state": e.validationStatus
7802
7817
  }
7803
7818
  ]),
@@ -7808,8 +7823,20 @@ function zc(e, n, t, a, l, i) {
7808
7823
  F(p(t.labelText), 1),
7809
7824
  t.required ? (s(), o("sup", Ac, "*")) : u("", !0)
7810
7825
  ], 8, Bc),
7811
- e.useCustomTooltip && (e.validationStatus === "" || e.validationStatus === "error") ? (s(), b(d, {
7826
+ (t.required || e.inputRequirements.length > 0) && t.showStatusIcon ? (s(), o("a", {
7812
7827
  key: 0,
7828
+ href: "#",
7829
+ onClick: n[0] || (n[0] = I(() => {
7830
+ }, ["prevent"])),
7831
+ title: i.validationTooltip,
7832
+ "aria-errormessage": e.tooltipId,
7833
+ "aria-live": "assertive",
7834
+ id: e.tooltipId
7835
+ }, [
7836
+ x(d, { iconClass: e.getStatusIconClass }, null, 8, ["iconClass"])
7837
+ ], 8, jc)) : u("", !0),
7838
+ e.useCustomTooltip && (e.validationStatus === "" || e.validationStatus === "error") ? (s(), b(r, {
7839
+ key: 1,
7813
7840
  ref: "tooltip",
7814
7841
  showRequirements: e.showRequirements,
7815
7842
  cmdListOfRequirements: e.listOfRequirements,
@@ -7820,19 +7847,7 @@ function zc(e, n, t, a, l, i) {
7820
7847
  helplink: e.helplink,
7821
7848
  relatedId: e.tooltipId,
7822
7849
  role: e.validationStatus === "error" ? "alert" : "dialog"
7823
- }, null, 8, ["showRequirements", "cmdListOfRequirements", "validationStatus", "validationMessage", "inputAttributes", "inputModelValue", "helplink", "relatedId", "role"])) : u("", !0),
7824
- (t.required || e.inputRequirements.length > 0) && t.showStatusIcon ? (s(), o("a", {
7825
- key: 1,
7826
- href: "#",
7827
- onClick: n[0] || (n[0] = I(() => {
7828
- }, ["prevent"])),
7829
- title: i.validationTooltip,
7830
- "aria-errormessage": e.tooltipId,
7831
- "aria-live": "assertive",
7832
- id: e.tooltipId
7833
- }, [
7834
- x(r, { iconClass: e.getStatusIconClass }, null, 8, ["iconClass"])
7835
- ], 8, jc)) : u("", !0)
7850
+ }, null, 8, ["showRequirements", "cmdListOfRequirements", "validationStatus", "validationMessage", "inputAttributes", "inputModelValue", "helplink", "relatedId", "role"])) : u("", !0)
7836
7851
  ], 512), [
7837
7852
  [de, t.showLabel]
7838
7853
  ]),
@@ -7844,7 +7859,8 @@ function zc(e, n, t, a, l, i) {
7844
7859
  }, [
7845
7860
  (s(!0), o(_, null, B(t.inputElements, (c, f) => (s(), o("label", {
7846
7861
  key: f,
7847
- for: c.id
7862
+ for: c.id,
7863
+ class: C({ "toggle-switch": t.toggleSwitches })
7848
7864
  }, [
7849
7865
  ne(h("input", {
7850
7866
  type: t.inputTypes,
@@ -7853,17 +7869,17 @@ function zc(e, n, t, a, l, i) {
7853
7869
  value: c.value,
7854
7870
  "onUpdate:modelValue": n[1] || (n[1] = (g) => i.inputValue = g),
7855
7871
  disabled: t.disabled,
7856
- class: C({ "replace-input-type": t.replaceInputType, "toggle-switch": t.toggleSwitch })
7872
+ class: C({ "replace-input-type": t.replaceInputType })
7857
7873
  }, null, 10, Hc), [
7858
7874
  [xi, i.inputValue]
7859
7875
  ]),
7860
- t.multipleSwitch && c.iconClass ? (s(), b(r, {
7876
+ t.multipleSwitch && c.iconClass ? (s(), b(d, {
7861
7877
  key: 0,
7862
7878
  iconClass: c.iconClass,
7863
7879
  type: c.iconType
7864
7880
  }, null, 8, ["iconClass", "type"])) : u("", !0),
7865
7881
  c.labelText ? (s(), o("span", Ec, p(c.labelText), 1)) : u("", !0)
7866
- ], 8, Fc))), 128))
7882
+ ], 10, Fc))), 128))
7867
7883
  ], 2))
7868
7884
  ], 10, Nc);
7869
7885
  }