comand-component-library 4.2.2 → 4.2.4

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.
@@ -4219,6 +4219,11 @@ const fr = /* @__PURE__ */ M(rr, [["render", pr]]), hr = {
4219
4219
  } : null;
4220
4220
  }
4221
4221
  },
4222
+ methods: {
4223
+ hideSystemMessage(e) {
4224
+ this.showSystemMessage = !1, this.$emit("hideSystemMessage", e);
4225
+ }
4226
+ },
4222
4227
  watch: {
4223
4228
  message() {
4224
4229
  this.showSystemMessage = !0;
@@ -4241,7 +4246,7 @@ function br(e, t, n, s, i, l) {
4241
4246
  key: 0,
4242
4247
  href: "#",
4243
4248
  class: "close-button",
4244
- onClick: t[0] || (t[0] = S((c) => i.showSystemMessage = !1, ["prevent"])),
4249
+ onClick: t[0] || (t[0] = S((...c) => l.hideSystemMessage && l.hideSystemMessage(...c), ["prevent"])),
4245
4250
  title: n.iconClose.tooltip
4246
4251
  }, [
4247
4252
  p(d, {
@@ -12674,6 +12679,13 @@ const oh = /* @__PURE__ */ M($f, [["render", lh]]), ah = {
12674
12679
  type: Array,
12675
12680
  required: !0
12676
12681
  },
12682
+ /**
12683
+ * define the maximum listed number of recommendations
12684
+ */
12685
+ maxNumberOfRecommendations: {
12686
+ type: Number,
12687
+ default: 3
12688
+ },
12677
12689
  /**
12678
12690
  * set if list of recommendations will be filtered by first letter (else by any containing letter)
12679
12691
  */
@@ -12709,7 +12721,7 @@ const oh = /* @__PURE__ */ M($f, [["render", lh]]), ah = {
12709
12721
  return console.error("provided item.displayValue of 'listOfRecommendations' does not exist or does not match type 'string'!"), !1;
12710
12722
  const t = this.searchTerm.toLowerCase(), n = e.displayValue.toLowerCase();
12711
12723
  return this.filterByFirstLetter ? n.startsWith(t) : n.includes(t);
12712
- });
12724
+ }).slice(0, this.maxNumberOfRecommendations);
12713
12725
  }
12714
12726
  },
12715
12727
  methods: {
@@ -20334,7 +20346,7 @@ const f1 = /* @__PURE__ */ M(c1, [["render", p1]]), h1 = [
20334
20346
  text: "Zimbabwe",
20335
20347
  value: "zw"
20336
20348
  }
20337
- ], w1 = "comand-component-library", k1 = "4.2.2", T1 = "GPL-3.0-only", S1 = "CoManD-UI", _1 = "module", O1 = {
20349
+ ], w1 = "comand-component-library", k1 = "4.2.4", T1 = "GPL-3.0-only", S1 = "CoManD-UI", _1 = "module", O1 = {
20338
20350
  prepublishOnly: "npm run build-lib",
20339
20351
  dev: "vite",
20340
20352
  build: "vite build",
@@ -20352,7 +20364,7 @@ const f1 = /* @__PURE__ */ M(c1, [["render", p1]]), h1 = [
20352
20364
  "./all-currencies.json": "./src/assets/data/all-currencies.json"
20353
20365
  }, B1 = {
20354
20366
  "clickout-event": "^1.1.2",
20355
- "comand-frontend-framework": "^4.1.35",
20367
+ "comand-frontend-framework": "^4.1.39",
20356
20368
  "comand-ui-iconfonts": "^1.0.19",
20357
20369
  "core-js": "^3.20.1",
20358
20370
  prismjs: "^1.27.0",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "comand-component-library",
3
- "version": "4.2.2",
3
+ "version": "4.2.4",
4
4
  "license": "GPL-3.0-only",
5
5
  "author": "CoManD-UI",
6
6
  "private": false,
@@ -26,7 +26,7 @@
26
26
  },
27
27
  "dependencies": {
28
28
  "clickout-event": "^1.1.2",
29
- "comand-frontend-framework": "^4.1.35",
29
+ "comand-frontend-framework": "^4.1.39",
30
30
  "comand-ui-iconfonts": "^1.0.19",
31
31
  "core-js": "^3.20.1",
32
32
  "prismjs": "^1.27.0",
@@ -51,6 +51,13 @@ export default {
51
51
  type: Array,
52
52
  required: true
53
53
  },
54
+ /**
55
+ * define the maximum listed number of recommendations
56
+ */
57
+ maxNumberOfRecommendations: {
58
+ type: Number,
59
+ default: 3
60
+ },
54
61
  /**
55
62
  * set if list of recommendations will be filtered by first letter (else by any containing letter)
56
63
  */
@@ -94,7 +101,7 @@ export default {
94
101
 
95
102
  // check if string from listOfRecommendations starsWith or contains the provides string from the searchfield
96
103
  return this.filterByFirstLetter ? lowerCaseDisplayValue.startsWith(lowerCaseSearchTerm) : lowerCaseDisplayValue.includes(lowerCaseSearchTerm)
97
- })
104
+ }).slice(0, this.maxNumberOfRecommendations)
98
105
  }
99
106
  },
100
107
  methods: {
@@ -11,7 +11,7 @@
11
11
  v-if="iconClose.show && iconClose.iconClass"
12
12
  href="#"
13
13
  class="close-button"
14
- @click.prevent="showSystemMessage = false"
14
+ @click.prevent="hideSystemMessage"
15
15
  :title="iconClose.tooltip"
16
16
  >
17
17
  <!-- begin CmdIcon -->
@@ -136,6 +136,12 @@ export default {
136
136
  return null
137
137
  }
138
138
  },
139
+ methods: {
140
+ hideSystemMessage(event) {
141
+ this.showSystemMessage = false
142
+ this.$emit("hideSystemMessage", event)
143
+ }
144
+ },
139
145
  watch: {
140
146
  message() {
141
147
  this.showSystemMessage = true